A method and device for extracting entity relations from large-scale policy texts

Through the end-to-end joint extraction method of deep learning technology, the problem of low efficiency and accuracy of entity relationship extraction in large-scale policy texts is solved, efficient and accurate extraction of entity relationships is achieved, and the precise formulation of public policies is promoted.

CN117829146BActive Publication Date: 2024-11-26BEIJING SCI & TECH PATENT OFFICE
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410007888.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-03
Publication Date
2024-11-26
Estimated Expiration
2044-01-03

AI Technical Summary

Technical Problem

When processing large-scale policy texts, the efficiency and accuracy of entity relationship extraction are low. Traditional methods rely on complex rules and a large number of labeled data. The separation of entity and relationship extraction ignores the dependence between the two, resulting in generalization ability. insufficient.

Method used

Using the end-to-end joint extraction method based on deep learning, the entity relationship information and map are determined by obtaining policy text information, entity training information and policy classification information, and using multiple models for feature extraction and loss value calculation, and update feature information to improve Extraction accuracy.

Benefits of technology

It improves the efficient and accurate extraction of entity relations in policy text, reduces the dependence on complex rules and labeled data, enhances the generalization ability of the model, and promotes the accurate and rational formulation of public policies.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117829146B_ABST
    Figure CN117829146B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for extracting entity relationships from large-scale policy texts. The method comprises: S1, obtaining policy text information, entity training information and policy classification information; the entity training information comprises a first training set, a first feature information, a second training set and a second feature information; S2, determining entity relationship information based on the policy text information and the entity training information; S3, determining entity relationship graph information based on the entity relationship information and the policy classification information. It can be seen that the present application is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing, and in particular to an entity relationship extraction method and device for large-scale policy texts. Background Art

[0002] With the rapid development of information technology, policy formulation and management have become increasingly complex and serious, and a large amount of policy text data has been produced and stored in various electronic archives. These texts carry a wealth of information on policy formulation, implementation, and evaluation, and are of great significance for promoting public management, policy analysis, and decision support. However, due to the large number and complex content of policy texts, the interpretation and analysis process requires a lot of human resources and is prone to misunderstandings and errors. How to efficiently and accurately extract relevant entities (such as organizations, names, places, dates, etc.) and the relationships between them (such as promulgation, implementation, impact, etc.), and effectively manage, process, and use policy text data, has become a technical challenge that policy analysts need to solve.

[0003] Currently, entity relationship extraction mainly relies on natural language processing (NLP) technology. Traditional methods often use rule-based or statistical learning methods to identify entities and relationships in texts. However, these methods face the following problems when processing large-scale policy texts:

[0004] The rules are complex and difficult to maintain. Policy texts cover a wide range of areas and use rigorous wording. Traditional rule-based methods require a lot of manual writing and maintenance of rules, which is particularly difficult in large-scale text processing.

[0005] Insufficient generalization ability. Statistical learning methods require a large amount of labeled data to train the model, but the diversity and professionalism of policy texts make it extremely costly to obtain high-quality labeled data, which limits the generalization ability of the model.

[0006] Separation of entity and relation extraction. Traditional methods usually perform entity recognition and relation extraction as two independent steps, which ignores the dependency between entities and relations and may lead to low accuracy of relation extraction.

[0007] Therefore, there is an urgent need for a new technical solution that can effectively solve the above problems and improve the efficiency and accuracy of joint extraction of entity relationships in large-scale policy texts. In recent years, deep learning technology has made significant progress in the field of natural language processing, providing new technical means to solve the above problems. In particular, the end-to-end joint extraction method based on deep learning, which learns the intrinsic connection between entities and relationships through the model, is expected to achieve efficient and accurate extraction of entity relationships in policy texts without relying on complex rules and large amounts of labeled data. Therefore, providing an entity relationship extraction method and device for large-scale policy texts can improve the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies. Summary of the invention

