A knowledge base construction method and system for population data mining

By building a knowledge graph, combining a large language model and a Transformer model, the problem of the limitations of population big data mining methods in the existing technology that cannot break through data characteristics is solved, and higher-dimensional analysis and more accurate results are achieved.

CN118797080BActive Publication Date: 2024-11-22SICHUAN SANHELITONG TECH DEV GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411275599.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-11-22
Estimated Expiration
2044-09-12

AI Technical Summary

Technical Problem

The existing population big data mining methods can only be analyzed through the characteristics of the data, and cannot break through the constraints of the characteristics of the data, and cannot obtain analysis results from other dimensions, such as the reasons for purchasing a certain type of product.

Method used

By obtaining the data sets associated with the population data mining task, entity recognition and type setting are performed, large language models are called to generate entity mining data, using the Transformer model to encode and perform syntactic dependency analysis, building a knowledge graph, and forming a knowledge base to obtain more Detailed and comprehensive information.

Benefits of technology

A higher dimensional analysis of population data is realized, the complexity of the knowledge graph is reduced, the ambiguity is reduced, and a more compact and clear dependency tree is built, providing more accurate and comprehensive analysis results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118797080B_ABST
    Figure CN118797080B_ABST
Patent Text Reader

Abstract

The present invention relates to a knowledge base construction method and system for population data mining, belonging to the field of data processing technology, the method comprising: obtaining a data set; constructing a knowledge graph corresponding to each data, including: performing entity recognition on the content in the data, generating entity mining data corresponding to each entity based on multiple mining questions corresponding to each entity and each entity type and the answer results of a large language model; encoding the entity mining data; performing syntactic dependency analysis on the encoding results with entity overlap to obtain the knowledge graph corresponding to the data; storing the knowledge graph corresponding to each data to construct a knowledge base; wherein, after the knowledge base is called, it is used to output the data analysis results corresponding to the population data mining task. By adopting the method of the present application, more detailed and comprehensive information corresponding to the entity in the data can be mined, thereby assisting the population data mining task and obtaining a higher-dimensional analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a knowledge base construction method and system for population data mining. Background Art

[0002] With the rapid development of information technology, the amount of data has exploded, especially the collection and processing of population data has become an important basis for research and decision-making. Through in-depth mining and analysis of population big data, the laws and trends in population structure, migration patterns, health status, consumer behavior, etc. can be revealed, which can provide strong support for formulating scientific and reasonable population measures, optimizing public resource allocation, and improving governance capabilities. In addition, the widespread application of population big data has also provided rich materials for academic research, which is conducive to promoting research progress in the fields of social sciences, economics, and public health. Building a systematic and intelligent knowledge system can effectively integrate and analyze massive population data, which not only improves the efficiency of data utilization, but also promotes the sharing and coordination of data resources, and improves the scientificity and accuracy of decision-making. At the same time, it can also provide important references for corporate market analysis, product positioning and service innovation.

[0003] However, the existing population big data mining methods only analyze the characteristics of the acquired population data itself, which has certain limitations. The data attributes obtained by analysis cannot break through the constraints of the data characteristics themselves. For example, when analyzing the consumption characteristics of a region in a certain quarter through economic data, the existing methods can only mine the results within the scope of the economic data itself (such as the level of consumption, the proportion of purchases of various commodities, the proportion of expenditures to income, etc.), and cannot obtain analysis results of other dimensions (such as the reasons for purchasing a certain type of commodity, etc.). Summary of the invention

[0004] In order to solve the above-mentioned problems in the prior art, the present invention provides a method and system for constructing a knowledge base for population data mining.

[0005] In a first aspect, an embodiment of the present application provides a method for constructing a knowledge base for population data mining, comprising: obtaining a data set; wherein the data in the data set is associated with a population data mining task; constructing a knowledge graph corresponding to each data in the data set; for any data in the data set, comprising: performing entity recognition on the content in the data to determine the entity type of each entity; calling multiple mining questions corresponding to each entity type; generating entity mining data corresponding to each entity based on each entity, multiple mining questions corresponding to each entity type, and the answer results of a large language model; encoding the entity mining data using a Transformer model to generate an encoding result; performing syntactic dependency analysis on the encoding results in which entities overlap, and connecting the overlapping entities based on the syntactic dependency analysis results to obtain a knowledge graph corresponding to the data; wherein the nodes in the knowledge graph corresponding to the data are entities, and the values ​​of the nodes are the encoding results corresponding to the entity mining data of the entity; the nodes in which entities overlap are connected to each other; the knowledge graph corresponding to each data is stored to form a knowledge base; wherein, after the knowledge base is called, it is used to output data analysis results corresponding to the population data mining task.

