A government hotline work order classification method and system integrating knowledge graph

Through the government hotline work order classification method that integrates knowledge graphs, the S-BERT model and ConceptNet knowledge graphs are used to solve the problem of low efficiency and accuracy of work order classification in the existing technology, and more efficient and accurate work order classification is achieved. .

CN118410174BActive Publication Date: 2025-02-18ANHUI UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410427692.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-04-10
Publication Date
2025-02-18
Estimated Expiration
2044-04-10

AI Technical Summary

Technical Problem

The existing government hotline work order classification methods rely on manual rules or simple keyword matching, and cannot effectively respond to changes in work order content, resulting in low classification efficiency and accuracy.

Method used

Using the government hotline work order classification method that integrates knowledge graphs, the pre-trained S-BERT model and ConceptNet knowledge graph are used, combined with the word2vec model, and the TF-IDF value and knowledge graph embedding representation of the word are calculated, so as to realize the government hotline work orders. accurate classification.

Benefits of technology

It improves the efficiency and accuracy of work order classification, and can better understand the meaning of each word, thereby providing a more accurate classification basis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118410174B_ABST
    Figure CN118410174B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of work order classification, and specifically to a government hotline work order classification method and system integrating knowledge graph. The method of the present invention comprises: pre-training an S-BERT model; introducing a ConceptNet knowledge graph to calculate a knowledge graph embedding matrix P; combining the pre-trained S-BERT model and the knowledge graph embedding matrix P, and calculating a projection matrix Q based on a government hotline work order data set; based on the projection matrix Q, calculating label classification to complete the matching of the government hotline work order data set X with the label set Y. The present invention can improve the accuracy and efficiency of government hotline work order classification, and is expected to be applied and promoted in practice. The present invention solves the problem that the existing government hotline work order classification method cannot effectively cope with changes in work order content, resulting in low classification efficiency and accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of work order classification, and more specifically, to: 1. a government hotline work order classification method integrating a knowledge graph, and 2. a government hotline work order classification system using the method. Background Art

[0002] At present, all provinces and cities in China have completed the integration of the "12345 Government Service Hotline", successfully achieving the goals of facilitating interaction between the government and the people, optimizing government services, and responding to people's demands, serving enterprises and the public with one number.

[0003] The inventor team has received a project request from a certain region, which requires automatic identification and matching of government hotline work orders. However, the inventor compared the traditional government hotline work order classification methods, which usually rely on manual rules or simple keyword matching and cannot effectively respond to changes in work order content, resulting in low classification efficiency and accuracy. Therefore, the inventor team proposed an innovative solution. Summary of the invention

[0004] Based on this, it is necessary to provide a government hotline work order classification method and system that integrates knowledge graphs to address the problem that the existing government hotline work order classification method cannot effectively respond to changes in work order content, resulting in low classification efficiency and accuracy.

[0005] The present invention is implemented by the following technical solutions:

[0006] In a first aspect, the present invention discloses a government hotline work order classification method integrating a knowledge graph, which is used to match a government hotline work order dataset X with a label set Y.

[0007] The government hotline work order dataset X includes N government hotline work orders to be classified; X = [x 1 ,…,x n ,…,x N ]; x n Represents the nth government hotline work order to be classified, n∈[1,N].

[0008] The tag set Y includes M department tags to be matched; Y = [y 1 ,…,y m ,...,y M ];y m Represents the mth department label to be matched, m∈[1,M].

[0009] The government hotline work order classification method integrating knowledge graph includes the following steps:

[0010] Step 1: Obtain the S-BERT model and use the corpus containing Chinese text to pre-train the S-BERT model to obtain the model parameter set θ, thereby obtaining the pre-trained S-BERT model f θ ;

[0011] Step 2: Obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P by combining the word embedding representation of the word2vec model;

[0012] Step 3: Get x n The text content is split into P using the Tokenizer n words;

[0013] Traverse x 1 to x N , a total of Z words are obtained; among them,

[0014] Step 4: Calculate the TF-IDF values ​​of Z words and select the words with the largest values ​​to form the word set V n ;

[0015] Step 5: Based on V n , P calculates V n Knowledge graph embedding representation Based on V n 、f θ Calculate the S-BERT embedding representation f of Vn θ (V n ), then based on f θ (V n ) Obtain the projection matrix Q through matrix inverse operation;

[0016] Step 6: Calculate x n Matching department labels

[0017] Traverse x 1 to x N , complete the matching of the government hotline work order dataset X and the label set Y;

[0018] in,

[0019] The government hotline work order classification method integrating knowledge graph implements the method or process according to the embodiment of the present disclosure.