[0008] The technical problem to be solved by the present invention is to provide a method and device for entity relationship extraction for large-scale policy texts. Through this method, the efficient and accurate extraction of entity relationships in policy texts can be improved, thereby promoting more accurate and reasonable formulation of public policies.

[0009] In order to solve the above technical problems, the first aspect of the embodiment of the present invention discloses an entity relationship extraction method for large-scale policy texts, the method comprising:

[0010] S1, obtaining policy text information, entity training information and policy classification information; the entity training information includes a first training set, first feature information, a second training set and a second feature information;

[0011] S2, determining entity relationship information based on the policy text information and the entity training information;

[0012] S3, determining entity relationship graph information based on the entity relationship information and the policy classification information.

[0013] As an optional implementation manner, in the first aspect of the embodiment of the present invention, determining the entity relationship information based on the policy text information and the entity training information includes:

[0014] S21, formatting the policy text information to obtain a policy text sequence;

[0015] S22, fusing the policy text sequence, the first feature information and the first training set to obtain an entity information sequence;

[0016] S23, determining an entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set;

[0017] S24, determining entity relationship information based on the entity information sequence and the entity relationship feature sequence.

[0018] As an optional implementation manner, in the first aspect of the embodiment of the present invention, the fusing process of the policy text sequence, the first feature information and the first training set to obtain the entity information sequence includes:

[0019] S221, using a first entity model, fusing the first training set and the first feature information to obtain an entity prediction sequence;

[0020] The first entity model is:

[0021] A(X)=B*(C+D(E,F(X)))*F(X)

[0022] Wherein, A(X) is the entity prediction sequence, B is the entity normalization factor, N is the length of the first training set, C is the entity feature weight, D(E, F(X)) is the first feature information, E is the entity feature parameter corresponding to the first feature information, X is the first training set, and F(X) is the feature vector information corresponding to the first training set;

[0023] S222, using a second entity model, processing the entity prediction sequence to obtain a first loss value;

[0024] The second entity model is:

[0025] θ=α-β*A(X)

[0026] Wherein θ is the first loss value, α and β are the first correction parameter and the second correction parameter, and A(X) is the entity prediction sequence;

[0027] S223, determining whether the first loss value is less than a first threshold value, and obtaining a first determination result:

[0028] When the first judgment result is no, updating the first feature information and executing S221;

[0029] When the first judgment result is yes, executing S224;

[0030] S224: Utilize the first entity model to perform computational processing on the policy text sequence to obtain an entity information sequence.

[0031] As another optional implementation, in the first aspect of the embodiment of the present invention, determining the entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set includes:

[0032] S231, determining an entity relationship prediction sequence based on the second training set and the second feature information;

[0033] S232, using a third entity model, calculating and processing the second training set and the entity relationship prediction sequence to obtain a second loss value;

[0034] The third entity model is:

[0035]

[0036] Wherein, μ is the second loss value, γ is the third correction parameter, M is the length of the second training set, O is the number of entity relationship categories, F(X) is the feature vector information corresponding to the first training set, G ij Predicting an element of the jth relationship corresponding to the i-th entity in the entity relationship sequence;

[0037] S233, determining whether the second loss value is less than a second threshold value, and obtaining a second determination result:

[0038] When the second judgment result is no, updating the second characteristic information and executing S231;

[0039] When the second judgment result is yes, execute S234;

[0040] S234: Determine an entity relationship feature sequence based on the entity information sequence.

[0041] As another optional implementation, in the first aspect of the embodiment of the present invention, determining the entity relationship information based on the entity information sequence and the entity relationship feature sequence includes:

[0042] S241, using a fourth entity model, calculating the first loss value and the second loss value to obtain a third loss value;

[0043] The fourth entity model is:

[0044] H=δθ+εμ+∈

[0045] Wherein, H is the third loss value, δ, ε, ∈ are the fourth correction parameter, the fifth correction parameter and the sixth correction parameter, θ is the first loss value, and μ is the second loss value;