[0006] Optionally, the using of the Transformer model to encode the entity mining data to generate an encoding result includes: using the Transformer model to encode the entity mining data, retaining the encoding data corresponding to the preset entity in the encoding process, and obtaining the encoding result; wherein the preset entity is an entity whose type is a person's name and / or an organization, and the preset entity is an entity whose position is within a previously preset range.

[0007] Optionally, the front preset range is any range in the first 1 / 2.

[0008] Optionally, the syntactic dependency analysis of the encoding results with entity overlap includes: connecting the context vector of the overlapping entity i and its own embedding value to obtain first label data; passing the first label data into a bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into a multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity i; connecting the context vector of the overlapping entity j and its own embedding value to obtain second label data; passing the second label data into the bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into the multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity j; based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j, determine the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j.

[0009] Optionally, the method of determining the syntactic dependency analysis result of the overlapping entity i and the overlapping entity j based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j includes: determining the prior dependency score of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; determining the posterior dependency score of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; and taking the highest one of the prior scores of the overlapping entity i and the overlapping entity j and the posterior dependency scores of the overlapping entity i and the overlapping entity j as the syntactic dependency analysis result of the overlapping entity i and the overlapping entity j.

[0010] Optionally, obtaining the data set includes: obtaining first data using a web crawler, a public data interface and / or an online questionnaire; wherein the type of the first data includes: at least one of news data, report data, questionnaire data, transaction data, email data, and social data; preprocessing the first data to construct the data set; wherein the preprocessing includes at least one of data cleaning, standardization, and data deduplication.

[0011] Optionally, the first data is classified and stored in json format; wherein the json format includes: a title and data content; the title is used to distinguish different data in the data set; the type of the first data is used for classified storage; the knowledge graph corresponding to each data is stored to form a knowledge base, including: based on the type of the first data, the knowledge graph corresponding to the first data is classified and stored.

[0012] Optionally, after the knowledge base is constructed, the method further includes: obtaining second data using a web crawler, a public data interface and / or an online questionnaire; wherein the type of the second data includes: at least one of news data, report data, questionnaire data, transaction data, email data, and social data; the generation time node of the second data is after the generation time node of the first data; preprocessing the second data, and updating the second data to the data set; obtaining the knowledge graph corresponding to the second data, and updating the knowledge graph corresponding to the second data to the knowledge base.

[0013] Optionally, the entity types include: objects, places, organizations, and names; the entity mining data corresponding to each entity is generated based on multiple mining questions corresponding to each entity and the answer results of the large language model, including: S1: inputting a mining question corresponding to the entity and the entity type of the entity into the large language model to obtain the answer result of the entity under the current mining question; repeating step S1 until the answer results of multiple mining questions corresponding to each entity are obtained, and then outputting the entity mining data corresponding to each entity.

[0014] In a second aspect, the present application provides a knowledge base construction system for population data mining, comprising: an acquisition module for acquiring a data set; wherein the data in the data set is associated with a population data mining task; a knowledge graph construction module for constructing a knowledge graph corresponding to each data in the data set; for any data in the data set, comprising: performing entity recognition on the content in the data to determine the entity type of each entity; calling multiple mining questions corresponding to each entity type; generating entity mining data corresponding to each entity based on each entity, multiple mining questions corresponding to each entity type and the answer results of a large language model; encoding the entity mining data using a Transformer model to generate an encoding result; performing syntactic dependency analysis on the encoding results with entity overlap, and connecting the overlapping entities based on the syntactic dependency analysis results to obtain a knowledge graph corresponding to the data; wherein the nodes in the knowledge graph corresponding to the data are entities, and the values ​​of the nodes are the encoding results corresponding to the entity mining data of the entity; the nodes with entity overlap are connected to each other; a knowledge base construction module for storing the knowledge graph corresponding to each data to construct a knowledge base; wherein, after the knowledge base is called, it is used to output the data analysis results corresponding to the population data mining task.

[0015] The beneficial effects of the present invention include:

