A knowledge base management system based on large model
By building a knowledge base management system based on a large model, the problem of complex data organization in the social security field has been solved, real-time data updates and efficient queries have been achieved, and the accuracy and efficiency of social security information management have been improved.
Patent Information
- Application Number
- CN202510118526.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-01-24
AI Technical Summary
The data organization in the social security field is complex, and the existing system is difficult to synchronize the latest policy information in real time, resulting in difficulties in information sharing and low management efficiency.
A knowledge base management system is built through a large model, including data collection, processing, construction and verification modules. Social security data is collected in real time using the API interface, data cleaning and classification are performed, social security ontology graphs and knowledge graphs are constructed, and model parameters are adjusted through user feedback to improve query accuracy.
It realizes the real-time updating and efficient management of social security data, improves the data availability and query efficiency, and ensures the accuracy of query results and the stability of the system.
Smart Images

Figure CN119558397B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge base management, and in particular to a knowledge base management system based on a large model. Background Art
[0002] The field of social insurance has a vast literature and complex organizational management. As an important part of the social security system, social insurance is closely related to everyone's life. With the development of the Internet, people are paying more and more attention to social insurance. How to quickly obtain social insurance knowledge in the complex ocean of data has become an urgent problem that people need to solve.
[0003] Chinese patent document with publication number CN118917390A discloses a service knowledge base management system and method based on a knowledge big model. It monitors and preprocesses the operating status data of the knowledge base system in real time, uses a decision tree algorithm to extract features and identify key performance indicators, comprehensively analyzes abnormal changes and fluctuations in the knowledge base hit rate and update frequency, accurately evaluates the system operation stability, and classifies the system status according to the evaluation results; monitors the performance and response effect of the knowledge big model when the system is unstable, and uses fuzzy logic to quantify its impact on user experience, so as to take targeted optimization management measures; it can be seen that the existing social security management system generally has the following problems: social security policies are frequently updated, but the existing system is difficult to synchronize the latest policy information in real time, which makes it difficult for users and handling personnel to obtain the latest policy information; social security policies and processes vary greatly from place to place, and there is a lack of unified knowledge base support, which makes information sharing difficult. Summary of the Invention
[0004] To this end, the present invention provides a knowledge base management system based on a large model to overcome the problem in the prior art that due to the complex organization and management of social security data, the system is difficult to update data in a timely and effective manner, resulting in low knowledge base management efficiency.
[0005] To achieve the above objectives, the present invention provides a knowledge base management system based on a large model, comprising:
[0006] The data collection module collects real-time data from various social security data sources through the API interface to obtain original social security data;
[0007] a data processing module connected to the data acquisition module, configured to classify the raw social security data into first-category social security data and second-category social security data, and to clean the first-category social security data to obtain target social security data;
[0008] Among them, the first type of social security data is structured data and semi-structured data, and the second type of social security data is unstructured data;
[0009] A knowledge base construction module, which is connected to the data processing module, uses a large model to analyze the target social security data to extract entity terms, and combines it with a relationship extraction model to obtain a social security ontology graph, thereby constructing a knowledge graph;
[0010] A verification module, which is connected to the knowledge base construction module and is used to verify the knowledge graph and adjust the model setting parameters or data processing flow according to the verification results;
[0011] Among them, the process of adjusting the data processing flow is to store the query keywords in the social security database for storage; the model setting parameter is the batch size of the model training.
[0012] Furthermore, the data processing module includes a data cleaning unit and a data classification unit, wherein:
[0013] The data cleaning unit is used to scan and detect the type of social security data to obtain target social security data;
[0014] The data classification unit is used to analyze the types of the original social security data to obtain type I social security data and type II social security data.
[0015] Furthermore, the data cleaning unit includes a scanning subunit, a matching subunit and a detection subunit, wherein:
[0016] The scanning subunit is used to scan the social security data of the first type to obtain a detection text segment;
[0017] The matching subunit is used to extract entity keywords from the detection text segment and match them in the social security database, and determine the entity to be detected based on the matching results;
[0018] The detection subunit is used to continuously scan the entity to be detected to obtain an extended text segment, perform matching detection on the entity to be detected according to the entity to be detected, and determine whether to delete the extended text segment based on the result of the matching detection to obtain target social security data.
[0019] Furthermore, the continuous scanning includes taking the character length of the entity to be detected as the detection length, taking the next adjacent character of the entity to be detected as the starting node, and scanning the type of social security data with the detection length to obtain an extended text segment.
[0020] Furthermore, the knowledge base construction module includes a data extraction unit, an ontology construction unit and a knowledge graph construction unit, wherein:
[0021] The data extraction unit is used to extract text data from the second type of social security data to obtain target social security data;
[0022] The ontology construction unit is used to perform entity recognition and relationship extraction on the target social security data to obtain a social security ontology graph;
[0023] The knowledge graph construction unit is used to store the social security ontology graph as a knowledge graph using a graph database.
[0024] Furthermore, the ontology construction unit includes a word segmentation subunit and a construction subunit, wherein:
[0025] The word segmentation subunit divides the target social security data into a plurality of sentences to be processed using a period as an identifier, and performs word segmentation processing on each of the sentences to be processed to obtain a plurality of entity words;
[0026] The construction subunit is used to form a social security ontology graph based on entity words and relationship extraction models.
[0027] Furthermore, the verification module includes a recording unit, a calculation unit, a determination unit, and an adjustment unit, wherein:
[0028] The recording unit is used to record user query data, wherein the user query data includes query keywords, timestamps and query results;
[0029] The calculation unit is used to calculate the actual effective query rate based on the query result;
[0030] The actual effective query rate is the percentage of effective keywords to the total number of keywords after word segmentation;
[0031] The determination unit is used to determine the actual effective query rate according to the standard effective query rate to determine whether the quality of the constructed knowledge graph meets the standard;
[0032] The adjustment unit is used to adjust the model setting parameters or the data processing flow based on the historical query frequency of any query keyword.
[0033] Furthermore, the adjustment unit includes a first adjustment unit and a second adjustment unit, wherein:
[0034] The first adjustment unit is used to store the query keyword in the social security database when the historical query frequency is greater than the standard query frequency;
[0035] The second adjustment unit is configured to adjust a hyperparameter of the model based on a changing trend of the actual effective query rate when the historical query frequency is less than or equal to the standard query frequency, the hyperparameter being a batch size for model training;
[0036] Among them, a curve showing the actual effective query rate changing over time is plotted to obtain an effective query curve, and the slope of the effective query curve is analyzed. If the slope of the effective query curve is less than the standard slope, the batch size is increased.
[0037] Furthermore, the word segmentation subunit performs word segmentation processing on each of the sentences to be processed, including:
[0038] Obtain social security professional vocabulary from a social security database, add the social security professional vocabulary to a word segmentation library, and use the word segmentation library to perform word segmentation to obtain a number of entity words.
[0039] Furthermore, the construction subunit is used to form a social security ontology graph based on word fragments and relationship extraction models, including:
[0040] Obtaining the relationship between each entity word and the entity word through a relationship extraction model;
[0041] Each entity word is matched in the ontology database, and the matched entity words and the relationship corresponding to the entity words are linked to the ontology to form a social security ontology graph.
[0042] Compared with the existing technology, the beneficial effect of the present invention lies in that it classifies the source data in the social security field to collect the unstructured data therein for data conversion, that is, by processing the text in the unstructured data, identifying the entities and concepts in the text, and identifying and recording the relationships between entities, thereby improving the data availability and query efficiency. By combining user feedback data, the accuracy of the word segmentation processing is verified, the word segmentation processing process and model training parameters are adjusted, and effective management of the social security service system is achieved.
[0043] Furthermore, the collected data is cleaned by a data cleaning unit to remove irrelevant information, noise and duplicate content to ensure the quality of the data.
[0044] Furthermore, when it is determined that the quality of the constructed knowledge graph does not meet the standards, it means that the results of the retrieval of the keywords entered by the user are invalid. The number of times the keyword is entered, that is, the historical query frequency, is analyzed. If the historical query frequency is greater than the standard query frequency, it means that invalid queries occur frequently. This is due to word segmentation errors, which cause the keyword to fail to match in the social security database, thereby affecting the accuracy of the query results returned by the system. For example, if the user queries "medical insurance" and the system incorrectly segments it into "medical" and "insurance", it may cause the system to return results related to "medical" or "insurance" instead of specific information about "medical insurance". In this case, the query keywords are stored in the social security database for corresponding optimization to improve the accuracy of word segmentation and the overall performance of the system.
[0045] Furthermore, when it is determined that the quality of the constructed knowledge graph does not meet the standard and the historical query frequency is less than or equal to the standard query frequency, the changing trend of the actual effective query rate within the monitoring period is obtained to analyze the changing trend of the query accuracy rate. If it is determined that the query accuracy rate has decreased, the batch size is adjusted to retrain the relationship extraction model, update the model parameters, and improve the stability and performance of the model. By generating an effective query curve to analyze the changing trend of the query accuracy rate, the batch size is adjusted according to the changing trend of the query accuracy rate. When it is determined that the slope of the effective query curve is greater than or equal to the standard slope, it indicates that the changing trend of the actual effective query rate is decreasing, and the batch size is increased; when it is determined that the slope of the effective query curve is less than the standard slope, it indicates that the changing trend of the actual effective query rate is increasing, which means that the performance of the model is good and the batch size is not adjusted. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 This is a schematic diagram of the structure of a knowledge base management system based on a large model according to an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the structure of a data processing module according to an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of the structure of the knowledge base construction module according to an embodiment of the present invention;
[0049] Figure 4 Schematic diagram of the structure of the verification module according to an embodiment of the present invention. DETAILED DESCRIPTION
[0050] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.
[0051] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the scope of protection of the present invention.
[0052] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside", and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the accompanying drawings. This is only for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.
[0053] Furthermore, it should be noted that, in the description of the present invention, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed connections, detachable connections, or integral connections; mechanical connections or electrical connections; direct connections or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on specific circumstances.
[0054] See also Figure 1 As shown, it is a structural diagram of a knowledge base management system based on a large model according to an embodiment of the present invention. The present invention provides a knowledge base management system based on a large model, comprising:
[0055] The data collection module collects real-time data from various social security data sources through the API interface to obtain original social security data;
[0056] a data processing module connected to the data acquisition module, configured to classify the raw social security data into first-category social security data and second-category social security data, and to clean the first-category social security data to obtain target social security data;
[0057] A knowledge base construction module, which is connected to the data processing module, uses a large model to analyze the target social security data to extract entity terms, and combines it with a relationship extraction model to obtain a social security ontology graph, thereby constructing a knowledge graph;
[0058] A verification module is connected to the knowledge base construction module and is used to verify the knowledge graph and adjust the model setting parameters or data processing flow according to the verification results.
[0059] The various social security data sources in this embodiment are social security policies, processes, and results data of provinces and cities across the country, including policy documents, social security cases, user feedback, social media comments, news reports, etc.; Category 1 social security data is structured data and semi-structured data, and Category 2 social security data is unstructured data; the API interface is a RESTful API interface to provide access and query functions to the ontology database.
[0060] By classifying the source data in the social security field and collecting the unstructured data for data conversion, that is, by processing the text in the unstructured data, identifying the entities and concepts in the text, and identifying and recording the relationship between entities, the data availability and query efficiency are improved. By combining the user's feedback data, the accuracy of the word segmentation processing is verified. By recording the user's query data, it is automatically identified whether there are erroneous word segmentation results, and then the word segmentation processing process and model training parameters are adjusted to achieve effective management of the social security service system.
[0061] See Figure 2 , which is a structural diagram of a data processing module according to an embodiment of the present invention;
[0062] Specifically, the data processing module includes a data cleaning unit and a data classification unit, wherein:
[0063] The data cleaning unit is used to scan and detect the type of social security data to obtain target social security data;
[0064] The data classification unit is used to analyze the types of the original social security data to obtain type I social security data and type II social security data.
[0065] The collected data is cleaned by the data cleaning unit to remove irrelevant information, noise and duplicate content to ensure the quality of the data.
[0066] Specifically, the data cleaning unit includes a scanning subunit, a matching subunit and a detection subunit, wherein:
[0067] The scanning subunit is used to scan the social security data of the first type to obtain a detection text segment;
[0068] The matching subunit is used to extract entity keywords from the detection text segment and match them in the social security database, and determine the entity to be detected based on the matching results;
[0069] The detection subunit is configured to continuously scan the entity to be detected to obtain an extended text segment, perform a matching test on the entity to be detected according to the entity to be detected, and determine whether to delete the extended text segment based on a result of the matching test to obtain target social security data;
[0070] In this embodiment, a type of social security data is continuously scanned with a preset scanning length to remove duplicate content and avoid word segmentation errors.
[0071] Specifically, the continuous scanning includes taking the character length of the entity to be detected as the detection length, taking the next adjacent character of the entity to be detected as the starting node, and scanning the type of social security data with the detection length to obtain an extended text segment.
[0072] See Figure 3 As shown, it is a schematic diagram of the structure of the knowledge base construction module according to an embodiment of the present invention;
[0073] Specifically, the knowledge base construction module includes a data extraction unit, an ontology construction unit and a knowledge graph construction unit, wherein:
[0074] The data extraction unit is used to extract text data from the second type of social security data to obtain target social security data;
[0075] The ontology construction unit is used to perform entity recognition and relationship extraction on the target social security data to obtain a social security ontology graph;
[0076] The knowledge graph construction unit is used to store the social security ontology graph as a knowledge graph using a graph database.
[0077] Specifically, the ontology construction unit includes a word segmentation subunit and a construction subunit, wherein:
[0078] The word segmentation subunit divides the target social security data into a plurality of sentences to be processed using a period as an identifier, and performs word segmentation processing on each of the sentences to be processed to obtain a plurality of entity words;
[0079] The construction subunit is used to form a social security ontology graph based on entity words and relationship extraction models.
[0080] See Figure 4 , which is a schematic diagram of the structure of the verification module according to an embodiment of the present invention;
[0081] Specifically, the verification module includes a recording unit, a calculation unit, a determination unit, and an adjustment unit, wherein:
[0082] The recording unit is used to record user query data, wherein the user query data includes query keywords, timestamps and query results;
[0083] The calculation unit is used to calculate the actual effective query rate based on the query result;
[0084] The actual effective query rate is the percentage of effective keywords to the total number of keywords after word segmentation;
[0085] The determination unit is used to determine the actual effective query rate according to the standard effective query rate to determine whether the quality of the constructed knowledge graph meets the standard;
[0086] The determining unit is used to determine the actual effective query rate according to the standard effective query rate:
[0087] If the actual effective query rate is less than or equal to the standard effective query rate, it is determined that the quality of the constructed knowledge graph does not meet the standard;
[0088] If the actual effective query rate is greater than the standard effective query rate, it is determined that the quality of the constructed knowledge graph meets the standard;
[0089] The adjustment unit is used to adjust the model setting parameters or the data processing flow based on the historical query frequency of any query keyword.
[0090] In this embodiment, the standard effective query rate represents the ideal query accuracy threshold, which is generally set at 75%-85%. The actual effective query rate represents the user's query effect. The higher the actual effective query rate, the better the query effect. By recording user query data, user feedback information is obtained, that is, whether the keywords or entities provided by the system are correct, and the user selects "yes" or "no" to confirm whether a certain keyword is relevant to their query.
[0091] When it is determined that the quality of the constructed knowledge graph does not meet the standards, it means that the results of the retrieval of the keywords entered by the user are invalid. The number of times the keyword is entered, that is, the historical query frequency, is analyzed. If the historical query frequency is greater than the standard query frequency, it means that invalid queries occur frequently. This is due to word segmentation errors, which cause the keyword to fail to match in the social security database, thereby affecting the accuracy of the query results returned by the system. For example, if the user queries "medical insurance" and the system incorrectly segments it into "medical" and "insurance", it may cause the system to return results related to "medical" or "insurance" instead of specific information about "medical insurance". In this case, the query keywords are stored in the social security database for corresponding optimization to improve the accuracy of word segmentation and the overall performance of the system.
[0092] Specifically, the adjustment unit includes a first adjustment unit and a second adjustment unit, wherein:
[0093] The first adjustment unit is used to store the query keyword in the social security database when the historical query frequency is greater than the standard query frequency;
[0094] The second adjustment unit is configured to adjust a hyperparameter of the model based on a changing trend of the actual effective query rate when the historical query frequency is less than or equal to the standard query frequency, the hyperparameter being a batch size for model training;
[0095] Among them, a curve showing the change of the actual effective query rate over time is plotted to obtain an effective query curve, and the slope of the effective query curve is analyzed. If the slope of the effective query curve is greater than or equal to the standard slope, the batch size is not adjusted. If the slope of the effective query curve is less than the standard slope, the batch size is increased.
[0096] The batch size is the number of samples passed through the network in each iteration during training;
[0097] In this embodiment, the query accuracy rate after each training cycle is obtained to adjust the batch size according to the change in the query accuracy rate. For example, the following query accuracy rates are obtained during the training process:
[0098] Epoch 1: Query accuracy is 70% (using batch size 32).
[0099] Epoch 2: Query accuracy is 75% (using batch size 32).
[0100] Epoch 3: Query accuracy is 72% (using batch size 32).
[0101] Epoch 4: Query accuracy is 78% (using batch size 32).
[0102] Among them, Epoch is the training cycle;
[0103] In the third epoch, the query accuracy rate dropped. The query accuracy rate did not improve significantly in consecutive epochs. To improve the stability and performance of the model, the batch size was increased from 32 to 64. The actual effective query rate was continued to be obtained. If the query accuracy rate was still not ideal after using a batch size of 64 (for example, it dropped to 70%), the batch size was reduced to 16. For example, the following results were obtained after adjusting the batch size:
[0104] Epoch 5: Using a batch size of 64, the query accuracy rate is 73%.
[0105] Epoch 6: Using a batch size of 64, the query accuracy is 75%.
[0106] Epoch 7: Using a batch size of 16, the query accuracy is 80%.
[0107] Epoch 8: Using a batch size of 16, the query accuracy was 82%.
[0108] After reducing the batch size to 16, the query accuracy improves significantly, indicating that the model performs better in this setting.
[0109] Batch size is a hyperparameter that affects the training speed and convergence effect of the model. When it is determined that the quality of the constructed knowledge graph does not meet the standard and the historical query frequency is less than or equal to the standard query frequency, the changing trend of the actual effective query rate within the monitoring period is obtained to analyze the changing trend of the query accuracy rate. If it is determined that the query accuracy rate has decreased, the batch size is adjusted to retrain the relationship extraction model, update the model parameters, and improve the stability and performance of the model. By generating an effective query curve to analyze the changing trend of the query accuracy rate, the batch size is adjusted according to the changing trend of the query accuracy rate. When it is determined that the slope of the effective query curve is greater than or equal to the standard slope, it means that the changing trend of the actual effective query rate is decreasing, and the batch size is increased; when it is determined that the slope of the effective query curve is less than the standard slope, it means that the changing trend of the actual effective query rate is increasing, which means that the performance of the model is good and the batch size is not adjusted.
[0110] Specifically, the word segmentation subunit performs word segmentation processing on each of the sentences to be processed, including:
[0111] Obtain social security professional vocabulary from a social security database, add the social security professional vocabulary to a word segmentation library, and use the word segmentation library to perform word segmentation to obtain a number of entity words.
[0112] The social security professional vocabulary in this embodiment includes "social security", "pension insurance", "unemployment insurance", "work-related injury insurance", "maternity insurance", "social security card", "payment", "treatment", "policy", "insurance", "subsidy", "pension", "medical expenses", "insurance", etc.; the word library is the Jieba dictionary.
[0113] Specifically, the construction subunit is used to form a social security ontology graph based on word fragments and relationship extraction models, including:
[0114] Obtaining the relationship between each entity word and the entity word through a relationship extraction model;
[0115] Each entity word is matched in the ontology database, and the matched entity words and the relationship corresponding to the entity words are linked to the ontology to form a social security ontology graph.
[0116] In this embodiment, the relationship extraction model uses the BERT model as a basis, combined with PyTorch and Hugging Face's Transformers library to implement relationship extraction. By training the relationship extraction model, entity words and their corresponding relationships are extracted from the social security text, that is, the target social security data.
[0117] The RelationExtractionDataset class is used to process input text and labels, encode them using the BERT tokenizer, prepare the text and labels, and divide the data into training and test sets. It also uses BertForSequenceClassification to initialize the BERT model and set the number of classification labels. It uses the AdamW optimizer to train the model, calculate the loss, and update the model parameters. It is evaluated on the test set and outputs the predicted results and the true labels. When preparing the data, the dataset is divided into training and test sets with a ratio of 70% for training, 20% for validation, and 10% for testing.
[0118] The ontology database in this embodiment is a structured knowledge representation framework that facilitates information storage, retrieval, and reasoning. By determining the relationship between concepts, such as the relationship between "employee" and "social security payment", and defining the set of operating objects of the concept, the attributes and behaviors of each concept are clarified. The ontology model framework is a hierarchical design. The ontology hierarchy includes the top-level ontology, the domain ontology, and the application ontology. The top-level ontology is an abstract description of objective things, defining basic concept categories such as "object" and "event". The domain ontology is used to describe concepts and their relationships unique to the social security field and to build the core of domain knowledge. The application ontology is a description of specific instances, refining the concepts in the domain ontology. For example, in the top-level ontology, objects include “social security”, “employees”, “units”, etc.; events include “payment”, “receiving pensions”, etc.; in the domain ontology, concepts include “average wage of employees”, “social security payment ratio”, etc.; relationships include “belong to”, “association”, etc.; in the application ontology, instances include “employee A”, “unit B”, etc.; ontology modeling tools (such as Protégé) are used to build an ontology model, and ontology classes and attributes are created based on the extracted concepts and relationships; the extracted entity words are matched with the concepts in the ontology database, and for the matched entities, their corresponding relationships are recorded and linked to the ontology, and the matched entities and their relationships are linked to the ontology. Organize into triples (entity 1, relationship, entity 2). The ontology database is a graph database (Neo4j). The ontology database stores these triples. By identifying entity words from the subject, predicate, and object triples extracted from the target social security data, the identified entity words are matched with the concepts in the ontology database to establish the relationship between entities and link them to the ontology. The subject, predicate, and object triples are extracted from the text to form a structured data representation. The extracted triples are traversed and the subject and object of each triple are matched. The concepts in the ontology database are used for matching to ensure that existing nodes are not added repeatedly. The relationship between entities is determined based on the predicate verbs. , and record them as attributes, insert the matching entities and their relationships into the ontology database to form a social security ontology graph; extract all entities (such as "employee", "social security payment", "pension", etc.) and relationships (such as "belong to", "association", etc.) from the social security ontology graph, determine the attributes of each entity and the type of relationship, form a knowledge graph in the social security field, and store the knowledge graph through a graph database (Neo4j). The graph database can efficiently process node and edge queries; use the query language of the graph database (such as Cypher) to query the knowledge graph. Based on the knowledge graph, users can ask social security-related questions, and the system can quickly return accurate answers.
[0119] Thus far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it will be readily understood by those skilled in the art that the scope of protection of the present invention is obviously not limited to these specific embodiments. Without departing from the principles of the present invention, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present invention.
[0120] The foregoing description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Those skilled in the art will readily appreciate that the present invention is susceptible to various modifications and variations. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be within the scope of protection of the present invention.
Claims
1. A knowledge base management system based on a large model, characterized in that: include, The data collection module collects real-time data from various social security data sources through the API interface to obtain original social security data; a data processing module connected to the data acquisition module, configured to classify the raw social security data into first-category social security data and second-category social security data, and to clean the first-category social security data to obtain target social security data; Among them, the first type of social security data is structured data and semi-structured data, and the second type of social security data is unstructured data; A knowledge base construction module, which is connected to the data processing module, uses a large model to analyze the target social security data to extract entity terms, and combines it with a relationship extraction model to obtain a social security ontology graph, thereby constructing a knowledge graph; The knowledge base construction module includes a data extraction unit, an ontology construction unit and a knowledge graph construction unit, wherein: The data extraction unit is used to extract text data from the second type of social security data to obtain target social security data; The ontology construction unit is used to perform entity recognition and relationship extraction on the target social security data to obtain a social security ontology graph; The knowledge graph construction unit is used to store the social security ontology graph as a knowledge graph using a graph database; A verification module, which is connected to the knowledge base construction module and is used to verify the knowledge graph and adjust the model setting parameters or data processing flow according to the verification results; Among them, the process of adjusting the data processing flow is to store the query keywords in the social security database; the model setting parameter is the batch size of the model training; The verification module includes a recording unit, a calculation unit, a determination unit and an adjustment unit, wherein: The recording unit is used to record user query data, wherein the user query data includes query keywords, timestamps and query results; The calculation unit is used to calculate the actual effective query rate based on the query result; The actual effective query rate is the percentage of effective keywords to the total number of keywords after word segmentation; The determination unit is used to determine the actual effective query rate according to the standard effective query rate to determine whether the quality of the constructed knowledge graph meets the standard; The adjustment unit is used to adjust the model setting parameters or data processing flow based on the historical query frequency of any query keyword; The adjustment unit includes a first adjustment unit and a second adjustment unit, wherein: The first adjustment unit is used to store the query keyword in the social security database when the historical query frequency is greater than the standard query frequency; The second adjustment unit is configured to adjust a hyperparameter of the model based on a changing trend of the actual effective query rate when the historical query frequency is less than or equal to the standard query frequency, the hyperparameter being a batch size for model training; Among them, a curve showing the actual effective query rate changing over time is plotted to obtain an effective query curve, and the slope of the effective query curve is analyzed. If the slope of the effective query curve is less than the standard slope, the batch size is increased.
2. The knowledge base management system based on a large model according to claim 1, characterized in that: The data processing module includes a data cleaning unit and a data classification unit, wherein: The data cleaning unit is used to scan and detect the type of social security data to obtain target social security data; The data classification unit is used to analyze the types of the original social security data to obtain type I social security data and type II social security data.
3. The knowledge base management system based on a large model according to claim 2 is characterized in that: The data cleaning unit includes a scanning subunit, a matching subunit and a detection subunit, wherein: The scanning subunit is used to scan the social security data of the first type to obtain a detection text segment; The matching subunit is used to extract entity keywords from the detection text segment and match them in the social security database, and determine the entity to be detected based on the matching results; The detection subunit is used to continuously scan the entity to be detected to obtain an extended text segment, perform matching detection on the entity to be detected according to the entity to be detected, and determine whether to delete the extended text segment based on the result of the matching detection to obtain target social security data.
4. The knowledge base management system based on a large model according to claim 3 is characterized in that: The continuous scanning includes taking the character length of the entity to be detected as the detection length, taking the next adjacent character of the entity to be detected as the starting node, and scanning the type of social security data with the detection length to obtain an extended text segment.
5. The knowledge base management system based on a large model according to claim 1 is characterized in that: The ontology construction unit includes a word segmentation subunit and a construction subunit, wherein: The word segmentation subunit divides the target social security data into a plurality of sentences to be processed using a period as an identifier, and performs word segmentation processing on each of the sentences to be processed to obtain a plurality of entity words; The construction subunit is used to form a social security ontology graph based on entity words and relationship extraction models.
6. The knowledge base management system based on a large model according to claim 5, characterized in that: The word segmentation subunit performs word segmentation processing on each of the sentences to be processed, including: Obtain social security professional vocabulary from a social security database, add the social security professional vocabulary to a word segmentation library, and use the word segmentation library to perform word segmentation to obtain a number of entity words.
7. The knowledge base management system based on a large model according to claim 5, characterized in that: The construction subunit is used to form a social security ontology graph based on word fragments and relationship extraction models, including: Obtaining the relationship between each entity word and the entity word through a relationship extraction model; Each entity word is matched in the ontology database, and the matched entity words and the relationship corresponding to the entity words are linked to the ontology to form a social security ontology graph.
Citation Information
Patent Citations
Service knowledge base management system and method based on knowledge big model
CN118917390A
Social security data processing method and system based on big data
CN117314163A
Deep reading method and system based on knowledge graph
CN118193748A