[0046] S242, determining whether the third loss value is less than a third threshold value, and obtaining a third determination result;

[0047] When the third judgment result is no, executing S22;

[0048] When the third judgment result is yes, execute S243;

[0049] S243, obtaining entity relationship information based on the entity information sequence and the entity relationship feature sequence.

[0050] As an optional implementation manner, in the first aspect of the embodiment of the present invention, determining entity relationship graph information based on the entity relationship information and the policy classification information includes:

[0051] S31, determining a policy classification value sequence based on the policy classification information and the entity relationship information;

[0052] S32, fusing the policy classification value sequence with the entity relationship information to obtain a policy classification matrix;

[0053] S33, determining entity relationship graph information based on the policy classification matrix.

[0054] As another optional implementation, in the first aspect of the embodiment of the present invention, the fusion processing of the policy classification value sequence and the entity relationship information to obtain a policy classification matrix includes:

[0055] S321, performing vectorization processing on the policy classification value sequence to obtain a policy classification vector;

[0056] S322, using a policy classification matrix model, calculating the policy classification vector and the entity relationship information to obtain the policy classification matrix;

[0057] The policy classification matrix model is:

[0058]

[0059] Where T is the policy classification matrix, K is the entity relationship information, L is the policy classification vector, P is the row length of the entity relationship information, Q is the column length of the entity relationship information, and K ij is the element in the i-th row and j-th column of the entity relationship information, L j is the element in the j-th column of the policy classification vector.

[0060] A second aspect of an embodiment of the present invention discloses an entity relationship extraction device for large-scale policy texts, characterized in that the device comprises:

[0061] An acquisition module, used to acquire policy text information, entity training information and policy classification information; the entity training information includes a first training set, first feature information, a second training set and a second feature information;

[0062] An entity relationship fusion analysis module, used to determine entity relationship information based on the policy text information and the entity training information;

[0063] The entity relationship graph calculation module is used to determine the entity relationship graph information based on the entity relationship information and the policy classification information.

[0064] The third aspect of the embodiment of the present invention discloses another entity relationship extraction device for large-scale policy texts, characterized in that the device comprises:

[0065] processor;

[0066] a memory coupled to the processor and storing executable program code;

[0067] The processor calls the executable program code stored in the memory to execute the entity relationship extraction method for large-scale policy texts.

[0068] A fourth aspect of an embodiment of the present invention discloses a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the entity relationship extraction method for large-scale policy texts.

[0069] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0070] The entity relationship extraction method for large-scale policy texts includes: obtaining policy text information, entity training information and policy classification information; the entity training information includes a first training set, a first feature information, a second training set and a second feature information; based on the policy text information and the entity training information, determining entity relationship information; based on the entity relationship information and the policy classification information, determining entity relationship graph information. It can be seen that this application is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0072] Figure 1 A flowchart of an entity relationship extraction method for large-scale policy texts disclosed in an embodiment of the present invention;

[0073] Figure 2 A schematic diagram of the structure of an entity relationship extraction device for large-scale policy texts disclosed in an embodiment of the present invention;

[0074] Figure 3 A schematic diagram of the structure of another entity relationship extraction device for large-scale policy texts disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0075] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0076] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, device, product or equipment that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or equipment.

[0077] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0078] The present invention discloses a method and device for extracting entity relationships from large-scale policy texts, which is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies. The following are detailed descriptions.

[0079] Embodiment 1

[0080] See also Figure 1 , Figure 1 Schematic diagram of an entity relationship extraction method for large-scale policy text disclosed in an embodiment of the present invention. Figure 1The described method can be applied to an entity relationship extraction system, such as a local server or a cloud server for entity relationship extraction management, and the embodiments of the present invention are not limited thereto. Figure 1 As shown, the method includes:

[0081] S1, obtaining policy text information, entity training information and policy classification information; the entity training information includes a first training set, first feature information, a second training set and a second feature information;

[0082] S2, determining entity relationship information based on the policy text information and the entity training information;

[0083] S3, determining entity relationship graph information based on the entity relationship information and the policy classification information.

[0084] It should be noted that the first feature information represents the specific attributes of the entity in the policy text information during the entity identification process.

[0085] It should be noted that the second feature information represents a specific attribute for measuring the relationship between entities during the entity relationship recognition process.

[0086] It should be noted that the first training set is used to train the entity recognition; and the second training set is used to train the entity relationship recognition.

[0087] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0088] In another optional embodiment, determining entity relationship information based on the policy text information and the entity training information includes:

[0089] S21, formatting the policy text information to obtain a policy text sequence;

[0090] S22, fusing the policy text sequence, the first feature information and the first training set to obtain an entity information sequence;

[0091] S23, determining an entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set;

[0092] S24, determining entity relationship information based on the entity information sequence and the entity relationship feature sequence.

[0093] It should be noted that the policy text information is formatted to obtain a policy text sequence, including: standardizing the policy text information, including removing irrelevant characters, text segmentation, part-of-speech tagging, converting traditional Chinese characters to simplified Chinese characters, and loading a custom vocabulary; after the standardization is completed, the processed output information is subjected to feature extraction, and the extraction goal is to convert the context information of each word in the processed output information into a feature vector, and merge the feature vectors of all words to obtain the policy text sequence.

[0094] It should be noted that the policy text information is formatted to obtain a policy text sequence which can be processed by a user-defined model or by a commonly used natural language processing tool, which is not specifically limited in the embodiment of the present invention.

[0095] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0096] In another optional embodiment, the fusing process of the policy text sequence, the first feature information and the first training set to obtain the entity information sequence includes:

[0097] S221, using a first entity model, fusing the first training set and the first feature information to obtain an entity prediction sequence;

[0098] The first entity model is:

[0099] A(X)=B*(C+D(E,F(X)))*F(X)

[0100] Wherein, A(X) is the entity prediction sequence, B is the entity normalization factor, N is the length of the first training set, C is the entity feature weight, D(E, F(X)) is the first feature information, E is the entity feature parameter corresponding to the first feature information, X is the first training set, and F(X) is the feature vector information corresponding to the first training set;

[0101] It should be noted that the first entity model mentioned above can also be obtained using the fifth entity model;

[0102] The fifth entity model is:

[0103]

[0104] Where A(X) is the entity prediction sequence, B is the normalization factor, N is the length of the first training set, C is the entity feature weight, D(E i,X,i) is the first feature information, E i is the entity feature parameter corresponding to the first feature information, and X is the first training set;

[0105] S222, using a second entity model, processing the entity prediction sequence to obtain a first loss value;

[0106] The second entity model is:

[0107] θ=α-β*A(X)

[0108] Wherein θ is the first loss value, α and β are the first correction parameter and the second correction parameter, and A(X) is the entity prediction sequence;

[0109] S223, determining whether the first loss value is less than a first threshold value, and obtaining a first determination result:

[0110] When the first judgment result is no, updating the first feature information and executing S221;

[0111] When the first judgment result is yes, executing S224;

[0112] S224: Utilize the first entity model to perform computational processing on the policy text sequence to obtain an entity information sequence.

[0113] It should be noted that the first training set is a policy text data set that has been trained and annotated with specific labels. The first entity model can be trained using the first training set.

[0114] It should be noted that the entity normalization factor and the entity feature weight may be set by a user or acquired based on historical data, and the embodiment of the present invention does not specifically limit this.

[0115] It should be noted that the first feature information is set by the user, and the user adjusts the first entity model according to the entity feature parameters in the first feature information. Through continuous adjustment, output, and judgment, a fully trained first entity model is finally obtained.