[0016] The knowledge base construction method for population data mining provided by the present application, in the process of constructing the knowledge base, first, obtains data associated with the population data mining task to construct a data set, and then performs mining analysis on any task in the data set. The mining analysis process involves the identification of entities, through the mining problems corresponding to each entity type set, and in combination with the large language model to obtain the mining data associated with the entity, and through syntactic dependency analysis, the overlapping entities are connected to obtain the knowledge graph corresponding to the data. The knowledge graph contains more detailed and comprehensive information corresponding to the entities in the data, which is not limited to the data itself or the data surface. That is, for the same data, the method of the present application can be used to mine more detailed and comprehensive information corresponding to the entity in the data, and then can assist the population data mining task to obtain a higher dimensional analysis result. In addition, in the present application, by syntactic dependency analysis, connecting the overlapping entities can reduce the complexity of the knowledge graph and reduce ambiguity. By merging the overlapping entities, a more compact and clear dependency tree can be constructed, providing a more accurate and comprehensive analysis for the subsequent auxiliary population data mining tasks. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A flowchart of the steps of a method for constructing a knowledge base for population data mining provided by an embodiment of the present invention;

[0018] Figure 2 A flowchart of another method for constructing a knowledge base for population data mining provided by an embodiment of the present invention;

[0019] Figure 3 A module block diagram of a knowledge base construction method for population data mining provided by an embodiment of the present invention;

[0020] Figure 4 A module block diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0022] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0023] Existing population big data mining methods only analyze the characteristics of the acquired population data itself. This method has certain limitations. The data attributes obtained by analysis cannot break through the constraints of the data characteristics themselves. For example, when analyzing the consumption characteristics of a region in a certain quarter through economic data, the existing methods can only mine the results within the scope of the economic data itself (such as consumption levels, the proportion of purchases of various commodities, the proportion of expenditures to income, etc.), and cannot obtain analysis results of other dimensions (such as the reasons for purchasing a certain type of commodity, etc.).

[0024] In view of the above problems, the present application proposes the following embodiments to solve the above technical problems.

[0025] See also Figure 1 , an embodiment of the present application provides a knowledge base construction method for population data mining, including: steps 101 to 103.

[0026] Step 101: Get a data set.

[0027] Among them, the data in the dataset are associated with the population data mining task.

[0028] In terms of the data type in the data set, the data may be at least one of news data, report data, questionnaire data, transaction data, email data, and social data.

[0029] Step 102: Construct a knowledge graph corresponding to each data in the dataset.

[0030] See also Figure 2 , for any data in the data set, including: step 201 to step 205.

[0031] Step 201: Perform entity recognition on the content in the data to determine the entity type of each entity.

[0032] That is, a named entity recognition model can be used to perform entity recognition on the content in the data and determine the entity type of each entity.

[0033] In the embodiment of the present application, entity types may include objects, places, organizations, and names of people.

[0034] Step 202: Call multiple mining questions corresponding to each entity type.

[0035] In the embodiment of the present application, a plurality of mining questions corresponding to each entity type are preset.

[0036] For example, if the entity type is an item, the corresponding mining questions may include: (1) What is the price? (2) What is the function? (3) What are the applicable groups? (4) What is the brand?

[0037] If the entity type is a place, the corresponding mining questions may include: (1) What happened? (2) What special significance does this place have? (3) What other names does this place have?

[0038] If the entity type is organization, the corresponding mining questions may include: (1) What is the function of the organization? (2) What level does it belong to? (3) What is the special significance of the organization? (4) What does the organization do?

[0039] If the entity type is a person's name, the corresponding mining questions may include: (1) Is he a well-known person? (2) What kind of work does he do? (3) What major experiences does he have?

[0040] Step 203: Based on each entity, multiple mining questions corresponding to each entity type and the answer results of the large language model, entity mining data corresponding to each entity is generated.

[0041] After calling multiple mining questions corresponding to each entity type, the entity is input into the large language model as the object of the multiple mining questions, and the answer result is provided by the large language model.

[0042] The large language model may be, but is not limited to, GPT.

[0043] That is, the embodiment of the present application uses a large language model to complete the information of multiple mining questions of entities, and then obtains entity mining data corresponding to each entity.

[0044] As an implementation method, the answer results of the large language model can be analyzed and refined to obtain more refined answer data, so that the entity mining data corresponding to each entity finally obtained is refined data.

[0045] Step 204: Use the Transformer model to encode the entity mining data and generate an encoding result.

[0046] Specifically, after obtaining the entity mining data corresponding to each entity, the embodiment of the present application uses a Transformer model to encode the entity mining data, and then generates an encoding result.

[0047] It should be noted that the Transformer model is a deep learning architecture based on the self-attention mechanism, which can be applied to natural language processing tasks. It is used to map the features of the data into a high-dimensional space.

[0048] Step 205: Perform syntactic dependency analysis on the encoding results with overlapping entities, and connect the overlapping entities based on the syntactic dependency analysis results to obtain the knowledge graph corresponding to the data.

