Knowledge base online updating method and device
By performing data change detection and entity relationship extraction on multiple knowledge bases, the data in the target knowledge base is automatically updated, which solves the problems of low update efficiency and high cost, and achieves efficient and accurate knowledge base updates.
Patent Information
- Application Number
- CN202510246871.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-04
- Publication Date
- 2025-04-01
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
During the knowledge base update process, there are low update efficiency and high update cost.
By performing data change detection on multiple knowledge bases in the data storage medium, the knowledge entity to be updated is determined, and the results are extracted based on their physical properties and relationships, and corresponding knowledge data updates are performed in the target knowledge base.
An automated knowledge base update mechanism is realized, which improves update efficiency, reduces cost consumption, and ensures the accuracy and timeliness of the knowledge base.
Smart Images

Figure CN119740650A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to a method and device for online updating of a knowledge base. Background Art
[0002] With the rapid development of artificial intelligence technology, the scale of the knowledge base of intelligent agents is becoming increasingly large. High-performance knowledge bases can provide effective data support and core competitiveness for intelligent agents. Knowledge base updates are a powerful means to ensure the accuracy and timeliness of knowledge data.
[0003] However, in some knowledge base updating practices, there are problems of low updating efficiency and high updating cost. Summary of the invention
[0004] The present disclosure provides a knowledge base online updating method and device, electronic device and medium.
[0005] According to one aspect of the present disclosure, a method for online updating of a knowledge base is provided, the method comprising: performing data change detection on multiple knowledge bases in a data storage medium; in response to detecting a data change operation to be performed, determining a knowledge entity to be updated indicated by the data change operation; performing relationship extraction based on the knowledge entity to be updated in the multiple knowledge bases according to entity attributes of the knowledge entity to be updated, to obtain an entity relationship discovery result; and performing corresponding knowledge data updates in a target knowledge base that matches the knowledge entity to be updated according to the entity attributes and the entity relationship discovery result.
[0006] By determining the knowledge entities to be updated indicated by the data change operation, and discovering the results of the entity attributes and entity relationships of the knowledge entities to be updated, the corresponding knowledge data is updated in the target knowledge base. This is conducive to realizing an automated knowledge base update mechanism, which can effectively improve the knowledge base update efficiency, reduce the cost of knowledge base update, and provide efficient and accurate data support for intelligent agent interaction. It is conducive to ensuring the accuracy and timeliness of the knowledge base, can effectively enhance the accuracy of the intelligent agent's understanding of the environment, and can provide effective data support for improving the reliability of intelligent agent decision-making.
[0007] In some embodiments, the data change detection of multiple knowledge bases in the data storage medium includes: taking each of the multiple knowledge bases as a monitoring object, and determining the task status of the corresponding monitoring object according to a preset task status table matching each monitoring object; and determining whether there is a data change operation based on the corresponding knowledge base according to the task status of each monitoring object.
[0008] In some embodiments, in response to detecting a data change operation to be performed, determining the knowledge entity to be updated indicated by the data change operation includes: in response to detecting the data change operation, determining at least one of the knowledge entity to be changed, the knowledge entity to be written, the knowledge entity to be merged, and the knowledge entity to be deleted indicated by the data change operation as the knowledge entity to be updated.
[0009] In some embodiments, according to the entity attributes of the knowledge entity to be updated, relationship extraction based on the knowledge entity to be updated is performed in the multiple knowledge bases to obtain entity relationship discovery results, including: based on the entity attributes of the knowledge entity to be updated, relationship extraction is performed on the metadata of the multiple knowledge bases to obtain the entity relationship discovery results, and the entity relationship discovery results indicate the association relationship between the knowledge entity to be updated and other knowledge entities.
[0010] In some embodiments, the entity attributes of the knowledge entity to be updated include at least one of the following attributes: own entity attributes, upper-level entity attributes and lower-level entity attributes, wherein the upper-level entity attributes include the entity attributes of the upstream entity type inherited by the knowledge entity to be updated; the lower-level entity attributes include the entity attributes of the downstream entity type corresponding to the knowledge entity to be updated.
[0011] In some embodiments, the corresponding knowledge data update is performed in the target knowledge base that matches the knowledge entity to be updated based on the entity attributes and the entity relationship discovery results, including: writing the cache information of the knowledge entity to be updated into a first cluster; generating a data update directory based on the entity attributes and the entity relationship discovery results, and writing the data update directory into a second cluster; generating a knowledge base update notification, and sending the notification to a management terminal corresponding to the target knowledge base; and in response to receiving a knowledge base update instruction from the management terminal, performing a corresponding knowledge data update in the target knowledge base.
[0012] In some embodiments, in response to receiving a knowledge base update instruction from the management terminal, performing a corresponding knowledge data update in the target knowledge base, includes: in response to the received knowledge base update instruction, reading the cache information of the knowledge entity to be updated from the first cluster, and reading the data update directory from the second cluster; and performing a knowledge data update based on the knowledge entity to be updated in the target knowledge base according to the cache information and the data update directory.
[0013] In some embodiments, the first cluster includes a Redis cluster and a simple storage service S3 cluster, and the second cluster includes an Etcd cluster.
[0014] In some embodiments, the method further includes: after completing the knowledge data update, updating the version number of the target knowledge base, wherein the version number update method includes an ordered update method and an unordered update method based on the previous version number.
[0015] In some embodiments, the multiple knowledge bases correspond to at least one intelligent agent, and the knowledge entity to be updated is obtained by the intelligent agent based on at least one of the following operations: knowledge source data parsing, target motion capture, and target object detection.
[0016] In some embodiments, the intelligent agent obtains the knowledge entity to be updated by parsing the knowledge source data, including: according to the structured configuration information corresponding to the type of the knowledge source data, using asynchronous parsing method, hierarchically parsing the knowledge source data to obtain the knowledge entity to be updated.
[0017] According to another aspect of the present disclosure, there is provided a knowledge base online updating device, comprising: a data change detection module, used to perform data change detection on multiple knowledge bases in a data storage medium; a knowledge entity determination module, used to determine the knowledge entity to be updated indicated by the data change operation in response to detecting the data change operation to be performed; an entity relationship extraction module, used to perform relationship extraction based on the knowledge entity to be updated in the multiple knowledge bases according to the entity attributes of the knowledge entity to be updated, and obtain entity relationship discovery results; and a knowledge base update module, used to perform corresponding knowledge data updates in a target knowledge base that matches the knowledge entity to be updated according to the entity attributes and the entity relationship discovery results.
[0018] According to another aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned knowledge base online update method.
[0019] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the above-mentioned knowledge base online updating method.
[0020] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the above-mentioned knowledge base online updating method when executed by a processor.
[0021] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure. Figure 1 The system architecture of the knowledge base online updating method and device according to an embodiment of the present disclosure is schematically shown; Figure 2 A schematic diagram schematically shows a knowledge base management system according to an embodiment of the present disclosure; Figure 3 A flowchart of a method for online updating of a knowledge base according to an embodiment of the present disclosure is schematically shown; Figure 4 A block diagram of a knowledge base online updating device according to an embodiment of the present disclosure is schematically shown; Figure 5 A block diagram of an electronic device for executing a knowledge base online updating method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0023] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0024] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0025] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0026] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0027] With the rapid development of artificial intelligence technology, the scale of the knowledge base of intelligent agents is becoming increasingly large. High-performance knowledge bases can provide effective data support and core competitiveness for intelligent agents. Knowledge base updates are a powerful means to ensure the accuracy and timeliness of knowledge data. However, in some knowledge base update practices, there are problems such as low update efficiency and high update cost.
[0028] The embodiments of the present disclosure provide a method, device and computer-readable storage medium for updating a knowledge base online. The device for updating the knowledge base online can be integrated into an electronic device, which can be a terminal device or a server. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and big data and artificial intelligence platforms. The terminal device can be a mobile phone, a tablet, a computer, a smart wearable device, a smart home appliance, a robot, a driving assistance device, etc.
[0029] According to a knowledge base online updating method of an embodiment of the present disclosure, data change detection can be performed on multiple knowledge bases in a data storage medium. In response to detecting a data change operation to be performed, the knowledge entity to be updated indicated by the data change operation is determined. Next, according to the entity attributes of the knowledge entity to be updated, a relationship extraction based on the knowledge entity to be updated is performed in multiple knowledge bases to obtain an entity relationship discovery result. And, according to the entity attributes and the entity relationship discovery result, the corresponding knowledge data is updated in the target knowledge base that matches the knowledge entity to be updated.
[0030] The following description will be made by taking the knowledge base online updating device integrated into the server as an example. Figure 1 The system architecture of the knowledge base online update method and device according to an embodiment of the present disclosure is schematically shown. It should be noted that: Figure 1 What is shown is merely an example of a system architecture to which the embodiments of the present disclosure can be applied, in order to help those skilled in the art understand the technical content of the present disclosure, but it does not mean that the embodiments of the present disclosure cannot be used in other devices, systems, environments or scenarios.
[0031] The system architecture according to this embodiment may include an agent 101, a network 102, and a server 103. The network 102 is used to provide a medium for a communication link between the agent 101 and the server 103. The network 102 may include various connection types, such as wired or wireless communication links or optical fiber cables, etc. The server 103 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud computing, network services, and middleware services.
[0032] Agent 101 can obtain the knowledge body to be written into the knowledge base by interacting with object 100. For example, object 100 can tell agent 101 "TV needs to be powered on before use" through dialogue, and agent 101 obtains the knowledge body to be written into the knowledge base "TV needs to be powered on before use".
[0033] Agent 101 interacts with server 103 via network 102 to receive or send data, etc. Agent 101 may, for example, send a knowledge base update request to server 103 via network 102 .
[0034] The server 103 may be a server that provides various services, for example, a server that provides a knowledge base update service (only an example).
[0035] For example, the server 103 may perform data change detection on multiple knowledge bases in the data storage medium. In response to detecting the data change operation to be performed, the server 103 determines the knowledge entity to be updated indicated by the data change operation. Next, the server 103 performs relationship extraction based on the knowledge entity to be updated in multiple knowledge bases according to the entity attributes of the knowledge entity to be updated, and obtains entity relationship discovery results. And, the server 103 performs corresponding knowledge data updates in the target knowledge base that matches the knowledge entity to be updated according to the entity attributes and the entity relationship discovery results.
[0036] For example, after acquiring the knowledge base update request from the agent 101, the server 103 determines that a data change operation is detected, and performs a subsequent knowledge base update operation based on the data change operation.
[0037] It should be noted that the knowledge base online update method provided in the embodiment of the present disclosure can be executed by the server 103. Accordingly, the knowledge base online update device provided in the embodiment of the present disclosure can be set in the server 103. The knowledge base online update method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 103 and can communicate with the intelligent agent 101 and / or the server 103. Accordingly, the knowledge base online update device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 103 and can communicate with the intelligent agent 101 and / or the server 103.
[0038] It should be understood that Figure 1 The number of agents, networks and servers in the embodiment is only for illustration. Any number of agents, networks and servers may be provided as required.
[0039] The present disclosure provides a knowledge base online update method. Figure 1 For an example of an application environment, refer to Figure 2~Figure 5 A knowledge base online updating method according to an exemplary embodiment of the present disclosure is described.
[0040] Figure 2 The schematic diagram of the knowledge base management system according to an embodiment of the present disclosure is schematically shown. Figure 2 As shown, the knowledge base management system may include a management terminal matched with the intelligent agent. The knowledge base storage SDK (Software Development Kit) in the management terminal may store multiple knowledge bases, each of which stores knowledge data for assisting the intelligent agent in understanding the environment.
[0041] For example, you can use the Etcd data component to store metadata of knowledge data and storage routing key values of knowledge data, and use Redis, S3 and other data components to store knowledge data.
[0042] Metadata can provide information about the data structure, data description, and data management of knowledge data. Metadata can play an important role in data description, data retrieval, and data integration. Using metadata to perform data logical division and storage route description is helpful for quickly obtaining the storage path of knowledge data. Storing metadata and knowledge data separately is helpful for improving the management efficiency of the knowledge base and reducing the cost of updating the knowledge base.
[0043] In addition, the knowledge base can be used as a monitoring object, and the task status table for the monitoring object can be maintained using the Etcd data component. According to the task status table, the task status of the monitoring object can be judged to determine whether there is a data change operation for the knowledge base.
[0044] like Figure 2 The knowledge base management system shown can be used to store and update online generalized knowledge base data of any size and structure.
[0045] Figure 3 The flowchart of the knowledge base online updating method according to an embodiment of the present disclosure is schematically shown.
[0046] like Figure 3 As shown, the knowledge base online updating method 300 of the embodiment of the present disclosure may include, for example, operations S310 to S340.
[0047] In operation S310, data change detection is performed on multiple knowledge bases in a data storage medium.
[0048] Operation S320 : In response to detecting a data change operation to be performed, determining a knowledge entity to be updated indicated by the data change operation.
[0049] Operation S330 : extracting relationships based on the knowledge entities to be updated in multiple knowledge bases according to entity attributes of the knowledge entities to be updated, and obtaining entity relationship discovery results.
[0050] Operation S340 : updating corresponding knowledge data in a target knowledge base that matches the knowledge entity to be updated according to the entity attribute and entity relationship discovery results.
[0051] The implementation process of each operation is schematically illustrated below by way of example.
[0052] In operation S310, data change detection is performed on multiple knowledge bases in a data storage medium.
[0053] Exemplarily, the multiple knowledge bases in the data storage medium correspond to at least one intelligent agent, and the knowledge base stores knowledge data for assisting the intelligent agent in understanding the environment. The types of knowledge data include, for example, triple data, machine learning models, graph structure data, and multimedia data, etc., which are not limited to the embodiments.
[0054] For example, knowledge data in a knowledge base can be organized into triple data (entity-relationship-entity), where entities correspond to things and concepts in the physical world, and relationships describe the associations between entities. Knowledge data can also be stored in the form of graph structured data, which can be semi-structured data consisting of points and edges. Points in graph structured data correspond to knowledge entities, and edges correspond to the associations between entities.
[0055] Each of the multiple knowledge bases can be used as a monitoring object, and each monitoring object has a pre-maintained task status table. According to the task status table matching each monitoring object, the task status of the corresponding monitoring object is determined. According to the task status of each monitoring object, it is determined whether there is a data change operation based on the corresponding knowledge base.
[0056] The data change operations based on the knowledge base may include, for example, knowledge data change, knowledge data writing, knowledge data deletion, knowledge data fusion and the like.
[0057] In addition, user input may be obtained and converted into a computer-readable representation, and according to the computer-readable representation of the user input, it is determined whether the user initiates a data change operation on the knowledge base.
[0058] Operation S320 : In response to detecting a data change operation to be performed, determining a knowledge entity to be updated indicated by the data change operation.
[0059] Exemplarily, after learning new knowledge data, the agent needs to update the new knowledge data to the knowledge base through the knowledge base update process. The agent can initiate a knowledge data update operation. After the corresponding update operation is initiated, a corresponding data change task is generated in the task status table matching the knowledge base. When performing data change detection on multiple knowledge bases in the data storage medium, a data change task based on the target knowledge base can be detected, and the data change task indicates the data change operation to be performed.
[0060] In response to the detected data change operation, at least one of the knowledge entity to be changed, the knowledge entity to be written, the knowledge entity to be deleted, and the knowledge entity to be merged indicated by the data change operation is determined as the knowledge entity to be updated.
[0061] Operation S330 : extracting relationships based on the knowledge entities to be updated in multiple knowledge bases according to entity attributes of the knowledge entities to be updated, and obtaining entity relationship discovery results.
[0062] Exemplarily, based on the entity attributes of the knowledge entity to be updated, relationship extraction is performed on metadata of multiple knowledge bases to obtain entity relationship discovery results, which indicate the association relationship between the knowledge entity to be updated and other knowledge entities.
[0063] In some optional embodiments, an entity generally refers to a noun phrase or verb phrase with a specific meaning or strong referentiality in knowledge data, such as a person's name, a place name, a thing name, an action name, a proper name, etc. An entity relationship may be, for example, an association relationship between different knowledge entities in a knowledge base.
[0064] The metadata of knowledge data can be extracted by performing operations such as keyword extraction, entity recognition, and attribute extraction on knowledge data. Metadata can include useful information in knowledge data and avoid interference from useless information. Entity recognition and entity relationship extraction based on metadata can effectively reduce the amount of data processing and help improve the efficiency of knowledge base updates.
[0065] The entity attributes of the knowledge entity to be updated may include at least one of the following attributes: own entity attributes, upper entity attributes, and lower entity attributes. The upper entity attributes include entity attributes of the upstream entity type inherited by the knowledge entity to be updated. The lower entity attributes include entity attributes of the downstream entity type corresponding to the knowledge entity to be updated.
[0066] When analyzing metadata, the metadata can be analyzed based on a preset matching strategy. For example, the metadata can be matched with a regular expression in a preset matching strategy, and the knowledge entity that satisfies the regular expression is taken as an entity recognition result. The metadata can be matched with a grammatical rule in a preset matching strategy, and the entity relationship that satisfies the grammatical rule is taken as an entity relationship discovery result.
[0067] In addition, the trained neural network model can be used to extract entity relationships in metadata to obtain entity relationship discovery results.
[0068] Operation S340 : updating corresponding knowledge data in a target knowledge base that matches the knowledge entity to be updated according to the entity attribute and entity relationship discovery results.
[0069] Exemplarily, when updating the knowledge base, the cache information of the knowledge entity to be updated can be written into the first cluster. According to the entity attributes and entity relationship discovery results of the knowledge entity to be updated, a data update directory is generated, and the data update directory is written into the second cluster. A knowledge base update notification is generated, and the notification is sent to the management terminal corresponding to the target knowledge base. And, in response to receiving the knowledge base update instruction from the management terminal, the corresponding knowledge data is updated in the target knowledge base.
[0070] The management terminal may correspond to an agent, a single agent may correspond to a single management terminal, and a single management terminal may store multiple knowledge bases. The management terminal may be used to perform operations such as knowledge data import, knowledge data modification, knowledge data deletion, and knowledge data fusion on the knowledge base.
[0071] Optionally, the first cluster may be a Redis cluster, an S3 (Simple Storage Service) cluster, or a cluster of other storage types, and the second cluster may be an Etcd cluster.
[0072] Take the first cluster, Redis cluster, as an example. As an open source memory database, Redis can be used for caching and message brokering. Redis can support a variety of data structures, such as strings, hash list sets, ordered sets, etc. In a Redis cluster, data is sharded and stored on multiple Redis nodes, and each node is responsible for storing part of the data. Etcd cluster is an open source distributed key-value storage system that can be used to store configuration data, metadata, and status information in a distributed system to achieve functions such as service discovery, configuration management, and distributed consistency.
[0073] The cache information of the knowledge entity to be updated is written into the Redis cluster. By utilizing the high-performance storage and fast access characteristics of the Redis cluster, the cache information can be quickly stored and retrieved, which is conducive to improving data access speed and real-time performance.
[0074] According to the entity attributes and entity relationship discovery results of the knowledge entities to be updated, a data update directory is generated and written to the Etcd cluster. Through the distributed key-value storage and strong consistency characteristics of the Etcd cluster, the reliability and integrity of the data update directory can be effectively ensured, and reliable data support can be provided for the tracking and management functions of knowledge base updates.
[0075] In response to receiving the knowledge base update instruction from the management terminal, the cache information of the knowledge entity to be updated is read from the Redis cluster, and the data update directory is read from the Etcd cluster. According to the cache information and the data update directory, the knowledge data based on the knowledge entity to be updated is updated in the target knowledge base. For example, according to the cache information and the data update directory of the knowledge entity to be updated, operations such as knowledge data writing, knowledge data modification, knowledge data deletion, and knowledge data fusion are performed in the target knowledge base.
[0076] Taking the need to write a knowledge entity in the target knowledge base as an example, the cache information of the knowledge entity to be written can be written to the Redis cluster. The access key value and other metadata of the knowledge entity to be written can be generated, and the access key value and other metadata can be written to the Etcd cluster.
[0077] According to the entity attributes of the knowledge entity to be written, entity relationships are extracted in multiple knowledge bases to obtain entity relationship discovery results. According to the entity attributes of the knowledge entity to be written and the entity relationship discovery results, a data update directory is generated and written to the Etcd cluster. The data update directory can indicate the writing path of the knowledge entity to be updated in the target knowledge base.
[0078] Generate a knowledge base update notification and send the knowledge base update notification to the management terminal corresponding to the target knowledge base. In response to receiving the knowledge base update instruction from the management terminal, read the access key value and data update directory of the knowledge entity to be written from the Etcd cluster, and read the cache information of the knowledge entity to be written from the Redis cluster based on the access key value. According to the data update directory, determine the write path of the knowledge entity to be written in the target knowledge base. And according to the write path, write the corresponding knowledge data in the target knowledge base.
[0079] For example, if a knowledge entity needs to be deleted from the target knowledge base, the cache information of the knowledge entity to be deleted can be written into the Redis cluster. In addition, the directory field of the knowledge entity to be deleted in the Etcd cluster is deleted.
[0080] According to the entity attributes of the knowledge entity to be deleted, entity relationships are extracted from multiple knowledge bases to obtain entity relationship discovery results. According to the entity attributes of the knowledge entity to be deleted and the entity relationship discovery results, a data update directory is generated and written to the Etcd cluster. The data update directory can indicate the deletion path of the knowledge entity to be deleted in the target knowledge base.
[0081] Generate a knowledge base update notification and send the knowledge base update notification to the management terminal corresponding to the target knowledge base. In response to receiving the knowledge base update instruction from the management terminal, read the data update directory from the Etcd cluster to obtain the deletion path of the knowledge entity to be deleted in the target knowledge base. And, according to the obtained deletion path, delete the corresponding knowledge data in the target knowledge base.
[0082] Exemplarily, the knowledge entity to be updated may be obtained by the agent based on at least one of the following operations: knowledge source data parsing, target motion capture, and target object detection. For example, the agent may perform hierarchical structure parsing on the knowledge source data in an asynchronous parsing manner according to the structured configuration information corresponding to the type of the knowledge source data to obtain the knowledge entity to be updated.
[0083] Taking the parsing of knowledge source files as an example, the intelligent agent can use asynchronous parsing to parse the hierarchical structure of the knowledge source files according to the structured configuration information corresponding to the type of the knowledge source files, and obtain the knowledge entities to be written that need to be updated to the knowledge base.
[0084] For example, the agent parses the knowledge source file to obtain the knowledge data that needs to be updated to the knowledge base, "Sheep are social creatures covered with white wool". Among them, the knowledge entity to be written is "sheep", and the entity attribute of the knowledge entity to be written is "sheep". The upstream entity attributes can be "sheep", "social creatures", "mammals", etc., and the downstream entity attributes can be "female sheep", etc.
[0085] According to at least one of the entity attributes of the knowledge entity to be written, the entity relationship discovery result based on the knowledge entity to be written can be determined, that is, the association relationship between the knowledge entity to be written and other knowledge entities can be determined. According to the entity recognition result and entity relationship discovery result of the knowledge entity to be written, the corresponding knowledge entity and the knowledge data corresponding to the knowledge entity can be written into the target knowledge base.
[0086] In addition, the intelligent agent can also obtain the knowledge entities to be updated to the knowledge base through target motion capture, target object detection, etc.
[0087] After the knowledge data is updated, the version number of the target knowledge base can be updated. The update method of the version number includes an ordered update method based on the previous version number and an unordered update method.
[0088] Different knowledge bases may have their own corresponding version numbers. Different knowledge bases can be effectively distinguished by version numbers, which is conducive to the management and maintenance of different knowledge bases. The version number may be composed of a major version number, a sub-version number, and a revision number. The orderly update method for the version number includes at least one of the following methods: increasing the major version number by 1, and clearing the sub-version number and the revision number; keeping the major version number unchanged, increasing the sub-version number by 1, and clearing the revision number; keeping the major version number and the sub-version number unchanged, and increasing the revision number by 1.
[0089] By performing data change detection on multiple knowledge bases in the storage medium, it is beneficial to realize real-time online update of the knowledge base. In response to detecting a data change operation initiated by a knowledge base user, the target knowledge base is updated in real time according to the knowledge entity to be updated indicated by the data change operation, which is beneficial to provide a perceptible knowledge base update path for the knowledge base user and can effectively ensure the accuracy and timeliness of the knowledge base.
[0090] By determining the knowledge entities to be updated indicated by the data change operation, and discovering the results of the entity attributes and entity relationships of the knowledge entities to be updated, the corresponding knowledge data is updated in the target knowledge base. This is conducive to realizing an automated knowledge base update mechanism, which can effectively improve the knowledge base update efficiency, reduce the cost of knowledge base update, and provide efficient and accurate data support for intelligent agent interaction. It is conducive to ensuring the accuracy and timeliness of the knowledge base, can effectively enhance the accuracy of the intelligent agent's understanding of the environment, and can provide effective data support for improving the reliability of intelligent agent decision-making.
[0091] It is conducive to realizing the storage and update mechanism for generalized knowledge bases of any size and structure, and can use the same data architecture to update various types of knowledge bases, with good versatility and scalability.
[0092] Figure 4 The block diagram of a knowledge base online updating device according to an embodiment of the present disclosure is schematically shown.
[0093] like Figure 4 As shown, the knowledge base online updating device 400 of the embodiment of the present disclosure includes, for example, a data change detection module 410 , a knowledge entity determination module 420 , an entity relationship extraction module 430 and a knowledge base updating module 440 .
[0094] A data change detection module 410 is used to perform data change detection on multiple knowledge bases in a data storage medium; a knowledge entity determination module 420 is used to determine the knowledge entity to be updated indicated by the data change operation in response to detecting the data change operation to be performed; an entity relationship extraction module 430 is used to perform relationship extraction based on the knowledge entity to be updated in multiple knowledge bases according to the entity attributes of the knowledge entity to be updated, and obtain entity relationship discovery results; and a knowledge base update module 440 is used to perform corresponding knowledge data updates in a target knowledge base that matches the knowledge entity to be updated according to the entity attributes and entity relationship discovery results.
[0095] By determining the knowledge entities to be updated indicated by the data change operation, and discovering the entity attributes and entity relationships of the knowledge entities to be updated, the corresponding knowledge data is updated in the target knowledge base. This is conducive to realizing an automated knowledge base update mechanism, which can effectively improve the knowledge base update efficiency, reduce the cost of knowledge base update, and provide efficient and accurate data support for intelligent agent interaction.
[0096] In some embodiments, the data change detection module includes: a first processing sub-module, which is used to take each knowledge base in a plurality of knowledge bases as a monitoring object, and determine the task status of the corresponding monitoring object according to a preset task status table matching each monitoring object; and a second processing sub-module, which is used to determine whether there is a data change operation based on the corresponding knowledge base according to the task status of each monitoring object.
[0097] In some embodiments, the knowledge entity determination module includes: a third processing submodule, which is used to determine, in response to the detected data change operation, at least one of the knowledge entities to be changed, the knowledge entities to be written, the knowledge entities to be merged, and the knowledge entities to be deleted indicated by the data change operation as the knowledge entity to be updated.
[0098] In some embodiments, the entity relationship extraction module includes: a fourth processing sub-module, which is used to extract relationships on metadata of multiple knowledge bases based on entity attributes of the knowledge entity to be updated to obtain entity relationship discovery results, and the entity relationship discovery results indicate the association relationship between the knowledge entity to be updated and other knowledge entities.
[0099] In some embodiments, the entity attributes of the knowledge entity to be updated include at least one of the following attributes: own entity attributes, upper-level entity attributes and lower-level entity attributes, wherein the upper-level entity attributes include the entity attributes of the upstream entity type inherited by the knowledge entity to be updated; and the lower-level entity attributes include the entity attributes of the downstream entity type corresponding to the knowledge entity to be updated.
[0100] In some embodiments, the knowledge base update module includes: a fifth processing sub-module, used to write the cache information of the knowledge entity to be updated into the first cluster; a sixth processing sub-module, used to generate a data update directory based on the entity attributes and entity relationship discovery results, and write the data update directory into the second cluster; a seventh processing sub-module, used to generate a knowledge base update notification, and send the notification to the management terminal corresponding to the target knowledge base; and an eighth processing sub-module, used to perform corresponding knowledge data updates in the target knowledge base in response to the knowledge base update instruction received from the management terminal.
[0101] In some embodiments, the eighth processing submodule includes: a first processing unit, used to read cache information of the knowledge entity to be updated from the first cluster and read a data update directory from the second cluster in response to a received knowledge base update instruction; and a second processing unit, used to update knowledge data based on the knowledge entity to be updated in the target knowledge base according to the cache information and the data update directory.
[0102] In some embodiments, the first cluster includes a Redis cluster and a Simple Storage Service S3 cluster, and the second cluster includes an Etcd cluster.
[0103] In some embodiments, the device also includes a version number update module for updating the version number of the target knowledge base after completing the knowledge data update, wherein the version number update method includes an ordered update method and an unordered update method based on the previous version number.
[0104] In some embodiments, multiple knowledge bases correspond to at least one intelligent agent, and the knowledge entity to be updated is obtained by the intelligent agent based on at least one of the following operations: knowledge source data parsing, target motion capture, and target object detection.
[0105] In some embodiments, the intelligent agent obtains the knowledge entity to be updated by parsing the knowledge source data, including: using asynchronous parsing method to parse the knowledge source data hierarchically according to the structured configuration information corresponding to the type of the knowledge source data to obtain the knowledge entity to be updated.
[0106] It should be noted that the information collection, storage, use, processing, transmission, provision and disclosure involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0107] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0108] Figure 5 A block diagram of an electronic device for executing a knowledge base online updating method according to an embodiment of the present disclosure is schematically shown.
[0109] Figure 5 A schematic block diagram of an example electronic device 500 that can be used to implement an embodiment of the present disclosure is shown. The electronic device 500 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0110] like Figure 5 As shown, the device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0111] A number of components in the device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0112] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as the knowledge base online update method. For example, in some embodiments, the knowledge base online update method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the knowledge base online update method described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the knowledge base online update method in any other appropriate manner (e.g., by means of firmware).
[0113] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0114] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable knowledge base online update device, so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0115] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0116] To provide interaction with an object, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the object; and a keyboard and pointing device (e.g., a mouse or trackball) through which the object can provide input to the computer. Other types of devices can also be used to provide interaction with an object; for example, the feedback provided to the object can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the object can be received in any form (including acoustic input, voice input, or tactile input).
[0117] The systems and techniques described herein may be implemented in a computing system that includes a backend component (e.g., as a data server), or a computing system that includes a middleware component (e.g., an application server), or a computing system that includes a frontend component (e.g., an object computer having a graphical object interface or a web browser through which the object can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0118] A computer system may include a terminal and a server. The terminal and the server are generally remote from each other and usually interact through a communication network. The relationship between the terminal and the server is generated by computer programs running on the corresponding computers and having a terminal-server relationship with each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0119] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0120] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A knowledge base online updating method, characterized in that: The method comprises: Perform data change detection on multiple knowledge bases in data storage media; In response to detecting a data change operation to be performed, determining a knowledge entity to be updated indicated by the data change operation; According to the entity attributes of the knowledge entity to be updated, extracting relationships based on the knowledge entity to be updated in the multiple knowledge bases to obtain entity relationship discovery results; and According to the entity attributes and the entity relationship discovery results, corresponding knowledge data is updated in the target knowledge base that matches the knowledge entity to be updated.
2. The method according to claim 1, characterized in that The data change detection of multiple knowledge bases in the data storage medium includes: Taking each of the plurality of knowledge bases as a monitoring object, and determining the task state of the corresponding monitoring object according to a preset task state table matching each monitoring object; and According to the task status of each monitoring object, it is determined whether there is a data change operation based on the corresponding knowledge base.
3. The method according to claim 1, characterized in that In response to detecting a data change operation to be performed, determining a knowledge entity to be updated indicated by the data change operation includes: In response to the detected data change operation, at least one of a knowledge entity to be changed, a knowledge entity to be written, a knowledge entity to be merged, and a knowledge entity to be deleted indicated by the data change operation is determined as the knowledge entity to be updated.
4. The method according to claim 1, characterized in that The extracting relationships based on the knowledge entities to be updated in the multiple knowledge bases according to the entity attributes of the knowledge entities to be updated to obtain entity relationship discovery results includes: Based on the entity attributes of the knowledge entity to be updated, the metadata of the multiple knowledge bases are subjected to relationship extraction to obtain the entity relationship discovery result, wherein the entity relationship discovery result indicates the association relationship between the knowledge entity to be updated and other knowledge entities.
5. The method according to claim 4, characterized in that The entity attributes of the knowledge entity to be updated include at least one of the following attributes: own entity attributes, upper entity attributes and lower entity attributes. Wherein, the upper entity attributes include entity attributes of the upstream entity type inherited by the knowledge entity to be updated; The subordinate entity attributes include entity attributes of the downstream entity type corresponding to the knowledge entity to be updated.
6. The method according to claim 1, characterized in that The updating of corresponding knowledge data in a target knowledge base matching the knowledge entity to be updated according to the entity attributes and the entity relationship discovery result includes: Writing the cache information of the knowledge entity to be updated into the first cluster; Generate a data update directory according to the entity attributes and the entity relationship discovery result, and write the data update directory into the second cluster; generating a knowledge base update notification, and sending the notification to a management terminal corresponding to the target knowledge base; and In response to receiving the knowledge base update instruction from the management terminal, corresponding knowledge data is updated in the target knowledge base.
7. The method according to claim 6, characterized in that In response to receiving the knowledge base update instruction from the management terminal, updating the corresponding knowledge data in the target knowledge base includes: In response to the received knowledge base update instruction, reading the cache information of the knowledge entity to be updated from the first cluster, and reading the data update directory from the second cluster; and According to the cache information and the data update catalog, knowledge data based on the knowledge entity to be updated is updated in the target knowledge base.
8. The method according to claim 6, characterized in that The first cluster includes a Redis cluster and a simple storage service S3 cluster, and the second cluster includes an Etcd cluster.
9. The method according to claim 6, characterized in that The method further comprises: After completing the knowledge data update, the version number of the target knowledge base is updated. The update method of the version number includes an ordered update method and an unordered update method based on the previous version number.
10. The method according to claim 1, characterized in that The multiple knowledge bases correspond to at least one agent, and the knowledge entity to be updated is obtained by the agent based on at least one of the following operations: Knowledge source data parsing, target motion capture and target object detection.
11. The method according to claim 10, characterized in that The intelligent agent obtains the knowledge entity to be updated by parsing the knowledge source data, including: According to the structured configuration information corresponding to the type of the knowledge source data, the knowledge source data is parsed hierarchically in an asynchronous parsing manner to obtain the knowledge entity to be updated.
12. The method according to claim 1, characterized in that The knowledge data type in the knowledge base includes at least one of the following types: Triplet data, machine learning models, graph structured data, and multimedia data.
13. A knowledge base online updating device, characterized in that: include: A data change detection module, used to perform data change detection on multiple knowledge bases in the data storage medium; a knowledge entity determination module, configured to, in response to detecting a data change operation to be performed, determine a knowledge entity to be updated indicated by the data change operation; An entity relationship extraction module, configured to extract relationships based on the knowledge entities to be updated in the multiple knowledge bases according to the entity attributes of the knowledge entities to be updated, and obtain entity relationship discovery results; as well as The knowledge base updating module is used to update the corresponding knowledge data in the target knowledge base matching the knowledge entity to be updated according to the entity attributes and the entity relationship discovery results.
14. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the knowledge base online updating method according to any one of claims 1 to 12.
15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to enable the computer to execute the knowledge base online updating method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Data processing method and device
CN113312351A
Intelligent interactive behavior monitoring method, system and device and storage medium
CN118097774A
Knowledge base generation method and device, electronic equipment and medium
CN118966346A
Identifying patterns of a set of software applications
US20170193021A1