[0116] It should be noted that the updating of the first characteristic information is to adjust the entity characteristic parameters in the first characteristic information according to artificial settings or historical data.

[0117] It should be noted that the entity normalization factor is used to perform a normalization operation on the first entity model result.

[0118] It should be noted that the first correction parameter and the second correction parameter are corrections to the second entity model to obtain better results. The first correction parameter and the second correction parameter are obtained based on historical data, and can also be set manually.

[0119] It should be noted that the first threshold represents whether the second entity model has reached a convergence state, and when the convergence state is reached, the training is stopped. The first threshold can be set manually or obtained based on historical data, and is not specifically limited in the embodiments of the present invention.

[0120] It should be noted that the policy text sequence is calculated and processed using the first entity model to obtain an entity information sequence. This is based on continuous training from S221 to S223. After the trained model is obtained, the policy text sequence is used as the input of the model to finally obtain the output of the model, namely the entity information sequence.

[0121] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0122] In yet another optional embodiment, determining an entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set includes:

[0123] S231, determining an entity relationship prediction sequence based on the second training set and the second feature information;

[0124] It should be noted that the entity relationship prediction sequence is determined based on the second training set and the second feature information, and is obtained by using the sixth entity model;

[0125] The sixth entity model is:

[0126]

[0127] Wherein, G(X) is the entity prediction sequence, S is the entity relationship normalization factor, N is the length of the second training set, ρ is the second feature information, and X is the first training set;

[0128] It should be noted that the entity relationship normalization factor is used to perform a normalization operation on the sixth entity model result.

[0129] S232, using a third entity model, calculating and processing the second training set and the entity relationship prediction sequence to obtain a second loss value;

[0130] The third entity model is:

[0131]

[0132] Wherein, μ is the second loss value, γ is the third correction parameter, M is the length of the second training set, O is the number of entity relationship categories, F(X) is the feature vector information corresponding to the first training set, G ij Predicting an element of the jth relationship corresponding to the i-th entity in the entity relationship sequence;

[0133] S233, determining whether the second loss value is less than a second threshold value, and obtaining a second determination result:

[0134] When the second judgment result is no, updating the second characteristic information and executing S231;

[0135] When the second judgment result is yes, execute S234;

[0136] S234: Determine an entity relationship feature sequence based on the entity information sequence.

[0137] It should be noted that the second characteristic information is set by the user, and the user adjusts the sixth entity model according to the second characteristic information. Through continuous adjustment, output, and judgment, a fully trained sixth entity model is finally obtained.

[0138] It should be noted that the updating of the second characteristic information is based on artificial settings or historical data to adjust the second characteristic information to obtain the optimal sixth entity model.

[0139] It should be noted that the third correction parameter is used to correct the third entity model in order to obtain a better result. The third correction parameter is obtained based on historical data and can also be set manually.

[0140] It should be noted that the second threshold represents whether the third entity model has reached a convergence state, and when the convergence state is reached, the training is stopped. The second threshold can be set manually or obtained based on historical data, and is not specifically limited in the embodiments of the present invention.

[0141] It should be noted that based on the entity information sequence, the entity relationship feature sequence is determined. After the trained sixth entity model is obtained through continuous training in S231-S233, the entity information sequence is used as the input of the model to finally obtain the output of the model, namely the entity relationship feature sequence.

[0142] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0143] In another optional embodiment, determining entity relationship information based on the entity information sequence and the entity relationship feature sequence includes:

[0144] S241, using a fourth entity model, calculating the first loss value and the second loss value to obtain a third loss value;

[0145] The fourth entity model is:

[0146] H=δθ+εμ+∈

[0147] Wherein, H is the third loss value, δ, ε, ∈ are the fourth correction parameter, the fifth correction parameter and the sixth correction parameter, θ is the first loss value, and μ is the second loss value;

[0148] S242, determining whether the third loss value is less than a third threshold value, and obtaining a third determination result;

[0149] When the third judgment result is no, executing S22;

