An AI-driven adaptive knowledge graph dynamic updating method
Patent Information
- Application Number
- CN202610697128.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-20
- Publication Date
- 2026-08-21
AI Technical Summary
[0003]现有技术围绕静态结果判别与离散更新流程展开,缺乏对字段演化轨迹与变化连续性的表达能力,在多源数据存在节奏差异或短时异常波动情形下易出现语义割裂现象,例如设备运行状态频繁变化时难以区分真实趋势与偶发扰动,造成实体划分不稳定,且缺少对字段间关联一致性的深入刻画,导致部分属性组合关系难以准确体现,进一步在关系构建过程中呈现割裂或偏差,同时更新过程缺乏冲突有序处理机制,在多事务并发写入场景中易出现属性覆盖顺序混乱或关系错配问题,进而影响整体结构的稳定性与演化连贯性
本发明中,通过对多源数据流按时间间隔与字段编号进行绑定构建变化轨迹,结合实体候选序列的时间位置对齐与变化方向约束,降低异常波动干扰并稳定判别结果,通过字段编号配对下的取值关联一致性与来源标识一致性分析,增强细粒度关联判别能力,通过节点标识字段与关系属性区间匹配进行关系识别,并结合事务标识与冲突字段排序构建有序写入过程,提升更新连贯性与冲突控制能力。
Smart Images

