Method and device for determining item handling standard information, equipment and storage medium
By identifying and processing the matter element fields and values in government affairs documents, generating standard families, and performing integrated processing, the inefficiency problem caused by differences in government affairs handling standards is solved, and the accuracy and stability are improved.
Patent Information
- Application Number
- CN202411903294.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2044-12-23
AI Technical Summary
In the prior art, differences in government affairs handling standards lead to low service efficiency and low accuracy and stability of manual sorting.
By obtaining target documents, identifying content and determining item feature fields and values, a standard family is generated, and knowledge hallucination interference is reduced through fusion processing, improving accuracy and stability.
It achieves accurate extraction and consistency guarantee of matter handling standards, improves service efficiency, and reduces manual intervention.
Smart Images

Figure CN119830863A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data analysis technology, and in particular to a method, device, equipment and storage medium for determining standard information for handling matters. Background Art
[0002] In the related technology, government services involve the handling of various types of matters. Currently, many specific apps have developed online service functions, but this function usually only provides search and display functions.
[0003] In practice, when the upper-level department makes unified requirements for a certain government affairs, the lower-level grassroots will often set standards for handling affairs that are in line with their own actual conditions based on their own actual conditions. For example, materials need to be submitted to handle a certain matter. Some areas support both paper and electronic materials, some areas only accept electronic materials, some areas only accept online processing, some areas accept online processing and window processing, and some areas accept not only online processing and window processing but also express delivery. Similarly, there are many differences in the details of other matters. These differences have brought great difficulties to the parties handling the matters and reduced the efficiency of all parties. It can be seen that there is a great need for a standardized method to sort out the standards for handling government affairs. Relying solely on manual sorting is not only a large workload, but also prone to errors, and the accuracy and stability of the sorted government affairs handling standards are low. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related technology, the present application provides a method, device, equipment and storage medium for determining standard information for handling matters, which can accurately extract and process document data such as matter handling guidelines, and ensure data consistency; during the combing process, not only can the family of matter handling standards be extracted, but also the fusion processing can be used to reduce the knowledge illusion interference that may be caused by the extraction processing, which is conducive to improving the accuracy and stability of the standard information for handling matters that matches the target document.
[0005] In a first aspect, the present application provides a method for determining standard information for handling matters, comprising: obtaining a target document, identifying the content of the target document and determining, according to the identified content, a plurality of first matter element fields and a matter element value corresponding to each first matter element field respectively; wherein the plurality of first matter element fields include the same matter element field and / or different matter element fields; generating a plurality of second matter element fields and a matter element value corresponding to each second matter element field respectively according to the plurality of first matter element fields and the matter element value corresponding to each first matter element field respectively; wherein each matter element field in the plurality of second matter element fields is different; extracting a matter handling standard family based on the plurality of second matter element fields and the matter element value corresponding to each second matter element field respectively, obtaining a plurality of third matter element fields and a matter handling standard family corresponding to each third matter element field respectively; fusing a plurality of third matter element fields and a matter handling standard family corresponding to each third matter element field respectively, obtaining a plurality of fused fourth matter element fields and a matter handling standard family corresponding to each fourth matter element field respectively, and using the plurality of fourth matter element fields and the matter handling standard family corresponding to each fourth matter element field respectively as the standard information for handling matters matching the target document.
[0006] In some embodiments, a target document is obtained, the content of the target document is identified, and based on the identified content, a plurality of first matter element fields and a matter element value corresponding to each first matter element field are determined, including: obtaining a 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 based on the identified content, a plurality of first matter element fields and a matter element value corresponding to each first matter element field are determined.
[0007] In some embodiments, based on multiple first matter element fields and the matter element values corresponding to each first matter element field, multiple second matter element fields and the matter element values corresponding to each second matter element field are generated, including: based on multiple first matter element fields and the matter element values corresponding to each first matter element field, using a preset recursive function to generate multiple second matter element fields and the matter element values corresponding to each second matter element field.
[0008] In some embodiments, the method further includes: in the process of recursive processing using a preset recursive function, for the matter element value corresponding to the first matter element field, when it is determined that the type of the matter element value corresponding to the first matter element field is a numeric type and / or a non-Chinese type, converting the numeric type and / or non-Chinese type matter element value into a Chinese type matter element value; and / or, in the process of recursive processing using a preset recursive function, for the matter element value corresponding to the first matter element field, when it is determined that the text characters of the matter element value corresponding to the first matter element field are greater than a threshold value, using a neural network model to output a summary text corresponding to the matter element value, and using the summary text as the matter element value corresponding to the second matter element field.
[0009] In some embodiments, based on multiple second matter element fields and the matter element values corresponding to each second matter element field, a family of matter handling standards is extracted and processed to obtain multiple third matter element fields and a family of matter handling standards corresponding to each third matter element field, including: based on multiple second matter element fields and the matter element values corresponding to each second matter element field, a large language model and a clustering model are used to extract and process the family of matter handling standards, to obtain multiple third matter element fields and a family of matter handling standards corresponding to each third matter element field.
[0010] In some embodiments, a fusion process is performed based on multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively to obtain multiple fused fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field respectively, including: performing a deduplication process on the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively obtained by extraction processing of a large language model, and the matter handling standard families corresponding to the same third matter element field in the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively obtained by extraction processing of a clustering model to obtain a primary deduplication process result; based on the deduplication process result, determining multiple cosine similarity values, and performing a secondary deduplication process using the multiple cosine similarity values and a preset cosine similarity threshold to obtain a secondary deduplication process result; based on the secondary deduplication process result, using a large language model to extract the matter handling standard families to obtain an output result, and using the output result as the multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field respectively.
[0011] According to a second aspect of the present application, there is provided a device for determining standard information for handling matters, the device comprising: a first determination module for acquiring a target document, identifying the content of the target document and determining a plurality of first matter element fields and matter element values corresponding to each first matter element field respectively according to the identified content; wherein the plurality of first matter element fields include the same matter element fields and / or different matter element fields; a first generation module for generating a plurality of second matter element fields and matter element values corresponding to each second matter element field respectively according to the plurality of first matter element fields and matter element values corresponding to each first matter element field respectively; wherein the matter element fields in the plurality of second matter element fields are different; and a first acquisition module for obtaining a plurality of first matter element fields and matter element values corresponding to each first matter element field respectively. The first acquisition module is used to extract and process the matter handling standard family based on multiple second matter element fields and the matter element values corresponding to each second matter element field, and obtain multiple third matter element fields and the matter handling standard family corresponding to each third matter element field; the second acquisition module is used to perform fusion processing based on multiple third matter element fields and the matter handling standard family corresponding to each third matter element field, and obtain multiple fused fourth matter element fields and the matter handling standard family corresponding to each fourth matter element field, and use the multiple fourth matter element fields and the matter handling standard family corresponding to each fourth matter element field as the matter handling standard information matching the target document.
[0012] A third aspect of the present application provides an electronic device, including:
[0013] Processor; and
[0014] The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0015] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0016] The technical solution provided by this application may include the following beneficial effects: it can accurately extract and process document data such as matter handling guidelines, and ensure data consistency; during the combing process, it can not only extract the matter handling 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 matter handling standard information that matches the target document.
[0017] The technical solution of the present 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 foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0020] Figure 1 It is a flowchart of a method for determining standard information for handling matters shown in an embodiment of the present application;
[0021] Figure 2 It is a structural schematic diagram of a device for determining standard information for handling matters shown in an embodiment of the present application;
[0022] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0024] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more 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 the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0026] If the sorting out of the standards for handling government affairs only relies on manual sorting, it will not only be a large workload but also prone to errors. The accuracy and stability of the sorted out standards for handling government affairs will be low.
[0027] In response to the above problems, an embodiment of the present application provides a method for determining standard information for handling matters, which can accurately extract and process document data such as matter handling guidelines, and ensure data consistency; during the combing process, not only can the family of matter handling standards be extracted, but also fusion processing can be used to reduce the knowledge illusion interference that may be caused by the extraction process, which is beneficial to improve 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 combing the matter handling standards.
[0028] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0029] Figure 1 It is a flowchart of a method for determining standard information for handling matters shown in an embodiment of the present application.
[0030] See also 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 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 the same matter element fields and / or different matter element fields.
[0032] In some implementations, the target document may be a document of a published guide to handling government affairs.
[0033] It can be understood that the document may involve multiple types of data. As government data is multi-source and heterogeneous, it needs to be standardized in this step.
[0034] For example, various recognition technologies are used to recognize the content of the target document, and item element fields and item element values are extracted from the recognized content.
[0035] The recognition technology may include named entity recognition technology, optical character recognition technology, and other technologies that can recognize documents.
[0036] The item element field can refer to the item name, setting basis, acceptance conditions, application materials, handling process, charging standards, legal time limit, handling location, handling time, etc. That is, the name or item of the constituent elements. The item element value can refer to the specific content of the relevant elements, such as the specific content of the legal time limit "2009.10.23-2010.3.23", the specific content of the application materials "1.xxxxxxxx; 2.yyyyyyyyyyy etc.", the specific content of the number of application materials "9", and the specific content of the handling location "302, xx section, xx town, xx district".
[0037] It can be understood that the multiple first matter element fields determined according to the identified content include the same matter element fields and / or different matter element fields.
[0038] Step 102, based on multiple first matter element fields and matter element values corresponding to each first matter element field, generate multiple second matter element fields and matter element values corresponding to each second matter element field respectively; wherein each matter element field in the multiple second matter element fields is different.
[0039] In some implementations, the first matter element fields may be further processed, such as adding different codes respectively, so that multiple first matter element fields generate multiple second matter element fields; wherein each matter element field in the multiple second matter element fields is different.
[0040] In some implementations, the matter element value corresponding to each second matter element field may be the same as the matter element value corresponding to each first matter element field.
[0041] It can be understood that the main purpose of this step is to make multiple second matter element fields unique to facilitate subsequent processing.
[0042] Step 103, extracting and processing the matter handling standard family based on the multiple second matter element fields and the matter element values corresponding to each second matter element field, and obtaining multiple third matter element fields and the matter handling standard family corresponding to each third matter element field.
[0043] In some implementations, a large language model may be used to extract a family of transaction standards.
[0044] In some implementations, a clustering model may be used to extract standard families of transaction handling matters.
[0045] In some implementations, the extraction process of the matter handling standard family can also be performed in other ways, and the matter handling standard family matching the matter element value can be obtained by extraction.
[0046] In some implementations, the plurality of third matter element fields may be the same as the second matter element fields.
[0047] Step 104, based on the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field, a fusion process is performed to obtain the fused multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field, and the multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field are used as the matter handling standard information matching the target document.
[0048] In some implementations, the fusion process may be to fuse the processing results generated by the extraction process of the standard family of matter handling using a large language model and the processing results generated by the extraction process of the standard family of matter handling using a clustering model.
[0049] In some implementations, the fusion process may be a deduplication process, such as comparing each family of matter handling standards and removing the same family of matter handling standards.
[0050] In some implementations, the fusion process may be to calculate the similarity between any two families of standards for handling matters, and when it is determined that the similarity result is greater than a threshold, the two related families of standards for handling matters are merged into one or the union of the two families is taken.
[0051] In some implementations, the plurality of third matter element fields may be the same as the fourth matter element field.
[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 matching the target document, i.e., the final item handling standard sorting result. The item handling standard information matching the target document can be used to support the government affairs item handling work in practice.
[0053] The method for determining the standard information for handling matters in the embodiment of the present application can accurately extract and process document data such as the matter handling guide, and ensure data consistency; during the combing process, not only can the family of matter handling standards be extracted, but also the fusion processing can be used to reduce the interference of knowledge illusions that may be caused by the extraction processing, which is beneficial to improve 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 combing the matter handling standards.
[0054] In some embodiments, acquiring a target document, identifying content of the target document, and determining a plurality of first matter element fields and a matter element value corresponding to each first matter element field according to the identified content, includes:
[0055] Obtain a target document, use 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 determine multiple first matter element fields and matter element values corresponding to each first matter element field based on the identified content.
[0056] It can be understood that named entity recognition technology is a task in natural language processing, which aims to automatically identify and classify entities with specific meanings from text, such as company, government, organization names, etc.
[0057] It can be understood that optical character recognition technology can be used to convert text in an image into an editable electronic document.
[0058] It can be understood that the data analysis tool pandas library technology can be used to process tabular data for data analysis.
[0059] For example, named entity recognition technology is used to segment and annotate text data to extract key information. Optical character recognition technology is used for image text recognition, and Excel data is parsed using the data analysis tool pandas library and uniformly converted into JSON format. Finally, a variety of verification tools are used to ensure data accuracy and consistency.
[0060] In some embodiments, generating a plurality of second matter element fields and a matter element value corresponding to each second matter element field according to a plurality of first matter element fields and a matter element value corresponding to each first matter element field respectively includes:
[0061] According to the plurality of first matter element fields and the matter element value corresponding to each first matter element field, a plurality of second matter element fields and the matter element value corresponding to each second matter element field are generated by using a preset recursive function.
[0062] For example, Python's built-in json library is used 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. Dictionary 1 is traversed through a recursive function, the field name is recorded as a prefix, and the item element value is stored in dictionary 2.
[0063] In some embodiments, in the process of recursive processing using a preset recursive function, for the matter element value corresponding to the first matter element field, when it is determined that the type of the matter element value corresponding to the first matter element field is a numeric type and / or a non-Chinese type, the numeric and / or non-Chinese type matter element value is converted into a Chinese type matter element value; and / or, in the process of recursive processing using a preset recursive function, for the matter element value corresponding to the first matter element field, when it is determined that the text characters of the matter element value corresponding to the first matter element field are greater than a threshold value, a neural network model is used to output a summary text corresponding to the matter element value, and the summary text is used as the matter element value corresponding to the second matter element field.
[0064] It can be understood that Chinese mapping can be performed on numerical values and non-Chinese fields in the recursive process. It is also possible to generate summaries for long texts using a neural network model or a large model.
[0065] In some embodiments, a variety of validation tools such as data validation rules, regular expressions, and JSONSchema may be used to ensure data accuracy and consistency.
[0066] In some embodiments, based on the plurality of second matter element fields and the matter element values corresponding to each second matter element field, the matter handling standard family is extracted and processed to obtain the plurality of third matter element fields and the matter handling standard family corresponding to each third matter element field, including:
[0067] Based on multiple second matter element fields and the matter element values corresponding to each second matter element field, a large language model and a clustering model are used to extract and process the matter handling standard family, so as to obtain multiple third matter element fields and the matter handling standard family corresponding to each third matter element field.
[0068] For example, a large language model extracts a family of standards for handling matters: merge the element fields of multiple matters in dictionary 2, create a list of matter element values, and generate text information. Then, build a controllable Prompt template to placeholder the text information related to the matter elements, and use the commonality of most areas as the standard to generate a combination of matter handling standards. These combinations can be composed of non-repetitive matter element values. Furthermore, the results (i.e., multiple third matter element fields corresponding to the large language model and the family of matter handling standards corresponding to each third matter element field) can be stored in dictionary 3.
[0069] For example, the clustering model extracts a family of standards for handling matters: merges the element fields of multiple matters in the dictionary 2 of the family of standards for handling matters, and generates a list of item element values. The text data can be preprocessed at the same time, including removing stop words, punctuation, and converting to lowercase. Use a clustering model, such as a semantic embedding model, to convert into a numerical feature vector to form a high-dimensional space point; then, use cosine similarity and a clustering algorithm, such as the DBSCAN algorithm, for clustering to obtain a combination of item handling standards (family of standards for handling matters). Furthermore, the results (i.e., multiple third item element fields corresponding to the clustering model and the family of item handling standards corresponding to each third item element field) can be stored in dictionary 4.
[0070] In some embodiments, a fusion process is performed based on multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively to obtain multiple fused fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field respectively, including: performing a deduplication process on the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively obtained by extraction processing of a large language model, and the matter handling standard families corresponding to the same third matter element field in the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field respectively obtained by extraction processing of a clustering model to obtain a primary deduplication process result; based on the deduplication process result, determining multiple cosine similarity values, and performing a secondary deduplication process using the multiple cosine similarity values and a preset cosine similarity threshold to obtain a secondary deduplication process result; based on the secondary deduplication process result, using a large language model to extract the matter handling standard families to obtain an output result, and using the output result as the multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field respectively.
[0071] In some embodiments, for example, a deduplication process is performed on multiple third matter element fields extracted and processed by a large language model and a clustering model respectively, and the matter handling standard families corresponding to the same third matter element fields in the matter handling standard families corresponding to each third matter element field.
[0072] For example, all the standard families for handling matters can be obtained from dictionary 3 as list 1, and all the standard families for handling matters can be obtained from dictionary 4 as list 2. Each standard family in list 1 is compared with each standard family in list 2. If there are overlapping elements, the union of the two standard families is merged and the result is stored in a new dictionary 5.
[0073] In some implementations, a secondary deduplication process may be performed. For example, traverse dictionary 5, compare each standard family with other standard families, and remove duplicates. If there are overlapping elements, calculate the cosine similarity; if it exceeds a threshold, merge them into a union and store them in dictionary 6; if there is no overlap, they can be directly saved in dictionary 6.
[0074] In some implementations, a large language model may be used to obtain a final output of the standard family of matter handling, so as to obtain a plurality of fourth matter element fields and a standard family of matter handling corresponding to each fourth matter element field.
[0075] For example, create a valid Prompt template in advance and placeholder the text information of the item elements. Use the big model to generate the item handling standards based on the input item element text information and the common preset conditions that characterize most areas. By traversing the dictionary 6, merge the item handling standard family into the item element text information, fill in the Prompt template and input the big model to output the item handling standard value, that is, the item handling standard family corresponding to each fourth item element field respectively. Save the item element field (that is, the fourth item element field) and these values (the item handling standard family corresponding to each fourth item element field respectively) to the dictionary 7 to form the final item handling standard combing result, that is, the above-mentioned item handling standard information that matches the target document.
[0076] In order to better understand the present application, the content of the present application is further explained below in conjunction with the embodiments, but the present application is not limited to the following embodiments.
[0077] Steps for normalizing multi-type data: Government data comes from multiple regions and has various formats. Government document data in various formats including text and Excel will be structured, and the matter element fields and their corresponding values (i.e. matter element values) will be extracted and converted into JSON data format.
[0078] For text data, named entity recognition technology is used to segment and tag texts, accurately identifying key information in the text, such as names of people, places, and institutions. The entity relationships in the text are deeply analyzed through the relationship extraction algorithm, and the extracted event element fields and event element 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 in the image, and these texts are processed according to the same process as text data processing, and the extracted event 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 therein. By clearly specifying the fields to be extracted and their corresponding columns, the Excel data is converted into a data structure compatible with the JSON format.
[0081] Furthermore, to ensure that the format of the generated JSON data is consistent and accurate, the integrated data is strictly verified. Data verification rules, regular expressions, JSON Schema and other tools are used to fully ensure the accuracy and consistency of the data.
[0082] Steps for standardizing data processing for matter handling: Government data in json format needs to be mapped to a dictionary to facilitate subsequent process processing. During the mapping process, standardization is performed based on the data type of the json field value (i.e., matter element value).
[0083] Use Python's built-in json library to load data into dictionary 1, use a recursive function to traverse dictionary 1, record the field name as the prefix each time it traverses, and use dictionary 2 to record the item element value of the government data in json format. The recursive function input parameters include the prefix and dictionary 2. The recursive function generates a new prefix and splices it with the input prefix as the key value of dictionary 2 (i.e., the item element field), and recursively records the item element field and item element value in dictionary 2.
[0084] In the recursive process, the item element values need to be standardized. When the item element value type is digital 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 and greater than 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 large model prompts to extract text summaries, information loss should be minimized and the number of words in the summary should be controlled. The example prompt is as follows, "Please extract the core themes and key information points based on the text content, summarize the important points, and keep the logical structure clear. At the same time, restate it in concise language to ensure that the number of words in the summary is controlled within a certain range."
[0086] The big model extracts the standard family of items: The dictionary 2 generated above stores the item handling element information. The item handling standard of the item elements needs to be generated through the big model. Each item handling item has the same item element field. The item element fields of multiple items are merged to generate the corresponding item element value list. After the item element value list is spliced,
[0087] Further generate the text information of the item elements. Build a controllable Prompt template, and process the placeholder of the item element text information. The content of the large model prompt is the item element text information composed of the element values of each element field of the items to be handled in different areas.
[0088] Taking the commonality of most regions as the standard for handling matters, please generate the corresponding combination of matter handling standards. The elements in the combination are the matter element field values, and the matter element field values in different combinations cannot be repeated.
[0089] The prompt template is filled with the text information of the item element to obtain a semantically similar prompt template, which is input into the large model to obtain the item handling standard combination of the item element field, that is, the item handling standard family. Dictionary 3 stores the item element field and the item handling standard family.
[0090] Clustering extraction of standard families of items to be handled Steps: Dictionary 2 merges the item element fields of multiple items to be handled and generates an item element value list. Data preprocessing is performed on each item element value text, such as filtering out stop words, removing punctuation marks, and converting the text to lowercase. The preprocessed text will be easier to extract features.
[0091] The preprocessed text is converted into a numerical feature vector through a semantic embedding model. The semantic embedding model can use an encoding model such as bge-large-zh or an information retrieval model such as TF-IDF. Numerical feature vectors are points in a high-dimensional space. Similar texts are close to each other in the space, which can better achieve clustering. All numerical feature vectors are added to the clustering space.
[0092] In order to perform clustering, it is necessary to define a distance metric to measure the similarity between texts. Here, cosine similarity is used, and then the DBSCAN clustering algorithm is used for clustering. The output clustering result is the combination of the matter handling standards of the matter element field, that is, the matter handling standard family. Dictionary 4 stores the matter element fields and the matter handling standard family.
[0093] The steps of integrating the big model with the standard family of matters handled by clustering extraction: Dictionary 3 is the matter element field and the result of the standard family of matters handled generated by the big model, and dictionary 4 is the matter element field and the result of the standard family of matters handled generated by the clustering algorithm. Now the standard family of matters handled of the matter element fields of dictionary 3 and dictionary 4 are integrated.
[0094] Take all the key values of dictionary 3 as item handling standard family list 1, take all the key values of dictionary 4 as item handling standard family list 2. The item handling standard family is a list composed of multiple item handling standard values. Traverse item handling standard family list 1, compare the item handling standard family in list 1 with each item handling standard family in item handling standard family list 2,
[0095] If it is found that the elements in the item handling standard family overlap, the item handling standard family in item handling standard family list 1 and the item handling standard family in item handling standard family list 2 are taken as a union and saved in dictionary 5.
[0096] Similarity fusion steps of item handling standard families: Dictionary 5 is the preliminary fusion result of the large model result dictionary 3 and the clustering result dictionary 4, which stores the item element fields and item handling standard families. Traverse dictionary 5, compare the current item handling standard family with each item handling standard family in dictionary 5, and exclude the same item handling standard family. If it is found that the elements in the item handling standard family overlap, calculate the cosine similarity of the item handling standard values of the two item handling standard families. If the cosine similarity value exceeds a certain threshold, the two item handling standard families are taken as the union and saved to dictionary 6. If no overlap is found in the item handling standard family, it is directly saved to dictionary 6.
[0097] When calculating the cosine similarity of the standard values of two items, the actual input is two texts, named Text 1 and Text 2. Use TF-IDF (Term Frequency-Inverse Document Frequency) to convert the text into a numerical vector representation. The vector is multidimensional and therefore a high-dimensional vector. Text 1 and Text 2 generate high-dimensional vectors X and Y respectively. X and Y are calculated using the cosine similarity formula to obtain the cosine similarity value. The closer the value is to 1, the more similar the two texts are.
[0098] Cosine similarity:
[0099] Among them, X represents the high-dimensional vector of text 1, X i represents the value of the i-th dimension, Y represents the high-dimensional vector of text 2, and Y i represents the value of the i-th dimension, and n represents the dimension of the high-dimensional vector.
[0100] Steps for unified integration of the standard family for handling matters: Dictionary 6 is the result of further integration of cosine similarity, storing the matter element fields and the standard family for handling matters.
[0101] Build a valid Prompt template, with placeholder processing for the text information of the matter elements. The prompt content of the large model is: Based on the input text information of the matter elements, take the commonalities of most areas as the matter handling standards, and generate the corresponding matter handling standards.
[0102] Traverse dictionary 6, merge the standard family of matter handling into matter element text information, fill the Prompt template with matter element text information and input it into the big model, and output the matter handling standard value of the matter element field.
[0103] The item element fields and the generated item handling standard values are saved in dictionary 7, which is the final item handling standard sorting result, that is, the item handling standard information matching the target document is obtained.
[0104] In the method for determining the standard information of the matters handling in the embodiment of the present application, it should be noted that although the large model can improve efficiency by extracting the standard family of matters handling, the knowledge illusion of the large model may bring negative effects. However, by fusing the large model with the clustering to extract the standard family of matters handling, this problem can be alleviated to a great extent, and the final result can be made more interpretable, and the accuracy of the fused result can be significantly improved.
[0105] It should be noted that the method for determining the standard information for handling matters in the embodiment of the present application uses cosine similarity and DBSCAN clustering algorithms to cluster and extract the standard family for handling matters. It does not require a center point, thus avoiding the influence of the initial center point selection on the results. It does not require the number of clusters to be specified in advance, which is very useful when processing complex data sets and is beneficial to improving the accuracy and stability of the standard information for handling matters.
[0106] It should be noted that the method for determining the standard information for handling matters in the embodiment of the present application can significantly improve the effect of sorting out the standard information for handling matters by extracting the standard family for handling matters through a large model.
[0107] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a device for determining standard information for handling matters, an electronic device and corresponding embodiments.
[0108] Figure 2 It is a structural diagram of a device for determining standard information for handling matters shown in an embodiment of the present application.
[0109] See also Figure 2 The device 200 for determining standard information of matters handling 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] A first determination module 210 is used to obtain a target document, identify the content of the target document and determine a plurality of first matter element fields and a matter element value corresponding to each first matter element field according to the identified content; wherein the plurality of first matter element fields include the same matter element field and / or different matter element fields;
[0111] A first generating module 220, configured to generate a plurality of second matter element fields and a matter element value corresponding to each second matter element field according to the plurality of first matter element fields and the matter element value corresponding to each first matter element field; wherein each matter element field in the plurality of second matter element fields is different;
[0112] A first obtaining module 230 is used to extract a matter handling standard family based on a plurality of second matter element fields and a matter element value corresponding to each second matter element field, to obtain a plurality of third matter element fields and a matter handling standard family corresponding to each third matter element field;
[0113] The second acquisition module 240 is used to perform fusion processing based on multiple third matter element fields and the matter handling standard families corresponding to each third matter element field, obtain the fused multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field, and use 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.
[0114] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0115] According to an embodiment of the present application, any multiple modules in the first determination module 210, the first generation module 220, the first acquisition module 230, and the second acquisition module 240 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the first determination module 210, the first generation module 220, the first acquisition module 230, and the second acquisition module 240 can be at least partially implemented as a hardware circuit, 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 a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware, and firmware or in a suitable combination of any of them. Alternatively, at least one of the first determination module 210 , the first generation module 220 , the first acquisition module 230 , and the second acquisition module 240 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.
[0116] Figure 3 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0117] See also Figure 3 , the electronic device 300 includes a memory 310 and a processor 320.
[0118] The processor 320 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0119] The memory 310 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 320 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at run time. In addition, the memory 310 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 310 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0120] The memory 310 stores executable codes, and when the executable codes are processed by the processor 320 , the processor 320 can execute part or all of the methods described above.
[0121] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0122] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0123] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for determining standard information for handling matters, characterized in that: include: Acquire a target document, identify the content of the target document, and determine a plurality of first matter element fields and a matter element value corresponding to each first matter element field according to the identified content; wherein the plurality of first matter element fields include the same matter element field and / or different matter element fields; Generate a plurality of second matter element fields and a matter element value corresponding to each second matter element field according to the plurality of first matter element fields and the matter element value corresponding to each first matter element field; wherein each matter element field in the plurality of second matter element fields is different; Extracting a matter handling standard family based on the plurality of second matter element fields and the matter element values corresponding to each of the second matter element fields, to obtain a plurality of third matter element fields and a matter handling standard family corresponding to each of the third matter element fields; Based on the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field, fusion processing is performed to obtain the fused multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field, and the multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field are used as the matter handling standard information matching the target document.
2. The method according to claim 1, characterized in that The acquiring of the target document, identifying the content of the target document and determining a plurality of first matter element fields and a matter element value corresponding to each first matter element field according to the identified content, comprises: Obtain a target document, use 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 determine multiple first matter element fields and matter element values corresponding to each first matter element field based on the identified content.
3. The method according to claim 1, characterized in that The step of generating a plurality of second matter element fields and a matter element value corresponding to each second matter element field according to the plurality of first matter element fields and the matter element value corresponding to each first matter element field respectively comprises: According to the plurality of first matter element fields and the matter element value corresponding to each first matter element field, a plurality of second matter element fields and the matter element value corresponding to each second matter element field are generated by using a preset recursive function.
4. The method according to claim 1, characterized in that: The method further comprises: In the process of recursive processing using the preset recursive function, for the item element value corresponding to the first item element field, when it is determined that the type of the item element value corresponding to the first item element field is a numeric type and / or a non-Chinese type, the item element value of the numeric type and / or the non-Chinese type is converted into an item element value of the Chinese type; and / or, In the process of recursive processing using the preset recursive function, for the matter element value corresponding to the first matter element field, when it is determined that the text characters of the matter element value corresponding to the first matter element field are greater than a threshold, a neural network model is used to output a summary text corresponding to the matter element value, and the summary text is used as the matter element value corresponding to the second matter element field.
5. The method according to claim 1, characterized in that The extracting process of the matter handling standard family 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 matter handling standard family corresponding to each third matter element field includes: Based on the multiple second matter element fields and the matter element values corresponding to each second matter element field, a large language model and a clustering model are used to extract and process the matter handling standard family, so as to obtain the multiple third matter element fields and the matter handling standard family corresponding to each third matter element field.
6. The method according to any one of claims 1 to 5, characterized in that: The fusion processing is performed based on the plurality of third matter element fields and the matter handling standard families corresponding to each of the third matter element fields to obtain the fused plurality of fourth matter element fields and the matter handling standard families corresponding to each of the fourth matter element fields, including: A deduplication process is performed on the plurality of third matter element fields and the matter handling standard families respectively corresponding to each of the third matter element fields obtained by the large language model extraction process, and the matter handling standard families corresponding to the same third matter element fields in the plurality of third matter element fields and the matter handling standard families respectively corresponding to each of the third matter element fields obtained by the clustering model extraction process, to obtain a deduplication process result; Based on the deduplication processing result, a plurality of cosine similarity values are determined, and a secondary deduplication processing is performed using the plurality of cosine similarity values and a preset cosine similarity threshold to obtain a secondary deduplication processing result; Based on the secondary deduplication processing result, the large language model is used to extract the standard family of matter handling to obtain an output result, and the output result is used as the multiple fourth matter element fields and the matter handling standard family corresponding to each fourth matter element field.
7. A device for determining standard information for handling matters, characterized in that: include: A first determination module is used to obtain a target document, identify the content of the target document and determine a plurality of first matter element fields and a matter element value corresponding to each first matter element field according to the identified content; wherein the plurality of first matter element fields include the same matter element field and / or different matter element fields; a first generating module, configured to generate a plurality of second matter element fields and a matter element value corresponding to each second matter element field according to the plurality of first matter element fields and the matter element value corresponding to each first matter element field; wherein each matter element field in the plurality of second matter element fields is different; A first obtaining module is used to extract and process the matter handling standard family based on the plurality of second matter element fields and the matter element values corresponding to each of the second matter element fields, so as to obtain a plurality of third matter element fields and the matter handling standard family corresponding to each of the third matter element fields; The second acquisition module is used to perform fusion processing based on the multiple third matter element fields and the matter handling standard families corresponding to each third matter element field, obtain the fused multiple fourth matter element fields and the matter handling standard families corresponding to each fourth matter element field, and use 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.
8. The device according to claim 7, characterized in that The first determining module is further used for: Obtain a target document, use 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 determine multiple first matter element fields and matter element values corresponding to each first matter element field based on the identified content.
9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.
10. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Identifying clusters for service management operations
CA3003779A1
Document field information processing method and device, electronic equipment and storage medium
CN114818621A
Item processing method and device, equipment and storage medium
CN116993301A