A method and system for extracting token pairs from patent texts

By parsing and constructing a dictionary of tag pairs in patent text, combined with entity discrimination and noise recovery models, the problem of low precision and large granularity in named entity recognition in the existing technology is solved, and more efficient and accurate component name extraction is achieved.

CN118350371BActive Publication Date: 2024-09-10BEIJING ZHIGUAGUA TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410752058.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-12
Publication Date
2024-09-10
Estimated Expiration
2044-06-12

AI Technical Summary

Technical Problem

Existing technologies have the problems of low accuracy and large granularity when identifying named entities in patent texts, especially component name extraction in the mechanical field. Moreover, rule-based methods lack generalization capabilities and are difficult to handle complex word formation features and one-to-many mappings. relation.

Method used

A tag pair extraction method for patent text is proposed. By parsing the drawing description and specific implementation methods, a tag pair dictionary is constructed, supporting one-to-many mapping, and using entity discrimination and denoising models, large model-based noise recovery and entity It is recommended to optimize the marked entity extraction effect.

Benefits of technology

It improves the precision and accuracy of marked entity extraction, avoids word segmentation errors, supports more complex word formation features and one-to-many mapping relationships, enhances knowledge and noise understanding capabilities, and improves the efficiency and accuracy of component name extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118350371B
    Figure CN118350371B
Patent Text Reader

Abstract

The present application discloses a method and system for extracting tag pairs for patent texts. The method includes first obtaining the original patent text, parsing the illustrations and specific implementation methods in the original patent text; then extracting tag pairs from the parsed illustrations and specific implementation methods to obtain an illustration tag pair dictionary and a specific implementation method tag pair dictionary; merging the illustration tag pair dictionary, the specific implementation method tag pair dictionary, and the recommended entity to obtain a tag pair extraction result. The present application does not use word segmentation when extracting tag pairs, so the influence of word segmentation errors on the extraction effect is avoided. At the same time, an entity discrimination and denoising model is used to further optimize the tag entity extraction effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a method and system for extracting token pairs for patent texts. Background Art

[0002] With the development of natural language processing and the increasing demand for automated knowledge acquisition, automatic identification of named entities from patent texts has received widespread attention. Many researchers at home and abroad have conducted relevant explorations. Reference [Chen Qiuyuan, Cheng Guang, Li Di, et al. Research on named entity recognition in the field of mechanical design. Computer Engineering and Applications, 2017, 053(020): 100-104.] By counting features such as the degree of close proximity between character strings and defining the degree of close connection between different words, domain words in the mechanical field are identified from Chinese texts, and the harmonic mean F1 is 83.89%. Reference [Hu Jie. Research on knowledge acquisition model and reuse method for innovative design of electromechanical products. Guizhou: Guizhou University, 2018.] By tagging the names of components of specified types in Chinese patents, counting their internal part-of-speech rules, and using bidirectional long short-term memory neural network and conditional random field probability model, 9 types of named entities of electromechanical products are identified, and the comprehensive harmonic mean F1 of the 9 types of entity extraction is 83.78%.

[0003] A method for outputting patent figure mark descriptions and a device and system therefor (Chinese patent publication number CN115427944A) are provided. The method uses a plurality of patent specification samples to establish figure mark description extraction rules based on text mining technology, and a method for extracting figure mark descriptions from patent specifications based on the established figure mark description extraction rules. The figure mark description refers to the entity represented by the text such as the component name corresponding to the figure mark in the specification or claim. The rule extraction step includes: (1) classifying the plurality of patent specification samples by application country; (2) extracting common features according to the classified application countries; and (3) establishing the figure mark description extraction rules based on the extracted features. The rules include, for example, in the case of Korea, the feature that the figure mark description is located before the figure mark, the feature that the figure mark is contained in two brackets, etc. as common features, and in the case of the United States, the feature that the figure mark description is located before the figure mark, the feature that the figure mark is written in bold, and the feature that the figure mark is not distinguished by two brackets like in Korea, etc. as common features. Depending on the country of application, there is a case where the patent specification has a 'symbol description' category that separately records the figure mark and the figure mark description. This can also be extracted as a common feature, and the 'symbol description' category can be used to extract the figure mark description later. After studying various patent specification samples, various common features can also be extracted according to the country of application. After establishing the figure mark description extraction rules (or models) based on the common features extracted in this way, the figure mark description is extracted from the patent specification using them. An embodiment is proposed in which, when multiple figure mark descriptions are extracted, after searching the multiple figure mark descriptions extracted from the patent specification, the figure mark description with the largest amount of search is determined as the final figure mark description for extraction. It is proposed that the number of words in the figure mark description is limited to a preset number based on the figure mark description data accumulated so far, that is, the number of words in all the compound words of the mark description database is counted, and the number of words with a statistically low extraction rate / probability is set to a limited number. When the probability of a compound word with more than five words being extracted as a figure mark description is 0.0001%, a maximum of four words are used as the figure mark description.

[0004] A method, system, terminal and readable storage medium for automatically extracting component names in a patent text (Chinese patent publication with publication number CN112380856B) discloses a method for automatically extracting component names in a patent text, characterized in that it includes: preprocessing and segmenting the patent text, extracting reference component words from the patent text based on word frequency difference, wherein candidate words are extracted with the figure mark as the right boundary, and candidate words are selectively retained based on the word frequency difference of each character at each character position in all candidate words under the same figure mark to obtain reference component words; extracting the left words of the reference component words in the patent text and constructing a left boundary word library, and extracting component candidate words in the patent text with the left boundary word library as the left boundary and the figure mark as the right boundary; selectively retaining candidate words based on the word frequency difference at each character position in the component candidate words to obtain component names; wherein the characters with the largest word frequency at the character position whose word frequency difference is greater than the word frequency difference threshold are retained, which is particularly suitable for solving component name extraction in the mechanical field.

[0005] Existing technologies such as a method and system for generating images from text based on transition space mapping (Chinese patent publication CN110930469B), a method for generating images from text based on cross-modal similarity and generative adversarial networks (Chinese patent publication CN110490946B), a photo-level image generation method based on semantic content and fast image retrieval (Chinese patent publication CN110634170B), and a knowledge-driven text-to-image generation method (Chinese patent publication with authorization announcement number CN113837229A) all achieve diffuse image generation by training an image generation model composed of a generative adversarial network.

