Work order abstract clustering method based on fine tuning model, electronic equipment and storage medium

Through the work order summary clustering method based on the fine-tuning model, the fine-tuning language model is used to generate and encode the work order summary, and the network diagram is constructed for cluster analysis, which solves the problem of insufficient manual processing efficiency and accuracy and achieves efficient and accurate work order summary. Single classification and management.

CN118609136APending Publication Date: 2024-09-06BEIJING ZERO POINT VISION NETWORK TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410655728.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-24
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

In the existing technology, when government hotline work orders are manually processed, the accuracy of correlation clustering of work orders with similar demands is low, and the processing efficiency and accuracy are insufficient, making it unable to meet the needs of large-scale work order processing.

Method used

The work order summary clustering method based on the fine-tuning model is used to generate the work order summary through the fine-tuning language model, and encode it into a vector representation, construct a network graph for cluster analysis, and automatically complete the similarity analysis and classification of work orders.

Benefits of technology

It improves the accuracy and response efficiency of work order management, improves the accuracy of associated clustering of work orders with similar demands, reduces the need for manual processing, and achieves efficient and accurate work order classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609136A
    Figure CN118609136A
Patent Text Reader

Abstract

The invention provides a work order abstract clustering method based on a fine tuning model, electronic equipment and a storage medium, and relates to the technical field of natural language process.The method comprises the steps that under the condition that the fine tuning language model is obtained, target work order information is input into the fine tuning language model; obtaining N target work order abstracts output by the fine tuning language model; coding the N target work order abstracts by using a preset coding mode to obtain K groups of vector coding representations; determining each group of vector coding representations included in the K groups of vector coding representations as a node to obtain K nodes; constructing a target network diagram according to the K nodes; and executing abstract clustering operation on the K nodes according to the target network diagram. By implementing the technical scheme provided by the invention, the technical problem that the accuracy of association clustering of similar appeal work orders is relatively low due to limitation of manual processing in related technologies is solved, and the technical effect of improving the accuracy of association clustering of similar appeal work orders is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of natural language processing, and in particular to a work order summary clustering method based on a fine-tuning model, an electronic device, and a storage medium. Background Art

[0002] With the continuous progress of society and the continuous improvement of the level of informatization, government hotlines have become a key link for communication between the government and the public. This not only promotes the interaction between the two parties, but also brings a large number of work order processing tasks, which contain rich entity information and event descriptions. Effective processing of work orders is crucial for the government. Through in-depth analysis of these work order information, the government can quickly grasp the issues of general concern and challenges faced by the public, thereby providing strong data support and decision-making reference for policy formulation, optimization and adjustment.

[0003] In related technologies, the complaint work orders of government hotline services mainly rely on manual processing. That is, when staff receive complaint work orders from citizens, they will conduct preliminary review and classification. During the processing, they may encounter multiple complaint work orders with similar content or for the same problem. In order to improve the processing efficiency of complaint work orders, staff will manually associate and cluster similar complaint work orders to facilitate centralized management and response to similar complaint work orders.

[0004] However, when adopting the above-mentioned method, when the number of claim tickets increases sharply, manual processing cannot meet the needs of efficient processing of large-scale claim tickets, and when similar claim tickets are manually associated and clustered, omissions or errors are prone to occur due to the large workload and complex operations, which may lead to inaccurate associated clustering results of similar claim tickets, and further lead to the limitations of manual processing in related technologies, resulting in a low accuracy rate of associated clustering of similar claim tickets. Summary of the invention

[0005] The present application provides a work order summary clustering method, electronic device and storage medium based on a fine-tuning model, which are used to improve the accuracy of clustering associations of work orders with similar demands.

[0006] In a first aspect, the present application provides a work order summary clustering method based on a fine-tuning model, which is applied to the above-mentioned electronic device, and the method includes: when a fine-tuning language model is obtained, inputting the target work order information into the fine-tuning language model; obtaining N target work order summaries output by the fine-tuning language model, wherein the N target work order summaries are generated by the fine-tuning language model according to the target work order information; encoding the N target work order summaries using a preset encoding method to obtain K groups of vector encoding representations, wherein N is a positive integer greater than or equal to 1, and K is a positive integer less than or equal to N; determining each group of vector encoding representations included in the K groups of vector encoding representations as a node to obtain K nodes; constructing a target network graph based on the K nodes, wherein the target network graph includes K nodes and connecting lines between the K nodes, and the connecting lines indicate the similarity between the K nodes; performing summary clustering operations on the K nodes according to the target network graph.

[0007] By adopting the above technical solution, the target work order information is automatically received and processed by fine-tuning the language model, which reduces the need for manual input and improves the processing speed and efficiency of the target work order information. By using the fine-tuning language model to generate N target work order summaries, the core content of the target work order information can be quickly refined, which is convenient for subsequent analysis and processing. The N target work order summaries are converted into K groups of vector codes, which realizes the digitization of text information (i.e., N target work order summaries), which is convenient for further analysis and calculation. Each group of vector codes is represented as a node to build the basic structure of the network graph, laying the foundation for subsequent similarity analysis and clustering operations. The similarity between each node (i.e., K nodes) is intuitively displayed through the target network graph, providing a visual analysis tool. Finally, the summary clustering operation is automatically performed on the K nodes, which can further improve the accuracy and response efficiency of work order management. By adopting the method of the present application, the work order information is automatically processed and a work order summary is generated by fine-tuning the language model, which is then converted into a vector form through encoding, and a network diagram is constructed to visualize the similarities between work orders. Finally, efficient and accurate classification of work orders is achieved through cluster analysis, thereby solving the technical problem in the related technology that the accuracy of associated clustering of work orders with similar demands is low due to the limitations of manual processing, and achieving the technical effect of improving the accuracy of associated clustering of work orders with similar demands.