[0049] It should be noted that, for entities that overlap (i.e., encoding results that overlap entities), in the embodiments of the present application, syntactic dependency analysis is performed on the encoding results of the overlapping entities, and then the overlapping entities are connected using the dependency analysis results. The above-mentioned syntactic dependency analysis of the encoding results of the overlapping entities can be understood as analyzing the dependency relationship between the overlapping entities.

[0050] Finally, a knowledge graph corresponding to the data containing all entities can be obtained.

[0051] Among them, the node in the knowledge graph corresponding to the data is an entity, and the value of the node is the encoding result corresponding to the entity mining data of the entity; the nodes with overlapping entities are connected to each other.

[0052] It can be understood that the entities are connected to each other according to dependencies as the final result ( is essentially a tree). Then, For indexing, each entity is regarded as a node, and nodes with dependencies are connected to each other in the direction of The breadth traversal order of the node is the result of encoding the Transformer model in which it is located, and finally a knowledge graph is obtained.

[0053] Step 103: Store the knowledge graph corresponding to each data and construct a knowledge base.

[0054] Among them, after the knowledge base is called, it is used to output the data analysis results corresponding to the population data mining task.

[0055] Finally, the knowledge graph corresponding to each data in the data set is stored, and then a knowledge base is constructed. It should be noted that the knowledge base constructed in the embodiment of the present application is used to assist population data mining tasks.

[0056] The knowledge base construction method for population data mining provided by the embodiment of the present application, in the process of constructing the knowledge base, first, obtains data associated with the population data mining task to construct a data set, and then performs mining analysis on any task in the data set. The mining analysis process involves the identification of entities, through the mining problems corresponding to each entity type set, and in combination with the large language model to obtain the mining data associated with the entity, through syntactic dependency analysis, the overlapping entities are connected to obtain the knowledge graph corresponding to the data. The knowledge graph contains more detailed and comprehensive information corresponding to the entities in the data, which is not limited to the data itself or the data surface. That is, for the same data, using the method of the embodiment of the present application, it is possible to mine out more detailed and comprehensive information corresponding to the entity in the data, and then it is possible to assist the population data mining task and obtain a higher dimensional analysis result. In addition, in the embodiment of the present application, by syntactic dependency analysis, connecting the overlapping entities can reduce the complexity of the knowledge graph and reduce ambiguity. By merging the overlapping entities, a more compact and clear dependency tree can be constructed, and a more accurate and comprehensive analysis can be provided for the subsequent auxiliary population data mining tasks.

[0057] For example, the population data mining task is to analyze the consumption characteristics of a region in the last quarter. If the existing technology is used to mine the economic data itself, only the results within the scope of the economic data itself can be mined (such as the level of consumption, the proportion of purchases of various commodities, the proportion of expenditures to income, etc.). However, through the database provided by this application, more dimensional analysis results can be mined, such as the analysis of the reasons for purchasing a certain product. The source of the analysis can be derived from the results of multiple mining questions corresponding to the product, or the source of the analysis can be derived from the results of multiple mining questions corresponding to the product and the combination of the results of multiple mining questions corresponding to the places, organizations and names associated with the product.

[0058] Optionally, the above step of obtaining the data set includes: obtaining the first data by using a web crawler, a public data interface and / or an online questionnaire; and preprocessing the first data to construct the data set.

[0059] The type of the first data includes at least one of news data, report data, questionnaire data, transaction data, email data, and social data.

[0060] Among them, preprocessing includes at least one of data cleaning, standardization and data deduplication.

[0061] The web crawler may be configured to identify and capture specific types of content, such as the above-mentioned news data, report data, etc. Once the content is found, the information is extracted to obtain the first data.

[0062] The public data interface may be a public API (Application Programming Interface) interface.

[0063] That is, in the embodiments of the present application, different data acquisition methods can be used to more comprehensively construct a data set associated with the population data mining task by crawling or investigating.

[0064] Optionally, the first data is classified and stored in json format; wherein the json format includes: a title and data content; the title is used to distinguish different data in the data set; the first data type is used for classified storage; the knowledge graph corresponding to each data is stored to construct a knowledge base, including: based on the type of the first data, the knowledge graph corresponding to the first data is classified and stored.

[0065] It should be noted that the use of JSON format for classified storage has the advantages of readability, support for complex data structures, and good versatility.

