Multi-user oriented real-time knowledge graph query method and system
By optimizing knowledge graph queries through graph neural networks and distributed databases, and combining the NSGA-II algorithm and permission label tree, the problems of high concurrency and data consistency in multi-user systems are solved, enabling real-time and accurate recommendations and data management.
Patent Information
- Application Number
- CN202511003572.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-21
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2045-07-21
AI Technical Summary
Existing knowledge graph query systems struggle to meet the low latency requirements of high-concurrency scenarios in multi-user environments, and have shortcomings in data updates and permission management, leading to distorted recommendation results and data consistency issues.
The system employs graph neural networks to predict entity relationships and update the knowledge graph. It combines a distributed graph database and the NSGA-II algorithm to generate recommendation results. It dynamically optimizes the knowledge graph update strategy by responding to and recording user feedback data through edge nodes, uses a permission tag tree to ensure data isolation and consistency, and processes user behavior and sensor data streams through a streaming computing engine.
It achieves sub-second synchronization of hot data, reduces redundant query overhead, ensures data consistency and isolation, improves recommendation accuracy and response efficiency, and meets the collaborative needs of multiple users.
Smart Images

Figure CN120910098B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of knowledge graph, in particular to a multi-user-oriented real-time knowledge graph query method and system. BACKGROUND
[0002] With the explosive growth of Internet data and the upgrading of industry demand for knowledge representation, modern knowledge graphs weaken the strict logical constraints while retaining the semantic web foundation, and emphasize more on fact-based knowledge organization and efficient query centered on entity-relation-property.
[0003] In multi-user systems such as B2B2C, the platform needs to support the collaborative interaction of enterprise users (B-end), platform operators (P-end) and consumers (C-end), involving complex permission division, data isolation and business process management. For example, enterprise users need to manage goods and inventory, consumers need to obtain personalized recommendations, and the platform needs to monitor transactions and risks in real time. The graph structure characteristics of knowledge graphs provide a new way for knowledge management in multi-user systems, but existing technologies still have deficiencies in multi-role dynamic query optimization, hot data preloading and cross-user data security isolation.
[0004] With the deepening of the industry's dependence on real-time decision-making, knowledge graphs need to support sub-second response and dynamic data synchronization. However, existing knowledge graph query systems are mainly based on static graph databases (such as Neo4j) or batch processing frameworks (such as Apache Spark), which are difficult to meet the low-latency requirements in high-concurrency scenarios. For example, in the e-commerce field, real-time recommendations need to combine user click streams, product inventory and competitor dynamics, but traditional systems cause distorted recommendation results due to data update lag or long query paths. Therefore, a multi-user-oriented real-time knowledge graph query method and system are proposed to solve the above problems. SUMMARY
[0005] In view of the deficiencies of the prior art, the purpose of the present application is to provide a multi-user-oriented real-time knowledge graph query method and system to solve the problems in the background art.
[0006] The present application is implemented as follows: a multi-user-oriented real-time knowledge graph query method, the method comprising the following steps:
[0007] Collecting user behavior, sensor and multi-modal data and performing feature extraction, and using a graph neural network to predict entity relationships and update the graph, and synchronizing to a distributed graph database;
[0008] After receiving a user request, query the data from the distributed graph database based on role matching query path, and generate a recommendation result combining the NSGA-II algorithm, and return the response through the edge node and record the user feedback data;
[0009] When a multi-user operation conflict is detected, the version number of the data record is checked, and a consensus algorithm is triggered to merge the operation or prompt a retry, while the authority label tree is updated to ensure data isolation and consistency;
[0010] Based on the recorded user feedback data, the user behavior and sensor data stream are processed by a streaming computing engine, and the knowledge graph update strategy is dynamically optimized.
[0011] As a further scheme of the application: the steps of collecting user behavior, sensor and multi-modal data and performing feature extraction, and predicting entity relationships and updating the graph using a graph neural network, and synchronizing to a distributed graph database, specifically include:
[0012] Real-time collection of user behavior, sensor signals and multi-modal data, generation of unified feature representation through cross-modal contrast learning model, and addition of source credibility metadata;
[0013] Based on the pre-constructed knowledge graph subgraph, the graph attention network is used to calculate the consistency score of the new data and the graph node, and the low-score data is triggered for hierarchical correction according to type and labeled with confidence label;
[0014] High-confidence data is used to predict relationships and update node embeddings using incremental graph neural networks, and the graph structure is optimized through sparsification pruning and node merging, and version snapshot records are generated to record changes in the graph;
[0015] The updated graph is partitioned by entity type, and the query frequency prediction model is used to prioritize hot subgraph synchronization to the distributed graph database, and the node version number is checked before synchronization.
[0016] As a further scheme of the application: the steps of extracting data from the distributed graph database based on role matching query path, and generating recommended results using NSGA-II algorithm, and returning responses through edge nodes and recording user feedback data, specifically include:
[0017] The query semantics are analyzed and role labels are extracted through BERT+knowledge graph embedding model, and differentiated needs are mapped to the distributed graph database, and the candidate product subgraph is quickly located and the preliminary recommended results are generated through the graph index mechanism;
[0018] The NSGA-II algorithm is used to comprehensively calculate the path length, data timeliness and user preference matching degree, and the optimal path is determined through a weighted scoring model and the cross-node recommended results are fused, and the NSGA-II algorithm runs in parallel between the nodes of the distributed graph database;
[0019] The complex query is split into edge node and cloud node tasks based on a knowledge density threshold, real-time feedback is synchronized by using an incremental updating mechanism, and a final recommendation list is formed by supplementing long-tail commodities through the cloud;
[0020] When the recommendation result is returned through the edge node, multi-dimensional feedback data is generated in real time by collecting user implicit behaviors and combining edge end eye movement trajectory simulation algorithms, and the multi-dimensional feedback data is encapsulated into a distributed graph database.
[0021] As a further scheme of the application, the step of checking the version number of the data record and triggering a consensus algorithm merging operation or prompting a retry, while updating the permission label tree, specifically comprises:
[0022] Based on the historical conflict mode of the knowledge graph and the entity association topology, high-concurrency conflict risk nodes are predicted and monitored in real time.
[0023] The operation version offset is compared by using a multi-dimensional vector clock, and operations exceeding a dynamic tolerance window are marked with a conflict level.
[0024] According to the permission label tree of the conflict entity, a consensus algorithm is dynamically selected, a decision node group is elected to perform arbitration, and an operation fusion instruction is generated.
[0025] According to the arbitration result, the permission label tree of the corresponding user is updated, and the decision-making process is recorded through a distributed log system.
[0026] As a further scheme of the application, the step of dynamically selecting a consensus algorithm according to the permission label tree of the conflict entity, electing a decision node group to perform arbitration, and generating an operation fusion instruction, specifically comprises:
[0027] The conflict operation is analyzed into an expression with algebraic operation properties, and operation object identifiers, operation types, and priority data are extracted.
[0028] Based on the algebraic operation rules, the mergable operations and the non-mergable operations are distinguished, and the corresponding solution strategies are output.
[0029] According to the data sensitivity, a strong consistency algorithm or a final consistency algorithm is matched, and a consensus node topology network is dynamically constructed.
[0030] The algebraic operation fusion is performed on the mergable operations, and the high-weight operation is reserved according to the permission priority for the non-mergable operations.
[0031] As a further scheme of the application, the step of processing the data stream of the user behavior and the sensor through the stream computing engine, and dynamically optimizing the knowledge graph updating strategy, specifically comprises:
[0032] User behavior logs, sensor time series data and operation conflict records are uniformly processed into time-windowed feature vectors by a stream computing engine, and the spatio-temporal correlation between data is retained;
[0033] A dynamic optimization objective function is constructed based on topology indicators and performance indicators of the knowledge graph;
[0034] The graph state is taken as an observation space and the update strategy parameter is taken as an action space, and an optimization strategy is generated through a proximal policy optimization algorithm;
[0035] After the optimized strategy parameter is verified through A / B testing, the differential update mechanism is used to update the knowledge graph in real time.
[0036] Another object of the present application is to provide a multi-user-oriented real-time knowledge graph query system, which comprises:
[0037] A data fusion and graph update module is used for collecting user behavior, sensor and multi-modal data, extracting features, predicting entity relationships using a graph neural network and updating the graph, and synchronizing to a distributed graph database;
[0038] A role perception optimization module is used for extracting data from the distributed graph database based on role matching query paths after receiving a user request, generating a recommendation result by combining an NSGA-II algorithm, returning a response through an edge node and recording user feedback data;
[0039] A conflict arbitration control module is used for checking the version number of data records and triggering a consensus algorithm to merge operations or prompting a retry when detecting a multi-user operation conflict, and updating a permission tag tree to ensure data isolation and consistency;
[0040] A feedback-driven optimization module is used for processing user behavior and sensor data streams through a stream computing engine based on recorded user feedback data, and dynamically optimizing knowledge graph update strategies.
[0041] As a further scheme of the present application, the data fusion and graph update module comprises:
[0042] A cross-modal data acquisition unit is used for collecting user behavior, sensor signals and multi-modal data in real time, generating unified feature representations through a cross-modal contrast learning model, and adding source credibility metadata;
[0043] A graph consistency verification unit is used for calculating the consistency score of new data and graph nodes based on a pre-constructed knowledge graph subgraph using a graph attention network, triggering hierarchical correction and marking confidence labels for low-score data according to types;
[0044] The incremental graph evolution unit is used to predict relationships and update node embeddings on high-confidence data using incremental graph neural networks. It optimizes the graph structure through sparse pruning and node merging, and generates version snapshots to record graph changes.
[0045] The distributed synchronization unit is used to partition the updated graph by entity type, combine the query frequency prediction model to prioritize the synchronization of hotspot subgraphs to the distributed graph database, and verify the node version number before synchronization.
[0046] As a further aspect of the present invention: the role perception optimization module includes:
[0047] The intent parsing unit is used to parse query semantics and extract role tags through BERT+knowledge graph embedding model, map differentiated needs to the distributed graph database, and quickly locate candidate product subgraphs and generate preliminary recommendation results by combining graph indexing mechanism;
[0048] The multi-objective optimization unit is used to comprehensively calculate path length, data timeliness and user preference matching degree using the NSGA-II algorithm, determine the optimal path through a weighted scoring model and integrate cross-node recommendation results. The NSGA-II algorithm runs in parallel among nodes of the distributed graph database.
[0049] The edge collaborative computing unit is used to break down complex queries into edge node and cloud node tasks based on knowledge density thresholds, use incremental update mechanism to provide synchronous real-time feedback, and supplement long-tail products through the cloud to form the final recommendation list.
[0050] The feedback tracking unit is used to collect implicit user behavior and generate multi-dimensional feedback data in real time by combining the eye-tracking simulation algorithm at the edge when the recommendation results are returned through the edge node, and then encapsulate it into the distributed graph database.
[0051] As a further aspect of the present invention: the conflict arbitration control module includes:
[0052] The conflict prediction unit is used to predict and monitor high-concurrency conflict risk nodes in real time based on historical conflict patterns and entity association topology of the knowledge graph.
[0053] The conflict marking unit is used to compare the operation version offset with a multi-dimensional vector clock and mark the conflict level for operations that exceed the dynamic tolerance window.
[0054] The consensus decision-making unit is used to dynamically select a consensus algorithm based on the permission tag tree of conflicting entities, elect a decision-making node group to perform arbitration, and generate operation fusion instructions.
[0055] The dynamic permission management unit is used to update the permission tag tree of the corresponding user based on the arbitration result and record the decision-making process through a distributed log system.
[0056] Compared with the prior art, the present application has the beneficial effects that:
[0057] The present application adopts the technologies of graph neural network prediction, distributed graph database synchronization, role-driven query optimization and flow computing dynamic adjustment, significantly improving the real-time performance and collaborative efficiency of knowledge graph in multi-user scenarios. Specifically, combined with multi-modal data feature extraction, dynamic incremental updating of the knowledge graph is realized, solving the lag problem of traditional static graph databases in real-time data synchronization, ensuring sub-second synchronization of hot data such as inventory and user behavior; Through the NSGA-II algorithm to generate differentiated recommendation paths, reduce the redundant query overhead, and through the low-latency response of the edge node to meet the demand of high-concurrency scenarios; Combined with the dynamic update of the permission label tree, the data consistency and isolation under multi-user operation conflict are guaranteed, avoiding data pollution caused by concurrent writing in traditional systems; Real-time processing of user feedback and sensor data stream, dynamic optimization of knowledge graph updating strategy, further shortening the query response time and improving the recommendation accuracy. In summary, the present application can realize end-to-end closed-loop optimization from user click stream to recommendation results, and through the distributed architecture and permission isolation mechanism, it meets the complex needs of multi-role collaboration. BRIEF DESCRIPTION OF DRAWINGS
[0058] Figure 1 Flowchart of the real-time knowledge graph query method for multi-users.
[0059] Figure 2 Flowchart of using graph neural network prediction to update the knowledge graph in the real-time knowledge graph query method for multi-users.
[0060] Figure 3 Flowchart of generating recommendation results combined with the NSGA-II algorithm in the real-time knowledge graph query method for multi-users.
[0061] Figure 4 Flowchart of checking the version number of data records and triggering the consensus algorithm merging operation or prompting retry in the real-time knowledge graph query method for multi-users.
[0062] Figure 5 Flowchart of dynamically selecting a consensus algorithm according to the permission label tree of a conflict entity in the real-time knowledge graph query method for multi-users.
[0063] Figure 6 Flowchart of processing the data stream of user behavior and sensors through the flow computing engine in the real-time knowledge graph query method for multi-users.
[0064] Figure 7 Structural schematic diagram of the real-time knowledge graph query system for multi-users.
[0065] Figure 8 A structure diagram of a data fusion and graph updating module in a multi-user-oriented real-time knowledge graph query system.
[0066] Figure 9 A structure diagram of a role perception optimization module in a multi-user-oriented real-time knowledge graph query system.
[0067] Figure 10 A structure diagram of a conflict arbitration control module in a multi-user-oriented real-time knowledge graph query system. DETAILED DESCRIPTION
[0068] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and specific embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and should not be used to limit the present application.
[0069] The specific implementation of the present application will be described in detail below with reference to specific embodiments.
[0070] As shown in the drawings, the embodiment of the present application provides a multi-user-oriented real-time knowledge graph query method, which comprises the following steps: Figure 1
[0071] S100, user behavior, sensor and multi-modal data are collected and feature extraction is performed, and a graph neural network is used to predict entity relationship and update the graph, and the synchronization to the distributed graph database;
[0072] S200, after receiving a user request, data is extracted from the distributed graph database based on role matching query path, and a recommendation result is generated by combining the NSGA-II algorithm, and a response is returned through an edge node and user feedback data is recorded;
[0073] S300, when a multi-user operation conflict is detected, the version number of the data record is checked and a consensus algorithm is triggered to merge the operation or prompt retry, and the permission tag tree is updated to protect the isolation and consistency of the data;
[0074] S400, based on the recorded user feedback data, the data stream of user behavior and sensor is processed through a streaming computing engine, and the knowledge graph updating strategy is dynamically optimized.
[0075] It should be noted that when the version number of the data record is verified, an optimistic lock mechanism is generally introduced for verification, which means that when multiple users operate concurrently, the version field (such as an integer or a timestamp) of the data record is compared to determine whether a conflict has occurred, and if a conflict has occurred, a consensus algorithm is triggered to merge the operation or prompt retry.
[0076] In the embodiment of the present application, the present application adopts the technologies of graph neural network prediction, distributed graph database synchronization, role-driven query optimization and streaming computing dynamic adjustment, which significantly improves the real-time performance and collaborative efficiency of the knowledge graph in a multi-user scenario. Specifically, by combining multi-modal data feature extraction, dynamic incremental updating of the knowledge graph is realized, solving the lag problem of traditional static graph databases in real-time data synchronization, ensuring sub-second synchronization of hot data such as inventory and user behavior; by generating differentiated recommendation paths through the NSGA-II algorithm, the redundant query overhead is reduced, and the low-latency response of the edge node meets the demand of high-concurrency scenarios; by combining dynamic updating of the permission label tree, the data consistency and isolation under multi-user operation conflict are guaranteed, avoiding data pollution caused by concurrent writing in traditional systems; real-time processing of user feedback and sensor data streams dynamically optimizes the knowledge graph updating strategy, further shortens the query response time and improves the recommendation accuracy. In summary, the present application can realize end-to-end closed-loop optimization from user click stream to recommendation results, and through the distributed architecture and permission isolation mechanism, it meets the complex needs of multi-role collaboration.
[0077] As shown in Figure 2 As a preferred embodiment of the present application, the steps of collecting user behavior, sensor and multi-modal data and performing feature extraction, predicting entity relationships using graph neural networks and updating the graph, and synchronizing to the distributed graph database, specifically include:
[0078] S101, real-time collection of user behavior, sensor signals and multi-modal data, generation of unified feature representation through cross-modal comparison learning model, and addition of source credibility metadata;
[0079] S102, based on the pre-constructed knowledge graph subgraph, use the graph attention network to calculate the consistency score of the new data and the graph node, and trigger hierarchical correction according to the type for the low-score data and mark the confidence label;
[0080] S103, use the incremental graph neural network to predict the relationship and update the node embedding of the high-confidence data, optimize the graph structure through sparsification pruning and node merging, and generate version snapshot records of the changes of the graph;
[0081] S104, divide the updated graph by entity type, combine the query frequency prediction model to synchronize the hot subgraph to the distributed graph database in priority, and check the node version number before synchronization.
[0082] In the embodiment of the application, real-time knowledge management in a multi-user scenario is realized through multi-modal data fusion and a dynamic knowledge graph updating mechanism. The specific process includes: real-time collection of user behavior (such as click stream), sensor signals (such as inventory sensor values), and multi-modal data (such as product images), generation of unified feature representation through cross-modal comparison learning model (such as CMCL), and addition of data source credibility label. Based on the pre-constructed knowledge graph subgraph (such as the "product-inventory-supplier" relationship), the matching degree of new data and existing nodes is calculated using the graph attention network (GAT), and if the inventory data reported by a user has low consistency with the supplier node in the graph (such as a difference in inventory quantity exceeding a threshold), the system will trigger a hierarchical correction mechanism: low-risk data is directly labeled with low confidence and retained, and high-risk data triggers manual review and updates the confidence label. Incremental graph neural network (such as KGNN) is used to predict relationships and update node embeddings for high-confidence data, and the graph structure is optimized through sparsification pruning (such as removing low-weight redundant edges) and node merging (such as merging multiple attribute descriptions of the same product), and version snapshot records are generated to record changes. The updated graph is partitioned by entity type (such as "product" and "inventory"), and combined with a query frequency prediction model (such as an LSTM model based on historical access logs) to prioritize high-heat subgraphs to a distributed graph database, for example, during an e-commerce promotion, the "hot-selling product-inventory" subgraph is preferentially loaded to the edge node, and the node version number is verified before synchronization to prevent data coverage caused by concurrent updates in multiple warehouses.
[0083] As shown in Figure 3 As a preferred embodiment of the application, the query path based on role matching extracts data from the distributed graph database, generates recommended results using the NSGA-II algorithm, and returns responses through the edge node and records user feedback data. The steps specifically include:
[0084] S201, the BERT+knowledge graph embedding model is used to analyze the query semantics and extract role labels, map differentiated needs to the distributed graph database, and quickly locate the candidate product subgraph and generate preliminary recommended results using the graph indexing mechanism;
[0085] S202, the NSGA-II algorithm is used to calculate the path length, data timeliness, and user preference matching degree, determine the optimal path through the weighted scoring model, and fuse the cross-node recommended results. The NSGA-II algorithm runs in parallel between the nodes of the distributed graph database;
[0086] S203, based on the knowledge density threshold, the complex query is split into edge node and cloud node tasks, real-time feedback is synchronized using the incremental updating mechanism, and the final recommended list is formed by supplementing long-tail products through the cloud;
[0087] S204, when returning the recommendation result through the edge node, collecting the implicit behavior of the user and combining the eye movement track simulation algorithm of the edge end to generate multi-dimensional feedback data in real time, and encapsulating the multi-dimensional feedback data into a distributed graph database.
[0088] In the embodiment of the application, personalized recommendation is realized through semantic analysis, multi-objective optimization and edge computing. For example, when a user searches for "high cost-effective mobile phones", the system analyzes the semantics through a BERT model combined with knowledge graph embedding (such as TransE), extracts role labels (such as B-end procurement managers focusing on supply chain stability and C-end consumers focusing on price), quickly locates the "mobile phone-supplier-user" commodity subgraph containing attributes such as price, rating and inventory, and generates a preliminary recommendation. The NSGA-II algorithm runs in parallel in the distributed graph database, and comprehensively calculates three types of indicators: path length (such as the number of associated edges between the user and the commodity), timeliness (the difference between the inventory update time and the current time), and user preference (such as the similarity between historical purchase records and recommended commodities), and selects the optimal path through weighted scoring (such as path weight 40%, timeliness 30%, and preference 30%). When complex queries are split, high-frequency commodities (such as hot-selling mobile phones) are returned immediately by edge nodes (such as store servers), and low-frequency commodities (such as niche accessories) are supplemented by cloud computing, combined with click duration, page sliding speed, etc. to generate multi-dimensional feedback data (such as a user repeatedly viewing the battery parameters of a certain mobile phone, which is marked by the system as a "sensitive user to battery life"). The final recommendation result is updated to the knowledge graph, and the commodity node weight is automatically adjusted (such as increasing the association strength between the mobile phone and the "sensitive to battery life" label), forming a "recommendation-feedback-optimization" closed loop to ensure that the recommendation is both fast and accurate. It should be noted that long-tail commodities refer to commodities that are not frequently purchased or browsed, but through the recommendation algorithm, these commodities can be effectively recommended to users who are truly interested, thereby increasing the exposure rate and sales opportunities of these commodities.
[0089] As shown in Figure 4 As a preferred embodiment of the application, the step of checking the version number of the data record and triggering the consensus algorithm merging operation or prompting retry, and simultaneously updating the permission label tree, specifically includes:
[0090] S301, based on the historical conflict mode of the knowledge graph and the entity association topology, predicting high-concurrency conflict risk nodes in real time;
[0091] S302, using multi-dimensional vector clock comparison to compare operation version offset, and marking the conflict level for operations exceeding the dynamic tolerance window;
[0092] S303, dynamically selecting a consensus algorithm according to the permission label tree of the conflict entity, electing a decision node group to perform arbitration and generating an operation fusion instruction;
[0093] S304, update the permission tag tree of the corresponding user according to the arbitration result, and record the decision-making process through a distributed log system.
[0094] In the embodiments of the present application, the consistency and permission isolation of multi-user operations are ensured through version control and dynamic consensus mechanism. For example, in the multi-warehouse inventory management scenario of e-commerce, when multiple warehouse managers simultaneously modify the inventory of the same commodity, the system monitors the write operation in real time based on the historical conflict pattern of the knowledge graph (such as "concurrent write conflict when inventory is insufficient") and the entity association topology (such as "commodity-warehouse-supplier" link) and outputs a conflict hotspot entity set. The system uses a multi-dimensional vector clock (such as a Hypertree clock) to compare the operation version offset (such as the version recorded by warehouse A and the version recorded by warehouse B), and when it exceeds the dynamic tolerance window, it is marked as a conflict level (such as low risk only recording logs, high risk requiring arbitration). According to the permission tag tree of the conflict entity (such as warehouse A manager can only modify the inventory of the warehouse, B manager can cross-warehouse allocation), a dynamic consensus algorithm (such as lightweight Quorum protocol in low-risk scenarios, PBFT consensus in high-risk scenarios) is selected, a decision node group is elected to perform arbitration, and an operation fusion instruction (such as preferentially adopting the latest version of inventory data and compensating for the difference value of other warehouses) is generated. After arbitration is completed, the system automatically updates the permission tag tree of the related user (such as temporarily downgrading the "cross-warehouse allocation permission" of the B manager to read-only), and records the decision-making process (such as conflict time, arbitration rules, and final version number) through a distributed log system, ensuring that the operation is traceable.
[0095] As shown in Figure 5 , as a preferred embodiment of the present application, the step of dynamically selecting a consensus algorithm according to the permission tag tree of the conflict entity, electing a decision node group to perform arbitration, and generating an operation fusion instruction specifically includes:
[0096] S313, the conflict operation is parsed into an expression with algebraic operation properties, and the operation object identifier, operation type, and priority data are extracted;
[0097] S323, based on the algebraic operation rules, distinguish between mergable operations and non-mergable operations, and output the corresponding solution strategy;
[0098] S333, match a strong consistency algorithm or a final consistency algorithm according to data sensitivity, and dynamically build a consensus node topology network;
[0099] S343, perform algebraic operation fusion on mergable operations, and retain high-weight operations according to permission priority for non-mergable operations.
[0100] In the embodiment of the present application, through algebraic conflict resolution and dynamic consistency mechanism, precise arbitration and data fusion of multi-user operation are realized. For example, in the multi-warehouse inventory management scenario of e-commerce, when multiple warehouse managers simultaneously modify the inventory of the same commodity, the system resolves the conflict operation into an expression with algebraic operation properties (such as "warehouse A increases 50 pieces" corresponding to expression +50, "warehouse B reduces 30 pieces" corresponding to expression -30), extracts the operation object identifier (such as commodity ID), operation type (addition or subtraction operation) and priority data (such as emergency replenishment marked as high priority). Based on the algebraic operation rules, the system automatically distinguishes between mergable operations (such as multiple inventory increase and decrease operations that can be combined into +50-30=+20) and non-mergeable operations (such as price modification, supplier switching, etc. Operations that need to be independently decided), and outputs the solution strategy: for the mergable operation, generate a fusion instruction (such as "inventory net increase 20 pieces"), and for the non-mergeable operation, retain the high-weight operation according to the permission tag tree (such as warehouse A administrator's permission is higher than warehouse B's) (such as the emergency replenishment instruction of warehouse A is executed first). In the data sensitivity matching stage, the system dynamically selects a consistency algorithm: if the conflict entity is high-sensitive data, a strong consistency algorithm (such as PBFT consensus) is used to construct a consensus topology network involving all network nodes; if it is low-sensitive data (such as commodity comments or non-core inventory), an eventual consistency algorithm (such as Raft) is used to construct a lightweight node group (such as the main warehouse + regional coordination node) for rapid arbitration. For example, when two warehouses simultaneously modify the inventory of a high-value commodity, the system will trigger the PBFT consensus process: the primary node (Primary) broadcasts the operation request, all replica nodes (Replicas) verify the legality of the operation and sign the confirmation, ensuring strong data consistency. It should be noted that for non-mergeable operations (such as warehouse A requires a 5% price increase and warehouse B requires a 3% price decrease), the system directly retains the high-weight operation (executes a 5% price increase) based on the permission tag tree (such as the warehouse A administrator has the price adjustment permission), and records the arbitration process (such as conflict time, operation type, and permission basis) through the distributed log system. Finally, the fusion instruction or arbitration result of the conflict operation is synchronized to the distributed graph database, updating the permission tag tree (such as reducing the subsequent operation priority of low-weight users), forming a closed-loop process of "conflict resolution-strategy matching-arbitration execution-permission update", which not only guarantees data consistency, but also avoids performance loss caused by excessive consensus.
[0101] As Figure 6 shown, as a preferred embodiment of the present application, the step of processing user behavior and sensor data streams through a stream computing engine and dynamically optimizing knowledge graph update strategy specifically includes:
[0102] S401, the user behavior log, sensor time series data and operation conflict record are uniformly processed into a time windowed feature vector through a stream computing engine, and the spatio-temporal correlation between data is retained;
[0103] S402, constructing a dynamic optimization objective function based on the topology index and the performance index of the knowledge graph;
[0104] S403, generating an optimization strategy through a proximal policy optimization algorithm with the graph state as an observation space and the update strategy parameter as an action space;
[0105] S404, after the optimized strategy parameter is verified through A / B testing, updating the knowledge graph in real time through a differential update mechanism.
[0106] In the embodiment of the application, in terms of e-commerce multi-warehouse inventory management, the system processes user behavior, sensor data and conflict records through a streaming engine, divides time window feature vectors, retains time sequence and spatial correlation, for example, synchronizes warehouse inventory data after a user clicks on a product. Based on the graph topology index (such as node degree) and the performance index (such as query delay), a dynamic optimization objective function is constructed to minimize update delay and maximize continuity. With the graph state as an observation space and the update parameter as an action space, an intelligent agent is trained through a proximal policy optimization algorithm (such as PPO) to learn the optimal strategy, such as reducing the window and enabling incremental updates when inventory conflicts are high. The optimized strategy is verified through A / B testing, for example, the new strategy improves synchronization speed by 0.8 seconds and reduces conflicts by 45%. After verification, the graph is updated through a differential update mechanism, only the conflict nodes are modified (such as adjusting inventory values) and the supplier nodes are linked to trigger an early warning, avoiding full reconstruction, ensuring real-time performance of the graph and efficient use of resources.
[0107] As shown in Figure 7 The embodiment of the application also provides a multi-user-oriented real-time knowledge graph query system, which comprises:
[0108] A data fusion and graph update module 100 is configured to collect user behavior, sensor and multi-modal data, extract features, predict entity relationships using a graph neural network and update the graph, and synchronize the graph to a distributed graph database;
[0109] A role perception optimization module 200 is configured to extract data from the distributed graph database based on role matching query paths after receiving a user request, generate a recommendation result in combination with an NSGA-II algorithm, return a response through an edge node and record user feedback data;
[0110] A conflict arbitration control module 300 is configured to check the version number of data records and trigger a consensus algorithm to merge operations or prompt a retry when detecting multi-user operation conflicts, and update a permission tag tree to ensure data isolation and consistency;
[0111] The feedback-driven optimization module 400 is used for processing data streams of user behaviors and sensors through a stream computing engine based on recorded user feedback data, and dynamically optimizing a knowledge graph update strategy.
[0112] In the embodiment of the application, dynamic incremental updating of the knowledge graph is realized by combining multi-modal data feature extraction, the lag problem of traditional static graph databases in real-time data synchronization is solved, sub-second level synchronization of hot data such as inventory and user behavior is ensured, a differentiated recommendation path is generated through the NSGA-II algorithm, redundant query overhead is reduced, and a low-latency response of an edge node meets the demand of a high-concurrency scenario; data consistency and isolation under multi-user operation conflict are ensured by combining dynamic updating of the permission tag tree, data pollution caused by concurrent writing in traditional systems is avoided; user feedback and sensor data streams are processed in real time, the knowledge graph update strategy is dynamically optimized, and the query response time is further shortened and the recommendation accuracy is improved. In summary, the application can realize end-to-end closed-loop optimization from user click stream to recommendation result, and meet the complex needs of multi-role collaboration through a distributed architecture and a permission isolation mechanism.
[0113] As shown in Figure 8 , as a preferred embodiment of the application, the data fusion and graph update module 100 comprises:
[0114] The cross-modal data acquisition unit 101 is used for acquiring user behaviors, sensor signals and multi-modal data in real time, generating unified feature representation through a cross-modal contrast learning model, and adding source credibility metadata;
[0115] The graph consistency verification unit 102 is used for calculating the consistency score of new data and graph nodes based on a pre-constructed knowledge graph subgraph using a graph attention network, and triggering hierarchical correction and confidence label marking for low-score data according to types;
[0116] The incremental graph evolution unit 103 is used for relationship prediction and node embedding update of high-confidence data using an incremental graph neural network, optimization of graph structure through sparsification pruning and node merging, and generation of version snapshot records of changes of the graph;
[0117] The distributed synchronization unit 104 is used for partitioning the updated graph according to entity types, preferentially synchronizing hot subgraphs to a distributed graph database in combination with a query frequency prediction model, and verifying node version numbers before synchronization.
[0118] As shown in Figure 9 , as a preferred embodiment of the application, the role-aware optimization module 200 comprises:
[0119] The intention analysis unit 201 is configured to analyze query semantics and extract role labels by using a BERT+knowledge graph embedding model, map differentiated requirements to a distributed graph database, and quickly locate candidate commodity subgraphs and generate preliminary recommendation results by using a graph indexing mechanism.
[0120] The multi-objective optimization unit 202 is configured to comprehensively calculate path length, data timeliness, and user preference matching degree by using an NSGA-II algorithm, determine an optimal path by using a weighted scoring model, and fuse cross-node recommendation results, wherein the NSGA-II algorithm is run in parallel between distributed graph database nodes.
[0121] The edge collaborative computing unit 203 is configured to split a complex query into edge node and cloud node tasks based on a knowledge density threshold, synchronously and in real time feedback by using an incremental updating mechanism, and form a final recommendation list by supplementing long-tail commodities in the cloud.
[0122] The feedback burying unit 204 is configured to collect user implicit behaviors and generate multi-dimensional feedback data in real time by using an eye movement trajectory simulation algorithm of the edge, and encapsulate the multi-dimensional feedback data into the distributed graph database when returning the recommendation results by using the edge.
[0123] As shown in FIG. 3, Figure 10 the conflict arbitration control module 300 includes:
[0124] The conflict prediction unit 301 is configured to predict high-concurrency conflict risk nodes based on a knowledge graph historical conflict mode and an entity association topology, and monitor in real time.
[0125] The conflict marking unit 302 is configured to compare operation version offsets by using a multi-dimensional vector clock, and mark a conflict level for an operation that exceeds a dynamic tolerance window.
[0126] The consensus decision unit 303 is configured to dynamically select a consensus algorithm according to a permission label tree of a conflict entity, elect a decision node group to perform arbitration, and generate an operation fusion instruction.
[0127] The permission dynamic management unit 304 is configured to update a permission label tree of a corresponding user according to an arbitration result, and record a decision process by using a distributed log system.
[0128] The above only describes the preferred embodiments of the present application in detail, and does not limit the present application, and any modification, equivalent replacement, and improvement made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0129] It should be understood that, even though a series of steps of the flow diagrams of the embodiments of the present application are shown in a sequential order, these steps are not necessarily performed in the order shown by the arrows. Unless specifically stated in the specification, the steps of the embodiments are not necessarily performed in the order shown in the flow diagrams. The steps of the embodiments can be performed in other orders, unless specifically stated in the specification. Furthermore, at least some of the steps of the embodiments can comprise multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but can be performed at different times, and the order of the sub-steps or stages can not necessarily be sequential, but can be performed in a round-robin or alternating manner with other steps or sub-steps or stages of other steps.
[0130] Other embodiments of the present disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses or adaptations of the present disclosure following, in general, the principles of the present disclosure and including such departures from the present disclosure that come within known or customary practice within the art to which the present disclosure pertains. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A multi-user oriented real-time knowledge graph query method, characterized in that, The method comprises the following steps: Collecting user behavior, sensor and multi-modal data and performing feature extraction, and predicting entity relationship and updating graph using graph neural network, and synchronizing to distributed graph database; After receiving a user request, data is extracted from the distributed graph database based on role matching query path, and a recommendation result is generated by combining NSGA-II algorithm, and a response is returned through an edge node and user feedback data is recorded; When a multi-user operation conflict is detected, the version number of the data record is checked and a consensus algorithm is triggered to merge the operation or prompt a retry, and a permission label tree is updated to ensure data isolation and consistency; Based on the recorded user feedback data, the data stream of user behavior and sensor is processed through a stream computing engine, and the knowledge graph update strategy is dynamically optimized. 2.The multi-user oriented real-time knowledge graph query method according to claim 1, characterized in that, The step of collecting user behavior, sensor and multi-modal data and performing feature extraction, and predicting entity relationship and updating graph, and synchronizing to distributed graph database, specifically comprises: Real-time collection of user behavior, sensor signal and multi-modal data, generation of unified feature representation through cross-modal contrast learning model, and addition of source credibility metadata; Based on the pre-constructed knowledge graph subgraph, the consistency score of the new data and the graph node is calculated using the graph attention network, and the low-score data is triggered for hierarchical correction according to type and labeled with confidence label; High-confidence data is used to predict relationships and update node embeddings using incremental graph neural networks, and the graph structure is optimized through sparsification pruning and node merging, and a version snapshot is generated to record changes in the graph; The updated graph is partitioned by entity type, and hot subgraphs are synchronized to the distributed graph database in priority based on query frequency prediction model, and the node version number is checked before synchronization. 3.The multi-user oriented real-time knowledge graph query method according to claim 1, characterized in that, The step of extracting data from the distributed graph database based on role matching query path, and generating a recommendation result by combining NSGA-II algorithm, and returning a response through an edge node and recording user feedback data, specifically comprises: The query semantics are analyzed and role labels are extracted through a BERT+knowledge graph embedding model, and differentiated needs are mapped to the distributed graph database, and candidate product subgraphs are quickly located and preliminary recommendation results are generated through a graph indexing mechanism; The NSGA-II algorithm is used to comprehensively calculate the path length, data timeliness and user preference matching degree, and the optimal path is determined through a weighted scoring model, and cross-node recommendation results are fused, and the NSGA-II algorithm runs in parallel between distributed graph database nodes; Based on the knowledge density threshold, complex queries are split into edge node and cloud node tasks, and incremental update mechanism is used for real-time feedback synchronization, and long-tail goods are supplemented through the cloud to form a final recommendation list; When the recommendation result is returned through the edge node, multi-dimensional feedback data is generated in real time by collecting user implicit behavior and combining edge eye tracking trajectory simulation algorithm, and it is encapsulated into the distributed graph database. 4.The multi-user oriented real-time knowledge graph query method according to claim 1, characterized in that, The step of checking the version number of the data record and triggering a consensus algorithm to merge the operation or prompting a retry, and updating the permission label tree, specifically comprises: Based on the knowledge graph historical conflict pattern and entity association topology, high-concurrency conflict risk nodes are predicted and monitored in real time; The operation version offset is compared by using a multi-dimensional vector clock, and an operation conflict level exceeding a dynamic tolerance window is marked; A consensus algorithm is dynamically selected according to a permission label tree of a conflict entity, a decision node group is elected to perform arbitration, and an operation fusion instruction is generated; According to the arbitration result, the permission label tree of the corresponding user is updated, and the decision process is recorded through a distributed log system. 5.The multi-user oriented real-time knowledge graph query method according to claim 4, characterized in that, The step of dynamically selecting a consensus algorithm according to the permission label tree of the conflict entity, electing a decision node group to perform arbitration, and generating an operation fusion instruction specifically includes: The conflict operation is parsed into an expression with algebraic operation attributes, and operation object identifiers, operation types and priority data are extracted; Based on the algebraic operation rule, the mergable operation and the non-mergable operation are distinguished, and the corresponding solution strategy is output; The data sensitivity is matched with the strong consistency algorithm or the eventual consistency algorithm, and a consensus node topology network is dynamically constructed; The algebraic operation fusion is performed on the mergable operation, and the high-weight operation is reserved according to the permission priority for the non-mergable operation. 6.The multi-user oriented real-time knowledge graph query method according to claim 1, wherein, The step of processing the data stream of the user behavior and the sensor through the stream computing engine and dynamically optimizing the knowledge graph update strategy specifically includes: The user behavior log, the sensor time series data and the operation conflict record are uniformly processed into a time windowed feature vector through the stream computing engine, and the spatio-temporal correlation between the data is retained; A dynamic optimization objective function is constructed based on the topology index and the performance index of the knowledge graph; The optimization strategy is generated by taking the graph state as the observation space and the update strategy parameter as the action space through the proximal policy optimization algorithm; After the optimized strategy parameter is verified through A / B testing, the differential update mechanism is used to update the knowledge graph in real time.
7. A multi-user oriented real-time knowledge graph query system, characterized in that, The system includes: A data fusion and graph update module is configured to collect user behaviors, sensors and multi-modal data, extract features, predict entity relationships using a graph neural network and update a graph, and synchronize the graph to a distributed graph database; A role perception optimization module is configured to extract data from the distributed graph database based on a role matching query path after receiving a user request, generate a recommendation result using an NSGA-II algorithm, and return a response through an edge node and record user feedback data; A conflict arbitration control module is configured to check a version number of data records and trigger a consensus algorithm to merge operations or prompt a retry when detecting a multi-user operation conflict, and update a permission label tree to ensure data isolation and consistency; A feedback-driven optimization module is configured to process a data stream of user behaviors and sensors through a stream computing engine based on recorded user feedback data, and dynamically optimize a knowledge graph update strategy. 8.The multi-user oriented real-time knowledge graph query system according to claim 7, wherein, The data fusion and graph update module includes: A cross-modal data acquisition unit is configured to collect user behaviors, sensor signals and multi-modal data in real time, generate unified feature representations using a cross-modal contrast learning model, and attach source credibility metadata; A graph consistency verification unit is configured to calculate a consistency score of new data and graph nodes using a graph attention network based on a pre-constructed knowledge graph subgraph, trigger hierarchical correction for low-score data according to types, and label confidence labels. The incremental graph evolution unit is used to predict relationships and update node embeddings on high-confidence data using incremental graph neural networks. It optimizes the graph structure through sparse pruning and node merging, and generates version snapshots to record graph changes. The distributed synchronization unit is used to partition the updated graph by entity type, combine the query frequency prediction model to prioritize the synchronization of hotspot subgraphs to the distributed graph database, and verify the node version number before synchronization. 9.The multi-user oriented real-time knowledge graph query system according to claim 7, wherein, The role perception optimization module includes: The intent parsing unit is used to parse query semantics and extract role tags through BERT+knowledge graph embedding model, map differentiated needs to the distributed graph database, and quickly locate candidate product subgraphs and generate preliminary recommendation results by combining graph indexing mechanism; The multi-objective optimization unit is used to comprehensively calculate path length, data timeliness and user preference matching degree using the NSGA-II algorithm, determine the optimal path through a weighted scoring model and integrate cross-node recommendation results. The NSGA-II algorithm runs in parallel among nodes of the distributed graph database. The edge collaborative computing unit is used to break down complex queries into edge node and cloud node tasks based on knowledge density thresholds, use incremental update mechanism to provide synchronous real-time feedback, and supplement long-tail products through the cloud to form the final recommendation list. The feedback tracking unit is used to collect implicit user behavior and combine it with the eye-tracking simulation algorithm at the edge to generate multi-dimensional feedback data in real time when the recommendation results are returned through the edge node, and then encapsulate it into the distributed graph database. 10.The multi-user oriented real-time knowledge graph query system according to claim 7, wherein, The conflict arbitration control module includes: The conflict prediction unit is used to predict and monitor high-concurrency conflict risk nodes in real time based on historical conflict patterns and entity association topology of the knowledge graph. The conflict marking unit is used to compare the operation version offset with a multi-dimensional vector clock and mark the conflict level for operations that exceed the dynamic tolerance window. The consensus decision-making unit is used to dynamically select a consensus algorithm based on the permission tag tree of conflicting entities, elect a decision-making node group to perform arbitration, and generate operation fusion instructions. The dynamic permission management unit is used to update the permission tag tree of the corresponding user based on the arbitration result and record the decision-making process through a distributed log system.
Citation Information
Patent Citations
Intelligent retrieval method and system for genuine medicinal materials based on atlas
CN120216741A
Semantic questioning mechanism to enable analysis of information architectures
US20130080461A1