A method and system for constructing dynamic graph structures based on offline semantic constraint mapping
By constructing a predefined semantic node system and an offline semantic mapping table, and dynamically calculating the activation weight of edges, the problems of insufficient semantic mapping consistency and high computational overhead in existing technologies are solved. This enables the construction of dynamic graph structures with low overhead and supports association analysis and state evaluation in multi-batch data scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU ZHUODUN INFORMATION TECH CO LTD
- Filing Date
- 2026-03-19
- Publication Date
- 2026-06-30
AI Technical Summary
Existing technologies suffer from insufficient consistency, high computational overhead, and difficulty in supporting the dynamic expression of graph structures in semantic mapping of multi-source data.
By constructing a predefined semantic node system, semantic matching and mapping are performed offline to generate a fixed-storage offline semantic mapping table. During the runtime phase, standardization and aggregation calculations are performed, the activation weights of edges are dynamically calculated, and a state-responsive dynamic graph structure is constructed.
It achieves consistency and repeatability of semantic mapping, reduces computational complexity, and provides a graph structure that accurately reflects changes in data state, supporting association analysis and state assessment in multi-batch data scenarios.
Smart Images

Figure CN121858752B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of semantic information processing and graph structure modeling technology, specifically a method and system for constructing dynamic graph structures based on offline semantic constraint mapping. Background Technology
[0002] With the development of data acquisition technology, more and more application systems need to structure data from multiple sources to support subsequent correlation analysis, status assessment, trend judgment, or intelligent decision-making. In practical engineering, this type of data includes structured field data, semi-structured descriptive information, or text data with certain semantic meaning. To achieve unified management and computation, the system needs to map input data to preset semantic categories or structural nodes, and further construct a graph structure to express the relationships between different elements. In existing technologies, a common approach is to use field mapping or keyword matching rules to classify fields or text content in the input data into predefined labels. This method is relatively simple to implement, but it relies on manual rule maintenance, and mapping deviations are prone to occur when the input expression changes or semantic ambiguity exists. At the same time, the rule system is difficult to extend, and there is a lack of unified semantic standards across batches of data, resulting in insufficient stability of the structured expression results.
[0003] In the development of semantic modeling technology, some systems have begun to directly call semantic understanding models to analyze input data during the runtime phase and perform classification or graph structure construction based on the model output. While this approach offers some flexibility in a single task, the probabilistic nature of model inference means that outputs may vary across different times or environments, making it difficult to guarantee the consistency of semantic mapping. Furthermore, frequent calls to semantic models during runtime incur significant computational overhead, hindering engineering implementation in large-scale or high-frequency data processing scenarios. In addition, model outputs often lack clear semantic boundary constraints, resulting in non-reproducible mapping bases and insufficient interpretability and traceability of structural expressions. Regarding graph structure construction, existing technologies employ a one-time generation strategy, generating a complete graph structure for the current input data. When multiple batches of data are continuously input, the system often uses overwrite updates or repeated generation. This approach lacks a unified incremental merging mechanism, fails to record the historical state of nodes and the structural evolution process, struggles to support dynamic changes in graph structures, and cannot effectively track differences between data from different time periods. Summary of the Invention
[0004] The purpose of this application is to provide a method and system for constructing dynamic graph structures based on offline semantic constraint mapping, so as to solve the problems mentioned in the background art.
[0005] In a first aspect, one embodiment of this application provides a method for constructing a dynamic graph structure based on offline semantic constraint mapping. The method includes: constructing a predefined semantic node system, which defines the node identifier, semantic core description, semantic boundary constraints, and association relationships between each semantic node, including source node identifier, target node identifier, relationship type, and association strength benchmark value; in the offline stage, based on the semantic node system, performing semantic matching and mapping between the description information of each data field and the semantic core description of each semantic node to generate a fixed-storage offline semantic mapping table; in the runtime stage, according to the offline semantic mapping table, mapping each field in the current batch of data to the corresponding semantic node, standardizing and aggregating the values of multiple fields mapped to the same node to obtain the state value of each semantic node and determine its activation state; initializing the graph structure based on the association relationships between semantic nodes in the semantic node system, obtaining the state value of the source node associated with each predefined edge, dynamically calculating the weight of each edge, and determining whether each edge is activated in the current batch; adding the edges determined to be in an activated state and their dynamic weights to the graph structure of the current batch, thus constructing a state-responsive dynamic graph structure that responds to the data of the current batch.
[0006] In conjunction with the first aspect, in some implementations of the first aspect, based on the semantic node system, semantic matching and mapping are performed on the descriptive information of each data field and the semantic core description of each semantic node to generate a fixed-storage offline semantic mapping table. This includes: extracting the data fields to be mapped and their descriptive information; combining the descriptive information of each data field with the semantic core description and semantic boundary constraints of each semantic node to form semantic matching pairs; using a semantic understanding model to perform vector encoding on the semantic matching pairs and calculate the similarity to obtain a similarity score list; filtering the similarity scores according to a preset threshold, and selecting the semantic node with the highest similarity score for each data field, using the corresponding node identifier as the mapping target; and fixing and storing the mapping relationship between each data field and the node identifier to generate an offline semantic mapping table.
[0007] In conjunction with the first aspect, in some implementations of the first aspect, each field in the current batch of data is mapped to a corresponding semantic node based on an offline semantic mapping table. The values of multiple fields mapped to the same node are then standardized and aggregated to obtain the state value of each semantic node and determine its activation state. This includes: querying the offline semantic mapping table for each data field in the current batch of data to obtain the identifier of the mapped semantic node; performing standardization on the original values of multiple data fields mapped to the same node identifier to obtain standardized values mapped to a unified value range; performing aggregation calculations on multiple standardized values of the same node according to predefined aggregation rules to obtain a state value; and determining whether the state value meets the activation conditions according to predefined activation rules to determine the activation state of the semantic node.
[0008] In conjunction with the first aspect, in some implementations of the first aspect, the graph structure is initialized based on the association relationship between semantic nodes in the semantic node system, the state value of the source node associated with each predefined edge is obtained, the weight of each edge is dynamically calculated, and it is determined whether each edge is activated in the current batch. This includes: initializing the graph structure based on the source node identifier, target node identifier, relationship type, and association strength benchmark value between semantic nodes; obtaining the state value of the source node associated with each predefined edge; calculating the dynamic weight of each edge based on the association strength benchmark value and the state value of the source node; and determining whether the dynamic weight meets the preset activation determination condition to determine whether each edge is activated in the current batch.
[0009] In conjunction with the first aspect, in some implementations of the first aspect, edges determined to be in an active state and their dynamic weights are added to the graph structure of the current batch to construct a state-responsive dynamic graph structure that responds to the data of the current batch. This includes: generating an incremental record for each edge determined to be in an active state, including a source node identifier, a target node identifier, a relation type, a current dynamic weight, and an activation timestamp; and incrementally merging the incremental records of the active edges with the graph structure of the current batch to construct a state-responsive dynamic graph structure.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, the incremental records of edges in the active state are incrementally merged with the graph structure of the current batch to construct a state-responsive dynamic graph structure. This includes: matching and searching in the historical graph structure based on the source node identifier, target node identifier, and relation type of each edge in the active state; if a match is successful, updating the current dynamic weight of the edge in the active state to the weight attribute of the corresponding edge in the historical graph structure, and recording the last updated session identifier and activation timestamp; if a match fails, adding the edge in the active state as a new edge, along with its dynamic weight, source node identifier, target node identifier, relation type, and activation timestamp, to the graph structure of the current batch; and recalculating and updating the state of the relevant nodes based on the updated edge weights and the newly added edges to form a state-responsive dynamic graph structure.
[0011] In conjunction with the first aspect, in some implementations of the first aspect, the dynamic weights of each edge are calculated based on the association strength benchmark value and the state value of the source node, including: obtaining the current state value of the source node; multiplying the association strength benchmark value by a first weight coefficient to obtain a first weighted value; multiplying the current state value of the source node by a second weight coefficient to obtain a second weighted value; and adding the first weighted value and the second weighted value to obtain the dynamic weight of the edge.
[0012] In conjunction with the first aspect, in some implementations of the first aspect, a similarity score list is obtained by vector encoding and calculating similarity of semantic matching pairs through a semantic understanding model. This includes: vector encoding the descriptive information of the data fields in the semantic matching pair to obtain field vector representations; vector encoding the combined text of the semantic core description and semantic boundary constraints of the semantic nodes in the semantic matching pair to obtain node vector representations; calculating the vector similarity between the field vector representations and the node vector representations to obtain a similarity score; and calculating the similarity score for each data field and all semantic nodes to form a similarity score list.
[0013] In conjunction with the first aspect, in certain implementations of the first aspect, according to predefined aggregation rules, aggregation calculations are performed on multiple standardized values of the same node to obtain a state value, including: identifying all standardized values mapped to the same node identifier; determining the aggregation method according to the aggregation rules, where the aggregation method includes at least one of weighted average, maximum value selection, conditional combination, or time decay; when using the weighted average method, assigning weight coefficients to each standardized value and calculating the sum of the products of the weight coefficients and the standardized values as the node state value; when using the maximum value selection method, selecting the maximum value among all standardized values as the node state value; when using the conditional combination method, performing combination operations on the standardized values according to the logical relationships between fields to obtain the node state value; and when using the time decay method, setting a decay factor for the standardized values according to the time attributes of the data and calculating the decayed aggregation result as the node state value.
[0014] Secondly, one embodiment of this application provides a dynamic graph structure construction system based on offline semantic constraint mapping. The system includes: a semantic node system construction module, used to construct a predefined semantic node system, defining the node identifier, semantic core description, and semantic boundary constraints of each semantic node, and defining the association relationships between semantic nodes, including source node identifier, target node identifier, relationship type, and association strength benchmark value; an offline mapping generation module, used to perform semantic matching and mapping between the description information of each data field and the semantic core description of each semantic node based on the semantic node system in the offline stage, generating a fixed-storage offline semantic mapping table; and a node state calculation module, used to... During the runtime phase, based on the offline semantic mapping table, each field in the current batch of data is mapped to the corresponding semantic node. The values of multiple fields mapped to the same node are standardized and aggregated to obtain the node state value of each semantic node and determine the activation state. The edge weight calculation and activation determination module is used to initialize the graph structure based on the association relationship between semantic nodes in the semantic node system, obtain the state value of the source node associated with each predefined edge, dynamically calculate the weight of each edge, and determine whether each edge is activated in the current batch. The dynamic graph structure construction module is used to add the edges determined to be in the activated state and their dynamic weights to the graph structure of the current batch, and construct a state-responsive dynamic graph structure that responds to the current batch of data.
[0015] Compared with the prior art, the beneficial effects of this application are:
[0016] 1. This application fundamentally solves the problem of insufficient runtime semantic mapping consistency in existing technologies by completing semantic matching and generating a fixed offline semantic mapping table in the offline stage, transforming runtime semantic understanding model reasoning into deterministic table lookup operations. By pre-determining and storing the mapping relationship between data fields and semantic nodes in the offline stage, it ensures that the same field always maps to the same semantic node in all batches, achieving complete consistency and repeatability of semantic mapping.
[0017] 2. The dynamic edge activation proposed in this application dynamically calculates the activation weight of edges based on the current state value of the source node, enabling the graph structure to adaptively adjust its topology and edge weight distribution as the state of the input data changes, accurately reflecting the actual relationships under the current data conditions. Simultaneously, the conversational incremental merging strategy achieves incremental updates rather than full reconstruction through edge triple matching, performing weight updates or additions only on changed edges. This reduces the computational complexity from the product of the number of nodes and batches in full reconstruction to the order of magnitude of incremental nodes, significantly reducing computational overhead in multi-batch scenarios. Attached Figure Description
[0018] Figure 1A flowchart illustrating a dynamic graph structure construction method based on offline semantic constraint mapping provided in an embodiment of this application;
[0019] Figure 2 This is a schematic diagram of the process of generating a fixed-storage offline semantic mapping table by semantically matching and mapping the descriptive information of each data field with the semantic core description of each semantic node based on a semantic node system provided in an embodiment of this application.
[0020] Figure 3 This is a flowchart illustrating how, according to an embodiment of the present application, each field in the current batch of data is mapped to a corresponding semantic node based on an offline semantic mapping table, and the values of multiple fields mapped to the same node are standardized and aggregated to obtain the state value of each semantic node and determine the activation state.
[0021] Figure 4 This is a schematic diagram illustrating the process of initializing a graph structure based on the association relationship between semantic nodes in a semantic node system according to an embodiment of this application, obtaining the state value of the source node associated with each predefined edge, dynamically calculating the weight of each edge, and determining whether each edge is activated in the current batch.
[0022] Figure 5 This is a flowchart illustrating how edges determined to be in an active state and their dynamic weights are added to the graph structure of the current batch to construct a state-responsive dynamic graph structure that responds to the data of the current batch, according to an embodiment of this application.
[0023] Figure 6 This is a flowchart illustrating how an incremental record of the active edge is incrementally merged with the graph structure of the current batch to construct a state-responsive dynamic graph structure, as provided in one embodiment of this application.
[0024] Figure 7 This is a flowchart illustrating the process of calculating the dynamic weights of each edge based on the association strength benchmark value and the state value of the source node, as provided in an embodiment of this application.
[0025] Figure 8 This is a flowchart illustrating the process of using a semantic understanding model to vector-encode semantic matching pairs and calculate similarity to obtain a similarity score list, according to an embodiment of this application.
[0026] Figure 9 This is a flowchart illustrating how a state value is obtained by performing aggregation calculations on multiple standardized values of the same node according to predefined aggregation rules, as provided in an embodiment of this application.
[0027] Figure 10 This is a schematic diagram of a dynamic graph structure construction system based on offline semantic constraint mapping provided in an embodiment of this application. Detailed Implementation
[0028] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0029] Figure 1 This is a flowchart illustrating a dynamic graph structure construction method based on offline semantic constraint mapping provided in an embodiment of this application. Figure 1 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which includes the following steps:
[0030] Step 101: Construct a predefined semantic node system. The semantic node system is used to define the node identifier, semantic core description, semantic boundary constraints, and the relationship between semantic nodes for each semantic node.
[0031] It should be understood that the semantic node system is a predefined semantic standard framework used to standardize the expression and relationships of all semantic concepts.
[0032] A node identifier is a string or numeric code used to uniquely identify and reference a semantic node within a system. The semantic core description is a textual explanation, expressed in natural language or structured text, of the core semantic meaning and conceptual connotation represented by that semantic node.
[0033] Semantic boundary constraints are restrictive descriptions used to limit the scope of application of a semantic node and exclude inapplicable scenarios. They avoid semantic ambiguity by clearly defining boundary conditions.
[0034] Step 102: In the offline stage, based on the semantic node system, semantic matching and mapping are performed on the descriptive information of each data field and the semantic core description of each semantic node to generate a fixed-storage offline semantic mapping table.
[0035] It should be understood that the offline phase refers to the phase in which configuration and preparation work are performed in advance before the system officially processes the running data. The processing results of this phase will be stored and solidified for use in the running phase.
[0036] The offline semantic mapping table is a data structure that records the mapping relationship between all data fields and their corresponding semantic node identifiers. This table is generated in the offline phase and queried and used in the runtime phase.
[0037] Step 103: During the running phase, based on the offline semantic mapping table, each field in the current batch of data is mapped to the corresponding semantic node. The values of multiple fields mapped to the same node are standardized and aggregated to obtain the status value of each semantic node and determine the activation status.
[0038] It should be understood that the operational phase refers to the phase in which the system receives actual input data and executes core business logic such as data processing, state calculation, and graph structure construction.
[0039] The activation status is a Boolean flag indicating whether a node is in an active or active state, determined by whether its status value meets the preset activation conditions.
[0040] Step 104: Initialize the graph structure based on the association relationship between semantic nodes in the semantic node system, obtain the state value of the source node associated with each predefined edge, dynamically calculate the weight of each edge, and determine whether each edge is activated in the current batch.
[0041] It should be understood that initializing the graph structure is an operation that creates the basic framework of the graph data structure based on the predefined nodes and relationships in the semantic node system, including establishing the set of nodes and the set of potential edges.
[0042] Predefined edges are potential connections in the graph structure that are predetermined based on the associations defined in the semantic node system. Whether an edge is displayed in the current batch depends on the dynamic activation determination.
[0043] The source node is the starting node of an edge in the graph structure, and its state value affects the calculation of the edge's dynamic weight. Edge activation refers to the state where a predefined edge, under the current batch of data, meets the activation criteria and is included in the current batch of the graph structure.
[0044] Step 105: Add the edges and dynamic weights that are determined to be in an active state to the graph structure of the current batch, and construct a state-responsive dynamic graph structure that responds to the data of the current batch.
[0045] It should be understood that the graph structure of the current batch is a graph data structure instance containing active nodes and active edges constructed for the input data of the current batch. A state-responsive dynamic graph structure is a dynamically evolving graph structure that can adaptively adjust the node activation state, edge activation state, and edge weights according to changes in the state of the input data. This graph structure reflects the real-time response relationship between the data state and the graph topology.
[0046] This application's embodiments solve the consistency problem of runtime semantic matching by constructing a predefined semantic node system and solidifying semantic mapping relationships in the offline stage. At the same time, dynamic edge activation enables the graph structure to adaptively evolve with the data state. Thus, while ensuring the stability of semantic mapping, a dynamic graph structure that can accurately reflect the current data state can be constructed with low computational overhead, effectively supporting the application of association analysis and state assessment in multi-batch data scenarios.
[0047] Figure 2 This is a schematic diagram illustrating the process of generating a fixed-storage offline semantic mapping table by semantically matching and mapping the descriptive information of each data field with the semantic core description of each semantic node based on a semantic node system, as provided in one embodiment of this application. Figure 2 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping. Based on a semantic node system, it performs semantic matching and mapping between the description information of each data field and the semantic core description of each semantic node to generate a fixed-storage offline semantic mapping table, including the following steps:
[0048] Step 201: Extract the data fields and description information to be mapped, and combine the description information of each data field with the semantic core description and semantic boundary constraints of each semantic node to form a semantic matching pair.
[0049] Specifically, for the data source that the system needs to process, all data fields to be mapped are extracted. For each data field, its field name, field description, and field type are extracted. The field description expresses the semantic meaning of the field and can be derived from the data source's metadata, field comments, or business documentation. The field description of each data field is combined with the semantic core description and semantic boundary constraints of each semantic node in the semantic node system to form semantic matching pairs. The field description is used as the text to be matched, and the combination of the semantic core description and semantic boundary constraints is used as the candidate semantic standard. For each data field, it is combined with all semantic nodes to form several semantic matching pairs, where the number of semantic matching pairs equals the total number of nodes in the semantic node system. The semantic matching pairs are combined by text concatenating or structurally combining the field description with the semantic core description and semantic boundary constraints to ensure that the semantic understanding model can fully acquire the field semantics and node semantic constraint information.
[0050] Step 202: The semantic matching pairs are vector-encoded and similarity is calculated using a semantic understanding model to obtain a similarity score list.
[0051] Specifically, a pre-trained semantic understanding model is invoked to calculate semantic similarity for semantic matching pairs. The semantic understanding model employs a deep learning-based sentence encoding model. For each semantic matching pair, the field descriptions are first vectorized to obtain field vector representations. Then, the combined text of the semantic core description and semantic boundary constraints is vectorized to obtain node vector representations. The vector similarity between the field vector representations and the node vector representations is calculated using cosine similarity or other vector distance metrics to obtain a similarity score. Similarity scores are calculated for each data field and all semantic nodes, forming a similarity score list for that data field. This similarity score list contains the similarity score between the data field and each semantic node, used for selecting the mapping target.
[0052] Step 203: Filter similarity scores according to preset thresholds, and select the semantic node with the highest similarity score for each data field, and use the corresponding node identifier as the mapping target.
[0053] Specifically, for each data field's similarity score list, a filtering operation is performed to determine the mapping target. First, a confidence threshold is set to filter candidate mappings with excessively low similarity scores, ensuring the mapping results have sufficient credibility. The confidence threshold ranges from 0.7 to 0.85. Semantic nodes with similarity scores below the confidence threshold are excluded from the candidate mappings. Among the candidate semantic nodes that meet the threshold condition, the semantic node with the highest similarity score is selected as the mapping target for that data field. The node identifier of this semantic node is used as the mapping result for that data field. If multiple semantic nodes have very close similarity scores and the difference is less than a preset difference threshold, a secondary judgment is performed using semantic boundary constraints. Semantic boundary constraints are restrictive descriptive texts used to limit the applicable scope of a semantic node. By explicitly defining the scenarios, exclusionary features, or boundary conditions in which the node is not applicable, ambiguity and misjudgment in the semantic mapping process are avoided. Semantic boundary constraints typically include a list of exclusionary keywords, descriptions of inapplicable scenarios, or explanations of concepts that are semantically similar to the node but should be distinguished. For example, for a semantic node representing network traffic, its semantic boundary constraints may include exclusions such as excluding physical transport traffic or personnel movement, to ensure that the node only maps fields related to network data transmission and does not incorrectly match fields related to logistics or people movement. A secondary determination is made by checking whether the field description contains the exclusionary keywords defined in the semantic boundary constraints; if so, the candidate semantic node is excluded. If a unique mapping target still cannot be determined after the above screening, the data field is marked as awaiting manual review to ensure mapping accuracy.
[0054] Step 204: Solidify and store the mapping relationship between each data field and the node identifier to generate an offline semantic mapping table.
[0055] Specifically, all data fields with successfully established mapping relationships and their corresponding node identifiers are compiled into an offline semantic mapping table. The offline semantic mapping table uses a key-value pair data structure, where the key is the field name or identifier of the data field, and the value is the corresponding node identifier. In addition to the mapping relationship itself, the offline semantic mapping table also includes auxiliary information such as mapping confidence, mapping generation time, and mapping source. Mapping confidence records the similarity score when the mapping is determined, used for mapping quality assessment. Mapping generation time records the timestamp of the established mapping relationship, supporting version tracking and update management. Mapping source records the data source or batch information on which the mapping is based, facilitating traceability of the mapping basis. The offline semantic mapping table is stored as a structured file, in JSON, CSV, or database table format. This offline semantic mapping table is loaded into memory during system deployment, serving as the basis for querying data field-to-semantic node mappings during runtime, enabling deterministic and fast mapping operations.
[0056] Figure 3 This embodiment of the application provides a flowchart illustrating how, based on an offline semantic mapping table, fields in the current batch of data are mapped to corresponding semantic nodes, and the values of multiple fields mapped to the same node are standardized and aggregated to obtain the state value of each semantic node and determine its activation state. For example... Figure 3 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping. According to the offline semantic mapping table, each field in the current batch of data is mapped to a corresponding semantic node. The method then performs standardization and aggregation calculations on multiple field values mapped to the same node to obtain the state value of each semantic node and determine its activation state. The method includes the following steps:
[0057] Step 301: For each data field in the current batch of data, query the offline semantic mapping table to obtain the semantic node identifier that is mapped.
[0058] Specifically, during system operation, upon receiving the current batch of data, a semantic node mapping operation is performed on each data field contained in that batch. The current batch of data can contain multiple records, each with multiple data fields. For each data field, its field name or field identifier is extracted as a query key. The field name or field identifier is then queried in the offline semantic mapping table to obtain its corresponding semantic node identifier. The offline semantic mapping table uses a key-value pair structure, and the query operation has a constant-time complexity, enabling fast mapping. If the query is successful, the corresponding node identifier is directly returned, establishing the mapping relationship between the data field and the semantic node. If the query fails, it indicates that the data field did not have a mapping relationship established offline. In this case, it is handled according to a preset strategy, such as using default node mapping, triggering manual review, or recording it as an unmapped field. By querying the offline semantic mapping table, a deterministic mapping from data fields to semantic nodes is achieved, avoiding runtime calls to the semantic understanding model for real-time inference, significantly reducing computational overhead and ensuring the consistency of the mapping results.
[0059] Step 302: Perform standardization processing on the original values of multiple data fields mapped to the same node identifier to obtain standardized values mapped to a unified value range.
[0060] Specifically, the process first identifies all data fields mapped to the same node identifier and their original values. For numeric fields, the standardization process proceeds directly. For categorical or Boolean fields, they are first converted to numeric representations, such as converting true Boolean values to 1 and false Boolean values to 0, or mapping categorical values to numeric values according to predefined rules. During range standardization, mapping is performed based on the preset numerical range of the semantic node. The numerical range is defined by a minimum and a maximum value, representing the theoretical boundary of the semantic node's state value. The original values are mapped to a unified value range of 0 to 1 through a linear transformation. If the original value exceeds the preset numerical range, truncation is performed, limiting the standardized value to the range of 0 to 1. That is, the standardized value is the maximum of 0 and the calculated standardized value, and then the minimum of 1 and that maximum value. Through standardization, data field values from different sources and with different dimensions are mapped to a unified value space, providing a comparable numerical basis for aggregation calculations.
[0061] Step 303: Perform aggregation calculation on multiple standardized values of the same node according to predefined aggregation rules to obtain the state value.
[0062] Specifically, for multiple standardized values mapped to the same semantic node, aggregation calculations are performed according to the predefined aggregation rules within the semantic node system to obtain the state value of that semantic node. The aggregation rules define how multiple data sources or multiple field values are summarized into a single node state expression. Aggregation rules include, but are not limited to, weighted average, maximum value selection, conditional combination, and time decay methods. When using the weighted average method, weight coefficients are assigned to each standardized value. These weight coefficients are determined based on the importance, reliability, or timeliness of the data fields. The sum of the products of the weight coefficients and the standardized values is calculated and then divided by the sum of the weight coefficients to obtain the node state value. When using the maximum value selection method, the maximum value among all standardized values is selected as the node state value. This method is suitable for scenarios focusing on extreme values or worst-case scenarios. When using the conditional combination method, standardized values are combined according to the logical relationships between fields. These logical relationships can be AND, OR, or other complex logical expressions. The node state value is obtained through conditional combination. When using a time decay method, a decay factor is set for the standardized values based on the time attribute of the data, so that the influence of earlier data on the current state gradually weakens. The sum of the products of the decay factor and the standardized value is calculated as the node state value. Through aggregation calculation, multiple field values mapped to the same node are summarized into a single state value, realizing the transformation from scattered data to semantic node state.
[0063] Step 304: Determine whether the state value meets the activation conditions according to the predefined activation rules, so as to determine the activation state of the semantic node.
[0064] Specifically, based on the node state value calculated in step 303, the activation status of the semantic node is determined according to the predefined activation rules in the semantic node system. The activation rules define the conditions that a node state value must meet to activate it. Activation status indicates that the semantic node is significant or valid in the current batch of data. Activation rules can employ threshold-based, interval-based, or combined methods. Threshold-based activation rules determine activation by comparing the node state value with a preset activation threshold. If the node state value is greater than or equal to the activation threshold, the node is truly activated; otherwise, it is false. The activation threshold is determined based on business requirements and empirical data, and is used to filter nodes with low state values. Interval-based activation rules define a valid interval for node state values. If the node state value is between the lower and upper bounds, the node is truly activated. This method is suitable for scenarios where activation occurs only within a specific range. Combined activation rules combine multiple conditions for logical determination, such as requiring the node state value to meet a threshold condition and depend on the node being activated, or requiring the node state value to meet an interval condition or the existence of a specific field. By determining the activation rules, the activation status of each semantic node in the current batch of data is determined, providing node activation information for the construction of dynamic graph structures and ensuring that only nodes with significant states are included in the graph structure calculation.
[0065] Figure 4 This is a schematic diagram illustrating the process of initializing a graph structure based on the association relationship between semantic nodes in a semantic node system, obtaining the state value of the source node associated with each predefined edge, dynamically calculating the weight of each edge, and determining whether each edge is activated in the current batch, according to an embodiment of this application. Figure 4 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping. This method initializes the graph structure based on the association relationships between semantic nodes in a semantic node system, obtains the state values of the source nodes associated with each predefined edge, dynamically calculates the weight of each edge, and determines whether each edge is activated in the current batch. The method includes the following steps:
[0066] Step 401: Initialize the graph structure based on the source node identifier, target node identifier, relationship type, and association strength benchmark value between semantic nodes, and obtain the state value of the source node associated with each predefined edge.
[0067] Specifically, based on the predefined relationships between semantic nodes in the semantic node system, the basic elements of the graph structure are initialized. The graph structure is represented by a directed graph data structure, including two core components: a node set and an edge set. The node set contains all semantic nodes whose state values were calculated in step 300. Each node is uniquely identified by a node identifier and carries the node attribute set generated in step 305, including information such as the current state value, activation state, timestamp, and data source. The edge set is initialized according to the relationships defined in the semantic node system, with each relationship corresponding to a predefined edge in the graph structure. Each predefined edge contains four basic attributes: source node identifier, target node identifier, relationship type, and relationship strength benchmark value. The source node identifier points to the starting node of the edge, the target node identifier points to the ending node of the edge, the relationship type describes the semantic relationship nature represented by the edge, such as an influence relationship, a triggering relationship, or a dependency relationship, and the relationship strength benchmark value represents the strength benchmark of the edge under static conditions, with a value range of 0 to 1. For each predefined edge in the edge set, the current state value of the source node is queried and obtained from the node set based on its source node identifier. The current state value of the source node is the node state value obtained through aggregation calculation in step 303, and this state value will serve as an important parameter for dynamic weight calculation. Through the initialization operation, a complete graph structure framework containing all potential nodes and potential edges is established, providing the basic structure for dynamic edge activation.
[0068] Step 402: Calculate the dynamic weights of each edge based on the association strength benchmark value and the state value of the source node.
[0069] Specifically, during the runtime phase, the activation weight of each predefined edge is dynamically calculated based on the current state of the source node, enabling responsive adjustment of edge weights to node states. For each predefined edge in the edge set, the current state value of its source node is first obtained. Then, the baseline value of the edge's association strength is multiplied by a first weight coefficient to obtain a first weighted value. Simultaneously, the current state value of the source node is multiplied by a second weight coefficient to obtain a second weighted value. The first weighted value and the second weighted value are added together to obtain the dynamic weight of the edge.
[0070] Step 403: Determine whether the dynamic weights meet the preset activation criteria to determine whether each edge is activated in the current batch.
[0071] Specifically, based on the dynamic weights of each edge calculated in step 402, it is determined whether each predefined edge is activated in the current batch of data. An edge activation threshold is set as the activation determination condition, with a value ranging from 0.3 to 0.5, used to filter edges with low dynamic weights. For each predefined edge, its dynamic weight is compared with the edge activation threshold. If the dynamic weight is greater than or equal to the edge activation threshold, the edge is determined to be activated in the current batch, and its activation status is marked as true. If the dynamic weight is less than the edge activation threshold, the edge is determined not to be activated in the current batch, and its activation status is marked as false. Unactivated edges are not displayed in the graph structure of the current batch, but their predefined relationships are still retained in the potential edge set. When subsequent batches of data cause changes in the state value of the source node, the edge may still be reactivated. For edges determined to be activated, their dynamic weights are stored as the actual weights of the edges for graph computation, path analysis, or influence propagation analysis. By activating the decision, dynamic filtering of edges in the graph structure is achieved. Only edges with significant correlation strength are included in the current batch of graph structures. This ensures that the graph structure accurately represents the current data state, and reduces the complexity and resource overhead of graph computation by filtering low-weight edges.
[0072] Figure 5 This is a flowchart illustrating how, in one embodiment of this application, edges determined to be active and their dynamic weights are added to the graph structure of the current batch to construct a state-responsive dynamic graph structure that responds to the data of the current batch. For example... Figure 5 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which adds edges determined to be in an active state and their dynamic weights to the graph structure of the current batch, thereby constructing a state-responsive dynamic graph structure that responds to the data of the current batch. The method includes the following steps:
[0073] Step 501: Generate an incremental record for each edge that is determined to be in an active state.
[0074] Specifically, for each edge determined to be active in step 104, the system performs an incremental record generation operation. The incremental record generation process includes the following: First, extracting the basic identification information of the edge, including the source node identifier and the target node identifier. These two identifiers are used to uniquely locate the edge's position in the semantic node system. Second, recording the edge's relationship type, which describes the semantic association properties between the source node and the target node, such as influence relationship, dependency relationship, or triggering relationship. Third, recording the dynamic weight calculated in the current batch, which reflects the actual activation strength of the edge in the current data state. Finally, attaching an activation timestamp to the edge, which identifies the specific time point when the edge was determined to be active in the current batch.
[0075] Incremental records are organized as structured data objects. Each incremental record contains five essential attributes: source node identifier, target node identifier, relation type, current dynamic weight, and activation timestamp. This data structure design ensures that complete edge information is accurately transmitted to the graph merging step, while also providing necessary time-based information for graph version tracking and evolution analysis. By encapsulating the information of activated edges as incremental records, the system achieves fine-grained management of graph structure changes, laying the data foundation for incremental merging operations.
[0076] Step 502: Incrementally merge the incremental records of the edges in the active state with the graph structure of the current batch to construct a state-responsive dynamic graph structure.
[0077] Specifically, based on the incremental records of active edges generated in step 501, the system performs an incremental merging operation to construct a state-responsive dynamic graph structure. The incremental merging process includes the following operations: First, for each incremental record of an active edge, the system performs a matching search in the historical graph structure based on its source node identifier, target node identifier, and relationship type. If a match is successful, it means that the edge already exists in the historical graph structure. The system performs an update operation, updating the current dynamic weight in the incremental record to the weight attribute of the corresponding edge in the historical graph structure, and simultaneously updating the edge's last update session identifier and activation timestamp, thereby achieving dynamic refresh of the edge weight. If a match fails, it means that the edge is a newly appearing association in the current batch. The system performs an add operation, adding the edge along with its dynamic weight, source node identifier, target node identifier, relationship type, and activation timestamp to the graph structure of the current batch, thereby achieving dynamic expansion of the graph structure topology.
[0078] After incrementally merging edges, the system further recalculates and updates the state information of relevant nodes based on the updated edge weights and newly added edges. Through the above incremental merging process, the system finally forms a state-responsive dynamic graph structure that responds to the current batch of data. This graph structure contains both the latest state information of the current batch and retains the evolution trajectory of historical batches, realizing low-overhead incremental construction and traceable dynamic expression of the graph structure.
[0079] Figure 6 This is a flowchart illustrating an embodiment of the present application, showing how to incrementally merge the incremental records of edges in the active state with the graph structure of the current batch to construct a state-responsive dynamic graph structure. For example... Figure 6 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which incrementally merges the incremental records of edges in the active state with the graph structure of the current batch to construct a state-responsive dynamic graph structure, including the following steps:
[0080] Step 601: Perform a matching search in the historical graph structure based on the source node identifier, target node identifier, and relationship type of each active edge.
[0081] Specifically, for each incremental record of an active edge generated in step 501, the system performs a matching search operation in the historical graph structure. The system first extracts the three identifier attributes from the incremental record, and then traverses and searches the edge set of the historical graph structure. The search process uses hash indexes or relational database queries, with the source node identifier, target node identifier, and relation type as joint query conditions to determine whether an edge with the same triplet identifier as the current incremental record exists in the historical graph structure. If it exists, the match is considered successful, and the edge is an update of an existing edge in the historical graph structure; if it does not exist, the match is considered unsuccessful, and the edge is a newly added edge in the current batch. The matching search operation provides a basis for subsequent edge update or addition operations, ensuring that the uniqueness constraint and consistency requirement of edges are met during the incremental merging process.
[0082] Step 602: If the match is successful, update the current dynamic weight of the active edge to the weight attribute of the corresponding edge in the historical graph structure, and record the last updated session identifier and activation timestamp.
[0083] Specifically, when the matching search in step 601 is successful, it indicates that the edge corresponding to the incremental record already exists in the historical graph structure, and the system performs an edge weight update operation. The update operation includes the following: First, the system writes the current dynamic weight value from the incremental record into the weight attribute field of the corresponding edge in the historical graph structure, achieving dynamic refreshing of the edge weight. This update operation uses an overwrite method, replacing the original weight value of the edge with the newly calculated dynamic weight, thus ensuring that the edge weight reflects the latest impact of the source node state under the current batch of data. Second, the system records the last update session identifier, which marks the session source where the edge was last updated, facilitating the tracing of the batch to which the edge weight change belongs. Third, the system records the activation timestamp, which identifies the specific time point when the edge was reactivated and its weight updated in the current batch. By synchronously updating the edge's weight attribute, session identifier, and timestamp, the system achieves consistent maintenance of the edge's state information and time information, providing complete metadata support for graph structure version management and historical tracing.
[0084] Step 603: If the matching fails, the active edge is taken as a new edge and added to the graph structure of the current batch along with its dynamic weight, source node identifier, target node identifier, relation type and activation timestamp.
[0085] Specifically, when the matching search in step 601 fails, it indicates that the edge corresponding to the incremental record does not exist in the historical graph structure. This edge represents a newly emerging association in the current batch, and the system performs a new edge addition operation. The addition operation introduces the active edge as a new edge into the graph structure. The specific process includes: First, the system creates a new edge object. The attributes of this edge object include source node identifier, target node identifier, relation type, dynamic weight, and activation timestamp. The source node identifier and target node identifier define the connection relationship of the edge, the relation type describes the semantic association property represented by the edge, the dynamic weight quantifies the activation strength of the edge, and the activation timestamp records the first appearance time of the edge. Second, the system adds the newly created edge object to the edge set of the graph structure in the current batch, making the edge a valid component of the graph structure topology. Through the addition of new edges, the graph structure's topology is dynamically expanded, enabling it to express newly emerging semantic associations in the current batch of data, thereby achieving an adaptive response of the graph structure to data changes.
[0086] Step 604: Based on the updated edge weights and newly added edges, recalculate and update the state of the relevant nodes to form a state-responsive dynamic graph structure.
[0087] Specifically, after completing the edge update and edge addition operations in steps 602 and 603, the system recalculates and updates the state information of relevant nodes based on the updated edge weights and newly added edges to form the final state-responsive dynamic graph structure. The node state recalculation process includes the following: First, the system identifies nodes affected by changes in edge weights or the addition of new edges; these nodes are the target nodes for edge updates or additions. Second, according to the node's state calculation rules, the system comprehensively considers the weights of all incoming edges to the node and the state value of the source node to recalculate the node's state value. State calculation can employ weighted summation, maximum value selection, or a custom aggregation function; the calculated new state value reflects the semantic influence intensity received by the node in the current graph structure state. Third, based on the node's activation rules and the recalculated state value, the system determines whether the node's activation state has changed and updates the node's activation state identifier. Through the above recalculation and updating of node states, the system ensures the consistency between node states and edge weights in the graph structure, enabling the graph structure to accurately reflect the complete state information of the current batch of data.
[0088] Figure 7 This is a flowchart illustrating the calculation of dynamic weights for each edge based on a correlation strength benchmark value and the state value of the source node, as provided in an embodiment of this application. Figure 7 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which calculates the dynamic weights of each edge based on the association strength benchmark value and the state value of the source node, including the following steps:
[0089] Step 701: Obtain the current state value of the source node.
[0090] Specifically, before performing dynamic weight calculation on an edge, the system first obtains the current state value of the source node associated with that edge. For an edge whose dynamic weight is to be calculated, the system queries the node attribute set generated in step 103 based on the source node identifier of the edge, and extracts the state value of the source node calculated under the current batch of data. This state value is a quantified result obtained by the source node after standardization and aggregation calculation based on multiple field values mapped to the node, reflecting the activation degree or semantic strength of the source node under the current data input conditions. The current state value of the source node serves as an important input parameter for the dynamic weight calculation of the edge, and its magnitude directly affects the activation strength of the edge, reflecting the state response characteristics of semantic transmission in the graph structure. The system temporarily stores the obtained current state value of the source node in the calculation variable, providing a data basis for the weighted calculation operation.
[0091] Step 702: Multiply the correlation strength benchmark value by the first weighting coefficient to obtain the first weighted value.
[0092] Specifically, the system obtains the predefined baseline value of the association strength of the edge within the semantic node system. The system multiplies this baseline value by a preset first weighting coefficient to obtain a first weighted value. This first weighting coefficient, a real number ranging from 0 to 1, adjusts the contribution of the baseline value to the dynamic weight calculation. By introducing this first weighting coefficient, the system can flexibly control the balance between the static and dynamic features of the edge. The first weighted value reflects the fundamental portion of the edge's inherent association strength in the final dynamic weight, ensuring that the dynamic weight calculation does not completely deviate from the predefined semantic association structure.
[0093] Step 703: Multiply the current state value of the source node by the second weight coefficient to obtain the second weighted value.
[0094] Specifically, the system multiplies the current state value of the source node obtained in step 701 with a preset second weighting coefficient to obtain a second weighted value. The second weighting coefficient is used to adjust the contribution ratio of the source node's state value in the dynamic weight calculation, and its value is also a real number between 0 and 1. The second weighted value reflects the dynamic modulation effect of the source node's current activation level on the edge weights, embodying the state response characteristics of the graph structure. When the current state value of the source node is high, the second weighted value increases accordingly, enhancing the dynamic weight of the edge and thus exhibiting a stronger association activation effect in the graph structure. By weighting the source node's state value, the system achieves a sensitive response of edge weights to changes in node state, enabling the graph structure to dynamically reflect the real-time state characteristics of the data input.
[0095] Step 704: Add the first weighted value and the second weighted value to obtain the dynamic weight of the edge.
[0096] Specifically, the system adds the first weighted value calculated in step 702 to the second weighted value calculated in step 703 to obtain the dynamic weight of the edge. The dynamic weight is calculated as a linear combination of the first and second weighted values. The calculated dynamic weight serves as the actual weight value of the edge in the current batch of graph structures and is used for subsequent edge activation determination operations. The magnitude of the dynamic weight comprehensively reflects the inherent semantic strength of the edge and the current activation degree of the source node, providing a quantitative weight basis for the state-responsive expression of the graph structure.
[0097] Figure 8 This is a schematic diagram illustrating the process of using a semantic understanding model to vector-encode semantically matched pairs and calculate similarity to obtain a similarity score list, as provided in one embodiment of this application. Figure 8 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which uses a semantic understanding model to vector-encode semantic matching pairs and calculates similarity to obtain a similarity score list, including the following steps:
[0098] Step 801: Perform vector encoding on the descriptive information of the data fields in the semantic matching pair to obtain the field vector representation.
[0099] Specifically, for each semantic matching pair constructed in step 201, the system extracts the data field description information as encoding input. The data field description information includes the field name, field description text, and the business meaning of the field. The system calls a pre-trained semantic understanding model to perform vector encoding on this description information. The semantic understanding model adopts a deep learning-based text encoding architecture, such as a Transformer-based sentence encoding model, which can map natural language text into a fixed-dimensional real-valued vector space representation. The encoding process first segments and tokenizes the description information text, then extracts the semantic features of the text through the model's multi-layer neural network structure, and finally generates the vector representation corresponding to the field description information at the model's output layer. The generated field vector representation is a high-dimensional real-valued vector, where the value of each dimension captures the specific features of the field description text in the semantic space. This vector representation effectively preserves the semantic connotation of the field description information, providing a standardized numerical basis for similarity calculation.
[0100] Step 802: The combined text of semantic core description and semantic boundary constraints of semantic nodes in the semantic matching pair is vector-encoded to obtain node vector representations.
[0101] Specifically, for the semantic node portion of a semantic matching pair, the system first performs a text concatenation operation between the semantic core description and semantic boundary constraints of the node to form a combined text. The system then inputs the combined text into the same semantic understanding model for vector encoding. The encoding process uses the same model and processing flow as the field encoding in step 801, ensuring that the field vector and node vector are in the same semantic vector space, thereby guaranteeing the effectiveness of similarity calculation. After feature extraction and semantic encoding of the combined text, the model generates a node vector representation corresponding to the semantic node at the output layer. This node vector representation is also a high-dimensional real-number vector with the same dimension as the field vector. This vector comprehensively captures the node semantic features jointly defined by the semantic core description and semantic boundary constraints, providing a vectorized node standard for accurate semantic matching determination.
[0102] Step 803: Calculate the vector similarity between the field vector representation and the node vector representation to obtain a similarity score.
[0103] Specifically, the system calculates the vector similarity between the field vector representation obtained in step 801 and the node vector representation obtained in step 802, thereby obtaining a similarity score for the semantic matching pair. The vector similarity is calculated using the cosine similarity metric, which quantifies the degree of similarity between two vectors by calculating the cosine of the angle between them. Let the field vector representation be... The node vector is represented as Then the cosine similarity The calculation formula is:
[0104] ;
[0105] The cosine similarity score ranges from -1 to +1. A value closer to +1 indicates that the two vectors are closer in direction, meaning the field description information and the node semantic definition are more similar. The system records the calculated cosine similarity value as the similarity score for the semantic matching pair. This similarity score quantitatively reflects the degree of matching between the semantic features of the data field and the semantic definition of the semantic node, providing an objective numerical basis for selecting mapping targets.
[0106] Step 804: Calculate the similarity score for each data field and all semantic nodes to form a similarity score list.
[0107] Specifically, the system performs similarity calculations from steps 801 to 803 on a single data field and all semantic nodes in the semantic node system, ultimately forming a complete similarity score list for that data field. For a specific data field to be mapped, the system iterates through all semantic nodes defined in the semantic node system, constructs semantic matching pairs between the field and each semantic node, and then sequentially performs vector encoding and similarity calculation operations. The similarity score obtained each time is recorded along with the corresponding semantic node identifier, forming a score record. After completing the similarity calculation between the field and all semantic nodes, the system summarizes and organizes all score records to form a similarity score list. The data structure of this list is a set of key-value pairs, where the key is the node identifier of the semantic node, and the value is the corresponding similarity score. The similarity score list completely records the semantic matching degree ranking between the data field and each candidate semantic node, providing a comprehensive evaluation data foundation for selecting the optimal mapping target based on constraints in step 203. By repeatedly performing the above process on all data fields to be mapped in the system, the system finally completes the construction of the similarity score list for all fields, laying the computational foundation for the generation of the offline semantic mapping table.
[0108] Figure 9 This is a flowchart illustrating how, according to a predefined aggregation rule, multiple standardized values of the same node are aggregated to obtain a state value, as provided in one embodiment of this application. Figure 9 As shown, an embodiment of this application provides a dynamic graph structure construction method based on offline semantic constraint mapping, which performs aggregation calculations on multiple normalized values of the same node according to predefined aggregation rules to obtain state values, including the following steps:
[0109] Step 901: Identify all normalized values mapped to the same node identifier.
[0110] Specifically, the system performs node-level data aggregation on the data after standardization in step 302. For all standardized values in the current batch of data, the system groups and identifies them based on their mapped node identifiers. The specific process involves the system traversing each data field and its corresponding standardized value in the current batch of data, and extracting the target node identifier mapped to that field based on the field-to-node mapping relationship established in step 301. Using the node identifier as the grouping criterion, the system aggregates the standardized values of multiple fields mapped to the same node identifier into the same data set. During the aggregation process, the system also records the original field identifier, field name, and the field's position information in the batch data for each standardized value to maintain data traceability. After aggregation, the system forms a set of standardized values corresponding to each node identifier with a data mapping. This set contains the standardized values of all fields mapped to that node, providing a complete input data foundation for aggregation calculations.
[0111] Step 902: Determine the aggregation method according to the aggregation rules.
[0112] Specifically, the system determines which aggregation method to apply to multiple standardized values of a node based on the predefined aggregation rules for that node in the semantic node system. The aggregation rules are pre-configured for each node when the semantic node system is constructed in step 101. These rules define the numerical aggregation strategy to be used when multiple data fields are mapped to the same node. The system reads the aggregation method parameters configured for that node in the semantic node system and determines the specific aggregation method to be used based on the parameter values. Optional aggregation methods include weighted average, maximum value selection, conditional combination, and time decay. The system also supports combinations of these methods to achieve more complex aggregation logic. The weighted average method is suitable for scenarios that comprehensively consider the contributions of multiple fields and weight them according to their importance. The maximum value selection method is suitable for scenarios that focus on extreme value characteristics or upper limit indicators. The conditional combination method is suitable for scenarios where there are logical dependencies between fields or where numerical combinations are only possible when specific conditions are met. The time decay method is suitable for scenarios containing time series data and where historical data is decayed to highlight the impact of recent data. Based on the determined aggregation method, the system directs the calculation process to the corresponding aggregation calculation steps.
[0113] Step 903: When using a weighted average method, assign weight coefficients to each standardized value, and calculate the sum of the products of the weight coefficients and the standardized values as the node state values.
[0114] Specifically, when the system determines to use a weighted average method, it assigns corresponding weight coefficients to each standardized value mapped to the node and performs a weighted average calculation to obtain the node's state value. The weight coefficients are assigned according to predefined weight configuration rules, which can be based on the field's data quality score, the field's business importance level, the field's data freshness, or other domain-specific weighting criteria. The system assigns a corresponding weight coefficient to each value in the standardized value set, ensuring that the sum of all weight coefficients is normalized to 1 to guarantee the reasonableness of the calculated value's range. The system then performs a weighted average calculation, specifically by multiplying each standardized value by its corresponding weight coefficient to obtain a weighted term, and then summing all weighted terms. The summation result is the node's state value under the current batch of data. The weighted average method can comprehensively integrate information from multiple fields while reasonably balancing the numerical values according to the differentiated importance of each field, enabling the node's state value to more accurately reflect the node's true semantic strength under the current data conditions.
[0115] Step 904: When using the maximum value selection method, select the maximum value among all standardized values as the node state value.
[0116] Specifically, when the system determines to use the maximum value selection method, it selects the largest value from all standardized values mapped to that node as the node's state value. The system performs a traversal comparison operation on the set of standardized values, identifying the largest standardized value through sequential or parallel numerical comparisons. The system then directly assigns the identified maximum value to the node's current state attribute. The maximum value selection method is applicable when the semantic node focuses on peak characteristics or extreme states exhibited in the mapped fields, such as the highest risk level in risk assessment or peak load indicators in performance monitoring. The advantage of this method is its ability to quickly capture extreme cases among multiple observations, enabling the node state to sensitively respond to any field reaching a high value, thus providing more alerting state signals for activation determination and graph structure construction.
[0117] Step 905: When using the condition combination method, the standardized values are combined and calculated according to the logical relationship between the fields to obtain the node status value.
[0118] Specifically, when the system determines to use a conditional combination approach, it performs conditional judgments and combination operations on the standardized values to obtain the node state value based on the predefined logical relationships between the fields mapped to that node. The system first reads the predefined logical combination rules for that node, which define the combination conditions between fields in the form of logical expressions or a rule engine. Logical relationships can include AND operations, OR operations, conditional triggering relationships, or more complex multi-level nested logical structures. The system performs conditional judgments and numerical operations on each value in the standardized value set according to the logical combination rules. For example, under an AND operation, the system may calculate the minimum or product of multiple standardized values as the combination result. Under an OR operation, the system may calculate the maximum of multiple standardized values or combine them using a specific OR logical function. Under a conditional triggering relationship, the system decides whether to include other field values in the calculation based on whether certain field values meet the triggering conditions. Through the conditional combination approach, the system can handle node state calculation scenarios with complex semantic dependencies, enabling the node state value to accurately reflect the comprehensive performance of multiple fields under specific logical constraints.
[0119] Step 906: When using the time decay method, set the decay factor for the standardized value according to the time attribute of the data, and calculate the aggregated result after decay as the node state value.
[0120] Specifically, when the system determines to use the time decay method, it sets a corresponding time decay factor for each standardized value based on the time attribute information carried by each data field mapped to the node, and calculates the aggregated result after time decay processing as the node state value. The system first extracts the timestamp information of the original data corresponding to each standardized value; this timestamp can be the data acquisition time, recording time, or business occurrence time. The system calculates the time interval between each data point and the current batch processing time, and then calculates the corresponding decay factor according to a predefined decay function. The decay function adopts an exponential decay model, where the decay factor decreases exponentially with the increase of the time interval, and the decay rate is controlled by a preset decay coefficient parameter. The system multiplies each standardized value by its corresponding decay factor to obtain an adjusted value after time decay processing. The system then performs summation or weighted summation operations on all adjusted values to obtain the aggregated result considering the time decay effect. This aggregated result serves as the node's current state value, effectively reflecting the dynamic change trend of the node in the time dimension, ensuring that the node state has a higher responsiveness to recent data changes, while retaining the cumulative influence of historical data but participating in the state calculation with a decay weight.
[0121] Figure 10 This is a schematic diagram of a dynamic graph structure construction system based on offline semantic constraint mapping, provided as an embodiment of this application. Figure 10As shown in the figure, an embodiment of this application provides a dynamic graph structure construction system based on offline semantic constraint mapping. The semantic node system construction module 1001 serves as the system's basic configuration module, and its output semantic node system data structure provides a unified semantic standard and structural specification for multiple modules. The semantic node system constructed by this module includes two core components: node definition information and node relationship definition information. The node definition information is passed to the offline mapping generation module 1002 as the standard basis for semantic matching. The node relationship definition information is passed to the edge weight calculation and activation determination module 1004 as the configuration basis for graph structure initialization and edge weight calculation. By providing a unified semantic framework, the semantic node system construction module 1001 ensures that each module in the system has a consistent standard reference when processing semantic information.
[0122] The offline mapping generation module 1002 receives the semantic node system output by the semantic node system construction module 1001 as input, and also receives the description information of the data fields to be processed as another input. This module performs semantic matching calculations between fields and nodes through a semantic understanding model, generating a fixed-storage offline semantic mapping table. This offline semantic mapping table, as the core output of this module, is passed to the node state calculation module 1003 as the basis for querying field-to-node mappings during the runtime phase. The offline mapping generation module 1002 plays a crucial role in the system architecture by transforming the dynamic semantic matching process into a static deterministic mapping relationship. Its output mapping table ensures the consistency and efficiency of mapping operations in subsequent runtime phases.
[0123] During operation, the node state calculation module 1003 receives the input data of the current batch as the processing object and obtains the offline semantic mapping table from the offline mapping generation module 1002 as the mapping basis. This module maps each field of the input data to the corresponding semantic nodes according to the mapping table, performs standardization processing and aggregation calculation operations, and finally outputs the node state value and activation status information of each semantic node. The node state value data output by the node state calculation module 1003 is passed to the edge weight calculation and activation determination module 1004 as a key input parameter for dynamically calculating edge weights. This module undertakes the data transformation function of converting the original input data into a quantified representation of node states, and its output provides the state data foundation for the dynamic construction of the graph structure.
[0124] The edge weight calculation and activation determination module 1004 receives the node association definition information from the semantic node system construction module 1001, which is used to initialize the edge set of the graph structure and obtain the association strength benchmark value of the edges. Simultaneously, this module receives the current state value data of each node from the node state calculation module 1003, as input for dynamic weight calculation. The edge weight calculation and activation determination module 1004 calculates the dynamic weight of each edge based on the association strength benchmark value and the source node state value, and determines whether each edge is activated in the current batch according to preset activation determination conditions. This module outputs the set of edges determined to be in an activated state and the dynamic weight data of each activated edge; these outputs are passed to the dynamic graph structure construction module 1005. The edge weight calculation and activation determination module 1004 realizes the transformation of the graph structure from static predefined to dynamic state response in the system, and is the core implementation module for the dynamic characteristics of the system.
[0125] The dynamic graph structure construction module 1005 receives the set of active edges and dynamic weight data output by the edge weight calculation and activation determination module 1004 as input. This module can also access historical batches of graph structure data to support incremental merging operations. For each active edge, this module generates an incremental record containing complete attribute information and performs incremental merging operations with the historical graph structure. Through processing steps such as matching, weight updating, and adding new edges, it ultimately constructs a state-responsive dynamic graph structure that adapts to the current batch of data. The dynamic graph structure output by the dynamic graph structure construction module 1005 serves as the final output of the system and can be used by downstream graph analysis, visualization, or decision support modules. This module in the system is responsible for managing the incremental evolution of the graph structure and generating the final graph data, enabling continuous updates and historical state traceability of the graph structure.
[0126] It will be apparent to those skilled in the art that this application is not limited to the details of the exemplary embodiments described above, and that this application can be implemented in other specific forms without departing from the spirit or essential characteristics of this application. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of this application is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within this application. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A method for constructing dynamic graph structures based on offline semantic constraint mapping, characterized in that, include: Construct a predefined semantic node system, which is used to define the node identifier, semantic core description, semantic boundary constraints, and association relationships between semantic nodes for each semantic node. The association relationships include source node identifier, target node identifier, relationship type, and association strength benchmark value. In the offline phase, based on the semantic node system, semantic matching and mapping are performed on the description information of each data field and the semantic core description of each semantic node to generate a fixed-storage offline semantic mapping table. This includes extracting the data fields to be mapped and their description information, and combining the description information of each data field with the semantic core description and semantic boundary constraints of each semantic node to form a semantic matching pair. The semantic matching pairs are vector-encoded and similarity is calculated using a semantic understanding model to obtain a similarity score list; The similarity scores are filtered according to a preset threshold, and the semantic node with the highest similarity score is selected for each data field, with the corresponding node identifier used as the mapping target. The mapping relationship between each data field and the node identifier is permanently stored to generate the offline semantic mapping table; During the operation phase, based on the offline semantic mapping table, each field in the current batch of data is mapped to the corresponding semantic node. The values of multiple fields mapped to the same node are standardized and aggregated to obtain the status value of each semantic node and determine the activation status. The graph structure is initialized based on the association relationship between semantic nodes in the semantic node system. The state value of the source node associated with each predefined edge is obtained, the weight of each edge is dynamically calculated, and it is determined whether each edge is activated in the current batch. Edges that are determined to be active and their dynamic weights are added to the graph structure of the current batch to construct a state-responsive dynamic graph structure that responds to the data of the current batch.
2. The method according to claim 1, characterized in that, The step of mapping each field in the current batch of data to a corresponding semantic node based on the offline semantic mapping table, standardizing and aggregating the values of multiple fields mapped to the same node, obtaining the state value of each semantic node and determining its activation state includes: For each data field in the current batch of data, query the offline semantic mapping table to obtain the semantic node identifier that is mapped; For the original values of multiple data fields mapped to the same node identifier, perform standardization processing to obtain standardized values mapped to a uniform value range; According to predefined aggregation rules, aggregation calculations are performed on multiple standardized values of the same node to obtain the state value; Based on predefined activation rules, it is determined whether the state value meets the activation conditions in order to determine the activation state of the semantic node.
3. The method according to claim 2, characterized in that, The process of initializing the graph structure based on the association relationships between semantic nodes in the semantic node system, obtaining the state values of the source nodes associated with each predefined edge, dynamically calculating the weight of each edge, and determining whether each edge is activated in the current batch includes: The graph structure is initialized based on the source node identifier, target node identifier, relationship type, and association strength benchmark value between the semantic nodes, and the state value of the source node associated with each predefined edge is obtained. Based on the correlation strength benchmark value and the state value of the source node, the dynamic weight of each edge is calculated; Determine whether the dynamic weights meet the preset activation criteria to determine whether each edge is activated in the current batch.
4. The method according to claim 3, characterized in that, The step of adding the edges determined to be in an active state and their dynamic weights to the graph structure of the current batch, constructing a state-responsive dynamic graph structure that responds to the data of the current batch, includes: For each edge determined to be active, generate an incremental record including the source node identifier, target node identifier, relation type, current dynamic weight, and activation timestamp; The incremental records of the edges in the active state are incrementally merged with the graph structure of the current batch to construct the state-responsive dynamic graph structure.
5. The method according to claim 4, characterized in that, The step of incrementally merging the incremental records of the edges in the active state with the graph structure of the current batch to construct the state-responsive dynamic graph structure includes: Based on the source node identifier, target node identifier, and relationship type of each active edge, a matching search is performed in the historical graph structure; If a match is successful, the current dynamic weight of the active edge is updated to the weight attribute of the corresponding edge in the historical graph structure, and the last updated session identifier and activation timestamp are recorded. If the matching fails, the active edge is treated as a new edge, and together with the dynamic weight, source node identifier, target node identifier, relation type and activation timestamp, it is added to the graph structure of the current batch. Based on the updated edge weights and newly added edges, the states of the relevant nodes are recalculated and updated to form the state-responsive dynamic graph structure.
6. The method according to claim 5, characterized in that, The calculation of the dynamic weights of each edge based on the association strength benchmark value and the state value of the source node includes: Obtain the current state value of the source node; The first weighted value is obtained by multiplying the correlation strength benchmark value by the first weighting coefficient; The current state value of the source node is multiplied by the second weighting coefficient to obtain the second weighted value; The dynamic weight of the edge is obtained by adding the first weighted value and the second weighted value.
7. The method according to any one of claims 1 to 6, characterized in that, The step involves using a semantic understanding model to vector-encode the semantically matched pairs and calculate their similarity to obtain a similarity score list, including: The descriptive information of the data fields in the semantic matching pair is vector-encoded to obtain field vector representations; The semantic core description and semantic boundary constraints of the semantic nodes in the semantic matching pair are vector-encoded to obtain node vector representations; Calculate the vector similarity between the field vector representation and the node vector representation to obtain the similarity score; A similarity score is calculated for each individual data field and each of all semantic nodes to form the similarity score list.
8. The method according to any one of claims 2 to 6, characterized in that, The process of performing aggregation calculations on multiple standardized values of the same node according to predefined aggregation rules to obtain the state value includes: Identify all normalized values mapped to the same node identifier; The aggregation method is determined according to the aggregation rule, and the aggregation method includes at least one of the following: weighted average method, maximum value selection method, condition combination method, or time decay method; When using a weighted average method, a weight coefficient is assigned to each standardized value, and the sum of the products of the weight coefficient and the standardized value is used as the node state value. When using the maximum value selection method, the maximum value among all standardized values is selected as the node state value; When using a condition combination method, the node status value is obtained by combining the standardized values according to the logical relationship between the fields. When using the time decay method, a decay factor is set for the standardized value based on the time attribute of the data, and the aggregated result after decay is calculated as the node state value.
9. A dynamic graph structure construction system based on offline semantic constraint mapping, characterized in that, include: The semantic node system construction module is used to construct a predefined semantic node system, define the node identifier, semantic core description, semantic boundary constraints of each semantic node, and define the association relationship between the semantic nodes. The association relationship includes source node identifier, target node identifier, relationship type, and association strength benchmark value. The offline mapping generation module is used to perform semantic matching and mapping between the description information of each data field and the semantic core description of each semantic node based on the semantic node system in the offline stage, and generate a fixed-storage offline semantic mapping table. Specifically, the offline mapping generation module is used to: extract the data fields to be mapped and their description information; combine the description information of each data field with the semantic core description and semantic boundary constraints of each semantic node to form semantic matching pairs; and use a semantic understanding model to perform vector encoding on the semantic matching pairs and calculate the similarity to obtain a similarity score list. The similarity scores are filtered according to a preset threshold, and the semantic node with the highest similarity score is selected for each data field, with the corresponding node identifier used as the mapping target. The mapping relationship between each data field and the node identifier is permanently stored to generate the offline semantic mapping table; The node state calculation module is used to map each field in the current batch of data to the corresponding semantic node according to the offline semantic mapping table during the running phase, and to perform standardization and aggregation calculation on the values of multiple fields mapped to the same node to obtain the node state value of each semantic node and determine the activation state. The edge weight calculation and activation determination module is used to initialize the graph structure based on the association relationship between semantic nodes in the semantic node system, obtain the state value of the source node associated with each predefined edge, dynamically calculate the weight of each edge, and determine whether each edge is activated in the current batch. The dynamic graph structure construction module is used to add edges that are determined to be in an active state and their dynamic weights to the graph structure of the current batch, thereby constructing a state-responsive dynamic graph structure that responds to the data of the current batch.