# How the Patent-Disclosure-Skill Handles Invention, Utility Model, and Design Patents

> Learn how the patent-disclosure-skill classifies invention, utility model, and design patents using multi-layer inference and keyword analysis. Understand the patent classification process.

- Repository: [handsomestWei/patent-disclosure-skill](https://github.com/handsomestWei/patent-disclosure-skill)
- Tags: how-to-guide
- Published: 2026-09-08

---

**The patent-disclosure-skill classifies documents into invention, utility model, or design categories using a multi-layer inference system that prioritizes explicit user declarations, parses Chinese publication number suffixes, and scans bibliographic text for keywords, all implemented in [`skills/patent-disclosure/tools/patent_type.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-disclosure/tools/patent_type.py).**

The `handsomestWei/patent-disclosure-skill` repository automates disclosure workflows for Chinese intellectual property. Accurate **patent type classification** ensures that automated searches target the correct document categories and that regulatory submissions use the proper CNIPA forms. The skill resolves type ambiguities through a cascading heuristic engine that reconciles user input against document metadata.

## Canonical Patent Type Definitions

At the foundation of the classification system, the module defines four canonical constants around lines 12-16:

- **TYPE_INVENTION**: Represents invention patents (发明专利)
- **TYPE_UTILITY_MODEL**: Represents utility models (实用新型)
- **TYPE_DESIGN**: Represents design patents (外观设计)
- **TYPE_ALL**: A wildcard alias for unrestricted searches across all categories

These constants serve as the normalized vocabulary for all downstream processing and database queries.

## Multi-Layer Type Inference Architecture

The skill employs three complementary strategies to resolve patent type, coordinated by the `resolve_reader_patent_type()` function (lines 46-63), which applies strict priority ordering to determine the final classification.

### Normalizing User Declarations

The `normalize_patent_type()` function (lines 95-106) converts free-text input into canonical constants. It accepts English labels ("invention", "design"), Chinese terms ("发明专利", "外观设计"), or snake_case variants, defaulting to **TYPE_ALL** when input is ambiguous or omitted.

### Publication Number Parsing

When a Chinese publication number is available, `infer_patent_type_from_pub()` (lines 82-90) extracts the trailing alphabetic suffix to determine type:

- **A, B, or C suffix** → Invention patent
- **U or Y suffix** → Utility model
- **S suffix** → Design patent

For example, the identifier `CN209861402U` resolves to utility model due to the trailing **U**.

### Bibliographic Keyword Extraction

The `infer_patent_type_from_biblio()` function (lines 32-44) scans short text excerpts for specific keyword pairs:

- **"外观设计"** or **"design patent"** → Design
- **"实用新型"** or **"utility model"** → Utility model
- **"发明专利"** or **"invention patent"** → Invention

### Priority Resolution Logic

The `resolve_reader_patent_type()` function implements a cascading decision tree:

1. Explicit user declaration (unless "all")
2. Publication number inference
3. Bibliographic keyword inference

The function returns a dictionary containing the resolved type, Chinese label (`label_zh`), decision source (`user_declared`, `pub_inference`, or `biblio_inference`), normalized publication number, and confidence level.

## Workflow Integration Utilities

Beyond classification, the module provides specialized helpers for external patent systems and search interfaces.

### CNIPA e-Pub Checkbox States

The `epub_checkbox_states()` function (lines 106-112) translates patent types into the checkbox configuration required by the China National Intellectual Property Administration (CNIPA) e-publication search interface. It returns a dictionary mapping field codes to boolean values:

- **fmgb** and **fmsq** enabled for invention grants and applications
- **xxsq** enabled for utility model applications
- **wgsq** enabled for design applications

### Google Patents Query Construction

For external search integration, `google_patents_websearch_query()` (lines 121-142) builds properly scoped query strings. It appends `type:PATENT` for inventions and utility models, or `type:DESIGN` specifically for design patents, combined with country filters and IPC/CPC classification codes.

## Practical Implementation Examples

```python

# Resolving type from user declaration and publication number

from skills.patent_disclosure.tools.patent_type import resolve_reader_patent_type

result = resolve_reader_patent_type(
    pub="CN209861402U",
    user_declared="design",
    biblio_text=None,
)
print(result)

# {'patent_type': 'design', 'label_zh': '外观设计', 

#  'source': 'user_declared', 'pub': 'CN209861402U', 'confidence': 'high'}

```

```python

# Inferring solely from publication number suffix

result = resolve_reader_patent_type(pub="CN202012345U")
print(result["patent_type"])  # utility_model

print(result["label_zh"])     # 实用新型

```

```python

# Building CNIPA search checkbox configuration

from skills.patent_disclosure.tools.patent_type import epub_checkbox_states

checkboxes = epub_checkbox_states("invention")
print(checkboxes)

# {'fmgb': True, 'fmsq': True, 'xxsq': False, 'wgsq': False}

```

```python

# Constructing Google Patents query for design searches

from skills.patent_disclosure.tools.patent_type import google_patents_websearch_query

query = google_patents_websearch_query(
    keywords="solar panel",
    patent_type="design",
    class_codes=["S02B/33"]
)
print(query)

# "solar panel country:CN type:DESIGN S02B/33"

```

## Summary

- The **patent-disclosure-skill** centralizes type handling in [`skills/patent-disclosure/tools/patent_type.py`](https://github.com/handsomestWei/patent-disclosure-skill/blob/main/skills/patent-disclosure/tools/patent_type.py) using canonical constants for invention, utility model, and design patents.

- **Three inference layers**—user normalization, publication number parsing (A/B/C, U/Y, S suffixes), and bibliographic keyword scanning—feed into a priority-based resolution engine.

- The system integrates with **CNIPA e-Pub** interfaces via checkbox state mappers (`epub_checkbox_states`) and generates **Google Patents** compatible queries with appropriate type filters (`type:PATENT` vs `type:DESIGN`).

- All resolution paths converge in `resolve_reader_patent_type()`, which provides structured output including confidence levels and source attribution for audit trails.

## Frequently Asked Questions

### How does the tool handle ambiguous patent type inputs?

When input is ambiguous or explicitly set to "all", the `normalize_patent_type()` function defaults to **TYPE_ALL**, allowing searches to span all three categories. The resolution engine then attempts to derive a specific type from publication numbers or bibliographic text if available, ensuring robust handling of incomplete metadata.

### What Chinese keywords trigger the bibliographic text analyzer?

The `infer_patent_type_from_biblio()` function recognizes **"发明专利"** (invention patent), **"实用新型"** (utility model), and **"外观设计"** (design patent) in Chinese, alongside their English equivalents "invention patent", "utility model", and "design patent". These keywords are scanned case-insensitively within short document excerpts.

### Can the system differentiate between granted patents and applications?

While the type classification (invention, utility, design) is distinct from grant status, the publication number parser uses suffixes to infer both type and stage. For inventions, **A** indicates application while **B/C** indicate granted patents. For utility models, **U** and **Y** specifically denote different grant/application stages, though both resolve to the utility model type.

### How does the patent type influence the CNIPA search interface?

The `epub_checkbox_states()` function maps each canonical type to specific checkbox IDs in the CNIPA e-publication system: **fmgb** and **fmsq** for inventions, **xxsq** for utility models, and **wgsq** for designs. This ensures the automated search form requests only relevant document categories, preventing contamination of results with non-matching patent types.