[0020] In the second aspect, the present invention discloses a government hotline work order classification system integrating knowledge graph, which uses the government hotline work order classification method integrating knowledge graph as disclosed in the first aspect.

[0021] The government hotline work order classification system integrating knowledge graph includes: model pre-training module, knowledge graph module, word splitting module, TF-IDF value calculation module, projection matrix calculation module, and label matching module.

[0022] The model pre-training module is used to obtain the S-BERT model and use the corpus containing Chinese text to pre-train the S-BERT model to obtain the model parameter set θ, so that the pre-trained S-BERT model f θ The knowledge graph module is used to obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P based on the word embedding representation of the word2vec model. The word splitting module is used to obtain x n The text content is split into P using the Tokenizer n words; also used to traverse x 1 to x N , a total of Z words are obtained. The TF-IDF value calculation module is used to calculate the TF-IDF values ​​of Z words, and select the words with the largest values ​​to form a word set V n The projection matrix calculation module is used to calculate the V n , P calculates V n Knowledge graph embedding representation Based on Vn, f θ Calculate the S-BERT embedding representation f of Vn θ (V n ), then based on f θ (V n ) calculates the projection matrix Q. The label matching module is used to calculate the department label matching xn Also used to traverse x 1 to x N , complete the matching of the government hotline work order dataset X and the label set Y.

[0023] The government hotline work order classification system integrating the knowledge graph implements the method or process according to the embodiment of the present disclosure.

[0024] In a third aspect, the present invention discloses a readable storage medium. The readable storage medium stores computer program instructions, and when the computer program instructions are read and executed by a processor, the steps of the government hotline work order classification method integrating knowledge graph disclosed in the first aspect are executed.

[0025] Compared with the prior art, the present invention has the following beneficial effects:

[0026] 1. This invention utilizes the pre-trained S-BERT model and ConceptNet knowledge graph, and combines it with the word2vec model to achieve accurate classification of government hotline work orders, improve the efficiency of work order classification, and is expected to be applied and promoted in practice.

[0027] 2. The present invention introduces the ConceptNet knowledge graph. By embedding the work order content and labels, the meaning behind each word can be better understood, thereby improving the vector representation effect of short texts and providing a more accurate basis for the classification of government hotline work orders. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 A brief flowchart of the government hotline work order classification method integrating knowledge graph proposed in Example 1 of the present invention;

[0029] Figure 2 This is a specific flow chart of the government hotline work order classification method integrating knowledge graph proposed in Example 1 of the present invention. DETAILED DESCRIPTION

[0030] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0031] It should be noted that when a component is referred to as being "mounted on" another component, it may be directly on the other component or there may be a central component. When a component is considered to be "set on" another component, it may be directly set on the other component or there may be a central component at the same time. When a component is considered to be "fixed to" another component, it may be directly fixed on the other component or there may be a central component at the same time.