[0066] In an embodiment of the present application, the storage format of the data includes: a form of a title plus data content. The title can be used to distinguish different data in the data set, so that when the data is subsequently processed, different data can be determined by identifying each title in turn. That is, after the first title is identified, the data corresponding to the first title is processed through steps 201 to 205 to realize the construction of a knowledge graph. After the second title is identified, the data corresponding to the second title is processed through steps 201 to 205 to realize the construction of a knowledge graph, and so on, until the construction of the knowledge graph of the data under all titles is completed.

[0067] The following is a specific example to illustrate the above data storage in JSON format:

[0068] The json format is as follows:

[0069] {"Title": Product A is available in City A, City B, City C and City D;

[0070] " Paragraph 1 ": {Product A is now officially available in stores in cities A, B, C, and D. Product A seamlessly integrates digital content with the physical world, bringing an amazing spatial experience that changes people's experience in work, collaboration, interconnection, recollection, and entertainment.}

[0071] " Paragraph 2": {Members of the development team celebrated the launch of Product A with the first customers in the above cities to explore this groundbreaking product and participate in a retail-exclusive guided demo experience. Customers can visit the online store to schedule a personal one-on-one demo to try Product A and explore the possibilities of spatial computing, from breakthrough entertainment experiences to an infinite canvas fully loaded with applications.}}

[0072] The above Title corresponds to the title, and Paragraph1 and Paragraph2 correspond to the data content.

[0073] In addition, when storing the knowledge graph, the first data may be classified and stored according to the type of the first data. In this way, the utilization efficiency of the data may be improved, and the management efficiency of the data may also be improved.

[0074] Optionally, the above steps use the Transformer model to encode the entity mining data and generate an encoding result, including: using the Transformer model to encode the entity mining data, retaining the encoding data corresponding to the preset entity in the encoding process, and obtaining the encoding result; wherein the preset entity is an entity whose type is a person's name and / or an organization, and the preset entity is an entity whose position is within a previously preset range.

[0075] It should be noted that since population data mining is more about analyzing people's behavior patterns, and entities with relatively high positions are likely to play a dominant role, the preset entities (names and / or organizations) in the encoding process can be retained, and the preset entities (names and / or organizations) are sequences whose positions are within the previous preset range (the sequence corresponds to the encoded entities). In this way, it is convenient to subsequently build a knowledge base that is more in line with population data mining, while reducing computing and data storage space.

[0076] Optionally, the front preset range is any range in the front 1 / 2.

[0077] For example, the front preset range can be specifically the front 1 / 3, the front 3 / 8, the front 5 / 12, and the front 1 / 2. When the preset range is 1 / 3, the preset entities (names and / or organizations) in the encoding process are retained, and the preset entities (names and / or organizations) are sequences located in the front 1 / 3.

[0078] Optionally, entity types include: objects, places, organizations, and names; based on each entity, multiple mining questions corresponding to each entity type, and the answer results of the large language model, entity mining data corresponding to each entity is generated, including: S1: inputting a mining question corresponding to the entity and the entity type of the entity into the large language model to obtain the answer result of the entity under the current mining question; repeating step S1 until the answer results of multiple mining questions corresponding to each entity are obtained, and then outputting the entity mining data corresponding to each entity.

[0079] That is, after performing named entity recognition on the data content, the entity set of multiple entities can be determined. , They all represent identified entities, and then the entity type of each entity is determined in turn. Next, the first mining question corresponding to the first entity and the entity type of the entity can be input into the large language model according to the text order of the data content to obtain the answer result of the entity under the first mining question. Then, the second mining question corresponding to the first entity and the entity type of the entity is input into the large language model to obtain the answer result of the entity under the second mining question. Repeat the above steps until the answer results of all mining questions corresponding to the first entity are obtained.

[0080] Then, the first mining question corresponding to the second entity and the entity type of the entity is input into the large language model to obtain the answer result of the entity under the first mining question. Then, the second entity and the second mining question corresponding to the entity type of the entity are input into the large language model to obtain the answer result of the entity under the second mining question. Repeat the above steps until the answer results of all mining questions corresponding to the second entity are obtained.

[0081] And so on, until the answers to multiple mining questions corresponding to each entity in the data are obtained, the entity mining data corresponding to each entity is output.

[0082] Optionally, the above steps perform syntactic dependency analysis on the encoding results with entity overlap, including: connecting the context vector of the overlapping entity i and its own embedding value to obtain first labeled data; passing the first labeled data into a bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into a multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity i; connecting the context vector of the overlapping entity j and its own embedding value to obtain second labeled data; passing the second labeled data into a bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into a multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity j; based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j, determine the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j.

[0083] The calculation formula of the first label data is:

[0084] ;

[0085] in, represents the first label data corresponding to the coincident entity i, The context vector representing the coincident entity i; Represents the embedded value of the overlapping entity i itself, which can be understood as the encoded overlapping entity i; It should be noted that the above formula is actually two connections, namely the previous vector + coincident entity i, and the following vector + coincident entity i. Similarly, the second label data corresponding to the coincident entity j can also refer to the calculation formula.

[0086] In one embodiment, the dependency set corresponding to the overlapping entity i may include: the posterior dependency set of the overlapping entity i and prior dependencies , and the posterior dependencies of the dependent words (extracted from the context) and prior dependencies .

[0087] Correspondingly, the output of the middle layer of the model is ; They correspond to the above four dependencies respectively.

[0088] Similarly, the dependency combinations corresponding to the overlapping entity j may also include the above four dependency relationships.

[0089] Optionally, the above steps determine the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j, including: determining the prior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency sets of the overlapping entity i and the overlapping entity j; determining the posterior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency sets of the overlapping entity i and the overlapping entity j; and taking the highest one of the prior scores of the overlapping entity i and the overlapping entity j and the posterior dependency scores of the overlapping entity i and the overlapping entity j as the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j.

[0090] That is, here, the dependency relationship is double-transformed to determine the prior dependency score and the posterior dependency score of the overlapping entity i and the overlapping entity j. The reference formula is as follows:

[0091] ;

[0092] ;

[0093] in, represents the prior dependency score between entity i and entity j, represents the posterior dependency relationship of the corresponding dependent word of entity j, represents a high-order tensor, and Both represent bias, represents the transpose of the prior dependencies of entity i, represents the posterior dependency score of entity i and entity j, represents the prior dependency relationship of the dependent word corresponding to entity j, Represents the transpose of the posterior dependency corresponding to entity i.

[0094] Optionally, after constructing the knowledge base, the method further includes: acquiring second data by means of a web crawler, a public data interface and / or an online questionnaire; wherein the type of the second data includes: at least one of news data, report data, questionnaire data, transaction data, email data, and social data; the generation time node of the second data is after the generation time node of the first data; preprocessing the second data, and updating the second data to the data set; acquiring the knowledge graph corresponding to the second data, and updating the knowledge graph corresponding to the second data to the knowledge base.

[0095] That is, the embodiment of the present application also provides a method for updating the knowledge base, and after the knowledge base is constructed for the first time, the knowledge base can be updated at a certain interval, and the above certain period can be 24 hours, a week, a month, etc.

[0096] The specific updating method is still to first use the data interface disclosed by the web crawler and / or the online questionnaire to obtain new data (i.e., the second data); then, the knowledge graph is constructed for the new data using the knowledge graph construction method in the aforementioned embodiment, and finally the newly constructed knowledge graph is updated to the knowledge base to complete the update of the knowledge base.

[0097] It should be noted that, considering that population data is updated quickly and the amount of data changes greatly, new data is continuously acquired here and the construction of the knowledge base is completed. In this way, more accurate and timely population data mining assistance can be provided in the future.

[0098] Optionally, the method provided in the embodiment of the present application also includes: obtaining a population data mining task input by a user; performing named entity recognition on the population data mining task to obtain a task entity; matching the task entity with the data in the knowledge base to obtain a data analysis result corresponding to the population data mining task.

[0099] In summary, the knowledge base construction method for population data mining provided in the embodiment of the present application collects various types of data, uses a large language model combined with the generated prompts to analyze the data itself, obtains refined data of multiple entities, and then re-encodes it through Transformer and retains the names and organizations in the first third of the relative position to make the retained data more suitable for the population big data mining task. Then, it is determined whether there is overlap between the entities in the refined data. If there is overlap, further analysis is performed. Finally, a knowledge graph is obtained based on the syntactic dependency relationship to construct an index. The knowledge graph is constructed with entities as nodes and content as values, and is classified and stored to obtain a knowledge system for population big data mining.

[0100] See also Figure 3Based on the same inventive concept, the embodiment of the present application also provides a knowledge base construction system 30 for population data mining, including: an acquisition module 301, used to acquire a data set; wherein the data in the data set is associated with a population data mining task; a knowledge graph construction module 302, used to construct a knowledge graph corresponding to each data in the data set; for any data in the data set, including: performing entity recognition on the content in the data to determine the entity type of each entity; calling multiple mining questions corresponding to each entity type; based on each entity, the multiple mining questions corresponding to each entity type and the answer results of the large language model, generating a knowledge graph corresponding to each entity The method comprises the following steps: generating a knowledge graph for the data; encoding the entity mining data by using a Transformer model to generate an encoding result; performing syntactic dependency analysis on the encoding results with overlapping entities, and connecting the overlapping entities based on the syntactic dependency analysis results to obtain a knowledge graph corresponding to the data; wherein the nodes in the knowledge graph corresponding to the data are entities, and the values ​​of the nodes are the encoding results corresponding to the entity mining data of the entity; the nodes with overlapping entities are connected to each other; a knowledge base construction module 303 is used to store the knowledge graph corresponding to each data and construct a knowledge base; wherein, after the knowledge base is called, it is used to output data analysis results corresponding to the population data mining task.

[0101] See also Figure 4 Based on the same inventive concept, the present application embodiment provides a module frame of an electronic device 400 that applies the above method. The electronic device 400 includes: at least one processor 401 ( Figure 4 Only one is shown in the figure), a memory 402, a computer program 403 stored in the memory 402 and executable on at least one processor 401, and when the processor 401 executes the computer program 403, the steps of the method in any of the foregoing embodiments are implemented.

[0102] The electronic device 400 may be a server, a personal computer, a notebook computer, etc.

[0103] Those skilled in the art will understand that Figure 4 The electronic device 400 is merely an example and does not constitute a limitation on the electronic device 400 , and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.

[0104] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0105] In some embodiments, the memory 402 may be an internal storage unit of the electronic device 400, such as a hard disk or memory of the electronic device 400. In other embodiments, the memory 402 may also be an external storage device of the electronic device 400, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 400. Further, the memory 402 may also include both an internal storage unit of the electronic device 400 and an external storage device.

