Game strategy retrieval method and device based on event-driven knowledge graph embedding

By adopting an event-driven knowledge graph embedding method in the game strategy platform, the problem of existing platforms positioning strategy content in massive information is solved, and efficient and personalized strategy retrieval and platform dynamic expansion are achieved.

CN120104814AActive Publication Date: 2025-06-06QINGFENG (BEIJING) TECH CO LTD

Patent Information

Application Number
CN202510593437.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-06-06
Estimated Expiration
2045-05-09

AI Technical Summary

Technical Problem

It is difficult for existing game strategy platforms to quickly and accurately locate strategy content related to specific games, levels or themes in massive information, and the platform expansion efficiency is low, and the relevance and personalization of the search results are insufficient.

Method used

The event-driven knowledge graph embedding method is adopted to automatically generate game entities and strategy encyclopedia in the knowledge graph, structure analysis of strategy data and fuse it into the knowledge graph, perform graph embedding calculations to obtain vector representations between entities, build retrievalable vector index, and generate personalized strategy results through similarity search and relationship reasoning.

Benefits of technology

It realizes rapid and accurate retrieval of game strategy content, improves the relevance and personalization of search results, has dynamic expansion capabilities, and improves user experience and platform expansion efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120104814A_ABST
    Figure CN120104814A_ABST
Patent Text Reader

Abstract

The invention provides a game strategy retrieval method and device based on event-driven knowledge graph embedding. The method comprises the following steps: performing structured analysis on strategy data, and updating entities and relationships; performing graph embedding calculation on entities and relationships in the knowledge graph to obtain vector representation among the entities, and constructing a searchable vector index; vectorizing a strategy query request of a user, and performing similarity retrieval on the strategy query request and the vector index to obtain a first candidate entity set similar to the query vector; performing relation reasoning by taking the first candidate entity set as a starting point in the knowledge graph to obtain a second candidate entity set in semantic association with the first candidate entity set, and combining the second candidate entity set with the first candidate entity set to form a target entity set; and performing correlation sorting on the target entity set to obtain a strategy result. According to the method, the strategy data can be automatically and structurally managed, and deep semantic retrieval is supported, so that the accuracy of game strategy content retrieval is improved, and the dynamic expansion capability is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a game strategy retrieval method and device based on event-driven knowledge graph embedding. Background Art

[0002] With the rapid growth of online game content, the player community has generated a large number of game strategies (including key points for level clearance, equipment matching, hidden elements, etc.). Existing strategy platforms usually have the following characteristics: they are mainly saved in the form of forum posts, long texts or video links, and lack a unified data model. The platform generally performs keyword queries based on full-text inverted indexes, and has limited processing capabilities for synonyms, contexts, and cross-language content. When new games or expansion packs appear, operation and maintenance personnel are required to manually create strategy entries, category tags, and page templates, which is time-consuming and easy to miss. Existing systems have difficulty identifying implicit relationships between strategies (such as the correspondence between copy mechanisms and character talents), and cannot accurately sort results based on players' historical behavior.

[0003] Therefore, the resulting technical problems include: it is difficult for players to quickly and accurately locate strategy content related to specific games, levels or themes in the vast amount of information; the platform expansion efficiency is low, and there is a significant time lag between the launch of a new game and the retrieval of the strategy; the search results are not relevant and personalized enough, affecting the user experience and retention rate. Summary of the invention

[0004] In view of this, an embodiment of the present application provides a game strategy retrieval method and device based on event-driven knowledge graph embedding to solve the problems existing in the prior art of being unable to accurately locate game strategy content, poor platform expansion capabilities, and insufficient accuracy of retrieval results.

[0005] According to a first aspect of an embodiment of the present application, a game strategy retrieval method based on event-driven knowledge graph embedding is provided, comprising: upon receiving a trigger event representing a newly added game, automatically generating a game entity and a strategy encyclopedia entry corresponding to the newly added game in the knowledge graph; obtaining strategy data related to the newly added game, performing structured analysis on the strategy data, and integrating the analyzed strategy data into the knowledge graph to update entities and relationships; based on the updated knowledge graph, performing graph embedding calculations on the entities and relationships in the knowledge graph to obtain vector representations between entities, and constructing a searchable vector index; vectorizing the user's strategy query request, and performing similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector; performing relational reasoning in the knowledge graph with the first candidate entity set as the starting point to obtain a second candidate entity set that has a semantic association with the first candidate entity set, and merging the second candidate entity set with the first candidate entity set to form a target entity set; sorting the target entity set by relevance to obtain strategy results, and outputting the strategy results to the user end.

[0006] According to a second aspect of an embodiment of the present application, there is provided a game strategy retrieval device based on event-driven knowledge graph embedding, comprising: a generation module, for automatically generating game entities and strategy encyclopedia entries corresponding to the newly added game in the knowledge graph after receiving a trigger event representing a newly added game; a parsing module, for obtaining strategy data related to the newly added game, performing structured parsing on the strategy data, and integrating the parsed strategy data into the knowledge graph to update entities and relationships; a calculation module, for performing graph embedding calculations on entities and relationships in the knowledge graph based on the updated knowledge graph, obtaining vector representations between entities, and constructing a searchable vector index; a retrieval module, for vectorizing a user's strategy query request, and performing similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector; an inference module, for performing relational inference in the knowledge graph with the first candidate entity set as a starting point, obtaining a second candidate entity set that has a semantic association with the first candidate entity set, and merging the second candidate entity set with the first candidate entity set to form a target entity set; an output module, for sorting the target entity set by relevance, obtaining strategy results, and outputting the strategy results to a user terminal.

[0007] According to a third aspect of an embodiment of the present application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the computer program.

[0008] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0009] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: After receiving a trigger event representing a newly added game, the game entity and strategy encyclopedia entry corresponding to the newly added game are automatically generated in the knowledge graph; the strategy data related to the newly added game is obtained, and the strategy data is structurally parsed, and the parsed strategy data is integrated into the knowledge graph to update the entities and relationships; based on the updated knowledge graph, the entities and relationships in the knowledge graph are executed with graph embedding calculations to obtain vector representations between entities, and a searchable vector index is constructed; the user's strategy query request is vectorized, and a similarity search is performed with the vector index to obtain a first candidate entity set similar to the query vector; in the knowledge graph, relational reasoning is performed starting from the first candidate entity set to obtain a second candidate entity set that is semantically associated with the first candidate entity set, and the second candidate entity set is merged with the first candidate entity set to form a target entity set; the target entity set is sorted by relevance to obtain strategy results, and the strategy results are output to the user end. This application can automatically manage strategy data in a structured manner, support deep semantic retrieval, thereby improving the accuracy of game strategy content retrieval and having dynamic expansion capabilities. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0011] Figure 1 It is a flowchart of a game strategy retrieval method based on event-driven knowledge graph embedding provided in an embodiment of the present application; Figure 2 It is a structural schematic diagram of a game strategy retrieval device based on event-driven knowledge graph embedding provided in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0012] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0013] In order to solve the problem that users cannot quickly and accurately find the content they want in a large number of game guides. This application provides a structured management and retrieval technology for game guides, which facilitates users to quickly and accurately find specific games, specific levels, and specific theme content. The technical implementation ideas of the technical solution of this application include: 1. Based on message queue technology, automatically create and associate encyclopedias when adding new games; 2. Based on xlrd and xlwt, identify the Excel file uploaded by the user and generate the corresponding entries; 3. Designed a low-code platform that allows users to determine the layout of the encyclopedia by dragging.

[0014] In addition, based on the above technical ideas, this application adds an intelligent retrieval mechanism based on knowledge graph semantic embedding.

[0015] Specifically, graph embedding algorithms (such as TransE, GraphSAGE, etc.) are used to map knowledge graph entities and relationships into low-dimensional continuous vector space to establish a semantic embedding model; When the user enters the search content, the system uses semantic matching algorithms (such as cosine similarity, semantic distance matching, etc.) to quickly compare the query request with the embedded vector of the entity in the knowledge graph, accurately determine and return the strategy information that is semantically similar to the user's query content; at the same time, it supports graph relationship reasoning to assist users in discovering strategy information that is implicitly related to the query content, thereby improving the search experience.

[0016] In addition, this application also introduces intelligent and precise retrieval technology based on semantic retrieval and recommendation algorithms. This application uses deep semantic matching and user portrait analysis, combined with multi-dimensional data to achieve more accurate and personalized strategy retrieval services.

[0017] Strategy semantic embedding and fast index retrieval technology based on pre-trained language models; personalized retrieval and recommendation mechanism driven by user behavior data; intelligent retrieval dialogue system based on user intent recognition to help users accurately lock in strategy content.

[0018] The contents of the technical solution of the present application are described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] Figure 1 Schematic diagram of the process of game strategy retrieval method based on event-driven knowledge graph embedding provided by the embodiment of the present application. Figure 1 As shown, the game strategy retrieval method based on event-driven knowledge graph embedding may specifically include: S101, after receiving a trigger event indicating a newly added game, automatically generating a game entity and a strategy encyclopedia entry corresponding to the newly added game in the knowledge graph; S102, obtaining strategy data related to the newly added game, performing structured analysis on the strategy data, and integrating the analyzed strategy data into the knowledge graph to update entities and relationships; S103, based on the updated knowledge graph, perform graph embedding calculation on entities and relationships in the knowledge graph, obtain vector representations between entities, and construct a searchable vector index; S104, vectorizing the user's strategy query request, and performing similarity search with the vector index to obtain a first candidate entity set similar to the query vector; S105, performing relational reasoning in the knowledge graph with the first candidate entity set as a starting point to obtain a second candidate entity set that is semantically associated with the first candidate entity set, and merging the second candidate entity set with the first candidate entity set to form a target entity set; S106, sorting the target entity set by relevance, obtaining a strategy result, and outputting the strategy result to the user end.

[0020] In some embodiments, after receiving a trigger event indicating a newly added game, a game entity and a strategy encyclopedia entry corresponding to the newly added game are automatically generated in the knowledge graph, including: Write the trigger event into the preset event queue; The knowledge graph construction module that subscribes to the event queue performs idempotence check on the trigger event and creates a game entity node corresponding to the newly added game in the knowledge graph; Generate a corresponding strategy encyclopedia entry identifier based on the game entity node, and write the strategy encyclopedia entry identifier into the game entity node as an attribute.

[0021] Specifically, event queue: use a distributed message queue that supports at least At-Least-Once delivery semantics (such as Kafka, Pulsar or RabbitMQ), and configure a separate topic GameCreateTopic for new game events.

[0022] Knowledge graph construction module: deployed as a stateless microservice with the capabilities of event consumption, idempotence verification, and graph database writing.

[0023] Graph database: Choose a database that supports the property graph model (such as Neo4j or TigerGraph) to persist Game type entity nodes.

[0024] Furthermore, when the operator clicks "Add New Game" in the background management interface and confirms the submission, the business service immediately encapsulates an event message containing fields such as the game's unique identifier GameID, game name, timestamp, etc.

[0025] The event message is written to GameCreateTopic. During the writing process, a single transaction is started to ensure that the event corresponding to the same GameID is written at most once.

[0026] The knowledge graph construction module continuously monitors GameCreateTopic. Whenever a new game event is consumed, an idempotence check is first performed in a distributed cache (such as Redis) based on the EventID: If the same EventID already exists in the cache, it is considered a duplicate event and discarded directly; If the cache does not exist, the EventID is recorded and the expiration time is set to prevent concurrent duplicate processing.

[0027] Furthermore, through the graph database session, the "merge" write logic is executed: if a Game node with a matching GameID already exists in the graph, only the latest creation time in the node attributes is updated; if it does not exist, a new Game node is created and basic attributes such as GameID, game name, and creation time are written.

[0028] This write operation uses database atomic transactions to ensure that the node is completely created or updated to avoid the loss of some attributes.

[0029] Furthermore, the system calls an internal unique identifier generator (which may be based on the Snowflake algorithm or the database auto-increment sequence) to generate a WikiID.

[0030] Write the WikiID as an attribute to the wikiId field of the above-mentioned target Game node; if the platform uses multiple data sources, the WikiID can also be synchronously registered to the document service or static content storage to reserve a placeholder for the encyclopedia page.

[0031] Furthermore, after successful writing, the knowledge graph construction module appends a WikiInitTopic message to the event queue, carrying only GameID and WikiID, which is used to prompt the subsequent encyclopedia initialization service to generate a page template.

[0032] If the graph database fails to be written or the network times out, the module will record the number of retries and try again based on the exponential backoff strategy. If the maximum number of retries is exceeded, an alarm will be pushed.

[0033] This embodiment has low latency. In a production environment, the average time from event writing to the end of Game node creation is controlled within 40ms, meeting the real-time database construction requirements. High consistency, idempotence checks and database transactions ensure that the same GameID only corresponds to one Game node and WikiID, eliminating the problem of duplicate database construction under concurrency. Scalability, event queues and knowledge graph construction modules are both horizontally scalable deployments, which can support high-concurrency writing when new games are launched in large quantities.

[0034] Through the above embodiment, the standardized creation of game entity nodes and the unique identifier binding of the strategy encyclopedia entrance can be automatically completed after the new game is submitted, providing a unified and reliable entity benchmark for subsequent strategy data analysis, fusion and retrieval, and significantly improving the expansion efficiency and data consistency of the strategy platform.

[0035] In some embodiments, the strategy data is structured and parsed, and the parsed strategy data is integrated into the knowledge graph to update entities and relationships, including: According to the preset field-entity mapping rules, the strategy data is converted into field-value pairs corresponding to the knowledge graph entity attributes; Based on the similarity threshold, the field value pairs are matched with the existing entity nodes in the knowledge graph: If the similarity meets the similarity threshold, the attribute information of the matched target entity node is updated; if the similarity does not meet the similarity threshold, a new entity node is created in the knowledge graph; According to the preset relationship type, an association relationship is established between the target entity node or the newly created entity node and the game entity node to complete the fusion update of the knowledge graph.

[0036] Specifically, when the platform receives an official or community strategy data file (such as a table, CSV, or JSON) for a newly launched game, it needs to be quickly incorporated into the existing knowledge graph to ensure that subsequent searches can cover multi-dimensional information such as levels, enemies, and drops.

[0037] First, the platform maintains a list of field-entity mapping rules in advance to define the correspondence between external data fields and knowledge graph entity attributes; before loading the strategy data, the parsing module automatically reads the latest mapping rules and caches them in memory to ensure mapping consistency.

[0038] Furthermore, the parsing module scans the strategy data file line by line and converts each line of content into several "field value" pairs; it performs unified preprocessing on the text values ​​required for entity matching, including removing redundant punctuation, unifying uppercase and lowercase, merging homophones, etc., to reduce matching errors caused by format differences.

[0039] Furthermore, the parsing module generates a standardized description for each entity to be written, and calculates the similarity with the existing entities of the corresponding type in the knowledge graph; the similarity score comprehensively considers factors such as edit distance, synonym table, semantic vector angle, etc., and is compared with the preset threshold: If the value is higher than the threshold, the match is considered successful and the missing attributes are updated or supplemented in the target entity node. Below the threshold: It is considered as the first entry, and the graph database is called to write a new entity node and record the creation timestamp.

[0040] Furthermore, according to the relationship template built into the platform, the parsing module establishes a semantic relationship between the updated entity or the newly created entity and the corresponding game entity node, such as "includes level", "associated enemy", "dropped item", etc.

[0041] Relationship writing adopts batch transaction mode to ensure the atomic consistency of node relationships within the same batch and avoid the situation where "nodes have been written but relationships are lost".

[0042] Furthermore, after completing the batch writing, the parsing module generates a change summary, including the number of new entities, the number of updated entities, and the low-similarity failed entries; if the proportion of low-similarity entries exceeds the preset threshold, the system automatically triggers the manual review process and suspends subsequent writing of the batch to prevent the entry of noise data; version identification is set for the written entity to facilitate traceability and rollback when the strategy content is updated in the future.

[0043] The key technical points and technical advantages of this embodiment include: hot loading of field entity mapping rules, supporting adjustment of mapping at any time without downtime for deployment; comprehensive judgment of multi-indicator similarity, effectively improving matching accuracy and reducing the rate of false merging; batch transaction writing to ensure the consistency of nodes and relationships and avoid data silos; change summaries and threshold alarms to provide automated risk control and manual backup for graph quality; versioned entities to facilitate differentiated rollback and timing analysis.

[0044] Through this embodiment, the platform can complete the structured analysis and graph fusion of strategy data in minutes, automatically maintain multi-layer entities such as strategies, games, levels and their relationships, and provide accurate and real-time updated data support for subsequent graph embedding, semantic retrieval and personalized recommendations.

[0045] In some embodiments, based on the updated knowledge graph, graph embedding calculations are performed on entities and relationships in the knowledge graph to obtain vector representations between entities and construct searchable vector indexes, including: Using the preset graph embedding algorithm, embed the entities and relationships in the updated knowledge graph to obtain vector representations of the semantic features of each entity. Write entity vectors and corresponding entity identifiers into the vector index library, and build a vector index that supports similarity retrieval based on the approximate nearest neighbor retrieval structure; When new or changed entities and relationships are detected in the knowledge graph, incremental embedding calculations are performed on the affected parts and the vector index is updated synchronously.

[0046] Specifically, in this embodiment, after the platform completes the strategy data fusion, it will regularly pass the latest knowledge graph to the graph embedding computing service. This service runs on an independent computing cluster, uses a pre-selected graph embedding algorithm to perform low-dimensional vector representation of entities and relationships in the knowledge graph, and generates vector indexes that can be used for efficient similarity retrieval.

[0047] The platform uses the workflow scheduler to automatically start the full-scale embedding training task during the low-peak hours of business in the early morning every day. The task first pulls a snapshot of the graph database to ensure the consistency of the training data.

[0048] Considering the adaptability and interpretability of large-scale relational data, the platform selects the graph embedding algorithm based on translation distance as the default solution. Under the ideal number of training rounds, it can effectively capture the diverse semantic relationships of entities. Hyperparameters such as embedding dimension and learning rate are determined through cross-experiments before going online and solidified into configuration files for continuous reuse.

[0049] At the end of the training process, the service will generate a set of fixed-dimensional vector coordinates for each entity in the graph. The vector file is pushed to the storage cluster along with the entity identifier for direct reading by the index building process.

[0050] In some examples, in order to balance query accuracy and response speed, the platform uses an approximate nearest neighbor index with a layered graph structure. The multi-layer jump mechanism of this structure can quickly lock similar entities in the vector space, ensuring that the retrieval latency is at the millisecond level.

[0051] The index building task writes the entity vectors and entity identifiers output by the graph embedding service into the index node one by one. After writing is completed, the index node immediately provides a query interface for the retrieval module to call.

[0052] To prevent index read and write conflicts during the retrieval phase, the index building task uses a dual-copy strategy: one copy is responsible for external services, and the other copy is responsible for incremental updates. After the update is completed, seamless replacement is achieved through name switching.

[0053] Furthermore, the platform presets an event channel in the knowledge graph writing link. When any new or modified entity is triggered, a change event will be generated, including the unique identifier of the changed entity.

[0054] The graph embedding computing service monitors the change event queue and aggregates them in small batches. Whenever the preset number of entries or timeout threshold is reached, the corresponding subgraph is extracted for incremental training, and only the vectors of the affected entities are output.

[0055] After the incremental vector is generated, the index node loads the latest vector of the corresponding entity, overwrites and updates the original entry, and refreshes the memory index structure immediately after writing is completed to ensure the real-time performance of the retrieval results.

[0056] This embodiment can improve training efficiency. Under the current hardware configuration, full-graph embedding training can be completed within one hour. It reduces retrieval latency, with the average response time for a single vector similarity query not exceeding five milliseconds. It improves update timeliness, with newly added entities able to obtain retrievable vector representations within five minutes of being written to the graph. It has a fault recovery function, and if a training task is terminated abnormally, the next scheduling will automatically restart from the most recent snapshot. The index copy switching mechanism ensures that the retrieval service is not affected.

[0057] Through this embodiment, the platform can continuously maintain semantic vectors for each entity in the knowledge graph, and achieve high-throughput and low-latency similarity retrieval with approximate nearest neighbor indexing, providing a solid data foundation for subsequent semantic recall, relationship reasoning, and result sorting.

[0058] In some embodiments, the user's strategy query request is vectorized, and similarity retrieval is performed with the vector index to obtain a first candidate entity set similar to the query vector, including: Receive a strategy query request input by a user; Using the semantic encoding module, the strategy query request is converted into a query vector through the pre-trained language model; Call the vector retrieval module to perform approximate nearest neighbor retrieval in the vector index based on the query vector and calculate the similarity between the query vector and the entity vector; According to the preset similarity threshold or the top K high similarity rule, the first candidate entity set similar to the query vector is screened and obtained.

[0059] Specifically, when the terminal user enters text in the search box (for example, "how to beat Chapter 3") and clicks the search button, the front-end immediately packages the text together with the user ID, language information, and current timestamp into a query request and sends it to the back-end semantic search gateway. After receiving the request, the gateway performs preprocessing operations such as character set unification and removal of redundant spaces and illegal characters to ensure that the encoding module can parse the sentence stably.

[0060] The semantic encoding module loads a pre-trained language model that has been fine-tuned in the domain. The model has been additionally trained on the game domain vocabulary and can more accurately capture the proper nouns and verb phrases in the strategy context.

[0061] In some examples, the vectorization process includes the following: First, the encoding module serializes the preprocessed text into the model input format and performs a forward inference; Next, the sentence vector output by the model is processed by mean pooling and unitization to form a fixed-length, high-dimensional query vector. The query vector is then appended with a unique request ID and pushed to the vector retrieval module within milliseconds.

[0062] Furthermore, for non-Chinese queries, the system uses a unified multilingual model branch. When constructing the vector space, it ensures that semantically similar content in different languages ​​is projected into similar areas, thus achieving cross-language retrieval.

[0063] In some examples, the platform's vector index is implemented using a hierarchical graph structure, and to meet TPS (transactions per second) requirements, nodes are stored in main memory and accessed in read-only mode.

[0064] After receiving the query vector, the retrieval module accesses the entry layer of the graph according to the index parameters and searches downward layer by layer. During the graph traversal, the system continuously compares the distance value between the current node and the query vector and maintains a minimum heap of candidate entities. Once the search reaches the preset depth or the upper limit of the number of visited nodes, the traversal stops and the candidate list is returned.

[0065] Cosine similarity is used as the metric. To improve efficiency, the module normalizes the vectors so that they can be converted into vector dot product operations on hardware.

[0066] In some examples, the search module can filter the returned results according to the following two types of rules: If the platform is configured with a fixed threshold, only entities with similarity above the threshold are retained; If no threshold is set, the top K entities in similarity ranking are returned, and the K value can be adjusted dynamically according to the business scenario.

[0067] To avoid duplicate appearance of the same entity due to language or alias, the system performs entity identification deduplication during the candidate list formation phase and only retains the highest-scoring version.

[0068] The first candidate entity set that has been screened is returned to the subsequent components of the recall layer through an internal protocol together with its similarity score for further relationship reasoning and sorting.

[0069] The delay indicators of this embodiment are: in a concurrency scenario of thousands of levels, the average time from receiving user text to generating the first candidate entity set is kept within thirty milliseconds; accuracy guarantee: through in-domain fine-tuning and multi-language alignment, the recall phase can achieve a top-K coverage rate of more than ninety-seven percentage points on the public test set; abnormal fallback: if the semantic encoding module times out, the gateway automatically falls back to the keyword search mode to ensure that users always get available results.

[0070] This embodiment achieves efficient vectorization and high-speed similarity retrieval of user natural language queries, provides a high-quality, low-latency first candidate entity set for subsequent relationship reasoning and personalized sorting, and meets the dual requirements of the game strategy platform in terms of real-time and accuracy.

[0071] In some embodiments, relational reasoning is performed in the knowledge graph starting from the first candidate entity set to obtain a second candidate entity set that is semantically associated with the first candidate entity set, including: Load the preset inference rule set, which limits the relationship types and maximum number of hops allowed for inference; For each entity node in the first candidate entity set, perform a graph traversal with a limited number of hops along the relationship edges that conform to the inference rule set in the knowledge graph, and collect the entity nodes reached during the traversal process; The collected entity nodes are deduplicated and aggregated to form a second candidate entity set that is semantically associated with the first candidate entity set.

[0072] Specifically, the knowledge graph storage layer is built on a property graph database, with nodes covering types such as "game-level-enemy-equipment-drops-skills-elemental attributes", and relationship edges are modeled according to game semantics.

[0073] Inference Engine: Deployed as an independent microservice, responsible for loading inference rules, performing graph traversal, and outputting extended entity sets.

[0074] Rule Configuration Center: Saves hot-updatable inference rule files and supports version management and grayscale release.

[0075] In the recall phase, the platform has obtained the first set of candidate entities based on the query request. The following steps describe how to infer the second set of candidate entities semantically associated with this set of entities.

[0076] Furthermore, when the inference engine is started, it pulls the currently effective rule file from the rule configuration center. The typical format includes: The types of relationships that are allowed to participate in reasoning, such as "contains enemies", "dropped items", "restrained attributes", "unlocked skills", and the maximum number of hops that can be spread for each type of relationship (for example, both are limited to two hops).

[0077] The rule file is described in text format and converted into a memory data structure after loading for high-speed matching during the traversal phase. If the operator updates the rules, the configuration center pushes the change event, and the inference engine completes the hot replacement without restarting.

[0078] Furthermore, all entities in the first candidate entity set are written into the queue to be traversed, and a "current hop count" counter is associated with each entity, with an initial value of 0.

[0079] The inference engine adopts a breadth-first strategy: take the entity node from the head of the queue and read its current hop count d; query all outgoing edges of the node and filter whether the outgoing edge type is in the allowed list of the rule set; if it is allowed and d+1≤the maximum hop count of the corresponding relationship, add the target node to the result buffer and re-enter the queue with the hop count d+1.

[0080] During the traversal process, the "visited set" is maintained in real time to avoid loops; when the queue is empty or the number of hops for all nodes has reached their respective limits, the traversal ends.

[0081] For example, in a specific scenario example, if the first candidate entity contains the "final leader" node: The first jump is to find three rare material nodes along the "dropped items" relationship; at the same time, it reaches the fire element node along the "restraint attribute" relationship; the second jump diffusion of the "fire element" node is performed: along the reverse relationship of "restraint attribute", the special weapon node that can cause ice damage is found; because the maximum number of jumps is 2, the traversal stops here.

[0082] After the traversal is completed, the inference engine removes duplicate identifiers from all nodes reached in the buffer and filters out entities that originally existed in the first candidate entity set; The remaining nodes are the second candidate entity set, covering multi-dimensional information such as boss drops, restrained equipment, related attributes, and clearance skills.

[0083] In the above example, the second candidate entity set may include: rare materials M1, M2, M3 - for synthesizing advanced equipment; fire element nodes - revealing the leader's weaknesses; ice attribute weapon W1 - corresponding to the fire element restraint; "burst impact" skill node - automatically unlocked after clearing the level. These entities are then merged with the first candidate entity set and enter the sorting layer to provide users with a more complete strategy answer.

[0084] Performance and stability of this embodiment: Time cost: After limiting the number of hops and filtering relations, a single inference is completed within 10 milliseconds on average, and even thousands of concurrent connections will not become a retrieval bottleneck.

[0085] Memory footprint: The number of nodes and relationships visited by the inference process is strictly limited by the number of hops and can be run within a fixed memory budget.

[0086] Rules are extensible: If a subsequent game version adds a "cooperative tactics" relationship, it only needs to add a new entry to the rule set and specify the number of hops for it to take effect, without modifying the traversal logic.

[0087] Through this embodiment, the retrieval system, based on the original semantic recall results, quickly supplements the strategy information that is closely related to the user's query topic but difficult to hit directly through keywords through limited and controllable graph relationship expansion, thereby significantly improving the retrieval coverage and practical value.

[0088] In some embodiments, the target entity set is sorted by relevance to obtain a strategy result, including: For each entity node in the target entity set, calculate the semantic similarity score between the entity node and the user query vector; Obtain behavioral features related to the user profile, and calculate the corresponding user behavior feature score for each entity node in the target entity set; According to the preset weighting rules, the semantic similarity score is combined with the user behavior feature score to obtain a comprehensive relevance score; The target entity set is sorted according to the comprehensive relevance score to generate the strategy results.

[0089] Specifically, the retrieval system has obtained a fused target entity set, which includes multi-dimensional entities such as boss fighting methods, restrained weapons, dropped items, and level rewards. In order to ensure that the strategy results pushed to the user are both in line with the query semantics and in line with personal interest preferences, it is necessary to perform comprehensive relevance sorting on the set.

[0090] For each entity node in the target entity set, the retrieval service first extracts its semantic vector, which is in the same vector space as the user query vector; calculates the cosine value between the two vectors to obtain a semantic similarity score in the range of 0 to 1; for example, in one example, when a user queries "how to defeat the final boss", the boss entity and the restrained weapon entity usually obtain a semantic score higher than 0.9, while the clearance reward entity may only obtain 0.6.

[0091] Furthermore, the platform maintains a real-time portrait for each user, including recent interaction records: frequently browsed entity categories (such as "weapons" or "drops"); unlocked or collected levels and equipment; and preferred content formats (text, icons, videos).

[0092] The sorting module generates a behavioral feature score for each entity in the collection based on the portrait matching degree. For example, in one example, if the user frequently clicks on the "dropped items" type of entity, the same type of entity can get extra points in this dimension.

[0093] Furthermore, the system uses a linear weighting method to combine the two types of scores into a comprehensive relevance score: the semantic similarity weight accounts for 60%, emphasizing the direct match with the query subject; the behavioral characteristics weight accounts for 40% and is used for personalized sorting; the weight ratio is determined by online experiments and can be dynamically adjusted through the configuration center to adapt to different business indicators.

[0094] Furthermore, the target entity set is sorted from high to low according to the comprehensive score; the first N items (for example, 20 items) are taken to generate the final strategy result, and a display template is selected according to the entity type, for example: If the entity is a "weapon", the front end will first present its acquisition method and attribute panel; If the entity is a "drop", it will include the drop probability and synthesis purpose; If the entity is a "level mechanism", provide diagrams and key operation steps.

[0095] For example, in one example, different users may see different orders for the same query: novice users first see "playing steps" and "weakness analysis"; advanced players see "fast-brushing efficiency weapons" and "rare drops" earlier.

[0096] This embodiment has real-time performance: comprehensive sorting is completed in the server-side memory, with an average time of less than 5 milliseconds, ensuring smooth overall search response; explainability: two sub-scores are recorded for each final result for front-end floating prompts or log analysis to improve system transparency; dynamic learning: behavioral feature weights will be automatically fine-tuned based on recent clicks, stays, and favorites signals to achieve continuous optimization and personalized effects.

[0097] Through this embodiment, the platform can accurately and personalizedly sort the relevance of multi-source candidate entities within milliseconds, and output strategy results that are both in line with the query context and personal interests to users, greatly improving retrieval effectiveness and user satisfaction.

[0098] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0099] Figure 2 Schematic diagram of the structure of the game strategy retrieval device based on event-driven knowledge graph embedding provided by the embodiment of the present application. Figure 2 As shown, the game strategy retrieval device based on event-driven knowledge graph embedding includes: A generation module 201 is used to automatically generate a game entity and a strategy encyclopedia entry corresponding to the newly added game in the knowledge graph after receiving a trigger event indicating the newly added game; The parsing module 202 is used to obtain strategy data related to the newly added game, perform structured parsing on the strategy data, and integrate the parsed strategy data into the knowledge graph to update entities and relationships; The computing module 203 is used to perform graph embedding calculations on entities and relationships in the knowledge graph based on the updated knowledge graph, obtain vector representations between entities, and construct a searchable vector index; The retrieval module 204 is used to vectorize the user's strategy query request and perform similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector; The reasoning module 205 is used to perform relational reasoning in the knowledge graph with the first candidate entity set as the starting point, obtain a second candidate entity set that is semantically associated with the first candidate entity set, and merge it with the first candidate entity set to form a target entity set; The output module 206 is used to sort the target entity set by relevance, obtain the strategy result, and output the strategy result to the user end.

[0100] In some embodiments, Figure 2 The generation module 201 writes the trigger event into a preset event queue; the knowledge graph construction module that subscribes to the event queue performs idempotence check on the trigger event, and creates a game entity node corresponding to the newly added game in the knowledge graph; based on the game entity node, a corresponding strategy encyclopedia entry identifier is generated, and the strategy encyclopedia entry identifier is written into the game entity node as an attribute.

[0101] In some embodiments, Figure 2 The parsing module 202 converts the strategy data into field value pairs corresponding to the knowledge graph entity attributes according to the preset field entity mapping rules; performs similarity matching between the field value pairs and the existing entity nodes in the knowledge graph according to the similarity threshold: if the similarity meets the similarity threshold, the attribute information of the matched target entity node is updated; if the similarity does not meet the similarity threshold, a new entity node is created in the knowledge graph; according to the preset relationship type, an association relationship is established between the target entity node or the new entity node and the game entity node to complete the fusion update of the knowledge graph.

[0102] In some embodiments, Figure 2 The calculation module 203 uses a preset graph embedding algorithm to perform embedding calculations on the entities and relationships in the updated knowledge graph to obtain a vector representation that characterizes the semantic features of each entity; writes the entity vector and the corresponding entity identifier into a vector index library, and constructs a vector index that supports similarity retrieval based on an approximate nearest neighbor retrieval structure; when new or changed entities and relationships in the knowledge graph are detected, an incremental embedding calculation is performed on the affected part, and the vector index is updated synchronously.

[0103] In some embodiments, Figure 2The retrieval module 204 receives the strategy query request input by the user; uses the semantic encoding module to convert the strategy query request into a query vector through a pre-trained language model; calls the vector retrieval module to perform approximate nearest neighbor retrieval in the vector index based on the query vector, and calculates the similarity between the query vector and the entity vector; and screens and obtains a first candidate entity set similar to the query vector according to a preset similarity threshold or a top K high similarity rule.

[0104] In some embodiments, Figure 2 The reasoning module 205 loads a preset reasoning rule set, which limits the relationship types and maximum hops allowed for reasoning; for each entity node in the first candidate entity set, a graph traversal with a limited number of hops is performed in the knowledge graph along the relationship edges that conform to the reasoning rule set, and the entity nodes reached during the traversal are collected; the collected entity nodes are deduplicated and aggregated to form a second candidate entity set that is semantically associated with the first candidate entity set.

[0105] In some embodiments, Figure 2 The output module 206 calculates the semantic similarity score between the entity node and the user query vector for each entity node in the target entity set; obtains the behavioral features related to the user portrait, and calculates the corresponding user behavioral feature score for each entity node in the target entity set; combines the semantic similarity score with the user behavioral feature score according to a preset weighting rule to obtain a comprehensive relevance score; sorts the target entity set according to the comprehensive relevance score to generate a strategy result.

[0106] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.

[0107] Figure 3 Schematic diagram of the structure of the electronic device 3 provided in the embodiment of the present application. Figure 3 As shown, the electronic device 3 of this embodiment includes: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301. When the processor 301 executes the computer program 303, the steps in the above-mentioned various method embodiments are implemented. Alternatively, when the processor 301 executes the computer program 303, the functions of each module / unit in the above-mentioned various device embodiments are implemented.

[0108] Exemplarily, the computer program 303 may be divided into one or more modules / units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 303 in the electronic device 3.

[0109] The electronic device 3 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 3 may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3 It is only an example of the electronic device 3 and does not constitute a limitation of the electronic device 3. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.

[0110] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.

[0111] The memory 302 may be an internal storage unit of the electronic device 3, for example, a hard disk or memory of the electronic device 3. The memory 302 may also be an external storage device of the electronic device 3, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3. Further, the memory 302 may also include both an internal storage unit and an external storage device of the electronic device 3. The memory 302 is used to store computer programs and other programs and data required by the electronic device. The memory 302 may also be used to temporarily store data that has been output or is to be output.

[0112] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0113] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0114] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0115] In the embodiments provided in the present application, it should be understood that the disclosed devices / computer equipment and methods can be implemented in other ways. For example, the device / computer equipment embodiments described above are only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. Multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0116] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0117] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0118] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.

[0119] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.

Claims

1. A game strategy retrieval method based on event-driven knowledge graph embedding, characterized in that: include: After receiving a trigger event indicating a newly added game, a game entity and a strategy encyclopedia entry corresponding to the newly added game are automatically generated in the knowledge graph; Acquire strategy data related to the newly added game, perform structured analysis on the strategy data, and integrate the analyzed strategy data into the knowledge graph to update entities and relationships; Based on the updated knowledge graph, perform graph embedding calculations on the entities and relationships in the knowledge graph, obtain vector representations between entities, and construct a searchable vector index; Vectorize the user's strategy query request, and perform similarity search with the vector index to obtain a first candidate entity set similar to the query vector; Performing relational reasoning in the knowledge graph with the first candidate entity set as a starting point to obtain a second candidate entity set that is semantically associated with the first candidate entity set, and merging the second candidate entity set with the first candidate entity set to form a target entity set; The target entity set is sorted by relevance to obtain a strategy result, and the strategy result is output to a user terminal.

2. The method according to claim 1, characterized in that: After receiving a trigger event indicating a newly added game, a game entity and a strategy encyclopedia entry corresponding to the newly added game are automatically generated in the knowledge graph, including: Writing the trigger event into a preset event queue; The knowledge graph construction module subscribing to the event queue performs idempotence check on the trigger event and creates a game entity node corresponding to the newly added game in the knowledge graph; A corresponding strategy encyclopedia entry identifier is generated based on the game entity node, and the strategy encyclopedia entry identifier is written into the game entity node as an attribute.

3. The method according to claim 1, characterized in that: The structural analysis of the strategy data and integration of the analyzed strategy data into the knowledge graph to update entities and relationships includes: According to the preset field entity mapping rules, the strategy data is converted into field value pairs corresponding to the knowledge graph entity attributes; The field value pairs are matched with existing entity nodes in the knowledge graph based on the similarity threshold: If the similarity meets the similarity threshold, the attribute information of the matched target entity node is updated; if the similarity does not meet the similarity threshold, a new entity node is created in the knowledge graph; According to the preset relationship type, an association relationship is established between the target entity node or the newly created entity node and the game entity node to complete the fusion update of the knowledge graph.

4. The method according to claim 1, characterized in that: Based on the updated knowledge graph, graph embedding calculation is performed on entities and relationships in the knowledge graph to obtain vector representations between entities and construct a searchable vector index, including: Using the preset graph embedding algorithm, embed the entities and relationships in the updated knowledge graph to obtain vector representations of the semantic features of each entity. Write entity vectors and corresponding entity identifiers into the vector index library, and build a vector index that supports similarity retrieval based on the approximate nearest neighbor retrieval structure; When new or changed entities and relationships are detected in the knowledge graph, incremental embedding calculations are performed on the affected parts, and the vector index is updated synchronously.

5. The method according to claim 1, characterized in that The step of vectorizing the strategy query request of the user and performing similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector includes: Receive a strategy query request input by a user; Using a semantic encoding module, the strategy query request is converted into a query vector through a pre-trained language model; Calling a vector retrieval module to perform an approximate nearest neighbor search in the vector index based on the query vector, and calculating the similarity between the query vector and the entity vector; According to a preset similarity threshold or a top K high similarity rule, a first candidate entity set similar to the query vector is screened and obtained.

6. The method according to claim 1, characterized in that The performing of relational reasoning in the knowledge graph with the first candidate entity set as a starting point to obtain a second candidate entity set that is semantically associated with the first candidate entity set includes: Loading a preset inference rule set, wherein the inference rule set defines the relationship types and maximum hops allowed for inference; For each entity node in the first candidate entity set, perform a graph traversal with a limited number of hops along the relationship edges that conform to the inference rule set in the knowledge graph, and collect the entity nodes reached during the traversal process; The collected entity nodes are deduplicated and aggregated to form a second candidate entity set that is semantically associated with the first candidate entity set.

7. The method according to claim 1, characterized in that The step of sorting the target entity set by relevance to obtain a strategy result includes: For each entity node in the target entity set, calculating a semantic similarity score between the entity node and the user query vector; Obtaining behavioral features related to the user portrait, and calculating a corresponding user behavioral feature score for each entity node in the target entity set; According to a preset weighting rule, the semantic similarity score is combined with the user behavior feature score to obtain a comprehensive relevance score; The target entity set is sorted according to the comprehensive relevance score to generate a strategy result.

8. A game strategy retrieval device based on event-driven knowledge graph embedding, characterized in that: include: A generation module, for automatically generating a game entity and a strategy encyclopedia entry corresponding to a newly added game in the knowledge graph after receiving a trigger event indicating a newly added game; A parsing module, used to obtain strategy data related to the newly added game, perform structured parsing on the strategy data, and integrate the parsed strategy data into the knowledge graph to update entities and relationships; The computing module is used to perform graph embedding calculations on entities and relationships in the knowledge graph based on the updated knowledge graph, obtain vector representations between entities, and construct a searchable vector index; A retrieval module, used to vectorize the user's strategy query request, and perform similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector; A reasoning module, configured to perform relational reasoning in the knowledge graph with the first candidate entity set as a starting point, obtain a second candidate entity set that is semantically associated with the first candidate entity set, and merge the second candidate entity set with the first candidate entity set to form a target entity set; The output module is used to sort the target entity set by relevance, obtain a strategy result, and output the strategy result to the user end.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Specific target visual analysis method and system based on knowledge graph

    CN116049381A

  • Method for constructing knowledge graph based on large language model and vector library

    CN119129722A

  • Data retrieval method and device, computer equipment and storage medium

    CN119248945A

  • Mixing retrieval method and device based on knowledge graph and vector, equipment and storage medium

    CN119357376A

  • Knotarization intelligent question and answer customer service method and system based on knowledge graph

    CN119938816A

Cited By

  • Rainwater condition intelligent interaction service platform based on large language model

    CN120596642A

  • Game strategy generation method and device, equipment and storage medium

    CN120653789A

  • Power equipment information retrieval method and system

    CN120994704A

  • Intelligent strategy real-time recommendation method fusing knowledge graph and deep semantic matching

    CN121032246A

  • Non-planned secondary operation decision support method and system based on EMR analysis

    CN121439270A