[0008] In combination with some embodiments of the first aspect, in some embodiments, when a fine-tuned language model is obtained, the target work order information is input into the fine-tuned language model, specifically including: when it is determined that the basic parameters of the original language model have been frozen, a bypass network layer is added to the original language model, wherein the original language model is pre-trained for generating summaries; when it is determined that the bypass network layer has been added to the original language model, a preset work order summary data set is input into the bypass network layer; a fine-tuned language model is obtained based on the bypass network layer and the preset work order summary data set; and the target work order information is input into the fine-tuned language model.

[0009] By adopting the above technical solution, by adding a bypass network layer to the pre-trained original language model, the flexibility and adaptability of the original language model can be enhanced without changing the basic parameters of the original model, providing a more accurate and efficient processing model for subsequent work order summary generation. By inputting the preset work order summary data set into the bypass network layer, the bypass network layer can be trained and optimized in a targeted manner to better adapt to the work order summary generation task, thereby improving the generation quality and efficiency of the work order summary. The fine-tuned language model obtained based on the bypass network layer and the preset work order summary data set can more accurately capture the core points of the target work order information and generate high-quality work order summaries. By inputting the target work order information into the fine-tuned language model, the summary of the target work order can be quickly and accurately obtained, providing strong support for subsequent analysis and decision-making. In summary, by adding a bypass network layer to the original language model and fine-tuning it using the preset work order summary data set, a fine-tuned language model optimized for the work order summary generation task is obtained, providing an efficient and accurate tool for subsequent analysis and decision-making.

[0010] In combination with some embodiments of the first aspect, in some embodiments, a fine-tuned language model is obtained based on a bypass network layer and a preset work order summary data set, specifically including: simulating the intrinsic rank of the basic parameters based on the initial adaptation parameters of the bypass network layer and the preset work order summary data set, wherein the intrinsic rank indicates the complexity of the basic parameters; performing target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set to obtain updated adaptation parameters, wherein the updated adaptation parameters are obtained after performing target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set; when the updated adaptation parameters are obtained, the updated adaptation parameters are merged into the unfrozen basic parameters of the original language model to which the bypass network has been added to obtain the fine-tuned language model.

[0011] By adopting the above technical solution, by simulating the intrinsic rank of the basic parameters of the original language model, the complexity of the basic parameters can be more accurately evaluated, providing more refined guidance for subsequent target training, and ensuring that the training process is more efficient and accurate. By combining the intrinsic rank and the preset work order summary data set for target training, the initial adaptation parameters can be optimized and updated, and updated adaptation parameters that are more in line with the requirements of the work order summary generation task can be obtained, thereby improving the generation quality and efficiency of the work order summary. By merging the updated adaptation parameters into the unfrozen basic parameters, the original language model can be fine-tuned to obtain a fine-tuned language model that is more suitable for the work order summary generation task. The fine-tuned language model not only retains the advantages of the original language model, but also optimizes for specific tasks, further improving the performance and practicality of the model. In summary, by simulating the intrinsic rank, performing target training, and merging and updating the adaptation parameters, the original language model can be fine-tuned accurately, and a fine-tuned language model optimized for the work order summary generation task can be obtained, which not only improves the quality and efficiency of generating work order summaries, but also enhances the flexibility and adaptability of the fine-tuned language model, providing strong support for subsequent work order processing and analysis.

[0012] In combination with some embodiments of the first aspect, in some embodiments, a summary clustering operation is performed on K nodes according to a target network graph, specifically including: randomly sampling the K nodes to obtain J nodes, where J is a positive integer less than or equal to K; determining a random sampling order of the J nodes, and performing a transfer optimization operation on each node included in the J nodes according to the random sampling order, wherein the summary clustering operation includes a transfer optimization operation.

[0013] By adopting the above technical solution, a small number of representative J nodes are obtained by randomly sampling K nodes. Random sampling can retain the diversity of nodes and help to more comprehensively reflect the characteristics of the original data. After determining the random sampling order of J nodes, the transfer optimization operation is performed in the random sampling order, which can ensure that each node included in the J nodes is optimized accordingly. The transfer optimization operation, as part of the summary clustering, can further improve the clustering effect between nodes, so that similar nodes are more closely clustered together, and provide more accurate information for subsequent analysis and decision-making. In summary, by randomly sampling K nodes to obtain J nodes, and performing the transfer optimization operation in the random sampling order, efficient processing and optimization of nodes are achieved.

[0014] In combination with some embodiments of the first aspect, in some embodiments, a random sampling order of J nodes is determined, and a transfer optimization operation is performed on each node included in the J nodes according to the random sampling order, specifically including: looping the following operations until the target average coding length is determined: transferring each node included in the J nodes to the first community where the adjacent node is located in turn according to the random sampling order, wherein the adjacent node is other nodes directly connected to each node by a connecting line in the target network graph, and each node corresponds to a community; when it is determined that each node included in the J nodes has been transferred to the first community, using a preset formula to determine the first average coding length of the target network graph; performing a node transfer optimization judgment operation according to the first average coding length to obtain an optimization judgment result, wherein the optimization judgment result includes the first average coding length, the first coding method for transferring the J nodes to the first community, and the number of times the transfer optimization operation is performed on the J nodes; when the optimization judgment result shows that the first average coding length is less than the preset average coding length, the first average coding length is determined as the target average coding length.

