Information query method and device
By constructing a pre-defined relationship graph and utilizing information acquisition and transmission indicators, the system can dynamically search for specified objects, thus solving the problem of low information query efficiency and achieving efficient and accurate information query and dynamic user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHUHAI KINGSOFT ONLINE GAME TECH CO LTD
- Filing Date
- 2022-11-11
- Publication Date
- 2026-06-16
AI Technical Summary
Existing technologies suffer from low information retrieval efficiency and static query results, leading to a poor user experience.
By constructing a pre-defined relationship graph and utilizing information acquisition indicators, information transmission indicators, and channel indicators, the system dynamically searches for specified objects that have channel associations with the queried object and determines the query results.
It improved the efficiency and accuracy of information retrieval, enabled dynamic information communication, and enhanced the user experience.
Smart Images

Figure CN115658872B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to an information retrieval method. This application also relates to an information retrieval device, a computing device, and a computer-readable storage medium. Background Technology
[0002] With the development of internet technology, information retrieval is increasingly reliant on the internet. Information retrieval is a key technology in many areas of online projects, such as role pathfinding and role interaction, and the research and application of related information retrieval methods has long been a research hotspot.
[0003] In existing technologies, a fixed role is usually set up. This fixed role knows the query results corresponding to the relevant query information. The user asks other roles in turn until he finds the fixed role to exchange information.
[0004] However, the above method, which involves asking other characters one by one until a fixed character is found for information exchange, takes a lot of time. Furthermore, setting a fixed character can only provide users with a relatively static storyline, resulting in low efficiency in information retrieval. Summary of the Invention
[0005] In view of this, embodiments of this application provide an information query method to address the technical deficiencies in the prior art. Embodiments of this application also provide an information query device, a computing device, and a computer-readable storage medium.
[0006] According to a first aspect of the embodiments of this application, an information query method is provided, including:
[0007] Obtain an information query request, wherein the information query request includes the query object;
[0008] In the preset relationship graph, at least one specified object that has a channel association with the queried object is found. The preset relationship graph is constructed based on multiple objects and the association between multiple objects. The preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects.
[0009] The query result corresponding to the query request is determined based on the information transmission index, information acquisition index, and channel index of at least one specified object.
[0010] According to a second aspect of the embodiments of this application, an information query device is provided, comprising:
[0011] The acquisition module is configured to acquire information query requests, wherein the information query requests include query objects;
[0012] The search module is configured to search for at least one specified object that has a channel association with the query object in a preset relationship graph. The preset relationship graph is constructed based on multiple objects and the relationships between the multiple objects. The preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects.
[0013] The determination module is configured to determine the query result corresponding to the query request based on at least one specified object's information transmission index, information acquisition index, and channel index.
[0014] According to a third aspect of the embodiments of this application, a computing device is provided, comprising:
[0015] Memory and processor;
[0016] The memory is used to store computer-executable instructions, and the processor executes the computer-executable instructions to implement the steps of the information query method.
[0017] According to a fourth aspect of the embodiments of this application, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the information query method.
[0018] According to a fifth aspect of the present application, a chip is provided that stores a computer program, which, when executed by the chip, implements the steps of the information query method.
[0019] The information query method provided in this application obtains an information query request, wherein the information query request includes a query object; in a preset relationship graph, it searches for at least one specified object that has a channel association with the query object, wherein the preset relationship graph is constructed based on multiple objects and the association relationships between the multiple objects, and the preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects; based on the information transmission indicators, information acquisition indicators of at least one specified object, and channel indicators of the channel, it determines the query result corresponding to the query request. By utilizing the preset relationship graph, at least one specified object can be found efficiently and accurately, and the query result corresponding to the query request can be determined based on the information transmission indicators, information acquisition indicators, and channel indicators of at least one specified object, thereby improving the efficiency and accuracy of determining the query result. Furthermore, the query result determined by the above scheme is not fixed, thus enabling low-cost information communication based on dynamic queries, further improving the user experience. Attached Figure Description
[0020] Figure 1 This is a framework diagram of an information query system provided in one embodiment of this application;
[0021] Figure 2This is a flowchart of an information query method provided in an embodiment of this application;
[0022] Figure 3 This is a schematic diagram of a preset relationship diagram in an information query method provided in an embodiment of this application;
[0023] Figure 4 This is a schematic diagram of an information query interface provided in one embodiment of this application;
[0024] Figure 5 This is a schematic diagram illustrating the classification of information domains in an information retrieval method provided in an embodiment of this application;
[0025] Figure 6 This is a flowchart illustrating an information query method applied to a game scene, provided in one embodiment of this application.
[0026] Figure 7 This is a schematic diagram of the structure of an information query device provided in an embodiment of this application;
[0027] Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this application. Detailed Implementation
[0028] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0029] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.
[0030] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first.
[0031] First, the terminology used in one or more embodiments of the present invention will be explained.
[0032] Knowledge Graph: A knowledge graph is used to describe concepts and their relationships in the physical world in symbolic form. Its basic building blocks are the "entity-relationship-entity" triples, as well as entities and their related attribute-value pairs. Entities are interconnected through relations to form a network-like knowledge structure.
[0033] Non-Player Characters (NPCs): Non-player characters (NPCs) are characters created specifically for the purpose of the game and generally play a role in advancing the plot. These characters cannot be controlled by the player; examples include characters who give players quests or trigger events.
[0034] This application provides an information retrieval method. This application also relates to an information retrieval device, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0035] See Figure 1 , Figure 1 This illustration shows a framework diagram of an information query system provided in an embodiment of this application. The information query system includes a server and a client.
[0036] The client is used to send information query requests to the server, where the information query request includes the query object;
[0037] The server is used to obtain information query requests; in a preset relationship graph, it finds at least one specified object that has a channel association with the query object. The preset relationship graph is constructed based on multiple objects and the relationships between them. The preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects; based on the information transmission indicators, information acquisition indicators, and channel indicators of at least one specified object, it determines the query result corresponding to the query request.
[0038] On the server side, the query results are further used to send them back to the client.
[0039] It is worth noting that the information query method provided in the embodiments of this application is generally executed by the server. However, in other embodiments of this application, the client may also have similar functions to the server, thereby executing the information query method provided in the embodiments of this application. In other embodiments, the information query method provided in the embodiments of this application may also be executed jointly by the client and the server.
[0040] The solution of this application embodiment obtains an information query request, wherein the information query request includes a query object; in a preset relationship graph, at least one specified object that has a channel association with the query object is found, wherein the preset relationship graph is constructed based on multiple objects and the association relationships between the multiple objects, and the preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects; based on the information transmission indicators, information acquisition indicators of at least one specified object, and channel indicators of the channel, the query result corresponding to the query request is determined. By utilizing the preset relationship graph, at least one specified object can be found efficiently and accurately, and the query result corresponding to the query request can be determined based on the information transmission indicators, information acquisition indicators, and channel indicators of at least one specified object, thereby improving the efficiency and accuracy of determining the query result.
[0041] Figure 2 The flowchart shown is a method for information retrieval according to an embodiment of this application, which specifically includes the following steps:
[0042] Step 202: Obtain the information query request, wherein the information query request includes the query object.
[0043] In one or more embodiments of this application, an information query request can be obtained, which includes a query object. Further, information can be queried based on the query object to obtain the query result corresponding to the information query request.
[0044] Specifically, the query object can be different objects in different scenarios, such as player characters in a game scenario or virtual items in a virtual scenario. The specific selection is based on the actual situation, and this application embodiment does not impose any limitations on this.
[0045] In practical applications, there are various ways to obtain information query requests. The core of this application's embodiment lies in information querying. For different scenarios, the process of obtaining information query requests is basically the same. The process of obtaining information query requests is described in detail below.
[0046] In one possible implementation of this application, an information query request input box can be provided to the user, through which the user can input an information query request.
[0047] In another possible implementation of this application, multiple query controls can be provided to the user, each corresponding to a query object. The user can select the desired query control from the multiple controls and perform operations on it. After the user selects the target query control, an information query request can be obtained. Specifically, the user can operate the control in any way, including clicking, double-clicking, touching, swiping, long-pressing, etc., depending on the actual situation. This application embodiment does not impose any limitations on this.
[0048] It should be noted that the user in this application embodiment can be a real user or a character in a virtual scene, depending on the actual situation. This application embodiment does not impose any limitations on this.
[0049] Step 204: In the preset relationship graph, find at least one specified object that has a channel association with the query object. The preset relationship graph is constructed based on multiple objects and the association between multiple objects. The preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects.
[0050] In one or more embodiments of this application, after obtaining an information query request, at least one specified object that has a channel association with the query object can be found in a preset relationship graph.
[0051] Specifically, the pre-defined relationship graph can be understood as a kind of knowledge graph, which includes multiple objects and the relationships between them. A portion of the connections in the pre-defined relationship graph can serve as information transmission channels. Each channel can transmit a portion of the domain's information and experiences attenuation, described by channel distance. The longer the channel distance, the greater the attenuation. Unlike the edges in the pre-defined relationship graph, the channels in this embodiment have a direction of information transmission. This direction can be unidirectional or bidirectional, depending on the actual situation; this embodiment does not impose any limitations on this. For example, if the channel between object A and object B points from A to B, it means that object A can transmit information to object B, but object B cannot transmit information to object A.
[0052] In one optional embodiment of this application, a preset relationship diagram can be constructed in advance based on multiple objects in the current scene and the relationships between them. That is, before searching for at least one specified object that has a channel association with the query object in the preset relationship diagram, the following steps may be included:
[0053] Determine multiple objects in the current scene and the relationships between them;
[0054] A pre-defined relationship graph is constructed using multiple objects as nodes and their relationships as edges. The pre-defined relationship graph carries the channel indicators of the edges, the information acquisition indicators of multiple objects, and the information transmission indicators.
[0055] In this embodiment, all objects in the database and their relationships can be directly obtained to construct a large-scale relationship graph. Furthermore, to improve information retrieval efficiency, the current information retrieval scenario can be determined, and multiple objects in the current scenario and their relationships can be obtained to construct a preset relationship graph, thereby reducing the number of objects and improving the efficiency of constructing the preset relationship graph.
[0056] Specifically, the current scenario refers to the scenario in which the information query request is received. For example, if the information query request is received from a user in game A, then the current scenario is game A, and the multiple objects are the multiple objects in game A. Objects include, but are not limited to, NPCs, items, locations, etc., and are selected according to the actual situation. This application embodiment does not impose any limitations on this.
[0057] It's important to note that channel metrics refer to indicators related to information transmission channels, such as information transmission direction, channel presence, and channel distance. Channel distance, in particular, represents the distance required for information transmission and can be understood as a weight. Each object can receive information transmitted through the channel. Simultaneously, each object possesses different information acquisition metrics for information in different domains. Information acquisition metrics characterize an object's ability to acquire information, such as its knowledge level. A higher knowledge level indicates that the object can withstand greater channel distance attenuation, meaning it can traverse significant channel distances to acquire information. Information transmission metrics characterize an object's ability to transmit information, such as its reputation. A higher reputation indicates that the object can withstand greater channel distance attenuation, meaning it can traverse significant channel distances to allow distant objects to access relevant information. Channel distance can be directly obtained by querying the attributes of related relationships. For example, object A is knowledgeable in both martial arts and music, possessing a knowledge level of 3 in both fields. Object A is also renowned for its martial arts skills, possessing a reputation of 3. However, its reputation in music is only 1.
[0058] It's worth noting that determining the reputation of each object in each field can be done in two ways. First, a pre-configured table of all attributes can be set up for each object, allowing you to directly configure its reputation in different fields. Second, the pre-configured reputation can be changed based on the object's behavior. For example, if object A wins a prize in a martial arts competition, its reputation in the martial arts industry increases. Furthermore, the object's behavior changes can be categorized into different levels, and the pre-configured reputation can be dynamically adjusted based on these levels. For instance, object A winning first prize in a martial arts competition has a different level of reputation gain than winning third prize. These behavior change levels can be pre-set or analyzed and adjusted in real-time based on a preset function.
[0059] Determining the knowledge level of each object in each domain can be done in two ways: First, by pre-setting a configuration table with all attributes for each object, where the object's knowledge level in different domains can be directly configured. Second, by changing the pre-configured knowledge level based on the object's behavior; for example, if object A participates in martial arts training, its knowledge level in the martial arts industry can increase.
[0060] For example, see Figure 3 , Figure 3 This illustration shows a schematic diagram of a preset relationship diagram in an information query method provided in an embodiment of this application. Figure 3 The system includes characters A, B, and C, item X, and location a. Character A has an information transmission index of 2 and an information acquisition index of 2; character B has an information transmission index of 3 and an information acquisition index of 3; and character C has an information transmission index of 2 and an information acquisition index of 3. Since item X and location a have no reputation or knowledge level, their information transmission index and information acquisition index are both 0. Assuming the channel index ranges from 0 to 2, a larger channel index value indicates a greater channel distance, making information flow between the characters at both ends of the channel more difficult and communication more challenging; conversely, a smaller channel index value indicates a smaller channel distance, making information flow between the characters at both ends of the channel easier and communication more convenient. (See also...) Figure 3 , Figure 3 The arrows in the diagram indicate the direction of information transmission through the channel. For example, bidirectional information transmission is possible between characters A and C, and between characters A and B, hence the double arrows. The channel index is 0.5, indicating that the two characters connected by this channel can easily and closely exchange information. Another example is location a, which typically houses many people. The relationships between these people all point to location a. The connections between character B and these people would generate a large number of edges in the preset relationship graph, making the graph very complex. Therefore, a channel can be established between location a and character B, with a channel index of 0.5. As long as there is a channel between location a and character B, channels can be automatically established between people residing in location a. Yet another example is character B, who cannot communicate with item X or transmit information through the edge between themselves and item X. Therefore, there is no channel between character B and item X, meaning the channel index is "no channel." Of course, a channel can also be constructed between character B and item X, with an infinitely large channel distance. Even then, information transmission between character B and item X would still be impossible.
[0061] By applying the scheme of the embodiments of this application, multiple objects in the current scenario and the relationships between them are determined; a preset relationship graph is constructed with multiple objects as nodes and relationships as edges. The preset relationship graph carries the channel indicators of the edges, the information acquisition indicators of multiple objects, and the information transmission indicators, thereby accurately constructing the preset relationship graph to facilitate subsequent information queries based on the preset relationship graph, and further improving the efficiency and accuracy of information queries.
[0062] In this embodiment of the application, when searching for at least one specified object that has a channel association with the query object in the preset relationship graph, the preset relationship graph can be traversed starting from the query object to determine at least one specified object that has a channel association with the query object.
[0063] For example, with Figure 3 For example, assuming the query object is role A, starting with role A, traverse the preset relationship graph to determine the specified objects that have a channel association with role A as role B and role C.
[0064] Step 206: Determine the query result corresponding to the query request based on the information transmission index, information acquisition index, and channel index of at least one specified object.
[0065] In one or more embodiments of this application, after obtaining an information query request and finding at least one specified object that is associated with the query object through a channel in a preset relationship graph, the query result corresponding to the query request can be determined based on the information transmission index, information acquisition index of the at least one specified object and the channel index of the channel.
[0066] It should be noted that the query results determined based on the information transmission index, information acquisition index, and channel index of at least one specified object include multiple types, and the specific selection depends on the actual situation. This application does not impose any limitations on this. In the first possible implementation of this specification, at least one target specified object whose sum of information transmission index and information acquisition index is greater than the channel index can be directly used as the query result. In the second possible implementation of this specification, at least one target specified object whose sum of information transmission index and information acquisition index is greater than the channel index can be determined first. Then, based on the channel index between at least one target specified object and the interaction object, at least one target specified object can be sorted, and the sorted result or the top N target specified objects can be used as the query result. Here, the interaction object refers to the object that interacts with the target object. In the third possible implementation of this specification, at least one target specified object whose sum of information transmission index and information acquisition index is greater than the channel index can be determined first. Then, from multiple transmission links between the query object and the target specified object, a target transmission link can be randomly selected, and the first object in the target transmission link can be used as the query result.
[0067] For example, suppose that the specified objects directly associated with the query object A through a channel are objects B and C, objects directly associated with object B through a channel are objects E and F, and object directly associated with object E through a channel is object G. That is, the specified objects associated with the query object A through a channel include objects B, C, E, F, and G. By comparing the sum of the information transmission indicators and information acquisition indicators of each specified object with the channel indicators of the channel between the query object A and each specified object, the target specified objects are determined to be objects G and F. In the first possible implementation of this specification, objects G and F can be directly used as the query results. In the second possible implementation of this specification, objects G and F can be sorted according to the channel indicators between object G and the interacting object, and the channel indicators between object F and the interacting object. If object F is determined to be superior to object G, the sorting result "object F > object G" is used as the query result, or object F can be directly used as the query result. In the third possible implementation of this specification, among the multiple transmission links between the query object A and objects G and F, the target transmission link object A-object B can be randomly selected, and the first object "object B" in the transmission link object A-object B can be used as the query result according to the transmission direction of the target transmission link.
[0068] The solution of this application embodiment obtains an information query request, wherein the information query request includes a query object; in a preset relationship graph, at least one specified object that has a channel association with the query object is found, wherein the preset relationship graph is constructed based on multiple objects and the association relationships between the multiple objects, and the preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects; based on the information transmission indicators, information acquisition indicators of at least one specified object, and channel indicators of the channel, the query result corresponding to the query request is determined. By utilizing the preset relationship graph, at least one specified object can be found efficiently and accurately, and the query result corresponding to the query request can be determined based on the information transmission indicators, information acquisition indicators, and channel indicators of at least one specified object, thereby improving the efficiency and accuracy of determining the query result.
[0069] In one optional embodiment of this application, the query result corresponding to the query request can be determined based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index of the channel. That is, determining the query result corresponding to the query request based on the information transmission index, information acquisition index of at least one specified object, and the channel index of the channel can include the following steps:
[0070] The query result corresponding to the query request is determined based on the information transmission index of the queried object, the information acquisition index of at least one specified object, and the channel index of the channel.
[0071] Specifically, the query object refers to the object to which the user wants to retrieve relevant information. For example, if the user wants to know information about object A, then the query object is object A. The specified object refers to an object that may know the relevant information, such as object A's parents. To determine whether the specified object knows the relevant information about the query object, the query result corresponding to the query request can be determined based on the information transmission indicators of the query object, the information acquisition indicators of the specified object, and the channel indicators.
[0072] It should be noted that the information transmission index of the query object represents the channel distance that the query object can traverse to transmit information, while the information acquisition index of the specified object represents the channel distance that the specified object can traverse to acquire the information. Therefore, the query result can be determined based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index.
[0073] The solution in this application embodiment determines the query result corresponding to the query request based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index of the channel, thereby improving the efficiency of obtaining query results.
[0074] In one optional embodiment of this application, the above-mentioned information query request may include the following steps:
[0075] Receive query requests sent by the target object;
[0076] Determining the query result corresponding to the query request based on at least one specified object's information transmission index, information acquisition index, and channel index may include the following steps:
[0077] Identify at least one target object whose information transmission and information acquisition indicators are greater than the channel indicators;
[0078] The query results include at least one target object and are returned to the target object.
[0079] In this embodiment of the application, the channel index indicates the transmission threshold of information transmission. When the sum of the information transmission index and the information acquisition index exceeds the transmission threshold, the objects at both ends of the channel can exchange information. That is, if the sum of the information transmission index and the information acquisition index is greater than the channel index, it indicates that the specified object knows the query result corresponding to the information query request, and can further directly feed the query result back to the target object.
[0080] For example, see Figure 4 , Figure 4This diagram illustrates an information query interface according to an embodiment of this application. The target object inputs a query request through a query request input box. This query request includes the query object: Role A. The server searches a preset relationship graph for specified objects with channel associations with Role A, namely Role B and Role C. Assume that Role A's information transmission index is 2 and its information acquisition index is 2; Role B's information transmission index is 3 and its information acquisition index is 3; Role C's information transmission index is 2 and its information acquisition index is 3; and the channel indices between Role A, Role B, and Role C are all 0.5. A comparison shows that the sum of Role A's information transmission index and Role B's information acquisition index is greater than 0.5, and the sum of Role A's information transmission index and Role C's information acquisition index is also greater than 0.5. This indicates that Role B and Role C both know the relevant information about Role A. Therefore, the query results (Role B and Role C) can be displayed in the query result feedback box to the target object.
[0081] By applying the scheme of the embodiments of this application, at least one target specified object is determined whose information transmission index and information acquisition index are greater than the channel index; at least one target specified object is used as the query result, and the query result is fed back to the target object, thereby realizing accurate filtering of target specified objects from the specified objects, thereby improving the accuracy of information query.
[0082] In another optional embodiment of this application, the query result corresponding to the query request can be determined based on the information transmission index, information acquisition index of the remaining objects and at least one specified object on the channel located between at least one specified object and the query object, as well as the channel index of the channel.
[0083] In one optional embodiment of this specification, after specifying at least one target object as the query result, the following steps may also be included:
[0084] Based on the channel index between at least one target specified object and the interaction object, sort at least one target specified object, wherein the interaction object refers to the object that interacts with the target object;
[0085] Return the query results to the target object, including:
[0086] The sorting results are then fed back to the target object.
[0087] Specifically, interactive behaviors include, but are not limited to, chatting, martial arts competitions, dancing, etc., and the specific selection is based on the actual situation. This application embodiment does not impose any limitations on this.
[0088] In this embodiment of the application, after obtaining at least one target specified object, the channel distance from the target object to the target specified object can be determined according to the channel index between the target specified object and the interaction object, thereby sorting the at least one specified object for the target object to select.
[0089] For example, suppose the channel index between target object A and interaction object P is 100, meaning the target object needs to travel a distance of 100 to reach the location of target object A. Suppose the channel index between target object B and interaction object P is 3, meaning the target object needs to travel a distance of 3 to reach the location of target object B. Therefore, target object A and target object B are ranked according to their channel indices, resulting in a ranking where target object B is superior to target object A, and this ranking result is fed back to the target objects.
[0090] The solution of this application embodiment sorts at least one target specified object according to the channel index between at least one target specified object and the interaction object; the sorting result is fed back to the target object, so that the target object can directly select a better target specified object according to the sorting result, thereby quickly obtaining the query result.
[0091] In an optional embodiment of this application, after determining at least one target object whose information transmission index and information acquisition index are greater than the channel index, the following steps may be further included:
[0092] Randomly select the target transmission link from multiple transmission links between the query object and the specified target object;
[0093] Use the first and first objects in the target transmission link as the query result.
[0094] For example, suppose the query object is object A, the target object is object D, and the channel between the query object and the target object also includes objects B and C. Then the transmission links between the query object and the target object include object A-object B, object A-object B-object C, and object A-object B-object C-object D. A transmission link object A-object B-object C is randomly selected as the target transmission link. Based on the transmission direction of the target transmission link, the first object in the transmission link object A-object B-object C, "object C", is taken as the query result. Taking a game scenario as an example, the target object can go to object C, complete the relevant task at object C, and then object C will inform the target object that it can go to object D to obtain the query result.
[0095] By applying the scheme of this application embodiment, a target transmission link is randomly selected from multiple transmission links between the query object and the target specified object; the first object in the target transmission link is used as the query result. The query result fed back to the target object each time is the first object in the randomly selected transmission link, which enriches the query results and makes the query results obtained by the user different each time, thereby improving the user experience.
[0096] In one optional embodiment of this application, after obtaining the information query request, at least one candidate object can be further filtered to determine the specified object based on the candidate object. That is, after obtaining the information query request, the following steps may also be included:
[0097] Based on the query object, filter at least one candidate object from multiple objects;
[0098] In the preset relationship graph, find at least one specified object that has a channel association with at least one candidate object.
[0099] In this embodiment of the application, a candidate object refers to an object that is related to the query object.
[0100] It should be noted that when searching for at least one specified object that has a channel association with at least one candidate object in the preset relationship graph, you can start from the candidate object and traverse the preset relationship graph to determine at least one specified object that has a channel association with the candidate object.
[0101] By applying the scheme of this application embodiment, at least one candidate object is selected from multiple objects according to the query object; in the preset relationship graph, at least one specified object that has a channel association with at least one candidate object can be found, which can increase the number of specified objects obtained, thereby making the information query more comprehensive and further improving the accuracy of the information query.
[0102] In practical applications, there are various ways to filter at least one candidate object from multiple objects based on the query object. The specific method to be selected depends on the actual situation, and this application embodiment does not impose any limitations on this.
[0103] In one possible implementation of this application, the above-mentioned filtering of at least one candidate object from multiple objects based on the query object may include the following steps:
[0104] Starting with the query object, traverse the preset relationship graph to determine at least one candidate object that has a relationship with the query object.
[0105] Specifically, in the preset relationship graph, starting from the query object, the entire preset relationship graph is traversed, and the objects that have an edge with the query object are the candidate objects.
[0106] It's worth noting that candidate objects here include objects that have a direct edge to the query object. For example, if the query object is object A, and object B has an edge with object A, then object B is a candidate object. Furthermore, candidate objects also include objects that have an indirect edge to the query object. For example, if the query object is object A, and object B has an edge with object A, and object C has an edge with object B, then object C, like object B, is also a candidate object.
[0107] The solution of this application starts with the query object, traverses the preset relationship graph, determines at least one candidate object that has a relationship with the query object, and obtains the candidate object from the preset relationship graph, thereby improving the efficiency and accuracy of obtaining the candidate object.
[0108] In another possible implementation of this application, objects that are related to the queried object can be directly searched from the object relational database, and these objects can be used as candidate objects.
[0109] In one possible embodiment of this application, the query request carries a query relationship; the above-mentioned filtering of at least one candidate object from multiple objects based on the query object may include the following steps:
[0110] Starting with the query object, traverse the preset relationship graph to determine at least one candidate object that has a query relationship with the query object.
[0111] Specifically, assuming the query object is object A and the query relationship is father and daughter, when filtering at least one candidate object from multiple objects, it is necessary not only to consider whether there is a relationship between the objects, but also to determine whether the relationship between the objects is "father and daughter".
[0112] For example, assuming the query object is object A, the objects that have a relationship with object A from multiple objects include object B and object C. If the relationship between object A and object B is "master and apprentice" and the relationship between object A and object C is "father and daughter", then object C is determined as the candidate object.
[0113] If the query request carries a query relationship, then at least one candidate object is selected from multiple objects based on the query object and the query relationship, making the selection result of the candidate object more accurate.
[0114] In one optional embodiment of this application, determining the query result corresponding to the query request based on at least one specified object's information transmission index, information acquisition index, and channel index may include the following steps:
[0115] The query result corresponding to the query request is determined based on the information transmission index of at least one candidate object, the information acquisition index of at least one specified object, and the channel index of the channel.
[0116] It should be noted that the implementation method of "determining the query result corresponding to the query request based on the information transmission index of at least one candidate object, the information acquisition index of at least one specified object, and the channel index of the channel" is the same as the implementation method of "determining the query result corresponding to the query request based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index of the channel". Therefore, the embodiments of this application will not be described again.
[0117] The solution of this application embodiment determines the query result corresponding to the query request based on the information transmission index of at least one candidate object, the information acquisition index of at least one specified object, and the channel index of the channel, thereby improving the efficiency of obtaining query results.
[0118] In one optional embodiment of this application, the information transmission indicators, information acquisition indicators, and channel indicators of each object included in the preset relationship diagram can be further classified according to the information domain. Furthermore, the query request carries a query relationship. Before determining the query result corresponding to the query request based on the information transmission indicators of at least one candidate object, the information acquisition indicators of at least one specified object, and the channel indicators of the channel, the following steps may also be included:
[0119] Determine the target domain to which the query relation belongs;
[0120] Based on the information transmission indicators of at least one candidate object, the information acquisition indicators of at least one specified object, and the channel indicators, the query results corresponding to the query request are determined, including:
[0121] The query result corresponding to the query request is determined based on the information transmission indicators of at least one candidate object in the target domain, the information acquisition indicators of at least one specified object in the target domain, and the channel indicators of the channel.
[0122] Specifically, information in the preset relationship graph can be categorized by domain. This categorization involves two steps. The first step is to place the types of the relationship connections in the same configuration table, managing the information and channel indicators of each connection separately. Connections with the same name in the preset relationship graph apply the domain attribute with the same name in the configuration table. The second step is to automatically connect relationships at the logical level. For example, when an NPC is created in a certain region, a "residence" relationship connection is automatically established between the NPC and the region.
[0123] For example, see Figure 5 , Figure 5This illustration shows a classification diagram of information domains in an information retrieval method provided by an embodiment of this application. Information domains can be divided into Private, Public, Professional, and Organizational domains. The Public domain includes Weather, Economy, Policy, War, and Star; the Professional domain includes Doctor, Blacksmith, Fighter, and Businessman, with Businessmen further including those in the Hotel and Trade sectors; the Organizational domain includes Organization 1 and Organization 2.
[0124] Furthermore, after determining the information domain in the preset relationship graph, the target domain to which the query relationship belongs can be determined. One way to determine the target domain is to match the query relationship with the associations in the preset relationship graph, identify associations similar to the query relationship, and use the domain to which that association belongs as the target domain.
[0125] In practical applications, "determining the query result corresponding to the query request based on the information transmission index of at least one candidate object in the target domain, the information acquisition index of at least one specified object in the target domain, and the channel index of the channel" is implemented in the same way as "determining the query result corresponding to the query request based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index of the channel". Therefore, the embodiments of this application will not be described in detail.
[0126] For example, suppose object A's daughter is object B; this information belongs to the domain "Private." Object A possesses martial arts skill m; this information belongs to the domain "Profession-Fighter." Information from various domains can circulate within the same channel; for instance, object A and object B can exchange public, private, and profession-related information.
[0127] By applying the scheme of the embodiments of this application, the target domain to which the query relationship belongs is determined; based on the information transmission indicators of at least one candidate object in the target domain, the information acquisition indicators of at least one specified object in the target domain, and the channel indicators of the channel, the query result corresponding to the query request is determined. By considering the information domain, the information query is made more accurate, and the accuracy of the query result is further improved.
[0128] Taking information retrieval in game scenarios as an example, game plots and scenes often involve the logic of whether an NPC knows specific information. For instance, a martial arts enthusiast might inquire about the locations of other martial arts masters, hoping to spar with them; a terminally ill wanderer might search for a reclusive healer to find a cure. Usually, the NPCs in games who possess this kind of knowledge are pre-set by the game designers. For example, the martial arts master and the reclusive healer in the above examples are fixed NPCs; no matter how many times the player replays the game, the NPCs playing these roles will not change. Therefore, this method can only provide players with a relatively static plot experience, meaning that the plot-related experiences are roughly the same regardless of how many times the game is played.
[0129] To introduce intelligent and dynamic storylines, the characters' identities can be dynamically determined at the start of each game. For example, Zhang San might be a martial arts master in one game, but Li Si might become a martial arts master in the next, and the title of martial arts master may change based on the in-game simulation. Therefore, if a player wants to find the current martial arts master and spar with them, they need to know who the current martial arts master is and where they currently reside. If the player doesn't know this information initially, they will need to inquire with various NPCs.
[0130] To enable players to obtain query information efficiently and accurately, this application proposes an information query method that connects all objects through a knowledge graph to construct a preset relationship graph. Based on the preset relationship graph, information queries can be efficiently completed in a dynamically generated game world.
[0131] The following is in conjunction with the appendix Figure 6 Taking the application of the information query method provided in this application to a game scenario as an example, the information query method will be further explained. Among other things, Figure 6 This application provides a flowchart illustrating an information query method for game scenarios according to an embodiment of the present application, which specifically includes the following steps:
[0132] Step 602: Receive the information query request input by the target object, wherein the information query request includes the query object and the query relationship.
[0133] Step 604: Based on the query object and query relationship, filter at least one candidate object from multiple objects.
[0134] Step 606: In the preset relationship graph, find at least one specified object that has a channel association with the query object or at least one candidate object.
[0135] Step 608: Based on the information transmission indicators of the queried object or at least one candidate object, the information acquisition indicators of at least one specified object, and the channel indicators of the channel, determine the query result corresponding to the query request, and feed the query result back to the target object.
[0136] It should be noted that an information query request can be abstracted into the following form: "Let (H,R,T) be any connection in a preset relational graph (where the head object is H, the relation is R, and the tail object is T), and NPC be any object in the preset relational graph. Ask whether NPC 'knows' (H,R,T)." For any connection (H,R,T), its two endpoints H and T can attempt to propagate the information (H,R,T) along available channels. If the NPC's information acquisition index within the information domain of (H,R,T) is greater than 0, and (H,R,T) can find a matching channel path from either of its two endpoints H or T to connect to the NPC, and the sum of the channel distances of this path is less than or equal to the sum of the information transmission index of the starting point and the information acquisition index of the ending point, then the NPC "knows" (H,R,T); otherwise, it "does not know" (H,R,T). In this way, the NPCs in the game scene who "know" (H,R,T) can be identified, and these NPCs can be fed back to the player so that the player can go to the location of these NPCs and obtain the information query results. Here, the information transmission index can be understood as popularity, and the information acquisition index can be understood as knowledge level.
[0137] As demonstrated by the above scheme, when an NPC has high renown in a certain field, they can travel long distances to allow NPCs far away to access relevant information. Similarly, if an NPC has a high knowledge level in a certain field, they can also obtain information across long distances. To create a "know-it-all" character, simply increase the NPC's knowledge level in all fields.
[0138] By utilizing the scheme of this application embodiment and employing a preset relationship diagram, at least one specified object can be efficiently and accurately located. Furthermore, based on the information transmission indicators, information acquisition indicators, and channel indicators of the at least one specified object, the query result corresponding to the query request is determined, thereby improving the efficiency and accuracy of determining the query result.
[0139] Corresponding to the above method embodiments, this application also provides an information query device embodiment. Figure 7 A schematic diagram of the structure of an information query device according to an embodiment of this application is shown. Figure 7 As shown, the device includes:
[0140] The acquisition module 702 is configured to acquire information query requests, wherein the information query requests include query objects;
[0141] The lookup module 704 is configured to look up at least one specified object that has a channel association with the query object in a preset relationship graph. The preset relationship graph is constructed based on multiple objects and the association between multiple objects. The preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects.
[0142] The determination module 706 is configured to determine the query result corresponding to the query request based on at least one specified object's information transmission index, information acquisition index, and channel index.
[0143] Optionally, the device further includes: a construction module configured to determine multiple objects in the current scene and the relationships between the multiple objects; and to construct a preset relationship graph with the multiple objects as nodes and the relationships as edges, wherein the preset relationship graph carries the channel indicators of the edges, the information acquisition indicators of the multiple objects, and the information transmission indicators.
[0144] Optionally, the device further includes: a filtering module configured to filter at least one candidate object from a plurality of objects based on a query object; and to search for at least one specified object in a preset relationship graph that has a channel association with at least one candidate object.
[0145] Optionally, the filtering module is further configured to start from the query object, traverse a preset relationship graph, and determine at least one candidate object that has a query relationship with the query object.
[0146] Optionally, the filtering module is further configured to determine the query result corresponding to the query request based on the information transmission index of at least one candidate object, the information acquisition index of at least one specified object, and the channel index of the channel.
[0147] Optionally, the query request carries a query relationship; the device further includes: a domain determination module, configured to determine the target domain to which the query relationship belongs; and a filtering module, further configured to determine the query result corresponding to the query request based on information transmission indicators of at least one candidate object in the target domain, information acquisition indicators of at least one specified object in the target domain, and channel indicators of the channel.
[0148] Optionally, the determining module 706 is further configured to determine the query result corresponding to the query request based on the information transmission index of the query object, the information acquisition index of at least one specified object, and the channel index of the channel.
[0149] Optionally, the acquisition module 702 is further configured to receive a query request sent by the target object; the determination module 706 is further configured to determine at least one target specified object whose information transmission index and information acquisition index are greater than the channel index; take at least one target specified object as the query result, and feed back the query result to the target object.
[0150] Optionally, the device further includes: a sorting module configured to sort at least one target specified object based on a channel index between at least one target specified object and an interaction object, wherein the interaction object refers to an object that interacts with the target object; and a determination module 706 further configured to feed back the sorting result to the target object.
[0151] Optionally, the device further includes: a selection module configured to randomly select a target transmission link from a plurality of transmission links between the query object and the target specified object; and to use the first object in the target transmission link as the query result.
[0152] The solution of this application embodiment obtains an information query request, wherein the information query request includes a query object; in a preset relationship graph, at least one specified object that has a channel association with the query object is found, wherein the preset relationship graph is constructed based on multiple objects and the association relationships between the multiple objects, and the preset relationship graph carries information acquisition indicators and information transmission indicators of multiple objects; based on the information transmission indicators, information acquisition indicators of at least one specified object, and channel indicators of the channel, the query result corresponding to the query request is determined. By utilizing the preset relationship graph, at least one specified object can be found efficiently and accurately, and the query result corresponding to the query request can be determined based on the information transmission indicators, information acquisition indicators, and channel indicators of at least one specified object, thereby improving the efficiency and accuracy of determining the query result.
[0153] The above is an illustrative scheme of an information query device according to this embodiment. It should be noted that the technical solution of this information query device and the technical solution of the aforementioned information query method belong to the same concept. Details not described in detail in the technical solution of the information query device can be found in the description of the technical solution of the aforementioned information query method. Furthermore, the components in the device embodiment should be understood as functional modules necessary to implement each step of the program flow or each step of the method; these functional modules are not actual functional divisions or separations. A device claim defined by such a set of functional modules should be understood as a functional module architecture that primarily implements the solution through the computer program described in the specification, and not as a physical device that primarily implements the solution through hardware.
[0154] Figure 8This diagram illustrates a structural block diagram of a computing device according to an embodiment of this application. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.
[0155] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Networks (WLAN) interface, a Wi-MAX (World Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0156] In one embodiment of this application, the aforementioned components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.
[0157] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.
[0158] The processor 820 is used to execute computer-executable instructions for the information query method.
[0159] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the information query method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the information query method described above.
[0160] One embodiment of this application also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used for an information retrieval method.
[0161] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the information query method described above belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the information query method described above.
[0162] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0163] One embodiment of this application also provides a chip that stores a computer program, which, when executed by the chip, implements the steps of the information query method.
[0164] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.
[0165] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0166] The preferred embodiments disclosed above are merely illustrative of this application. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the content of this application. These embodiments are selected and specifically described in this application to better explain the principles and practical applications of this application, thereby enabling those skilled in the art to better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.
Claims
1. An information retrieval method, characterized in that, Applied to the server side, including: Multiple query controls are provided to the user, each query control corresponding to a query object. The user selects the desired target query control from the multiple query controls to obtain an information query request, wherein the information query request includes the query object. Determine the relationships between multiple objects in the current scene and the relationships between these multiple objects; Using the multiple objects as nodes and the relationships as edges, a preset relationship graph is constructed, wherein the preset relationship graph carries the channel indicators of the edges, the information acquisition indicators of the multiple objects, and the information transmission indicators; In the preset relationship graph, starting from the query object, the preset relationship graph is traversed to find at least one specified object that has a channel association with the query object. The channel is a connection in the preset relationship graph that plays the role of propagating information. The longer the channel distance, the greater the attenuation. The preset relationship graph is constructed based on multiple objects in the database and the association relationships between the multiple objects. The query result corresponding to the query request is determined based on the information transmission index, information acquisition index of the at least one specified object, and the channel index of the channel. The information transmission index represents the object's ability to transmit information, the information acquisition index represents the object's ability to acquire information, and the channel index refers to the relevant index of the information transmission channel.
2. The method according to claim 1, characterized in that, Following the information query request, the system also includes: Based on the query object, at least one candidate object is selected from multiple objects; In the preset relationship diagram, find at least one specified object that has a channel association with the at least one candidate object.
3. The method according to claim 2, characterized in that, The query request carries the query relationship; The step of filtering at least one candidate object from multiple objects based on the query object includes: Starting with the query object, traverse the preset relationship graph to determine at least one candidate object that has the query relationship with the query object.
4. The method according to claim 2, characterized in that, Determining the query result corresponding to the query request based on the information transmission index, information acquisition index of the at least one specified object, and the channel index of the channel includes: The query result corresponding to the query request is determined based on the information transmission index of the at least one candidate object, the information acquisition index of the at least one specified object, and the channel index of the channel.
5. The method according to claim 4, characterized in that, The query request carries a query relationship; before determining the query result corresponding to the query request based on the information transmission index of the at least one candidate object, the information acquisition index of the at least one specified object, and the channel index of the channel, the method further includes: Determine the target domain to which the query relationship belongs; Determining the query result corresponding to the query request based on the information transmission index of the at least one candidate object, the information acquisition index of the at least one specified object, and the channel index of the channel includes: The query result corresponding to the query request is determined based on the information transmission index of the at least one candidate object in the target domain, the information acquisition index of the at least one specified object in the target domain, and the channel index of the channel.
6. The method according to claim 1, characterized in that, Determining the query result corresponding to the query request based on the information transmission index, information acquisition index of the at least one specified object, and the channel index of the channel includes: The query result corresponding to the query request is determined based on the information transmission index of the queried object, the information acquisition index of the at least one specified object, and the channel index of the channel.
7. The method according to claim 1 or 6, characterized in that, The information query request includes: Receive query requests sent by the target object; Determining the query result corresponding to the query request based on the information transmission index, information acquisition index of the at least one specified object, and the channel index of the channel includes: If the sum of the information transmission index of the queried object and the information acquisition index of any of the specified objects is greater than the corresponding channel index, the specified object is determined as the target specified object; The query result is obtained by taking the at least one target object as the query result and sending the query result back to the target object.
8. The method according to claim 7, characterized in that, After specifying the at least one target object as the query result, the method further includes: The at least one target specified object is sorted according to the channel index between the at least one target specified object and the interaction object, wherein the interaction object refers to the object that interacts with the target object; The step of returning the query result to the target object includes: The sorting results are then fed back to the target object.
9. The method according to claim 7, characterized in that, After determining at least one target object whose information transmission index and information acquisition index are greater than the channel index, the method further includes: Randomly select a target transmission link from among multiple transmission links between the query object and the target specified object; The first and first objects in the target transmission link are used as the query result.
10. An information query device, characterized in that, Applied to the server side, including: The acquisition module is configured to provide the user with multiple query controls, each query control corresponding to a query object, and to acquire an information query request based on the user selecting the desired target query control from the multiple query controls, wherein the information query request includes the query object; The construction module is configured to determine multiple objects in the current scene and the relationships between the multiple objects; and to construct a preset relationship graph with the multiple objects as nodes and the relationships as edges, wherein the preset relationship graph carries the channel indicators of the edges, the information acquisition indicators of the multiple objects, and the information transmission indicators. The search module is configured to traverse the preset relationship graph, starting from the query object, to find at least one specified object that has a channel association with the query object. The channel is a connection in the preset relationship graph that plays the role of propagating information. The longer the channel distance, the greater the attenuation. The preset relationship graph is constructed based on multiple objects in the database and the association relationships between the multiple objects. The determining module is configured to determine the query result corresponding to the query request based on the information transmission index, information acquisition index of the at least one specified object, and the channel index of the channel, wherein the information transmission index characterizes the object's ability to transmit information, the information acquisition index characterizes the object's ability to acquire information, and the channel index refers to the relevant index of the information transmission channel.
11. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the information query method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing computer instructions, characterized in that, When executed by the processor, this instruction implements the steps of the information query method according to any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the information query method according to any one of claims 1 to 9.