[0106] It should be noted that the above-mentioned systems, devices, etc. are based on the same concept as the method embodiments of the present application. The modules designed for the systems, the steps performed by the devices, and the technical effects brought about can all be found in the method embodiment section and will not be repeated here.

[0107] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0108] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0109] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0110] If the integrated unit 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. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. 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 some intermediate form. The computer-readable medium can at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0111] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0112] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0113] In the embodiments provided in the present application, it should be understood that the disclosed systems / devices and methods can be implemented in other ways. For example, the system / device embodiments described above are merely schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0115] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such 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 application, and should all be included in the protection scope of the present application.

Claims

1. A knowledge base construction method for population data mining, characterized in that: include: Acquire a data set, wherein data in the data set is associated with a population data mining task; Construct a knowledge graph corresponding to each data in the data set; for any data in the data set, include: performing entity recognition on the content of the data to determine the entity type of each entity; calling multiple mining questions corresponding to each entity type; generating entity mining data corresponding to each entity based on multiple mining questions corresponding to each entity and each entity type and the answer result of the large language model; encoding the entity mining data using a Transformer model to generate an encoding result; performing syntactic dependency analysis on the encoding results with overlapping entities, and connecting the overlapping entities based on the syntactic dependency analysis results to obtain the knowledge graph corresponding to the data; wherein the nodes in the knowledge graph corresponding to the data are entities, and the values ​​of the nodes are the encoding results corresponding to the entity mining data of the entity; the nodes with overlapping entities are connected to each other; the entity mining data represents the data generated by inputting the entity as the object of multiple mining questions into the large language model, and providing the answer result through the large language model; The knowledge graph corresponding to each data is stored to form a knowledge base; wherein, after the knowledge base is called, it is used to output the data analysis results corresponding to the population data mining task; Among them, the syntactic dependency analysis of the encoding results with entity overlap includes: connecting the context vector of the overlapping entity i and its own embedding value to obtain first label data; passing the first label data into a bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into a multi-layer perceptron to obtain the dependency relationship set corresponding to the overlapping entity i; connecting the context vector of the overlapping entity j and its own embedding value to obtain second label data; passing the second label data into the bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; inputting the output result into the multi-layer perceptron to obtain the dependency relationship set corresponding to the overlapping entity j; based on the dependency relationship set corresponding to the overlapping entity i and the dependency relationship set corresponding to the overlapping entity j, determine the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j; The method of determining the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j includes: determining the prior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; determining the posterior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; and taking the highest one of the prior dependency scores of the overlapping entity i and the overlapping entity j and the posterior dependency scores of the overlapping entity i and the overlapping entity j as the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j.