[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present invention belongs. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "or / and" used herein includes any and all combinations of one or more of the related listed items.

[0033] Example 1

[0034] See also Figure 1 , Figure 1 This is a brief flowchart of the government hotline work order classification method integrating the knowledge graph in this embodiment 1.

[0035] First of all, it should be noted that this method aims to match the government hotline work order dataset X with the label set Y.

[0036] The government hotline work order dataset X includes N government hotline work orders to be classified; X = [x 1 ,…,x n ,…,x N ]; x n represents the nth government hotline ticket to be classified, n∈[1,N]. A government hotline ticket can be a hotline call, a hotline message, etc.

[0037] The tag set Y includes M department tags to be matched; Y = [y 1 ,…,y m ,...,y M ];y m Represents the mth department label to be matched, m∈[1,M]. The department label can be city-level, district-level, street-level department, etc.

[0038] In general, the government hotline ticket classification method based on the knowledge graph includes:

[0039] 1. Pre-train the S-BERT model; 2. Introduce the ConceptNet knowledge graph to calculate the knowledge graph embedding matrix P; 3. Combine the pre-trained S-BERT model and the knowledge graph embedding matrix P to calculate the projection matrix Q based on the government hotline work order dataset; 4. Based on the projection matrix Q, calculate the label classification to complete the matching of the government hotline work order dataset X and the label set Y.

[0040] See also Figure 2 , which is a specific flow chart of the government hotline work order classification method integrating the knowledge graph in this embodiment 1, including the following steps:

[0041] Step 1: Obtain the S-BERT model and use the corpus containing Chinese text to pre-train the S-BERT model to obtain the model parameter set θ, thereby obtaining the pre-trained S-BERT model f θ .

[0042] Among them, the S-BERT model is improved based on the BERT model. It is a deep learning model that uses a twin structure to learn sentence-level vector representation. It has low computing resource requirements and is very suitable for use in this method.

[0043] The purpose of pre-training the S-BERT model is to obtain suitable model parameters. It should be noted that since the number of model parameters will be very large, reaching tens of thousands or even hundreds of thousands, θ is used to represent the set of model parameters.

[0044] Since the proportion of Chinese in the government hotline work order dataset is high, it is necessary to use a corpus containing Chinese text to pre-train the S-BERT model. The corpus containing Chinese text can be one or more of the Chinese Wikipedia corpus, THUCNews corpus, Chinese Gigaword dataset, Sogou dataset, Open Chinese vocabulary OpenCC, and THUCTC Chinese text classification dataset. This embodiment 1 recommends the use of the Chinese Wikipedia corpus, which has good standardization and convenient access.

[0045] Step 2: Obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P based on the word embedding representation of the word2vec model.

[0046] Because f θ The lack of domain-specific knowledge makes the short text representation less than expected, so we introduce the ConceptNet knowledge graph, which can connect words in natural language using label edges, and its knowledge content comes from expert-generated resources and crowdsourcing. In other words, the ConceptNet knowledge graph covers almost all words (it can be considered that it must include Z words in the subsequent step three).

[0047] The word2vec model can learn semantic knowledge in an unsupervised manner from a large amount of textual information. It is used together with the ConceptNet knowledge graph to obtain new word embedding representations that are close to both their word embedding representations in the word2vec model and the embedding representations of their neighbor nodes in the ConceptNet knowledge graph.

[0048] Therefore, construct the objective function ψ(P), and make P satisfy the requirement of minimizing the objective function ψ(P);

[0049] in,

[0050] In the formula, express The word embedding representation in ; represents the word embedding matrix in the word2vec model; p i represents the updated word embedding representation; p j Indicates p i Neighbor nodes in the ConceptNet knowledge graph; E represents the ConceptNet knowledge graph; α i represents the weight of controlling word embedding, β ij Represents the weight of controlling the knowledge graph.

[0051] In other words, we find the P corresponding to the minimization of the objective function ψ(P), and P corresponds to the words covered by the ConceptNet knowledge graph.

[0052] Step 3: Get x n The text content is split into P using the Tokenizer n words.

[0053] Traverse x 1 to x N , a total of Z words are obtained. Among them,

[0054] Tokenizer Tokenizer converts x n The text content is split into multiple words to facilitate f θ It can correctly understand and learn the semantic representation of sentences, thus achieving good results in various natural language processing tasks.

[0055] It should be noted that there is no strict order between steps 1, 2 and 3, and they can be swapped or performed simultaneously. This embodiment 1 selects the above writing order just for the convenience of description.

[0056] Step 4: Calculate the TF-IDF values ​​of Z words and select the words with the largest values ​​to form the word set V n .

[0057] The TF-IDF value is term frequency minus inverse document frequency, which represents important words in a word set.

[0058] Since the TF-IDF value calculation process for each word is the same, here we use the zth word w among the Z words. z Take this as an example to illustrate:

[0059] S4.1, calculation of w z TF value tf z ;in,

[0060] Where n z Indicates w z The number of times it appears in X; It represents the sum of the occurrences of all words in X.

[0061] S4.2, calculation of w z IDF value z ;in,

[0062] In the formula, |X| represents the total number of government hotline work orders to be classified in X, |X|=N; Indicates that X contains w z The number of government hotline work orders to be classified.

[0063] S4.3, tf z With idf z Multiply them together to get w z TF-IDF value of z ; Among them, s z =tf z ×idf z .

[0064] Traverse w 1 ~w Z , that is, the TF-IDF values ​​of Z words are obtained; then the TF-IDF values ​​of Z words are sorted in descending order, and the words in the front row are selected to form the word set V n .

[0065] This is because the words with the highest TF-IDF values ​​are more important in the text content of the government hotline ticket. n The fewer words in V, the more convenient the subsequent calculation will be, but the accuracy will be lower. n The more words there are in the word set V, the more accurate the subsequent calculation will be, but the calculation load will be larger. Therefore, the words in the top 15% to 35% are generally selected to form the word set V. n This embodiment 1 recommends using the words in the top 20% to form the word set V n , which can strike a balance between accuracy and computational time.

[0066] Step 5: Based on V n , P calculates V n Knowledge graph embedding representation Based on V n 、f θ Calculate the S-BERT embedding representation f of Vn θ (V n ), then based on f θ (V n ) calculates the projection matrix Q.

[0067] The purpose of this step is to obtain the projection matrix Q in order to construct the projection relationship between the knowledge graph and S-BERT embedding.

[0068] S5.1, for

[0069] Refer to the record of step 2. Since P has a corresponding relationship with the words covered by the ConceptNet knowledge graph, and the words covered by the ConceptNet knowledge graph include the Z words in step 3, which naturally also includes Vn Then, according to V n All the words in are searched one by one in order, and their associated elements in P are extracted to form

[0070] S5.2, for f θ (V n ):

[0071] See above, step 1 has obtained f θ Then, V n As f θ The input, f θ The output is f θ (V n ).

[0072] S5.3, for Q:

[0073] In the obtained f θ (V n ), we can get Q by matrix inversion, which can be expressed as:

[0074] Step 6: Calculate x n Matching department labels

[0075] in,

[0076] Among them, for f θ (y m )*Q: First, y m As f θ The input, f θ The output is y m The S-BERT embedding representation f θ (y m );then f θ (y m ) According to Q projection into the ConceptNet knowledge graph to obtain f θ (y m )*Q.

[0077] For f θ (x n )*Q: First, x n As f θ The input, f θ The output is x n The S-BERT embedding representation f θ (x n );then f θ (x n) According to Q projection into the ConceptNet knowledge graph to obtain f θ (x n )*Q.

[0078] In this way, x is realized n The department labels match so that x n Assigned to The corresponding department.

[0079] Traverse x 1 to x N , complete the matching of the government hotline work order dataset X and the label set Y.

[0080] Example 2

[0081] This embodiment 2 discloses a government hotline work order classification system integrating knowledge graph, which uses the government hotline work order classification method integrating knowledge graph of embodiment 1.

[0082] The government hotline work order classification system integrating knowledge graph includes: model pre-training module, knowledge graph module, word splitting module, TF-IDF value calculation module, projection matrix calculation module, and label matching module.

[0083] The model pre-training module is configured to obtain an S-BERT model and use a corpus containing Chinese text to pre-train the S-BERT model to obtain a model parameter set θ, so that the pre-trained S-BERT model f θ .

[0084] The knowledge graph module is configured to obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P in combination with the word embedding representation of the word2vec model.

[0085] The word splitting module is configured to obtain x n The text content is split into P using the Tokenizer n words; also configured to traverse x 1 to x N , a total of Z words are obtained.

[0086] The TF-IDF value calculation module is configured to calculate the TF-IDF values ​​of Z words, and select the words with the largest values ​​to form a word set V n .

[0087] The projection matrix calculation module is configured based on V n , P calculates V n The knowledge graph embedding representation P Vn , based on V n 、f θ Calculate Vn The S-BERT embedding representation f θ (V n ), then based on f θ (V n ) calculates the projection matrix Q.

[0088] The label matching module is configured to calculate x n Matching department labels Also configured to traverse x 1 to x N , complete the matching of the government hotline work order dataset X and the label set Y.

[0089] Since this government hotline work order classification system integrating knowledge graph uses the government hotline work order classification method integrating knowledge graph mentioned above, it also has the same effect and will not be repeated here.

[0090] Example 3

[0091] This embodiment 3 discloses a readable storage medium, in which computer program instructions are stored. When the computer program instructions are read and executed by a processor, the steps of the government hotline work order classification method integrating knowledge graph disclosed in embodiment 1 are executed.

[0092] When the method of Example 1 is applied, it can be applied in the form of software, such as a program designed to be independently run on a computer-readable storage medium, where the computer-readable storage medium can be a USB flash drive, and the USB flash drive is designed to start the program of the entire method through an external trigger.

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

[0094] The above-mentioned embodiments only express several implementation methods of the present invention, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A government hotline work order classification method integrating knowledge graph, characterized in that: It is used to match the government hotline work order dataset X with the label set Y; The government hotline work order dataset X includes N government hotline work orders to be classified; X = [x1,…,x n ,…,x N ]; x n represents the nth government hotline work order to be classified, n∈[1,N]; the label set Y includes M department labels to be matched; Y=[y1,...,y m ,...,y M ];y m Represents the mth department label to be matched, m∈[1,M]; The government hotline work order classification method integrating knowledge graph includes the following steps: Step 1: Obtain the S-BERT model and use the corpus containing Chinese text to pre-train the S-BERT model to obtain the model parameter set θ, thereby obtaining the pre-trained S-BERT model f θ ; Step 2: Obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P by combining the word embedding representation of the word2vec model; Step 3: Get x n The text content is split into P using the Tokenizer n words; Traverse from x1 to x N , a total of Z words are obtained; among them, Step 4: Calculate the TF-IDF values ​​of Z words and select the words with the largest values ​​to form the word set V n ; Step 5: Based on V n , P calculates V n The knowledge graph embedding representation P Vn , based on V n 、f θ Calculate V n The S-BERT embedding representation f θ (V n ), then based on P Vn 、f θ (V n ) Calculate the projection matrix Q; Step 6: Calculate x n Matching department labels Traverse from x1 to x N , complete the matching of the government hotline work order dataset X and the label set Y; in, Among them, in step 2, P satisfies the requirement of minimizing the objective function ψ(P); in, In the formula, express The word embedding representation in ; Represents the word embedding matrix in the word2vec model; p i represents the updated word embedding representation; p j Indicates p i Neighbor nodes in the ConceptNet knowledge graph; E represents the ConceptNet knowledge graph; α i represents the weight of controlling word embedding, β ij Represents the weight of controlling the knowledge graph.

2. According to the government hotline work order classification method integrating knowledge graph according to claim 1, it is characterized in that: In step 1, the corpora containing Chinese texts include: Chinese Wikipedia corpus, THUCNews corpus, Chinese Gigaword dataset, Sogou dataset, Open Chinese vocabulary OpenCC, and THUCTC Chinese text classification dataset.

3. According to the government hotline work order classification method integrating knowledge graph according to claim 1, it is characterized in that: In step 4, for the zth word w among the Z words z , the calculation method of its TF-IDF value includes: S4.1, calculation of w z TF value tf z ;in, Where n z Indicates w z The number of times it appears in X; represents the sum of the occurrences of all words in X; S4.2, calculation of w z IDF value z ;in, In the formula, |X| represents the total number of government hotline work orders to be classified in X, |X|=N; Indicates that X contains w z The number of government hotline work orders to be classified; S4.3, tf z With idf z Multiply them together to get w z TF-IDF value of z ; Among them, s z =tf z ×idf z .

4. According to the government hotline work order classification method integrating knowledge graph according to claim 1, it is characterized in that: In step 4, the TF-IDF values ​​of the Z words are sorted in descending order, and the words in the top 15% to the top 35% are selected to form the word set V n .

5. The government hotline work order classification method integrating knowledge graph according to claim 1 is characterized in that: In step five, The calculation method is: According to V n All the words in are searched one by one in order, and their associated elements in P are extracted to form f θ (V n ) is calculated as: V n As f θ The input, f θ The output is f θ (V n ).

6. The government hotline work order classification method integrating knowledge graph according to claim 5 is characterized in that: In step five, 7. The government hotline work order classification method integrating knowledge graph according to claim 1 is characterized in that: In step 6, f θ (y m )*Q is calculated as: First, ym is used as f θ The input, f θ Output is the S-BERT embedding representation f of ym θ (y m );then f θ (y m ) According to Q projection into the ConceptNet knowledge graph to obtain f θ (y m )*Q; f θ (x n )*Q is calculated as: First, x n As f θ The input, f θ The output is x n The S-BERT embedding representation f θ (x n );then f θ (x n ) According to Q projection into the ConceptNet knowledge graph to obtain f θ (x n )*Q.

8. A government hotline work order classification system integrating knowledge graph, characterized in that: It uses the government hotline work order classification method integrating knowledge graph as described in any one of claims 1 to 7; The government hotline work order classification system integrating knowledge graph includes: The model pre-training module is used to obtain the S-BERT model and use the corpus containing Chinese text to pre-train the S-BERT model to obtain the model parameter set θ, so that the pre-trained S-BERT model f θ ; The knowledge graph module is used to obtain the ConceptNet knowledge graph and calculate the knowledge graph embedding matrix P by combining the word embedding representation of the word2vec model; The word splitting module is used to obtain x n The text content is split into P using the Tokenizer n words; also used to traverse x1 to x N , a total of Z words are obtained; The TF-IDF value calculation module is used to calculate the TF-IDF values ​​of Z words and select the words with the largest values ​​to form a word set V n ; Projection matrix calculation module, which is used to calculate the n , P calculates V n Knowledge graph embedding representation Based on V n 、f θ Calculate V n The S-BERT embedding representation f θ (V n ), then based on f θ (V n ) Obtain the projection matrix Q through matrix inverse operation; as well as The label matching module is used to calculate x n Matching department labels Also used to traverse x1 to x N , complete the matching of the government hotline work order dataset X and the label set Y.

9. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions. When the computer program instructions are read and executed by a processor, the steps of the government hotline work order classification method integrating knowledge graph as described in any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Man-post matching method and man-post matching system based on knowledge graph and deep learning

    CN111737485A

  • Question and answer system construction method based on BERT model and external knowledge graph

    CN116662500A