[0006] References [Chen Qiuyuan, Cheng Guang, Li Di, et al. Research on named entity recognition in the field of mechanical design. Computer Engineering and Applications, 2017, 053(020): 100-104.] and [Hu Jie. Research on knowledge acquisition model and reuse method for innovative design of electromechanical products. Guizhou: Guizhou University, 2018.], based on rules, statistics or a combination of both methods, it is necessary to establish a template for the internal word formation features of component names, construct component name boundary words and formulate statistical methods. However, the word formation rules of named entities in patent texts in the mechanical field are complex, and it is difficult to construct a unified component name part-of-speech template. The component name boundary word extraction method does not consider the internal part-of-speech of the component name, and has good field independence. However, the component name candidate words are extracted simply by numeric characters and the number of characters to the left of the number is limited. The granularity of the extraction result is large, resulting in low component name extraction accuracy. The statistical extraction method mainly counts the internal word formation rules of the component name and calculates statistical quantities such as word frequency, mutual information, and information entropy. This method can effectively extract domain terms, but it requires a large amount of corpus for training. The selection of features has a great impact on the recognition effect, and it is difficult to completely extract component names with complex word formation features. Therefore, it is still of great significance to further improve the efficiency and accuracy of automatic recognition of technical features of patent documents and continue to explore the named entity recognition algorithm of patent texts.

[0007] The patent figure mark description output method and the device and system used therefor (the Chinese patent publication with publication number CN115427944A) completely implement the figure mark description extraction based on rules, and lack the generalization ability of the model-based extraction method. In addition, the method proposed by it, which extracts multiple figure mark descriptions from a mark and determines the figure mark description with the largest amount of search as the final figure mark description, may not be suitable for actual scenarios, because there is a one-to-many mapping relationship between figure marks and mark descriptions in some patents, which is inconsistent with the actual situation, such as (the Chinese patent publication with publication number CN112622722B) attached Figure 1 In the patent text, the number 9 has a one-to-many mapping relationship between opening 9 and air supply system 9. It is proposed that the number of words in the figure mark description is limited to a preset number based on the figure mark description data accumulated so far, that is, the number of words in all the compound words of the figure mark description database is counted, and the number of words with a statistically low extraction rate / probability is set as a limited number, and a maximum of four words are used as figure mark descriptions. The threshold value calculated by statistics depends on the distribution of the accumulated database, and figure mark descriptions longer than 5 words are discarded. The number of characters on the left side of the number is limited to extract the mark description, and the granularity of the extraction result is larger.

[0008] A method, system, terminal and readable storage medium for automatically extracting component names from patent texts (Chinese patent publication with publication number CN112380856B) is based on the way components are written in patent texts, combined with figure marks and based on word frequency values ​​to extract component names. The method of the present invention can simply, efficiently and accurately identify entity names, especially can effectively extract component names in the mechanical field. In addition to the mechanical field, other fields need to explore better solutions. The patent text is also preprocessed and segmented. The vertical field segmentation effect will affect the accuracy and recall rate of component name extraction. Summary of the invention

[0009] The present application provides a method and system for extracting tag pairs from patent texts, aiming to solve the problems existing in the prior art.

[0010] In a first aspect, a method for extracting token pairs from patent texts is provided, the method comprising:

[0011] Obtain the original patent text and parse the illustrations and specific implementation methods in the original patent text;

[0012] Extracting tag pairs from the parsed illustrations and specific implementations to obtain an illustration tag pair dictionary and a specific implementation tag pair dictionary; wherein extracting tag pairs from the specific implementations also includes obtaining recommended entities;

[0013] The tag pair dictionary of the accompanying drawing description, the tag pair dictionary of the specific implementation scheme and the recommended entity are combined to obtain a tag pair extraction result.

[0014] Optionally, the extracted tag pairs in the parsed figure description specifically include:

[0015] Get punctuation marks for dividing the illustration description;

[0016] Segment the figure description to obtain a string of marked entities and their number combinations;

[0017] Split the string of the marked entity and its number combination to obtain the marked entity and its corresponding number;

[0018] Construct a tag pair dictionary and perform consistency processing on the two dictionaries; before constructing the tag pair dictionary, it also includes calling an entity discrimination and denoising model to perform tag entity discrimination and denoising as well as noise recovery and entity recommendation.

[0019] Optionally, extracting the tag pairs in a specific implementation manner after parsing specifically includes:

[0020] Get the punctuation marks used for segmentation of the specific implementation method;

[0021] Split the specific implementation method and obtain all strings with the number as suffix;

[0022] Remove outliers and obtain complete numbers;

[0023] Build a dictionary of tag numbers to lists of tagged entities;

[0024] Remove outliers;

[0025] Get a list of tagged entities consisting of a common tail string;

[0026] Call the entity recognition and denoising model to perform labeled entity recognition and denoising;

[0027] Noise recycling and entity recommendation;

[0028] The recovered tagged entities and their numbers are put into the tag pair dictionary, and the recommended tagged entities are put into the dictionary.

[0029] Optionally, removing the outliers includes removing truncated numbers in the list of marker numbers by constructing a dictionary, specifically including:

[0030] S101: traverse the number list multi_num corresponding to the current marked entity to be processed:

[0031] S1011: Verify the legality of the current number num, if it is legal, proceed to S1012, otherwise continue to execute S101;

[0032] S1012: Determine whether the current markup entity to be processed exists in the dictionary raw_components{markup entity: number list}. If so, proceed to S1013; otherwise, proceed to S1018.

[0033] S1013: Obtain the existing number list of the current marked entity to be processed from the dictionary raw_components{marked entity: number list} being constructed. If there is no existing number list, return an empty list, which is represented by old_num_lst;

[0034] S1014: If the current number num does not exist in old_num_lst and is not a prefix substring of any number in old_num_lst, continue to S1015, otherwise execute S101;

[0035] S1015: Clear the substring element of the current number num in old_num_lst to obtain new_num_lst;

[0036] S1016: Add the current number num to new_num_lst;

[0037] S1017: Update the value of the key "current marking entity curr_e" in the dictionary raw_components{marking entity: marking number list} to new_num_lst, and continue to execute S102;

[0038] S1018: Write the current tag entity into the dictionary raw_components{tag entity: tag number list};

[0039] S102: Return the dictionary raw_components{tag entity:tag number list}.

[0040] Optionally, removing outliers specifically includes:

[0041] S201: Calculate the length min_len of the shortest element in the marked entity list t_lst;

[0042] S202: Obtain a suffix list within a set length range and remove duplicates;

[0043] S203: Calculate the frequencies of all suffixes in the suffix list;

[0044] S204: If there is not less than one suffix, remove the marked entity with the lowest frequency suffix in the marked entity list t_lst to obtain a marked entity list new_t_lst after removing outliers;

[0045] S205: Return new_t_lst.

[0046] Optionally, before calling the entity discrimination and denoising model, it also includes marking entity discrimination and denoising model training, and the marking entity discrimination and denoising model training algorithm specifically includes:

[0047] S301: Load the data set and process: encode, divide into training and validation sets;

[0048] S302: Initialize the model:

[0049] S3021: Implement the model model and call the from_pretrained() method of BertForSequenceClassification;

[0050] S3022: Implement optimizer optimizer: call AdamW() of Transformer to implement;