[0150] When the third judgment result is yes, execute S243;

[0151] S243, obtaining entity relationship information based on the entity information sequence and the entity relationship feature sequence.

[0152] It should be noted that the fourth correction parameter, the fifth correction parameter and the sixth correction parameter are correction processing for the fourth entity model to balance the weights between entities and entity relationships. The fourth correction parameter, the fifth correction parameter and the sixth correction parameter are obtained based on historical data and can also be set manually.

[0153] It should be noted that the third threshold represents whether the fourth entity model has reached a convergence state, and when the convergence state is reached, the training is stopped. The third threshold can be set manually or obtained based on historical data, and is not specifically limited in the embodiment of the present invention.

[0154] It should be noted that the entity relationship information is obtained based on the entity information sequence and the entity relationship feature sequence, and the entity relationship information is obtained by continuously judging in step S242, thereby continuously updating the entity information sequence and the entity relationship feature sequence, and merging the entity information sequence and the entity relationship feature sequence to obtain the entity relationship information.

[0155] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0156] In yet another optional embodiment, the entity relationship information and the policy classification information are used to determine entity relationship graph information, including:

[0157] S31, determining a policy classification value sequence based on the policy classification information and the entity relationship information;

[0158] S32, fusing the policy classification value sequence with the entity relationship information to obtain a policy classification matrix;

[0159] S33, determining entity relationship graph information based on the policy classification matrix.

[0160] It should be noted that the policy classification information is a R-type label sequence [s1, s2, ..., s r ], the corresponding policy relationship classification types in the policy classification information include: policy adoption, policy modification, policy abolition and policy expiration.

[0161] It should be noted that based on the policy classification information and the entity relationship information, the policy classification value sequence is determined. A multi-label classification algorithm can be used to construct a multi-label model with output of 4 label prediction results to classify the policy relationship and obtain the policy classification value sequence [sy1, sy2, …, sy r ], each classification label s i The policy classification value sy i 1 or 0, a value of 1 means that the entity has s i Classification label, a value of 0 means that the entity has no s i Category labels.

[0162] It should be noted that the multi-label classification algorithms include DNN, KNN, ML-DT, Rank-SVM, and CML. Other algorithm models may also be used, which are not specifically limited in the embodiments of the present invention.

[0163] It should be noted that the policy classification matrix is:

[0164]

[0165] Where Title is an entity, indicating the title of the current policy, PolicyType is the relationship type between the current policy and the affected policy, AffectedPolicy is the affected policy title, and n is the number of entities.

[0166] It should be noted that, based on the policy classification matrix, the entity relationship graph information is determined by constructing the policy classification matrix with a directed graph algorithm to obtain the entity relationship graph information. For example, based on the elements such as the title of the post, the subject of the post, the time of posting, and the location of the post, an ordered triple (Source, Target, Relation) is formed, where Source is the source node, Target is the target node, and Relation is the associated attribute. Thus, a directed graph is formed to construct the policy entity relationship graph information.

[0167] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0168] In another optional embodiment, the step of fusing the policy classification value sequence with the entity relationship information to obtain a policy classification matrix includes:

[0169] S321, performing vectorization processing on the policy classification value sequence to obtain a policy classification vector;

[0170] S322, using a policy classification matrix model, calculating the policy classification vector and the entity relationship information to obtain the policy classification matrix;

[0171] The policy classification matrix model is:

[0172]

[0173] Where T is the policy classification matrix, K is the entity relationship information, L is the policy classification vector, P is the row length of the entity relationship information, Q is the column length of the entity relationship information, and K ij is the element in the i-th row and j-th column of the entity relationship information, L j is the element in the j-th column of the policy classification vector.

[0174] It should be noted that the policy classification vector is obtained through vectorized calculation.

[0175] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0176] In another optional embodiment, the entity diffusion rate model is used to calculate and process the entity relationship graph information to obtain the entity diffusion rate.