[0015] By adopting the above technical solution, through a loop operation, the nodes can be dynamically assigned to the first community where the adjacent nodes are located, which helps to update and maintain the community structure in real time, so that it is more in line with the current state of the target network graph. After all J nodes are assigned to the corresponding community, the first average coding length is determined by a preset formula, which provides a quantitative indicator for evaluating the efficiency of the community structure. Based on the first average coding length, performing an optimization judgment operation for node transfer helps to find a better node allocation scheme, thereby improving the quality of community division. When the optimization result shows that the first average coding length is less than the preset average coding length, the first average coding length is determined as the target average coding length, ensuring that the coding efficiency of the community structure reaches the optimal or close to the optimal state, which not only improves the accuracy of community division (i.e., work order summary clustering), but also improves the efficiency and accuracy of the target network graph (i.e., work order information) analysis.

[0016] In combination with some embodiments of the first aspect, in some embodiments, when it is determined that each node included in the J nodes has been transferred to the first community, a first average coding length of the target network graph is determined using a preset formula, specifically including: determining the first average coding length L(M) according to the following formula: Wherein, M is the first encoding mode, L(M) is the first average encoding length corresponding to the first community after J nodes are transferred to the first community, is the transition probability of transferring each node included in the J nodes to the first community where the adjacent node is located in the order of random sampling, Q is the transition probability matrix, H(Q) is the entropy of the transition probability distribution, m is the number of all communities included in the target network graph, is the state transition probability within the i-th first community, P i is the state transition probability matrix within the i-th first community, H(P i ) is the entropy of the state transition probability distribution within the i-th first community.

[0017] By adopting the above technical solution, the quality and coding efficiency of the community structure can be improved by calculating and optimizing the coding length of the nodes in the network graph, so that the nodes in the network graph can be managed and analyzed more effectively, especially when dealing with large-scale complex network graphs.

[0018] In combination with some embodiments of the first aspect, in some embodiments, when the optimization judgment result shows that the first average coding length is less than the preset average coding length, after determining the first average coding length as the target average coding length, the above method also includes: checking the preset clustering rule table to determine whether the optimization judgment result is in the preset clustering rule table; when it is determined that the optimization judgment result is not in the preset clustering rule table, updating the preset clustering rule table according to the optimization judgment result; analyzing the optimization judgment result, and displaying the analyzed optimization judgment result on a visual screen.

[0019] By adopting the above technical solution, it is detected whether the optimization judgment result is in the preset clustering rule table. If the optimization judgment result is not in the preset rule table, the preset rule table will be automatically updated, and the optimization judgment result will be analyzed and displayed through a visual interface for further review and decision-making, which helps to adapt to data changes, improve the accuracy of clustering analysis, and promote the transparency of results.

[0020] In a second aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the electronic device to perform the method described in the first aspect and any possible implementation method of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, comprising instructions. When the instructions are executed on an electronic device, the electronic device executes the method described in the first aspect and any possible implementation manner of the first aspect.

[0023] It is understandable that the electronic device provided in the second aspect, the computer program product provided in the third aspect, and the computer storage medium provided in the fourth aspect are all used to execute the method provided in the embodiment of the present application. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method, which will not be repeated here.

[0024] One or more technical solutions provided in the embodiments of the present application have at least the following technical effects or advantages: 1. By fine-tuning the language model, the work order information is automatically processed and a work order summary is generated. The work order summary is then converted into a vector form through encoding, and a network diagram is constructed to visualize the similarities between work orders. Finally, efficient and accurate classification of work orders is achieved through cluster analysis, thereby solving the technical problem of low accuracy of clustering of work orders with similar demands due to the limitations of manual processing in related technologies, thereby achieving the goal of improving the accuracy of clustering of work orders with similar demands.

[0025] 2. By adding a bypass network layer to the original language model and fine-tuning it using a preset work order summary dataset, we obtained a fine-tuned language model optimized for the work order summary generation task, providing an efficient and accurate tool for subsequent analysis and decision-making.

[0026] 3. By simulating intrinsic rank, performing target training, and merging and updating adaptation parameters, the original language model can be accurately fine-tuned to obtain a fine-tuned language model optimized for the work order summary generation task. This not only improves the quality and efficiency of generating work order summaries, but also enhances the flexibility and adaptability of the fine-tuned language model, providing strong support for subsequent work order processing and analysis. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a flowchart of a work order summary clustering method based on a fine-tuning model in an embodiment of the present application; Figure 2 A schematic diagram of a process for clustering government hotline work order summaries in an embodiment of the present application; Figure 3 It is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0028] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to be used as limitations to the present application. As used in the specification and appended claims of the present application, the singular expressions "one", "a kind of", "said", "above", "the" and "this" are intended to also include plural expressions, unless there is a clear indication to the contrary in the context. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations comprising one or more listed items.

[0029] In the following, the terms "first" and "second" are used for descriptive purposes only and are not to be understood as suggesting or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more.