2. The method for constructing a knowledge base for population data mining according to claim 1, characterized in that: The adopting of the Transformer model to encode the entity mining data to generate an encoding result includes: The entity mining data is encoded using a Transformer model, and the encoded data corresponding to the preset entity in the encoding process is retained to obtain an encoding result; The preset entity is an entity whose entity type is a person's name and / or an organization, and the preset entity is an entity whose location is within a preset range.

3. The method for constructing a knowledge base for population data mining according to claim 2, characterized in that: The front preset range is any range in the front 1 / 2.

4. The method for constructing a knowledge base for population data mining according to claim 1, characterized in that: The acquiring of the data set comprises: Acquire the first data by using a web crawler, a public data interface and / or an online questionnaire; wherein the type of the first data includes: at least one of news data, report data, questionnaire data, transaction data, email data, and social data; Preprocessing the first data to construct the data set; The preprocessing includes at least one of data cleaning, standardization and data deduplication.

5. The method for constructing a knowledge base for population data mining according to claim 4, characterized in that: The first data is classified and stored in json format; The json format includes: a title and data content; the title is used to distinguish different data in the data set; the type of the first data is used for classification and storage; The storing of the knowledge graph corresponding to each data to form a knowledge base includes: classifying and storing the knowledge graph corresponding to the first data based on the type of the first data.