[0177] The entity diffusion velocity model is:

[0178] V = σ / (t′-t)

[0179] Wherein, V is the entity diffusion speed, t is the corresponding entity posting time in the entity relationship graph information, t′ is the entity posting time associated with the entity, the time distance is calculated in days, and σ is the normalization coefficient.

[0180] The normalization coefficient may be set manually or obtained based on historical data, and the embodiment of the present invention does not make any specific limitation.

[0181] It can be seen that implementing the entity relationship extraction method for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0182] Embodiment 2

[0183] See also Figure 2 , Figure 2 Schematic diagram of the structure of an entity relationship extraction device for large-scale policy text disclosed in an embodiment of the present invention. Figure 2 The described entity relationship extraction device for large-scale policy texts is applied to an entity relationship extraction system, such as a local server or cloud server for data processing and management of entity relationship extraction, which is not limited in the embodiments of the present invention. Figure 2 As shown, the entity relationship extraction device for large-scale policy texts includes:

[0184] An acquisition module 201 is used to acquire policy text information, entity training information and policy classification information; the entity training information includes a first training set, first feature information, a second training set and a second feature information;

[0185] An entity relationship fusion analysis module 202, configured to determine entity relationship information based on the policy text information and the entity training information;

[0186] The entity relationship graph calculation module 203 is used to determine entity relationship graph information based on the entity relationship information and the policy classification information.

[0187] It can be seen that implementing the entity relationship extraction device for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0188] Embodiment 3

[0189] See also Figure 3 , Figure 3is a schematic diagram of the structure of another entity relationship extraction device for large-scale policy texts disclosed in an embodiment of the present invention. Figure 3 The described entity relationship extraction device for large-scale policy texts is applied to an entity relationship extraction system, such as a local server or cloud server for data processing and management of entity relationship extraction, which is not limited in the embodiments of the present invention. Figure 3 As shown, the entity relationship extraction device for large-scale policy texts includes:

[0190] Processor 301;

[0191] A memory 302 coupled to the processor 301 and storing executable program codes;

[0192] The processor 301 calls the executable program code stored in the memory 302 to execute the entity relationship extraction method for large-scale policy texts.

[0193] It can be seen that implementing the entity relationship extraction device for large-scale policy texts described in the embodiment of the present invention is conducive to improving the efficient and accurate extraction of entity relationships in policy texts, thereby promoting more accurate and reasonable formulation of public policies.

[0194] Embodiment 4

[0195] An embodiment of the present invention discloses a computer-readable storage medium storing a computer program for electronic data exchange, wherein the computer program enables a computer to execute the steps of the entity relationship extraction method for large-scale policy texts described in the first embodiment.

[0196] Embodiment 5

[0197] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the entity relationship extraction method for large-scale policy texts described in Example 1.

[0198] The device embodiments described above are only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, i.e., they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.