[0030] This application provides a work order summary clustering method based on a fine-tuning model, see Figure 1 , Figure 1 It is a flowchart of a work order summary clustering method based on a fine-tuning model in an embodiment of the present application, comprising the following steps: Step S101, when a fine-tuning language model is obtained, inputting target work order information into the fine-tuning language model; In the above embodiment, the fine-tuning language model can be the Tongyi Qianwen model (Qwen-7B-Chat model) with an added bypass network layer. Of course, it can also be other models with powerful text understanding and summary generation capabilities, etc., which are not limited here. The Qwen-7B-Chat model is a language model pre-trained on a large-scale corpus, with powerful text understanding and summary generation capabilities. The Qwen-7B-Chat model uses a neural network (Transformer) architecture with a self-attention mechanism, which can capture long-distance dependencies in the text and generate high-quality text summaries (i.e., work order summaries). The target work order information is the text content included in the target work order.

[0031] Step S102, obtaining N target work order summaries output by the fine-tuning language model, wherein the N target work order summaries are generated by the fine-tuning language model according to the target work order information; In the above embodiment, the N target work order summaries are short texts extracted from the target work order information, summarizing the main content of the work order. The language model is fine-tuned to generate these summaries.

[0032] Step S103, encoding the N target work order summaries using a preset encoding method to obtain K groups of vector encoding representations, where N is a positive integer greater than or equal to 1, and K is a positive integer less than or equal to N; In the above embodiment, the preset encoding method can be an algorithm for converting a text summary into a vector encoding representation in numerical form. The vector encoding representation is a numerical representation of text data, usually a multidimensional vector, in which each dimension represents a specific language feature or statistical attribute.

[0033] Step S104, determining each group of vector coded representations included in the K groups of vector coded representations as a node to obtain K nodes; In the above embodiment, each node represents a vector encoding representation, that is, a numerical representation of a target work order summary.

[0034] Step S105, constructing a target network graph according to the K nodes, wherein the target network graph includes the K nodes and connection lines between the K nodes, and the connection lines indicate the similarity between the K nodes; In the above embodiment, the target graph structure constructed based on the similarity relationship between K nodes can intuitively display the similarity between different target work order summaries.

[0035] Step S106: performing summary clustering operations on the K nodes according to the target network graph.

[0036] In the above embodiment, similar target work order summaries are clustered through a summary clustering operation, so as to more easily identify target work order summaries with similar contents, thereby improving the processing efficiency of the work orders.

[0037] Through the above steps, the target work order information is automatically received and processed by fine-tuning the language model, which reduces the need for manual input and improves the processing speed and efficiency of the target work order information. By using the fine-tuning language model to generate N target work order summaries, the core content of the target work order information can be quickly refined, which is convenient for subsequent analysis and processing. The N target work order summaries are converted into K groups of vector codes, which realizes the digitization of text information (i.e., N target work order summaries), which is convenient for further analysis and calculation. Each group of vector codes is represented as a node to build the basic structure of the network graph, laying the foundation for subsequent similarity analysis and clustering operations. The similarity between each node (i.e., K nodes) is intuitively displayed through the target network graph, providing a visual analysis tool. Finally, the summary clustering operation is automatically performed on the K nodes, which can further improve the accuracy and response efficiency of work order management. By adopting the method of the present application, the work order information is automatically processed and a work order summary is generated by fine-tuning the language model, which is then converted into a vector form through encoding, and a network diagram is constructed to visualize the similarities between work orders. Finally, efficient and accurate classification of work orders is achieved through cluster analysis, thereby solving the technical problem in the related technology that the accuracy of associated clustering of work orders with similar demands is low due to the limitations of manual processing, and achieving the technical effect of improving the accuracy of associated clustering of work orders with similar demands.

[0038] Among them, the executor of the above steps can be a system with a work order summary clustering function, or a device with a work order summary clustering function, or a controller or processor in the device or system, or a separate controller or processor, or other processing devices or processing units with similar processing capabilities.

[0039] In an optional embodiment, when a fine-tuned language model is obtained, the target work order information is input into the fine-tuned language model, specifically including: when it is determined that the basic parameters of the original language model have been frozen, adding a bypass network layer to the original language model, wherein the original language model is pre-trained for generating summaries; when it is determined that the bypass network layer has been added to the original language model, inputting a preset work order summary data set into the bypass network layer; obtaining a fine-tuned language model based on the bypass network layer and the preset work order summary data set; and inputting the target work order information into the fine-tuned language model.

[0040] In the above embodiment, a pre-trained language model (i.e., the original language model) can be selected to generate text summaries. The original language model has been pre-trained on a large amount of text data and can understand the basic structure and semantics of the language. When the basic parameters of the original language model have been frozen, a bypass network layer is added to adjust and optimize the generation of the work order summary. Prepare a preset work order summary data set containing a large amount of work order text and the corresponding work order summary for training the newly added bypass network layer. Input the preset work order summary data set into the bypass network layer, and fine-tune the bypass network layer to obtain a fine-tuned language model. During the fine-tuning training process, the basic parameters of the original language model remain frozen, that is, they are not updated, and only the initial adaptation parameters of the newly added bypass network layer are adjusted, so that it is possible to focus on learning the specific features of the work order summary without destroying the original language model's ability to understand general language.