[0051] S3023: Implement the warmup scheduler: call Transformer's get_linear_schedule_with_warmup() implementation;

[0052] S303: Setting model training hyperparameters;

[0053] S304: iteratively optimize the model model;

[0054] S3041: Gradient clearing: call model's zero_grad() to implement;

[0055] S3042: Calculate loss: Call model() to implement; specifically use binary cross entropy loss, and the calculation formula is defined as follows:

[0056]

[0057] Among them, n represents the nth item in a batch of data; c represents the class label number; l n,c Indicates the loss of the nth data belonging to category c; -w n,c Used to give different weights to samples of different categories. The default value is None, which is an optional parameter. c Used to give different weights to positive samples and negative samples, which is useful for dealing with unbalanced data sets. The default value is None and is an optional parameter; n,c Indicates that the nth item in a batch of data belongs to category c; Indicates the probability value of predicting the nth data in a batch as category c; Indicates that the nth item in a batch of data does not belong to category c; Indicates the probability value that the nth data in a batch of data is predicted to be non-category c;

[0058] S3043: Perform gradient backpropagation and clip the model gradient to prevent gradient explosion;

[0059] S3044: performing gradient update;

[0060] S305: Return the trained model.

[0061] In a second aspect, a token pair extraction system for patent texts is provided, the system comprising:

[0062] A parsing module is used to obtain the original patent text and parse the illustrations and specific implementation methods in the original patent text;

[0063] An extraction module, used to extract tag pairs from the parsed illustrations and specific implementations to obtain an illustration tag pair dictionary and a specific implementation tag pair dictionary; wherein extracting tag pairs from the specific implementations also includes obtaining recommended entities;

[0064] A merging module is used to merge the tag pair dictionary of the accompanying drawings, the tag pair dictionary of the specific implementation scheme and the recommended entity to obtain a tag pair extraction result.

[0065] In a third aspect, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the method for extracting tag pairs for patent text as described in any one of the first aspects above is implemented.

[0066] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method for extracting tag pairs for patent text as described in any one of the first aspects above is implemented.

[0067] In a fifth aspect, a computer program product is provided, including a computer program / instruction, which, when executed, implements the method for extracting tag pairs for patent texts as described in any one of the first aspects above.

[0068] Compared with the prior art, this application has at least the following beneficial effects:

[0069] The present invention extracts tag pairs, constructs dictionaries {tag entity: tag number list} and {tag number: tag entity list}, and uses list structure to support one-to-many mapping.

[0070] The present invention does not use word segmentation, thus avoiding the influence of word segmentation errors on the extraction effect.

[0071] The present invention provides an entity discrimination and denoising model, which further optimizes the effect of labeled entity extraction.

[0072] The noise recovery method based on the big model integrates world knowledge by applying the big model, broadens the knowledge of the method described in the present invention, and utilizes world knowledge other than this patent to more comprehensively understand the semantics of noise, so as to achieve the recognition of the labeled entities hidden in the noise by using the generation method. At the same time, the big model generation capability is used to timely correct the misjudged noise of the denoising model to a certain extent, thereby optimizing the extraction effect of the labeled entities. After the big model is used to understand the noise, entity recommendations are made, and the understanding and generation capabilities of the big model are brought into play, so that more professional expressions of entities can be excavated, which is conducive to discovering better professional expressions of labeled entities for recommendation. BRIEF DESCRIPTION OF THE DRAWINGS

[0073] Figure 1 A flow chart of a method for extracting token pairs from patent texts provided in an embodiment of the present application;

[0074] Figure 2 A flow chart of a method for extracting token pairs from patent texts provided for an optional embodiment of the present application;

[0075] Figure 3 A block diagram of the module architecture of a patent text-oriented tag pair extraction system provided for one embodiment of the present application;

[0076] Figure 4 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0077] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0078] In the description of the present application: the terms "including", "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units that have been explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.

[0079] The present invention provides a patent text-oriented tag pair extraction method and system for extracting tag pairs in patent texts. The tag pairs include tag entities and tag numbers, and the tag entities and their tag numbers are paired to construct two dictionaries: {tag entity: tag number list} and {tag number: tag entity list}, and both dictionaries support a one-to-many mapping relationship. The tag entities include but are not limited to the tag entities corresponding to the tag numbers appearing in the drawings.

[0080] The present invention provides a patent text-oriented token pair extraction system. Figure 1 A flowchart of a tag pair extraction method for patent text is given, which specifically includes: (1) parsing the illustrations; (2) extracting tag pairs from the illustrations; (3) parsing the specific implementation methods; (4) extracting tag pairs from the specific implementation methods; (5) merging the results, which specifically includes:

[0081] First, the original patent text is obtained, and the illustrations and specific implementation methods in the original patent text are analyzed;

[0082] Then, the tag pairs are extracted from the parsed illustrations and specific implementations to obtain the illustration tag pair dictionary and the specific implementation tag pair dictionary; wherein the tag pair extraction for the specific implementation also includes obtaining the recommended entity;

[0083] Finally, the tag pair dictionary of the accompanying drawings, the tag pair dictionary of the specific implementation scheme and the recommended entities are merged to obtain the tag pair extraction result.

[0084] like Figure 2As shown, a specific process of extracting tag pairs from the parsed illustrations and specific implementations to obtain the illustration tag pair dictionary and the specific implementation tag pair dictionary is given, wherein:

[0085] The extracted mark pairs in the parsed illustrations specifically include:

[0086] Get punctuation marks for dividing the illustration description;

[0087] Segment the figure description to obtain a string of marked entities and their number combinations;

[0088] Split the string of the marked entity and its number combination to obtain the marked entity and its corresponding number;

[0089] Construct a tag pair dictionary and perform consistency processing on the two dictionaries; before constructing the tag pair dictionary, it also includes calling an entity discrimination and denoising model to perform tag entity discrimination and denoising as well as noise recovery and entity recommendation.

[0090] The specific implementation method after parsing includes:

[0091] Get the punctuation marks used for segmentation of the specific implementation method;

[0092] Split the specific implementation method and obtain all strings with the number as suffix;

[0093] Remove outliers and obtain complete numbers;

[0094] Build a dictionary of tag numbers to lists of tagged entities;

[0095] Remove outliers;

[0096] Get a list of tagged entities consisting of a common tail string;

[0097] Call the entity recognition and denoising model to perform labeled entity recognition and denoising;

[0098] Noise recycling and entity recommendation;

[0099] The recovered tagged entities and their numbers are put into the tag pair dictionary, and the recommended tagged entities are put into the dictionary.

[0100] In this embodiment, the specific features are: (1) removing abnormal points and outliers; (2) marking entity discrimination and denoising models; (3) integrating world knowledge into the large model for noise recovery and entity recommendation. The specific implementation processes are given below:

[0101] 1) Remove abnormal points and outliers

