Distributed cognitive map construction and dynamic updating system and method
By constructing and dynamically updating a distributed cognitive graph, the problems of data consistency and query performance in a distributed environment are solved. It achieves efficient incremental updates and intelligent conflict resolution, optimizes graph data query, and supports the intelligent upgrading of the fashion industry.
Patent Information
- Application Number
- CN202610048996.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-15
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2046-01-15
AI Technical Summary
Existing technologies struggle to achieve efficient incremental updates and conflict resolution in a distributed environment, and cannot guarantee data consistency or optimize query performance for large-scale graph data.
A distributed cognitive graph construction and dynamic update system is adopted, including a graph construction module, an incremental update module, a distributed consistency module, and a query optimization module. The graph construction module transforms multi-source, multi-modal, heterogeneous fashion data into a unified structured knowledge graph. The incremental update module realizes the dynamic maintenance and real-time performance of the knowledge graph. The distributed consistency module ensures data consistency, and the query optimization module provides efficient query capabilities.
It achieves efficient incremental updates and data consistency in a distributed environment, has intelligent conflict resolution capabilities, optimizes graph data query performance, and supports the intelligent upgrading of the fashion industry.
Smart Images

Figure CN121542268A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of artificial intelligence and knowledge graph technology, in particular to a distributed cognitive graph construction and dynamic updating system and method. BACKGROUND
[0002] With the rapid development of artificial intelligence technology and its deep integration in various industries, the fashion industry has also actively explored the use of advanced technology to drive the overall upgrade of design, production, marketing and consumer experience. Under this background, building a cognitive graph that can accurately depict fashion elements, styles, trends and their relationships has become a core infrastructure to promote the intelligent process of the clothing AI industry. The patent with publication number CN116304104A and the patent name of knowledge graph construction method, knowledge graph construction device, medium and electronic equipment, obtains a plurality of visual tags, and determines the relationship between the visual tags; generates nodes based on the visual tags, and generates edges between the nodes based on the relationship between the visual tags, to construct a visual tag knowledge graph; adds node attributes to the nodes according to the characteristics of the visual tags, and adds edge attributes to the edges according to the relationship types between the visual tags. A visual tag knowledge graph for visual tag processing can be formed through a simple and convenient process, and has a wide range of applications.
[0003] However, the above technical solution can adapt to complex semantics in the fashion field, support efficient incremental updating, ensure data strong consistency in a distributed environment, and have intelligent conflict resolution capability. Therefore, it is necessary to develop a new technical design that can realize efficient incremental updating and conflict resolution, ensure data consistency in a distributed environment, and optimize the query performance of large-scale graph data to solve the above problems. SUMMARY
[0004] The present application aims to provide a distributed cognitive graph construction and dynamic updating system and method to solve the problems of realizing efficient incremental updating and conflict resolution, ensuring data consistency in a distributed environment, and optimizing the query performance of large-scale graph data in the background technology.
[0005] The present application provides the following technical solution: a distributed cognitive graph construction and dynamic updating system, comprising a graph construction module, an incremental updating module, a distributed consistency module, and a query optimization module; The graph construction module is used to convert multi-source, multi-modal heterogeneous fashion data into a unified, structured knowledge graph; The incremental updating module is used to realize dynamic maintenance and real-time of the knowledge graph; The distributed consistency module is used to ensure strong consistency, high availability, and change traceability of the knowledge graph data among multiple nodes; The query optimization module is used to provide efficient and flexible knowledge graph query capability, and quickly search and analyze fashion knowledge.
[0006] The query interface is arranged on the query optimization module, and the query interface includes a GraphQL interface, a REST interface and a WebSocket interface.
[0007] A distributed cognitive graph construction and dynamic updating method, characterized by comprising the following steps: S1. Data import and preprocessing: importing raw data from a data source layer; S2. Graph construction: preprocessing the imported raw data through the graph construction module to construct a unified domain ontology based on a "brand level - style classification - material system - process flow - application scenario", the preprocessing including data extraction and entity relationship construction, thereby constructing a graph; S3. Incremental update: continuously monitoring the changes of the raw data through the incremental update module, detecting changes of the raw data to generate a change log, capturing new, modified and deleted operations using a bidirectional differential patch mechanism, calculating the differences between the graph versions according to the change log and then generating a patch, the patch including a forward patch and a reverse patch, and applying a strategy of combining rule priority, semantic embedding similarity score and hybrid decision method to intelligently resolve data conflicts; S4. Consistency guarantee: using the Raft consensus algorithm to ensure that all nodes in the cluster reach strong consistency on the knowledge graph data state through the distributed consistency module, preventing the "split-brain" problem in the distributed environment through the lease mechanism, supporting bounded stale reading to balance consistency and read performance, and using edge-level version vector mechanism to accurately record and track the causal order and change history of each relationship edge; S5. Query optimization: the query optimization module reduces repeated calculations and speeds up query response by maintaining a subgraph cache of hot queries, and adopts a heuristic path pruning strategy to terminate invalid search paths in the graph traversal process.
[0008] The preprocessing of the raw data in the step S2. Graph construction includes the following steps: S21. Entity standardization: text segmentation, part-of-speech tagging, named entity recognition based on deep learning sequence labeling model and data type conversion processing are performed on the input raw data; a standardized dictionary containing core concepts in the fashion field and their synonym and near-synonym mapping relationships is established and maintained; the maintenance of the standardized dictionary is realized by manual expert annotation combined with a semi-automatic learning mechanism, which generates candidate mappings using the co-occurrence frequency, context similarity and semantic embedding vector distance of words in a large corpus; the entity standardization process ensures that the same concept obtains a unified representation form through hash table lookup and fuzzy matching algorithm; S22. Name alignment: high-precision name alignment is achieved using a hybrid method that combines string similarity algorithms and semantic embedding techniques; word vectors or sentence vectors are obtained by training a large-scale fashion text corpus using semantic embedding techniques, and the cosine similarity of semantic vectors corresponding to different named expressions is calculated to identify entities with similar semantics; when the string similarity or semantic vector similarity exceeds a predetermined threshold, it is determined that they refer to the same entity; S23. Name disambiguation: by analyzing the context information of the name and the attribute characteristics of the candidate entities, a classification model is used to calculate the confidence of each candidate entity, and the one with the highest confidence is selected as the disambiguation result; if the confidence is insufficient or the result is competitive, manual review or user-provided additional information is requested for confirmation; S24. Attribute merging: for numerical attributes, the system performs weighted average calculation according to the confidence of each data source, which depends on the reliability, timeliness and consistency of the data source; for non-numerical attributes, the majority voting principle is preferred; if a majority cannot be reached, predefined expert rules are used for decision-making; if the conflict cannot be resolved, manual review is submitted to ensure the quality of the knowledge graph data.
[0009] The string similarity algorithm includes Levenshtein distance, Jaccard similarity, cosine similarity based on N-gram vector or cosine similarity based on TF-IDF vector.
[0010] The change detection in step S3. Incremental update includes the following steps: Changes in structured database data sources are captured using database triggers or CDC technology, and for unstructured or semi-structured data sources, changes are detected through periodic data crawling, log parsing or real-time event subscription based on message queues, and structured change logs are generated, each record of which contains a unique transaction identifier, an affected entity identifier, a change attribute name, a value before and after the change, an operation type, a timestamp and a data source identifier.
[0011] The forward patch describes all atomic graph modification instructions required to update the current graph state to a new state, including adding nodes, updating nodes, deleting nodes, adding edges, updating edges, and deleting edges; the reverse patch is a set of inverse operations of the forward patch, which functions to restore the graph from the new state to the state before the change.
[0012] The conflict resolution in the step S3. incremental update comprises the following steps: The hybrid decision method combines the rule priority and the semantic embedding similarity score for weighted calculation; the rule priority predefines a set of detailed rule weight system for evaluating the authority and credibility of different data sources; the semantic embedding similarity score is calculated by converting the conflicting text description into pre-trained fashion field word vectors and / or sentence vectors, and calculating the cosine similarity between the fashion field word vectors and / or sentence vectors; the final conflict resolution result is obtained by normalizing and weighted sum of the rule priority and the semantic embedding similarity score, and selecting the candidate value with the highest confidence score as the final attribute value.
[0013] The edge-level version vector includes a source node, a target node, a relationship type, a timestamp, a user identifier of an update operation, and a sequence number, and is used for accurately recording and tracking the causal order and change history of each relationship edge; the edge-level version vector determines the sequence and causal dependence of events by comparing the timestamp and sequence number in different version vectors, thereby providing fine-grained history version control and auditing capability for the graph.
[0014] The subgraph cache is maintained in the step S5. query optimization to reduce repeated calculation and speed up query response, which comprises the following steps: The subgraph cache adopts an LRU strategy for management and supports a cache invalidation mechanism for intelligently identifying affected cache items and invalidating them; the query optimization module adopts a heuristic path pruning strategy, uses a heuristic function to estimate the value of the current search path or the possibility of reaching the target node in real time during graph traversal, and combines the precomputed reachability matrix to terminate invalid search paths in advance.
[0015] Compared with the prior art, the present application has the following advantages: 1. The distributed cognitive graph construction and dynamic updating system of the application, comprising a graph construction module, an incremental updating module, a distributed consistency module, and a query optimization module; the graph construction module is used for converting multi-source, multi-modal heterogeneous fashion data into unified, structured knowledge graphs; the incremental updating module is used for realizing dynamic maintenance and real-time of the knowledge graph; the distributed consistency module is used for ensuring strong consistency, high availability, and change traceability of the knowledge graph data among multiple nodes; the query optimization module is used for providing efficient and flexible knowledge graph query capability, rapid retrieval and complex analysis of fashion knowledge. Through the collaborative work of the graph constructor module, the incremental updating module, the distributed consistency guarantee module, and the query optimization module, a distributed cognitive graph construction and dynamic updating system is constructed, which can adapt to complex semantics in the fashion field, support efficient incremental updating, ensure strong consistency of data in a distributed environment, and has intelligent conflict resolution capability. The significant advantages in solving the core technical problems of knowledge representation, dynamic updating, and consistency guarantee in the current clothing AI industry provide solid technical support for the intelligent upgrading of the fashion industry.
[0016] 2. The distributed cognitive graph construction and dynamic updating system of the application, a query interface is provided on the query optimization module, and the query interface includes a GraphQL interface, a REST interface, and a WebSocket interface. By providing multiple query interfaces, flexible and efficient graph data query and real-time data interaction are supported; the GraphQL interface allows the client to accurately specify the required data structure through a single request, avoiding excessive data acquisition or insufficient data acquisition; the REST interface provides a traditional HTTP API interface, exposes a series of resources, and supports standard HTTP methods; the WebSocket interface supports real-time push and bidirectional communication, and is suitable for application scenarios that require real-time updating or high-frequency interaction.
[0017] 3. The distributed cognitive graph construction and dynamic updating method of the application, comprising the following steps: S1. data import and preprocessing, S2. graph construction, S3. incremental updating, S4. consistency guarantee, and S5. query optimization. Through the above steps, heterogeneous data can be successfully converted into a semantic-rich knowledge graph, and efficient incremental updating and query are supported.
[0018] 4. The distributed cognitive graph construction and dynamic updating method of the application, the preprocessing of the original data in step S2. graph construction comprises the following steps: S21. entity standardization, S22. name alignment, S23. same name disambiguation, and S24. attribute merging. Through the bidirectional differential patch mechanism and a set of intelligent conflict resolution strategies, it is ensured that the graph data can quickly and accurately reflect the changes in the external world.
[0019] 5、The distributed cognitive graph construction and dynamic update method of the present application, the string similarity algorithm includes Levenshtein distance, Jaccard similarity, cosine similarity based on N-gram vector or cosine similarity of TF-IDF vector. The surface similarity between the naming expressions is evaluated by the above algorithm.
[0020] 6、The distributed cognitive graph construction and dynamic update method of the present application, the change detection in step S3. Incremental update includes the following steps: using database trigger or CDC technology based on structured database data source to capture changes, for unstructured or semi-structured data source, changes are detected by periodic data crawling, log analysis or real-time event subscription based on message queue, and a structured change log is generated, each record of the change log contains a unique transaction identifier, an affected entity identifier, a change attribute name, a value before and after the change, an operation type, a timestamp and a data source identifier. The above steps effectively monitor the changes of the data source and capture the add, modify and delete operations.
[0021] 7、The distributed cognitive graph construction and dynamic update system and method of the present application, the forward patch describes all atomic graph modification instructions required to update the current graph state to the new state, the atomic graph modification instructions include adding nodes, updating nodes, deleting nodes, adding edges, updating edges and deleting edges; the reverse patch is a set of inverse operations of the forward patch, which functions to restore the graph from the new state to the state before the change. The generation of the reverse patch is synchronized with the forward patch, ensuring that all update operations are traceable and reversible. This setting provides strong version rollback capability for the graph, supporting quick recovery to any historical version when data errors or policy adjustments occur.
[0022] 8、The distributed cognitive graph construction and dynamic update system and method of the present application, the conflict resolution in step S3. Incremental update includes the following steps: a hybrid decision method combines rule priority and semantic embedding similarity score for weighted calculation; the rule priority predefines a detailed rule weight system to evaluate the authority and credibility of different data sources; the semantic embedding similarity score is calculated by converting the conflicting text description into pre-trained fashion field word vectors and / or sentence vectors, and calculating the cosine similarity between the fashion field word vectors and / or sentence vectors; the final conflict resolution result is normalized and weighted summed by combining the rule priority and the semantic embedding similarity score, and the candidate value with the highest confidence score is selected as the final attribute value. In the incremental update process, when multiple data sources or concurrent operations provide different information for the same entity or attribute in the knowledge graph, the incremental update module will activate the intelligent conflict resolution strategy; the above steps are used to achieve high-accuracy conflict resolution.
[0023] 9. The distributed cognitive graph construction and dynamic update system and method of the present invention includes an edge-level version vector comprising a source node, a target node, a relation type, a timestamp, a user identifier for the update operation, and a sequence number. The edge-level version vector is used to accurately record and track the causal order and change history of each relation edge. By comparing the timestamps and sequence numbers in different version vectors, the edge-level version vector determines the sequence of events and causal dependencies, thereby providing fine-grained historical version control and auditing capabilities for the graph. When any relation edge in the knowledge graph undergoes a creation, modification, or deletion operation, its version vector is automatically updated. By comparing the timestamps and sequence numbers in different version vectors, the system can determine the sequence of events and causal dependencies. If multiple version vectors conflict on the timestamp and the user identifier for the update operation, the sequence number can provide further sorting criteria, solving the problem of precise sorting in distributed concurrent updates.
[0024] 10. The distributed cognitive graph construction and dynamic update system and method of the present invention, step S5. Maintaining a subgraph cache for hot queries in query optimization to reduce redundant calculations and accelerate query response includes the following steps: the subgraph cache is managed using an LRU strategy and supports a cache invalidation mechanism that intelligently identifies affected cache items and invalidates them; the query optimization module adopts a heuristic path pruning strategy, using a heuristic function to estimate the value of the current search path or the probability of reaching the target node in real time during graph traversal, and combining it with a pre-calculated reachability matrix to terminate invalid search paths in advance. Subgraph caching can significantly improve the response speed of hot queries and reduce redundant calculations, while path pruning can avoid unnecessary calculations and accelerate queries, suitable for queries that search for specific relationship paths in depth-first or breadth-first traversal. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0026] Fig. 1 This is a flowchart illustrating the distributed cognitive graph construction and dynamic update system and method of the present invention; Fig. 2 This is a schematic diagram of the incremental update process of the distributed cognitive graph construction and dynamic update system and method of the present invention; Fig. 3 This is an architecture diagram of the distributed consistency module of the distributed cognitive graph construction and dynamic update system and method of the present invention. Detailed Implementation
[0027] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0028] In the description of this application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, features defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "multiple" means two or more, unless otherwise explicitly specified.
[0029] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the terms "installation" and "connection" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection, an electrical connection, or a connection that allows communication between the components; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication between two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this application according to the specific circumstances.
[0030] In the description of this application, it should be understood that the terms "upper", "lower", "side", "front", "rear", etc., indicate the orientation or positional relationship based on the installation orientation or positional relationship, and are only for the convenience of describing this application and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0031] In the description of this application, it should be noted that the term "and / or" is merely a description of the relationship between related objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, A and B exist simultaneously, and B exists alone.
[0032] It should also be noted that in the embodiments of this application, the same reference numerals are used to represent the same component or part. For the same part in the embodiments of this application, the reference numerals may only be used to mark one part or component as an example. It should be understood that the reference numerals are also applicable to other identical parts or components.
[0033] Furthermore, in this application, the technical features described in an open-ended manner include both closed technical solutions composed of the listed features and open technical solutions that include the listed features.
[0034] To further understand the invention's content, features, and effects, the following embodiments are provided, along with detailed descriptions in conjunction with the accompanying drawings: like Figs. 1-3 As shown, the distributed cognitive graph construction and dynamic update system includes a graph construction module, an incremental update module, a distributed consistency module, and a query optimization module. The graph construction module is used to transform multi-source, multimodal heterogeneous fashion data into a unified, structured knowledge graph; The incremental update module is used to achieve dynamic maintenance and real-time performance of the knowledge graph; The distributed consistency module is used to ensure strong consistency, high availability, and change traceability of knowledge graph data across multiple nodes; The query optimization module provides efficient and flexible knowledge graph query capabilities for rapid retrieval and complex analysis of fashion knowledge.
[0035] In this embodiment, through the collaborative work of the graph construction module, incremental update module, distributed consistency module, and query optimization module, a distributed cognitive graph construction and dynamic update system is built. This system can adapt to the complex semantics of the fashion industry, support efficient incremental updates, ensure strong data consistency in a distributed environment, and possess intelligent conflict resolution capabilities. Its significant advantages in solving the core technical challenges of knowledge representation, dynamic updates, and consistency guarantees in the current apparel AI industry provide solid technical support for the intelligent upgrading of the fashion industry. Of course, this is not limited to this; any other distributed cognitive graph construction and dynamic update system with intelligent conflict resolution capabilities can be used.
[0036] Specifically, the query optimization module provides query interfaces, including GraphQL, REST, and WebSocket interfaces. These multiple interfaces support flexible and efficient graph data querying and real-time data interaction. The GraphQL interface allows clients to precisely specify the required data structure in a single request, avoiding over- or under-data retrieval. The REST interface provides a traditional HTTP API, exposing a range of resources and supporting standard HTTP methods. The WebSocket interface supports real-time push and bidirectional communication, suitable for applications requiring real-time updates or high-frequency interactions. Of course, this is not a limitation; other interfaces capable of supporting flexible and efficient graph data querying and real-time data interaction are also acceptable. Specifically, a method for constructing and dynamically updating a distributed cognitive graph is characterized by the following steps: S1. Data Ingestion and Preprocessing: Raw data is ingested from the data source layer. In this embodiment, the data source layer includes product descriptions from e-commerce platforms, designer blog posts, fashion media reports, user comments, trendy images and videos. Of course, it is not limited to these; it can be any other raw data that can provide information related to the fashion and apparel industry. S2. Graph Construction: The graph construction module preprocesses the input raw data to construct a unified domain ontology based on "brand hierarchy—style classification—material system—process flow—application scenario." Preprocessing includes data extraction and entity relationship construction, thereby constructing the graph. In this embodiment, the brand hierarchy dimension includes luxury brands, high-end brands, mass-market brands, and fast fashion brands; the style classification dimension includes clothing type, sub-style, and design elements; the material system dimension includes natural fibers, synthetic fibers, blended materials, and functional fabrics; the process flow dimension includes design, pattern making, cutting, sewing, and finishing; and the application scenario dimension includes formal occasions, casual occasions, sports occasions, and special occasions. The five-dimensional knowledge structure of "brand hierarchy—style classification—material system—process flow—application scenario" can model complex knowledge in the fashion field with high accuracy and high coverage. Of course, the above dimensions are not limited to these; any other dimension that can model complex knowledge in the fashion field with high accuracy and high coverage can be used. S3. Incremental Update: The incremental update module continuously monitors changes to the original data, performs change detection on these changes, generates a change log, and employs a bidirectional differential patching mechanism to capture add, modify, and delete operations. Based on the change log, it calculates the differences between the graph versions and generates patches, including forward and reverse patches. A strategy combining rule priority, semantic embedding similarity scoring, and a hybrid decision-making method is applied to intelligently resolve data conflicts. In this embodiment, the above steps ensure that the graph can respond to changes in the data source at near real-time speed, while providing technical support for flexible rollback operations. However, this is not limited to this; any other mechanism capable of responding to changes in the data source at near real-time speed and providing technical support for flexible rollback operations can be used. S4. Consistency Guarantee: Through the distributed consistency module, the Raft consensus algorithm is used to ensure strong consistency of the knowledge graph data state among all nodes in the cluster. The lease mechanism prevents the "split-brain" problem in the distributed environment and supports bounded stale reads to balance consistency and read performance. At the same time, the edge-level version vector mechanism is used to accurately record and track the causal order and change history of each relation edge. In this embodiment, through the Raft consensus algorithm (meaning a consensus algorithm designed for managing replication logs), the Leader node (meaning the node responsible for handling all transactional requests) receives positive patches, appends them as log entries to its own persistent log, and replicates these log entries in parallel to all Follower nodes (meaning nodes that handle non-transactional requests). Follower nodes receive the logs and write them to local persistent storage. Once a majority of Followers confirm successful replication, the Leader marks the batch of logs as committed. Nodes then apply the committed log entries to their respective knowledge graph data stores, ensuring strong consistency of the new brand, products, and their relationships across all nodes in the cluster. A lease mechanism prevents the "split-brain" problem in a distributed environment; a lease is a time-limited exclusive right, and the Leader node must acquire and hold a currently valid lease before processing any request that might modify the knowledge graph data. Bounded aging reads, while pursuing strong data consistency, also address the system's needs for high throughput and low latency read performance. Query requests can read data from Follower nodes without always accessing the Leader node. Follower nodes can provide slightly older data that is guaranteed to be consistent within certain "boundaries," thus reducing the load on the Leader node. Each newly created relationship edge is assigned a unique edge-level version vector; however, this is not limited to this and can be achieved through other methods that can perform the same function. S5. Query Optimization: The query optimization module reduces redundant calculations and accelerates query response by maintaining a subgraph cache for hot queries. It employs a heuristic path pruning strategy to terminate invalid search paths early during graph traversal. In this embodiment, when querying a brand's products for the first time, since the brand is new data and not yet in the cache, the query optimization module executes the underlying graph storage query and caches the query result as a subgraph. Subsequent queries for that brand's products will be retrieved directly from the cache, significantly accelerating the response. By terminating invalid or low-value search paths early during graph search through path pruning, the search space is greatly reduced. This effectively avoids unnecessary calculations and accelerates queries when performing complex graph traversal or pattern matching queries. Of course, any other method capable of query optimization and improving query response speed can be used.
[0037] Specifically, step S2. Preprocessing of the raw data in map construction includes the following steps: S21. Entity Standardization: The input raw data undergoes text segmentation, part-of-speech tagging, named entity recognition based on a deep learning sequence labeling model, and data type conversion. A standardized dictionary containing core concepts in the fashion field and their synonyms and near-synonyms is established and maintained. The maintenance of the standardized dictionary is achieved through a combination of human expert annotation and a semi-automatic learning mechanism. The semi-automatic learning mechanism uses the co-occurrence frequency of words in a large-scale corpus, contextual similarity, and semantic embedding vector distance to generate candidate mappings. The entity standardization process uses hash table lookup and fuzzy matching algorithms to ensure that the same concepts obtain a unified representation. In this embodiment, for the input term, a precise hash lookup is performed first. If no precise match is found, a string fuzzy matching algorithm is used to calculate the similarity with existing terms in the standardized dictionary. If the similarity exceeds a preset threshold, the match is considered successful and standardization is performed. This setting ensures that all the same concepts obtain a unified and standardized representation in the graph, thereby effectively eliminating semantic ambiguity and data redundancy. Of course, it is not limited to this; any other method that can achieve a unified and standardized representation for all the same concepts in the graph is acceptable. S22. Name Alignment: A hybrid approach is employed to achieve high-precision name alignment, combining string similarity algorithms and semantic embedding techniques. Semantic embedding utilizes a large-scale fashion text corpus to train word or sentence vectors, and identifies semantically similar entities by calculating the cosine similarity of the semantic vectors corresponding to different names. When the string similarity or semantic vector similarity exceeds a preset threshold, it is determined that they point to the same entity. In this embodiment, the string similarity algorithm applies multiple string similarity algorithms to evaluate the surface similarity between names. Semantic embedding utilizes a large-scale fashion text corpus to train word or sentence vectors. Through the hybrid decision-making and output of string similarity algorithms and semantic embedding techniques, semantic similarity provides a deeper level of judgment. If the string similarity is low but the semantic embedding similarity is extremely high, the semantic judgment is prioritized. Conversely, if the string similarity is high but the semantic embedding similarity is low, it needs to be handled with caution. The final output of the naming alignment process is an entity alias table. This table records in detail each standardized entity and all its identified naming variants. When importing data into the graph, all these aliases will be mapped to the unique identifier of the entity, thereby ensuring seamless integration and efficient querying of multi-source data. Of course, it is not limited to this; it can be any other method that can ensure seamless integration and efficient querying of multi-source data. S23. Name Disambiguation: By analyzing the contextual information of the name and the attribute features of the candidate entities, a classification model is used to calculate the confidence level of each candidate entity, and the one with the highest confidence level is selected as the disambiguation result. If the confidence level is insufficient or there is competition for results, manual review is initiated or the user is requested to provide more information for confirmation. In this embodiment, for each entity name instance to be disambiguated, the system first extracts its contextual information. Simultaneously, the system collects attribute features of all possible entities corresponding to the name from existing knowledge bases or external data sources. Using the aforementioned contextual feature vector and attribute feature vector as input, the system predicts the entity most likely to which the name instance points. The training dataset is constructed by manually labeling a large number of ambiguous name instances and their correctly pointed-to entities. During the classification process, for each possible entity, the model outputs a confidence score between 0 and 1. The system selects the entity with the highest confidence level as the final disambiguation result. If the highest confidence level is lower than this threshold, or if multiple entities have similar and high confidence levels, the case will be marked as "uncertain" and a manual review process will be triggered, or the user will be asked for further information for confirmation interactively. This effectively ensures that the system maintains high accuracy even in complex or ambiguous situations. Of course, this is not limited to this; other methods that ensure high accuracy even in complex or ambiguous situations are acceptable. S24. Attribute Merging: For numerical attributes, the system calculates a weighted average based on the confidence levels of each data source. Confidence levels depend on the reliability, timeliness, and consistency of the data sources. For non-numerical attributes, the majority voting principle is prioritized. If a majority cannot be reached, predefined expert rules are invoked for decision-making. If the conflict still cannot be resolved, it is submitted for manual review to ensure the quality of the knowledge graph data. In this embodiment, for numerical attributes, a confidence-weighted average method is used. Each attribute value provided by a data source is assigned a confidence score. The confidence score reflects the reliability, timeliness, and consistency of the data source. The confidence score can be dynamically calculated using a historical data quality assessment model or pre-assigned by domain experts based on experience. The final merged attribute value is obtained by calculating a weighted average of all source values. For non-numerical attributes, when a conflict occurs, the support of each conflicting attribute value is first calculated, i.e., the number of data sources providing that attribute value. If the support of a certain attribute value exceeds a preset majority threshold, the majority voting principle is adopted. If there is no obvious majority, or if a more refined judgment is required, the expert rule decision-making mechanism is invoked. The expert rules predefine a set of priority and condition judgments based on domain knowledge, encoded in a format parsable by a logic programming language or rule engine. In special cases, if the rule engine cannot completely resolve conflicts, the system will automatically mark the attribute as "pending review" and submit it to domain experts for manual review and adjudication, thereby ensuring the data quality and authority of the graph. Of course, it is not limited to this; any other method that can guarantee the data quality and authority of the graph can be used.
[0038] Specifically, string similarity algorithms include Levenshtein distance, Jaccard similarity, and cosine similarity based on N-gram vectors or TF-IDF vectors. In this embodiment, Levenshtein distance is used to calculate the minimum number of single-character edits (insertion, deletion, replacement) required to convert one string into another; Jaccard similarity is the ratio of the intersection to the union of N-gram sets (Chinese language model); cosine similarity based on N-gram vectors or TF-IDF vectors involves converting the string into an N-gram feature vector (meaning converting the text into a vector space model composed of combinations of N consecutive words (or bytes) by statistically analyzing their frequency) or a TF-IDF vector (meaning evaluating the contribution of words to a document by combining word frequency and inverse document frequency), and then calculating the cosine similarity of these vectors.
[0039] Specifically, step S3. Change detection in incremental updates includes the following steps: This method employs database triggers or Change Data Capture (CDC) technology to capture changes in structured database data sources. For unstructured or semi-structured data sources, changes are detected through periodic data scraping, log parsing, or real-time event subscription based on message queues, generating a structured change log. Each record in the change log includes a unique transaction identifier, an affected entity identifier, a changed attribute name, values before and after the change, the operation type, a timestamp, and a data source identifier. In this embodiment, CDC technology refers to the technique of monitoring and recording changes such as additions, deletions, and modifications in databases and other data sources in real time. Through the above steps, changes in the data source are effectively monitored, and addition, modification, and deletion operations are captured. Of course, this is not limited to this; other technologies that can achieve the same function can be used.
[0040] Specifically, the forward patch describes all atomic graph modification instructions required to update the current graph state to the new state. These atomic instructions include adding nodes, updating nodes, deleting nodes, adding edges, updating edges, and deleting edges. The reverse patch is the set of inverse operations of the forward patch, and its function is to restore the graph from the new state to the state before the change. In this embodiment, this setting provides the graph with powerful version rollback capabilities, supporting rapid restoration to any historical version in case of data errors or policy adjustments. Of course, it is not limited to this; other methods capable of achieving the same function can be used.
[0041] Specifically, step S3. Resolving data conflicts in incremental updates includes the following steps: The hybrid decision-making method combines rule priority and semantic embedding similarity score for weighted calculation. Rule priority predefines a detailed rule weight system to evaluate the authority and credibility of different data sources. Semantic embedding similarity score is calculated by converting the conflicting text description into pre-trained fashion domain word vectors and / or sentence vectors, and then calculating the cosine similarity between these vectors. The final conflict resolution result is obtained by normalizing and weighting the sum of rule priority and semantic embedding similarity score, selecting the candidate value with the highest confidence score as the final attribute value. In this embodiment, rule priority is managed by a configurable rule engine (e.g., based on Drools), allowing domain experts to dynamically adjust it according to actual business needs. When a conflict occurs, the system first adopts the data pointed to by the rule with higher priority. For conflicts that are difficult to determine using simple rules, the system converts the conflicting text description into pre-trained fashion domain word vectors or sentence vectors using semantic embedding similarity score. These vectors are obtained through fine-tuning unsupervised learning on a large fashion corpus, capturing the deep semantic relationships of words and phrases within the fashion domain. Then, the cosine similarity between these vectors is calculated. The final conflict resolution result is weighted by combining rule priority and semantic embedding similarity scores, forming a refined decision-making process. For each conflicting attribute and all its candidate values, the system first assigns an initial weight based on the priority rules of its source data source. Next, for non-numerical attributes, the semantic embedding similarity between each candidate value and existing values of that attribute in the current graph or with other high-priority candidate values is calculated. This similarity score is used as an auxiliary weight, superimposed on or adjusted from the initial weight. All weights are normalized and weighted summed to obtain the final confidence score for each candidate value. The system selects the candidate value with the highest confidence score as the final attribute value. To ensure decision quality, this invention sets a minimum confidence threshold. If multiple candidate values have similar scores, or the highest score does not reach the preset minimum confidence threshold, the conflict will be marked by the system and sent to a manual review queue. Domain experts will make the final decision on these complex conflicts. This hybrid strategy significantly reduces the data conflict rate and improves the data accuracy and global consistency of the graph. Of course, it is not limited to this; it can be any other method that significantly reduces the data conflict rate and improves the data accuracy and global consistency of the map.
[0042] Specifically, the edge-level version vector includes the source node, target node, relation type, timestamp, user identifier of the update operation, and sequence number. The edge-level version vector is used to accurately record and track the causal order and change history of each relation edge. By comparing the timestamps and sequence numbers in different version vectors, the edge-level version vector determines the sequence of events and causal dependencies, thus providing fine-grained historical version control and auditing capabilities for the graph. In this embodiment, the source node and target node identify the start and end nodes of the relation, ensuring the uniqueness of the edge; the relation type identifies the type of relation and defines the semantic connection between nodes; the timestamp records the most recent creation or modification time of the relation edge, accurate to the microsecond level, providing information on the time of the change; it is a monotonically increasing integer used to distinguish the order of different change events under the same timestamp or the same user identifier of the update operation. In a distributed system, due to clock synchronization issues or concurrent writes, multiple operations may occur within the same microsecond, and the sequence number provides the precise ordering basis. When any relation edge in the graph undergoes a creation, modification, or deletion operation, the version vector of that relation edge will be automatically updated. By comparing timestamps and sequence numbers in different version vectors, the system can determine the chronological order and causal dependencies of events. If multiple version vectors conflict on timestamps and user identifiers of update operations, the sequence number can provide further sorting criteria, thus solving the problem of precise ordering in distributed concurrent updates. Of course, it is not limited to this; any other method capable of solving the problem of precise ordering in distributed concurrent updates can be used.
[0043] Specifically, step S5. Query optimization, which maintains a subgraph cache for hot queries to reduce redundant calculations and accelerate query response, includes the following steps: The subgraph cache is managed using an LRU (Least Recently Used) strategy and supports a cache invalidation mechanism that intelligently identifies and invalidates affected cached items. The query optimization module employs a heuristic path pruning strategy, using heuristic functions to estimate the value of the current search path or the probability of reaching the target node in real time during graph traversal, and combining this with a pre-computed reachability matrix to terminate invalid search paths early. In this embodiment, when a query request arrives, the query optimization module first checks the subgraph cache for cached results that meet the conditions using the query signature. If a result exists and the cached item is not invalid, it is directly retrieved from the cache and returned without accessing the underlying graph storage or performing time-consuming graph traversal calculations. The cache space is managed using an LRU (Least Recently Used) strategy. When the cache space is insufficient, the least recently used subgraph will be evicted to make room for new query results. Each cached item contains a timestamp to record the time of its most recent access, and the LRU manager makes eviction decisions based on this timestamp. Cache invalidation mechanism: When the incremental update module submits a new change patch and updates the knowledge graph, the query optimization module intelligently identifies and invalidates the affected cached items. The path pruning strategy uses heuristic functions to estimate the value of the current search path or the probability of reaching the target node in real time during graph traversal, leveraging local topological features of the graph to evaluate path importance. When the score falls below a preset pruning threshold, the current search path is terminated early. A pre-computed reachability matrix is used: approximate reachability queries or reachability prediction based on graph embeddings are employed. These graph embeddings map nodes to a low-dimensional vector space, predicting reachability through vector distance. At query initiation, if, based on the pre-computed reachability information, the target node and the current search node are shown as unreachable or have an extremely low reachability probability in the pre-computed reachability matrix, the search path is immediately terminated, significantly pruning invalid search branches. However, this is not limited to this; other methods capable of pruning invalid search branches can also be used.
[0044] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0045] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these all fall within the protection scope of the present invention. Therefore, the protection scope of this invention patent should be determined by the appended claims.
Claims
1. A distributed cognitive graph construction and dynamic update system, characterized in that: It includes a graph construction module, an incremental update module, a distributed consistency module, and a query optimization module; The graph construction module is used to transform multi-source, multi-modal heterogeneous fashion data into a unified, structured knowledge graph; The incremental update module is used to achieve dynamic maintenance and real-time performance of the knowledge graph. The distributed consistency module is used to ensure strong consistency, high availability, and traceability of changes to knowledge graph data across multiple nodes. The query optimization module is used to provide efficient and flexible knowledge graph query capabilities for rapid retrieval and complex analysis of fashion knowledge.
2. The distributed cognitive graph construction and dynamic update system according to claim 1, characterized in that: The query optimization module is equipped with query interfaces, which include GraphQL, REST and WebSocket interfaces.
3. A method for constructing and dynamically updating a cognitive map based on the system of claim 1 or 2, characterized in that: Includes the following steps: S1. Data Ingestion and Preprocessing: Ingest raw data from the data source layer; S2. Graph Construction: The graph construction module preprocesses the input raw data to construct a unified domain ontology based on "brand level - style classification - material system - process flow - application scenario". The preprocessing includes data extraction and entity relationship construction, thereby constructing the graph. S3. Incremental Update: The incremental update module continuously monitors the changes in the original data, performs change detection on the changes in the original data, and generates a change log. A bidirectional differential patching mechanism is used to capture addition, modification, and deletion operations. The difference between the previous and current versions of the graph is calculated based on the change log, and then a patch is generated. The patch includes a forward patch and a reverse patch. A strategy combining rule priority, semantic embedding similarity scoring, and hybrid decision-making methods is applied to intelligently resolve data conflicts. S4. Consistency Guarantee: Through the distributed consistency module, the Raft consensus algorithm is used to ensure that all nodes in the cluster achieve strong consistency on the state of the knowledge graph data. The lease mechanism is used to prevent the "split-brain" problem in the distributed environment, and bounded stale reads are supported to balance consistency and read performance. At the same time, the edge-level version vector mechanism is used to accurately record and track the causal order and change history of each relation edge. S5. Query Optimization: The query optimization module reduces redundant calculations and accelerates query response by maintaining a subgraph cache for hot queries, and uses a heuristic path pruning strategy to terminate invalid search paths in advance during graph traversal.
4. The cognitive map construction and dynamic update method according to claim 3, characterized in that: Step S2. Preprocessing the raw data in map construction includes the following steps: S21. Entity Standardization: The input raw data is processed by text segmentation, part-of-speech tagging, named entity recognition based on a deep learning sequence labeling model, and data type conversion; a standardized dictionary containing core concepts in the fashion field and their synonyms and near-synonyms is established and maintained; the maintenance of the standardized dictionary is achieved through a combination of human expert annotation and a semi-automatic learning mechanism, which uses the co-occurrence frequency of words in a large-scale corpus, contextual similarity, and semantic embedding vector distance to generate candidate mappings; the entity standardization process uses hash table lookup and fuzzy matching algorithms to ensure that the same concepts obtain a unified representation. S22. Name Alignment: A hybrid method is used to achieve high-precision name alignment. The hybrid method combines string similarity algorithm and semantic embedding technology. The semantic embedding technology uses a large-scale fashion text corpus to train word vectors or sentence vectors, and calculates the cosine similarity of the semantic vectors corresponding to different naming expressions to identify semantically similar entities. When the string similarity or semantic vector similarity exceeds a preset threshold, it is determined that they point to the same entity. S23. Name Disambiguation: By analyzing the contextual information of the name and the attribute characteristics of the candidate entities, a classification model is used to calculate the confidence level of each candidate entity, and the one with the highest confidence level is selected as the disambiguation result; if the confidence level is insufficient or there is competition for the results, manual review is initiated or the user is requested to provide more information for confirmation; S24. Attribute Merging: For numerical attributes, the system calculates a weighted average based on the confidence level of each data source. The confidence level depends on the reliability, timeliness, and consistency of the data source. For non-numerical attributes, the majority voting principle is preferred. If a majority cannot be reached, predefined expert rules are used for decision-making. If the conflict still cannot be resolved, it is submitted for manual review to ensure the quality of the knowledge graph data.
5. The cognitive map construction and dynamic update method according to claim 4, characterized in that: The string similarity algorithms include Levenshtein distance, Jaccard similarity, cosine similarity based on N-gram vectors, or cosine similarity based on TF-IDF vectors.
6. The method for constructing and dynamically updating a distributed cognitive graph according to claim 5, characterized in that: The change detection in step S3, incremental update, includes the following steps: Changes to structured database data sources are captured using database triggers or CDC technology. For unstructured or semi-structured data sources, changes are detected through periodic data crawling, log parsing, or real-time event subscription based on message queues, and a structured change log is generated. Each record in the change log contains a unique transaction identifier, an affected entity identifier, a changed attribute name, values before and after the change, an operation type, a timestamp, and a data source identifier.
7. The cognitive map construction and dynamic update method according to claim 6, characterized in that: The forward patch describes all atomic graph modification instructions required to update the current graph state to a new state. The atomic graph modification instructions include adding nodes, updating nodes, deleting nodes, adding edges, updating edges, and deleting edges. The reverse patch is the set of inverse operations of the forward patch, and its function is to restore the graph from the new state to the state before the change.
8. The cognitive map construction and dynamic update method according to claim 7, characterized in that: The data conflict resolution step S3. incremental update includes the following steps: The hybrid decision-making method combines the rule priority and the semantic embedding similarity score for weighted calculation. The rule priority predefines a detailed rule weight system to evaluate the authority and credibility of different data sources. The semantic embedding similarity score is calculated by converting the conflicting text description into pre-trained fashion domain word vectors and / or sentence vectors, and calculating the cosine similarity between the fashion domain word vectors and / or sentence vectors. The final conflict resolution result is obtained by normalizing and weighting the sum of the rule priority and the semantic embedding similarity score, and selecting the candidate value with the highest confidence score as the final attribute value.
9. The cognitive map construction and dynamic updating method according to any one of claims 6-8, characterized in that: The edge-level version vector includes source node, target node, relation type, timestamp, user identifier and sequence number of update operation. The edge-level version vector is used to accurately record and track the causal order and change history of each relation edge. The edge-level version vector determines the chronological relationship and causal dependency of events by comparing the timestamps and sequence numbers in different version vectors, thereby providing fine-grained historical version control and auditing capabilities for the graph.
10. The cognitive map construction and dynamic update method according to claim 9, characterized in that: Step S5. Maintaining a subgraph cache for hot queries in query optimization to reduce redundant calculations and accelerate query response includes the following steps: The subgraph cache is managed using an LRU strategy and supports a cache invalidation mechanism that intelligently identifies and invalidates affected cache items. The query optimization module adopts a heuristic path pruning strategy, which uses a heuristic function to estimate the value of the current search path or the probability of reaching the target node in real time during graph traversal, and combines it with a pre-computed reachability matrix to terminate invalid search paths in advance.
Citation Information
Patent Citations
Knowledge graph construction method, knowledge graph construction device, medium and electronic equipment
CN116304104A
Incremental knowledge graph updating and consistency verification system for industrial field
CN119862195A
Label-based digital equipment model dynamic creation method and system
CN120336291A
Multi-source heterogeneous data-oriented industry knowledge graph automatic construction method
CN121119085A
Cited By
Circuit board equipment remote management system and method based on Internet of Things
CN122069168A