[0041] In an optional embodiment, a fine-tuning language model is obtained according to a bypass network layer and a preset work order summary data set, specifically comprising: simulating the intrinsic rank of the basic parameters according to the initial adaptation parameters of the bypass network layer and the preset work order summary data set, wherein the intrinsic rank indicates the complexity of the basic parameters; performing target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set to obtain updated adaptation parameters, wherein the updated adaptation parameters are obtained after performing target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set; when the updated adaptation parameters are obtained, the updated adaptation parameters are merged into the unfrozen basic parameters of the original language model to which the bypass network has been added to obtain the fine-tuning language model.

[0042] In the above embodiment, the initial adaptation parameters of the bypass network layer are determined, and the initial adaptation parameters and the preset work order summary data set are used to simulate the intrinsic rank of the basic parameters of the original language model. The intrinsic rank is an indicator used to measure the complexity of the basic parameters, that is, the correlation and mutual influence between the parameters. By simulating the intrinsic rank, the structure and characteristics of the basic parameters can be better understood, providing a basis for adjusting the initial adaptation parameters. Target training is performed on the initial adaptation parameters of the bypass network layer according to the simulated intrinsic rank and the preset work order summary data set. The target training is an iterative process that aims to gradually improve the performance of the original language model on the preset work order summary data set by continuously adjusting the initial adaptation parameters. After obtaining the updated adaptation parameters, the updated adaptation parameters are merged into the unfrozen basic parameters of the original language model to which the bypass network has been added to obtain a fine-tuned language model. The fine-tuned language model combines the powerful infrastructure of the original language model and the specific capabilities of the bypass network layer, and is optimized according to the preset work order summary data set. It can more accurately generate a summary that matches the target work order content.

[0043] In an optional embodiment, in some embodiments, a summary clustering operation is performed on K nodes according to a target network graph, specifically including: randomly sampling the K nodes to obtain J nodes, where J is a positive integer less than or equal to K; determining a random sampling order of the J nodes, and performing a transfer optimization operation on each node included in the J nodes according to the random sampling order, wherein the summary clustering operation includes a transfer optimization operation.

[0044] In the above embodiment, J nodes are randomly selected from K nodes in order to reduce the amount of calculation, especially when K is very large, random sampling can simplify the problem without significant loss of information. The random sampling order of the J nodes obtained by random sampling is determined to ensure the execution order of the subsequent transfer optimization operation. According to the random sampling order, the transfer optimization operation is performed on each node included in the J nodes. The transfer optimization operation includes but is not limited to node feature update (updating the encoding vector representation of the node according to the connection of the node and other information in the network), community structure adjustment (adjusting the community affiliation of the nodes in the network to optimize the closeness of the connection within the community and the sparsity of the connection between the communities), and similarity calculation (recalculating the similarity between nodes to reflect the latest network structure). The transfer optimization operation is part of the summary clustering operation, and the purpose of the summary clustering is to cluster similar nodes (based on their vector representation and network connection) together to form a more compact and informative network graph representation. Repeat the random sampling and transfer optimization operations until a certain termination condition is met, for example, the clustering results do not change much for multiple consecutive iterations, or the preset number of iterations is reached, or the optimal community affiliation is found. The quality of the clustering results is evaluated after each iteration, and after all iterations are completed, the final node clustering results are obtained for further analysis.

[0045] In an optional embodiment, a random sampling order of J nodes is determined, and a transfer optimization operation is performed on each node included in the J nodes according to the random sampling order, specifically including: looping the following operations until the target average coding length is determined: transferring each node included in the J nodes to a first community where an adjacent node is located in turn according to the random sampling order, wherein the adjacent nodes are other nodes directly connected to each node by a connecting line in the target network diagram, and each node corresponds to a community; when it is determined that each node included in the J nodes has been transferred to the first community, a preset formula is used to determine the first average coding length of the target network diagram; a node transfer optimization judgment operation is performed according to the first average coding length to obtain an optimization judgment result, wherein the optimization judgment result includes the first average coding length, a first coding method for transferring the J nodes to the first community, and the number of times the transfer optimization operation is performed on the J nodes; when the optimization judgment result shows that the first average coding length is less than the preset average coding length, the first average coding length is determined as the target average coding length.

[0046] In the above embodiment, according to the random sampling order, J nodes are transferred one by one to the community where their adjacent nodes are located. Here, "adjacent nodes" refer to nodes that are directly connected to the node currently to be transferred through a connecting line, and each node corresponds to a community in the network diagram. When all J nodes are transferred to the corresponding community, the first average coding length of the target network diagram is calculated using a preset formula. The first average coding length is an indicator for measuring the coding efficiency of the target network diagram. According to the calculated first average coding length, an optimization judgment operation of node transfer is performed, which involves adjusting the community affiliation of the node to reduce the coding length. The optimization judgment result includes but is not limited to the updated first average coding length, the first coding method for transferring J nodes to the community, that is, the strategy or path for each node to transfer to the current community, the number of times the node transfer optimization operation is performed, etc. If the first average coding length is less than the preset average coding length, it is determined that the first average coding length can no longer be optimized, and the current community affiliation scheme is the optimal community affiliation scheme, and then the current first average coding length is used as the target average coding length. If the first average coding length is still greater than or equal to the preset average coding length, the transfer optimization operation is repeated until the optimal community affiliation scheme is found or the predetermined number of iterations is reached or the average coding length no longer decreases significantly.

