Methods, devices, equipment, and storage media for determining standard information for handling matters
By identifying and integrating the subject matter element fields in government documents, and using large-scale language models and clustering models to generate accurate standard information for handling government matters, the problem of low efficiency caused by differences in the handling standards of government services has been solved, and efficient and accurate standardized processing has been achieved.
Patent Information
- Application Number
- CN202411903294.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-12-23
AI Technical Summary
The existing technology has large differences in the standards for handling government service items, resulting in low efficiency, low accuracy and stability of manual sorting, and difficulty in achieving standardized processing.
The content of government documents is identified by named entity recognition, optical character recognition, and data analysis tools. The elements and processing standard families of the matters are extracted by using preset recursive functions, large language models, and clustering models, and then fused to generate accurate information on the processing standards of the matters.
This has improved the accuracy and stability of government affairs processing standards, reduced manual intervention, and increased efficiency and data consistency.
Smart Images

Figure CN119830863B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data analysis technology, and in particular to a method, apparatus, device and storage medium for determining standard information for handling matters. Background Technology
[0002] In related technologies, government services involve various types of procedures. Currently, many specific apps have developed online service functions, but these functions usually only provide search and display capabilities.
[0003] In practice, when management departments issue unified requirements for a certain matter, the relevant implementing departments often set their own handling standards based on their specific circumstances. For example, when handling a matter requires the submission of materials, some regions support both paper and electronic materials, some only accept electronic materials, some only accept online processing, some accept both online and in-person processing, and some accept both online and in-person processing as well as express delivery. Similarly, there are many other differences in the details of other matters. These differences bring considerable difficulty to those handling matters and reduce the efficiency of all parties. Therefore, it is clear that a standardized method is urgently needed to streamline the handling standards for government affairs. Relying solely on manual review is not only labor-intensive but also prone to errors, resulting in low accuracy and stability of the compiled handling standards. Summary of the Invention
[0004] To address or partially address the problems existing in related technologies, this application provides a method, apparatus, device, and storage medium for determining standard information for handling matters. This method can accurately extract and process document data such as service guides for handling matters, while ensuring data consistency. During the sorting process, not only can the standard family of handling matters be extracted, but also the knowledge illusion interference that may be caused by the extraction process can be reduced by using fusion processing, which is conducive to improving the accuracy and stability of the standard information for handling matters that matches the target document.
[0005] The first aspect of this application provides a method for determining standard information for handling matters, comprising: acquiring a target document, identifying the content of the target document, and determining multiple first matter element fields and matter element values corresponding to each first matter element field based on the identified content; wherein the multiple first matter element fields include identical matter element fields and / or different matter element fields; generating multiple second matter element fields and matter element values corresponding to each second matter element field based on the multiple first matter element fields and the matter element values corresponding to each first matter element field; wherein the matter element fields in the multiple second matter element fields are different; extracting a matter handling standard family based on the multiple second matter element fields and the matter element values corresponding to each second matter element field to obtain multiple third matter element fields and a matter handling standard family corresponding to each third matter element field; fusing the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field to obtain multiple fused fourth matter element fields and a matter handling standard family corresponding to each fourth matter element field, and using the multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field as the matter handling standard information matching the target document.
[0006] In some implementations, acquiring a target document, identifying the content of the target document, and determining multiple first item element fields and item element values corresponding to each first item element field based on the identified content includes: acquiring the target document, using one or more of named entity recognition technology, optical character recognition technology, and data analysis tool pandas library technology to identify the content of the target document, and determining multiple first item element fields and item element values corresponding to each first item element field based on the identified content.
[0007] In some implementations, generating multiple second item element fields and item element values corresponding to each of the multiple first item element fields and item element values corresponding to each of the first item element fields includes: generating multiple second item element fields and item element values corresponding to each of the second item element fields using a preset recursive function based on the multiple first item element fields and item element values corresponding to each of the first item element fields.
[0008] In some embodiments, the method further includes: during the recursive processing using a preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the type of the item element value corresponding to the first item element field is numeric and / or non-Chinese, converting the numeric and / or non-Chinese item element value into a Chinese item element value; and / or, during the recursive processing using the preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the number of text characters of the item element value corresponding to the first item element field is greater than a threshold, using a neural network model to output a summary text corresponding to the item element value, and using the summary text as the item element value corresponding to the second item element field.
[0009] In some implementations, the process of extracting a set of standard families for handling matters based on multiple second matter element fields and the matter element values corresponding to each second matter element field is performed to obtain multiple third matter element fields and a set of standard families for handling matters corresponding to each third matter element field. This includes: extracting a set of standard families for handling matters based on multiple second matter element fields and the matter element values corresponding to each second matter element field using a large language model and a clustering model to obtain multiple third matter element fields and a set of standard families for handling matters corresponding to each third matter element field.
[0010] In some implementations, a fusion process is performed on multiple third-item element fields and the item handling standard families corresponding to each third-item element field to obtain multiple fused fourth-item element fields and the item handling standard families corresponding to each fourth-item element field. This includes: performing a deduplication process on the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by large-scale language model extraction, and the item handling standard families corresponding to the same third-item element fields in the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by clustering model extraction, to obtain a deduplication result; determining multiple cosine similarity values based on the deduplication result, and performing a second deduplication process using the multiple cosine similarity values and a preset cosine similarity threshold to obtain a second deduplication result; and extracting the item handling standard families using a large-scale language model based on the second deduplication result to obtain an output result, which is then used as the multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field.
[0011] A second aspect of this application provides an apparatus for determining standard information for handling matters. The apparatus includes: a first determining module, configured to acquire a target document, identify the content of the target document, and determine multiple first matter element fields and matter element values corresponding to each first matter element field based on the identified content; wherein the multiple first matter element fields include identical matter element fields and / or different matter element fields; a first generating module, configured to generate multiple second matter element fields and matter element values corresponding to each second matter element field based on the multiple first matter element fields and the matter element values corresponding to each first matter element field; wherein the matter element fields in the multiple second matter element fields are different; the first acquiring module... The first module is used to extract a set of standard families for handling matters based on multiple second matter element fields and the matter element values corresponding to each second matter element field, thereby obtaining multiple third matter element fields and a set of standard families for handling matters corresponding to each third matter element field. The second module is used to merge multiple third matter element fields and the set of standard families for handling matters corresponding to each third matter element field, thereby obtaining multiple merged fourth matter element fields and a set of standard families for handling matters corresponding to each fourth matter element field, and using the multiple fourth matter element fields and the set of standard families for handling matters corresponding to each fourth matter element field as the matter handling standard information to match the target document.
[0012] A third aspect of this application provides an electronic device, comprising:
[0013] Processor; and
[0014] A memory that stores executable code, which, when executed by the processor, causes the processor to perform the method described above.
[0015] A fourth aspect of this application provides a computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method described above.
[0016] The technical solution provided in this application can include the following beneficial effects: it can accurately extract and process document data such as service guides, and ensure data consistency; during the sorting process, it can not only extract the service standard family, but also use fusion processing to reduce the knowledge illusion interference that may be caused by the extraction process, which is conducive to improving the accuracy and stability of the service standard information that matches the target document.
[0017] The technical solution of this application can also: save a lot of manual intervention and greatly improve the efficiency of sorting out the standards for handling matters.
[0018] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0019] The above and other objects, features and advantages of this application will become more apparent from the following description of exemplary embodiments of this application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of this application.
[0020] Figure 1 This is a flowchart illustrating the method for determining standard information for handling matters as shown in the embodiments of this application;
[0021] Figure 2 This is a schematic diagram of the structure of the device for determining standard information for handling matters, as shown in the embodiments of this application;
[0022] Figure 3 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application. Detailed Implementation
[0023] Embodiments of this application will now be described in more detail with reference to the accompanying drawings. While embodiments of this application are shown in the drawings, it should be understood that this application may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to make this application more thorough and complete, and to fully convey the scope of this application to those skilled in the art.
[0024] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0025] It should be understood that although the terms "first," "second," "third," etc., may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0026] If the standardization of government affairs handling is done solely by manual review, it will not only be a large workload but also prone to errors, resulting in low accuracy and stability of the standards.
[0027] To address the aforementioned issues, this application provides a method for determining standard information for handling matters. This method can accurately extract and process document data such as service guides while ensuring data consistency. During the sorting process, not only can a family of standard handling procedures be extracted, but fusion processing can also reduce the interference of knowledge illusions that may arise during extraction, thereby improving the accuracy and stability of standard information for handling matters that matches the target document. Furthermore, it eliminates the need for extensive manual intervention, significantly improving the efficiency of sorting out standard handling procedures.
[0028] The technical solutions of the embodiments of this application are described in detail below with reference to the accompanying drawings.
[0029] Figure 1 This is a flowchart illustrating the method for determining standard information for handling matters as shown in the embodiments of this application.
[0030] See Figure 1 A method for determining standard information for handling matters, the method comprising:
[0031] Step 101: Obtain the target document, identify the content of the target document, and determine multiple first item element fields and item element values corresponding to each first item element field based on the identified content; wherein, the multiple first item element fields include the same item element fields and / or different item element fields.
[0032] In some implementations, the target document may be a document containing a published guide to handling government affairs.
[0033] It is understandable that this document may involve multiple types of data. Given the multi-source and heterogeneous nature of government data, standardization processing is required in this step.
[0034] For example, various recognition technologies can be used to identify the content of a target document, and the item element fields and item element values can be extracted from the identified content.
[0035] Recognition technologies can include named entity recognition technology, optical character recognition technology, and other technologies that can identify documents.
[0036] The "Matter Element" field can refer to the matter name, legal basis, acceptance conditions, application materials, processing procedure, fee standard, statutory time limit, processing location, processing time, etc. These are the names or items constituting the elements. The "Matter Element Value" can refer to the specific content of the relevant elements, such as the specific content of the statutory time limit "2009.10.23-2010.3.23", the specific content of the application materials "1.xxxxxxxxxx; 2.yyyyyyyyyy etc.", the specific content of the number of application materials "9", and the specific content of the processing location "xx district xx town xx department 302".
[0037] It is understood that the multiple first-item element fields identified based on the identified content include the same item element fields and / or different item element fields.
[0038] Step 102: Generate multiple second item element fields and item element values corresponding to each of the multiple first item element fields; wherein, the item element fields in the multiple second item element fields are different.
[0039] In some implementations, the first item element fields can be further processed, such as by adding different codes to generate multiple second item element fields from the multiple first item element fields; wherein each item element field in the multiple second item element fields is different.
[0040] In some implementations, the item element value corresponding to each second item element field may be the same as the item element value corresponding to each first item element field.
[0041] It is understandable that the main purpose of this step is to make multiple second-item element fields unique, so as to facilitate subsequent processing.
[0042] Step 103: Extract the standard family of the matter handling based on multiple second matter element fields and the matter element values corresponding to each second matter element field to obtain multiple third matter element fields and the standard family of the matter handling corresponding to each third matter element field.
[0043] In some implementations, large language models can be used to extract and process standard families of procedures.
[0044] In some implementations, clustering models can be used to extract standard families of procedures.
[0045] In some implementations, the standard family of matters can also be extracted in other ways to obtain a standard family of matters that matches the value of the matter element.
[0046] In some implementations, multiple third-item element fields may be the same as second-item element fields.
[0047] Step 104: Based on multiple third-item element fields and the item handling standard families corresponding to each third-item element field, perform fusion processing to obtain multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field. Use the multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field as item handling standard information to match the target document.
[0048] In some implementations, the fusion process can be to combine the processing results generated by extracting a family of standard procedures using a large language model with the processing results generated by extracting a family of standard procedures using a clustering model.
[0049] In some implementations, the fusion process can be deduplication, such as comparing each item processing standard family and removing duplicate item processing standard families.
[0050] In some implementations, the fusion process can be to calculate the similarity between any two sets of standard families for handling matters, and if the similarity result is greater than a threshold, merge the two sets of standard families for handling matters into one or take the union of the two sets.
[0051] In some implementations, multiple third-item element fields may be the same as fourth-item element fields.
[0052] In some implementations, multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field can be used as item handling standard information matched with the target document, i.e., the final item handling standard sorting result. This item handling standard information matched with the target document can be used to support the handling of government affairs in practice.
[0053] The method for determining the standard information for handling matters in this application embodiment can accurately extract and process document data such as service guides for handling matters, and ensure data consistency. During the sorting process, it can not only extract the family of standards for handling matters, but also use fusion processing to reduce the interference of knowledge illusion that may be caused by the extraction process, which is conducive to improving the accuracy and stability of the standard information for handling matters that matches the target document. It can also save a lot of manual intervention and greatly improve the efficiency of sorting out the standards for handling matters.
[0054] In some embodiments, acquiring a target document, identifying the content of the target document, and determining multiple first item element fields and item element values corresponding to each first item element field based on the identified content includes:
[0055] The target document is obtained, and one or more of the following technologies are used: named entity recognition, optical character recognition, and data analysis tool pandas library. The content of the target document is identified, and multiple first item element fields and item element values corresponding to each first item element field are determined based on the identified content.
[0056] As we can understand, named entity recognition technology is a task in natural language processing that aims to automatically identify and classify entities with specific meanings from text, such as company names, government names, and organization names.
[0057] It is understandable that optical character recognition technology can be used to convert text in images into editable electronic documents.
[0058] It's understandable that the pandas library, a data analysis tool, can be used to process tabular data for data analysis.
[0059] For example, named entity recognition technology is used to segment and label text data to extract key information. Optical character recognition technology is used for image text recognition, and Excel data is parsed using the pandas data analysis library and uniformly converted into JSON format. Finally, multiple verification tools are used to ensure data accuracy and consistency.
[0060] In some embodiments, generating a plurality of second item element fields and item element values corresponding to each of the first item element fields, based on a plurality of first item element fields and item element values corresponding to each of the first item element fields, includes:
[0061] Based on multiple first item element fields and item element values corresponding to each first item element field, a pre-defined recursive function is used to generate multiple second item element fields and item element values corresponding to each second item element field.
[0062] For example, we can use Python's built-in json library to load data (i.e., multiple first-item element fields and item element values corresponding to each first-item element field) and map them to dictionary 1. We can then iterate through dictionary 1 using a recursive function, recording the field names as prefixes and storing the item element values in dictionary 2.
[0063] In some embodiments, during the recursive processing using a preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the type of the item element value corresponding to the first item element field is numeric and / or non-Chinese, the numeric and / or non-Chinese item element value is converted into a Chinese item element value; and / or, during the recursive processing using the preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the number of text characters of the item element value corresponding to the first item element field is greater than a threshold, a neural network model is used to output a summary text corresponding to the item element value, and the summary text is used as the item element value corresponding to the second item element field.
[0064] It's understandable that during the recursive process, Chinese characters can be mapped to numeric and non-Chinese fields. Furthermore, neural network models or large models can be used to generate summaries for long texts.
[0065] In some embodiments, various validation tools such as data validation rules, regular expressions, and JSON Schema can be used to ensure the accuracy and consistency of the data.
[0066] In some embodiments, a set of standard families for handling matters is extracted based on multiple second matter element fields and matter element values corresponding to each second matter element field, resulting in multiple third matter element fields and a set of standard families for handling matters corresponding to each third matter element field, including:
[0067] Based on multiple second-item element fields and the item element values corresponding to each second-item element field, a large-scale language model and a clustering model are used to extract the standard families of item handling, resulting in multiple third-item element fields and the standard families of item handling corresponding to each third-item element field.
[0068] For example, the large language model extracts a family of standard procedures for handling matters: It merges the element fields of multiple matters in dictionary 2, creates a list of matter element values, and generates text information. Then, a controllable Prompt template is constructed, with placeholder text information related to matter elements, using commonalities across most regions as a standard to generate combinations of standard procedures for handling matters. These combinations can consist of unique matter element values. Furthermore, the results (i.e., multiple third-party matter element fields corresponding to the large language model and the families of standard procedures for handling matters corresponding to each third-party matter element field) can be stored in dictionary 3.
[0069] For example, the clustering model extracts a family of standard procedures for handling matters: it merges the element fields of multiple matters in dictionary 2 to generate a list of matter element values. Simultaneously, preprocessing of the text data can be performed, including removing stop words, punctuation, and converting to lowercase. A clustering model, such as a semantic embedding model, is used to convert the data into numerical feature vectors, forming high-dimensional spatial points. Then, cosine similarity and clustering algorithms, such as the DBSCAN algorithm, are used for clustering to obtain a combination of standard procedures for handling matters (a family of standard procedures for handling matters). Furthermore, the results (i.e., multiple third-party element fields corresponding to the clustering model and the family of standard procedures for handling matters corresponding to each third-party element field) can be stored in dictionary 4.
[0070] In some implementations, a fusion process is performed on multiple third-item element fields and the item handling standard families corresponding to each third-item element field to obtain multiple fused fourth-item element fields and the item handling standard families corresponding to each fourth-item element field. This includes: performing a deduplication process on the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by large-scale language model extraction, and the item handling standard families corresponding to the same third-item element fields in the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by clustering model extraction, to obtain a deduplication result; determining multiple cosine similarity values based on the deduplication result, and performing a second deduplication process using the multiple cosine similarity values and a preset cosine similarity threshold to obtain a second deduplication result; and extracting the item handling standard families using a large-scale language model based on the second deduplication result to obtain an output result, which is then used as the multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field.
[0071] In some implementations, for example, a deduplication process is performed on the multiple third-matter element fields extracted and processed by the large language model and the clustering model, and the same third-matter element field corresponding to the same matter handling standard family in the matter handling standard family corresponding to each third-matter element field.
[0072] For example, we can obtain all the standard families for handling matters from dictionary 3 as list 1, and obtain all the standard families for handling matters from dictionary 4 as list 2. We compare each standard family in list 1 with each standard family in list 2. If there are overlapping elements, we merge the union of the two standard families and store the result in a new dictionary 5.
[0073] In some implementations, secondary deduplication can be performed. For example, dictionary 5 is traversed, and each standard family is compared with other standard families to remove duplicates. If overlapping elements exist, cosine similarity is calculated; if it exceeds a threshold, the elements are merged into a union and stored in dictionary 6; if there is no overlap, the elements can be directly saved to dictionary 6.
[0074] In some implementations, a large language model can be used to obtain the final output of the process standard family, thereby obtaining multiple fourth-item element fields and process standard families corresponding to each fourth-item element field.
[0075] For example, a valid Prompt template is created beforehand, with the text information of the matter elements placed as placeholders. A large model is used to generate matter handling standards based on the input matter element text information and common preset conditions representing most regions. By traversing dictionary 6, the matter handling standard families are merged into the matter element text information, populating the Prompt template and inputting it into the large model to output matter handling standard values, i.e., the matter handling standard families corresponding to each fourth matter element field. The matter element fields (i.e., the fourth matter element fields) and these values (the matter handling standard families corresponding to each fourth matter element field) are saved to dictionary 7, forming the final matter handling standard summary result, i.e., the matter handling standard information matching the target document.
[0076] To better understand this application, the following embodiments further illustrate the content of this application, but this application is not limited to the following embodiments.
[0077] Multi-type data standardization processing steps: Government data comes from multiple regions and has various formats. The government document data, including text, Excel and other formats, is structured and processed, and the subject element fields and their corresponding values (i.e. subject element values) are extracted and converted into JSON data format.
[0078] For text data, named entity recognition technology is used to segment and tag the text, accurately identifying key information such as names of people, places, and organizations. A relation extraction algorithm is then used to deeply analyze the entity relationships within the text, and the extracted event element fields and values are organized in a unified JSON format to form structured data.
[0079] For images containing text information, optical character recognition technology is used to accurately identify and extract the text content from the image. The text is then processed according to the same process as text data processing, and the extracted elements and their values are organized in JSON format.
[0080] For Excel data, use an Excel reading library (such as Python's pandas library) to read the Excel file and parse the table data. By specifying the fields to be extracted and their corresponding columns, the Excel data is converted into a data structure compatible with JSON format.
[0081] Furthermore, to ensure the consistency and accuracy of the generated JSON data format, the integrated data underwent rigorous validation. Multiple tools, including data validation rules, regular expressions, and JSON Schema, were employed to comprehensively ensure the accuracy and consistency of the data.
[0082] Standardized processing steps for handling matters: JSON format government data needs to be mapped to a dictionary to facilitate subsequent process handling. During the mapping process, the data is standardized according to the data type of the JSON field values (i.e., the values of the matter elements).
[0083] The Python built-in json library is used to load data as dictionary 1. A recursive function is used to traverse dictionary 1, recording the field name as a prefix during each traversal. Dictionary 2 is used to record the item element values of the JSON-formatted government data. The input parameters of the recursive function include the prefix and dictionary 2. Inside the recursive function, a new prefix is generated and concatenated with the input prefix to form the key-value pair of dictionary 2 (i.e., the item element field). The item element field and item element value are recursively recorded into dictionary 2.
[0084] During the recursive process, the item element values need to be standardized. When the item element value type is number or English, it is mapped to the corresponding Chinese information according to the item element field definition information. When the item element value type is Chinese and the text length is large, exceeding a certain threshold, a suitable large model prompt word is designed, and the large model is used to summarize the text into a summary text of a certain length, and then recorded in dictionary 2.
[0085] It should be noted that when designing prompts for extracting text summaries using large-scale modeling techniques, information loss should be minimized, and the word count of the summary should be controlled. An example prompt is as follows: "Based on the text content, extract the core theme and key information points, summarize the important viewpoints, and maintain a clear logical structure. At the same time, restate the text in concise language, ensuring that the word count of the summary is kept within a certain limit."
[0086] The steps for extracting the standard family of handling items from the large model are as follows: Dictionary 2, generated earlier, stores the handling element information. The large model needs to be used to generate the handling standards for these elements. Each handling item has the same handling element fields. The handling element fields of multiple items are merged to generate a corresponding list of handling element values. These lists are then concatenated.
[0087] Further generate text information for the event elements. Construct a controllable Prompt template, with placeholder text information for the event elements. The main model prompt content consists of the text information for the event elements, composed of the element values of various element fields for the event processing in different regions.
[0088] Using the commonalities of most regions as the standard for handling matters, please generate the corresponding combination of handling standards. The elements in the combination are the values of the matter element fields, and the values of the matter element fields in different combinations cannot be repeated.
[0089] The Prompt template is filled with the text information of the item elements to obtain a semantically similar Prompt template. The large model is then input to obtain the item handling standard combination of the item element field, i.e., the item handling standard family. Dictionary 3 stores the item element field and the item handling standard family.
[0090] The steps for clustering and extracting the standard family of handling items are as follows: Dictionary 2 merges the item element fields of multiple handling items to generate a list of item element values. For each item element value text, data preprocessing is performed, such as filtering out stop words, removing punctuation marks, and converting the text to lowercase. The preprocessed text will be easier to extract features from.
[0091] The preprocessed text is converted into numerical feature vectors using a semantic embedding model. Semantic embedding models can include encoding models like bge-large-zh or information retrieval models like TF-IDF. Numerical feature vectors are points in a high-dimensional space; similar texts are close to each other in this space, which facilitates better clustering. All numerical feature vectors are then added to the clustering space.
[0092] To perform clustering, a distance metric needs to be defined to measure the similarity between texts. Here, cosine similarity is used. Then, the DBSCAN clustering algorithm is used to perform clustering, and the clustering result is the combination of the handling standards of the item element field, that is, the item handling standard family. Dictionary 4 stores the item element field and the item handling standard family.
[0093] The steps for fusing the large model with the clustering-extracted standard family of handling matters are as follows: Dictionary 3 contains the result of the item element fields and the standard family of handling matters generated by the large model, and Dictionary 4 contains the result of the item element fields and the standard family of handling matters generated by the clustering algorithm. Now, we will fuse the standard families of handling matters of the item element fields in Dictionary 3 and Dictionary 4.
[0094] Retrieve all keys from dictionary 3 as list 1 of item processing standard families, and retrieve all keys from dictionary 4 as list 2 of item processing standard families. An item processing standard family is a list composed of multiple item processing standard values. Iterate through list 1 of item processing standard families, comparing each item processing standard family in list 1 with each item processing standard family in list 2.
[0095] If overlapping elements are found within a category of the standard family for handling matters, the standard family for handling matters in category 1 is combined with the standard family for handling matters in category 2, and the result is saved to dictionary 5.
[0096] The steps for fusing similarity of the standard families for handling matters are as follows: Dictionary 5 is the preliminary fusion result of dictionary 3 (the result of the large model) and dictionary 4 (the result of the clustering), storing the matter element fields and the standard families for handling matters. Dictionary 5 is traversed, comparing the current standard family for handling matters with each standard family in dictionary 5, excluding cases of identical standard families. If overlapping elements are found within a standard family, the cosine similarity of the pairwise standard values within the two standard families is calculated. If the cosine similarity value exceeds a certain threshold, the union of the two standard families is taken and saved to dictionary 6. If no overlapping elements are found within a standard family, it is directly saved to dictionary 6.
[0097] When calculating the cosine similarity between the standard values of two matters, the actual input is two text segments, named Text1 and Text2. TF-IDF (Term Frequency-Inverse Document Frequency) is used to convert the text into a numerical vector representation. Since vectors are multi-dimensional, they are high-dimensional vectors. Text1 and Text2 generate high-dimensional vectors X and Y, respectively. The cosine similarity value between X and Y is calculated using the cosine similarity formula. The closer this value is to 1, the more similar the two text segments are.
[0098] Cosine similarity:
[0099] Where X represents the high-dimensional vector of text 1, X i Y represents the value of the i-th dimension, and Y represents the high-dimensional vector of text 2. i represents the value of the i-th dimension, and n represents the dimension of the higher-dimensional vector.
[0100] The steps for unifying and integrating the standard family of matters to be handled are as follows: Dictionary 6 is the result of further integration using cosine similarity, which stores the matter element fields and the standard family of matters to be handled.
[0101] Construct an effective Prompt template, handle placeholder text information for item elements, and provide prompts for the large model. Based on the input text information of item elements, use the commonalities of most regions as the standard for handling items, and generate the corresponding standard for handling items.
[0102] Traverse dictionary 6, merge the item handling standard family into item element text information, populate the item element text information into the Prompt template and input it into the large model, and output the item handling standard value of the item element field.
[0103] Save the item element fields and the generated item handling standard values to dictionary 7. This is the final result of the item handling standard sorting, which is to obtain the item handling standard information that matches the target document.
[0104] The method for determining the standard information for handling matters in this application embodiment should be noted as follows: While extracting a family of standards for handling matters using a large model can improve efficiency, the knowledge illusion inherent in large models may have negative consequences. However, fusing the family of standards extracted by large models and clustering can greatly alleviate this problem and make the final result more interpretable, significantly improving the accuracy of the fused result.
[0105] The method for determining the standard information for handling matters in this application embodiment should be noted that the cosine similarity and DBSCAN clustering algorithms are used to extract the standard family of handling matters. No centroid is required, thus avoiding the influence of the initial centroid selection on the results. The number of clusters does not need to be specified in advance, which is very useful when processing complex datasets and helps to improve the accuracy and stability of the standard information for handling matters.
[0106] The method for determining the standard information for handling matters in this embodiment of the application should be noted that extracting the family of standards for handling matters through a large model can significantly improve the sorting effect of the standards for handling matters.
[0107] Corresponding to the aforementioned application function implementation method embodiments, this application also provides a device for determining standard information for handling matters, an electronic device, and corresponding embodiments.
[0108] Figure 2 This is a schematic diagram of the structure of the device for determining standard information for handling matters, as shown in the embodiments of this application.
[0109] See Figure 2 The device 200 for determining standard information for handling matters in this embodiment includes a first determining module 210, a first generating module 220, a first obtaining module 230, and a second obtaining module 240.
[0110] The first determining module 210 is used to acquire the target document, identify the content of the target document, and determine multiple first item element fields and item element values corresponding to each first item element field based on the identified content; wherein, the multiple first item element fields include the same item element fields and / or different item element fields;
[0111] The first generation module 220 is used to generate multiple second item element fields and item element values corresponding to each of the multiple first item element fields based on the multiple first item element fields and the item element values corresponding to each of the first item element fields; wherein, the item element fields in the multiple second item element fields are different;
[0112] The first obtaining module 230 is used to extract the standard family of matters based on multiple second matter element fields and the matter element values corresponding to each second matter element field, so as to obtain multiple third matter element fields and the standard family of matters corresponding to each third matter element field.
[0113] The second obtaining module 240 is used to perform fusion processing based on multiple third-item element fields and the item handling standard families corresponding to each third-item element field to obtain multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field, and use the multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field as item handling standard information matching the target document.
[0114] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated further here.
[0115] According to embodiments of this application, any plurality of modules among the first determining module 210, the first generating module 220, the first obtaining module 230, and the second obtaining module 240 can be combined into one module, or any one of these modules can be split into multiple modules. Alternatively, at least part of the functionality of one or more of these modules can be combined with at least part of the functionality of other modules and implemented in one module. According to embodiments of this disclosure, at least one of the first determining module 210, the first generating module 220, the first obtaining module 230, and the second obtaining module 240 can be at least partially implemented as hardware circuitry, such as a field-programmable gate array (FPGA), a programmable logic array (PLA), a system-on-a-chip, a system-on-a-substrate, a system-on-package, an application-specific integrated circuit (ASIC), or implemented in hardware or firmware by any other reasonable means of integrating or packaging the circuitry, or implemented in any one of the three implementation methods of software, hardware, and firmware, or in a suitable combination of any of these. Alternatively, at least one of the first determining module 210, the first generating module 220, the first obtaining module 230, and the second obtaining module 240 may be implemented at least partially as a computer program module, which can perform corresponding functions when the computer program module is run.
[0116] Figure 3 This is a schematic diagram of the structure of an electronic device shown in an embodiment of this application.
[0117] See Figure 3 The electronic device 300 includes a memory 310 and a processor 320.
[0118] The processor 320 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.
[0119] Memory 310 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. ROM may store static data or instructions required by processor 320 or other modules of the computer. Permanent storage devices may be read-write storage devices. Permanent storage devices may be non-volatile storage devices that retain stored instructions and data even when the computer is powered off. In some embodiments, permanent storage devices use mass storage devices (e.g., magnetic or optical disks, flash memory) as permanent storage devices. In other embodiments, permanent storage devices may be removable storage devices (e.g., floppy disks, optical drives). System memory may be a read-write storage device or a volatile read-write storage device, such as dynamic random access memory. System memory may store some or all of the instructions and data required by the processor during operation. Furthermore, memory 310 may include any combination of computer-readable storage media, including various types of semiconductor memory chips (e.g., DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, memory 310 may include a removable storage device that is readable and / or writable, such as a laser disc (CD), a read-only digital multifunction optical disc (e.g., DVD-ROM, dual-layer DVD-ROM), a read-only Blu-ray disc, an ultra-high density optical disc, a flash memory card (e.g., SD card, mini SD card, Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not contain carrier waves or transient electronic signals transmitted wirelessly or via wired connections.
[0120] The memory 310 stores executable code, which, when processed by the processor 320, can cause the processor 320 to execute part or all of the methods described above.
[0121] Furthermore, the method according to this application can also be implemented as a computer program or computer program product, which includes computer program code instructions for performing some or all of the steps in the method described above.
[0122] Alternatively, this application may be implemented as a computer-readable storage medium (or a non-transitory machine-readable storage medium or a machine-readable storage medium) storing executable code (or computer program or computer instruction code) thereon, which, when executed by a processor of an electronic device (or server, etc.), causes the processor to perform part or all of the steps of the methods described above according to this application.
[0123] The various embodiments of this application have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or improvement of the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.
Claims
1. A method for determining standard information for handling matters, characterized in that, include: Obtain the target document, identify the content of the target document, and determine multiple first item element fields and item element values corresponding to each first item element field based on the identified content; wherein, the multiple first item element fields include the same item element fields and / or different item element fields; Based on the plurality of first item element fields and item element values corresponding to each of the first item element fields, a plurality of second item element fields and item element values corresponding to each of the second item element fields are generated; wherein, the item element fields in the plurality of second item element fields are not the same; Based on the plurality of second item element fields and the item element values corresponding to each second item element field, the item handling standard family is extracted to obtain a plurality of third item element fields and the item handling standard family corresponding to each third item element field. This includes: based on the plurality of second item element fields and the item element values corresponding to each second item element field, the item handling standard family is extracted using a large language model and a clustering model to obtain the plurality of third item element fields and the item handling standard family corresponding to each third item element field. The multiple third-item element fields and the item handling standard families corresponding to each third-item element field are fused together to obtain multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field. The multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field are used as item handling standard information that matches the target document.
2. The method according to claim 1, characterized in that, The process of acquiring the target document, identifying the content of the target document, and determining multiple first item element fields and item element values corresponding to each first item element field based on the identified content includes: The target document is obtained, and one or more of the following technologies are used: named entity recognition technology, optical character recognition technology, and data analysis tool pandas library technology. The content of the target document is identified, and multiple first item element fields and item element values corresponding to each first item element field are determined based on the identified content.
3. The method according to claim 1, characterized in that, The step of generating multiple second item element fields and item element values corresponding to each of the multiple first item element fields includes: Based on the plurality of first item element fields and the item element values corresponding to each of the first item element fields, a plurality of second item element fields and the item element values corresponding to each of the second item element fields are generated using a preset recursive function.
4. The method according to claim 3, characterized in that, The method further includes: During the recursive processing using the preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the type of the item element value corresponding to the first item element field is numeric and / or non-Chinese, the numeric and / or non-Chinese item element value is converted into a Chinese item element value; and / or, During the recursive processing using the preset recursive function, for the item element value corresponding to the first item element field, if it is determined that the text characters of the item element value corresponding to the first item element field are greater than a threshold, the neural network model is used to output the summary text corresponding to the item element value, and the summary text is used as the item element value corresponding to the second item element field.
5. The method according to any one of claims 1-4, characterized in that, The process of fusing the multiple third-item element fields and the item handling standard families corresponding to each third-item element field to obtain multiple fourth-item element fields and the item handling standard families corresponding to each fourth-item element field includes: For the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by the large language model extraction and processing, and the item handling standard families corresponding to the same third-item element fields in the multiple third-item element fields and the item handling standard families corresponding to each third-item element field obtained by the clustering model extraction and processing, a deduplication process is performed to obtain a deduplication result. Based on the result of the first deduplication process, multiple cosine similarity values are determined, and a second deduplication process is performed using the multiple cosine similarity values and a preset cosine similarity threshold to obtain the result of the second deduplication process. Based on the results of the secondary deduplication process, the large language model is used to extract the standard family of matters to obtain the output results, and the output results are used as the multiple fourth matter element fields and the matter handling standard family corresponding to each fourth matter element field.
6. A device for determining standard information for handling matters, characterized in that, The apparatus for implementing the method for determining standard information for handling matters as described in any one of claims 1-5 includes: The first determining module is used to acquire a target document, identify the content of the target document, and determine multiple first item element fields and item element values corresponding to each first item element field based on the identified content; wherein, the multiple first item element fields include the same item element fields and / or different item element fields; The first generation module is used to generate a plurality of second item element fields and item element values corresponding to each of the plurality of first item element fields, based on the plurality of first item element fields and item element values corresponding to each of the first item element fields; wherein, the item element fields in the plurality of second item element fields are different; The first obtaining module is used to extract the standard family of matters based on the plurality of second matter element fields and the matter element values corresponding to each second matter element field, to obtain a plurality of third matter element fields and the standard family of matters corresponding to each third matter element field. The second obtaining module is used to perform fusion processing based on the plurality of third matter element fields and the matter handling standard families corresponding to each third matter element field to obtain the fused plurality of fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field, and to use the plurality of fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field as the matter handling standard information matching the target document.
7. The apparatus according to claim 6, characterized in that, The first determining module is further configured to: The target document is obtained, and one or more of the following technologies are used: named entity recognition technology, optical character recognition technology, and data analysis tool pandas library technology. The content of the target document is identified, and multiple first item element fields and item element values corresponding to each first item element field are determined based on the identified content.
8. An electronic device, characterized in that, include: processor; as well as A memory having executable code stored thereon, which, when executed by the processor, causes the processor to perform the method as described in any one of claims 1-5.
9. A computer-readable storage medium having executable code stored thereon, which, when executed by a processor of an electronic device, causes the processor to perform the method as described in any one of claims 1-5.
Citation Information
Patent Citations
Document field information processing method and device, electronic equipment and storage medium
CN114818621A
Item processing method and device, equipment and storage medium
CN116993301A