Government affair data knowledge extraction method and device based on government affair quaternary data model
Through the method based on the four-metadata model of government affairs, government affairs data is preprocessed, entity identification and relationship extraction, which solves the problem of data information extraction in the government affairs field, and achieves rapid and accurate government affairs data knowledge extraction, providing a convenient data basis for government affairs data sharing.
Patent Information
- Application Number
- CN202510110008.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-23
- Publication Date
- 2025-05-02
AI Technical Summary
The existing technology lacks information extraction methods specifically for government data, which makes it impossible for users to easily obtain the key information they need.
The government data to be identified is preprocessed, entity identification and relationship extraction, and the knowledge extraction of government data is achieved through the pre-constructed quaternary data model.
It quickly and accurately extracts the relationship between core entities and entities such as natural persons, legal persons, government agencies and things from massive government data, reduces the difficulty of information extraction, and provides an effective data basis for government data sharing.
Smart Images

Figure CN119918637A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of natural language processing, and in particular relates to a method and device for extracting government data knowledge based on a government data quaternary data model. Background Art
[0002] In recent years, with the mutual superposition and symbiosis of information technologies such as big data analysis, cloud computing, blockchain and artificial intelligence, far-reaching impacts have been produced; in the field of government affairs, with the tremendous development of digital government construction, massive government data have been accumulated and shared; due to the diversity, extensiveness and complexity of government data resources, the sharing and integration of government data has become very difficult, seriously hindering the development and utilization of government data at all levels.
[0003] In order to solve the complexity of government data extraction and the challenges of cross-departmental sharing, Peng et al. reshaped the principles of government data sharing and strengthened the procedural constraints on government data sharing behavior; Zhao et al. proposed an optimization path for cross-departmental data sharing at the provincial level from seven aspects, including top-level system design, improving the subject law and special law of cross-departmental data sharing, establishing a variety of promotion mechanisms for cross-departmental data sharing, establishing an independent data management agency, formulating unified data description specifications and quality management standards, standardizing the design of sharing platforms, and strengthening the system construction of professional data talent training; However, the above-mentioned theoretical rule-making for government data sharing lacks an information extraction method specifically for government data, which makes it impossible for users to easily obtain the key information they need. Summary of the invention
[0004] In response to the technical problems existing in the prior art, the present invention provides a government data knowledge extraction method and device based on the government data quaternary data model to solve the technical problem that the prior art lacks an information extraction method specifically for government field data, resulting in users being unable to easily obtain the required key information.
[0005] In order to achieve the above object, the technical solution adopted by the present invention is: The present invention provides a government affairs data knowledge extraction method based on a government affairs quaternary data model, which is characterized by comprising: Obtain government data to be identified; Inputting the government data to be identified into a pre-built government data quaternary data model, and outputting a knowledge extraction result of the government data to be identified; The knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-built government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; The data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity identification module is used to perform entity type identification on the unstructured government data to be identified to obtain entity identification results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity identification results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0006] Furthermore, the data types of the government data to be identified include structured data, semi-structured data and unstructured data.
[0007] Furthermore, the entity recognition module includes a predefined named entity type recognition unit and a new entity type recognition unit; the predefined named entity type recognition unit is used to perform named entity recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified; the new entity type recognition unit is used to perform small sample named entity recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified.
[0008] Furthermore, the predefined named entity type recognition unit adopts a BERT+CRF model, or a named entity detection model based on a semantic prototype; wherein the named entity detection model based on a semantic prototype includes a semantic prototype generation unit, a prototype-guided context annotation unit, and a cross-prototype example inference unit; The semantic prototype generation unit is used to generate entity type prototype descriptions and corresponding trigger word sets in the government data environment; The prototype-guided context annotation unit is used to perform entity annotation on the unstructured government data to be identified according to the entity type prototype description and the corresponding trigger word set in the government data environment to obtain the entity annotation result; The cross-prototype example inference unit is used to infer the unstructured government data to be identified based on the entity labeling result to obtain the entity recognition result of the government data to be identified.
[0009] Furthermore, the new entity type recognition unit adopts a TadNER model, or an entity extensible model based on dynamic prototype self-update; wherein the entity extensible model based on dynamic prototype self-update includes a dynamic prototype self-update unit and a multi-signal fusion unit; The dynamic prototype self-updating unit is used to dynamically update the entity type prototype description; The multi-signal fusion unit is used to perform entity matching based on the dynamically updated entity category prototype to obtain the entity recognition result of the government data to be recognized Furthermore, the relation extraction module adopts an R-BERT model, or a relation extraction model based on a relation prototype; Wherein, the relation extraction model based on relation prototype includes a relation prototype construction unit and a triple discovery unit; The relationship prototype construction unit is used to generate a relationship prototype set; The triple discovery unit is used to generate relationship prediction results based on the relationship prototype set, that is, to obtain the entity relationship extraction results of the government data to be identified.
[0010] The present invention also provides a government affairs data knowledge extraction system based on the government affairs quaternary data model, comprising: A data acquisition module, used to acquire government data to be identified; A knowledge extraction module, used for inputting the government data to be identified into a pre-built government quaternary data model, and outputting a knowledge extraction result of the government data to be identified; The knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-built government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; The data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity identification module is used to perform entity type identification on the unstructured government data to be identified to obtain entity identification results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity identification results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0011] The present invention also provides a government affairs data knowledge extraction device based on the government affairs quaternary data model, which is characterized by comprising: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the government affairs data knowledge extraction method based on the government affairs quaternary data model is executed.
[0012] The present invention also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the government affairs data knowledge extraction method based on the government affairs quaternary data model.
[0013] The present invention also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the government data knowledge extraction method based on the government data quaternary data model.
[0014] Compared with the prior art, the present invention has the following beneficial effects: The government data knowledge extraction method based on the government data quaternary data model provided by the present invention uses a pre-built quaternary data model to perform data preprocessing, entity recognition and relationship extraction on the government data to be identified, thereby realizing fast and accurate extraction of four major categories of core entities, namely natural persons, legal persons, government agencies and things, and the relationships between entities from massive government data, greatly reducing the difficulty of extracting government data information, providing an effective data basis for integrating government data and realizing government data sharing, and facilitating users to easily obtain the required key information.
[0015] The government data knowledge extraction system based on the government data quaternary data model, the government data knowledge extraction device based on the government data quaternary data model, the computer-readable storage medium and the computer program product provided by the present invention have all the advantages of the above-mentioned government data knowledge extraction method based on the government data quaternary data model. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A flowchart of the government affairs data knowledge extraction method based on the government affairs quaternary data model provided in Example 1; Figure 2 It is a structural diagram of the government affairs four-element data model pre-constructed in Example 1; Figure 3 A structural block diagram of a government affairs data knowledge extraction system based on a government affairs quaternary data model provided in Example 2; Figure 4 This is a structural block diagram of the government data knowledge extraction device based on the government data quaternary data model provided in Example 3. DETAILED DESCRIPTION
[0018] In order to make the technical problems, technical solutions and beneficial effects solved by this application clearer, the technical solutions in the embodiments of this application will be described clearly and completely in combination with the drawings in the embodiments of this application; obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0019] Example 1 As attached Figure 1 As shown, this embodiment 1 provides a method for extracting government data knowledge based on a government data quaternary data model, comprising the following steps: Step 1: Obtain government data to be identified, wherein the government data to be identified is stored in a predefined standardized metadata format; the data types of the government data to be identified include structured data, semi-structured data, and unstructured data.
[0020] Step 2: Input the government data to be identified into the pre-built government quaternary data model, and output the knowledge extraction results of the government data to be identified, wherein the knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results.
[0021] In this embodiment 1, the pre-built government affairs four-dimensional data model includes a data pre-processing module, an entity recognition module and a relationship extraction module, as shown in the attached Figure 2 shown.
[0022] The data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; specifically, a predetermined data cleaning method is used to perform data cleaning on the government data to be identified to remove useless data; after data cleaning, all types of data are uniformly converted into unstructured data, and the data are labeled to obtain unstructured government data to be identified.
[0023] The entity recognition module is used to perform entity type recognition on the unstructured government data to be recognized, and obtain entity recognition results of the government data to be recognized; wherein, the entity recognition module includes a predefined named entity type recognition unit and a new entity type recognition unit; the predefined named entity type recognition unit is used to perform named entity recognition on the unstructured government data to be recognized, and obtain entity recognition results of the government data to be recognized; the new entity type recognition unit is used to perform small sample named entity recognition on the unstructured government data to be recognized, and obtain entity recognition results of the government data to be recognized.
[0024] The relationship extraction module is used to extract entity relationships from the entity recognition results of the government data to be identified, so as to obtain entity relationship extraction results of the government data to be identified.
[0025] It should be noted that the four elements in the pre-constructed government affairs four-element data model include natural persons, legal persons, government agencies and things; the pre-constructed government affairs four-element data model is used to extract four major types of entities, namely natural person entities, legal person entities, government agency entities and thing entities, from government affairs data, and establish relationships between entities to form government affairs knowledge.
[0026] Natural person entities refer to the main service objects of government activities, which cover all kinds of natural persons of different nationalities. By establishing relationships between natural person entities and other entities, such as service relationships, personnel relationships, contractual relationships, etc., it is possible to better serve natural persons and provide efficient, convenient and standard public services. Since government activities not only involve the rights and interests of natural persons, but also relate to the management and development of social organizations such as enterprises; therefore, legal person entities are also the core components of the government four-dimensional data model. Legal person entities include companies, enterprises and non-profit organizations, covering most organizations in the government field; there are important connections between legal person entities and natural person entities, government agency entities and thing entities. Government agency entities are the basic subjects of government activities. As the providers of government services, they have a vital impact on government activities; government agency entities cover administrative agencies at all levels from the central to the local level, including national competent departments and provincial, municipal, county and township agencies at all levels. Thing entities refer to entity classes that can be continuously expanded and supplemented based on application scenarios, including policies and regulations, events, social hot spots, projects and geographic information; thing entities reflect all content related to the government field and provide comprehensive information support for the government four-dimensional data model.
[0027] In this embodiment 1, the process of inputting the government data to be identified into the pre-built government quaternary data model and outputting the knowledge extraction result of the government data to be identified is specifically as follows: Receive government data to be identified; perform data cleaning on the received government data to be identified to remove useless data, and uniformly convert all types of data into unstructured data, and perform data annotation to obtain unstructured government data to be identified; then, perform named entity recognition or small sample named entity recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified; then, perform entity relationship extraction on the entity recognition results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0028] The predefined named entity recognition unit adopts the BERT+CRF model, that is, the BERT+CRF model is used to perform named entity recognition on unstructured government data to be identified, and obtain entity recognition results of the government data to be identified; wherein, the BERT+CRF model uses the chinese-roberta-wwm-ext Chinese pre-trained model.
[0029] Specifically, the BERT+CRF model combines the powerful language representation ability of BERT and the modeling ability of CRF for sequence labeling problems, including a BERT layer and a CRF layer; the working principle of the BERT layer is specifically as follows: encoding the input text through a multi-layer Transformer structure to generate a context representation vector for each word or character; wherein the output of the BERT layer is a vector representation of each word or character; the working principle of the CRF layer is specifically as follows: based on the vector representation output by the BERT layer and a predefined label set, considering the global constraints of sequence labeling, a global optimal label sequence is found through a dynamic programming method; wherein, the global constraints that need to be labeled include, for example, the transition probability between labels, and the dynamic programming method includes, for example, the Viterbi algorithm; and finally, the predicted label corresponding to each word or character is output to form the final labeling result.
[0030] This embodiment 1 also provides another implementation method of the predefined named entity recognition unit, specifically: the predefined named entity recognition unit adopts a named entity detection model based on semantic prototype; wherein the semantic prototype-based named entity detection model includes a semantic prototype generation unit, a prototype-guided context annotation unit and a cross-prototype example inference unit.
[0031] The semantic prototype generation unit is used to generate an entity type prototype description and a corresponding trigger word set in a government data environment; the prototype-guided context annotation unit is used to perform entity annotation on the unstructured government data to be identified based on the entity type prototype description and the corresponding trigger word set in the government data environment to obtain an entity annotation result; the cross-prototype example inference unit is used to infer the unstructured government data to be identified based on the entity annotation result to obtain an entity recognition result of the government data to be identified.
[0032] The new entity type recognition unit adopts the TadNER model, that is, the TadNER model is used to perform small sample named entity recognition on the unstructured government data to be identified, and the entity recognition result of the government data to be identified is obtained; specifically, the TadNER model is used as a two-stage prototype network for small sample named entity recognition, and the framework of the TadNER model includes a type-aware exaggeration transition strategy and a type-aware contrast learning strategy; among them, the type-aware span filtering strategy is to filter out erroneous spans by deleting spans that are semantically far away from the type name, which helps to reduce over-detected erroneous spans and improve the accuracy of recognition; the type-aware contrast learning strategy is to construct a more accurate and stable prototype by jointly utilizing supporting samples and type names as references, aiming to solve the problems of inaccurate and unstable prototypes in the prototype network, and make the prototype more stable through contrast learning, thereby improving the accuracy of type classification.
[0033] The workflow of the TadNER model is as follows: first, a contextual representation is generated for the input text data, and then the probability of each character or word belonging to a certain entity is obtained through the classification layer, so as to detect possible entity spans; wherein the classification layer is composed of, for example, a dropout layer and a linear layer; then, a type-aware span filtering strategy is applied to delete spans that are semantically far away from the type name and reduce erroneous spans; then, supporting samples and type names are used as references to construct a more accurate and stable prototype through comparative learning; finally, according to the constructed prototype, the filtered spans are classified to determine the entity type.
[0034] This embodiment 1 also provides another implementation of the new entity type identification unit, specifically: the new entity type identification unit adopts an entity extensible model based on dynamic prototype self-update; wherein the entity extensible model based on dynamic prototype self-update includes a dynamic prototype self-update unit and a multi-signal fusion unit. The dynamic prototype self-update unit is used to dynamically update the entity type prototype description; the multi-signal fusion unit is used to perform entity matching based on the dynamically updated entity category prototype to obtain the entity recognition result of the government data to be identified.
[0035] The relationship extraction module adopts the R-BERT model, that is, the R-BERT model is used to extract entity relationships from the entity recognition results of the government data to be identified, so as to obtain the entity relationship extraction results of the government data to be identified.
[0036] This embodiment 1 also provides another implementation method of the relationship extraction module, specifically: the relationship extraction module adopts the R-BERT model or the relationship extraction model based on the relationship prototype; wherein the relationship extraction model based on the relationship prototype includes a relationship prototype construction unit and a triple discovery unit.
[0037] The relationship prototype construction unit is used to generate a relationship prototype set; the triple discovery unit is used to generate a relationship prediction result based on the relationship prototype set, that is, to obtain the entity relationship extraction result of the government data to be identified.
[0038] In this embodiment 1, unstructured government data to be identified is input into the BERT model; the BERT model generates a vector representation for each tag in the sequence; after extracting the entity tag vector from the feature representation output by the BERT model, the R-BERT model concatenates the entity tag vectors and performs relationship classification through a fully connected layer, thereby realizing the context information captured by BERT and the relationship information between entities.
[0039] Example description: When the government data to be identified is "The next day, the State Council issued a new policy aimed at promoting the development of small and medium-sized enterprises"; the government data to be identified is input into the pre-built government four-dimensional data model, and the entity recognition results and entity relationship extraction results are output; among them, the entity recognition results are "State Council (government agency entity)", "new policy (thing entity)" and "small and medium-sized enterprises (legal entity)"; the entity relationship extraction results are "government agency-thing relationship: State Council-issue-new policy", "new policy-legal person relationship: new policy-promote-small and medium-sized enterprise development".
[0040] The advantage of the pre-built government four-dimensional data model in the named entity recognition task is that it can clearly distinguish entities of different categories and ensure that each entity is accurately classified; for example, "State Council" is identified as a government agency entity, "new policy" is identified as a thing entity, and "small business" is identified as a legal entity; the advantage in the relationship extraction task is that it can accurately establish the relationship between entities and provide rich contextual information; for example, the model not only identifies the release relationship between the State Council and the new policy, but also identifies the relationship between the new policy and the promotion of the development of small and medium-sized enterprises.
[0041] It should be noted that in order to ensure that the pre-built government affairs four-dimensional data model meets the entity recognition and relationship extraction requirements in the government affairs field, the pre-built government affairs four-dimensional data model also has the characteristics of consistency, completeness, scalability and maintainability.
[0042] (1) Consistency In order to ensure the consistency characteristics of the pre-built government affairs four-data model, guarantees are provided from four aspects: data source, metadata, knowledge extraction model and algorithm. Specifically, the reliability of data source is the basis for ensuring the consistency of the government affairs four-data model. By aggregating government affairs data from various provincial governments, the on-demand collection and collection of government affairs data are realized. The collection, management, analysis and release of data all follow the predefined data management standards. Secondly, the standards for metadata standardization are defined, including the identifiable identifier, name, definition, data type, format, length, conformance and semantics of metadata, to ensure the consistency and accuracy of standardization. The original data is compared, mapped and converted, and then stored in a metadata standardized format. The consistency of the knowledge extraction model is also an important factor in ensuring the consistency of the government affairs four-data model. The government affairs four-data model is designed from a global perspective, and a unified model construction standard is formulated so that the subsequent supplementary models can be reused or perfectly compatible with the existing models, avoiding data isolation caused by different departments or data using different models. The consistency of the algorithm is the key to ensuring the accuracy of the calculation results of the government affairs four-data model. The consistency of the algorithm is ensured by determining the input and output specifications of the algorithm, designing appropriate algorithm parameters, and adopting typical computing environments.
[0043] (2) Completeness When designing the government affairs four-dimensional data model, it is necessary to ensure the completeness of the model, that is, to cover all data elements, entities, relationships and attributes involved in the government and government agencies, and avoid data omissions and incompleteness; to ensure completeness, it is necessary to conduct a comprehensive demand analysis, adopt multidimensional data modeling, organize and divide data elements according to the classification system, and establish a detailed data dictionary and metadata management system; in addition, the government affairs four-dimensional data model is regularly reviewed and audited; natural persons, legal persons, government agencies and things are the four key entities in government management and government affairs activities, covering all information on organizations, individuals and things in the government field; the government affairs four-dimensional data model is based on natural persons, legal persons, government agencies and things. Things are the core entities. By establishing a variety of entity relationships, the complex relationships and interactions between different entities are expressed, covering most application scenarios in the government field. For example, natural persons can serve as the main service objects of government management services and establish service relationships with government agencies; or natural persons, as customers, employees or investors of enterprises, establish personnel relationships and contractual relationships with legal entities. There are relationships such as business processing, house sales, supervision and investigation, and policy stakeholders between natural persons, legal persons, government agencies and things. In addition to natural persons, legal persons, government agencies and thing entities, the government knowledge quaternary data model can also include other entity types, which can be expanded and refined according to actual needs.
[0044] (3) Scalability The scalability of the government four-data model is one of its important characteristics, ensuring that the model can adapt to the growing and changing data needs; with the growth of data and the continuous changes in the business environment, the scalability of the government four-data model is crucial to meet the needs of governments and government agencies; domain-driven design is a design method with the domain as the core, which combines the concepts and rules of the domain with the model structure, and makes the model more adaptable to the needs of specific domains by understanding the characteristics and needs of the domain. Through domain-driven design, the government four-data model can better express the concepts and relationships of the domain, and improve the expressiveness and scalability of the model; for example: in terms of ecological environment, there can be natural resources such as forests, water sources and land entities, and environmental policies such as environmental protection policies and energy conservation and emission reduction policies. The above entities constitute the content of the ecological domain of the government four-data model.
[0045] Inheritance and polymorphism can achieve the sharing and reuse of entities and relationships, avoiding repeated definition of similar entities and relationships; at the same time, they support customized attributes and behaviors; for example, "Government Agency" is the parent class, and the child classes can be "Civil Affairs Department", "Finance Department", etc. The child classes can inherit the common attributes and relationships of the parent class, and can define their own unique attributes and relationships; in the definition of attributes and relationships, polymorphism is supported through generic or polymorphic types. When defining attributes and relationships, generics can be used to indicate that different types of values can be accepted; therefore, an attribute or relationship can have polymorphism between different entities; for example, defining an "owner" attribute can accept various types of entities as values, such as "government agency" and "enterprise".
[0046] Secondly, by reserving extension fields, the government four-data model can accommodate new data elements, entities, relationships, and attributes; the reserved extension fields are used to accept additional custom attributes and relationships. When new attributes or relationships need to be added, the extension fields can be used directly without affecting the existing attribute and relationship definitions; in addition, the extensibility of the government four-data model can be achieved through dynamic attribute tables. An attribute table is defined for each entity, and attributes and attribute types are dynamically added to the attribute table as needed; finally, standardizing the data model, associating attributes and relationships, entities and attributes, etc. are also important methods for the government four-data model to achieve extensibility. By standardizing the data model, data redundancy can be reduced and data utilization can be improved; by associating attributes and relationships, attributes and relationships can be associated with entities, avoiding the storage of the same attributes and relationships in multiple entities.
[0047] (4) Maintainability The maintenance of the government four-data model is a key link to ensure its accuracy and real-time performance. In order to achieve high maintainability, the government four-data model adopts an automated mechanism. Through automated data collection, identification, extraction and reasoning operations, it reduces the need for manual intervention and improves the efficiency and accuracy of maintenance. The government four-data model relies on multiple data sources, which may come from different government departments, external agencies or third-party data providers; in order to ensure the real-time and accuracy of the data, an automated data collection mechanism is introduced; the automated data collection mechanism can obtain the latest data from different data sources regularly or in real time to ensure that the government four-data model is always synchronized with the actual data; once the external data source changes, the model needs to automatically identify the changes and update accordingly; by monitoring the data's timestamp, version number or using incremental data updates, the model can detect newly added, modified or deleted data items; by writing scripts, using the graph database's API or other automation tools, automated workflows and rules can be established. Then, the government affairs four-dimensional data model is regularly maintained and updated; once a change is detected, the automated process will trigger an update operation, automatically synchronizing related entities, relationships, and attributes to ensure real-time updating of the model; as government affairs data is updated, data quality and consistency are ensured through data cleaning and preprocessing, and noise and errors in the data are automatically processed as well as conflicts or inconsistencies between data are processed; natural language processing and information extraction technology are used to automatically identify and extract new entities and relationships and add them to the graph database; based on the new government affairs data, knowledge reasoning and supplementation are performed to enrich and improve the knowledge government affairs four-dimensional data model; reasoning engines and rule-based methods are used to automatically derive new entity relationships or supplement missing knowledge.
[0048] Verification experiment In this embodiment 1, named entity recognition, relationship extraction and small sample named entity recognition are verified; wherein, named entity recognition experiments are performed on the CLUENER2020 dataset, the CLUENER2020 (6500) dataset and the GovAff dataset respectively; the results of the named entity recognition experiment are shown in Table 1 below, where average in Table 1 represents the Micro-F1 average of the four categories; relationship extraction experiments are performed on the DuIE dataset and the Joint dataset respectively; the results of the relationship extraction experiment are shown in Table 2 below; small sample named entity recognition experiments are performed on the CLUENER2020 (6500) dataset and the GovAff dataset; wherein, the category used for expansion is company, and the category used for training is all categories other than company in the dataset; the experiment adopts the form of 1-way3-shot, and uses sentences containing the company category in the GovAff dataset to construct support set and query set pairs; wherein the content of the support set is the same, while the content of the query set is different; a small sample named entity recognition experiment is performed on each support set and query set pair, and the experimental results are shown in Table 3.
[0049] Table 1 Micro-F1 values for named entity recognition on different datasets
[0050] Table 2 Relation extraction results on different datasets
[0051] Table 3 Small sample named entity recognition results
[0052] It can be seen from Tables 1-3 above that by analyzing the results of named entity recognition, relationship extraction and small sample named entity recognition experiments, it is shown that the government affairs four-element data model is effective and scalable; specifically, it can be seen from Table 1 that the models trained on the CLUENER2020 dataset, CLUENER2020(6500) dataset and GovAff dataset have good named entity recognition capabilities; it can be seen from Table 2 that the models trained on the DuIE and Joint datasets have good relationship extraction capabilities and can realize the extraction of the relationship between the four elements of the government affairs four-element data model; it can be seen from Table 6 that whether it is in the CLUENER2020(6500) dataset Whether it is the model trained in the source domain or on the GovAff dataset, they can well realize the recognition of extended categories; however, it can be found that the model trained on the GovAff dataset is better than the model trained on the CLUENER2020 (6500) dataset. The main reason is that the support set and query set pairs used in the experiment are from the GovAff dataset, and their semantic information is closer; because the government affairs four-dimensional data model is mainly used in the government affairs field, and the data in the GovAff dataset are all government affairs data; therefore, the support set and query set pairs used in the experiment are consistent with the actual situation, which also shows that the GovAff dataset is effective for the application of the government affairs four-dimensional data model in the government affairs field.
[0053] In this embodiment 1, the pre-constructed government affairs four-data model can integrate massive amounts of government affairs data into a structured knowledge base, which can significantly improve the searchability and accessibility of information, allowing users to obtain the required information more conveniently; secondly, by analyzing the user's historical behavior such as handling documents, it can provide users with intelligent recommendation services, such as personalized government affairs information, policy documents, and application procedures, which not only improves the user experience, but also further improves the accuracy and efficiency of government services; in addition, through the correlation analysis of policy documents, regulations, statistical data, etc., the model can reveal the correlation and influence between policies, provide a scientific basis for policy formulation and decision-making, help reduce the blindness of decision-making, and improve the scientificity and accuracy of policy formulation; secondly, in terms of public safety and social governance, the government affairs four-data model also plays an important role. It can integrate information from multiple sources such as public safety data. The model can monitor the development trend of social events in real time, provide risk warnings and decision-making support for the government and relevant departments, and help improve the refinement and intelligence of social governance.
[0054] Example 2 As attached Figure 3 As shown, this embodiment 2 provides a government data knowledge extraction system based on the government data quaternary model, including a data acquisition module and a knowledge extraction module.
[0055] The data acquisition module is used to obtain the government data to be identified.
[0056] The knowledge extraction module is used to input the government data to be identified into a pre-built government data quaternary model, and output the knowledge extraction result of the government data to be identified.
[0057] Among them, the knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-constructed government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; the data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity recognition module is used to perform entity type recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity recognition results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0058] Example 3 As attached Figure 4 As shown, this embodiment 3 provides a government data knowledge extraction device based on the government data quaternary data model, including: a memory for storing a computer program; a processor for implementing the steps of the government data knowledge extraction method based on the government data quaternary data model when executing the computer program.
[0059] When the processor executes the computer program, the steps of the government data knowledge extraction method based on the government data quaternary data model are implemented, for example: Acquire government data to be identified; input the government data to be identified into a pre-constructed government four-data model, and output a knowledge extraction result of the government data to be identified; wherein the knowledge extraction result of the government data to be identified includes an entity recognition result and an entity relationship extraction result; the pre-constructed government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; the data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity recognition module is used to perform entity type recognition on the unstructured government data to be identified to obtain an entity recognition result of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity recognition result of the government data to be identified to obtain an entity relationship extraction result of the government data to be identified.
[0060] Alternatively, when the processor executes the computer program, the functions of each module in the government data knowledge extraction system based on the government data quaternary data model are realized, for example: The data acquisition module is used to acquire the government data to be identified. The knowledge extraction module is used to input the government data to be identified into the pre-constructed government four-data model, and output the knowledge extraction results of the government data to be identified. Among them, the knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-constructed government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; the data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity recognition module is used to perform entity type recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity recognition results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0061] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing preset functions, and the instruction segments are used to describe the execution process of the computer program in the government data knowledge extraction device based on the government data quadruple data model.
[0062] For example, the computer program can be divided into a data acquisition module and a knowledge extraction module, and the specific functions of each module are as follows: a data acquisition module, used to acquire the government data to be identified. A knowledge extraction module, used to input the government data to be identified into a pre-constructed government four-data model, and output the knowledge extraction results of the government data to be identified. Among them, the knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-constructed government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; the data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity recognition module is used to perform entity type recognition on the unstructured government data to be identified to obtain entity recognition results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity recognition results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
[0063] The government data knowledge extraction device based on the government data quaternary data model can be a computing device such as a desktop computer, a notebook, a PDA, and a cloud server. The government data knowledge extraction device based on the government data quaternary data model may include, but is not limited to, a processor and a memory. Those skilled in the art can understand that the above is an example of a government data knowledge extraction device based on the government data quaternary data model, and does not constitute a limitation on the government data knowledge extraction device based on the government data quaternary data model. It may include more components than the above, or a combination of certain components, or different components. For example, the government data knowledge extraction device based on the government data quaternary data model may also include input and output devices, network access devices, buses, etc.
[0064] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The processor is the control center of the government data knowledge extraction device based on the government data quaternary data model, and uses various interfaces and lines to connect the various parts of the entire government data knowledge extraction device based on the government data quaternary data model.
[0065] The memory can be used to store the computer program and / or module, and the processor implements various functions of the government data knowledge extraction device based on the government data quadruple data model by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory.
[0066] The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (SmartMediaCard, SMC), a secure digital (SecureDigital, SD) card, a flash card (FlashCard), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.
[0067] Example 4 This embodiment 4 also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of the government data knowledge extraction method based on the government data quaternary data model; if the module / unit integrated in the government data knowledge extraction system based on the government data quaternary data model is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0068] Based on such understanding, the present invention implements all or part of the processes in the above-mentioned government data knowledge extraction method based on the government data quaternary data model, and can also be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned government data knowledge extraction method based on the government data quaternary data model can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or preset intermediate form, etc.
[0069] The computer-readable storage medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.
[0070] It should be noted that the content contained in the computer-readable storage medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable storage media do not include electrical carrier signals and telecommunication signals.
[0071] Example 5 This embodiment 5 provides a computer product, which computer program product includes a computer program, which is stored in a computer-readable storage medium; the processor of the government data knowledge extraction device based on the government data quaternary data model reads the computer program from the computer-readable storage medium, and the processor executes the computer program, so that the government data knowledge extraction device based on the government data quaternary data model can execute the government data knowledge extraction method based on the government data quaternary data model described in Embodiment 1, which will not be repeated here.
[0072] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program. The program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.
[0073] The government data knowledge extraction method based on the government data four-data model described in the present invention extracts the four elements of natural persons, legal persons, government agencies and things from massive government data through the government data four-data model and constructs their relationships, thereby converting complex and diverse government data into a unified standard form; it explains the principles and methods that should be followed in the construction of the government data four-data model from the four aspects of consistency, completeness and maintainability, laying the foundation for the development of the government data four-data model and its application in the construction of digital government.
[0074] The above embodiment is only one of the implementation methods that can realize the technical solution of the present invention. The scope of protection claimed by the present invention is not limited only to this embodiment, but also includes changes, replacements and other implementation methods that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed by the present invention.
Claims
1. A method for extracting government data knowledge based on the government quaternary data model, characterized in that: include: Obtain government data to be identified; Inputting the government data to be identified into a pre-built government data quaternary data model, and outputting a knowledge extraction result of the government data to be identified; The knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-built government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; The data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity identification module is used to perform entity type identification on the unstructured government data to be identified to obtain entity identification results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity identification results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
2. According to claim 1, a method for extracting government data knowledge based on a government quaternary data model is characterized in that: The data types of the government data to be identified include structured data, semi-structured data and unstructured data.
3. According to claim 1, a method for extracting government data knowledge based on a government quaternary data model is characterized in that: The entity recognition module includes a predefined named entity type recognition unit and a new entity type recognition unit; the predefined named entity type recognition unit is used to perform named entity recognition on the unstructured government data to be recognized, and obtain entity recognition results of the government data to be recognized; the new entity type recognition unit is used to perform small sample named entity recognition on the unstructured government data to be recognized, and obtain entity recognition results of the government data to be recognized.
4. According to claim 3, a method for extracting government data knowledge based on a government quaternary data model is characterized in that: The predefined named entity type recognition unit adopts a BERT+CRF model, or a named entity detection model based on semantic prototypes; The semantic prototype-based named entity detection model includes a semantic prototype generation unit, a prototype-guided context annotation unit, and a cross-prototype example inference unit; The semantic prototype generation unit is used to generate entity type prototype descriptions and corresponding trigger word sets in the government data environment; The prototype-guided context annotation unit is used to perform entity annotation on the unstructured government data to be identified according to the entity type prototype description and the corresponding trigger word set in the government data environment to obtain the entity annotation result; The cross-prototype example inference unit is used to infer the unstructured government data to be identified based on the entity labeling result to obtain the entity recognition result of the government data to be identified.
5. According to claim 3, a method for extracting government data knowledge based on a government quaternary data model is characterized in that: The new entity type recognition unit adopts the TadNER model, or adopts an entity scalable model based on dynamic prototype self-update; wherein the entity scalable model based on dynamic prototype self-update includes a dynamic prototype self-update unit and a multi-signal fusion unit; The dynamic prototype self-updating unit is used to dynamically update the entity type prototype description; The multi-signal fusion unit is used to perform entity matching based on the dynamically updated entity category prototype to obtain the entity recognition result of the government data to be recognized.
6. The method for extracting government data knowledge based on the government quaternary data model according to claim 1 is characterized in that: The relation extraction module adopts the R-BERT model, or adopts a relation extraction model based on relation prototype; Wherein, the relation extraction model based on relation prototype includes a relation prototype construction unit and a triple discovery unit; The relationship prototype construction unit is used to generate a relationship prototype set; The triple discovery unit is used to generate relationship prediction results based on the relationship prototype set, that is, to obtain the entity relationship extraction results of the government data to be identified.
7. A government data knowledge extraction system based on the government quaternary data model, characterized in that: include: A data acquisition module, used to acquire government data to be identified; A knowledge extraction module, used for inputting the government data to be identified into a pre-built government quaternary data model, and outputting a knowledge extraction result of the government data to be identified; The knowledge extraction results of the government data to be identified include entity recognition results and entity relationship extraction results; the pre-built government four-data model includes a data preprocessing module, an entity recognition module and a relationship extraction module; The data preprocessing module is used to perform data cleaning and data type conversion on the government data to be identified to obtain unstructured government data to be identified; the entity identification module is used to perform entity type identification on the unstructured government data to be identified to obtain entity identification results of the government data to be identified; the relationship extraction module is used to perform entity relationship extraction on the entity identification results of the government data to be identified to obtain entity relationship extraction results of the government data to be identified.
8. A government data knowledge extraction device based on the government quaternary data model, characterized in that: include: a processor suitable for executing a computer program; A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by the processor, the government data knowledge extraction method based on the government data quaternary data model as described in any one of claims 1 to 6 is executed.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the government data knowledge extraction method based on the government data quaternary data model as described in any one of claims 1 to 6.
10. A computer program product, characterized in that The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the government data knowledge extraction method based on the government data quaternary data model as described in any one of claims 1 to 6.