[0047] In an optional embodiment, when it is determined that each node included in the J nodes has been transferred to the first community, a first average coding length of the target network graph is determined using a preset formula, specifically including: determining the first average coding length L(M) according to the following formula: Wherein, M is the first encoding mode, L(M) is the first average encoding length corresponding to the first community after J nodes are transferred to the first community, is the transition probability of transferring each node included in the J nodes to the first community where the adjacent node is located in the order of random sampling, Q is the transition probability matrix, H(Q) is the entropy of the transition probability distribution, m is the number of all communities included in the target network graph, is the state transition probability within the i-th first community, P i is the state transition probability matrix within the i-th first community, H(P i ) is the entropy of the state transition probability distribution within the i-th first community.

[0048] In the above embodiment, by calculating the first average coding length, the compactness of the community structure in the target network graph can be evaluated and optimized, so that the nodes in the target network graph are more easily clustered into similar communities (i.e., the first community), and the minimization of the first average coding length helps to improve the similarity within the community, thereby improving the accuracy of the clustering of the entire target network graph. The concept of entropy is used to quantify the uncertainty of information in the target network graph. By calculating the entropy of the transition probability distribution, the flow of information in the target network graph can be better understood and quantified. The state transition probability and matrix provide quantitative guidance for community division, which helps to identify and construct meaningful community boundaries in the target network graph. The first average coding length can be used as an indicator to evaluate the effectiveness of different clustering algorithms or strategies, and help select the best community.

[0049] In an optional embodiment, when the optimization judgment result shows that the first average coding length is less than the preset average coding length, after determining the first average coding length as the target average coding length, the above method also includes: checking the preset clustering rule table to determine whether the optimization judgment result is in the preset clustering rule table; when it is determined that the optimization judgment result is not in the preset clustering rule table, updating the preset clustering rule table according to the optimization judgment result; analyzing the optimization judgment result, and displaying the analyzed optimization judgment result on a visual screen.

[0050] In the above embodiment, by detecting the preset clustering rule table, it is possible to quickly determine whether the optimization judgment result is already included in the existing rules. This step helps to quickly identify whether the clustering rules need to be updated, thereby improving the efficiency and accuracy of the processing. When it is found that the optimization judgment result is not in the preset clustering rule table, the preset clustering rule table is updated in a timely manner according to the new judgment result to ensure the timeliness and accuracy of the preset clustering rule table, which helps to adapt to the ever-changing work order summary requirements and improves the flexibility and adaptability of the clustering rules. By conducting an in-depth analysis of the optimization judgment results and displaying the analysis results on a visual screen, users can intuitively understand the clustering effects and potential problems of the work order summary.

[0051] Obviously, the above-described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The present application will be described in detail below in conjunction with specific embodiments.

[0052] This application embodiment provides a government hotline work order summary clustering process, see Figure 2 , Figure 2 This is a flow chart of government hotline work order summary clustering in an embodiment of the present application, including the following steps: Step S201, start; Step S202, reading data and processing in batches; 1) Read data and process it in batches Read the government hotline work order related data and sort them in descending order by the work order creation time. Then process the data in batches and set the amount of data N to be read in each batch.

[0053] 2) Data completion When the amount of data in each batch is less than N, a data completion operation is performed, that is, the data of N-the actual amount of data in the current batch is queried forward in descending time order, and then the data is merged with the actual amount of data in the current batch to ensure that the amount of data in each batch reaches the set amount of data N.

[0054] Step S203, performing a first judgment to determine whether the amount of each batch of data is less than N; Step S204, when the first judgment result is yes, the data volume is supplemented to N in descending order of time; Step S205: if the result of the first judgment is negative, no processing is performed; Step S206, the large model generates a summary; The Qwen-7B-Chat model (corresponding to the original language model mentioned above) is a language model pre-trained on a large-scale corpus with strong text understanding and generation capabilities.

[0055] The original language model is fine-tuned using the annotated work order summary dataset. The original language model is fine-tuned by adding a low-rank adapter (LoRA) to adapt to the work order content summary generation task in a specific field. The training principle is to freeze the weight parameters of the pre-trained original language model (corresponding to the above basic parameters). When the weight parameters are frozen, an additional network layer (corresponding to the above bypass network layer) is added to the original language model, and only the parameters of the network layer (corresponding to the above initial adaptation parameters) are trained. The specific training process is as follows: a. Add a bypass (corresponding to the bypass network layer mentioned above) next to the pre-trained original language model, and perform dimensionality reduction and dimensionality increase operations to simulate the intrinsic rank of the weight parameters; b. Initialize matrix A with random Gaussian distribution and matrix B with zero matrix. During training, fix matrix A and matrix B (corresponding to the above initial adaptation parameters). c. After training is completed, the trained matrix B is multiplied by the trained matrix A (corresponding to the above-mentioned updated adaptation parameters) and the weight parameters are combined as the fine-tuned language model parameters.

[0056] The fine-tuned large model (corresponding to the fine-tuned language model mentioned above) is applied to the task of generating summaries of work order content. For each work order, the work order content and prompt are used as input, and the fine-tuned large model is used to generate the corresponding work order summary. The generated work order summary contains the key information of the work order and has good coherence and semantic accuracy.

[0057] Step S207, summary clustering; Using the work order summary generated based on the fine-tuned large model, the summary results can be clustered using the community discovery algorithm (InfoMap). The InfoMap algorithm is a network structure-based algorithm for community discovery. It can effectively divide the nodes in the network into communities with high cohesion and low coupling. The overall steps of the algorithm are as follows: a. Initialization: Encode the content of each work order summary to obtain its vector representation, and treat each node (the vector encoding representation of each work order summary content) as an independent group, that is, each node constitutes a community alone.

