Knowledge fusion method and system based on automatic metadata
By adopting a knowledge fusion method based on automatic metadata in multi-source data fusion, the metadata is automatically detected and updated, and the problems of high cost and easy omissions in the existing technology are solved, and efficient and automatic data are achieved Fusion.
Patent Information
- Application Number
- CN202510062990.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-02-18
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing multi-source data fusion methods have problems such as high fusion cost, high conversion difficulty and high manual operations. Especially when multi-source data is updated, it is difficult to automatically discover the correlation changes between data, and omissions are prone to occur.
Using the knowledge fusion method based on automatic metadata, we can detect changes in the original data, obtain changing data, and find target metadata and associated metadata from the metadata knowledge graph, recalculate and update metadata based on the changing data, and realize automatic data fusion. .
Automatic data fusion during multi-source data update is realized, reducing manual operation costs, improving data update efficiency, and avoiding omissions in the fusion process.
Smart Images

Figure CN119476450A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of data processing, and in particular relates to a knowledge fusion method and system based on automatic metadata. Background Art
[0002] The necessity of integrating and fusing multi-source knowledge is self-evident. In the decision-making process of an enterprise or organization, knowledge data from various sources needs to be integrated and analyzed. However, data from different sources and in different formats have differences in storage, query, and use. If there is no unified management, users need to spend a lot of time and energy to find and integrate this knowledge. Therefore, how to integrate multi-source knowledge data is a crucial issue.
[0003] The existing multi-source data fusion mainly adopts the multi-source heterogeneous knowledge data fusion method, which mainly includes data cleaning, data conversion and data integration. However, this method has the following shortcomings: high fusion cost, high conversion difficulty, and many manual operations. For example, when knowledge data is updated, the changed data needs to be converted to the target structure or format through manual operation; in addition, the above method is difficult to find the association changes between data. When data is updated, other data are often updated together, but the associations between data may be complex and numerous, and it is inevitable that there will be omissions if only manual discovery and modification are relied on.
[0004] Therefore, how to cope with the data fusion needs of multi-source data updates to solve the problems of high costs caused by multiple manual operations and omissions in the fusion process is one of the technical issues worth considering. Summary of the invention
[0005] In view of this, it is necessary to provide a knowledge fusion method and system based on automatic metadata to address the above technical problems, so as to meet the data fusion needs of multi-source data updates and solve the problems of high costs caused by multiple manual operations and omissions in the fusion process.
[0006] A knowledge fusion method based on automatic metadata is applied to an electronic device serving a target scene, the method comprising: When it is detected that the original data in the original data layer corresponding to the target scene changes, obtaining the changed data; According to the change data, the corresponding target metadata is searched from the metadata knowledge graph stored in the metadata layer corresponding to the target scene; According to the association relationship existing in the metadata knowledge graph of the target metadata, obtaining associated metadata associated with the target metadata; Recalculating the associated metadata based on the changed data to obtain data to be updated; The target metadata is updated based on the changed data, and the target metadata and the data to be updated are updated into the metadata knowledge graph.
[0007] In one of the embodiments, each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between the metadata is represented by a directed edge between the data nodes corresponding to the metadata; According to the association relationship between the target metadata in the metadata knowledge graph, obtaining the associated metadata associated with the target metadata includes: Obtaining neighbor data nodes of the first data node according to the directed edges between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph; Based on the attribute value of the metadata of each of the neighbor data nodes, identifying a target neighbor data node that depends on the first data node; Based on the target neighbor data nodes respectively corresponding to the first data nodes, associated metadata associated with the target metadata is obtained.
[0008] In one embodiment, identifying a target neighbor data node that depends on the first data node based on the attribute value of the metadata of each of the neighbor data nodes includes: Traverse each neighbor data node; Searching for an attribute value corresponding to an attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; If the attribute value depends on the metadata of the first data node, the neighbor data node is identified as the target neighbor data node.
[0009] In one embodiment, obtaining associated metadata associated with the target metadata based on the target neighbor data nodes respectively corresponding to the first data nodes includes: Performing intersection processing on an intermediate data node set consisting of target neighbor data nodes corresponding to each first data node and a changed data node set consisting of the first data node to obtain a first set; Performing a difference calculation on the intermediate data node set and the first set to obtain a second set; The second set and the changed data node set are subjected to a union process to obtain an associated data node set, wherein metadata corresponding to the data nodes in the associated data node set are the associated metadata.
[0010] In one embodiment, recalculating the associated metadata based on the changed data to obtain the data to be updated includes: For each associated metadata, obtaining target change data causing the associated metadata to change from the change data; According to the target change data and the data model corresponding to the associated metadata, the associated metadata is recalculated to obtain the data to be updated.
[0011] In a second aspect, a knowledge fusion system based on automatic metadata is provided, which is applied to an electronic device serving a target scene, and the system includes: A data monitoring module, used for obtaining change data when detecting that the original data in the original data layer corresponding to the target scene changes; The associated data analysis module is used to find the corresponding target metadata from the metadata knowledge graph stored in the metadata layer corresponding to the target scene according to the change data; and obtain the associated metadata associated with the target metadata according to the association relationship existing in the metadata knowledge graph of the target metadata; A metadata calculation module, used for recalculating the associated metadata based on the changed data to obtain data to be updated; The metadata updating module is used to update the target metadata based on the changed data, and update the target metadata and the data to be updated into the metadata knowledge graph.
[0012] In one of the embodiments, each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between the metadata is represented by a directed edge between the data nodes corresponding to the metadata; The associated data analysis module is specifically used to obtain the neighbor data nodes of the first data node according to the directed edges between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph; identify the target neighbor data nodes that depend on the first data node based on the attribute values of the metadata of each of the neighbor data nodes; and obtain associated metadata associated with the target metadata based on the target neighbor data nodes corresponding to each of the first data nodes.
[0013] In one of the embodiments, the associated data analysis module is specifically used to traverse each neighbor data node; search for the attribute value corresponding to the attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; if the attribute value depends on the metadata of the first data node, then identify the neighbor data node as the target neighbor data node.
[0014] In one of the embodiments, the associated data analysis module is specifically used to perform intersection processing on an intermediate data node set consisting of target neighbor data nodes corresponding to each first data node and a changed data node set consisting of the first data node to obtain a first set; perform difference calculation on the intermediate data node set and the first set to obtain a second set; perform union processing on the second set and the changed data node set to obtain an associated data node set, and the metadata corresponding to the data nodes in the associated data node set is the associated metadata.
[0015] In one of the embodiments, the metadata calculation module is specifically used to obtain, for each associated metadata, target change data that causes the associated metadata to change from the change data; and recalculate the associated metadata according to the target change data and the data model corresponding to the associated metadata to obtain the data to be updated.
[0016] In the above-mentioned knowledge fusion method and system based on automatic metadata, when it is detected that the original data in the original data layer corresponding to the above-mentioned target scene has changed, the change data is obtained; according to the above-mentioned change data, the corresponding target metadata is found from the metadata knowledge graph stored in the metadata layer corresponding to the above-mentioned target scene; according to the association relationship between the above-mentioned target metadata in the above-mentioned metadata knowledge graph, the associated metadata associated with the above-mentioned target metadata is obtained; based on the above-mentioned change data, the above-mentioned associated metadata is recalculated and processed to obtain the data to be updated; based on the above-mentioned change data, the above-mentioned target metadata is updated, and the above-mentioned data to be updated is updated to the above-mentioned metadata knowledge graph. Therefore, when it is found that the original data has changed, in addition to updating the corresponding metadata in the metadata knowledge graph based on the change data, the associated associated metadata can also be located from the metadata knowledge graph based on the change data, and then the associated metadata can be recalculated based on the change data and updated to the metadata knowledge graph, thereby realizing the data fusion requirements when multi-source data is updated, and solving the problems of high cost and omissions in the fusion process caused by many manual operations. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a flow chart of a knowledge fusion method based on automatic metadata in one embodiment; Figure 2 A schematic diagram of the relationship between a first data node and other data nodes in one embodiment; Figure 3 is a schematic diagram of the structure of a knowledge fusion system based on automatic metadata in one embodiment; Figure 4 One of the diagrams of a metadata knowledge graph in an embodiment; Figure 5 The second diagram of a metadata knowledge graph in an embodiment; Figure 6 The third diagram of a metadata knowledge graph in an embodiment; Figure 7 FIG. 1 is a diagram of the internal structure of a computing device in one embodiment. DETAILED DESCRIPTION
[0018] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0019] In the face of the continuous addition or modification of multi-source knowledge in various application scenarios, corresponding updating and fusion technologies are needed to be able to discover the associated changes in multi-source data and automatically fuse the data to solve the high cost caused by many manual operations and the omissions in the fusion process, and better respond to the data fusion needs of multi-source data updates. Based on this, the present application provides a knowledge fusion method based on automatic metadata, which can be applied to electronic devices serving target scenes. The method includes: when it is detected that the original data in the original data layer corresponding to the above-mentioned target scene changes, obtain the change data; according to the above-mentioned change data, find the corresponding target metadata from the metadata knowledge graph stored in the metadata layer corresponding to the above-mentioned target scene; according to the association relationship between the above-mentioned target metadata in the above-mentioned metadata knowledge graph, obtain the associated metadata associated with the above-mentioned target metadata; based on the above-mentioned change data, recalculate the above-mentioned associated metadata to obtain the data to be updated; based on the above-mentioned change data, update the above-mentioned target metadata, and update the above-mentioned data to be updated to the above-mentioned metadata knowledge graph. Therefore, when it is found that the original data has changed, in addition to updating the corresponding metadata in the metadata knowledge graph based on the changed data, the associated metadata can also be located from the metadata knowledge graph based on the changed data, and then the associated metadata can be recalculated based on the changed data and updated to the metadata knowledge graph, thereby realizing the data fusion requirements when multi-source data is updated, and solving the problems of high cost caused by multiple manual operations and omissions in the fusion process.
[0020] In one embodiment, Figure 1 As shown, a knowledge fusion method based on automatic metadata is provided, and the method is applied to an electronic device as an example for explanation. The electronic device serves a target scene, and the target scene can be but not limited to various application scenes requiring data fusion. The electronic device can be but not limited to a server and other devices. When the above electronic device implements the above method, the following steps can be included: S11. When it is detected that the original data in the original data layer corresponding to the target scene changes, the changed data is obtained.
[0021] In specific implementation, the above-mentioned original data layer is used to store the original data of the target scene, and there is more than one type of original data, that is, there may be original data from multiple sources, and each type of original data may include at least one original data, which may be determined according to the target scene to which it belongs; in addition, the specific content of the original data may also be determined according to the target scene to which it belongs.
[0022] Specifically, the electronic device can detect each original data, and the detection can be performed regularly or in an implementation manner. For example, the changes in the original data recorded in the original data layer are continuously monitored, including the addition, modification, deletion, and the like of data. In addition, the input of the target scene can also be detected, and when the external input data changes and causes the original data to be updated, the changes can also be identified and tracked. Specifically, when the original data is detected, the write interface of each original data in the original data layer can be monitored, and when the interface is accessed, it is determined that there is a change in the original data. The interface being accessed can be understood as modifying the original data in the original data layer, adding original data to the original data layer, deleting original data from the original data layer, and the like. Alternatively, the electronic device can record the latest write time of each original data, and then check whether the write time is updated after a period of time. When there is an update, it is determined that the original data has changed.
[0023] Furthermore, when it is detected that the original data has changed, the changed data can be obtained from the original data layer and recorded as the above-mentioned changed data. For example, the original data that has changed within a set time period can be obtained based on the writing time or modification time of each original data in the original data layer. The above-mentioned set time period can be the time period between the time point when the last automatic metadata-based knowledge fusion ended and the current time point.
[0024] Optionally, in order to facilitate knowledge fusion based on automatic metadata, the present application adopts a storage strategy of data hierarchical storage, which is divided into an original data layer and a metadata layer, wherein the original data layer is used to store various original data. Optionally, the original data layer may include, but is not limited to, various types of databases such as file databases, relational databases, non-relational databases, and time series databases, and the above databases are used to store format-adapted original data, that is, the electronic device can select the most appropriate database storage according to the structural characteristics of each original data.
[0025] S12. According to the change data, the corresponding target metadata is searched from the metadata knowledge graph stored in the metadata layer corresponding to the target scene.
[0026] In specific implementation, the metadata knowledge graph stored in the metadata layer stores the metadata of the original data, and the metadata is obtained based on the conversion of the original data. Specifically, the metadata of various types of original data can be stored in the metadata layer based on the knowledge graph technology.
[0027] When the original data changes, the metadata corresponding to the original data stored in the metadata layer will definitely change accordingly. Therefore, the corresponding metadata can be located from the metadata knowledge graph based on the changed data. For the convenience of description, the located metadata can be recorded as the above-mentioned target metadata.
[0028] It is worth noting that when the metadata corresponding to the changed data is not found in the metadata knowledge graph, it indicates that the changed data may be a newly added type of original data, so the metadata corresponding to the changed data can be written into the metadata knowledge graph at this time.
[0029] S13. Obtain associated metadata associated with the target metadata according to the association relationship existing in the metadata knowledge graph.
[0030] Specifically, since there may be associations between some of the original data, correspondingly, there will also be associations between the corresponding metadata in the metadata knowledge graph. Therefore, when storing the metadata of the original data in the metadata layer, in addition to storing the metadata of each type of original data, the associations between the corresponding metadata will also be reflected in the metadata layer based on the associations between the original data, thereby constructing the index of the original data and its mutual associations, that is, obtaining the above-mentioned metadata knowledge graph. It is worth noting that the above-mentioned metadata and the associations between metadata can be set according to the specific business needs of the target scenario. Different scenarios correspond to different original data, and thus different scenarios correspond to different metadata and the associations between metadata are also different.
[0031] On this basis, when the original data changes, the original data associated with the original data may also change. In order to enable the metadata knowledge graph to update the metadata associated with the original data as the original data changes, this embodiment proposes that after locating the target metadata in step S12, the metadata associated with the target metadata is located according to the above-mentioned association relationship existing in the target metadata in the metadata knowledge graph. For the convenience of description, it is recorded as the above-mentioned associated metadata.
[0032] S14: recalculate the associated metadata based on the changed data to obtain data to be updated.
[0033] In specific implementation, since the changed data will cause the target metadata to change, and the target metadata and the associated metadata are associated, the changed data will also cause the associated metadata to change. Therefore, the electronic device can recalculate the associated metadata based on the changed data, that is, obtain the data to be updated.
[0034] S15. Update the target metadata based on the changed data, and update the target metadata and the data to be updated into the metadata knowledge graph.
[0035] In specific implementation, after obtaining the data to be updated, the data to be updated can be updated to the metadata knowledge graph. At the same time, the target metadata is updated using the changed data and updated to the metadata knowledge graph. This also enables the metadata knowledge graph to be updated based on the changed data after the original data changes. That is, the purpose of data fusion when updating multi-source data is achieved, and the problem of high cost and omissions in the fusion process caused by multiple manual operations in the multi-source heterogeneous knowledge data fusion method is solved.
[0036] In addition, when the original data changes, only the corresponding target metadata is updated according to the changed data, and the associated metadata associated with the target metadata is updated, that is, the metadata knowledge graph is updated in an incremental update manner instead of a full update, which greatly improves the update efficiency of the metadata knowledge graph.
[0037] By providing the above-mentioned knowledge fusion method based on automatic metadata, when it is found that the original data has changed, in addition to updating the corresponding metadata in the metadata knowledge graph based on the changed data, the associated associated metadata can also be located from the metadata knowledge graph based on the changed data, and then the associated metadata is recalculated based on the changed data and updated to the metadata knowledge graph, thereby realizing the data fusion demand when multi-source data is updated, and solving the problems of high cost and omissions in the fusion process caused by the fusion of multi-source heterogeneous knowledge data due to multiple manual operations.
[0038] Optionally, in one embodiment, each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between the metadata is represented by the directed edges between the data nodes corresponding to the metadata, see Figure 2As shown, a directed edge is represented by a directed arrow between two data nodes, for example, data node 1 points to data node 5, and so on; on this basis, step S13 can be performed according to the following process: according to the directed edge between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph, the neighbor data nodes of the first data node are obtained; based on the attribute value of the metadata of each of the neighbor data nodes, the target neighbor data nodes having a dependency relationship with the first data node are identified; based on the target neighbor data nodes corresponding to each of the first data nodes, the associated metadata associated with the target metadata is obtained.
[0039] Specifically, the neighbor node may be a data node of the next hop of the first data node, and the first data node corresponding to the target metadata is Figure 2 Taking the example shown above as an example, the next-hop data nodes of the first data node may include: data node 1, data node 2, and data node 4, so these three data nodes are all neighbor data nodes of the first data node. On this basis, when there are multiple target metadata, correspondingly, there are also multiple first data nodes, and the above process can be performed on each first data node in turn, so that the neighbor data nodes of each first data node can be obtained.
[0040] Furthermore, among the neighboring data nodes of each first data node, some neighboring data nodes point to the first data node, that is, only when the metadata of the neighboring data node changes will the metadata of the first data node change, rather than the metadata of the first data node causing the metadata of the neighboring data node to change. Take the following example for example: if the metadata of data node a depends on the metadata of data node b, then the directed change between data node a and data node b is from a to b. For ease of understanding, please also refer to Figure 2 As shown, the first data node points to data node 2, that is, when the metadata of data node 2 changes, the first data node will change, but the metadata change of the first data node will not cause the metadata of data node 2 to change. Therefore, data node 2 is not a target neighbor data node that depends on the first data node. Figure 2 In the example, data node 1 and data node 4 both depend on the first data node, that is, metadata changes of the first data node will cause metadata changes of data node 1 and data node 4, so data node 1 and data node 4 are both the above-mentioned target neighbor data nodes.
[0041] It is worth noting that if the original data that has changed is a newly added original data, a data node corresponding to the original data can be added to the metadata knowledge graph; if an original data is deleted, then correspondingly, the data node to which the metadata corresponding to the original data belongs can be deleted in the metadata knowledge graph.
[0042] Furthermore, the step of identifying the target neighbor data node that depends on the first data node based on the attribute value of the metadata of each of the neighbor data nodes can be performed according to the following process: traverse each neighbor data node; search for the attribute value corresponding to the attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; if the attribute value depends on the metadata of the first data node, identify the neighbor data node as the target neighbor data node.
[0043] Specifically, each metadata may correspond to an attribute field set, and the metadata corresponds to the data node, so each data node corresponds to an attribute field set. The attribute field set of each metadata includes the corresponding relationship between the attributes included in the metadata and their attribute values. On this basis, as long as the change data causes a change in an attribute value, it indicates that the neighbor data node depends on the first data node. Therefore, based on this, when it is determined that any attribute value in the attribute field set depends on the metadata of the first data node, it indicates that the neighbor data node belongs to the target neighbor data node.
[0044] Specifically, the attributes in the attribute field set can be traversed, and when the attribute value of the current attribute meets the above conditions, the neighbor data node can be directly determined to be the target neighbor data node, and the attribute field set can be no longer traversed. If the attribute field set of a neighbor data node is traversed and it is determined that the attribute values of each attribute in the set do not depend on the metadata of the first data node, then it can be determined that the neighbor data node is not the above target neighbor data node.
[0045] In addition, the above-mentioned attribute field set may also include a calculation formula for each attribute value, or include description information for each attribute value, and the description information may describe the calculation process of the attribute value. For the convenience of description, the attribute field set includes a calculation formula for each attribute value as an example for explanation. Then, for each attribute value, when determining whether the attribute value depends on the metadata of the first data node, the calculation formula of the attribute value may be obtained, and then it may be determined whether the input of the calculation formula is an attribute of the metadata of the first data node. If so, it is determined that the attribute value depends on the metadata of the first data node.
[0046] Further, in one embodiment, the step of obtaining associated metadata associated with the target metadata based on the target neighbor data nodes corresponding to each first data node can be performed according to the following process: performing intersection processing on an intermediate data node set consisting of the target neighbor data nodes corresponding to each first data node and a change data node set consisting of the first data node to obtain a first set; performing difference calculation on the intermediate data node set and the first set to obtain a second set; performing union processing on the second set and the change data node set to obtain an associated data node set, and the metadata corresponding to the data nodes in the associated data node set is the associated metadata.
[0047] Specifically, for ease of understanding, the set of intermediate data nodes can be recorded as , the above-mentioned set of changed data nodes is recorded as , the above associated data node set is Taking this as an example, in order to obtain the above-mentioned associated metadata conveniently, the following code can be used:
[0048] : The set of associated data nodes corresponding to the associated metadata
[0049] / / Determine the data set that has changed / / Each round of analysis finds new data sets that need to be changed / / empty set
[0050]
[0051] The set of one-hop neighbor nodes
[0052] The attribute field collection
[0053] The corresponding attribute value depends on
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064] Among them, in the above code, Represents any first data node in the initially given set of changed data nodes; Represents a neighbor data node; express The attribute value in .
[0065] In addition, the above It is a keyword in the algorithm syntax, often used with , , Use with keywords such as Indicates when When the condition is met, the loop does and Steps between.
[0066] Optionally, in one embodiment, step S14 may be performed according to the following process: for each associated metadata, target change data that causes the associated metadata to change is obtained from the change data; and based on the target change data and a data model corresponding to the associated metadata, the associated metadata is recalculated to obtain the data to be updated.
[0067] Specifically, after finding each associated metadata, in order to be able to update the associated metadata, for each associated metadata, the target data node pointed to by the data node corresponding to the associated metadata can be found. The target data node is recorded as the data node that the data node corresponding to the associated metadata depends on. Then, in order to update the metadata, the change data corresponding to the metadata of the above target data node can be found from the change data. The change data is recorded as the above target change data. The target change data can cause the associated metadata to change. Therefore, after obtaining the target change data, the metadata is recalculated based on the data model of the associated metadata, thereby obtaining the above data to be updated. For example, when the above data model is a calculation formula for the attribute value of each attribute recorded in the attribute field set corresponding to the associated data, the above data to be updated can be calculated based on the calculation formula of the attribute value and the above target change data.
[0068] By providing the above-mentioned automatic metadata-based knowledge fusion method, it is possible to automatically discover changes in multi-source data and identify the associated changes in other data caused by the changed data, and automatically update and aggregate them into the metadata knowledge graph, which not only avoids manual operations, but also improves data update efficiency and reduces costs.
[0069] At this point, the design of a knowledge fusion method based on automatic metadata is completed.
[0070] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0071] Based on the same technical concept, Figure 3 As shown in the structural schematic diagram, the present application also provides a knowledge fusion system based on automatic metadata, which is applied to an electronic device serving a target scene, and the system includes: A data monitoring module, used for obtaining change data when detecting that the original data in the original data layer corresponding to the target scene changes; The associated data analysis module is used to find the corresponding target metadata from the metadata knowledge graph stored in the metadata layer corresponding to the target scene according to the change data; and obtain the associated metadata associated with the target metadata according to the association relationship existing in the metadata knowledge graph of the target metadata; A metadata calculation module, used for recalculating the associated metadata based on the changed data to obtain data to be updated; The metadata updating module is used to update the target metadata based on the changed data, and update the target metadata and the data to be updated into the metadata knowledge graph.
[0072] Specifically, the metadata calculation module can locate the specific data that needs to be incrementally updated based on the changed data set obtained by the associated data analysis module, and recalculate its metadata. This includes automatically parsing the original data, comparing metadata and relationship modeling, extracting and calculating corresponding fields, and updating the metadata and the association between data.
[0073] Optionally, in one embodiment, each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between the metadata is represented by a directed edge between the data nodes corresponding to the metadata; On this basis, the associated data analysis module is specifically used to obtain the neighbor data nodes of the first data node according to the directed edges between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph; identify the target neighbor data nodes that depend on the first data node based on the attribute values of the metadata of each of the neighbor data nodes; and obtain associated metadata associated with the target metadata based on the target neighbor data nodes corresponding to each of the first data nodes.
[0074] Optionally, in one embodiment, the associated data analysis module is specifically used to traverse each neighbor data node; search for the attribute value corresponding to the attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; if the attribute value depends on the metadata of the first data node, then identify the neighbor data node as the target neighbor data node.
[0075] Optionally, in one embodiment, the associated data analysis module is specifically used to perform intersection processing on an intermediate data node set consisting of target neighbor data nodes corresponding to each first data node and a changed data node set consisting of the first data node to obtain a first set; perform difference calculation on the intermediate data node set and the first set to obtain a second set; perform union processing on the second set and the changed data node set to obtain an associated data node set, and the metadata corresponding to the data nodes in the associated data node set is the associated metadata.
[0076] Optionally, in one embodiment, the metadata calculation module is specifically used to obtain, for each associated metadata, target change data that causes the associated metadata to change from the change data; and recalculate the associated metadata according to the target change data and the data model corresponding to the associated metadata to obtain the data to be updated.
[0077] As a result, by providing the above-mentioned automatic metadata-based knowledge fusion system, when it is found that the original data has changed, in addition to updating the corresponding metadata in the metadata knowledge graph based on the changed data, the related associated metadata can also be located from the metadata knowledge graph based on the changed data, and then the related metadata is recalculated based on the changed data and updated to the metadata knowledge graph, thereby realizing the data fusion requirements when multi-source data is updated, and solving the problems of high cost caused by multiple manual operations and omissions in the fusion process.
[0078] In order to better understand the knowledge fusion method based on automatic metadata provided by any embodiment of the present application, the method is applied to the knowledge base required for the real-time strategy game of drone game confrontation as an example for explanation. In the real-time strategy game of drone game confrontation, game players must adopt effective solutions to defeat their opponents and win under the constraints of certain resources (such as gold coins). Assume that a metadata knowledge graph is constructed around the player's offensive plan, referred to as the knowledge base. The knowledge base includes three types of source data: plans, actions, and weapons, and each type of original data may include multiple original evidences, and the knowledge base maintains the costs of different offensive plans for players' reference. When new weapons are added to the game platform or weapon parameters are modified, it is crucial for game players to consider how to autonomously integrate such new knowledge in the metadata knowledge graph without manual modification, and automatically update other associated knowledge.
[0079] For example, the goal of a game player is to use various types of drones to attack an opponent's ship. The game platform originally has weapons such as "drones" and "jammers", and the knowledge base has maintained "attack ships", "jamming suppression" actions and "suppression strike" plans based on the characteristics and costs of these weapons. When the game platform adds two new types of weapons, "battleships" and "submarines", the game platform can use the automatic metadata-based knowledge fusion method provided by this application to update the metadata knowledge graph.
[0080] First, the game platform can also store the three types of source data, weapons, actions, and plans, in layers according to the original data and metadata. In the original data layer, the weapon data mainly describes the attribute parameters of the weapon, which belongs to relational data and can be stored in In the database, actions and plans mainly describe the logical process and belong to script file data, which can be stored in file database.
[0081] For the metadata layer, the metadata and the relationship between metadata built based on the knowledge graph can be referred to Figure 4 As shown, the data nodes corresponding to the circles represent knowledge, and the dotted boxes represent the metadata of the knowledge. For example, the "Flying Dragon 1" drone has strike capability and costs 200 gold coins, and the "Mist 1" drone has interference capability and costs 150 gold coins. The directed edges represent the association between knowledge, that is, the relationship between data nodes and metadata. For example, there is a "weapon composition" relationship between "interference suppression action" and "Mist 1" drone. The above knowledge is the above weapons, actions, and plans. The modeling design of metadata and association relationships is as follows: The associations among the three types of knowledge, namely weapons, actions and plans, are all directed relationships, as shown in Table 1. From the "Plan" data node to the "Action" data node, there is an "Action Composition" relationship between "Plan" and "Action", which indicates which actions a plan includes; from "Action" to "Weapon", there is a "Weapon Composition" relationship between "Action" and "Weapon", which indicates which weapons are used in an action.
[0082] Table 1
[0083] Optionally, the metadata of the weapon knowledge may include, but is not limited to, elements such as name, type, price or cost. An example of 3 including 3 elements is used for illustration, as shown in Table 2: Table 2
[0084] The metadata of the above action knowledge may include, but is not limited to, elements such as name, weapons used, and cost. Taking the three elements as an example, reference is made to Table 3, where: A collection of weapon types that this action applies to; Indicates the cost of the weapons used in the action. It is a calculation function. It can be the above data model corresponding to the metadata of the action. It is used to indicate that if the data node corresponding to the current action has a "weapon composition" type relationship pointing to a data node ,and of The attribute belongs to the set of weapon types applicable to the current action data node , then all Cost The sum is the cost of the current action, which can be expressed by the following formula. Figure 4 In the game, the cost of the "Attack Ships" operation is the cost of the "Flying Dragon 1" drone weapon used, 200 gold coins.
[0085] Table 3
[0086] Among them, the above The calculation process is as follows:
[0087] Among them, the above Used to represent the current data node.
[0088] In addition, the metadata of the above scheme knowledge may include, but is not limited to, elements such as name and cost, and these two elements are used as an example for explanation, as shown in Table 4. The total cost of the actions included in the plan is calculated by the sum of the costs of all the actions associated with it, which can be represented by the following formula. Figure 4 In the game, the cost of the "Suppression Strike" plan is the sum of the costs of the "Strike Ship" action and the "Disruption Suppression" action associated with the plan, which is 350 gold coins.
[0089] Table 4
[0090] in, Represents a data node No. Neighbor data nodes.
[0091] exist Figure 4Based on the metadata knowledge graph shown in the figure, when the game platform adds two types of weapons, "battleship" and "submarine", that is, when there is changed original data, each module in the game platform can update the corresponding metadata according to the above-mentioned automatic metadata-based knowledge fusion method. The interaction process between the data monitoring module, the associated data analysis module, the metadata calculation module and the metadata update module is as follows: (1) Data monitoring module: Continuously monitor the changes in the original data layer. When the two types of weapons, "destroyer" and "submarine", are added to the database in the original data layer, the module can promptly identify and track the data changes. When the original data changes, for example, in this embodiment, new original data is added, two corresponding data nodes can be added to the metadata knowledge graph of the metadata layer, such as Figure 5 The "Jiaolong 1" and "Shenqian 1" are from the Chinese space program.
[0092] (2) Related data analysis module: Based on the change data located by the data monitoring module, analyze which data nodes in the metadata knowledge graph have data dependencies on the two newly added data nodes. According to the relevant algorithm described above, it can be found that the type of weapon applicable to the data node "strike ship" action contains "destroyer", and the newly added Jiaolong 1 data node belongs to this type, so the "strike ship action" data node adds a "weapon composition" edge pointing to the "Jiaolong 1" node, while the "deep dive 1" data node has no relationship with other data nodes in the metadata knowledge graph, so it is still an isolated node, such as Figure 6 Then according to the dependency transfer relationship of Jiaolong 1 attribute data, it can be found that there are two nodes of "strike ship action" and the "Suppression Strikes" node Need to update, such as Figure 6 shown.
[0093] (3) Metadata calculation module: Based on the change data set obtained by the associated data analysis module, recalculate based on the functions in Tables 3 and 4 and Metadata, 300 and 450 respectively, please refer to the results Figure 6 shown.
[0094] (4) Metadata update module: updates the association between the recalculated metadata and data into the metadata knowledge graph of the metadata layer.
[0095] From the above operations, it can be seen that when new knowledge data is added or modified, it can automatically discover its changes and analyze the correlation with other data, automatically update and aggregate it into the overall metadata knowledge graph, avoiding manual operations, improving efficiency and reducing costs.
[0096] In one embodiment, a computing device is provided. The computing device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown. The computing device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computing device is used to provide computing and control capabilities. The memory of the computing device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computing device is used to store data. The network interface of the computing device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method and device for evaluating the flexibility of a network structure are implemented.
[0097] In one embodiment, a computing device is provided. The computing device may be a terminal or a server. The internal structure diagram thereof may be as follows: Figure 7 As shown. The computing device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computing device is used to provide computing and control capabilities. The memory of the computing device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computing device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method and device for scene situation assembly with adaptive demand is implemented. The display screen of the computing device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computing device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the housing of the computing device, or an external keyboard, touchpad or mouse, etc.
[0098] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present application, and does not constitute a limitation on the computing device to which the scheme of the present application is applied. The specific computing device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0099] In one embodiment, a computing device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps of the method described in any of the above embodiments when executing the computer program.
[0100] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in any of the above embodiments are implemented.
[0101] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0102] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0103] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A knowledge fusion method based on automatic metadata, characterized in that: Applied to an electronic device serving a target scenario, the method comprises: When it is detected that the original data in the original data layer corresponding to the target scene changes, obtaining the changed data; According to the change data, the corresponding target metadata is searched from the metadata knowledge graph stored in the metadata layer corresponding to the target scene; According to the association relationship existing in the metadata knowledge graph of the target metadata, obtaining associated metadata associated with the target metadata; Recalculating the associated metadata based on the changed data to obtain data to be updated; The target metadata is updated based on the changed data, and the target metadata and the data to be updated are updated into the metadata knowledge graph.
2. The method according to claim 1, characterized in that: Each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between metadata is represented by directed edges between the data nodes corresponding to the metadata; According to the association relationship between the target metadata in the metadata knowledge graph, obtaining the associated metadata associated with the target metadata includes: Obtaining neighbor data nodes of the first data node according to the directed edges between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph; Based on the attribute value of the metadata of each of the neighbor data nodes, identifying a target neighbor data node that depends on the first data node; Based on the target neighbor data nodes respectively corresponding to the first data nodes, associated metadata associated with the target metadata is obtained.
3. The method according to claim 2, characterized in that Based on the attribute value of the metadata of each of the neighbor data nodes, identifying a target neighbor data node that depends on the first data node includes: Traverse each neighbor data node; Searching for an attribute value corresponding to an attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; If the attribute value depends on the metadata of the first data node, the neighbor data node is identified as the target neighbor data node.
4. The method according to claim 2, characterized in that: Based on the target neighbor data nodes respectively corresponding to the first data nodes, obtaining associated metadata associated with the target metadata includes: Performing intersection processing on an intermediate data node set consisting of target neighbor data nodes corresponding to each first data node and a changed data node set consisting of the first data node to obtain a first set; Performing a difference calculation on the intermediate data node set and the first set to obtain a second set; The second set and the changed data node set are subjected to a union process to obtain an associated data node set, wherein metadata corresponding to the data nodes in the associated data node set are the associated metadata.
5. The method according to claim 2, characterized in that: Recalculating the associated metadata based on the changed data to obtain data to be updated includes: For each associated metadata, obtaining target change data causing the associated metadata to change from the change data; According to the target change data and the data model corresponding to the associated metadata, the associated metadata is recalculated to obtain the data to be updated.
6. A knowledge fusion system based on automatic metadata, characterized in that: Applied to an electronic device serving a target scenario, the system comprises: A data monitoring module, used for obtaining change data when detecting that the original data in the original data layer corresponding to the target scene changes; The associated data analysis module is used to find the corresponding target metadata from the metadata knowledge graph stored in the metadata layer corresponding to the target scene according to the change data; and obtain the associated metadata associated with the target metadata according to the association relationship existing in the metadata knowledge graph of the target metadata; A metadata calculation module, used for recalculating the associated metadata based on the changed data to obtain data to be updated; The metadata updating module is used to update the target metadata based on the changed data, and update the target metadata and the data to be updated into the metadata knowledge graph.
7. The system according to claim 6, characterized in that Each metadata included in the metadata knowledge graph corresponds to a data node, and the association relationship between metadata is represented by directed edges between the data nodes corresponding to the metadata; The associated data analysis module is specifically used to obtain neighbor data nodes of the first data node according to the directed edges between the first data node corresponding to the target metadata and the data nodes included in the metadata knowledge graph; based on the attribute values of the metadata of each of the neighbor data nodes, identify the target neighbor data nodes that depend on the first data node; Based on the target neighbor data nodes respectively corresponding to the first data nodes, associated metadata associated with the target metadata is obtained.
8. The system according to claim 7, characterized in that The associated data analysis module is specifically used to traverse each neighbor data node; search for an attribute value corresponding to an attribute included in the metadata of the neighbor data node from the attribute field set corresponding to the neighbor data node; If the attribute value depends on the metadata of the first data node, the neighbor data node is identified as the target neighbor data node.
9. The system according to claim 7, characterized in that The associated data analysis module is specifically used to perform intersection processing on an intermediate data node set consisting of target neighbor data nodes corresponding to each first data node and a changed data node set consisting of the first data node to obtain a first set; perform difference calculation on the intermediate data node set and the first set to obtain a second set; perform union processing on the second set and the changed data node set to obtain an associated data node set, and the metadata corresponding to the data nodes in the associated data node set is the associated metadata.
10. The system according to claim 7, characterized in that The metadata calculation module is specifically used to obtain, for each associated metadata, target change data that causes the associated metadata to change from the change data; and recalculate the associated metadata according to the target change data and the data model corresponding to the associated metadata to obtain the data to be updated.
Citation Information
Patent Citations
Data management method and device, computer equipment, readable storage medium and program product
CN118863031A
Method and device for updating entity type in knowledge graph and computer equipment
CN119046472A
Method, apparatus, device and storage medium for constructing knowledge graph
US20210334669A1