Figure CN122615079A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of knowledge graph technology, and in particular to an AI-driven adaptive dynamic update method for knowledge graphs. Background Technology
[0002] The field of knowledge graph technology encompasses core aspects such as structured semantic data construction, entity relationship modeling, graph data storage and retrieval, semantic reasoning, and data update mechanisms. Specifically, it includes extracting entities from multi-source data to form node sets, establishing connections between nodes based on preset relationship types, managing storage through a graph structure database, performing relationship inference using rule matching or path traversal, and maintaining and updating graph data through periodic or trigger-based strategies, thereby forming a data processing system for complex semantic association expressions. Traditional AI-driven adaptive knowledge graph dynamic update methods involve training a classification model using a pre-labeled dataset to identify entities in new data, filtering the identification results based on a fixed threshold and writing them into the node set, performing duplicate detection by comparing existing node identifiers, adding unmatched nodes, and performing attribute overwriting or appending operations on matched nodes. Simultaneously, relationship edges are generated according to a predefined relationship mapping table and inserted into the graph database. The update process is triggered by a scheduled task, using a timestamp field to determine the scope of data changes and perform batch update operations.
[0003] Existing technologies revolve around static result discrimination and discrete update processes, lacking the ability to express the evolution trajectory and continuity of changes in fields. In situations where there are rhythm differences or short-term abnormal fluctuations in multi-source data, semantic fragmentation is likely to occur. For example, when the operating status of equipment changes frequently, it is difficult to distinguish between the real trend and occasional disturbances, resulting in unstable entity partitioning. Furthermore, the lack of in-depth characterization of the consistency of relationships between fields makes it difficult to accurately represent some attribute combinations, further leading to fragmentation or deviation in the relationship construction process. At the same time, the update process lacks a conflict-ordered handling mechanism, which can easily lead to disordered attribute overwriting order or relationship mismatch in multi-transaction concurrent write scenarios, thereby affecting the stability and evolutionary coherence of the overall structure. Summary of the Invention
[0004] To address the technical problems existing in the prior art, embodiments of the present invention provide an AI-driven adaptive knowledge graph dynamic update method; To achieve the above objectives, the present invention adopts the following technical solution: an AI-driven adaptive knowledge graph dynamic update method, comprising the following steps: S1: Obtain device log data stream, sensor status data stream and control command data stream, extract field numbers and values and rearrange them by timestamp, analyze time intervals and bind field numbers to obtain a set of field change records; S2: Based on the set of field change records, align the time position of the change sequence of the candidate field of the same entity and identify the direction of change, and filter out the candidate entities corresponding to the field combination of reverse direction exceeding the limit to obtain the candidate entity screening set; S3: Based on the entity candidate screening set, extract the field number sequence and pair them up in pairs, identify the consistency of value association and the consistency of source identifier, judge the field combination according to the consistency, retain the entity node identifier corresponding to the consistent combination, and obtain the entity node identification set. S4: Based on the entity node identification set, extract the node entity identifier field and the relation edge attribute interval field and perform interval matching to identify node pair relations and filter relation identifiers to obtain the relation edge identification set; S5: Based on the relationship edge identification set, extract the transaction identifier field and the node attribute update field number set, identify conflicting fields, determine the writing order, and associate nodes with relationship identifiers to obtain the knowledge graph dynamic update structure.
[0005] As a further embodiment of the present invention, the field change record set includes field identifier, time interval, field value, and change marker; the entity candidate filtering set includes candidate entity identifier, change direction label, continuity evaluation index, and filtering status identifier; the entity node identification set includes entity node number, field combination identifier, association consistency label, and source consistency label; the relationship edge identification set includes relationship edge identifier, node pair number, interval matching identifier, and relationship type label; and the knowledge graph dynamic update structure includes transaction identifier, node attribute field set, relationship mapping identifier, and update order identifier.
[0006] As a further aspect of the present invention, the direction reversal over-limit field combination refers to a field combination in which the number of direction switching times exceeds a preset range during the field value change process; The entity candidates refer to a set of potential entity objects that have been initially aggregated based on the field change sequence but have not yet completed consistency verification.
[0007] As a further aspect of the present invention, the relationship identifier refers to the tag information used to indicate the type of association relationship between two entity nodes; The conflicting field refers to a field in the graph database where different transactions compete for and update the same field number inconsistently during the writing process.
[0008] As a further aspect of the present invention, the specific steps of S1 are as follows: S101: Obtain the device log data stream, sensor status data stream and control command data stream, retrieve the field structure of each data stream, extract the field number according to the field identification rules and parse the corresponding field value, match the number and value according to the data frame order, and obtain the field number and value pair set. S102: Based on the set of field number value pairs, extract the timestamp of each record, rearrange the order according to time sequence, deduce the interval value of adjacent record timestamps, and remove spans that exceed the preset range to obtain a time interval sequence; S103: Based on the set of field number value pairs and the time interval sequence, bind each field number to adjacent time spans and associate the value changes to obtain a set of field change records.
[0009] As a further aspect of the present invention, the specific steps of S2 are as follows: S201: Based on the set of field change records, locate the timestamp of the field change sequence within each candidate entity, align the position according to the unified time base, map each field change node to the corresponding time index and correct the time offset relationship to obtain a time-aligned sequence set; S202: Based on the time-aligned sequence set, extract the continuous value sequence of the field, compare the order of adjacent values and determine the trend of change, map the trend result into a direction sequence and concatenate them in time order to obtain a set of change direction sequence; S203: Based on the set of change direction sequences, count the number of direction switching, filter the field combinations in combination with the preset direction switching range, remove the entity candidates corresponding to the field combinations that exceed the range, and obtain the entity candidate filtering set.
[0010] As a further aspect of the present invention, the specific steps of S3 are as follows: S301: Based on the entity candidate screening set, extract the field number sequence of each entity candidate, combine them in pairs according to the sequence index, pair any two field numbers in order while maintaining the original order relationship, and obtain the field number pairing sequence; S302: Based on the field number pairing sequence, extract the corresponding field value and field source identifier, compare the relationship between the paired field values and determine the consistency status, verify the source identifier and determine the consistency status, and associate the two types of consistency results to obtain the consistency determination sequence. S303: Based on the consistency determination sequence, identify the field combinations, retain the entity node identifiers corresponding to the consistent field combinations, and remove the entity candidates corresponding to the combinations that fail the consistency determination, thereby obtaining the entity node identification set.
[0011] As a further aspect of the present invention, in the process of extracting the candidate field number sequence of each entity, pairing them up according to the sequence index and maintaining the original order relationship: the candidate field number sequence of the entity is selected sequentially according to the index order, and field numbers whose index interval between field numbers is within the preset index interval range are limited to participate in the pairing, and order identification information is added during the pairing process; In the process of combining and filtering entity node identifiers based on the discrimination fields: the field numbers in the associated identifiers are paired based on the consistency status of the field values and the consistency status of the source, and the corresponding entity node identifiers are extracted based on the filtering results.
[0012] As a further aspect of the present invention, the specific steps of S4 are as follows: S401: Based on the entity node identification set, extract the node entity identifier field and the relation edge attribute interval field, parse the endpoints of the interval field corresponding to each node, and unify the interval according to the start position and end position to obtain the attribute interval sequence set; S402: Based on the attribute interval sequence set, select any two nodes corresponding to the interval field comparison interval, determine the interval overlap status and extract the corresponding node entity identifier, associate the nodes with overlapping intervals, and obtain the node association relationship sequence. S403: Based on the node association sequence, extract the relationship identifier field, identify the corresponding relationship identifiers of overlapping interval node pairs, and include the corresponding relationship identifiers of intervals with overlapping relationships into the set to obtain the relationship edge identification set.
[0013] As a further aspect of the present invention, the specific steps of S5 are as follows: S501: Based on the relationship edge identification set, extract the graph database write transaction identifier field and node attribute update field number set, compare the field number corresponding to each relationship edge item by item, identify the write path situation corresponding to the same number and mark the conflict position to obtain the field conflict position sequence. S502: Based on the field conflict position sequence, extract the corresponding transaction identifier field, determine the order of transaction identifiers corresponding to the same field number, sort the writing order relationship according to the preset transaction priority rule, and associate the field number with the transaction identifier to obtain the transaction order association sequence; S503: Based on the transaction sequence association, extract entity node identifiers and relationship identifiers, match the corresponding node identifiers and relationship identifiers, and concatenate them according to the transaction sequence to obtain the dynamic update structure of the knowledge graph.
[0014] Compared with the prior art, the advantages and positive effects of the present invention are as follows: In this invention, a change trajectory is constructed by binding multi-source data streams with field numbers according to time intervals. Combined with the time position alignment and change direction constraints of entity candidate sequences, the interference of abnormal fluctuations is reduced and the discrimination results are stabilized. The consistency of value association and source identifier under field number pairing is analyzed to enhance the fine-grained association discrimination capability. Relationship identification is performed by matching node identifier fields with relation attribute intervals. The orderly writing process is constructed by combining transaction identifiers and conflict field sorting to improve update coherence and conflict control capabilities. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is a detailed schematic diagram of S1 of the present invention; Figure 3 This is a detailed schematic diagram of S2 of the present invention; Figure 4 This is a detailed schematic diagram of S3 of the present invention; Figure 5 This is a detailed schematic diagram of S4 of the present invention; Figure 6 This is a detailed schematic diagram of S5 of the present invention. Detailed Implementation
[0017] The technical solution of the present invention will now be described with reference to the accompanying drawings.
[0018] To make the technical problems, technical solutions and advantages of the present invention clearer, a detailed description will be given below in conjunction with the accompanying drawings and specific embodiments.
[0019] Please see Figure 1 This invention provides an AI-driven adaptive knowledge graph dynamic update method, comprising the following steps: S1: Obtain device log data stream, sensor status data stream and control command data stream, extract field numbers and field values, rearrange the order according to timestamps, analyze the time interval based on adjacent timestamps and bind the field numbers to the time intervals to obtain a set of field change records; S2: Based on the set of field change records, align the time position of the field change sequence within the same entity candidate and identify the direction of value change. Filter according to the analysis results of continuous change direction, and remove entity candidates corresponding to field combinations whose direction reversal times exceed the set range, to obtain the entity candidate filter set. S3: Based on the entity candidate screening set, extract the field number sequence and pair them up, identify the consistency of association between field values and the consistency of field source identifier, judge the field combination according to the consistency identification result, retain the entity node identifier corresponding to the consistent field combination, and obtain the entity node identification set. S4: Based on the entity node identification set, extract the entity identifier field of the knowledge graph node and the attribute interval field of the relation edge and perform interval matching to identify the relationship between node pairs. Filter the corresponding relation identifiers of the associated node pairs according to the interval overlap relationship to obtain the relation edge identification set. S5: Based on the relation edge identification set, extract the transaction identifier field and node attribute update field number set from the graph database and identify conflicting fields. According to the conflict identification result, write the order and associate entity node identifier and relation identifier to obtain the dynamic update structure of the knowledge graph.
[0020] The field change record set includes field identifier, time interval, field value, and change marker; the entity candidate filtering set includes candidate entity identifier, change direction label, continuity evaluation index, and filtering status identifier; the entity node identification set includes entity node number, field combination identifier, association consistency label, and source consistency label; the relationship edge identification set includes relationship edge identifier, node pair number, interval matching identifier, and relationship type label; and the knowledge graph dynamic update structure includes transaction identifier, node attribute field set, relationship mapping identifier, and update order identifier.
[0021] Please see Figure 2 The specific steps of S1 are as follows: S101: Obtain the device log data stream, sensor status data stream and control command data stream, retrieve the field structure of each data stream, extract the field number according to the field identification rules and parse the corresponding field value, match the number and value according to the data frame order, and obtain the field number and value pair set. First, the raw messages collected by the industrial gateway are retrieved in real time through the data interface layer. These raw messages include device log data streams, sensor status data streams, and control command data streams. The data format is uniformly hexadecimal byte streams. After obtaining the mixed message containing the above three types of data streams, the protocol parsing engine identifies the characteristic bytes in the message header. For the sensor status data stream, the protocol parsing engine searches its data stream field structure one by one, and locates the start and stop bits in the message by comparing with the pre-stored communication protocol description file. According to the preset field identification rules, the physical meaning corresponding to the specific function code is defined, thereby accurately extracting the field number from the message. When performing the extraction action, the key identifier bits in the message are scanned bit by bit using the predefined protocol offset mapping logic to ensure the uniqueness and accuracy of the field number. For example, in the sensor message of a certain type of industrial robotic arm, the position with function code 03 and an offset of 4 bytes corresponds to a temperature sensor, and its field number is defined as 1001; similarly, the position with an offset of 8 bytes corresponds to a pressure sensor, and its field number is defined as 1002. After identifying the field number, the original value of the corresponding field is parsed and converted into a decimal physical quantity. The numbers and values are matched according to the order in which the data frames are received. For example, in the first frame of data received at 10:30:01, the decimal value corresponding to field number 1001 is 35.5, and the decimal value corresponding to field number 1002 is 210.5, forming the first field number-value pair. Subsequently, in the second frame of data received at 10:30:02, the value of field number 1001 becomes 35.6, and the value of field number 1002 becomes 211.0. By continuously performing the above iterative matching operation on 500 frames of data, a set of field number-value pairs is obtained.
[0022] S102: Based on the set of field number value pairs, extract the timestamp of each record, rearrange the order according to time sequence, deduce the time interval between adjacent record timestamps, remove spans exceeding the preset range, and obtain the time interval sequence. First, based on the obtained set of field number value pairs, the millisecond-level timestamp information carried in each record is extracted. This timestamp is generated by the industrial control time synchronization module, ensuring the accuracy of the data generation time. The extracted records are then rearranged according to time sequence to eliminate message out-of-order problems caused by network transmission jitter. After sorting, a time interval derivation operation is performed. Specifically, the timestamp values of two adjacent records are retrieved, and the timestamp value of the later time moment is subtracted from the timestamp value of the earlier time moment to obtain the time interval between them. For example, if the timestamp of the first record is 10:30:01.200 milliseconds and the timestamp of the second record is 10:30:01.300 milliseconds, the time interval value obtained by subtraction is 100 milliseconds. A reasonable time span range is preset, which is set to 50 milliseconds to 200 milliseconds. Subsequently, a rejection operation is performed, comparing each calculated time interval value with the upper and lower limits of this reasonable range. If a timestamp rollback or duplication is detected, a logic reset procedure is immediately initiated to maintain the temporal monotonicity of the sequence. If the calculated time interval is 500 milliseconds, it is considered an abnormal jump record and is removed because it exceeds the preset upper limit of 200 milliseconds. By performing the above comparison and filtering on 1000 consecutive adjacent records and arranging the differences that meet the preset range in order, the time interval sequence is obtained.
[0023] S103: Based on the set of field number value pairs and the time interval sequence, bind each field number to adjacent time spans and associate the value changes to obtain a set of field change records; First, using the previously generated set of field ID value pairs and time interval sequences, a dynamic feature binding operation is performed on the fields. This process associates each specific field ID with adjacent time spans in the corresponding time interval sequence. Specifically, it extracts the initial and final values of a field ID within a specific time period and calculates the change in the field value within that time period. For example, for field ID 1001, its initial value is 35.5 and its final value is 35.6 within the first 100-millisecond time interval, resulting in a change of 0.1. The field ID, the corresponding adjacent time span value, and the value change within that span are encapsulated as a triple. If the value changes from 35.5 to 35.6, it is recorded as field 1001 increasing by 0.1 within 100 milliseconds. This binding process also includes a secondary verification of the rate of value change to ensure that the slope characteristics of the data conform to the physical attributes of the device. By traversing all fields of all devices within the monitoring period, each change is stored in a cache by time index, resulting in a set of field change records.
[0024] Please see Figure 3 The specific steps of S2 are as follows: S201: Based on the set of field change records, locate the timestamp of the field change sequence within each candidate entity, align the position according to the unified time base, map each field change node to the corresponding time index and correct the time offset relationship to obtain the time-aligned sequence set; First, candidate entities of various types are extracted from the set of field change records, and the starting point of the timestamp of the field change sequence within each candidate entity is located. Since the data upload frequencies of different sensors may vary, alignment based on a unified time base is required. This process first determines a global reference time, then calculates the time offset of each field change node relative to the reference base. For example, using 10:30:00 as the global reference base, if the timestamp of the first change node of a field is 10:30:01, then its time offset is 1000 milliseconds. The time offset relationship is corrected by performing addition and subtraction compensation operations, mapping the change states of all fields to the same second-level time index position. Specifically, the original timestamp of each field is subtracted from its corresponding offset, ensuring that the observation points of different fields are logically at the same time point. This alignment operation ensures that data from different sources can be compared horizontally on the same time axis. During the alignment process, if missing sampling points are found, nearest neighbor interpolation is used to fill in the gaps, resulting in a time-aligned sequence set.
[0025] S202: Based on the time-aligned sequence set, extract the continuous value sequence of the field, compare the order of adjacent values and determine the trend of change, map the trend result into a direction sequence and concatenate them in time order to obtain the change direction sequence set; First, based on the time-aligned sequence set, the value sequence of each field at consecutive time nodes is extracted. The trend is determined by comparing the values at adjacent time indices. The trend determination follows this logic: the current value is retrieved and the previous value is compared using a difference calculation. If the difference is greater than 0, an upward trend is identified and the result is mapped to the value 1; if the difference is equal to 0, a stable trend is identified and the result is mapped to the value 0; if the difference is less than 0, a downward trend is identified and the result is mapped to the value -1. For example, a pressure field has values of 210.5, 211.0, 211.0, 210.8, and 210.8 at five consecutive time points. By comparing them one by one, the first set of comparisons results in 1, the second in 0, the third in -1, and the fourth in 0. These trend results are then concatenated in chronological order along the time axis to generate a direction sequence for each field. This mapping and concatenation operation is then performed on all fields. This directional mapping effectively filters out the interference of small fluctuation amplitudes in the original data, retains the core state transition information, and obtains a set of change direction sequences.
[0026] S203: Based on the set of change direction sequences, count the number of direction switching, filter the field combinations in combination with the preset direction switching range, remove the candidate entities corresponding to field combinations that exceed the range, and obtain the candidate entity filtering set. First, for each field combination in the set of changing direction sequences, the total number of direction switches within the observation window is counted. A direction switch is defined as the situation where two adjacent mapped values in the direction sequence are not equal. The direction sequence is traversed, and the count is incremented by 1 when a value changes from 1 to 0 or from 0 to -1. For example, for the sequence 1, 0, -1, 0, three value changes are detected, so the number of direction switches is 3. A preset direction switch range is set from 1 to 10 times based on the physical characteristics of the device during normal operation. Then, a filtering operation is performed, matching the count of each field combination against this range. If a field combination has 15 direction switches, it exceeds the upper limit of 10, and is determined to be non-steady-state interference data, thus removing the entity candidate corresponding to that field combination. This is achieved by traversing all combinations and removing those exceeding the limit. Furthermore, for items with switching frequencies at boundary values, a window sliding check is added to enhance the robustness of the filtering, resulting in a candidate entity filtering set.
[0027] Please see Figure 4 The specific steps of S3 are as follows: S301: Based on the entity candidate screening set, extract the field number sequence of each entity candidate, combine them in pairs according to the sequence index, pair any two field numbers in order while maintaining the original order relationship, and obtain the field number pairing sequence; First, based on the entity candidate screening set, the field number sequence contained in each entity candidate is extracted. A pairwise combination operation of the sequence indices is performed, using nested loop traversal logic. The balanced binary tree structure within the sequence is split, and any two field numbers are paired sequentially. During the pairing process, the physical location index of the field in the original message frame is retrieved. If the index of field number 1001 is 5 and the index of field number 1002 is 12, then the pairing order is strictly set to 1001 first, followed by 1002. For example, an entity candidate contains field numbers 1001, 1002, and 1003; the field number pairing sequence generated through combinational logic includes pairings of 1001 and 1002, 1001 and 1003, and 1002 and 1003. This processing method preserves the temporal topology of the original data, ensuring that subsequent analysis does not lose directional information. This pairing method establishes a preliminary topological structure of the potential causal chains between fields, resulting in the field number pairing sequence.
[0028] S302: Based on the field number pairing sequence, extract the corresponding field value and field source identifier, compare the relationship between the paired field values and determine the consistency status, verify the corresponding source identifier and determine the consistency status, and associate the two types of consistency results to obtain the consistency determination sequence; First, for each pair of fields in the field number pairing sequence, extract its corresponding historical value sequence and field source identifier. Perform a consistency status determination. Specifically, retrieve the value arrays of the two fields within the same time interval and calculate the correlation coefficient between the two arrays. If the correlation coefficient is between 0.9 and 1.0, the value consistency status is determined to be high. Simultaneously, retrieve the source identifiers of both. If both source identifiers indicate the same control unit, the source consistency status is determined to be passed. For example, the correlation coefficient between fields 1001 and 1002 is calculated to be 0.96, and the source identifier verification result is consistent. Perform a logical AND operation between the value consistency result and the source consistency result; that is, only when both determinations meet preset conditions is a positive consistency determination result generated. By performing the above dual determination on all pairs, and through multi-dimensional consistency comparison, spurious associations caused by heterogeneous data are significantly reduced, resulting in a consistency determination sequence.
[0029] S303: Based on the consistency judgment sequence, identify the field combination, retain the entity node identifier corresponding to the associated consistent field combination, and remove the entity candidate corresponding to the combination that fails the consistency judgment to obtain the entity node identification set; First, based on the results of the consistency judgment sequence, a final judgment is made on each field combination. Each association result in the consistency judgment sequence is retrieved. If the association result is successful, the field combination is retained, and its corresponding entity node identifier is extracted. This identifier is marked as a legitimate node in the knowledge graph. If the association result is unsuccessful, the field combination is determined to lack genuine physical association characteristics, thus eliminating the entity candidate. For example, after judgment, the combination of fields 1001 and 1002 meets the consistency requirement, and its corresponding entity node identifier 001 is included in the retention list, while another combination with a correlation coefficient of only 0.2 is eliminated. Through this judgment process, accurate identification of core entities from massive amounts of messy data is achieved. This set, having passed dual filtering of static attributes and dynamic behavior, possesses extremely high confidence, resulting in an entity node identification set.
[0030] Please see Figure 5 The specific steps of S4 are as follows: S401: Based on the entity node identification set, extract the node entity identifier field and the relation edge attribute interval field, parse the endpoints of the corresponding interval field of each node, and unify the interval according to the start and end positions to obtain the attribute interval sequence set; First, based on the entity node identification set, the identifier field and the attribute interval field of its associated relation edge are extracted for each entity node. The attribute interval field typically consists of a start position value and an end position value. The endpoint values of the interval field corresponding to each node are parsed. To eliminate unit differences, unit conversion and normalization are performed on the start and end positions. For example, the start position of node 001 of the attribute interval is parsed as timestamp 1000, and the end position is parsed as 1500; the start position of node 002 is parsed as 1200, and the end position is 1800. By mapping all endpoint values to the same standard time axis, the intervals are aligned at the same scale. When dealing with complex and variable interval data, a linear transformation method is used to normalize intervals with different sampling periods to a standard time base, enhancing the comparability of subsequent association analysis and obtaining an attribute interval sequence set.
[0031] S402: Based on the attribute interval sequence set, select any two nodes to compare the corresponding interval fields, determine the interval overlap status and extract the corresponding node entity identifier, associate the nodes with overlapping intervals, and obtain the node association sequence. First, based on the attribute interval sequence set, a comparison operation is performed on the interval fields corresponding to any two nodes. The overlap of intervals is then determined. The specific determination process is as follows: the start and end positions of the first node and the second node are retrieved. If the start position of the first node is less than the end position of the second node, and the end position of the first node is greater than the start position of the second node, then the two intervals are considered to overlap. For example, the interval 1000 to 1500 of node 001 is compared with the interval 1200 to 1800 of node 002. Since 1000 is less than 1800 and 1500 is greater than 1200, they are considered to overlap. Subsequently, the entity identifiers of these two nodes are extracted and an association is established. This comparison logic is performed on all node pairs within the attribute interval sequence set. This association logic, by capturing the coexistence of entities in the time dimension, provides temporal support for constructing dynamic topology, resulting in a sequence of node association relationships.
[0032] S403: Based on the node association sequence, extract the relationship identifier field, determine the corresponding relationship identifiers of overlapping interval node pairs, and include the corresponding relationship identifiers of intervals with overlapping relationships into the set to obtain the relationship edge identification set; First, based on the node association sequence, a relationship identifier field is further extracted from the original data. The relationship identifier field represents the specific logical type of the overlap between nodes. It determines whether a pair of nodes within the overlapping interval corresponds to a specific relationship identifier. Specifically, the event trigger logs within the overlapping time window are retrieved. If a synchronization trigger signal is detected within the overlapping interval of node 001 and node 002, the relationship identifier is defined as a synchronization relationship and included in the set. For example, if node 001 represents pump operation and node 002 represents flow meter monitoring, their relationship identifier within the overlapping interval is identified as a monitoring relationship. By traversing the node association sequence and matching relationship identifiers, all verified relationship identifiers are aggregated. This process successfully transforms the abstract temporal overlap into a concrete physical semantic association, achieving deep links at the graph logic level and obtaining a set of relationship edge identifications.
[0033] Please see Figure 6 The specific steps of S5 are as follows: S501: Based on the relation edge identification set, extract the set of write transaction identifier field and node attribute update field number of graph database, compare the field number corresponding to each relation edge item by item, identify the write path situation corresponding to the same number and mark the conflict position to obtain the field conflict position sequence; First, based on the relation edge identification set, the graph database update operation is prepared. The write transaction identifier field and the set of node attribute update field numbers to be updated are extracted from the current graph database. Then, a conflict location identification operation is performed. Specifically, the field numbers involved in the relation edges to be written are compared item by item. If a field number to be written is found to be completely identical to a field number in another currently executing write transaction, a write conflict is determined at that location, and the transaction identifier of the conflict is recorded. For example, if the field number to be updated is 1001, and a task with transaction identifier A is already modifying field 1001, then that location is marked as a conflict point. By traversing and comparing all items to be updated, all conflicting transaction relationships are recorded. This detection mechanism covers both read-write conflicts and write-write conflicts, effectively preventing dirty reads and errors in graph data under concurrent environments, and obtaining a sequence of field conflict locations.
[0034] S502: Based on the field conflict position sequence, extract the corresponding transaction identifier field, determine the order of transaction identifiers corresponding to the same field number, sort the writing order relationship according to the preset transaction priority rule, and associate the field number with the transaction identifier to obtain the transaction order association sequence; First, based on the sequence of conflicting field positions, extract all corresponding transaction identifier fields. Then, retrieve the pre-defined transaction priority rules. These rules set priority values according to business logic, with higher values indicating higher priority. Next, perform a sorting and association operation. Specifically, obtain the priority value of each conflicting transaction and rearrange the transaction identifiers in descending order of value. Then, associate the sorted transaction identifiers with their corresponding field numbers. For example, transaction 101 has a priority value of 9, and transaction 98 has a priority value of 4. By comparison, it is determined that transaction 101 executes before transaction 98, and an sequential association relationship is established between transaction 101, transaction 98, and field number 1001. Finally, summarize the processing results of all conflicting positions. This operation logic ensures the priority update of critical control instructions through a priority mechanism, improving real-time response performance and obtaining the transaction sequence association.
[0035] S503: Based on the transaction sequence association, extract entity node identifiers and relationship identifiers, match the corresponding node identifiers and relationship identifiers and concatenate them according to the transaction sequence to obtain the dynamic update structure of the knowledge graph; First, entity node identifiers and relationship identifiers are extracted based on the transaction sequence association. A sequential update operation is then performed. Following the order determined in the transaction sequence association, the corresponding node identifiers and relationship identifiers are retrieved sequentially. The nodes and their corresponding relationship edges are then written into the graph database in sequence. Specifically, the entity node and its attributes are first written based on the first transaction identifier. Subsequently, relationship edges between nodes are established or updated based on subsequent transaction identifiers. For example, transaction 101 is executed first to update the real-time status of node 001, followed by transaction 98 to establish the association between node 001 and node 002. This sequential sequential approach integrates scattered identification results into an ordered dynamic structure. This dynamic update mechanism allows the graph to iterate synchronously at the millisecond level along with the evolution of device status, resulting in a dynamically updated knowledge graph structure.
[0036] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. An AI-driven adaptive knowledge graph dynamic update method, characterized in that, include: S1: Obtain device log data stream, sensor status data stream and control command data stream, extract field numbers and values and rearrange them by timestamp, analyze time intervals and bind field numbers to obtain a set of field change records; S2: Based on the set of field change records, align the time position of the change sequence of the candidate field of the same entity and identify the direction of change, and filter out the candidate entities corresponding to the field combination of reverse direction exceeding the limit to obtain the candidate entity screening set; S3: Based on the entity candidate screening set, extract the field number sequence and pair them up in pairs, identify the consistency of value association and the consistency of source identifier, judge the field combination according to the consistency, retain the entity node identifier corresponding to the consistent combination, and obtain the entity node identification set. S4: Based on the entity node identification set, extract the node entity identifier field and the relation edge attribute interval field and perform interval matching to identify node pair relations and filter relation identifiers to obtain the relation edge identification set; S5: Based on the relationship edge identification set, extract the transaction identifier field and the node attribute update field number set, identify conflicting fields, determine the writing order, and associate nodes with relationship identifiers to obtain the knowledge graph dynamic update structure.
2. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that: The set of field change records includes field identifiers, time intervals, field values, and change markers. The set of entity candidate filtering includes candidate entity identifiers, change direction labels, continuity evaluation indicators, and filtering status identifiers. The set of entity node identification includes entity node numbers, field combination identifiers, association consistency labels, and source consistency labels. The set of relationship edge identification includes relationship edge identifiers, node pair numbers, interval matching identifiers, and relationship type labels. The knowledge graph dynamic update structure includes transaction identifiers, node attribute field sets, relationship mapping identifiers, and update order identifiers.
3. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that: The "direction reversal exceeding limit field combination" refers to a field combination whose direction switching count exceeds a preset range during the field value change process; The entity candidates refer to a set of potential entity objects that have been initially aggregated based on the field change sequence but have not yet completed consistency verification.
4. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that: The relationship identifier refers to the tagging information used to indicate the type of association relationship between two entity nodes; The conflicting field refers to a field in the graph database where different transactions compete for and update the same field number inconsistently during the writing process.
5. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that, The specific steps of S1 are as follows: S101: Obtain the device log data stream, sensor status data stream and control command data stream, retrieve the field structure of each data stream, extract the field number according to the field identification rules and parse the corresponding field value, match the number and value according to the data frame order, and obtain the field number and value pair set. S102: Based on the set of field number value pairs, extract the timestamp of each record, rearrange the order according to time sequence, deduce the interval value of adjacent record timestamps, and remove spans that exceed the preset range to obtain a time interval sequence; S103: Based on the set of field number value pairs and the time interval sequence, bind each field number to adjacent time spans and associate the value changes to obtain a set of field change records.
6. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that, The specific steps of S2 are as follows: S201: Based on the set of field change records, locate the timestamp of the field change sequence within each candidate entity, align the position according to the unified time base, map each field change node to the corresponding time index and correct the time offset relationship to obtain a time-aligned sequence set; S202: Based on the time-aligned sequence set, extract the continuous value sequence of the field, compare the order of adjacent values and determine the trend of change, map the trend result into a direction sequence and concatenate them in time order to obtain a set of change direction sequence; S203: Based on the set of change direction sequences, count the number of direction switching, filter the field combinations in combination with the preset direction switching range, remove the entity candidates corresponding to the field combinations that exceed the range, and obtain the entity candidate filtering set.
7. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that, The specific steps for S3 are as follows: S301: Based on the entity candidate screening set, extract the field number sequence of each entity candidate, combine them in pairs according to the sequence index, pair any two field numbers in order while maintaining the original order relationship, and obtain the field number pairing sequence; S302: Based on the field number pairing sequence, extract the corresponding field value and field source identifier, compare the relationship between the paired field values and determine the consistency status, verify the source identifier and determine the consistency status, and associate the two types of consistency results to obtain the consistency determination sequence. S303: Based on the consistency determination sequence, identify the field combinations, retain the entity node identifiers corresponding to the consistent field combinations, and remove the entity candidates corresponding to the combinations that fail the consistency determination, thereby obtaining the entity node identification set.
8. The AI-driven adaptive knowledge graph dynamic update method according to claim 7, characterized in that, In the process of extracting the candidate field number sequence of each entity, pairing them up according to the sequence index and maintaining the original order relationship: the candidate field number sequence of the entity is selected in the order of the index, and the field numbers whose index interval between the field numbers is within the preset index interval range are limited to participate in the pairing, and the order identification information is added during the pairing process; In the process of combining and filtering entity node identifiers based on the discrimination fields: the field numbers in the associated identifiers are paired based on the consistency status of the field values and the consistency status of the source, and the corresponding entity node identifiers are extracted based on the filtering results.
9. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that, The specific steps of S4 are as follows: S401: Based on the entity node identification set, extract the node entity identifier field and the relation edge attribute interval field, parse the endpoints of the interval field corresponding to each node, and unify the interval according to the start position and end position to obtain the attribute interval sequence set; S402: Based on the attribute interval sequence set, select any two nodes corresponding to the interval field comparison interval, determine the interval overlap status and extract the corresponding node entity identifier, associate the nodes with overlapping intervals, and obtain the node association relationship sequence. S403: Based on the node association sequence, extract the relationship identifier field, identify the corresponding relationship identifiers of overlapping interval node pairs, and include the corresponding relationship identifiers of intervals with overlapping relationships into the set to obtain the relationship edge identification set.
10. The AI-driven adaptive knowledge graph dynamic update method according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Based on the relationship edge identification set, extract the graph database write transaction identifier field and node attribute update field number set, compare the field number corresponding to each relationship edge item by item, identify the write path situation corresponding to the same number and mark the conflict position to obtain the field conflict position sequence. S502: Based on the field conflict position sequence, extract the corresponding transaction identifier field, determine the order of transaction identifiers corresponding to the same field number, sort the writing order relationship according to the preset transaction priority rule, and associate the field number with the transaction identifier to obtain the transaction order association sequence; S503: Based on the transaction sequence association, extract entity node identifiers and relationship identifiers, match the corresponding node identifiers and relationship identifiers, and concatenate them according to the transaction sequence to obtain the dynamic update structure of the knowledge graph.