[0058] b. Construct a network graph (corresponding to the target network graph above): The network graph is used to represent the similarity relationship between work order summary contents. Each work order summary content is regarded as a node in the graph, and edges are established between work orders with high similarity (corresponding to the above connecting lines). The weight of the edge represents the similarity between the work order summary contents, and the weight of the edge between work order summary contents with high similarity is greater.

[0059] c. Random sampling and community affiliation: Randomly sample the nodes in the network graph, and try to assign each node to the community where its neighbor nodes (neighbor nodes represent other nodes directly connected to a node in the network graph) are located in the order of the sampling sequence. In this process, it is calculated whether the average coding length L(M) of the entire network graph will decrease after assigning a node to a neighbor community (a neighbor community represents a community formed by the directly adjacent nodes of a node). If assigning a node to a neighbor community can reduce the average coding length, then this change will be retained (that is, it is considered that the node should belong to this neighbor community). If there is no decrease, the node will remain in the original community unchanged. The calculation formula for L(M) is: Among them, L(M) represents the average coding length under community partition M, It is the probability of transferring from one community to another during a random walk, and it is a parameter that represents the frequency of cross-community movement when performing a random walk in the network. Q represents the transition probability matrix, which contains the probability of transferring from one node to another in the network. H(Q) is the entropy of the transition probability matrix Q. Entropy is a concept in information theory that is used to quantify the uncertainty or randomness of information, so H(Q) measures the uncertainty of the probability distribution of transferring from one community to another during a random walk. H(Q) reflects the complexity of the transfer between communities in the network. If the value of H(Q) is large, it means that the transfer between communities is more complex and the encoding length is longer; if the value of H(Q) is small, it means that the transfer between communities is simpler and the encoding length is shorter. This part is calculating the average code length due to inter-community transfer. P represents the probability of transferring from any node to another node when performing a random walk within community i. i represents the state transition probability matrix within community i. i ) is the entropy of the internal transition probability distribution of the i-th community. The average encoding length of a random walk within community i. is the sum of the encoding lengths of the internal transitions of each community, m represents the total number of communities in the network, and i is an index from 1 to m, representing each community. M represents the community partition currently being considered, that is, how the nodes in the network are assigned to different communities. Its goal is to find a community partition M that makes the encoding length L(M) of the random walk path the shortest.

[0060] d. Repeat iteration: Repeat step c until the average encoding length L(M) per step can no longer be optimized, that is, no better community allocation solution can be found.

[0061] In summary, by continuously optimizing community allocation, similar nodes (work order summary content) in the network are clustered together to form clusters, ensuring that different descriptions of the same event are classified into the same category. The clustering results will be used as the results of hot events.

[0062] Step S208, performing a second judgment to determine whether the summary clustering result is in the rule table; Step S209: if the second judgment result is yes, no new data is added to the rule table; Determine whether the summary clustering result is in the rule table. If not, add it to the rule table. The data in the rule table is stored in the database for subsequent query and update operations.

[0063] Step S210: if the second judgment result is no, a summary clustering result is added to the rule table; Step S211, using the updated summary result in the rule table; Step S212, statistical analysis and display; Perform statistical analysis on the summary clustering results, and use data visualization tools to display the analysis results on the big screen. The number of hot events, high-incidence locations, time and other information can be counted to provide decision-making support for government departments.

[0064] Step S213, end.

[0065] Through the embodiments of the present application, the work order information is automatically processed and a work order summary is generated by fine-tuning the language model, which is then converted into a vector form through encoding, and a network diagram is constructed to visualize the similarities between work orders. Ultimately, efficient and accurate classification of work orders is achieved through cluster analysis, thereby solving the technical problem in the related technology of low accuracy of associated clustering of work orders with similar demands due to the limitations of manual processing, and achieving the technical effect of improving the accuracy of associated clustering of work orders with similar demands.

[0066] The electronic device in the embodiment of the present invention is described below from the perspective of hardware processing. Figure 3 , Figure 3 It is a schematic diagram of a physical device structure of an electronic device in an embodiment of the present application.

[0067] It should be noted that Figure 3 The structure of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0068] like Figure 3As shown, the electronic device includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 to the random access memory (RAM) 303, such as executing the method described in the above embodiment. In RAM 303, various programs and data required for system operation are also stored. CPU 301, ROM 302 and RAM 303 are connected to each other through a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0069] The following components are connected to the I / O interface 305: an input section 306 including an audio input device, a button switch, etc.; an output section 307 including a liquid crystal display (LCD) and an audio output device, an indicator light, etc.; a storage section 308 including a hard disk, etc.; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. A removable medium 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 310 as needed so that a computer program read therefrom is installed into the storage section 308 as needed.

[0070] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 309, and / or installed from a removable medium 311. When the computer program is executed by a central processing unit (CPU) 301, various functions defined in the present invention are performed.

[0071] It should be noted that specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0072] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram may represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the box may also occur in an order different from that marked in the accompanying drawings.

[0073] Specifically, the electronic device of this embodiment includes a processor and a memory. The memory stores a computer program. When the computer program is executed by the processor, the work order summary clustering method based on the fine-tuning model provided in the above embodiment is implemented.