[0199] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0200] Finally, it should be noted that the entity relationship extraction method and device for large-scale policy texts disclosed in the embodiments of the present invention only disclose the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting entity relations from large-scale policy texts, characterized in that: The method comprises: S1, obtaining policy text information, entity training information and policy classification information; the entity training information includes a first training set, first feature information, a second training set and a second feature information; S2, determining entity relationship information based on the policy text information and the entity training information; S3, determining entity relationship graph information based on the entity relationship information and the policy classification information; Wherein, determining entity relationship information based on the policy text information and the entity training information includes: S21, formatting the policy text information to obtain a policy text sequence; S22, fusing the policy text sequence, the first feature information and the first training set to obtain an entity information sequence; S23, determining an entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set; S24, determining entity relationship information based on the entity information sequence and the entity relationship feature sequence; The step of fusing the policy text sequence, the first feature information and the first training set to obtain an entity information sequence includes: S221, using a first entity model, fusing the first training set and the first feature information to obtain an entity prediction sequence; The first entity model is: A(X)=B*(C+D(E,F(X)))*F(X) Wherein, A(X) is the entity prediction sequence, B is the entity normalization factor, N is the length of the first training set, C is the entity feature weight, D(E, F(X)) is the first feature information, E is the entity feature parameter corresponding to the first feature information, X is the first training set, and F(X) is the feature vector information corresponding to the first training set; S222, using a second entity model, processing the entity prediction sequence to obtain a first loss value; The second entity model is: θ=α-β*A(X) Wherein θ is the first loss value, α and β are the first correction parameter and the second correction parameter, and A(X) is the entity prediction sequence; S223, determining whether the first loss value is less than a first threshold value, and obtaining a first determination result: When the first judgment result is no, updating the first feature information and executing S221; When the first judgment result is yes, executing S224; S224, using the first entity model, calculating and processing the policy text sequence to obtain an entity information sequence; Wherein, determining the entity relationship feature sequence based on the entity information sequence, the second feature information and the second training set includes: S231, determining an entity relationship prediction sequence based on the second training set and the second feature information; S232, using a third entity model, calculating and processing the second training set and the entity relationship prediction sequence to obtain a second loss value; The third entity model is: Wherein, μ is the second loss value, γ is the third correction parameter, M is the length of the second training set, O is the number of entity relationship categories, F(X) is the feature vector information corresponding to the first training set, G ij Predicting an element of the jth relationship corresponding to the i-th entity in the entity relationship sequence; S233, determining whether the second loss value is less than a second threshold value, and obtaining a second determination result: When the second judgment result is no, updating the second characteristic information and executing S231; When the second judgment result is yes, execute S234; S234: Determine an entity relationship feature sequence based on the entity information sequence.

2. The entity relationship extraction method for large-scale policy text according to claim 1 is characterized in that: The determining of entity relationship information based on the entity information sequence and the entity relationship feature sequence includes: S241, using a fourth entity model, calculating the first loss value and the second loss value to obtain a third loss value; The fourth entity model is: H=δθ+εμ+∈ Wherein, H is the third loss value, δ, ε, ∈ are the fourth correction parameter, the fifth correction parameter and the sixth correction parameter, θ is the first loss value, and μ is the second loss value; S242, determining whether the third loss value is less than a third threshold value, and obtaining a third determination result; When the third judgment result is no, executing S22; When the third judgment result is yes, execute S243; S243, obtaining entity relationship information based on the entity information sequence and the entity relationship feature sequence.

3. The entity relationship extraction method for large-scale policy text according to claim 1 is characterized in that: Based on the entity relationship information and the policy classification information, entity relationship graph information is determined, including: S31, determining a policy classification value sequence based on the policy classification information and the entity relationship information; S32, fusing the policy classification value sequence with the entity relationship information to obtain a policy classification matrix; S33, determining entity relationship graph information based on the policy classification matrix.

4. The entity relationship extraction method for large-scale policy text according to claim 3 is characterized in that: The step of fusing the policy classification value sequence with the entity relationship information to obtain a policy classification matrix includes: S321, performing vectorization processing on the policy classification value sequence to obtain a policy classification vector; S322, using a policy classification matrix model, calculating the policy classification vector and the entity relationship information to obtain the policy classification matrix; The policy classification matrix model is: Where T is the policy classification matrix, K is the entity relationship information, L is the policy classification vector, P is the row length of the entity relationship information, Q is the column length of the entity relationship information, and K ij is the element in the i-th row and j-th column of the entity relationship information, L j is the element in the j-th column of the policy classification vector.

5. An entity relationship extraction device for large-scale policy texts, characterized in that: The device comprises: processor; a memory coupled to the processor and storing executable program code; The processor calls the executable program code stored in the memory to execute the entity relationship extraction method for large-scale policy texts as described in any one of claims 1-4.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, which, when called, are used to execute the entity relationship extraction method for large-scale policy texts as described in any one of claims 1-4.