A method and system for dynamic updating of industry chain knowledge graph based on multi-source data

By constructing a multi-level caching architecture and recursive lazy loading, combined with message queues and WebSocket gateways, the problems of low response rate and cache consistency in the industry knowledge graph system were solved, realizing dynamic updates of the industry chain knowledge graph and real-time front-end synchronization, thus improving user experience and data consistency.

CN120892439BActive Publication Date: 2026-01-30SHUZU TECHNOLOGY (NANJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511398214.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-28
Publication Date
2026-01-30
Estimated Expiration
2045-09-28

AI Technical Summary

Technical Problem

Existing industry knowledge graph systems suffer from low response rates, long user wait times, difficulty in ensuring cache consistency, untimely front-end interface updates, and difficulty in achieving efficient and real-time updates for complex queries when dealing with large amounts of data and deep hierarchies.

Method used

The system obtains basic information about industry category nodes through a predefined database interface, constructs a multi-level caching architecture, builds a category subtree structure using recursive lazy loading and permission filtering, achieves data synchronization by combining multi-level caching and message queues, and uses a WebSocket gateway for front-end updates.

Benefits of technology

It achieves strong data consistency and a smooth user experience within the system, reduces database pressure, ensures real-time updates of the front-end interface, avoids cache breakdown and dirty read issues, and provides a seamless user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892439B_ABST
    Figure CN120892439B_ABST
Patent Text Reader

Abstract

This invention provides a method and system for dynamically updating a knowledge graph of an industry chain based on multi-source data, relating to the field of data processing technology. The method includes: obtaining information about industry classification nodes through a database query interface; performing multi-level sorting on the industry classification list composed of nodes; initializing an analysis template; when a user selects a node, triggering a subtree retrieval request; querying the direct sub-industry classification list based on the industry classification list; recursively searching for sub-industry classification nodes using lazy loading; constructing a classification subtree structure; building a multi-level caching architecture; storing the analysis template and frequently accessed classification subtree structures in a local memory cache; and storing the industry classification list and classification subtree structures in a distributed cache; querying and calling the template within the multi-level caching architecture; and outputting industry classification template data, thereby achieving closed-loop synchronization from data source changes to cache updates and then to front-end interface display, ensuring data consistency and providing a smooth, seamless user experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data processing technology, and in particular to a method and system for dynamically updating a knowledge graph of an industry chain based on multi-source data. Background Technology

[0002] Industry knowledge graphs, as knowledge bases integrating massive, heterogeneous, and related industry data, play a crucial role in macroeconomic analysis, supply chain mining, and enterprise risk assessment. Existing industry knowledge graph systems typically need to manage a large and hierarchical industry classification system, linking numerous analytical templates, data models, and knowledge entities. For example, CN109255034A, when constructing its knowledge graph, heavily relies on feature word libraries for supply chain classification and industry node segmentation. Incomplete or poor-quality data sources can lead to a decrease in the accuracy of the knowledge graph.

[0003] In practical applications, existing technologies have significant technical shortcomings. First, when the industry classification data is massive and deeply hierarchical, the response rate of directly retrieving and constructing the complete classification subtree structure from the database is low, resulting in long user wait times and severely impacting the user experience. Second, although the system generally employs caching technology to improve performance, it introduces data consistency challenges. When backend data changes, it is difficult to efficiently and accurately update all relevant caches and ensure that the data seen by all online users remains synchronized. Furthermore, traditional cache invalidation strategies, such as simply deleting cache keys, are prone to cache breakdown, cache avalanche, and dirty reads in high-concurrency scenarios. Finally, when users execute complex conditional queries, the query conditions in the front-end user interface cannot be efficiently converted into precise query statements that the backend can execute, making it difficult to achieve seamless, real-time updates of the front-end interface after data changes.

[0004] Therefore, it is necessary to provide a method and system for dynamically updating the industry chain knowledge graph based on multi-source data to solve the above-mentioned technical problems. Summary of the Invention

[0005] To address the aforementioned technical problems, this invention provides a method and system for dynamically updating an industry chain knowledge graph based on multi-source data. This method solves the problems of low data acquisition efficiency and untimely front-end interface updates in existing industry knowledge graph systems due to complex data structures and frequent concurrent user operations, making it difficult to ensure consistency between cached and database data.

[0006] This invention provides a method for dynamically updating a knowledge graph of an industry chain based on multi-source data, the method comprising:

[0007] Based on the industry chain knowledge graph, the basic information of industry classification nodes is obtained at once through a predefined database query interface, and the industry classification list composed of all the industry classification nodes is sorted in multiple levels, while the analysis template is initialized.

[0008] When the user selects any of the industry category nodes, a subtree acquisition request is triggered. Based on the industry category list, the direct sub-industry category list is queried, and the sub-industry category nodes are searched in a recursive lazy loading manner to construct the category subtree structure.

[0009] A multi-level caching architecture consisting of a local memory cache and a distributed cache is constructed. The analysis template and the frequently accessed classification subtree structure are stored in the local memory cache, and the industry classification list and the classification subtree structure are stored in the distributed cache.

[0010] In the multi-level caching architecture, the analysis template corresponding to the industry classification node is queried and invoked, and industry classification template data is output.

[0011] Preferably, the basic information of the industry classification node includes at least a unique classification ID, classification name, parent classification ID, activation status flag, and sorting weight value;

[0012] The multi-level sorting process includes a first-level sorting process and a second-level sorting process.

[0013] The first-level sorting process involves grouping the industry category list according to the enabled status flag. The industry category nodes with the enabled status flag not disabled are grouped together and placed at the beginning of the industry category list, while the industry category nodes with the enabled status flag disabled are grouped together and placed at the end of the industry category list.

[0014] The second level of sorting process involves arranging the industry category nodes in the same group from largest to smallest according to the sorting weight values.

[0015] Preferably, when the user selects any of the industry category nodes, a subtree retrieval request is triggered. Based on the industry category list, a direct sub-industry category list is queried, and sub-industry category nodes are found using a recursive lazy loading method to construct a category subtree structure. Specifically, this includes:

[0016] When the user selects any industry category node on the front-end interface of the industry knowledge graph, the subtree acquisition request is triggered, and the subtree acquisition request carries the unique category ID of the industry category node;

[0017] After receiving the subtree acquisition request, the server queries the list of direct sub-industry categories corresponding to the unique category ID;

[0018] The next-level sub-industry category node in the sub-industry category list is found using a recursive lazy loading method, the category subtree structure is constructed, and the result is returned to the front-end interface for rendering and display.

[0019] When constructing the classification subtree structure, permission verification logic is embedded, that is, based on the user's role and permissions, the sub-industry classification nodes that the user does not have permission to view are filtered.

[0020] Preferably, the construction of a multi-level caching architecture consisting of a local memory cache and a distributed cache, storing the analysis template and the frequently accessed category subtree structure in the local memory cache, and storing the industry category list and the category subtree structure in the distributed cache, specifically includes:

[0021] The local memory cache is used as the first-level cache, and the distributed cache is used as the second-level cache to construct the multi-level cache architecture;

[0022] The first-level cache is used to store the analysis template and the frequently accessed classification subtree structure;

[0023] The secondary cache is used to store the industry classification list and the classification subtree structure. For the industry classification list with low change frequency, a long expiration time is set; for the classification subtree structure with high change frequency, a short expiration time is set.

[0024] Preferably, when the basic information of the industry classification node changes, the cache cleanup process of the multi-level cache architecture is triggered, that is, the associated entry in the distributed cache is deleted, and all application nodes in the cluster are notified to clean up the local memory cache by publishing an internal message.

[0025] Preferably, in the multi-level caching architecture, querying and calling the analysis template corresponding to the industry classification node and outputting industry classification template data specifically includes:

[0026] The search conditions corresponding to the industry classification nodes are organized into structured data objects, and the parsing engine is started to recursively traverse the structured data objects to generate backend query statements.

[0027] Based on the backend query statement, the corresponding analysis template is queried from the multi-level cache architecture according to the unique category ID of the industry category node;

[0028] The conversion engine is activated to convert the change logic fragments of the analysis template adapted to the industry classification node into a declarative logic plan that can be executed in parallel.

[0029] The version number of the analysis template is bound to the declarative logic plan through a version management mechanism, and a version-aware execution context is embedded.

[0030] Obtain real-time business metrics, execute the declarative logic plan, and generate the industry classification template data that integrates the real-time business metrics with the industry chain knowledge graph.

[0031] Preferably, when querying the analysis template, dynamic semantic adaptation is performed between the industry classification node and the analysis template based on the associated metadata;

[0032] Specifically, the statistical indicators of the analysis template are calculated through an independent statistical service, including the number of times it is used and the popularity of its citations. These statistical indicators are then appended to the basic information of the analysis template, which includes the template name, a brief description of the template, and the name of the template creator.

[0033] Preferably, the step of organizing the search conditions corresponding to the industry classification nodes into structured data objects, starting the parsing engine to recursively traverse the structured data objects, and generating backend query statements specifically includes:

[0034] The user terminal sets the search conditions for the industry classification node on the front-end interface, organizes the search conditions into the structured data object and sends it to the server. The structured data object is used to describe complex logical relationships, including parallel condition groups, probabilistic condition groups and nested logic groups.

[0035] After receiving the structured data object, the server starts the parsing engine to recursively traverse the structured data object, including the following steps:

[0036] Map the front-end field names in the structured data object to the back-end index field names;

[0037] Convert the front-end conditional operators in the structured data object into standard query language operators;

[0038] Convert the date range description in the structured data object into start and end timestamps;

[0039] Map the front-end input enumeration values ​​in the structured data object to storage codes;

[0040] The backend query statement is generated based on the backend index field name, the standard query language operator, the start and end timestamps, and the storage encoding.

[0041] Preferably, when a write operation occurs on the industry classification template data, the following collaborative process is executed:

[0042] The write operation is executed within a database transaction. After the transaction is successfully committed, the change event is extracted from the business logic and published to the topic of the highly reliable message queue. The write operation includes insert, delete, and update operations. The change event includes the data type of the change event, the primary key of the data, and a globally unique and monotonically increasing new version number.

[0043] After the server subscribes to the topic of the highly reliable message queue and receives the change event, it reloads the latest data based on the unique category ID of the industry category node in the highly reliable message queue, and writes the latest data into the distributed cache using the new version number as the cache key.

[0044] After writing the latest data to the distributed cache, the server generates a lightweight update notification message and publishes it to a message queue topic for front-end notifications or pushes it directly to the WebSocket gateway service.

[0045] After receiving the update notification message, the WebSocket gateway service pushes the update notification message to the user client;

[0046] The user terminal re-requests the latest data based on the update notification message and partially refreshes the front-end interface components.

[0047] A dynamic update system for an industry chain knowledge graph based on multi-source data, the system comprising:

[0048] The information acquisition module is used to acquire basic information of industry classification nodes at once through a predefined database query interface based on the industry chain knowledge graph, and to perform multi-level sorting on the industry classification list composed of all the industry classification nodes, while initializing the analysis template.

[0049] The subtree construction module is used to trigger a subtree acquisition request when the user selects any of the industry classification nodes. Based on the industry classification list, it queries the direct sub-industry classification list and searches for sub-industry classification nodes in a recursive lazy loading manner to construct the classification subtree structure.

[0050] A multi-level caching module is used to construct a multi-level caching architecture consisting of a local memory cache and a distributed cache. The analysis template and the frequently accessed classification subtree structure are stored in the local memory cache, and the industry classification list and the classification subtree structure are stored in the distributed cache.

[0051] The template invocation module is used to query and invoke the analysis template corresponding to the industry classification node in the multi-level caching architecture, and output the industry classification template data.

[0052] Compared with related technologies, the present invention provides a method and system for dynamically updating an industry chain knowledge graph based on multi-source data, which has the following advantages:

[0053] This invention, based on an industry chain knowledge graph, retrieves basic information about industry category nodes in one go through a predefined database query interface. It then performs multi-level sorting on the industry category list composed of all industry category nodes and initializes the analysis template. When a user selects any industry category node, a subtree retrieval request is triggered. Based on the industry category list, the system queries the direct sub-industry category list, recursively searching for sub-industry category nodes using lazy loading to construct the category subtree structure. A multi-level caching architecture consisting of local memory caching and distributed caching is constructed. The analysis template and frequently accessed category subtree structures are stored in the local memory cache, while the industry category list and category subtree structures are stored in the distributed cache. Within this multi-level caching architecture, the analysis template corresponding to the industry category node is queried and invoked, outputting the industry category template data. This achieves complete, closed-loop, and real-time synchronization from data source changes to cache updates and front-end interface display, ensuring strong data consistency throughout the system and providing a smooth, seamless user experience.

[0054] This invention acquires basic industry classification information in one go through a predefined interface. Combined with multi-level sorting processing of enabled / disabled status grouping and weighted sorting, it prioritizes displaying non-disabled, high-weight category nodes. This efficiently acquires and prepares core classification data at system startup, laying the foundation for subsequent operations, while ensuring the front-end prioritizes commonly used and effective categories. When a user clicks to trigger a subtree request, recursive lazy loading only acquires the next level sub-category of the current node, embedding permission filtering logic. This dynamic lazy loading combined with permission filtering significantly reduces the data volume and computational complexity of a single request. By constructing an intelligent multi-level caching system, it maximizes data access speed, reduces database pressure, and ensures cache consistency through a cache cleanup process. Based on the user's selected category, it efficiently acquires and processes industry classification template data for association analysis templates, providing decision support for user template selection. A parsing engine accurately converts complex search conditions into backend query statements, facilitating complex queries for users. Data change synchronization is achieved through a message queue, and a versioned writing strategy effectively avoids dirty data issues. WebSocket gateway push notifications enable seamless front-end updates, ensuring end-to-end consistency after data changes and resolving front-end update lag issues. Attached Figure Description

[0055] Figure 1 A flowchart illustrating a method for dynamically updating a supply chain knowledge graph based on multi-source data, provided in an embodiment of the present invention;

[0056] Figure 2A system block diagram of a dynamic update system for an industry chain knowledge graph based on multi-source data is provided in an embodiment of the present invention.

[0057] Figure 3 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0058] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0059] like Figure 1 The diagram shown is a flowchart of a method for dynamically updating a supply chain knowledge graph based on multi-source data, provided by an embodiment of the present invention. Figure 1 The execution entity of the method shown can be a software and / or hardware device. The execution entity of this application can include, but is not limited to, at least one of the following: user equipment, network equipment, etc. User equipment can include, but is not limited to, computers, smartphones, personal digital assistants (PDAs), and the aforementioned electronic devices. Network equipment can include, but is not limited to, a single network server, a server group consisting of multiple network servers, or a cloud based on cloud computing consisting of a large number of computers or network servers. Cloud computing is a type of distributed computing, consisting of a super virtual computer composed of a group of loosely coupled computers. This embodiment does not limit this. Steps S1 to S4 are detailed as follows:

[0060] S1, based on the industry chain knowledge graph, obtains the basic information of industry classification nodes at once through a predefined database query interface, performs multi-level sorting on the industry classification list composed of all the industry classification nodes, and initializes the analysis template at the same time;

[0061] The predefined database query interface requires pre-configuration of field mapping rules that match the industry chain knowledge graph. This ensures that the interface can accurately locate the basic information of the industry classification node during calls and supports efficient batch data reading, avoiding performance loss caused by multiple database connection establishment and disconnection. The initialization of the analysis template requires loading basic information such as the template name, a simple template description, and the template creator's name, and associating it with the unique category ID of the corresponding industry classification node to establish the mapping relationship between the template and the industry classification. Simultaneously, the basic configuration parameters of the analysis template are initialized.

[0062] The basic information of the industry classification node includes at least a unique classification ID, classification name, parent classification ID, activation status flag, and sorting weight value;

[0063] The multi-level sorting process includes a first-level sorting process and a second-level sorting process.

[0064] The first-level sorting process involves grouping the industry category list according to the enabled status flag. The industry category nodes with the enabled status flag not disabled are grouped together and placed at the beginning of the industry category list, while the industry category nodes with the enabled status flag disabled are grouped together and placed at the end of the industry category list.

[0065] The second level of sorting process involves arranging the industry category nodes in the same group from largest to smallest according to the sorting weight values.

[0066] The basic information for each industry category node includes at least a unique category ID, category name, parent category ID, enabled status flag, and sorting weight value. This ensures the integrity of the core data required for subsequent category hierarchy construction and access control. Multi-level sorting follows a logic of grouping first, then sorting. The first level of sorting divides industry category nodes into an enabled group and a disabled group based on the enabled status flag. The enabled group is placed at the beginning of the industry category list to prioritize the display of available categories, while the disabled group is placed at the end to reduce interference with user operations. The second level of sorting arranges the categories within each group according to their sorting weight values ​​from largest to smallest. Industry category nodes with higher sorting weight values ​​are placed earlier in the group, ensuring that enabled industry category nodes with higher sorting weight values ​​are prioritized at the front of the industry category list. This achieves priority control of category display, meets the business scenario's need to prioritize the display of frequently used categories, facilitates users' quick location and access to frequently used core industry category nodes, and improves user operation efficiency and system interaction experience.

[0067] S2, when the user selects any of the industry classification nodes, a subtree acquisition request is triggered. Based on the industry classification list, the direct sub-industry classification list is queried, and the sub-industry classification nodes are searched in a recursive lazy loading manner to construct the classification subtree structure.

[0068] When a user selects any of the industry category nodes, a subtree retrieval request is triggered. Based on the industry category list, the direct sub-industry category list is queried, and the sub-industry category nodes are found using a recursive lazy loading method to construct the category subtree structure. Specifically, this includes:

[0069] When the user selects any industry category node on the front-end interface of the industry knowledge graph, the subtree acquisition request is triggered, and the subtree acquisition request carries the unique category ID of the industry category node;

[0070] After receiving the subtree acquisition request, the server queries the list of direct sub-industry categories corresponding to the unique category ID;

[0071] The next-level sub-industry category node in the sub-industry category list is found using a recursive lazy loading method, the category subtree structure is constructed, and the result is returned to the front-end interface for rendering and display.

[0072] When constructing the classification subtree structure, permission verification logic is embedded, that is, based on the user's role and permissions, the sub-industry classification nodes that the user does not have permission to view are filtered.

[0073] When a user selects any industry category node on the front-end interface of the industry knowledge graph, the system will trigger a subtree retrieval request. This subtree retrieval request must carry the unique category ID of the industry category node selected by the user. This unique category ID serves as the core identifier for the server to query the direct sub-industry category list, ensuring the accuracy of the query target and avoiding sub-category list matching errors caused by ambiguous identifiers.

[0074] After receiving a subtree retrieval request, the server first filters the industry category nodes whose parent category ID matches the unique category ID from the industry category list, forming a direct sub-industry category list. Then, it recursively traverses this direct sub-industry category list using lazy loading, querying the next-level sub-industry category nodes for each sub-industry category node in turn. That is, only the sub-node data triggered by the user at the current level is loaded each time, and the data of the sub-nodes that have not been triggered for viewing are not loaded until the user expands the corresponding node. This reduces the amount of data transmitted in a single request and the computational pressure on the server, avoiding response delays caused by excessively deep hierarchies and large amounts of data.

[0075] During the construction of the subtree structure, permission verification logic needs to be embedded. This logic uses the current user's role information and a preset permission list as a basis to verify the permissions of each level of sub-industry category node, filtering out sub-industry category nodes that the user does not have permission to view, and only retaining nodes that the user has permission to access in the subtree structure. For example, when a regular user triggers subtree loading, the system will filter the "Manufacturing - Core Technology Subcategory" node and all its sub-levels if the user does not have sufficient permissions during the recursive traversal, ensuring that the final returned subtree structure complies with the access permission rules, thereby improving data loading efficiency and ensuring the security and compliance of data access.

[0076] Finally, after the server recursively and lazy-loads the completed category subtree structure, it returns the category subtree structure to the front-end interface for rendering and display. When the user expands the next level of the loaded node, the front-end triggers the subtree retrieval request again, and the server repeats the above recursive lazy loading and permission verification process to achieve dynamic expansion of the subtree structure. This ensures the smoothness of user operation and avoids resource waste during initial loading.

[0077] S3, construct a multi-level cache architecture consisting of local memory cache and distributed cache, store the analysis template and the frequently accessed classification subtree structure in the local memory cache, and store the industry classification list and the classification subtree structure in the distributed cache;

[0078] The construction of a multi-level caching architecture consisting of a local memory cache and a distributed cache, storing the analysis template and the frequently accessed classification subtree structure in the local memory cache, and storing the industry classification list and the classification subtree structure in the distributed cache, specifically includes:

[0079] The local memory cache is used as the first-level cache, and the distributed cache is used as the second-level cache to construct the multi-level cache architecture;

[0080] The first-level cache is used to store the analysis template and the frequently accessed classification subtree structure;

[0081] The secondary cache is used to store the industry classification list and the classification subtree structure. For the industry classification list with low change frequency, a long expiration time is set; for the classification subtree structure with high change frequency, a short expiration time is set.

[0082] The local memory cache, serving as the first-level cache, has its capacity set in conjunction with the application server's memory resource configuration to avoid excessive memory consumption due to cached data, which could lead to application performance degradation. It employs an LRU (Least Recently Used) eviction policy, automatically removing analysis templates and category subtree structures that have not been accessed for a long time when the cache capacity reaches a threshold, ensuring that the first-level cache always stores high-value, frequently accessed data. The distributed cache, serving as the second-level cache, has its expiration time dynamically adjusted based on the actual change cycle of the industry classification list and category subtree structure.

[0083] For example, since the industry classification system is adjusted infrequently, setting a long expiration time can reduce the frequency of cache updates, and the long expiration time for the industry classification list can be set to 72 hours. Since the classification subtree may be frequently adjusted according to business needs, setting a short expiration time can reduce the risk of data inconsistency, and the short expiration time for the classification subtree structure can be set to 12 hours.

[0084] In addition, the second-level cache supports versioned identifiers for cache keys, that is, embedding data version numbers in the cache keys. This, combined with the versioned writing strategy when data changes, avoids confusion between different versions of data in the cache. It also provides accurate reference for locating related entries in the cache cleanup process, ensuring the completeness and efficiency of cache cleanup.

[0085] When the basic information of the industry classification node changes, the cache cleanup process of the multi-level cache architecture is triggered, that is, the associated entries in the distributed cache are deleted, and all application nodes in the cluster are notified to clean up the local memory cache by publishing an internal message.

[0086] Understandably, the determination of associated entries needs to be based on changes to the basic information of the industry category node. Specifically, if the changes involve core identifiers such as unique category IDs or parent category IDs, then all cached entries in the distributed cache that use that unique category ID as the association key should be deleted, including the corresponding industry category list fragments, category subtree structures, and association analysis template caches. If the changes involve attribute information such as category names, activation status flags, or sorting weight values, then only the associated entries storing the attribute data of that industry category node in the distributed cache should be deleted to avoid excessive cleanup that could invalidate irrelevant caches.

[0087] Internal messages are designed in a structured format, containing at least the change event type, the unique category ID of the changed industry category node, the message generation timestamp, and a globally unique message ID. The globally unique message ID is generated by a distributed ID generator to prevent duplicate message consumption. Message publishing is implemented through a highly reliable message queue, which is configured with message persistence mechanisms and retry policies to ensure that all application nodes in the cluster can reliably receive messages without omission or loss.

[0088] The cluster is a distributed application cluster deploying a dynamic update system for the industry chain knowledge graph. This cluster consists of multiple functionally collaborative application nodes, including access nodes responsible for receiving user requests, business nodes performing template parsing and data processing, and cache nodes managing multi-level caches. Each node uses a cluster management tool for node status monitoring and communication. Application nodes specifically refer to business application nodes in the cluster that store local memory caches. These nodes directly participate in core business logic such as analysis template invocation and industry classification subtree construction. The execution logic for clearing local memory caches by all application nodes in the cluster satisfies atomicity. After receiving an internal message, each application node first verifies the integrity and validity of the internal message, such as verifying whether the message ID has been processed and whether the message signature is valid. After successful verification, it locates the corresponding analysis template and frequently accessed classification subtree structure in the local memory cache based on the unique classification ID in the internal message and performs a one-time batch cleanup operation. After cleanup, each application node records a cleanup log, including the cleanup time, cleanup cache key, and cleanup data volume, and sends a cleanup confirmation message to the message queue so that the system can monitor the execution status of cache cleanup. If any node fails to clean up, a second cleanup is triggered through a message retry mechanism to ensure consistency between the local memory cache and the distributed cache data on all application nodes.

[0089] S4. In the multi-level caching architecture, query and call the analysis template corresponding to the industry classification node, and output the industry classification template data.

[0090] In the multi-level caching architecture, querying and calling the analysis template corresponding to the industry classification node, and outputting industry classification template data, specifically includes:

[0091] The search conditions corresponding to the industry classification nodes are organized into structured data objects, and the parsing engine is started to recursively traverse the structured data objects to generate backend query statements.

[0092] Based on the backend query statement, the corresponding analysis template is queried from the multi-level cache architecture according to the unique category ID of the industry category node;

[0093] The conversion engine is activated to convert the change logic fragments of the analysis template adapted to the industry classification node into a declarative logic plan that can be executed in parallel.

[0094] The version number of the analysis template is bound to the declarative logic plan through a version management mechanism, and a version-aware execution context is embedded.

[0095] Obtain real-time business metrics, execute the declarative logic plan, and generate the industry classification template data that integrates the real-time business metrics with the industry chain knowledge graph.

[0096] Understandably, the search criteria cover the core filtering dimensions of the industry category node, including at least the unique ID of the industry category, the parent category ID, the activation status flag, and the data time range. Furthermore, users can configure multiple dimensions through the front-end interface. The configuration results are encapsulated in a structured data object in the form of key-value pairs. This object must use the JSON standardized data format to ensure compatibility and parsing efficiency for cross-service transmission.

[0097] The recursive traversal process of the parsing engine follows preset logical parsing rules. It first identifies logical relationship nodes in structured data objects, such as parallel condition groups, probabilistic condition groups, and nested logical groups. Then, it decomposes atomic conditions layer by layer. During this process, it completes the mapping between front-end field names and back-end index field names, such as mapping front-end field names to back-end index field names, converting front-end condition operators to standard query language operators, and format conversion of special data types. Finally, it generates a syntactically correct and efficiently executed back-end query statement.

[0098] The query for the corresponding analysis template from the multi-level caching architecture follows a cache priority strategy: first, the first-level cache is queried. If the cache hits and the template data is not expired, the analysis template is returned directly. If the first-level cache misses or the data has expired, the second-level cache is queried. The second-level cache query uses the unique category ID of the industry category node as the core cache key, appending the template version number as an auxiliary identifier to avoid confusion between different version templates. If the second-level cache still misses, a database query is triggered to retrieve the latest analysis template from the template database and simultaneously write it to both the first-level and second-level caches.

[0099] The transformation engine is launched, employing a declarative programming paradigm based on data flow graphs to incrementally parse, optimize, and reorganize the change logic fragments in the analysis template that are adapted to the industry classification nodes. Static dependency analysis identifies parallelizable computational subgraphs, and techniques such as predicate pushdown and projection elimination are used to generate a declarative logical plan consisting of a directed acyclic graph structure with multiple operator nodes. This decouples computational logic from execution, facilitating global optimization and distributed parallel scheduling.

[0100] Version consistency checks are performed through a versioning management mechanism. During the declarative logic plan compilation phase, the analysis template version number and its dependent data source version information are encoded as globally unique version identifiers and embedded in the version-aware execution context of each operator node. This version-aware execution context is implemented using lightweight containerization technology, internally encapsulating version verification logic and rollback instruction sets. A checkpoint mechanism ensures that automatic version consistency rollback is triggered when any computing unit fails during distributed execution. Before execution, the current version is compared with the latest version in multi-level caches to avoid data generation deviations.

[0101] Real-time business metrics are generated logically based on analytical templates. For example, for the manufacturing category node, the matched real-time business metrics include monthly output value, number of enterprises, and R&D investment ratio. An optimized graph query engine traverses the associated subgraphs of the industry category nodes in parallel and extracts multi-hop relationship features. Finally, through a dynamic feature fusion module, an online dynamically calculated attention weight mechanism is used to spatiotemporally align and weight the real-time business metrics with graph features, generating industry category template data that integrates real-time business metrics and the industry chain knowledge graph. This data is then synchronously updated to a multi-level caching architecture, while template call logs are recorded to provide data support for subsequent template performance optimization and statistical analysis.

[0102] When querying the analysis template, dynamic semantic adaptation is performed between the industry classification node and the analysis template based on the associated metadata;

[0103] Specifically, the statistical indicators of the analysis template are calculated through an independent statistical service, including the number of times it is used and the popularity of its citations. These statistical indicators are then appended to the basic information of the analysis template, which includes the template name, a brief description of the template, and the name of the template creator.

[0104] When querying and analyzing templates, the system first relies on associated metadata and the context of the analysis template to achieve dynamic semantic adaptation between industry category nodes and analysis templates based on a pre-trained graph neural network model. The pre-trained graph neural network model adopts a heterogeneous graph attention neural network architecture. By aggregating the multi-hop neighborhood features and relationship path information of industry category nodes, it generates a high-dimensional semantic vector representation. Based on an improved cross-modal alignment algorithm, it calculates the semantic correlation between industry category nodes and analysis templates, dynamically constructs semantic mapping relationships, and realizes a context-aware template adaptive activation mechanism that intelligently determines the entity attributes, associated data sources, and data priorities of the analysis templates to be invoked.

[0105] The independent statistics service possesses real-time data collection and asynchronous computing capabilities. By monitoring the API call logs and related events of the analysis templates, it accurately counts the usage frequency and citation popularity of each analysis template. The usage frequency statistics distinguish between valid and invalid calls, recording the timestamp, caller ID, and associated industry category ID for each valid call, creating a traceable call ledger. Citation popularity statistics cover the number of times an analysis template is directly referenced by other analysis templates and reports, as well as the weighted value of indirect references, and derive the final popularity value through weighted summation.

[0106] The process of adding statistical indicators must follow the principle of data consistency. The independent statistical service generates statistical results every hour and synchronizes them to the metadata storage module of the analysis template in an incremental update manner. During synchronization, the unique ID of the analysis template and the statistical period identifier must be carried to avoid cross-period data confusion.

[0107] In addition, the basic information display interface of the analysis template should present the number of times it is used and the popularity of its citations in the form of visual icons combined with numerical values, and allow users to click on the indicators to view detailed statistics, such as the call trend in the past 7 days, so as to provide data support for subsequent template selection and optimization.

[0108] The process of organizing the search conditions corresponding to the industry classification nodes into structured data objects, starting the parsing engine to recursively traverse the structured data objects, and generating backend query statements specifically includes:

[0109] The user terminal sets the search conditions for the industry classification node on the front-end interface, organizes the search conditions into the structured data object and sends it to the server. The structured data object is used to describe complex logical relationships, including parallel condition groups, probabilistic condition groups and nested logic groups.

[0110] After receiving the structured data object, the server starts the parsing engine to recursively traverse the structured data object, including the following steps:

[0111] Map the front-end field names in the structured data object to the back-end index field names;

[0112] Convert the front-end conditional operators in the structured data object into standard query language operators;

[0113] Convert the date range description in the structured data object into start and end timestamps;

[0114] Map the front-end input enumeration values ​​in the structured data object to storage codes;

[0115] The backend query statement is generated based on the backend index field name, the standard query language operator, the start and end timestamps, and the storage encoding.

[0116] When users set search criteria, the front-end interface must provide a visual configuration component to ensure users can intuitively configure single or multiple condition combinations. During configuration, the validity of conditions must be validated in real time; for example, date ranges must ensure the start time is less than the end time, and enumerated values ​​must be within preset options, thus avoiding invalid conditions. Structured data objects are encapsulated in JSON format, and their data structure must include core fields such as condition type, field identifier, operator, value, and logical relationships. For example, parallel condition groups use AND identifiers, probabilistic condition groups use OR identifiers, and nested logic groups are implemented through hierarchical nested JSON objects, ensuring that complex logical relationships can be accurately described and parsed.

[0117] The mapping between front-end field names and back-end index field names relies on a pre-defined field mapping table. This table must explicitly record the one-to-one correspondence between each front-end displayed field and the column names in the back-end database table or the index field names in the search engine. The mapping table should also support dynamic updates to adapt to changes in field names. Specifically, front-end conditional operator conversions must cover commonly used logical operation types. For example, front-end "contains" and "does not contain" should be converted to "LIKE" and "NOT LIKE" in SQL, respectively, to ensure accurate transmission of operation logic. Date range description conversions must use a unified timestamp format. If the front-end provides a relative time description, the parsing engine must calculate the specific start and end times based on the current system time.

[0118] Enumeration value mapping needs to be based on an enumeration value encoding table, mapping enumeration names that are understandable to front-end users to encoded values ​​stored in the back-end, in order to reduce data storage redundancy. After the back-end query statement is generated, it needs to be checked for syntax errors through a syntax validation mechanism, and the statement structure should be optimized according to the query scenario to improve execution efficiency, ultimately generating a standardized query statement that can be executed directly.

[0119] The parsing engine needs to set up an exception handling mechanism during the recursive traversal process. If an exception is found during the traversal, such as the front-end field name not having a corresponding back-end index field name or the operator being unable to be converted to a standard query language operator, the traversal should be terminated immediately and an error message containing the exception type and exception field should be returned, which will be fed back to the user's front-end interface by the server.

[0120] After generating the backend query statement, a syntax validation tool is used to validate the statement's syntax. If the validation passes, the backend can execute the query; otherwise, syntax error details are returned to ensure that the backend query statement can be executed normally and to avoid database or search engine query failures due to statement errors.

[0121] When a write operation occurs on the industry classification template data, the following collaborative process is executed:

[0122] The write operation is executed within a database transaction. After the transaction is successfully committed, the change event is extracted from the business logic and published to the topic of the highly reliable message queue. The write operation includes insert, delete, and update operations. The change event includes the data type of the change event, the primary key of the data, and a globally unique and monotonically increasing new version number.

[0123] After the server subscribes to the topic of the highly reliable message queue and receives the change event, it reloads the latest data based on the unique category ID of the industry category node in the highly reliable message queue, and writes the latest data into the distributed cache using the new version number as the cache key.

[0124] After writing the latest data to the distributed cache, the server generates a lightweight update notification message and publishes it to a message queue topic for front-end notifications or pushes it directly to the WebSocket gateway service.

[0125] After receiving the update notification message, the WebSocket gateway service pushes the update notification message to the user client;

[0126] The user terminal re-requests the latest data based on the update notification message and partially refreshes the front-end interface components.

[0127] Database transactions must satisfy ACID properties, including atomicity, consistency, isolation, and durability, to ensure that all write operations modifying the industry classification template data are successfully committed or fail and are rolled back, avoiding inconsistencies caused by partial data updates.

[0128] Before a transaction is committed, the legality of write operations must be verified. For example, when adding a template, the uniqueness of the template name must be verified; when modifying a template, the validity of the primary key of the data must be verified; and when deleting a template, the existence of related references must be verified. If the verification fails, the transaction is terminated and an error code and reason are returned.

[0129] Highly reliable message queues require message persistence, retry, and dead-letter queue mechanisms. Message persistence ensures that change events are not lost after a transaction is committed. The retry mechanism handles message delivery failures caused by temporary network anomalies. The dead-letter queue stores exception messages from failed retry attempts, facilitating subsequent manual investigation and handling. Message queue topics should be categorized by data type to enable classified delivery and subscription of change events, improving server-side message processing efficiency.

[0130] Lightweight update notification messages contain only core change identifiers, such as data primary keys, change types, and version numbers, without carrying complete data content, in order to reduce network transmission overhead.

[0131] The WebSocket gateway service needs to maintain the mapping relationship between user terminals and data permissions, and only push update notification messages to user terminals that have permission to view the industry category template data, so as to avoid irrelevant user terminals receiving redundant notifications.

[0132] When a user partially refreshes a UI component, the affected component must be accurately located using a front-end state management tool. Only the data source associated with the component should be updated, without triggering a re-render of the entire page, to ensure a smooth and seamless UI update.

[0133] In summary, write operations are executed within database transactions to ensure the atomicity of data modifications. Before the transaction is fully committed, all data changes are in a pending confirmation state. If any step fails, a transaction rollback is triggered to prevent incomplete data updates in the database. Only after a successful transaction commit is the change event extracted from the business logic. This event must explicitly include the changed data type, the primary key, and a globally unique, monotonically increasing new version number. The event is then published to a designated topic in a highly reliable message queue to ensure the reliability and integrity of event delivery. The server continuously subscribes to this message queue topic. Upon receiving a change event, it reloads the latest data from the database based on the unique category ID of the industry category node in the event, avoiding reliance on potentially old data in the cache. After loading, a versioned caching strategy is adopted, incorporating the new version number into the cache key, and writing the latest data to the distributed cache. This method avoids problems caused by traditional cache deletion strategies in high-concurrency scenarios. After confirming that the new data has been successfully written to the distributed cache, the server generates a lightweight update notification message. This message contains only necessary synchronization information and does not carry redundant data. It is then published to a dedicated message queue topic for front-end notifications or directly pushed to the WebSocket gateway service. Upon receiving the update notification message, the WebSocket gateway service accurately identifies the user client that needs to be synchronized based on the message content and pushes the notification to the corresponding user client, completing the front-end synchronization of data changes.

[0134] like Figure 2 The diagram shown is a system block diagram of a dynamic update system for an industry chain knowledge graph based on multi-source data, provided by an embodiment of the present invention. The system includes:

[0135] The information acquisition module is used to acquire basic information of industry classification nodes at once through a predefined database query interface based on the industry chain knowledge graph, and to perform multi-level sorting on the industry classification list composed of all the industry classification nodes, while initializing the analysis template.

[0136] The subtree construction module is used to trigger a subtree acquisition request when the user selects any of the industry classification nodes. Based on the industry classification list, it queries the direct sub-industry classification list and searches for sub-industry classification nodes in a recursive lazy loading manner to construct the classification subtree structure.

[0137] A multi-level caching module is used to construct a multi-level caching architecture consisting of a local memory cache and a distributed cache. The analysis template and the frequently accessed classification subtree structure are stored in the local memory cache, and the industry classification list and the classification subtree structure are stored in the distributed cache.

[0138] The template invocation module is used to query and invoke the analysis template corresponding to the industry classification node in the multi-level caching architecture, and output the industry classification template data.

[0139] Figure 2 The apparatus of the illustrated embodiment can be used to perform corresponding actions. Figure 1 The steps in the method embodiments shown are implemented in a similar manner and have similar technical effects, and will not be repeated here.

[0140] An electronic device includes a memory and a processor, wherein the memory stores a computer program, and when the processor runs the computer program stored in the memory, the processor executes the steps of a method for dynamically updating a supply chain knowledge graph based on multi-source data as described above.

[0141] like Figure 3 The diagram shown is a hardware structure schematic of an electronic device according to an embodiment of the present invention. The electronic device 30 includes: a processor 31, a memory 32, and a computer program; wherein...

[0142] The memory 32 is used to store the computer program, and the memory may also be flash memory. The computer program is, for example, an application program or functional module that implements the above method.

[0143] Processor 31 is configured to execute the computer program stored in the memory to implement the various steps performed by the device in the above method. For details, please refer to the relevant descriptions in the preceding method embodiments.

[0144] Alternatively, the memory 32 can be either standalone or integrated with the processor 31.

[0145] When the memory 32 is a device independent of the processor 31, the device may further include:

[0146] Bus 33 is used to connect the memory 32 and the processor 31.

[0147] A readable storage medium storing a computer program, which, when executed by a processor, is used to implement the steps of a method for dynamically updating a supply chain knowledge graph based on multi-source data as described above.

[0148] The readable storage medium can be a computer storage medium or a communication medium. A communication medium includes any medium that facilitates the transfer of computer programs from one location to another. A computer storage medium can be any available medium accessible to a general-purpose or special-purpose computer. For example, a readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application-Specific Integrated Circuit (ASIC). Alternatively, the ASIC can be located in a user equipment. Of course, the processor and the readable storage medium can also exist as discrete components in a communication device. The readable storage medium can be a read-only memory (ROM), random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0149] The present invention also provides a program product including executable instructions stored in a readable storage medium. At least one processor of the device can read the executable instructions from the readable storage medium, and the at least one processor executes the executable instructions to cause the device to implement the methods provided in the various embodiments described above.

[0150] In the embodiments of the above-described device, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly manifested as execution by a hardware processor, or execution by a combination of hardware and software modules within the processor.

[0151] Through the above embodiments, this invention provides a method and system for dynamically updating a supply chain knowledge graph based on multi-source data. Based on the supply chain knowledge graph, it acquires basic information about industry classification nodes at once through a predefined database query interface, performs multi-level sorting on the industry classification list composed of all industry classification nodes, and initializes analysis templates. When a user selects any industry classification node, a subtree retrieval request is triggered. Based on the industry classification list, the system queries the direct sub-industry classification list, recursively searching for sub-industry classification nodes using lazy loading to construct the classification subtree structure. A multi-level caching architecture consisting of local memory caching and distributed caching is constructed. The analysis template and frequently accessed classification subtree structures are stored in the local memory cache, while the industry classification list and classification subtree structures are stored in the distributed cache. In this multi-level caching architecture, the analysis template corresponding to the industry classification node is queried and called, outputting the industry classification template data. This achieves complete, closed-loop, and real-time synchronization from data source changes to cache updates to front-end interface display, ensuring strong data consistency throughout the system and providing a smooth, seamless user experience.

[0152] This invention acquires basic industry classification information in one go through a predefined interface. Combined with multi-level sorting processing of enabled / disabled status grouping and weighted sorting, it prioritizes displaying non-disabled, high-weight category nodes. This efficiently acquires and prepares core classification data at system startup, laying the foundation for subsequent operations, while ensuring the front-end prioritizes commonly used and effective categories. When a user clicks to trigger a subtree request, recursive lazy loading only acquires the next level sub-category of the current node, embedding permission filtering logic. This dynamic lazy loading combined with permission filtering significantly reduces the data volume and computational complexity of a single request. By constructing an intelligent multi-level caching system, it maximizes data access speed, reduces database pressure, and ensures cache consistency through a cache cleanup process. Based on the user's selected category, it efficiently acquires and processes industry classification template data for association analysis templates, providing decision support for user template selection. A parsing engine accurately converts complex search conditions into backend query statements, facilitating complex queries for users. Data change synchronization is achieved through a message queue, and a versioned writing strategy effectively avoids dirty data issues. WebSocket gateway push notifications enable seamless front-end updates, ensuring end-to-end consistency after data changes and resolving front-end update lag issues.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1.A method for dynamic updating of an industry chain knowledge graph based on multi-source data, characterized in that, The method comprises: Based on the industry chain knowledge graph, the basic information of the industry classification node is obtained through a pre-defined database query interface at one time, and a multi-level sorting processing is performed on the industry classification list composed of all the industry classification nodes, and an analysis template is initialized; When the user end selects any of the industry classification nodes, a sub-tree acquisition request is triggered, a direct sub-industry classification list is queried based on the industry classification list, and a recursive lazy loading method is used to find sub-industry classification nodes to construct a classification sub-tree structure; A multi-level cache architecture composed of local memory cache and distributed cache is constructed, the analysis template and the classification sub-tree structure with high frequency access are stored in the local memory cache, and the industry classification list and the classification sub-tree structure are stored in the distributed cache; In the multi-level cache architecture, the analysis template corresponding to the industry classification node is queried and called, and industry classification template data is output; The method of querying and calling the analysis template corresponding to the industry classification node in the multi-level cache architecture and outputting industry classification template data specifically comprises: The search conditions corresponding to the industry classification node are organized into a structured data object, a parsing engine is started to recursively traverse the structured data object, and a back-end query statement is generated; Based on the back-end query statement, the corresponding analysis template is queried from the multi-level cache architecture according to the unique classification ID of the industry classification node; A conversion engine is started to convert the change logic segment of the analysis template adapted to the industry classification node into a declarative logic plan that can be executed in parallel; The version number of the analysis template is bound to the declarative logic plan through a version management mechanism, and a version-aware execution context is embedded; Real-time business indicators are obtained, the declarative logic plan is executed, and the industry classification template data fused with the real-time business indicators and the industry chain knowledge graph is generated. 2.The method of claim 1, wherein, The basic information of the industry classification node at least includes a unique classification ID, a classification name, a parent classification ID, an enable state flag, and a sorting weight value; The multi-level sorting processing includes first-level sorting processing and second-level sorting processing; The first-level sorting processing is to group the industry classification list according to the enable state flag, and place the industry classification nodes with the enable state flag not disabled as a group in the front of the industry classification list, and place the industry classification nodes with the enable state flag disabled as another group in the back of the industry classification list; The second-level sorting processing is to arrange the industry classification nodes in the same group according to the sorting weight value from large to small. 3.The method of claim 2, wherein, When the user end selects any of the industry classification nodes, a sub-tree acquisition request is triggered, a direct sub-industry classification list is queried based on the industry classification list, and a recursive lazy loading method is used to find sub-industry classification nodes to construct a classification sub-tree structure, specifically comprising: When the user end selects any of the industry classification nodes on the front-end interface of the industry chain knowledge graph, the sub-tree acquisition request is triggered, and the sub-tree acquisition request carries the unique classification ID of the industry classification node; The service end receives the sub-tree acquisition request, and queries the direct sub-industry classification list corresponding to the unique classification ID; In a recursive lazy loading manner, the next level of sub-industry classification nodes is found for each sub-industry classification node in the sub-industry classification list, the classification sub-tree structure is constructed, and is returned to the front end interface for rendering and display; During the construction of the classification sub-tree structure, a permission verification logic is embedded, that is, according to the role and permission of the user end, the sub-industry classification nodes that the user end has no right to view are filtered. 4.The method of claim 1, wherein, The multi-level cache architecture composed of local memory cache and distributed cache is constructed, the analysis template and the classification sub-tree structure with high frequency of access are stored to the local memory cache, and the industry classification list and the classification sub-tree structure are stored to the distributed cache, specifically including: The local memory cache is used as a first-level cache, and the distributed cache is used as a second-level cache, and the multi-level cache architecture is constructed; The first-level cache is used for storing the analysis template and the classification sub-tree structure with high frequency of access; The second-level cache is used for storing the industry classification list and the classification sub-tree structure, wherein a long expiration time is set for the industry classification list with low change frequency, and a short expiration time is set for the classification sub-tree structure with high change frequency. 5.The method of claim 4, wherein, When the basic information of the industry classification node changes, a cache cleaning process of the multi-level cache architecture is triggered, that is, the associated entries in the distributed cache are deleted, and all application nodes in the cluster are notified to clean the local memory cache through an internal message. 6.The method of claim 1, wherein, When the analysis template is queried, the industry classification node and the analysis template are dynamically semantically adapted based on associated metadata; The statistical indicators of the analysis template are calculated by an independent statistical service, including the number of uses and the reference heat, and the statistical indicators are attached to the basic information of the analysis template, and the basic information of the analysis template includes the template name, the simple template description and the template creator name. 7.The method of claim 1, wherein, The search conditions corresponding to the industry classification node are organized into a structured data object, a parsing engine is started to recursively traverse the structured data object, and a back-end query statement is generated, specifically including: The user end sets the search conditions for the industry classification node on the front end interface, organizes the search conditions into the structured data object and sends the structured data object to the service end, and the structured data object is used to describe complex logical relationships, including parallel condition groups, or condition groups and nested logic groups; After the service end receives the structured data object, the parsing engine is started to recursively traverse the structured data object, including the following steps: The front end field name in the structured data object is mapped to the back-end index field name; The front end condition operator in the structured data object is converted into a standard query language operator; The date range description in the structured data object is converted into a start and end timestamp; The front end enumeration value in the structured data object is mapped to a storage code; Based on the backend index field name, the standard query language operator, the start and end timestamps, and the storage encoding, the backend query statement is generated. 8.The method of claim 1, wherein, When the industry classification template data is subjected to a write operation, the following collaborative process is performed: The write operation is performed in a database transaction, and after the transaction is successfully committed, a change event is abstracted from the business logic and published to a topic of a high-reliability message queue, wherein the write operation includes an add operation, a delete operation, and a modify operation, and the change event includes a data type, a data primary key, and a globally unique and monotonically increasing new version number; After the service subscribes to the topic of the high-reliability message queue and receives the change event, the service reloads the latest data based on the unique classification ID of the industry classification node in the high-reliability message queue, uses the new version number as a cache key, and writes the latest data into the distributed cache; After the latest data is written into the distributed cache, the service generates a lightweight update notification message and publishes it to a message queue topic for front-end notification or directly pushes it to a WebSocket gateway service; After the WebSocket gateway service receives the update notification message, the WebSocket gateway service pushes the update notification message to the user end; Based on the update notification message, the user end re-requests the latest data and locally refreshes the front-end interface components. 9.A system for updating an industrial chain knowledge graph based on multi-source data, applied to the method for updating an industrial chain knowledge graph based on multi-source data according to any one of claims 1-8, characterized in that, The system comprises: An information acquisition module configured to acquire, based on an industry chain knowledge graph, basic information of industry classification nodes through a predefined database query interface at one time, perform multi-level sorting processing on an industry classification list composed of all the industry classification nodes, and initialize an analysis template; A sub-tree construction module configured to trigger a sub-tree acquisition request when a user end selects any of the industry classification nodes, query a direct sub-industry classification list based on the industry classification list, find sub-industry classification nodes in a recursive lazy loading manner, and construct a classification sub-tree structure; A multi-level cache module configured to construct a multi-level cache architecture composed of a local memory cache and a distributed cache, store the analysis template and the classification sub-tree structure with high access frequency into the local memory cache, and store the industry classification list and the classification sub-tree structure into the distributed cache; A template calling module configured to query and call the analysis template corresponding to the industry classification node in the multi-level cache architecture, and output industry classification template data.

Citation Information

Patent Citations

  • A method for constructing industrial knowledge map based on industrial chain

    CN109255034A

  • Data display method and system based on node tree

    CN116150436A

  • Customer relation information storage and retrieval method and system based on bidirectional graph cache

    CN120179699A