6. The method for constructing a knowledge base for population data mining according to claim 4, characterized in that: After the knowledge base is constructed, the method further comprises: The second data is acquired by using a web crawler, a public data interface and / or an online questionnaire; wherein the type of the second data includes at least one of news data, report data, questionnaire data, transaction data, email data, and social data; and the generation time of the second data is after the generation time of the first data; preprocessing the second data, and updating the second data to the data set; Obtain the knowledge graph corresponding to the second data, and update the knowledge graph corresponding to the second data to the knowledge base.

7. The method for constructing a knowledge base for population data mining according to claim 1, characterized in that: The entity types include: objects, places, organizations, and names of people; The generating entity mining data corresponding to each entity based on multiple mining questions corresponding to each entity type and the answer result of the large language model includes: S1: Input an entity and a mining question corresponding to the entity type of the entity into the large language model to obtain an answer result of the entity under the current mining question; Repeat step S1 until the answer results of multiple mining questions corresponding to each entity are obtained, and then output the entity mining data corresponding to each entity.

8. A knowledge base construction system for population data mining, characterized in that: include: An acquisition module, used to acquire a data set; wherein the data in the data set is associated with a population data mining task; A knowledge graph construction module is used to construct a knowledge graph corresponding to each data in the data set; for any data in the data set, it includes: performing entity recognition on the content of the data to determine the entity type of each entity; calling multiple mining questions corresponding to each entity type; generating entity mining data corresponding to each entity based on each entity, multiple mining questions corresponding to each entity type and the answer results of the large language model; encoding the entity mining data using a Transformer model to generate an encoding result; performing syntactic dependency analysis on the encoding results with overlapping entities, and connecting the overlapping entities based on the syntactic dependency analysis results to obtain the knowledge graph corresponding to the data; wherein the nodes in the knowledge graph corresponding to the data are entities, and the values ​​of the nodes are the encoding results corresponding to the entity mining data of the entity; the nodes with overlapping entities are connected to each other; the entity mining data represents the data generated by inputting the entity as the object of multiple mining questions into the large language model, and providing the answer results through the large language model; A knowledge base construction module is used to store the knowledge graph corresponding to each data to construct a knowledge base; wherein, after the knowledge base is called, it is used to output the data analysis results corresponding to the population data mining task; Among them, the knowledge graph construction module is also specifically used to connect the context vector of the overlapping entity i and its own embedding value to obtain the first labeled data; pass the first labeled data into the bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; input the output result into the multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity i; connect the context vector of the overlapping entity j and its own embedding value to obtain the second labeled data; pass the second labeled data into the bidirectional long short-term memory network model to obtain the output result of the middle layer of the model; input the output result into the multi-layer perceptron to obtain the dependency set corresponding to the overlapping entity j; based on the dependency set corresponding to the overlapping entity i and the dependency set corresponding to the overlapping entity j, determine the syntactic dependency analysis results of the overlapping entity i and the overlapping entity j; The knowledge graph construction module is also specifically used to determine the prior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; determine the posterior dependency scores of the overlapping entity i and the overlapping entity j based on the dependency set of the overlapping entity i and the overlapping entity j; and use the highest one of the prior dependency scores of the overlapping entity i and the overlapping entity j and the posterior dependency scores of the overlapping entity i and the overlapping entity j as the syntactic dependency analysis result of the overlapping entity i and the overlapping entity j.