[0102] This feature module inputs the marked entities and their numbers extracted from the patent text, and outputs the marked entities and their numbers after removing outliers. The function is to remove abnormal points and outliers in the extracted marked entities and their numbers. This feature module includes two parts: removing abnormal points and outliers.

[0103] (1) Remove outliers

[0104] The truncated number anomaly in the tag number list is removed by constructing a dictionary {marked entity: tag number list}. The truncated number, for example: "first connector 12" and "first connector 1201", where "first connector 12" is a truncated anomaly of the tag number 1201. The construction of the dictionary {marked entity: tag number list} removes the truncated number anomaly in the number list, and is designed and implemented through "Algorithm 1 Truncated Number Processing Algorithm", the input of Algorithm 1 Truncated Number Processing Algorithm is the current tag entity curr_e to be processed and its number list multi_num. The output dictionary raw_components {marked entity: tag number list}. The specific steps include:

[0105] S101: traverse the number list multi_num corresponding to the current marked entity to be processed:

[0106] S1011: Verify the legality of the current number num, if it is legal, continue to S1012, otherwise continue to execute S101.

[0107] S1012: Determine whether the current markup entity to be processed exists in the dictionary raw_components{markup entity: number list}. If so, proceed to S1013; otherwise, execute S1018.

[0108] S1013: Obtain the existing number list of the marked entity to be processed currently from the dictionary raw_components{marked entity: number list} being constructed. If there is none, return an empty list, represented by old_num_lst.

[0109] S1014: If the current number num does not exist in old_num_lst and is not a prefix substring of any number in old_num_lst, continue to S1015, otherwise execute S101.

[0110] S1015: Clear the substring element of the current number num in old_num_lst to obtain new_num_lst.

[0111] S1016: Add the current number num into new_num_lst.

[0112] S1017: Update the value of the key “current marked entity curr_e” in the dictionary raw_components{marked entity:marked number list} to new_num_lst, and continue to execute S102.

[0113] S1018: Write the current tag entity into the dictionary raw_components{tag entity: tag number list}.

[0114] S102: Return the dictionary raw_components{tag entity:tag number list}.

[0115] (2) Remove outliers

[0116] Remove outliers from the list of labeled entities, design and implement it through "Algorithm 2: Remove Outliers Algorithm". Input of Algorithm 2: Remove Outliers Algorithm: List of labeled entities t_lst. Output: List of labeled entities new_t_lst after removing outliers. The specific steps include:

[0117] S201: Calculate the length min_len of the shortest element in the marked entity list t_lst.

[0118] S202: Within the length interval [2:min_len], obtain the suffix list and remove duplicates.

[0119] S203: Calculate the frequencies of all suffixes in the suffix list.

[0120] S204: If there is not less than one suffix, remove the marked entity with the lowest frequency suffix in the marked entity list t_lst to obtain a marked entity list new_t_lst after removing outliers.

[0121] S205: Return new_t_lst.

[0122] 2) Labeled entity discrimination and denoising model

[0123] This feature module inputs the automatically extracted candidate labeled entities and outputs whether it is a labeled entity or noise. Its function is to determine whether a given labeled entity is an entity or noise. The labeled entity discrimination and denoising model and the model training data set format are shown in "Table 1 Labeled entity discrimination and denoising model training data set example":

[0124] Table 1. Examples of training datasets for labeled entity recognition and denoising models

[0125]

[0126] Among them, label 0 is a positive example, which is an entity. Label 1 is a negative example, which is noise. The labeled entity discrimination and denoising model is implemented based on Transformer's BertForSequenceClassification. Transformer's AdamW optimizer is used to iteratively optimize the model. The model training algorithm is shown in "Algorithm 3 Label entity discrimination and denoising model training algorithm".

[0127] Algorithm 3 Labeled Entity Discrimination and Denoising Model Training Algorithm Input: Labeled Entity Discrimination and Denoising Model Training Dataset, the format is shown in "Table 1 Labeled Entity Discrimination and Denoising Model Training Dataset Example". Output: The trained labeled entity discrimination and denoising model. The specific steps include:

[0128] S301: Load the dataset and process: encode, divide into training and validation sets.

[0129] S302: Initialize the model:

[0130] S3021: Implement model model: Call the from_pretrained() method of BertForSequenceClassification, the parameters include: pretrained_model_name_or_path (pre-trained model location), num_labels=2, output_attentions=False, output_hidden_states=True, classifier_dropout=0.1.

[0131] S3022: Implement optimizer optimizer: Call Transformer's AdamW() implementation, the parameters include: model.parameters(), lr=2e-5, eps=1e-8.

[0132] S3023: Implement the warmup scheduler: Call Transformer's get_linear_schedule_with_warmup() implementation, the parameters include: optimizer, num_warmup_steps=0, num_training_steps=total_steps, which means that after the learning rate is warmed up for num_warmup_steps steps, the parameters are updated according to the specified learning rate.

[0133] S303: Set model training hyperparameters batch_size=160, epochs=16.

[0134] S304: Iteratively optimize the model model.

[0135] S3041: Gradient clearing: Call model's zero_grad() to implement it.

[0136] S3042: Calculate loss: Call model() to implement, the parameters include: batch[0], token_type_ids=None, attention_mask=(batch[0]>0), labels=batch[1]. Use binary cross entropy loss, the calculation formula is defined as follows:

[0137]

[0138] Among them, n represents the nth item in a batch of data; c represents the class label number; l n,c Indicates the loss of the nth data belonging to category c; -w n,c Used to give different weights to samples of different categories. The default value is None, which is an optional parameter. c Used to give different weights to positive samples and negative samples, which is useful for dealing with unbalanced data sets. The default value is None and is an optional parameter; n,c Indicates that the nth item in a batch of data belongs to category c; Indicates the probability value of predicting the nth data in a batch as category c; Indicates that the nth item in a batch of data does not belong to category c; Indicates the probability value that the nth data in a batch of data is predicted to be non-category c.

[0139] S3043: Gradient backpropagation: Call loss.backward() and torch.nn.utils.clip_grad_norm(model.parameters(), 1.0) to implement. Model.parameters() is the model parameter to be optimized; 1.0 is the gradient clipping threshold; torch.nn.utils.clip_grad_norm() clips the model gradient to prevent gradient explosion.

[0140] S3044: Gradient update: Call optimizer.step() and scheduler.step() to implement.

[0141] S305: Return the trained model.

[0142] Apply the trained labeled entity discrimination and denoising model to perform entity judgment, as shown in "Algorithm 4 Labeled entity discrimination and denoising model application algorithm". Algorithm 4 Labeled entity discrimination and denoising model application algorithm input: extracted labeled entities to be judged, loaded labeled entity discrimination and denoising model. Output: logical value represented by 0 and 1, 0: entity; 1: noise. The specific steps include:

[0143] S401: Encode the extracted marked entity to be judged.

[0144] S402: Input the encoded marked entity to be determined into the marked entity determination and denoising model.

[0145] S403: Analyze the model output and obtain the judgment result, 0: entity; 1: noise.

[0146] 3) Integrate world knowledge into large models for noise recovery and entity recommendation

[0147] This feature module inputs noise and outputs the generated marked entity or empty. It functions to identify the potential marked entities in the noise and generate them to complete noise recovery. The noise may contain potential marked entities, such as the noise "road oil discharge flow control valve". In addition to recovering "oil discharge flow control valve", "flow control valve" and "regulating valve", the large model also recommends "oil discharge valve".

[0148] The present invention is based on large models, such as Tongyi Qianwen-72B, which integrates world knowledge to understand noise, performs noise recovery, and identifies hidden label entities through generative methods to achieve the purpose of optimizing label extraction effects. Tongyi Qianwen-72B (Qwen-72B) is a 72 billion parameter scale model of the Tongyi Qianwen large model series developed by Alibaba Cloud; Qwen-72B is a large language model based on Transformer, which is trained on ultra-large-scale pre-training data; pre-training data includes a large amount of network text, professional books, codes, etc.

[0149] Based on the integration of world knowledge into the large model for noise recovery, a fine-tuning prompt is designed as shown in “Table 2 Prompt for noise recovery based on the integration of world knowledge into the large model”.

[0150] Table 2 Prompt for noise recovery based on large model integrating world knowledge

[0151]

[0152] {noise} in the table represents the input noise to be recovered; *** is a placeholder for the entity or component name output or recommendation by the model.

[0153] In addition, the label pair extraction system in the present application includes: (1) parsing the illustrations; (2) extracting label pairs from the illustrations; (3) parsing the specific implementation methods; (4) extracting label pairs from the specific implementation methods; (5) the specific process of result merging may optionally include the following contents:

[0154] (1) Analysis of the attached drawings

[0155] This module inputs the original patent text and outputs the illustrations. Its function is to parse the illustrations in the original patent text. The original patent text of the present invention is in XML format, and the XML parsing package is used to parse the XML tags to obtain the illustrations.

[0156] (2) Extracting label pairs from the illustrations

[0157] This module inputs the figure description in the patent text and outputs the extracted tag pairs. Its function is to extract tag pairs from the figure description text. It includes the following steps:

[0158] Step 1: Design and apply "Algorithm 5: Extracting punctuation marks for segmentation" to obtain punctuation marks for segmentation of attached figure descriptions;

[0159] Algorithm 5 Extract punctuation for segmentation Input of the algorithm: All Chinese punctuation. Output: '|' linked punctuation string for segmentation. The specific steps include:

[0160] S501: Define a regular template RE_PUNCTUATION = re.compile(r'\W') to match all punctuation marks.

[0161] S502: Define and initialize a punctuation mark list for segmentation, RE_PUNCTUATION_SPLIT_LST = [',','。', '?', ';', '!', '!'].

[0162] S503: Use the regular template RE_PUNCTUATION = re.compile(r'\W') to match all punctuation marks in the figure description and traverse:

[0163] S5031: If the current punctuation mark is in ['、', '-', '—', '——', ':', ':', ' ', '\t'], that is, it is not a separator between multiple components, but tends to be a separator between components and suffixes, no processing is performed, and S5031 is continued to traverse the next symbol; otherwise, S5032 and S5033 are executed sequentially.

[0164] S5032: Processing regular special symbols, the rules are as follows:

[0165] English brackets and parentheses are converted into corresponding Chinese brackets and parentheses respectively;

[0166] '+' is converted to '\\+', '*' is converted to '\\*';

[0167] '.' is replaced by an empty string.

[0168] S5033: If the current punctuation mark is not empty and is not in the list of punctuation marks for segmentation, then add the current punctuation mark to the list of punctuation marks for segmentation:

[0169] RE_PUNCTUATION_SPLIT_LST.append(punc)

[0170] S504: Add carriage return to the list of punctuation marks for segmentation:

[0171] RE_PUNCTUATION_SPLIT_LST.append

[0172] S505: Use “|” to link all elements in the list of segmentation punctuation marks to construct a segmentation punctuation mark string:

[0173] RE_PUNCTUATION_SPLIT = r'|'.join(RE_PUNCTUATION_SPLIT_LST).

[0174] Step 2: Use the punctuation marks and segmentation words for the illustration segmentation, as shown in “Table 3 Segmentation Words”, to segment the illustration segmentation to obtain a list of marked entities and number combination character strings;

[0175] Table 3 Segmentation vocabulary

[0176]

[0177] Step 3: traverse the list of marked entities and number combination strings, split all entity and number combination strings, and obtain the marked entities and their corresponding numbers;

[0178] Step 4: (optional) Call the labeled entity recognition and denoising model to perform labeled entity recognition and denoising;

[0179] Apply the trained labeled entity discrimination and denoising model and use "Algorithm 4 Labeled entity discrimination and denoising model application algorithm" to perform entity judgment.

[0180] Step 5: (optional) noise recovery and entity recommendation;

[0181] For the noise determined in step 4, use the prompt shown in "Table 2 Prompt for noise recovery based on integrating world knowledge into the big model" to call the big model, such as Tongyi Qianwen-72B, integrate world knowledge to understand the noise, and perform noise recovery to obtain two entities: the recovered labeled entity and the labeled entity recommended by the big model.

[0182] Step 6: Construct and process the mark pair dictionary marks_num2ch{mark number: mark entity list} and the mark pair dictionary marks_ch2num{mark entity: mark number list} consistently. The dictionary supports one-to-many mapping by using a list structure as a value type. The consistency processing is implemented by applying "Algorithm 6 Mark Pair Two Dictionary Construction and Consistency Algorithm". If you choose to execute steps 4 and 5, you also need to add the mark entity recommended by the large model into the dictionary marks_recommend.

[0183] Algorithm 6: Input of the tag pair two-dictionary construction and consistency algorithm: the tag entity ch and its corresponding number num obtained in step 3. Output: tag pair dictionary marks_num2ch{tag number: tag entity list} and marks_ch2num{tag entity: tag number list}. The specific steps include:

[0184] S601: Process the dictionary marks_num2ch{mark number:mark entity list}, and the processing rules are as follows:

[0185] S6011: Define the list of entities corresponding to the input tag number and initialize it as the current tag entity:

[0186] curr_m_lst = [ch]

[0187] S6012: If the input mark number num is already in the dictionary marks_num2ch, then update the mark number num and its mark entity list in the dictionary:

[0188] curr_m_lst.extend(marks_num2ch[num])

[0189] marks_num2ch[num]=list(set(curr_m_lst))

[0190] Otherwise, add a new key-value pair:

[0191] marks_num2ch[num] = [ch]

