CN120104814A - Game strategy retrieval method and device based on event-driven knowledge graph embedding - Google Patents
Game strategy retrieval method and device based on event-driven knowledge graph embedding Download PDFInfo
- Publication number
- CN120104814A CN120104814A CN202510593437.9A CN202510593437A CN120104814A CN 120104814 A CN120104814 A CN 120104814A CN 202510593437 A CN202510593437 A CN 202510593437A CN 120104814 A CN120104814 A CN 120104814A
- Authority
- CN
- China
- Prior art keywords
- entity
- knowledge graph
- attack
- vector
- game
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/38—Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
-
- A—HUMAN NECESSITIES
- A63—SPORTS; GAMES; AMUSEMENTS
- A63F—CARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
- A63F13/00—Video games, i.e. games using an electronically generated display having two or more dimensions
- A63F13/70—Game security or game management aspects
- A63F13/79—Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/31—Indexing; Data structures therefor; Storage structures
- G06F16/316—Indexing structures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/36—Creation of semantic tools, e.g. ontology or thesauri
- G06F16/367—Ontology
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/02—Knowledge representation; Symbolic representation
- G06N5/022—Knowledge engineering; Knowledge acquisition
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computational Linguistics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Artificial Intelligence (AREA)
- Multimedia (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Mathematical Physics (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computer Security & Cryptography (AREA)
- Health & Medical Sciences (AREA)
- Business, Economics & Management (AREA)
- General Health & Medical Sciences (AREA)
- General Business, Economics & Management (AREA)
- Life Sciences & Earth Sciences (AREA)
- Animal Behavior & Ethology (AREA)
- Library & Information Science (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The application provides a game attack retrieval method and device based on event-driven knowledge graph embedding. The method comprises the steps of carrying out structural analysis on attack data, updating entities and relations, carrying out graph embedding calculation on the entities and the relations in a knowledge graph to obtain vector representations among the entities, constructing a retrievable vector index, vectorizing an attack query request of a user, carrying out similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector, carrying out relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set which has semantic association with the first candidate entity set, merging the second candidate entity set with the first candidate entity set to form a target entity set, and carrying out relevance ranking on the target entity set to obtain an attack result. The application can automatically and structurally manage the attack data, and support deep semantic retrieval, thereby improving the accuracy of game attack content retrieval and having dynamic expansion capability.
Description
Technical Field
The application relates to the technical field of data processing, in particular to a game attack retrieval method and device based on event-driven knowledge graph embedding.
Background
With the rapid growth of online gaming content, player communities have created massive amounts of game play (including level clearance points, equipment collocations, hidden elements, etc.). The existing attack platform is generally characterized by being mainly stored in a forum paste, long text or video link mode and lacking a unified data model. Platforms typically perform keyword queries based on full text inverted indexes, and have limited processing power for synonyms, contexts, and cross-language content. When new games or pieces of material appear, the operation and maintenance personnel are required to manually create attack entries, classification labels and page templates, which are time-consuming and easy to miss. The existing system is difficult to identify the implicit relation between the attacks (such as the correspondence between the copy mechanism and the character angels), and the accurate ordering result according to the historical behaviors of the player is also not possible.
Therefore, the technical problems caused by the method comprise the steps that a player is difficult to quickly and accurately position the attack content related to a specific game, a level or a theme in the complex information, the platform expansion efficiency is low, a significant time lag exists between the online of a new game and the retrievable attack, the relativity and the individuation degree of a retrieval result are insufficient, and the user experience and the retention rate are influenced.
Disclosure of Invention
In view of the above, the embodiment of the application provides a game attack retrieval method and device based on event-driven knowledge graph embedding, which are used for solving the problems that in the prior art, game attack contents cannot be precisely positioned, the platform expansion capability is poor, and the retrieval result is not accurate.
The first aspect of the embodiment of the application provides a game attack retrieval method based on event-driven knowledge graph embedding, which comprises the steps of automatically generating game entities and an attack encyclopedia portal corresponding to a new game in a knowledge graph after a trigger event representing the new game is received, obtaining attack data related to the new game, carrying out structural analysis on the attack data, fusing the analyzed attack data into the knowledge graph to update entities and relations, carrying out graph embedding calculation on the entities and the relations in the knowledge graph based on the updated knowledge graph to obtain vector representations among the entities, constructing a retrievable vector index, carrying out similarity retrieval on an attack query request of a user, obtaining a first candidate entity set similar to a query vector, carrying out relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point, obtaining a second candidate entity set which has semantic association with the first candidate entity set, combining the first candidate entity set to form a target entity set, carrying out correlation sorting on the target entity set, obtaining an attack result, and outputting the attack result to a user terminal.
The second aspect of the embodiment of the application provides a game attack retrieval device based on event-driven knowledge graph embedding, which comprises a generation module, an analysis module, a calculation module, a retrieval module, a first candidate entity set, a second candidate entity set, a target entity and a target entity, wherein the generation module is used for automatically generating a game entity and an attack encyclopedic entry corresponding to a newly-added game in the knowledge graph after receiving a trigger event representing the newly-added game, the analysis module is used for acquiring attack data related to the newly-added game, carrying out structural analysis on the attack data, merging the analyzed attack data into the knowledge graph to update the entity and the relationship, the calculation module is used for carrying out graph embedding calculation on the entity and the relationship in the knowledge graph based on the updated knowledge graph to obtain vector representation among the entities and constructing a retrievable vector index, the retrieval module is used for vectorizing an attack query request of a user, carrying out similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector, the analysis module is used for carrying out relationship reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set related to the first candidate entity set, merging the first candidate entity set with the first candidate entity set to form a target candidate entity set, and carrying out target entity and a target attack entity set, and carrying out target attack ranking to obtain a target entity and a target attack result.
In a third aspect of the embodiments of the present application, there is provided an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method when executing the computer program.
In a fourth aspect of the embodiments of the present application, there is provided a computer readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above method.
The above at least one technical scheme adopted by the embodiment of the application can achieve the following beneficial effects:
The method comprises the steps of automatically generating game entities and encyclopedic entries corresponding to a new game in a knowledge graph after a trigger event representing the new game is received, obtaining the encyclopedic data related to the new game, carrying out structural analysis on the encyclopedic data, merging the analyzed encyclopedic data into the knowledge graph to update entities and relations, carrying out graph embedding calculation on the entities and relations in the knowledge graph based on the updated knowledge graph to obtain vector representations among the entities and relations, constructing a retrievable vector index, vectorizing an attack query request of a user, carrying out similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector, carrying out relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set which is semantically related with the first candidate entity set, merging the second candidate entity set with the first candidate entity set to form a target entity set, carrying out correlation sequencing on the target entity set to obtain an attack result, and outputting the attack result to a user end. The application can automatically and structurally manage the attack data, and support deep semantic retrieval, thereby improving the accuracy of game attack content retrieval and having dynamic expansion capability.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow diagram of a method for retrieving a game attack based on event-driven knowledge-graph embedding according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a game attack retrieval device based on event-driven knowledge graph embedding according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The method aims to solve the problem that a user cannot quickly and accurately find the content wanted by the user in massive game attack. The application provides a structured management and retrieval technology of game attack, which is convenient for users to quickly and accurately find out specific games, specific checkpoints and specific subject contents. The technical implementation thought of the technical scheme of the application comprises the following steps:
1. Based on the message queue technology, the encyclopedia is automatically created and associated when the game is newly added;
2. based on xlrd and xlwt, identifying an excel file uploaded by a user, and generating a corresponding entry;
3. A set of low-code platform is designed, so that a user can determine the typesetting of the encyclopedia in a dragging mode.
In addition, the application adds an intelligent retrieval mechanism based on the semantic embedding of the knowledge graph on the basis of the technical thought.
Specifically, mapping the knowledge map entity and the relationship to a low-dimensional continuous vector space by adopting a map embedding algorithm (such as TransE, graphSAGE and the like) to establish a semantic embedding model;
When a user inputs search content, the system utilizes a semantic matching algorithm (such as cosine similarity, semantic distance matching and the like) to quickly compare a query request with an embedded vector of an entity in a knowledge graph, accurately determines and returns attack information similar to the semantic of the user query content, supports graph relation reasoning, assists the user to find the attack information implicitly related to the query content, and improves search experience.
In addition, the application also introduces an intelligent accurate retrieval technology based on a semantic retrieval and recommendation algorithm. The application utilizes deep semantic matching and user portrait analysis to combine multidimensional data to realize more accurate and personalized attack retrieval service.
The system comprises a pre-training language model based attack semantic embedding and quick index retrieval technology, a user behavior data driven personalized retrieval and recommendation mechanism, and an intelligent retrieval dialogue system based on user intention recognition, which helps users to accurately lock attack content.
The following describes the technical scheme of the present application in detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a flow chart of a game attack retrieval method based on event-driven knowledge graph embedding according to an embodiment of the present application. As shown in FIG. 1, the game attack retrieval method based on event-driven knowledge graph embedding specifically comprises the following steps:
s101, after receiving a trigger event representing a newly added game, automatically generating a game entity and an encyclopedia entry corresponding to the newly added game in a knowledge graph;
s102, acquiring attack data related to the newly added game, carrying out structural analysis on the attack data, and fusing the analyzed attack data into a knowledge graph to update entities and relations;
S103, performing graph embedding calculation on the entities and the relations in the knowledge graph based on the updated knowledge graph to obtain vector representations among the entities, and constructing a retrievable vector index;
s104, vectorizing an attack query request of a user, and carrying out similarity retrieval with a vector index to obtain a first candidate entity set similar to a query vector;
s105, carrying out relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set which has 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;
S106, carrying out relevance ranking on the target entity set to obtain a tapping result, and outputting the tapping result to the user side.
In some embodiments, automatically generating a game entity and an encyclopedia portal corresponding to the added game in the knowledge-graph after receiving a trigger event representing the added game, comprising:
writing a trigger event into a preset event queue;
Performing idempotent verification on the triggering event by a knowledge graph construction module of the subscription event queue, and creating a game entity node corresponding to the newly added game in the knowledge graph;
And generating a corresponding attack encyclopedia entry identifier based on the game entity node, and writing the attack encyclopedia entry identifier into the game entity node as an attribute.
Specifically, event queues employ a distributed message queue (e.g., kafka, pulsar, or RabbitMQ) that supports At Least At-Least-Once delivery semantics and individually configure themes GameCreateTopic for newly added game events.
The knowledge graph construction module is deployed as stateless micro-service and has three capabilities of event consumption, idempotent verification and graph database writing.
Graph database-a database (e.g., neo4j or TIGERGRAPH) that can support the attribute graph model is selected for persisting the name type entity node.
Further, when the operator clicks "add game" and confirms the submission in the background management interface, the business service immediately encapsulates the event message containing fields such as game unique identifier GameID, game name, timestamp, etc.
The event message is written GameCreateTopic, and a single transaction is started in the writing process, so that the event corresponding to the same GameID is ensured to be written once at most.
The knowledge graph construction module monitors GameCreateTopic continuously. Whenever a new game event is consumed, an idempotent check is first performed in a distributed cache (e.g., redis) according to EventID:
If the cache has the same EventID, the cache is regarded as a repeated event and is directly discarded;
if the cache does not exist, recording the EventID and setting an expiration time for preventing concurrent repeated processing.
Further, through the graph database session, a 'merge' write logic is executed, namely if GameID matched Game nodes exist in the graph, only the latest creation time in the node attributes is updated, if not, game nodes are newly built, and basic attributes such as GameID, game names, creation time and the like are written.
The write operation adopts a database atomic transaction, ensures that nodes are completely created or updated, and avoids partial attribute loss.
Further, the system invokes an internal unique identification generator (which may be based on Snowflake algorithm or database self-increasing sequence) to generate WikiID.
And writing WikiID as an attribute into wikiId field of the target Game node, and synchronously registering WikiID to a document service or static content storage to reserve encyclopedia page occupation if a platform adopts multiple data sources.
Further, after the writing is successful, the knowledge graph construction module adds a WikiInitTopic message to the event queue, and only carries GameID and WikiID to prompt the subsequent encyclopedia initialization service to generate a page template.
If the writing of the graph database fails or the network is overtime, the module records the retry times and retries according to the index back-off strategy, and the alarm is pushed when the maximum retry times are exceeded.
The embodiment has low delay, and in the production environment, the average time consumption of the event writing to the creation end of the name node is controlled within 40ms, so that the real-time library building requirement is met. The idempotent verification and database transaction with high consistency ensures that the same GameID corresponds to only one Game node and WikiID, and the problem of repeated database construction under concurrency is avoided. The expandability, the event queue and the knowledge graph construction module are horizontally expandable and deployed, and can support high concurrency writing when new trips are online in a large scale.
Through the embodiment, the standardized creation of the game entity node and the unique identification binding of the attack encyclopedia entrance can be automatically completed after the newly added game is submitted, a unified and reliable entity reference is provided for subsequent attack data analysis, fusion and retrieval, and the expansion efficiency and the data consistency of the attack platform are remarkably improved.
In some embodiments, the method includes performing structural analysis on the attack data, and fusing the analyzed attack data into a knowledge graph to update entities and relationships, including:
according to a preset field entity mapping rule, converting the attack data into field value pairs corresponding to the attribute of the knowledge graph entity;
performing similarity matching on the field value pairs and existing entity nodes in the knowledge graph according to a similarity threshold value:
if the similarity does not meet the similarity threshold, a new entity node is built in the knowledge graph;
And establishing an association relation between the target entity node or the newly-built entity node and the game entity node according to the preset relation type so as to finish fusion updating of the knowledge graph.
Specifically, when the platform receives an official or community attack data file (such as a table, CSV or JSON) of a new online game, the official or community attack data file needs to be quickly incorporated into an existing knowledge graph, so that the subsequent retrieval can cover multi-dimensional information such as a checkpoint, enemy, falling objects and the like.
Firstly, a platform maintains a field entity mapping rule list in advance, defines the corresponding relation between external data fields and knowledge map entity attributes, and an analysis module automatically reads the latest mapping rule and caches the latest mapping rule in a memory before loading attack data so as to ensure mapping consistency.
Further, the analysis module scans the attack data file line by line to convert each line of content into a plurality of field value pairs, and performs unified preprocessing on text values required for entity matching, including operations of removing redundant punctuation, unified case and homonym merging and the like, so as to reduce matching errors caused by format differences.
Further, the analysis module generates standardized description for each entity to be written in, and performs similarity calculation with the existing entity of the corresponding type in the knowledge graph, wherein the similarity scoring comprehensively considers factors such as editing distance, synonym list, semantic vector included angle and the like, and compares the factors with a preset threshold value:
If the matching is higher than the threshold value, the missing attribute is updated or supplemented in the target entity node;
and when the threshold value is lower than the threshold value, the first entry is considered, the call graph database is written into the new entity node, and the creation time stamp is recorded.
Further, according to the relationship template built in the platform, the analysis module establishes a semantic relationship between the updated entity or the newly-built entity and the corresponding game entity node, such as "including a checkpoint", "associating enemy", "dropping articles", and the like.
The relation writing adopts a batch transaction mode, so that node relation atoms in the same batch are ensured to be consistent, and the condition that the relation is lost due to the fact that the nodes are written is avoided.
Further, after the batch writing is completed, the analysis module generates a change abstract which comprises the number of newly added entities, the number of updated entities and low-similarity failed entries, if the low-similarity entry proportion exceeds a preset threshold value, the system automatically triggers a manual review process, pauses the subsequent writing of the batch, prevents the noise data from being wrongly written, and sets a version identifier for the written entities so as to realize tracing and rollback in future updating of the contents.
The key technical points and technical advantages of the method comprise the steps of carrying out field entity mapping rule hot loading, supporting mapping adjustment at any time without shutdown deployment, comprehensively judging multi-index similarity, effectively improving matching accuracy, reducing error merging rate, writing batch transactions, guaranteeing consistency of nodes and relations, avoiding data island, changing abstract and threshold alarming, providing automatic wind control and manual bottom for map quality, and versioning entities, and facilitating differential rollback and time sequence analysis.
By the embodiment, the platform can complete the structural analysis and map fusion of the attack data at the minute level, automatically maintain the multi-layer entities such as the attack, the game, the level and the like and the relation thereof, and provide accurate and real-time updated data support for the follow-up map embedding, the semantic retrieval and the personalized recommendation.
In some embodiments, based on the updated knowledge-graph, performing graph-embedding computation on entities and relationships in the knowledge-graph to obtain vector representations among the entities, and constructing a retrievable vector index, including:
Embedding and calculating the entities and the relations in the updated knowledge graph by using a preset graph embedding algorithm to obtain vector representations representing semantic features of the entities;
writing the entity vector and the corresponding entity identifier into a vector index library, and constructing a vector index supporting similarity retrieval based on an approximate nearest neighbor retrieval structure;
When detecting the entity and relation of the new or changed knowledge graph, executing increment embedding calculation to the affected part and synchronously updating the vector index.
Specifically, in this embodiment, after the platform completes the attack data fusion, the obtained latest knowledge graph is periodically transferred to the graph embedding computing service. The service operates on independent computing clusters, performs low-dimensional vectorization representation on entities and relationships in the knowledge graph by using a pre-selected graph embedding algorithm, and generates vector indexes for efficient similarity retrieval.
The platform automatically starts full-quantity embedded training tasks in the early morning business low-peak period every day through the workflow scheduler. The task first pulls a snapshot of the graph database, ensuring consistency of the training data.
The platform selects a graph embedding algorithm based on translation distance as a default solution for adaptability and interpretability considerations of large-scale relational data. Under the ideal training round number, the effective capturing of the entity multiple semantic relations can be realized. Super parameters such as embedded dimension, learning rate and the like are determined by cross experiments before being on line and are solidified into configuration files so as to be continuously multiplexed.
At the end of the training process, the service will generate a set of vector coordinates of fixed dimensions for each entity in the atlas. The vector file is synchronously pushed to the storage cluster together with the entity identification for direct reading by the index construction flow.
In some examples, to compromise query accuracy and response speed, the platform employs an approximate nearest neighbor index of the hierarchical structure. The multi-layer jump mechanism of the structure can quickly lock similar entities in a vector space, and ensures that the retrieval time delay is in a millisecond level.
The index construction task pairs the entity vector output by the graph embedding service with the entity identifiers one by one and writes the entity vectors and the entity identifiers into the index nodes. After the writing is completed, the index node provides a query interface for the inside immediately for the retrieval module to call.
In order to prevent index read-write collision in the retrieval stage, the index construction task uses a double-copy strategy, namely one copy is responsible for external service and the other copy is updated in an increment mode. After the updating is completed, seamless replacement is realized through a name switching mode.
Further, the platform presets event channels in the knowledge graph composition write link. After any new or modified entity is triggered, a change event is generated, including the unique identifier of the changing entity.
The graph embedding computing service monitors the change event queue and aggregates in a small batch manner. And extracting the corresponding subgraph to perform incremental training after accumulating the number of the preset entries or the overtime threshold value, and outputting the vector of the affected entity only.
After the increment vector is generated, the index node loads the latest vector of the corresponding entity, performs overlay update on the original entry, and immediately refreshes the memory index structure after the writing is finished, thereby ensuring the instantaneity of the retrieval result.
According to the embodiment, training efficiency can be improved, full graph embedding training can be completed within one hour under the current hardware configuration, search time delay is reduced, average response time of single vector similarity query is not more than five milliseconds, updating timeliness is improved, a newly added entity can obtain a retrievable vector representation within five minutes after a map is written, a fault recovery function is provided, if a training task is abnormally terminated, next scheduling can be automatically restarted from the latest snapshot, and an index copy switching mechanism ensures that search service is not affected.
Through the embodiment, the platform can continuously maintain semantic vectors for each entity in the knowledge graph, and realize high-throughput low-delay similarity retrieval by using the approximate nearest neighbor index, so that a solid data basis is provided for subsequent semantic recall, relationship reasoning and result sequencing.
In some embodiments, vectorizing a user's purported query request and performing similarity retrieval with a vector index to obtain a first set of candidate entities similar to the query vector, comprising:
receiving an attack inquiry request input by a user;
converting the attack query request into a query vector by using a semantic coding module through a pre-training language model;
Invoking a vector retrieval module, performing approximate nearest neighbor retrieval in a vector index based on the query vector, and calculating the similarity between the query vector and the entity vector;
And screening to obtain a first candidate entity set similar to the query vector according to a preset similarity threshold or a first K high similarity rule.
Specifically, when the end user inputs text in the search box (e.g. "clearance third chapter typing") and clicks the search button, the front end immediately packages the text as a query request along with the user identification, language information, and current timestamp, and sends it to the back end semantic search gateway. The gateway executes preprocessing operations of unifying character sets and removing redundant blank symbols and illegal characters after receiving the request so as to ensure that the coding module can stably analyze the sentence.
The semantic coding module loads a pre-trained language model subjected to intra-domain fine tuning, and the model performs additional training on the vocabulary in the game field, so that proper nouns and verb phrases in the attack context can be more accurately captured.
In some examples, the vectorization process includes the following:
firstly, the coding module sequences the preprocessed text into a model input format, and performs forward reasoning once;
Then, sentence vectors output by the model are subjected to mean value pooling and unitization treatment to finally form a fixed-length and high-dimensional query vector;
The query vector is then subsequently appended with the unique request ID and pushed to the vector retrieval module in the millisecond level.
Further, for non-Chinese queries, the system uses unified multilingual model branching. When the vector space is constructed, the semantic similar content of different languages is ensured to be projected to a similar area, so that cross-language retrieval is realized.
In some examples, the vector index of the platform is implemented using a hierarchical graph structure, with nodes stored in main memory and providing access in a read-only manner to meet TPS (transactions per second) requirements.
The search module receives the inquiry vector, accesses the entry layer of the graph according to the index parameter and searches the graph to the lower layer by layer, in the graph traversal process, the system continuously compares the distance value between the current node and the inquiry vector and maintains a minimum stack of candidate entities, and once the search reaches the preset depth or the upper limit of the number of access nodes, the traversal is stopped and the candidate list is returned.
Cosine similarity is used as a metric. To increase efficiency, the module normalizes vectors so that it may be converted to a vector dot product operation in hardware.
In some examples, the retrieval module may filter the returned results according to two types of rules:
if the platform is configured with a fixed threshold, only the entities with the similarity higher than the threshold are reserved;
If the threshold is not set, K entities with top similarity ranking are returned, and the K value is dynamically adjustable according to the service scene.
To avoid the repeated appearance of the same entity due to language or alias, the system executes entity identification deduplication once in the candidate list forming stage, and only the highest score version is reserved.
The first candidate entity set after screening is returned to the subsequent recall layer component together with the similarity score thereof through an internal protocol for further relationship reasoning and sequencing.
The delay index of the embodiment is that in a thousand-level concurrency scene, the average time consumption is kept within thirty milliseconds from receiving user text to the first candidate entity set output, the precision is guaranteed, the top-K coverage rate of over ninety-seven percentage points can be achieved on a public test set through intra-domain fine adjustment and multilingual alignment in a recall stage, and abnormal rollback is that if a semantic coding module overtime, a gateway automatically returns to a keyword retrieval mode, and the user is ensured to always obtain a usable result.
The embodiment realizes efficient vectorization and high-speed similarity retrieval of the user natural language query, provides a first candidate entity set with high quality and low delay for subsequent relation reasoning and personalized sequencing, and meets the dual requirements of a game attack platform on the aspects of instantaneity and accuracy.
In some embodiments, performing relationship inference in the knowledge graph with the first candidate entity set as a starting point to obtain a second candidate entity set having semantic association with the first candidate entity set, including:
loading a preset reasoning rule set, wherein the reasoning rule set limits the relation type and the maximum hop count allowed to be used for reasoning;
aiming at each entity node in the first candidate entity set, performing graph traversal defining the hop count along the relation edge conforming to the reasoning rule set in the knowledge graph, and collecting the entity nodes reached in the traversal process;
And performing deduplication summarization on the collected entity nodes to form a second candidate entity set which has semantic association with the first candidate entity set.
The knowledge graph storage layer is constructed by an attribute graph database, and nodes cover types such as games, checkpoints, enemy, equipment, falling objects, skills, element attributes and the like, and the relationship is modeled according to game semantics.
The reasoning engine is deployed as an independent micro-service and is responsible for loading reasoning rules, performing graph traversal and producing an extended entity set.
And the rule configuration center is used for storing a hot updatable reasoning rule file and supporting version management and gray level release.
In the recall phase, the platform has obtained a first set of candidate entities based on the query request. The following steps describe how to derive a second set of candidate entities semantically associated with reasoning from the batch of entities.
Further, when the inference engine is started, a rule file which is currently effective is pulled from the rule configuration center, and a typical format comprises:
The types of relationships that allow participation in reasoning, such as "include enemy", "drop item", "check attribute", "unlock skill", maximum diffusible hop count for each type of relationship (e.g., both are limited to two hops).
And if an operator updates the rule, the configuration center pushes a change event, and the inference engine completes hot replacement under the condition of not restarting.
Further, all entities in the first candidate entity set are written into a queue to be traversed, and each entity is associated with a current hop count counter, and the initial value is 0.
The reasoning engine adopts breadth-first strategy, namely taking out the entity node from the queue head and reading the current hop count d of the entity node, inquiring all outgoing edges of the node, screening out whether the edge types are in a rule set permission list, and if the allowed maximum hop count of the corresponding relation of d+1 is less than or equal to the maximum hop count of the corresponding relation, adding the target node into a result buffer area and carrying the hop count d+1 to re-enqueue.
The 'accessed set' is maintained in real time during the traversal process to avoid loops, and the traversal is ended when the queue is empty or the hop count of all nodes has reached respective limit.
For example, in one specific scenario example, if the first candidate entity contains a "final captain" node:
The first jump finds three rare material nodes along the relation of falling articles, reaches fire element nodes along the relation of restraining attributes, carries out second jump diffusion on the fire element nodes, finds special weapon nodes which can be attached with ice injury along the reverse relation of restraining attributes, and stops traversing at the position because the maximum jump number is 2.
After the traversal is finished, the inference engine removes the repeated identification from all the reached nodes in the buffer zone, and filters out the entities originally existing in the first candidate entity set;
The remaining nodes are the second candidate entity set, and multi-dimensional information such as captain dropping, restraint equipment, associated attributes, customs skills and the like is covered.
In the above example, the second set of candidate entities may include rare materials M1, M2, M3 for synthesizing advanced equipment, fire element nodes revealing captivation weaknesses, ice property weapons W1 corresponding to fire element restrictions, and "burst impact" skill nodes that are automatically unlocked after clearance checkpoints. These entities are then merged with the first set of candidate entities, entering the ranking layer, providing a more complete answer to the user.
Performance and stability description of this example:
The time cost is that after the limited hop count and the relation are filtered, single reasoning is completed within 10 milliseconds on average, and even thousands of concurrent steps do not become retrieval bottlenecks.
Memory occupation, in which the access nodes and the number of relations in the reasoning process are strictly limited by the number of hops, and the reasoning process can run in a fixed memory budget.
The rule can be expanded, if the 'collaborative tactics' relation is newly added in the follow-up game version, the rule can be effective only by adding new items in the rule set and designating the hop count, and the traversal logic is not required to be modified.
According to the embodiment, the retrieval system rapidly complements the attack information which is closely related to the user query subject and is difficult to hit directly through the keywords by means of limited and controllable graph relation expansion on the basis of the original semantic recall result, and the retrieval coverage and the practical value are remarkably improved.
In some embodiments, relevance ranking the set of target entities to obtain a solution includes:
Calculating semantic similarity scores of the entity nodes and the user query vector for each entity node in the target entity set;
acquiring behavior characteristics related to the user portraits, and calculating corresponding user behavior characteristic scores aiming at each entity node in the target entity set;
combining the semantic similarity score with the user behavior feature score according to a preset weighting rule to obtain a comprehensive relevance score;
and sequencing the target entity set according to the comprehensive relevance score to generate a tapping result.
Specifically, the retrieval system has obtained a fused set of target entities that includes multi-dimensional entities such as captain's method, weapons of action, dropped items, and gate rewards. In order to ensure that the final results of the aggression pushed to the user both fit the query semantics and personal interest preferences, a comprehensive relevance ranking needs to be performed on the collection.
For each entity node in the target entity set, the search 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 of 0-1 interval, e.g., when the user queries "final captain method", captain entity and check weapon entity typically obtain semantic scores higher than 0.9, while customs rewarding entity may only obtain 0.6 in one example.
Further, the platform maintains a real-time representation for each user containing recent interaction records of commonly browsed entity categories (e.g. "weapons" or "drops"), unlocked or stowed checkpoints and equipment, preferred content formats (text, graphics, video).
The ranking module generates a behavior feature score according to the portrait matching degree for each entity in the set. For example, in one example, if a user frequently clicks on a "drop item" class entity, the class entity may obtain a score in that dimension.
Further, the system synthesizes the two types of scores into a comprehensive relevance score by adopting a linear weighting mode, wherein the semantic similarity weight accounts for 60%, the direct coincidence with the query subject is emphasized, the behavior characteristic weight accounts for 40%, the weight proportion is determined by on-line experiments, and the weight proportion can be dynamically adjusted by a configuration center to adapt to different service indexes.
Further, the target entity set is arranged from high to low according to the comprehensive score, the first N (20 for example) are taken to generate a final attack result, and a presentation template is selected according to the entity type, for example:
if the entity is a weapon, the front end presents the acquisition method and the attribute panel thereof preferentially;
If the entity is a falling object, the falling probability and the synthesis purpose are attached;
if the entity is a "checkpoint mechanism", the illustration and key operation steps are provided.
For example, in one example, for the same query, different users may see a different order, a novice user first seeing "law step" versus "vulnerability analysis", and an advanced player earlier seeing "quick brushing efficiency weapon" and "rare drop".
The method and the device have instantaneity, the comprehensive sorting is completed in the memory of the server, the average time is less than 5 milliseconds, the overall search response is smooth, the interpretability is realized, two sub-scores are recorded for each final result and used for front-end suspension prompt or log analysis, the transparency of the system is improved, and dynamic learning is realized, wherein the behavior characteristic weight can be automatically fine-tuned according to recent click, stay and collection signals, so that the personalized effect of continuous optimization is realized.
Through the embodiment, the platform can accurately and individually sort the relativity of the multi-source candidate entities in millisecond level, and output the attack results which are fit with the query context and the personal interests to the user, thereby greatly improving the retrieval effectiveness and the user satisfaction.
The following are examples of the apparatus of the present application that may be used to perform the method embodiments of the present application. For details not disclosed in the embodiments of the apparatus of the present application, please refer to the embodiments of the method of the present application.
Fig. 2 is a schematic structural diagram of a game attack retrieval device based on event-driven knowledge graph embedding according to an embodiment of the present application. As shown in fig. 2, the game attack retrieval device based on event-driven knowledge graph embedding comprises:
the generating module 201 is configured to automatically generate a game entity and an encyclopedia entry corresponding to the newly added game in the knowledge graph after receiving a trigger event representing the newly added game;
the analysis module 202 is configured to obtain attack data related to the newly added game, perform structural analysis on the attack data, and fuse the analyzed attack data into a knowledge graph to update entities and relationships;
the computing module 203 is configured to perform graph embedding computation on entities and relationships in the knowledge graph based on the updated knowledge graph, obtain vector representations among the entities, and construct a retrievable vector index;
the retrieval module 204 is configured to vectorize an attack query request of a user, and perform similarity retrieval with a vector index to obtain a first candidate entity set similar to a query vector;
The reasoning module 205 is configured to perform relationship reasoning in the knowledge graph with the first candidate entity set as a starting point, obtain a second candidate entity set that has semantic association with the first candidate entity set, and combine the second candidate entity set with the first candidate entity set to form a target entity set;
And the output module 206 is used for performing relevance ranking on the target entity set to obtain a tapping result, and outputting the tapping result to the user side.
In some embodiments, the generating module 201 of fig. 2 writes the trigger event into a preset event queue, the knowledge graph construction module of the subscription event queue performs idempotent verification on the trigger event and creates a game entity node corresponding to the newly added game in the knowledge graph, generates a corresponding attack encyclopedia entry identifier based on the game entity node, and writes the attack encyclopedia entry identifier as an attribute into the game entity node.
In some embodiments, the parsing module 202 of fig. 2 converts the attack data into a field value pair corresponding to the entity attribute of the knowledge graph according to a preset field entity mapping rule, performs similarity matching on the field value pair and the existing entity node in the knowledge graph according to a similarity threshold, updates attribute information of the matched target entity node if the similarity meets the similarity threshold, newly builds an entity node in the knowledge graph if the similarity does not meet the similarity threshold, and establishes an association relationship between the target entity node or the newly built entity node and the game entity node according to a preset relationship type to complete fusion updating of the knowledge graph.
In some embodiments, the calculation module 203 of fig. 2 performs an embedding calculation on the entities and the relationships in the updated knowledge graph by using a preset graph embedding algorithm to obtain a vector representation representing semantic features of each entity, writes the entity vector and the corresponding entity identifier into a vector index library, constructs a vector index supporting similarity retrieval based on an approximate nearest neighbor retrieval structure, and performs an incremental embedding calculation on the affected part and synchronously updates the vector index when detecting the entities and the relationships of the new or changed knowledge graph.
In some embodiments, the retrieval module 204 of FIG. 2 receives a user-entered challenge query request, converts the challenge query request to a query vector via a pre-trained language model using a semantic encoding module, invokes a vector retrieval module to perform an approximate nearest neighbor retrieval in a vector index based on the query vector, calculates a similarity between the query vector and an entity vector, and screens for a first set of candidate entities similar to the query vector according to a pre-set similarity threshold or a pre-K high similarity rule.
In some embodiments, the inference module 205 of fig. 2 loads a preset inference rule set defining a relationship type and a maximum hop count allowed for inference, traverses a graph defining the hop count along a relationship edge conforming to the inference rule set in a knowledge graph for each entity node in a first candidate entity set, collects entity nodes reached in the traversal process, and performs deduplication summarization on the collected entity nodes to form a second candidate entity set having semantic association with the first candidate entity set.
In some embodiments, the output module 206 of fig. 2 calculates, for each entity node in the target entity set, a semantic similarity score for the entity node and the user query vector, obtains a behavioral feature associated with the user image, and calculates, for each entity node in the target entity set, a corresponding user behavioral feature score, combines the semantic similarity score and the user behavioral feature score according to a preset weighting rule to obtain a comprehensive relevance score, and ranks the target entity set according to the comprehensive relevance score to generate an attack result.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
Fig. 3 is a schematic structural diagram of an electronic device 3 according to an embodiment of the present application. As shown in fig. 3, the electronic device 3 of this embodiment comprises a processor 301, a memory 302 and a computer program 303 stored in the memory 302 and executable on the processor 301. The steps of the various method embodiments described above are implemented when the processor 301 executes the computer program 303. Or the processor 301 when executing the computer program 303 performs the functions of the modules/units in the above-described device embodiments.
Illustratively, the computer program 303 may be partitioned into one or more modules/units, which are stored in the memory 302 and executed by the processor 301 to complete the present application. One or more of the modules/units may be a series of computer program instruction segments capable of performing a specific function for describing the execution of the computer program 303 in the electronic device 3.
The electronic device 3 may be an electronic device such as a desktop computer, a notebook computer, a palm computer, or a cloud server. The electronic device 3 may include, but is not limited to, a processor 301 and a memory 302. It will be appreciated by those skilled in the art that fig. 3 is merely an example of the electronic device 3 and does not constitute a limitation of the electronic device 3, and may include more or fewer components than shown, or may combine certain components, or different components, e.g., the electronic device may also include an input-output device, a network access device, a bus, etc.
The Processor 301 may be a central processing unit (Central Processing Unit, CPU) or other general purpose Processor, digital signal Processor (DIGITAL SIGNAL Processor, DSP), application SPECIFIC INTEGRATED Circuit (ASIC), field-Programmable gate array (Field-Programmable GATE ARRAY, FPGA) or other Programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 302 may be an internal storage unit of the electronic device 3, for example, a hard disk or a 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 provided on the electronic device 3, a smart memory card (SMART MEDIA CARD, SMC), a Secure Digital (SD) card, a flash memory card (FLASH CARD), or the like. 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.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided by the present application, it should be understood that the disclosed apparatus/computer device and method may be implemented in other manners. For example, the apparatus/computer device embodiments described above are merely illustrative, e.g., the division of modules or elements is merely a logical functional division, and there may be additional divisions of actual implementations, multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of 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.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, and the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. The computer program may comprise computer program code, which may be in source code form, object code form, executable file or in some intermediate form, etc. The computer readable medium can include any entity or device capable of carrying computer program code, recording medium, USB flash disk, removable hard disk, magnetic disk, optical disk, computer Memory, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), electrical carrier signals, telecommunications signals, and software distribution media, among others.
The foregoing embodiments are merely for illustrating the technical solution of the present application, but not for limiting the same, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that the technical solution described in the foregoing embodiments may be modified or substituted for some of the technical features thereof, and that these modifications or substitutions should not depart from the spirit and scope of the technical solution of the embodiments of the present application and should be included in the protection scope of the present application.
Claims (10)
1. A game attack retrieval method based on event-driven knowledge graph embedding is characterized by comprising the following steps:
After receiving a trigger event representing the newly added game, automatically generating a game entity and an encyclopedia entry corresponding to the newly added game in the knowledge graph;
acquiring the attack data related to the newly added game, carrying out structural analysis on the attack data, and fusing the analyzed attack data into the knowledge graph to update the entity and the relation;
Based on the updated knowledge graph, performing graph embedding calculation on the entities and the relations in the knowledge graph to obtain vector representations among the entities, and constructing a retrievable vector index;
vectorizing an attack query request of a user, and carrying out similarity retrieval with the vector index to obtain a first candidate entity set similar to a query vector;
Performing relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set which has 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 carrying out relevance ranking on the target entity set to obtain a tapping result, and outputting the tapping result to a user side.
2. The method of claim 1, wherein automatically generating a game entity and an encyclopedia entry corresponding to the new game in the knowledge-graph after receiving the trigger event indicative of the new game comprises:
writing the triggering event into a preset event queue;
performing idempotent verification on the triggering event by a knowledge graph construction module subscribed to the event queue, and creating a game entity node corresponding to the newly added game in the knowledge graph;
And generating a corresponding attack encyclopedia entry identifier based on the game entity node, and writing the attack encyclopedia entry identifier into the game entity node as an attribute.
3. The method of claim 1, wherein the structurally parsing the attack data and fusing the parsed attack data into the knowledge-graph to update entities and relationships comprises:
Converting the attack data into field value pairs corresponding to the attributes of the knowledge graph entity according to a preset field entity mapping rule;
and carrying out similarity matching on the field value pairs and existing entity nodes in the knowledge graph according to a similarity threshold value:
If the similarity meets the similarity threshold, updating the attribute information of the matched target entity node; if the similarity does not meet the similarity threshold, building entity nodes in the knowledge graph;
and establishing an association relation between the target entity node or the newly-built entity node and the game entity node according to a preset relation type so as to finish fusion updating of the knowledge graph.
4. The method of claim 1, wherein performing graph embedding calculations on entities and relationships in the knowledge-graph based on the updated knowledge-graph to obtain vector representations among the entities and constructing a retrievable vector index comprises:
Embedding and calculating the entities and the relations in the updated knowledge graph by using a preset graph embedding algorithm to obtain vector representations representing semantic features of the entities;
writing the entity vector and the corresponding entity identifier into a vector index library, and constructing a vector index supporting similarity retrieval based on an approximate nearest neighbor retrieval structure;
And when detecting the entity and the relation of the new or changed knowledge graph, executing incremental embedding calculation on the affected part, and synchronously updating the vector index.
5. The method of claim 1, wherein vectorizing the user's offensive query request and performing similarity retrieval with the vector index to obtain a first set of candidate entities that are similar to the query vector, comprises:
receiving an attack inquiry request input by a user;
Converting the attack query request into a query vector through a pre-training language model by utilizing a semantic coding module;
Invoking a vector retrieval module, executing approximate nearest neighbor retrieval in the vector index based on the query vector, and calculating the similarity between the query vector and the entity vector;
and screening to obtain a first candidate entity set similar to the query vector according to a preset similarity threshold or a first K high similarity rule.
6. The method of claim 1, wherein performing relationship inference in the knowledge-graph using the first candidate entity set as a starting point to obtain a second candidate entity set having semantic association with the first candidate entity set, includes:
loading a preset reasoning rule set, wherein the reasoning rule set defines the relation type and the maximum hop count allowed to be used for reasoning;
For each entity node in the first candidate entity set, performing graph traversal defining hop count along a relation edge conforming to the reasoning rule set in a knowledge graph, and collecting entity nodes reached in the traversal process;
And performing deduplication summarization on the collected entity nodes to form a second candidate entity set which has semantic association with the first candidate entity set.
7. The method of claim 1, wherein said relevance ranking the set of target entities to obtain a solution comprises:
Calculating a semantic similarity score of the entity node and a user query vector for each entity node in the target entity set;
Acquiring behavior characteristics related to the user portraits, and calculating corresponding user behavior characteristic scores for each entity node in the target entity set;
combining the semantic similarity score with the user behavior feature score according to a preset weighting rule to obtain a comprehensive relevance score;
And sequencing the target entity set according to the comprehensive relevance score to generate an attack result.
8. A game attack retrieval device based on event-driven knowledge graph embedding, comprising:
The generation module is used for automatically generating a game entity and an encyclopedia entry corresponding to the newly added game in the knowledge graph after receiving a trigger event representing the newly added game;
The analysis module is used for acquiring the attack data related to the newly added game, carrying out structural analysis on the attack data, and fusing the analyzed attack data into the knowledge graph so as to update the entity and the relation;
The computing module is used for performing graph embedding computation on the entities and the relations in the knowledge graph based on the updated knowledge graph to obtain vector representations among the entities and constructing a retrievable vector index;
The retrieval module is used for vectorizing an attack query request of a user, and carrying out similarity retrieval with the vector index to obtain a first candidate entity set similar to the query vector;
The reasoning module is used for carrying out relation reasoning in the knowledge graph by taking the first candidate entity set as a starting point to obtain a second candidate entity set which has 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 the output module is used for carrying out relevance sorting on the target entity set to obtain a tapping result, and outputting the tapping result to a user side.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any one of claims 1 to 7 when the computer program is executed.
10. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202510593437.9A CN120104814B (en) | 2025-05-09 | 2025-05-09 | Game strategy retrieval method and device based on event-driven knowledge graph embedding |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202510593437.9A CN120104814B (en) | 2025-05-09 | 2025-05-09 | Game strategy retrieval method and device based on event-driven knowledge graph embedding |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN120104814A true CN120104814A (en) | 2025-06-06 |
| CN120104814B CN120104814B (en) | 2025-10-28 |
Family
ID=95890150
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202510593437.9A Active CN120104814B (en) | 2025-05-09 | 2025-05-09 | Game strategy retrieval method and device based on event-driven knowledge graph embedding |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN120104814B (en) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120596642A (en) * | 2025-08-07 | 2025-09-05 | 北京艾力泰尔信息技术股份有限公司 | An intelligent interactive service platform for rainfall conditions based on a large language model |
| CN120653789A (en) * | 2025-07-18 | 2025-09-16 | 广州三七极耀网络科技有限公司 | Game attack generation method, device, equipment and storage medium |
Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210079203A (en) * | 2019-12-19 | 2021-06-29 | 한국전자통신연구원 | System for multi-layered knowledge base and processing method thereof |
| CN116049381A (en) * | 2022-12-23 | 2023-05-02 | 中国科学院计算技术研究所 | A specific target visual analysis method and system based on knowledge graph |
| CN119129722A (en) * | 2024-08-27 | 2024-12-13 | 北京长河数智科技有限责任公司 | A method for constructing knowledge graph based on large language model and vector library |
| CN119248945A (en) * | 2024-09-27 | 2025-01-03 | 平安科技(深圳)有限公司 | Data retrieval method, device, computer equipment and storage medium |
| CN119357376A (en) * | 2024-12-23 | 2025-01-24 | 厦门渊亭信息科技有限公司 | Hybrid retrieval method, device, equipment and storage medium based on knowledge graph and vector |
| US12282504B1 (en) * | 2024-04-30 | 2025-04-22 | Harman Connected Services, Inc. | Systems and methods for graph-based dynamic information retrieval and synthesis |
| CN119938816A (en) * | 2024-12-02 | 2025-05-06 | 苏州联证智能科技有限公司 | Notarization intelligent question-answering customer service method and system based on knowledge graph |
-
2025
- 2025-05-09 CN CN202510593437.9A patent/CN120104814B/en active Active
Patent Citations (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR20210079203A (en) * | 2019-12-19 | 2021-06-29 | 한국전자통신연구원 | System for multi-layered knowledge base and processing method thereof |
| CN116049381A (en) * | 2022-12-23 | 2023-05-02 | 中国科学院计算技术研究所 | A specific target visual analysis method and system based on knowledge graph |
| US12282504B1 (en) * | 2024-04-30 | 2025-04-22 | Harman Connected Services, Inc. | Systems and methods for graph-based dynamic information retrieval and synthesis |
| CN119129722A (en) * | 2024-08-27 | 2024-12-13 | 北京长河数智科技有限责任公司 | A method for constructing knowledge graph based on large language model and vector library |
| CN119248945A (en) * | 2024-09-27 | 2025-01-03 | 平安科技(深圳)有限公司 | Data retrieval method, device, computer equipment and storage medium |
| CN119938816A (en) * | 2024-12-02 | 2025-05-06 | 苏州联证智能科技有限公司 | Notarization intelligent question-answering customer service method and system based on knowledge graph |
| CN119357376A (en) * | 2024-12-23 | 2025-01-24 | 厦门渊亭信息科技有限公司 | Hybrid retrieval method, device, equipment and storage medium based on knowledge graph and vector |
Non-Patent Citations (1)
| Title |
|---|
| 张祥;王紫悦;杨清清;丁金如;: "基于知识图谱的实体标签可视化", 指挥信息系统与技术, no. 03, 28 June 2020 (2020-06-28) * |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN120653789A (en) * | 2025-07-18 | 2025-09-16 | 广州三七极耀网络科技有限公司 | Game attack generation method, device, equipment and storage medium |
| CN120596642A (en) * | 2025-08-07 | 2025-09-05 | 北京艾力泰尔信息技术股份有限公司 | An intelligent interactive service platform for rainfall conditions based on a large language model |
Also Published As
| Publication number | Publication date |
|---|---|
| CN120104814B (en) | 2025-10-28 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11573996B2 (en) | System and method for hierarchically organizing documents based on document portions | |
| US11720749B2 (en) | Constructing conclusive answers for autonomous agents | |
| CN120104814B (en) | Game strategy retrieval method and device based on event-driven knowledge graph embedding | |
| Ceri et al. | Web information retrieval | |
| Ahmed et al. | Unified analysis of streaming news | |
| US6389412B1 (en) | Method and system for constructing integrated metadata | |
| US8630972B2 (en) | Providing context for web articles | |
| JP6538277B2 (en) | Identify query patterns and related aggregate statistics among search queries | |
| US20110055192A1 (en) | Full text query and search systems and method of use | |
| US20060095852A1 (en) | Information storage and retrieval | |
| US20050021545A1 (en) | Very-large-scale automatic categorizer for Web content | |
| US20040107221A1 (en) | Information storage and retrieval | |
| US20110078205A1 (en) | Method and system for finding appropriate semantic web ontology terms from words | |
| CN111090731A (en) | Electric power public opinion abstract extraction optimization method and system based on topic clustering | |
| US20150006528A1 (en) | Hierarchical data structure of documents | |
| CN107967290A (en) | A kind of knowledge mapping network establishing method and system, medium based on magnanimity scientific research data | |
| JP2009211697A (en) | Information distribution system and information distribution method | |
| US7464074B2 (en) | Method and system for using query information to enhance catergorization and navigation within the whole knowledge base | |
| CN113821612B (en) | Information search method and device | |
| US20080228750A1 (en) | "Query-log match" relevance features | |
| CN114357159B (en) | Event clustering/context construction method and related devices, equipment and storage medium | |
| CN119202213B (en) | Multi-level domain knowledge question-answering method and device based on large model | |
| CN116414968B (en) | Information searching method, device, equipment, medium and product | |
| US20220156285A1 (en) | Data Tagging And Synchronisation System | |
| Zhang et al. | Informing the curious negotiator: Automatic news extraction from the internet |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |