Incremental knowledge graph updating and consistency verification system for industrial field
Through the incremental knowledge graph update and consistency verification system for the industrial field, the problem of large consumption and consistency of computing resources under the traditional full update mode is solved, and real-time update and efficient maintenance of knowledge graphs are achieved.
Patent Information
- Application Number
- CN202510354067.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-25
- Publication Date
- 2025-04-22
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The full update mode of the traditional industrial knowledge graph consumes huge computing resources and time, and it is difficult to reflect the dynamic changes of industrial factors in real time, resulting in a decrease in application efficiency. At the same time, existing verification mechanisms are difficult to deal with potential logical conflicts and semantic ambiguity in industrial knowledge updates.
An incremental knowledge graph update and consistency verification system for the industrial field is proposed, including data monitoring module, knowledge conversion module, incremental update module, consistency verification module and knowledge traceability module. By monitoring data changes in real time, calculating update priorities, performing multiple consistency verification, and building a knowledge change link map to achieve version rollback.
It significantly reduces computing resource consumption, improves update efficiency, ensures the logical and semantic consistency of the knowledge graph, and realizes real-time update and reliable maintenance of the knowledge graph.
Smart Images

Figure CN119862195A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the industrial field and relates to knowledge graph technology, specifically an incremental knowledge graph update and consistency verification system for the industrial field. Background Art
[0002] In the industrial field, knowledge graphs are a structured representation of industrial knowledge and are crucial to industrial production, management, decision-making and other links. However, the current update of industrial knowledge graphs mostly adopts a periodic full update mode. In industrial scenarios, data changes frequently, such as fluctuations in raw material prices, improvements in product production processes, and real-time changes in supply chain information. When data changes, a full update requires a full reconstruction of the knowledge graph, which not only consumes huge computing resources and time, but also poses a severe challenge to system performance. The timeliness of this mechanism is seriously lagging, making it difficult for the knowledge graph to reflect the dynamic changes of industrial elements in real time, significantly reducing its application efficiency in scenarios such as production scheduling and cost control. Taking the automotive manufacturing industry as an example, if the real-time dynamics of key data such as the delivery cycle and inventory level of parts suppliers cannot be integrated into the knowledge graph in a timely manner, it will directly affect the accuracy of production scheduling and the efficiency of supply chain collaboration.
[0003] On the other hand, the industrial knowledge system has complex characteristics of multimodality, cross-domain, and strong correlation, and its consistency verification requirements far exceed the capabilities of traditional simple rule verification. Existing verification mechanisms mostly rely on static constraint rules, which are difficult to deal with potential logical conflicts and semantic ambiguities in the process of updating industrial knowledge. Taking the development of aircraft engines as an example, there is a complex constraint relationship between the material parameters of turbine blades and the thermodynamic model of the combustion chamber. If the update process does not implement multi-dimensional consistency verification, it may lead to parameter conflicts in the design scheme, threatening the safety and reliability of engine operation. The lack of logical completeness and semantic accuracy of the knowledge graph will be transmitted to the production execution system in a chain, causing systemic risks such as quality defects and cost overruns. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art; to this end, the present invention proposes an incremental knowledge graph update and consistency verification system for the industrial field, which is used to solve technical problems such as high resource consumption and difficulty in ensuring knowledge consistency in the traditional full update mode.
[0005] To achieve the above objectives, the present invention provides an incremental knowledge graph update and consistency verification system for the industrial field, including: Data monitoring module: used to monitor the original industrial data using distributed data listeners to obtain new data, old data and data change sets; Knowledge conversion module: used to convert new data and old data into structured data according to a preset knowledge extraction rule set, and map the structured data of new and old data into triples according to a preset mapping rule to obtain a triple change set; Incremental update module: used to calculate the update priority of several attributes in the triple change set, and obtain the first update map according to the update priority; The consistency verification module is used to perform multiple consistency verifications on the first update map, and modify the first update map according to the verification results to obtain the second update map; Knowledge tracing module: used to construct a knowledge change link graph based on the first update graph and the second update graph, and to perform rollback verification on the knowledge change link graph.
[0006] Furthermore, the monitoring of the original industrial data includes: According to the monitoring formula Calculate the change set of raw industrial data , get the new data, old data and data change set ;in, Represents the data state of the new data at time t, Indicates the data status of old data at time t-1; wherein the original industrial data includes: industrial data obtained through ERP system, supply chain system, etc.; Determine the data change set Is it empty? If yes, the original industrial data is marked as unchanged. If no, the data change set is classified according to the change of the original industrial data to obtain the change type.
[0007] Furthermore, the data change set is classified according to the change of the original industrial data, including: a newly added data set, a modified data set and a deleted data set; wherein, The definition of the new data set is ; Modify the definition of the data set to ; The definition of deleting a data set is ;in, Represents a single data item in the original industrial data, and t represents the time.
[0008] By accurately calculating the data change set through the monitoring formula, the changes in the original industrial data can be captured in a timely and comprehensive manner to avoid data omissions or misjudgments. At the same time, the data change set is classified to refine the specific circumstances of the data change, making subsequent processing more targeted. Different types of change data (addition, modification, deletion) have different processing logics in the knowledge extraction, conversion and update stages. Classification processing can improve the accuracy and efficiency of processing.
[0009] Furthermore, mapping the structured data of the new data and the old data into triples respectively according to the preset mapping rules includes: Extract several entities from the data change set and design a knowledge extraction rule set based on the entities ;in, represents the knowledge extraction rule, that is, the knowledge content that needs to be extracted in the data change set according to the entity, and n represents the number of entities; According to the knowledge extraction rule set, the new and old data are converted to obtain structured data of the new and old data; Formulate preset mapping rules, map the structured data of new and old data into triples according to the preset conversion rules, and obtain the triple set K of new and old data new and K old ; where K={<s,p,o> s∈Entities,p∈Properties,o∈(Entities∪Literals)}, s represents entity, p represents property, including predicate or relationship, o represents object, Entities represents entity set, including several industrial product material entities in industrial data, Properties represents property set, including several defined properties and relationships, Literals represents literal value set, including numeric value, string, date and time value, Boolean value, enumeration value, etc.; Difference calculation is performed on the triple sets of new and old data to obtain the triple change set .
[0010] Furthermore, the preset mapping rule includes: Define rule A: According to the mapping rule "item_id→entityID(s)", the unique identifier of the data item item_id is mapped to the entity ID; Definition rule B: According to the mapping rule "category→<s,rdf:type,o> ", maps the category of the data item to the type triple of the entity<s,rdf:type,o> ; where "s,rdf:type,o" means "entity s is object o", and "rdf:type" means the relationship "is"; Definition rule C: According to the mapping rule "specs.→<s,has_,value> ", convert all attributes of the specification field in the data item into triples of the "has_attribute name" relationship; The data items represent several elements in structured knowledge.
[0011] The preset mapping rules provide clear guidance for the conversion of data to knowledge graph elements, ensuring the accuracy and consistency of data conversion, so that different data items can be mapped to the entities, attributes and relationships of the knowledge graph according to unified standards, avoiding confusion and errors in the conversion process; among them, Rule A maps the unique identifier of the data item to the entity ID, which is convenient for unique identification and management of the entity; Rule B determines the type of the entity, which helps to clarify the classification and hierarchical relationship of the entity in the knowledge graph; Rule C converts the attributes of the specification field into triples of specific relationships, enriching the attribute description of the entity in the knowledge graph.
[0012] Furthermore, the preset mapping rules also include attribute value type mapping rules, which are used to perform mapping processing according to the type of the attribute field of the data item, including: "value→xsd:double / float / integer" means mapping the numeric data item attribute value to the specified numeric type according to the data type; the numeric types include double-precision floating point type double, character type float, and integer type integer; "value→xsd:string" means mapping the text-type data item attribute value to the string type string; "value+unit→quantity" means mapping the attribute value of a physical quantity data item with a unit to a quantity type quantity containing a value and a unit; Among them, value represents the attribute field of the data item, and xsd represents the namespace prefix, which is used to clarify the data type.
[0013] Furthermore, the calculation of the update priority of several attributes in the triple change set includes: Build a knowledge graph based on the triple change set and record the initial version number of the knowledge graph; Using a graph pattern mining algorithm to learn dependency relationships from a knowledge graph, a dependency type between several attributes is obtained; wherein the attribute is an element p of an attribute set in a triple change set; The dependency level is set according to the dependency type; wherein the dependency level includes a dependent node level, a dependent node level, and a non-dependency node level, and the dependent node level is 2, the dependent node level is 0, and the non-dependency node level is 1; Determine the change knowledge item k j ∈ The change type and dependency level dependency_level, and according to the formula Pr(k j )=type_weight+dependency_level to calculate the update priority Pr; where type_weight represents the change weight, including the basic information change weight, the association change weight and the description information change weight, and the basic attribute change weight is 3; the association change weight is 2; and the description information change weight is 1.
[0014] By considering dependencies and change types to calculate update priorities, a reasonable execution order is provided for incremental updates. In the actual knowledge graph update process, the update priority determines the processing order of each changed knowledge item, ensuring that the knowledge graph can maintain the correct logical relationship during the update process, improving the quality and efficiency of the update.
[0015] Further, obtaining the first update map according to the update priority includes: Initialize an empty priority queue; Change knowledge item k j ∈ Insert into PQ and update the priority Pr(k j ) are arranged in descending order, and for the changed knowledge items with the same priority, they are sorted in descending order according to the timestamps to obtain the priority queue PQ; Data items are extracted from the priority queue PQ in sequence, and knowledge verification and knowledge merging are performed on the data items according to the change type to obtain a first update graph; wherein the knowledge verification includes attribute value type verification, attribute value range verification, association relationship verification, and required attribute verification.
[0016] Furthermore, the knowledge verification and knowledge merging according to the change type includes: The knowledge verification items for the newly added data set CREATE are: Con j =K new ∪{k j}, for Con j Perform knowledge verification. If the verification passes, k j Merge to K new and record the updated version number; The knowledge verification items for modifying the data set UPDATE are: Con j =K new -{K old (j)}∪{k j}, for Con j Perform knowledge verification. If the verification passes, use Knew (j) Replace K old (j) and record the updated version number; where K old (j)∈K old , indicating that K old The jth data item of ; The knowledge verification items for deleting the data set DELETE are: Con j =K new -{k j}, for Con j Perform knowledge verification. If the verification passes, then new Delete k j , and record the updated version number.
[0017] Furthermore, the multiple consistency verification includes: Count the number of direct parent concepts of each entity in the first updated graph. If the number of parent concepts is greater than 1, mark it as a multiple inheritance entity. Multiple consistency verification is performed on the attributes, constraints and semantic rules of multiple inheritance entities according to the inheritance relationship and update priority order, including: Attribute conflict verification: define the attribute set of concept b as: Attrs(b): C->{(name, type)}, define the data type of attribute a in concept b as: Type(ba); When Attrs(b1)∩Attrs(b2)≠ When a∈(Attrs(b1)∩Attrs(b2)),Type(b1.a)≠Type(b2.a), it is determined as an attribute conflict; where name represents the name of the attribute, and type represents the data type of the attribute. Constraint conflict verification: Define the constraint set of concept b as: Constraints(b):C->{constraint}, and constraint=<attribute,operator, value> ; Among them, constraint expresses constraints, including attribute constraints attribute, operator constraints operator and value constraints value; For c1∈Constraints(b1),c2∈Constraints(b2), when c1 When c2=false, it is determined to be a constraint conflict; Semantic conflict verification: Define the semantic rule set of concept b as: Semantics(b): C->{semantic_rule}, and semantic_rule=<condition,implication> ; Among them, semantic_rule represents the semantic rule, including condition and implication; For sr1∈Semantics(b1),sr2∈Semantics(b2), when sr1.implication sr2.implication=false, it is judged as a semantic conflict; When any two conflicts occur in the multiple consistency verification results, the first update map is modified according to the conflict content and the update version number is recorded.
[0018] Consistency verification from multiple levels such as attributes, constraints and semantics can comprehensively check the logical and semantic consistency of the knowledge graph, deeply discover potential conflicts and errors, effectively improve the quality and reliability of the knowledge graph, and ensure the logical correctness and semantic rationality of the knowledge graph.
[0019] Furthermore, the rollback verification of the knowledge change link graph includes: The mathematical definition of the change link is: G=(V,E); where G represents the change link graph, E represents the change operation edge between versions, V={v1,v2,…,vm} represents the set of version nodes, and the attributes of the version node v∈V include: version number, timestamp, operator, change type, change entity ID, change content, and parent version number; Generate a knowledge change link graph according to the update operations and update version numbers of the first update graph and the second update graph; Perform backtracking search based on the change operation edge of the knowledge change link graph to determine the path from the current version to the target version and obtain the rollback path; Traverse several version nodes on the rollback path, collect the attributes of each version node, sort them in reverse order according to the timestamp, and obtain the reverse operation sequence; Roll back the second updated graph in turn according to the reverse operation sequence, and perform multiple consistency verifications on the knowledge graph after the rollback to obtain a verification result; The state of the knowledge graph after rollback is compared with the state of the target version, and error information is recorded according to the comparison and verification results to obtain the rollback verification result.
[0020] When encountering update errors, system failures or other situations that require backtracking, the rollback verification mechanism can restore the state of the knowledge graph through a rollback operation, reducing data loss and errors caused by erroneous operations or failures. At the same time, it ensures that the knowledge graph after the rollback meets the requirements through verification, providing guarantee for the stable operation of the system.
[0021] Compared with the prior art, the present invention has the following beneficial effects: The present invention replaces the traditional full update mode with incremental updates, significantly reducing computing resource consumption. The system monitors data changes in real time and only processes the changed knowledge, effectively reducing the system's resource usage; and through the priority queue mechanism, ensures that basic attribute changes are processed first and dependencies are correctly executed, further optimizing the update process; The present invention constructs a multi-dimensional consistency verification framework, which comprehensively guarantees the logical and semantic consistency of the knowledge graph through concept hierarchy verification, attribute definition conflict detection, constraint conflict detection and semantic conflict detection at the ontology level, and effectively solves the problem that simple verification rules in the prior art cannot handle complex industrial knowledge systems. The present invention realizes a complete knowledge change link diagram and version rollback function through knowledge traceability and version control mechanism. The version node records the detailed information of each change, and the rollback mechanism supports accurate recovery to the historical version, reducing the problem location time and system maintenance cost. In addition, this mechanism not only supports version management, but also can quickly recover when an update error occurs, significantly enhancing the maintainability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0023] Figure 1 A schematic diagram of the process of the incremental knowledge graph update and consistency verification system for the industrial field provided by the present invention; Figure 2 A schematic diagram of the framework of the incremental knowledge graph update and consistency verification system for the industrial field provided by the present invention; Figure 3 A schematic diagram of the workflow of the knowledge tracing module provided by the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] See also Figure 1 - Figure 3 The first embodiment of the present invention provides an incremental knowledge graph update and consistency verification system for the industrial field, including: Data monitoring module: used to monitor the original industrial data using distributed data listeners to obtain new data, old data and data change sets; wherein the data change set includes the old data before the change and the new data after the change; Knowledge conversion module: used to convert new data and old data into structured data according to a preset knowledge extraction rule set, and map the structured data of new and old data into triples according to a preset mapping rule to obtain a triple change set; Incremental update module: used to calculate the update priority of several attributes in the triple change set, and obtain the first update map according to the update priority; The consistency verification module is used to perform multiple consistency verifications on the first update map, and modify the first update map according to the verification results to obtain the second update map; Knowledge tracing module: used to construct a knowledge change link graph based on the first update graph and the second update graph, and to perform rollback verification on the knowledge change link graph.
[0026] It should be noted that the data monitoring module, knowledge conversion module, incremental update module, consistency verification module and knowledge tracing module of the present invention are in communication connection.
[0027] Based on the above technical modules, the present invention realizes efficient updating and reliable maintenance of knowledge graphs in the industrial field. Among them, the data monitoring module captures the dynamic changes of the original industrial data in real time to provide the system with accurate change data input; the knowledge conversion module structures the new and old data and maps them into triples, laying the foundation for the update of the knowledge graph; the incremental update module calculates the update priority to ensure that key changes are executed first, significantly reducing resource consumption; the consistency verification module performs logical verification of the update content from multiple dimensions to ensure the accuracy of the knowledge graph; the knowledge traceability module realizes the full process traceability and rapid rollback of knowledge changes by constructing a version link diagram.
[0028] In the industrial knowledge graph system, in order to capture industrial data changes in real time and support incremental updates, data monitoring is performed by deploying distributed data listeners at the data source. Specifically, the operation process of the data monitoring module includes: Deploy distributed data listeners on industrial data sources (such as ERP systems, supply chain systems, equipment sensors, etc.) to continuously collect the real-time data status D(t) at time t and the historical data status D(t-1) at time t-1; Based on the monitoring formula ΔD(t)=D(t)-D(t-1), the difference between two time points is calculated to generate a data change set ΔD(t). This set contains all data items that have changed at time t; Determine whether the change set is empty. If so, mark the original industrial data as "unchanged" and no subsequent update process needs to be triggered; If ΔD(t) is not empty, the data item is classified according to its change characteristics: New data set (CREATE): contains data items that appear for the first time at time t, that is, di∈D(t) but di D(t-1) can be expressed as: ; Modify the data set (UPDATE): Contains data items that exist at time t and time t-1 but whose attribute values have changed, that is, di∈D(t) and di∈D(t-1) but di(t)≠di(t-1), which can be expressed as ; Delete data set (DELETE): contains data items that exist at time t-1 but disappear at time t, that is, di∈D(t-1) but di D(t), can be expressed as .
[0029] The following is an example of calculating a set of data changes: Assume that the old data of an industrial data source at time t-1 is: D(t-1)=[{"item_id":"P001","type":"bearing", "size": "80×160×250mm", "color":"silver gray"}, {"item_id":"P002","type":"Motor","power":"5kW"}] At time t, the data source changes as follows: 1. New: Added bearing P003, size is "100×200×300mm", color is "dark gray".
[0030] 2. Modification: The size of bearing P001 is changed to "100×200×300mm" and the color is changed to "dark gray".
[0031] 3. Delete: Motor P002 is removed.
[0032] Then, the obtained data change set ΔD(t) is: ΔD(t)=[ / / Add new data items {"item_id":"P003","type":"Bearing", "size":"100×200×300mm", "color":"Dark gray"}, / / Modify data items {"item_id":"P001","type":"Bearing", "size":"100×200×300mm", "color":"Dark gray"}, / / Delete data items (reflected by marking) {"item_id":"P002","deleted":true}] Classification results: CREATE collection: contains the complete data of P003.
[0033] UPDATE collection: Contains the comparison of the new and old attributes of P001 (for example, size changes from "80×160×250mm" to "100×200×300mm").
[0034] DELETE collection: contains the identifier and deletion mark of P002.
[0035] The traditional full update mode requires the reconstruction of the entire knowledge graph, which consumes a lot of resources and is inefficient. Data monitoring can accurately locate data changes and identify new, modified, and deleted data items. Based on this information, the system can update only the changed parts, avoiding repeated processing of unchanged data, and can significantly shorten the data update time from hours to minutes, significantly improving update efficiency.
[0036] In order to ensure efficient processing and updating of industrial knowledge and realize effective management and application of knowledge, in the knowledge conversion module, industrial data is converted into structured data, and the structured data is mapped into triples according to the preset mapping rules to obtain the triple change set; Specifically, we first extract several entities from the data change set and design a knowledge extraction rule set for these entities. ;in, It represents a knowledge extraction rule. n represents the number of entities. Different entities correspond to different extraction rules to accurately obtain the required knowledge content; For example, in industrial material data, entities such as "motor" and "bearing" may be extracted.
[0037] For the "motor" entity, design rule r1: IF item_type = "motor" THEN extract(power, speed, voltage, protection level); For the "bearing" entity, design rule r2: IF item_type = "bearing" THEN extract(model, size, material, precision level), etc.; Then, according to the designed knowledge extraction rule set, convert the new and old data; Suppose there is a record about a motor in the new data: "A certain motor, model M001, power 5kW, speed 1500r / min, voltage 380V, protection level IP54"; According to the above rules, it can be converted into structured data: {"item_id": "M001", "category": "motor", "name": "A certain motor", "specs": {"power": "5kW", "speed": "1500r / min", "voltage": "380V", "protection level": "IP54"}}. The same conversion operation is also performed on the old data to obtain the structured data of the new and old data respectively; Then formulate preset mapping rules, and according to these rules, map the structured data of the new and old data into triples respectively: Application of Rule A: According to the "item_id → entityID(s)" rule, map the "item_id" of the above motor data with "M001" to the entity ID, and obtain a triple representing the entity type such as "<M001, rdf:type, motor>"; Application of Rule B: According to the "category → <s, rdf:type, o>" rule, confirm the mapping of the "motor" category again to further clarify the type relationship of the entity; Application of Rule C: According to the "specs. → <s, has_, value>" rule, convert the attributes in the "specs" field into corresponding triples, such as "<M001, has_power, 5kW>", "<M001, has_speed, 1500r / min>", "<M001, has_voltage, 380V>", "<M001, has_protection level, IP54>". Through the application of these rules, obtain the triple set K of the new data new ; Perform the same operation on the old data to obtain Kold ; And perform type mapping processing on the property values in the triple according to the property value type mapping rules; For the numerical "power" property value "5kW", first map the numerical value "5" to the specified numerical type, such as "<M001,has_power_value,\"5\"^^xsd:float>"; For the text-based "protection level" property value "IP54", map it to the string type "<M001,has_protection_level,\"IP54\"^^xsd:string>"; For the "power" property value with a unit, map it to "<M001,has_power,quantity(5,\"kW\")>" according to the "value+unit→quantity" rule; Finally, perform a difference calculation on the triple sets of the new and old data, that is =K new -K old , to obtain the triple change set; Subsequently, the change set will be promptly fed back to the knowledge graph update module to achieve dynamic update of the knowledge graph, thereby providing accurate and up-to-date knowledge support for equipment management, procurement decision-making, maintenance plan formulation, etc. in industrial production, and improving the intelligent level and management efficiency of industrial production.
[0038] In this embodiment, the preset mapping rules can be implemented through the following code: def apply_rule(rule, data): # rule represents the mapping rule, data represents the data item if rule.id == "r1": # Rule A return data["item_id"] elif rule.id == "r2": # Rule B entity_id = data["item_id"] return [(entity_id, "rdf:type", data["category"])] elif rule.id == "r3": # Rule C entity_id = data["item_id"] triples = [] for key, value in data["specs"].items(): triples.append((entity_id, f"has_{key}", value)) return triples # Other rules... return [] Data in the industrial field changes frequently, and a full update requires rebuilding the entire knowledge graph, which consumes a lot of computing resources and time, and has extremely high requirements on system performance. It is also difficult to reflect the latest information in real time. Therefore, in this system, an incremental update mechanism is adopted to arrange the order of knowledge updates by calculating the update priority of the knowledge graph.
[0039] In the incremental update module, the update priority of knowledge changes needs to be calculated first, which can include the following steps: Build a knowledge graph based on the triple change set and record the initial version number of the knowledge graph; Using graph pattern mining algorithms to learn dependency relationships from knowledge graphs, we obtain dependency types between several attributes to help understand the associations between different attributes; where the attribute is an element p of the attribute set in the triple change set; The dependency level is set according to the dependency type; wherein the dependency level includes a dependent node level, a dependent node level, and a non-dependency node level, and the dependent node level is 2, the dependent node level is 0, and the non-dependency node level is 1; Determine the change knowledge item k j ∈ The change type and dependency level dependency_level, and according to the formula Pr(k j )=type_weight+dependency_level to calculate the update priority Pr; where type_weight represents the change weight, including the basic information change weight, the association change weight and the description change weight, and the basic attribute change weight is 3; the association change weight is 2; and the description change weight is 1; Then, according to the calculated update priority, a first update graph is constructed, which may specifically include the following steps: Initialize an empty priority queue to sort the changed knowledge items; Change knowledge item k j ∈ Insert into PQ and update the priority Pr(k j ) are arranged in descending order, and for the changed knowledge items with the same priority, they are sorted in descending order according to the timestamp to obtain the priority queue PQ; According to the change type, knowledge verification and knowledge merging are performed to obtain the first update graph. The specific code is as follows: FOR EACH kj IN ΔK: IF kj.type == "ADD": IF Consistent(K new ∪ {kj}): / / Verify whether it is consistent after adding K new = K new ∪ {kj} ELSE IF kj.type == "UPDATE": old_triple = find_triple(K new , kj.subject, kj.predicate) IF Consistent(K new - {K old (j} ∪ {kj}): / / Verify whether the update is consistent K new = K new - {old_triple} ∪ {kj} ELSE IF kj.type == "DELETE": IF Consistent(K new - {kj}): / / Verify whether it is consistent after deletion K new = K - {kj} In the above code, Consistent represents the knowledge verification function, including attribute value type test, attribute value range test, association relationship test, and required attribute test, as follows: (1) Attribute value type check IF kj.predicate == "has_size": MUST match pattern "number×number×numbermm" (2) Attribute value range test IF kj.predicate == "has_precision": kj.object MUST IN ["P0", "P6", "P5", "P4", "P2"] (3) Correlation test IF kj.predicate == "fits_with": verify_size_compatibility(kj.subject, kj.object) (4) Required attribute verification FOR EACH entity IN K new : required_properties = get_required_properties(entity.type) current_properties = get_entity_properties(entity) IF NOT (required_properties current_properties): RETURN false In industrial environments, dynamic changes such as product iteration, process improvement, and equipment failure are frequent, and static knowledge graphs are difficult to meet real-time decision-making needs. Through the above operation process, the incremental update module implements the incremental update mechanism of the knowledge graph, which can quickly respond to changes in data sources, ensure that the knowledge graph always reflects the latest industrial status, and provide accurate and timely knowledge support for decision-making in industrial production.
[0040] There are various logical relationships between knowledge, and updating knowledge may involve the modification or addition of multiple knowledge items. In order to ensure the accuracy, completeness and reliability of the knowledge graph during the update process, and to avoid the introduction of erroneous data, logical conflicts and confusion of the knowledge system due to update operations, the updated knowledge is strictly checked in the consistency verification module through multiple consistency verification mechanisms; Specifically, in the consistency verification module, we first count the number of direct parent concepts of each entity in the first update graph. If the number of parent concepts is greater than 1, it is marked as a multiple inheritance entity: Then, multiple consistency verification is performed on the attributes, constraints and semantic rules of multiple inheritance entities according to the inheritance relationship and update priority order, including: Attribute conflict verification: For multiple inheritance entities, determine the attribute sets of different parent concepts according to the definition. Define the attribute set of concept b as: Attrs(b): C->{(name, type)}, and define the data type of attribute a in concept b as: Type(ba); When (Attrs(b1)∩Attrs(b2)≠ When a∈(Attrs(b1)∩Attrs(b2)),Type(b1.a)≠Type(b2.a)), it is determined as an attribute conflict; where name represents the name of the attribute, and type represents the data type of the attribute; For example, in the example where "Portable Electric Drill" inherits "Power Tools" and "Handheld Devices", the weight attribute data type of "Power Tools" is Number, and the weight attribute data type of "Handheld Devices" is String, which satisfies the attribute conflict judgment condition; Constraint conflict verification: Define the constraint set of concept b as: Constraints(b):C->{constraint}, and constraint=<attribute,operator, value> ; Among them, constraint expresses constraints, including attribute constraints attribute, operator constraints operator and value constraints value; For c1∈Constraints(b1),c2∈Constraints(b2), when c1 When c2=false, it is determined to be a constraint conflict; For example, if the weight constraint of “small motor” is <weight,≤,5kg>, and the weight constraint of “heavy motor” is <weight,≥,8kg>, these two constraints contradict each other and satisfy the constraint conflict judgment; Semantic conflict verification: Define the semantic rule set of concept b as: Semantics(b): C->{semantic_rule}, and semantic_rule=<condition,implication> ; Among them, semantic_rule represents the semantic rule, including condition and implication; For sr1∈Semantics(b1),sr2∈Semantics(b2), when sr1.implication sr2.implication=false, it is judged as a semantic conflict; When any two conflicts occur in the multiple consistency verification results, the first update map is modified according to the conflict content, and the update version number is recorded to obtain the second update map.
[0041] It should be noted that before implementing multiple consistency verification, it also includes a circular inheritance detection on the knowledge graph. The specific operation steps may include: The circular inheritance test is performed on the basis of the concept set C in the field of industrial products and materials, C={c c is a concept in the field of industrial goods and materials. For example, "industrial goods", "machine parts", "bearings", "motors", etc. all belong to this set. The direct sub-concept relationship between two concepts is determined by the basic IsA relationship IsA:C×C→{true,false}. If IsA(c_i,c_j)=true, it means that ci is a direct sub-concept of cj, such as IsA(deep groove ball bearing, bearing)=true; At the same time, the transitive closure IsA+ is used to describe the direct or indirect inheritance relationship between concepts. IsA+(ci,cj)=true if and only if IsA(ci,cj)=true, or there is an intermediate concept ck∈C, such that IsA(ci,ck)=true and IsA+(ck,cj)=true, indicating that there is an inheritance relationship between concept ci and concept cj; for example, IsA+(deep groove ball bearing, mechanical parts)=true, because there is an inheritance path such as "deep groove ball bearing→rolling bearing→bearing→mechanical parts"; For each concept c in the set C, we need to check whether there is a circular inheritance, that is, whether it satisfies ¬IsA+(c,c). In actual operation, we traverse the concept set C, and for each concept, we check whether it has an inheritance relationship with itself through the IsA and IsA+ relationships; Assume that in the process of knowledge graph construction, "bearing" is incorrectly defined to inherit from itself. Then, during detection, it will be found that IsA+(bearing, bearing)=true, which is contrary to the requirement of ¬IsA+(c,c), thus determining that there is a circular inheritance problem. Once a circular inheritance is detected, that is, IsA+(c,c)=true, the concept hierarchy of the knowledge graph needs to be adjusted. It may be necessary to re-examine the definition and inheritance relationship of the concept to check whether the circular inheritance is caused by an error in the concept definition or an improper setting of the inheritance relationship. If the concept definition is vague, resulting in unclear boundaries between concepts, which leads to circular inheritance, it is necessary to redefine the connotation and extension of the concept; if the inheritance relationship is set incorrectly, such as mistakenly setting a concept as its own parent concept, this incorrect inheritance relationship needs to be corrected. Through these measures, ensure that the concept hierarchy of the knowledge graph is logical and avoid confusion and errors in the knowledge graph caused by circular inheritance.
[0042] Through the multiple consistency verification mechanism, the knowledge update can be checked comprehensively and carefully to ensure that each update complies with the rules and requirements of the knowledge graph. By verifying the hierarchical relationship of concepts, such as the use of IsA relationship and its transitive closure IsA+, the direct and indirect inheritance relationship between concepts can be clearly determined. When judging the relationship between concepts such as "deep groove ball bearing" and "bearing" and "mechanical parts", the inheritance hierarchy can be accurately judged to avoid logical confusion. At the same time, ontology reasoning can also detect circular inheritance problems. By requiring ¬IsA+(c,c), it prevents the unreasonable phenomenon of concept inheritance itself and ensures the structural rationality of the knowledge graph. When dealing with multiple inheritance, the knowledge of different parent concepts can be integrated and verified according to the rules of attribute definition, constraints and semantics of multiple inheritance entities to ensure the logical consistency of knowledge in the case of multiple inheritance, make the relationship between knowledge clearer and more reasonable, and improve the quality and reliability of the knowledge graph.
[0043] In industrial production, knowledge changes frequently and has a significant impact. Once a problem occurs, such as a product quality accident related to incorrect information in the knowledge graph, it is difficult to trace the knowledge change process, and it is difficult to determine the root cause of the problem and take effective measures to improve it. At the same time, there is a lack of effective version management and rollback mechanisms. When an update error occurs or needs to be restored to a specific historical state, it is impossible to operate quickly and accurately, affecting the production efficiency and stability of the enterprise.
[0044] Therefore, in the knowledge traceability module, by constructing a knowledge change link diagram, each knowledge change is recorded in detail, and then backtracking verification is performed to ensure the accuracy, traceability of knowledge changes and the stability of the system.
[0045] Specifically, the workflow of the knowledge tracing module may include: According to the update operations and update version numbers of the first update graph and the second update graph, a knowledge change link graph is generated according to the mathematical definition of the change link G=(V,E): Each update operation from the first update graph to the second update graph corresponds to a change operation edge E in the graph, and the knowledge graph state generated by each update corresponds to a version node v in the version node set V. At each update, the updated version number, timestamp, operator performing the operation, change type (whether it is addition, modification or deletion), entity ID involved in the change, specific change content, and the parent version number of the version are recorded as attributes of the version node v; Then, use the change operation edge of the knowledge change link diagram to perform a backtracking search. First, identify the current version and the target version to which you want to roll back. Starting from the current version, search backward along the change operation edge to determine the path from the current version to the target version. This path is the rollback path. In a knowledge graph that contains multiple updates, if the current version is v n , and the target version is v m (m < n), then starting from v n , by checking the parent version numbers of each version node, a series of version nodes leading to v m are gradually found, and these nodes form a rollback path; Next, traverse several version nodes on the rollback path, collect the attribute information of each version node, sort them in reverse order according to the timestamp, and organize the change operations corresponding to the sorted version nodes into a reverse operation sequence; For an add operation (CREATE), it is converted to a delete operation (DELETE) in the reverse operation sequence; for a delete operation, it is converted to an add operation (restored using backup data); for an update operation, it is converted to an update operation using the old value; for example, if the accuracy grade attribute of a certain bearing is added in a certain version, in the reverse operation sequence, it is converted to an operation to delete the accuracy grade attribute to achieve the purpose of rollback.
[0046] According to the reverse operation sequence, perform rollback operations on the second updated graph in sequence. Each time a rollback operation is executed, multiple consistency validations need to be performed on the rolled-back knowledge graph; or after the rollback is completed, multiple consistency validations are performed on the final rollback result; obtain the validation result; Compare the state of the rolled-back knowledge graph with the state of the target version to check whether each attribute, association relationship, etc. is consistent with the target version. According to the comparison result and the validation result, record the error information. If the rolled-back knowledge graph is inconsistent with the target version, or problems are found in the multiple consistency validations, details such as the type of error, the entities or attributes where the problems occur are recorded in detail to obtain the rollback verification result; subsequent targeted processing of the knowledge can be carried out according to the rollback verification result; For example, if the rollback verification result shows that the rolled-back knowledge graph is consistent with the target version state and the multiple consistency validations pass, it means that the knowledge graph has been successfully rolled back to the correct state. At this time, the rolled-back knowledge graph can be saved as the current valid version, and relevant version management information is updated, such as recording the latest version number, update timestamp, etc., and relevant users or system modules are notified to inform that the knowledge graph has been successfully rolled back and restored to a specific historical state, so that each business process can continue to work based on accurate knowledge; if the rollback verification result indicates that there are differences between the rolled-back knowledge graph and the target version, or problems are found in the multiple consistency validations, the error information needs to be analyzed in depth. According to the type of error, such as attribute value type error, association relationship error, etc., professional personnel are organized for repair.
[0047] Part of the data in the above formula is calculated by removing the dimension and taking its numerical value. The formula is a formula closest to the actual situation obtained by software simulation of a large amount of collected data; the preset parameters and preset thresholds in the formula are set by technical personnel in this field according to actual conditions or obtained through simulation of a large amount of data.
[0048] Working principle of the present invention: First, deploy distributed data listeners in various industrial data sources to collect data at different times in real time. Use a specific formula to calculate the data change set and determine whether it is empty. If it is not empty, classify the changed data into new, modified, and deleted data sets to provide accurate data for subsequent processing; Next, entities are extracted from the changed data and extraction rules are designed to convert new and old data into structured data. According to the preset mapping rules, the structured data is converted into triples, and the attribute values are mapped by type, and finally a triple change set is obtained to realize the conversion of data into knowledge graph elements; Then, we build a knowledge graph based on the triple change set, mine the attribute dependency to determine the dependency level, and calculate the update priority based on the change type. We insert the change knowledge items into the priority queue for sorting, verify and merge the knowledge by change type, generate the first update graph, and improve the update efficiency and quality. Count the number of parent concepts of entities in the first updated graph and mark multi-inherited entities. Verify multi-inherited entities from the perspectives of attributes, constraints, and semantics. If conflicts are found, modify the graph to obtain a more accurate and reliable second updated graph, ensuring the logical and semantic consistency of the knowledge graph. Finally, a change link diagram is generated based on the operations and version numbers of the previous and next update graphs, and detailed information is recorded. The rollback path is determined by backtracking, and the second update graph is rolled back and verified. The status after rollback is compared with the target version status, and error information is recorded to achieve knowledge change traceability and system stability assurance.
[0049] The above embodiments are only used to illustrate the technical method of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical method of the present invention may be modified or replaced by equivalents without departing from the spirit and scope of the technical method of the present invention.
Claims
1. An incremental knowledge graph update and consistency verification system for the industrial field, characterized by: include: Data monitoring module: used to monitor the original industrial data using distributed data listeners to obtain new data, old data and data change sets; wherein the data change set includes the old data before the change and the new data after the change; Knowledge conversion module: used to convert new data and old data into structured data according to a preset knowledge extraction rule set, and map the structured data of new and old data into triples according to a preset mapping rule to obtain a triple change set; Incremental update module: used to calculate the update priority of several attributes in the triple change set, and obtain the first update map according to the update priority; The consistency verification module is used to perform multiple consistency verifications on the first update map, and modify the first update map according to the verification results to obtain the second update map; Knowledge tracing module: used to construct a knowledge change link graph based on the first update graph and the second update graph, and to perform rollback verification on the knowledge change link graph.
2. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 1 is characterized in that: The monitoring of the original industrial data includes: According to the monitoring formula Calculate the change set of raw industrial data , get the new data, old data and data change set ;in, represents the new data at time t, Represents the old data at time t-1; the original industrial data includes: industrial data obtained through ERP system, supply chain system, etc.; Determine the data change set Is it empty? If yes, the original industrial data is marked as unchanged. If no, the data change set is classified according to the change of the original industrial data to obtain the change type.
3. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 2 is characterized in that: The change types include: adding a new data set, modifying a data set, and deleting a data set; wherein, The definition of the new data set is ; Modify the definition of the data set to ; The definition of deleting a data set is ;in, Represents a single data item in the original industrial data, and t represents the time.
4. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 1 is characterized in that: The mapping of the structured data of the new data and the old data into triples according to the preset mapping rules includes: Extract several entities from the data change set and design a knowledge extraction rule set based on the entities ;in, represents the knowledge extraction rule, that is, the knowledge content that needs to be extracted in the data change set according to the entity, and n represents the number of entities; According to the knowledge extraction rule set, the new and old data are converted to obtain structured data of the new and old data; Formulate preset mapping rules, map the structured data of new and old data into triples according to the preset conversion rules, and obtain the triple set K of new and old data new and K old ; Where K={<s,p,o> s∈Entities,p∈Properties,o∈(Entities∪Literals)}, s represents entity, p represents property, including predicate or relationship, o represents object, Entities represents entity set, including several industrial product material entities in industrial data, Properties represents property set, including several defined properties and relationships, Literals represents literal value set, including numeric value, string, date and time value, Boolean value, enumeration value; Difference calculation is performed on the triple sets of new and old data to obtain the triple change set .
5. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 4 is characterized in that: The preset mapping rule includes: Define rule A: Map the unique identifier item_id of the data item to the entity ID according to the mapping rule "item_id→entityID(s)"; Definition rule B: According to the mapping rule "category→<s,rdf:type,o> ", maps the category of the data item to the type triple of the entity<s,rdf:type,o> ; "s,rdf:type,o" means "entity s is object o", and "rdf:type" means the relationship "is"; Definition rule C: According to the mapping rule "specs.→<s,has_,value> ", convert all attributes of the specification field in the data item into triples of the "has_attribute name" relationship; The data items represent several elements in structured knowledge.
6. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 4 is characterized in that: The calculation of the update priority of several attributes in the triple change set includes: Build a knowledge graph based on the triple change set and record the initial version number of the knowledge graph; Using a graph pattern mining algorithm to learn dependency relationships from a knowledge graph, a dependency type between several attributes is obtained; wherein the attribute is an element p of an attribute set in a triple change set; Setting a dependency level according to the dependency type; wherein the dependency level includes a dependent node level, a dependent node level, and a non-dependency node level; Determine the change knowledge item k j ∈ The change type and dependency level dependency_level, and according to the formula Pr(k j )=type_weight+dependency_level to calculate the update priority Pr; where type_weight represents the change weight, including the basic information change weight, the association change weight and the description information change weight.
7. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 6 is characterized in that: The obtaining of the first update map according to the update priority includes: Initialize an empty priority queue; Change knowledge item k j ∈ Insert into PQ and update according to the priority Pr(k j ) are arranged in descending order, and for the changed knowledge items with the same priority, they are sorted in descending order according to the timestamps to obtain the priority queue PQ; Data items are extracted from the priority queue PQ in sequence, and knowledge verification and knowledge merging are performed on the data items according to the change type to obtain a first update graph; wherein the knowledge verification includes attribute value type verification, attribute value range verification, association relationship verification, and required attribute verification.
8. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 7 is characterized in that: The knowledge verification and knowledge merging according to the change type include: The knowledge verification items for the newly added data set CREATE are: Con j =K new ∪{k j }, for Con j Perform knowledge verification. If the verification passes, k j Merge to K new and record the updated version number; The knowledge verification items for modifying the data set UPDATE are: Con j =K new -{K old (j)}∪{k j }, for Con j Perform knowledge verification. If the verification passes, use K new (j) Replace K old (j) and record the updated version number; where K old (j)∈K old , indicating that K old The jth data item of ; The knowledge verification items for deleting the data set DELETE are: Con j =K new -{k j }, for Con j Perform knowledge verification. If the verification passes, then new Delete k j , and record the updated version number.
9. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 8 is characterized in that: The multiple consistency verification includes: Count the number of direct parent concepts of each entity in the first updated graph. If the number of parent concepts is greater than 1, mark it as a multiple inheritance entity. Multiple consistency verification is performed on the attributes, constraints and semantic rules of multiple inheritance entities according to the inheritance relationship and update priority order, including: Attribute conflict verification: define the attribute set of concept b as: Attrs(b): C->{(name, type)}, define the data type of attribute a in concept b as: Type(ba); When Attrs(b1)∩Attrs(b2)≠ When a∈(Attrs(b1)∩Attrs(b2)),Type(b1.a)≠Type(b2.a), it is determined as an attribute conflict; where name represents the name of the attribute, and type represents the data type of the attribute. Constraint conflict verification: Define the constraint set of concept b as: Constraints(b):C->{constraint}, and constraint=<attribute,operator, value> ; Among them, constraint expresses constraints, including attribute constraints attribute, operator constraints operator and value constraints value; For c1∈Constraints(b1),c2∈Constraints(b2), when c1 When c2=false, it is determined to be a constraint conflict; Semantic conflict verification: Define the semantic rule set of concept b as: Semantics(b): C->{semantic_rule}, and semantic_rule=<condition,implication> ; Among them, semantic_rule represents the semantic rule, including condition and implication; For sr1∈Semantics(b1),sr2∈Semantics(b2), when sr1.implication sr2.implication=false, it is judged as a semantic conflict; When any two conflicts occur in the multiple consistency verification results, the first update map is modified according to the conflict content and the update version number is recorded.
10. The incremental knowledge graph update and consistency verification system for industrial fields according to claim 9 is characterized in that: The rollback verification of the knowledge change link graph includes: The mathematical definition of the change link is: G=(V,E); where G represents the change link graph, E represents the change operation edge between versions, V={v1,v2,…,vm} represents the set of version nodes, and the attributes of the version node v∈V include: version number, timestamp, operator, change type, change entity ID, change content, and parent version number; Generate a knowledge change link graph according to the update operations and update version numbers of the first update graph and the second update graph; Perform backtracking search based on the change operation edge of the knowledge change link graph to determine the path from the current version to the target version and obtain the rollback path; Traverse several version nodes on the rollback path, collect the attributes of each version node, sort them in reverse order according to the timestamp, and obtain the reverse operation sequence; Roll back the second updated graph in turn according to the reverse operation sequence, and perform multiple consistency verifications on the knowledge graph after the rollback to obtain a verification result; The state of the knowledge graph after rollback is compared with the state of the target version, and error information is recorded according to the comparison and verification results to obtain the rollback verification result.
Citation Information
Patent Citations
Software knowledge graph incremental updating method based on code submission
CN115543402A
Uncertain situation space-time knowledge graph updating method and system
CN117290366A
Data processing method based on knowledge graph
CN117973519A
Knowledge graph automatic updating method based on natural language processing technology
CN118607623A
Knowledge association learning method and system based on knowledge graph and virtual reality
CN119166830A
Cited By
Knowledge graph-based two-hop incremental interface consistency verification method and system
CN120743922A
Data updating method and device for water conservancy knowledge graph and medium
CN120804111A
Timing task-driven submitted data acquisition quality monitoring method and system
CN121051104A
Distributed cognitive map construction and dynamic updating system and method
CN121542268A
A Method for Distributed Cognitive Graph Construction and Dynamic Update
CN121542268B