[0192] S602: Mark the consistency processing of dictionaries marks_num2ch and marks_ch2num:

[0193] S6021: Ensure that the dictionary marks_ch2num removes the pair of marks constructed by the filtered marked entity c_e and its number num in the dictionary marks_num2ch[num]:

[0194] S60211: Take out the marks_ch2num[c_e] number value list n_lst.

[0195] S60212: Traverse the number value list n_lst, take out all the mark entities whose numbers are in marks_num2ch, and form a list c_lst.

[0196] S60213: Traverse the list c_lst and ensure that all entities in it exist in marks_ch2num.

[0197] S60214: Remove number num from the marks_ch2num[c_e] number value list.

[0198] S60215: If marks_ch2num[c_e] is empty, delete the key c_e in marks_ch2num.

[0199] S6022: Check and ensure that all instances of marks_num2ch[num] exist in marks_ch2num:

[0200] S60221: Traverse marks_num2ch[num]:

[0201] If the current mark entity cc_e already exists in marks_ch2num, update the dictionary marks_ch2num:

[0202] marks_ch2num[cc_e] = list(set(marks_ch2num[cc_e]).union({num}))

[0203] Otherwise, add the new element to the dictionary:

[0204] mark_ch2num[cc_e]=[num]

[0205] S603: Return the mark pair dictionaries marks_num2ch and marks_ch2num.

[0206] (3) Analysis of specific implementation methods

[0207] This module inputs the original patent text and outputs the specific implementation method. Its function is to parse out the specific implementation method in the original patent text. The original patent text of the present invention is in XML format, and the specific implementation method is obtained by using the XML parsing package.

[0208] (4) Extracting marker pairs from specific implementations

[0209] This module inputs the specific implementation of the original patent text and outputs tag pairs. Its function is to extract tag pairs from the specific implementation of the patent text. It includes the following steps:

[0210] Step 1: Apply "Algorithm 5 Extracting Punctuation Marks for Segmentation Algorithm" to obtain punctuation marks for segmentation;

[0211] Step 2: Use the segmentation punctuation marks and the segmentation vocabulary described in "Table 3 Segmentation Vocabulary" to segment the specific implementation method and extract the character string containing the number suffix;

[0212] Step 3: Construct the dictionary raw_components from the marked entity to the marked number, and apply "Algorithm 1 Truncated Number Processing Algorithm" to obtain the complete number to deal with the situation where the number is truncated;

[0213] Step 4: Construct the dictionary raw_num2txt_lst of tag number to tag entity list;

[0214] Step 5: Apply “Algorithm 2: Remove Outliers Algorithm” to detect and remove outliers;

[0215] Step 6: Design and call the common tail string algorithm, as shown in "Algorithm 7 Common Tail String Algorithm", to obtain a list of labeled entities consisting of common tail strings; Algorithm 7 Common Tail String Algorithm Input: Candidate Labeled Entity List; Output: Common Tail String (Labeled Entity) List, the steps specifically include:

[0216] S701: Clear the elements whose length is less than 2 in the candidate tag entity list.

[0217] S702: Obtain the longest element max_ele and its length max_len in the candidate tag entity list.

[0218] S703: Outer iteration, check from the tail to the front, position range 1 to max_len + 1:

[0219] S7031: Inner iteration, traverse the candidate tag entity list, and refer to max_ele to find the common tail substring max_common_end from the current position to the end.

[0220] S704: Obtain the shortest element min_ele and its length min_len in the candidate tag entity list.

[0221] S705: Outer iteration, check from the tail to the front, position range 1 to min_len + 1:

[0222] S7051: Inner iteration, traverse the candidate tag entity list, and refer to min_ele to find the common tail substring min_common_end from the current position to the end.

[0223] S706: Construct a common end string (marking entity) list [min_common_end, max_common_end].

[0224] Step 7: Call the labeled entity recognition and denoising model to perform labeled entity recognition and denoising;

[0225] Apply the trained labeled entity discrimination and denoising model and use "Algorithm 4 Labeled entity discrimination and denoising model application algorithm" to perform entity judgment.

[0226] Step 8: Noise recovery and entity recommendation;

[0227] For the noise determined in step seven, use the prompt shown in "Table 2 Prompt for noise recovery based on the integration of world knowledge into the big model" to call the big model, such as Tongyi Qianwen-72B, integrate world knowledge to understand the noise, and perform noise recovery to obtain two entities: the recovered labeled entity and the labeled entity recommended by the big model.

[0228] Step 9: Mark the entities and their tag numbers into the dictionary.

[0229] The marked entities recovered by the large model and their numbers are entered into the mark pair dictionaries marks_num2ch and marks_ch2num, and the marked entities recommended by the large model are entered into the dictionary marks_recommend.

[0230] (5) Result merging

[0231] This module inputs the mark pair dictionary marks_num2ch, marks_ch2num and recommended entity marks_recommend extracted from the figure description (the recommended entity in the figure description is optional), as well as the mark pair dictionary marks_num2ch, marks_ch2num and recommended entity marks_recommend extracted in the specific implementation. Output the merged final mark pair extraction result: dictionary algorithm_marks_num2ch{mark number: mark entity list}, dictionary algorithm_marks_ch2num{mark entity: mark number list}, recommended entity algorithm_marks_recommend of the large model. The function is to merge the mark pair extraction results in the figure description and the mark pair extraction results in the specific implementation.

[0232] In summary, it can be seen that the present invention provides a method and system for extracting tag pairs from patent texts, which are used to extract tag pairs from patent texts. The tag pairs include tag entities and tag numbers, and the tag entities and their tag numbers are paired to construct two dictionaries: {tag entity: tag number list} and {tag number: tag entity list}, and both dictionaries support a one-to-many mapping relationship. The tag entities include but are not limited to the tag entities corresponding to the tag numbers appearing in the accompanying drawings.

[0233] The present invention provides a tag pair extraction method for patent texts, which is characterized by: (1) removing abnormal points and outliers; (2) tagging entity discrimination and denoising model; (3) integrating world knowledge into a large model to perform noise recovery and entity recommendation. The present invention provides a tag pair extraction system for patent texts, including: (1) parsing the illustrations; (2) extracting tag pairs from the illustrations; (3) parsing specific implementation methods; (4) extracting tag pairs from specific implementation methods; and (5) merging results. The abstract is shown in the figure " Figure 1 As shown in the "Abstract Figure", the process is as follows Figure 2 A schematic diagram of a token pair extraction method for patent text is shown in the figure, which specifically includes the following contents:

[0234] Remove outliers, remove the truncated number anomalies in the tag number list by constructing a dictionary {tag entity: tag number list}, and design and implement it through "Algorithm 1 Truncated number processing algorithm".

[0235] Remove outliers from the list of labeled entities and design and implement them through "Algorithm 2: Remove outliers algorithm".

[0236] The labeled entity discrimination and denoising model, the model training data set format, is shown in "Table 1 Labeled entity discrimination and denoising model training data set example". The labeled entity discrimination and denoising model is implemented based on Transformer's BertForSequenceClassification. Transformer's AdamW optimizer is used to iteratively optimize the model. The model training algorithm is shown in "Algorithm 3 Labeled entity discrimination and denoising model training algorithm".

[0237] The present invention is based on a large model, such as Tongyi Qianwen-72B, and integrates world knowledge to understand noise, performs noise recovery, and identifies potential tag entities through a generative method to achieve the purpose of optimizing the tag extraction effect. The noise recovery based on the large model integrating world knowledge and the design of fine-tuning prompts are shown in "Table 2 Prompts for noise recovery based on large models integrating world knowledge".

[0238] A tag pair extraction system for patent texts comprises: (1) parsing the illustrations; (2) extracting tag pairs from the illustrations; (3) parsing specific implementation methods; (4) extracting tag pairs from the specific implementation methods; and (5) merging results.

[0239] (1) Explanation of the attached drawings:

[0240] Use the XML parsing package to parse the XML tags to obtain the illustration description.

[0241] (2) Extracting label pairs from the illustrations

[0242] Includes steps:

[0243] Step 1: Design and apply "Algorithm 5: Extracting punctuation marks for segmentation" to obtain punctuation marks for segmentation of attached figure descriptions;

[0244] Step 2: Use the punctuation marks and segmentation words for the illustration segmentation, as shown in “Table 3 Segmentation Words”, to segment the illustration segmentation to obtain a list of marked entities and number combination character strings;

[0245] Step 3: traverse the list of marked entities and number combination strings, split all entity and number combination strings, and obtain the marked entities and their corresponding numbers;

[0246] Step 4: (optional) Call the labeled entity discrimination and denoising model to perform labeled entity discrimination and denoising. Apply the trained labeled entity discrimination and denoising model and use "Algorithm 4 Labeled entity discrimination and denoising model application algorithm" to perform entity judgment;

[0247] Step 5: (optional) Noise recovery and entity recommendation. For the noise determined in step 4, use the prompt shown in "Table 2 Prompt for noise recovery based on large model integrating world knowledge" to call the large model, such as Tongyi Qianwen-72B, integrate world knowledge to understand the noise, perform noise recovery, and obtain two entities: the recovered labeled entity and the labeled entity recommended by the large model.

[0248] Step 6: Construct and process the mark pair dictionary marks_num2ch{mark number: mark entity list} and the mark pair dictionary marks_ch2num{mark entity: mark number list} consistently. The dictionary supports one-to-many mapping by using a list structure as a value type. The consistency processing is implemented by applying "Algorithm 6 Mark Pair Two Dictionary Construction and Consistency Algorithm". If you choose to execute steps 4 and 5, you also need to add the mark entity recommended by the large model into the dictionary marks_recommend.

[0249] (3) Analysis of specific implementation methods

[0250] The original patent text described in the present invention is in XML format, and the specific implementation method is obtained using an XML parsing package.

[0251] (4) Extracting marker pairs from specific implementations

[0252] Includes steps:

[0253] Step 1: Apply "Algorithm 5 Extracting Punctuation Marks for Segmentation Algorithm" to obtain punctuation marks for segmentation;

[0254] Step 2: Use the segmentation punctuation marks and the segmentation vocabulary described in "Table 3 Segmentation Vocabulary" to segment the specific implementation method and extract the character string containing the number suffix;

[0255] Step 3: Construct the dictionary raw_components from the marked entity to the marked number, and apply "Algorithm 1 Truncated Number Processing Algorithm" to obtain the complete number to deal with the situation where the number is truncated;

[0256] Step 4: Construct the dictionary raw_num2txt_lst of tag number to tag entity list;

[0257] Step 5: Apply “Algorithm 2: Remove Outliers Algorithm” to detect and remove outliers;

[0258] Step 6: Design and call the public tail string algorithm, as shown in "Algorithm 7 Public Tail String Algorithm", to obtain a list of labeled entities consisting of public tail strings;

[0259] Step 7: Call the labeled entity discrimination and denoising model to perform labeled entity discrimination and denoising. Apply the trained labeled entity discrimination and denoising model and use "Algorithm 4 Labeled entity discrimination and denoising model application algorithm" to perform entity judgment.

[0260] Step 8: Noise recovery and entity recommendation. For the noise determined in step 7, use the prompt shown in "Table 2 Prompt for noise recovery based on the integration of world knowledge into the big model" to call the big model, such as Tongyi Qianwen-72B, integrate world knowledge to understand the noise, perform noise recovery, and obtain two entities: the recovered labeled entity and the labeled entity recommended by the big model.

[0261] Step 9: Put the marked entities and their numbers recovered by the big model into the mark pair dictionaries marks_num2ch and marks_ch2num, and put the marked entities recommended by the big model into the dictionary marks_recommend.

[0262] (5) Result merging

[0263] This module inputs the mark pair dictionary marks_num2ch, marks_ch2num and recommended entity marks_recommend extracted from the figure description (the recommended entity in the figure description is optional), as well as the mark pair dictionary marks_num2ch, marks_ch2num and recommended entity marks_recommend extracted in the specific implementation. Output the merged final mark pair extraction result: dictionary algorithm_marks_num2ch{mark number: mark entity list}, dictionary algorithm_marks_ch2num{mark entity: mark number list}, recommended entity algorithm_marks_recommend of the large model. The function is to merge the mark pair extraction results in the figure description and the mark pair extraction results in the specific implementation.

[0264] In one embodiment, Figure 3 As shown, a tag pair extraction system for patent text is provided, and the system includes:

[0265] A parsing module is used to obtain the original patent text and parse the illustrations and specific implementation methods in the original patent text;

[0266] An extraction module, used to extract tag pairs from the parsed illustrations and specific implementations to obtain an illustration tag pair dictionary and a specific implementation tag pair dictionary; wherein extracting tag pairs from the specific implementations also includes obtaining recommended entities;

[0267] A merging module is used to merge the tag pair dictionary of the accompanying drawings, the tag pair dictionary of the specific implementation scheme and the recommended entity to obtain a tag pair extraction result.

[0268] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 4 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. The processor of the computer device is used to provide computing and control capabilities, and the network interface is used to communicate with an external terminal through a network connection. The computer device loads and runs a computer program to implement the above-mentioned patent multi-domain knowledge extraction method.

[0269] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0270] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which involves all or part of the processes in the above-mentioned embodiment method.

[0271] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

Claims

1. A method for extracting token pairs from patent texts, characterized in that: The method comprises: Obtain the original patent text and parse the illustrations and specific implementation methods in the original patent text; Extracting tag pairs from the parsed illustrations and specific implementations to obtain an illustration tag pair dictionary and a specific implementation tag pair dictionary; wherein extracting tag pairs from the specific implementations also includes obtaining recommended entities; Merging the tag pair dictionary of the accompanying drawings, the tag pair dictionary of the specific implementation scheme, and the recommended entity to obtain a tag pair extraction result; The specific implementation method after parsing includes: Get the punctuation marks used for segmentation of the specific implementation method; Split the specific implementation method and obtain all strings with the number as suffix; Remove outliers and obtain complete numbers; Build a dictionary of tag numbers to lists of tagged entities; Remove outliers; Get a list of tagged entities consisting of a common tail string; Call the entity recognition and denoising model to perform labeled entity recognition and denoising; Noise recycling and entity recommendation; The recovered tagged entities and their numbers are put into the two dictionaries of tagged pairs, and the recommended tagged entities are put into the dictionary; Removing outliers involves removing truncated numbers from a list of marker numbers by building a dictionary, including: S101: traverse the number list multi_num corresponding to the current marked entity to be processed: S1011: Verify the legality of the current number num, if it is legal, proceed to S1012, otherwise continue to execute S101; S1012: Determine whether the current markup entity to be processed exists in the dictionary raw_components{markup entity: number list}. If so, proceed to S1013; otherwise, proceed to S1018. S1013: Obtain the existing number list of the current marked entity to be processed from the dictionary raw_components{marked entity: number list} being constructed. If there is no existing number list, return an empty list, which is represented by old_num_lst; S1014: If the current number num does not exist in old_num_lst and is not a prefix substring of any number in old_num_lst, continue to S1015, otherwise execute S101; S1015: Clear the substring element of the current number num in old_num_lst to obtain new_num_lst; S1016: Add the current number num to new_num_lst; S1017: Update the value of the key "current marking entity curr_e" in the dictionary raw_components{marking entity: marking number list} to new_num_lst, and continue to execute S102; S1018: Write the current tag entity into the dictionary raw_components {tag entity: tag number list}; S102: Return the dictionary raw_components{tag entity:tag number list}.

2. The method according to claim 1, characterized in that The extracted mark pairs in the parsed illustrations specifically include: Get punctuation marks for dividing the illustration description; Segment the figure description to obtain a string of marked entities and their number combinations; Split the string of the marked entity and its number combination to obtain the marked entity and its corresponding number; Construct a tag pair dictionary and perform consistency processing on the two dictionaries; before constructing the tag pair dictionary, it also includes calling an entity discrimination and denoising model to perform tag entity discrimination and denoising as well as noise recovery and entity recommendation.

3. The method according to claim 1, characterized in that Removing outliers specifically includes: S201: Calculate the length min_len of the shortest element in the marked entity list t_lst; S202: Obtain a suffix list within a set length range and remove duplicates; S203: Calculate the frequencies of all suffixes in the suffix list; S204: If there is not less than one suffix, remove the marked entity with the lowest frequency suffix in the marked entity list t_lst to obtain a marked entity list new_t_lst after removing outliers; S205: Return new_t_lst.

4. The method according to claim 1, characterized in that Before calling the entity discrimination and denoising model, the labeled entity discrimination and denoising model training is also included. The labeled entity discrimination and denoising model training algorithm specifically includes: S301: Load the data set and process: encode, divide into training and validation sets; S302: Initialize the model: S3021: Implement the model model and call the from_pretrained() method of BertForSequenceClassification; S3022: Implement optimizer optimizer: call AdamW() of Transformer to implement; S3023: Implement the warmup scheduler: call Transformer's get_linear_schedule_with_warmup() implementation; S303: Setting model training hyperparameters; S304: iteratively optimize the model model; S3041: Gradient clearing: call model's zero_grad() to implement; S3042: Calculate loss: Call model() to implement; specifically use binary cross entropy loss, and the calculation formula is defined as follows: in, n Indicates the nth item in a batch of data; c Indicates the class label number; l n,c Indicates that the nth data belongs to the loss of category c; w n,c Used to give different weights to samples of different categories. The default value is None, which is an optional parameter. p c Used to give different weights to positive samples and negative samples, which is useful for dealing with unbalanced data sets. The default value is None, which is an optional parameter; y n,c Indicates that the nth item in a batch of data belongs to category c; Indicates the probability value of predicting the nth data in a batch as category c; Indicates that the nth item in a batch of data does not belong to category c; Indicates the probability value that the nth data in a batch of data is predicted to be non-category c; S3043: Perform gradient backpropagation and clip the model gradient to prevent gradient explosion; S3044: performing gradient update; S305: Return the trained model.

5. A token pair extraction system for patent texts, characterized in that: The system includes: A parsing module is used to obtain the original patent text and parse the illustrations and specific implementation methods in the original patent text; An extraction module, used to extract tag pairs from the parsed illustrations and specific implementations to obtain an illustration tag pair dictionary and a specific implementation tag pair dictionary; wherein extracting tag pairs from the specific implementations also includes obtaining recommended entities; A merging module, used for merging the tag pair dictionary of the accompanying drawings, the tag pair dictionary of the specific implementation scheme and the recommended entity to obtain a tag pair extraction result; The specific implementation method after parsing includes: Get the punctuation marks used for segmentation of the specific implementation method; Split the specific implementation method and obtain all strings with the number as suffix; Remove outliers and obtain complete numbers; Build a dictionary of tag numbers to lists of tagged entities; Remove outliers; Get a list of tagged entities consisting of a common tail string; Call the entity recognition and denoising model to perform labeled entity recognition and denoising; Noise recycling and entity recommendation; The recovered tagged entities and their numbers are put into the two dictionaries of tagged pairs, and the recommended tagged entities are put into the dictionary; Removing outliers involves removing truncated numbers from a list of marker numbers by building a dictionary, including: S101: traverse the number list multi_num corresponding to the current marked entity to be processed: S1011: Verify the legality of the current number num, if it is legal, proceed to S1012, otherwise continue to execute S101; S1012: Determine whether the current markup entity to be processed exists in the dictionary raw_components{markup entity: number list}. If so, proceed to S1013; otherwise, proceed to S1018. S1013: Obtain the existing number list of the current marked entity to be processed from the dictionary raw_components{marked entity: number list} being constructed. If there is no existing number list, return an empty list, which is represented by old_num_lst; S1014: If the current number num does not exist in old_num_lst and is not a prefix substring of any number in old_num_lst, continue to S1015, otherwise execute S101; S1015: Clear the substring element of the current number num in old_num_lst to obtain new_num_lst; S1016: Add the current number num to new_num_lst; S1017: Update the value of the key "current marking entity curr_e" in the dictionary raw_components{marking entity: marking number list} to new_num_lst, and continue to execute S102; S1018: Write the current tag entity into the dictionary raw_components {tag entity: tag number list}; S102: Return the dictionary raw_components{tag entity:tag number list}.

6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.

8. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.