[0074] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above storage medium carries one or more computer programs, and when the above one or more computer programs are executed by a processor of the electronic device, the electronic device implements the work order summary clustering method based on the fine-tuning model provided in the above embodiment.

[0075] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0076] Those skilled in the art can understand that to implement all or part of the processes in the above-mentioned embodiments, the processes can be completed by computer programs to instruct related hardware, and the programs can be stored in computer-readable storage media. When the programs are executed, they can include the processes of the above-mentioned method embodiments. The aforementioned storage media include: ROM or random access memory RAM, magnetic disk or optical disk and other media that can store program codes.

Claims

1. A work order summary clustering method based on a fine-tuning model, characterized in that: include: When the fine-tuning language model is obtained, inputting the target work order information into the fine-tuning language model; Obtaining N target work order summaries output by the fine-tuning language model, wherein the N target work order summaries are generated by the fine-tuning language model according to the target work order information; Encode the N target work order summaries using a preset encoding method to obtain K groups of vector encoding representations, wherein N is a positive integer greater than or equal to 1, and K is a positive integer less than or equal to N; Determine each group of vector coded representations included in the K groups of vector coded representations as a node to obtain K nodes; Constructing a target network graph according to the K nodes, wherein the target network graph includes connecting lines between the K nodes and the K nodes, and the connecting lines indicate similarities between the K nodes; A summary clustering operation is performed on the K nodes according to the target network graph.

2. The method according to claim 1, characterized in that When the fine-tuning language model is obtained, inputting the target work order information into the fine-tuning language model specifically includes: When it is determined that basic parameters of an original language model have been frozen, adding a bypass network layer to the original language model, wherein the original language model is pre-trained for generating summaries; In the case where it is determined that the bypass network layer has been added to the original language model, inputting a preset work order summary data set into the bypass network layer; Obtaining the fine-tuning language model according to the bypass network layer and the preset work order summary data set; The target work order information is input into the fine-tuning language model.

3. The method according to claim 2, characterized in that The step of obtaining the fine-tuning language model according to the bypass network layer and the preset work order summary data set specifically includes: Simulating the intrinsic rank of the basic parameter according to the initial adaptation parameter of the bypass network layer and the preset work order summary data set, wherein the intrinsic rank indicates the complexity of the basic parameter; Performing target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set to obtain updated adaptation parameters, wherein the updated adaptation parameters are obtained after performing the target training on the initial adaptation parameters according to the intrinsic rank and the preset work order summary data set; When the updated adaptive parameters are obtained, the updated adaptive parameters are merged into the unfrozen basic parameters of the original language model to which the bypass network has been added, so as to obtain the fine-tuned language model.

4. The method according to claim 1, characterized in that: The performing a summary clustering operation on the K nodes according to the target network graph specifically includes: The K nodes are randomly sampled to obtain J nodes, wherein J is a positive integer less than or equal to K; a random sampling order of the J nodes is determined, and a transfer optimization operation is performed on each node included in the J nodes according to the random sampling order, wherein the summary clustering operation includes the transfer optimization operation.

5. The method according to claim 4, characterized in that The determining of the random sampling order of the J nodes and performing the transfer optimization operation on each node included in the J nodes according to the random sampling order specifically includes: The following operations are performed repeatedly until the target average code length is determined: Transferring each node included in the J nodes to the first community where the adjacent node is located in sequence according to the random sampling order, wherein the adjacent node is other nodes directly connected to each node through the connecting line in the target network graph, and each node corresponds to a community; In the case where it is determined that each of the J nodes has been transferred to the first community, a first average coding length of the target network graph is determined using a preset formula; Performing a node transfer optimization judgment operation according to the first average coding length to obtain an optimization judgment result, wherein the optimization judgment result includes the first average coding length, a first coding method for transferring the J nodes to the first community, and the number of times the transfer optimization operation is performed on the J nodes; When the optimization judgment result shows that the first average coding length is less than a preset average coding length, the first average coding length is determined as the target average coding length.

6. The method according to claim 5, characterized in that In the case where it is determined that each of the J nodes has been transferred to the first community, determining a first average coding length of the target network graph using a preset formula specifically includes: The first average code length L(M) is determined according to the following formula: Wherein, M is the first encoding mode, L(M) is the first average encoding length corresponding to the first community after the J nodes are transferred to the first community, and is the transition probability of transferring each node included in the J nodes to the first community where the adjacent node is located in sequence according to the random sampling order, Q is the transition probability matrix, H(Q) is the entropy of the transition probability distribution, m is the number of all communities included in the target network graph, is the state transition probability within the i-th community, P i is the state transition probability matrix within the first community, H(P i ) is the entropy of the state transition probability distribution within the i-th first community.

7. The method according to claim 5, characterized in that When the optimization judgment result shows that the first average coding length is less than a preset average coding length, after determining the first average coding length as the target average coding length, the method further includes: Testing a preset clustering rule table to determine whether the optimization judgment result is in the preset clustering rule table; When it is determined that the optimization judgment result is not in the preset clustering rule table, updating the preset clustering rule table according to the optimization judgment result; The optimization judgment result is analyzed, and the analyzed optimization judgment result is displayed on a visual screen.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, and the one or more processors call the computer instructions so that the electronic device executes the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on an electronic device, the electronic device is caused to execute the method as claimed in any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is executed on an electronic device, the electronic device is enabled to execute the method according to any one of claims 1 to 7.