Game scene simulation demonstration method and device based on visual knowledge graph
By constructing and visualizing the game scene knowledge graph, the problem that traditional databases cannot meet the game scene information storage and computing needs is solved, and clearer, more comprehensive and more accurate scenario understanding and decision support are achieved.
Patent Information
- Application Number
- CN202311576878.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-24
- Publication Date
- 2025-05-27
AI Technical Summary
Traditional relational databases cannot meet the storage and computing needs of game scenario information, especially in terms of real-time data fusion.
By obtaining game scene data, defining entities using ontology modeling, building triples, and visualizing the game scene knowledge graph through visualization modules.
The visual display of the game scene knowledge graph is realized, helping game staff observe the scene more clearly, understand the information more comprehensively, and grasp the situation more accurately, thereby assisting in making correct decisions.
Smart Images

Figure CN120046449A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of knowledge graphs, and in particular, to a method and device for simulating and demonstrating a game scenario based on a visual knowledge graph. Background Art
[0002] With the informatization construction in the game field, the powerful data acquisition and processing capabilities of information devices such as sensors objectively provide richer intelligence information for game players, including modal data such as text and images. The wide application of reconnaissance and detection and sensing devices provides a large amount of historical data support for the game scenario situation, but also brings greater challenges to quickly determining an action plan.
[0003] Traditional relational databases cannot meet the storage and calculation needs of current game scenario information. When adding, modifying, or deleting concept types or relationship types, it will affect the implementation of codes such as queries and cannot meet the real-time requirements of data fusion. Summary of the Invention
[0004] The present invention provides a method and device for simulating and demonstrating a game scenario based on a visual knowledge graph, which can solve the problems in the prior art.
[0005] The present invention provides a method for simulating and demonstrating a game scenario based on a visual knowledge graph, wherein the method includes:
[0006] S1. Obtain game scenario data;
[0007] S2. Define the entities in the game scenario data through ontology modeling to obtain entity types and the relationships between entities;
[0008] S3. Classify and label the entities in the game scenario data according to the entity types, and construct triples according to the relationships between the entities;
[0009] S4. Visualize the game scenario knowledge graph according to the triples and the position information of the entities.
[0010] Preferably, the obtaining of game scenario data in S1 includes:
[0011] Obtain game news data and game encyclopedia data.
[0012] Preferably, the defining of the entities in the game scenario data through ontology modeling to obtain entity types and the relationships between entities in S2 includes:
[0013] S21. Extract the entities in the game scenario data through expert knowledge;
[0014] S22. Define the entity types of the entities in the game scenario;
[0015] S23. Define the relationships between the entities.
[0016] Preferably, the entity types include location, place, and unit type, and the relationships between the entities include rescue, attack, assistance, and command.
[0017] Preferably, the step S3 of classifying and labeling the entities in the game scenario data according to the entity types and constructing triples according to the relationships between the entities includes:
[0018] S31. Classify and label the entities in the game scenario data according to the entity types;
[0019] S32. Form triples by combining entities according to the relationships between the entities.
[0020] Preferably, the step S4 of visualizing the game scenario knowledge graph according to the triples includes:
[0021] S41. Obtain a simulation diagram of the game scenario and use it as the background of the visual knowledge graph;
[0022] S42. Extract the entities in the knowledge graph according to the entity types defined in the game scenario data. According to the positions of the entities and the simulation diagram, use Canvas and WebGL to visualize the corresponding entities and their related information in the simulation diagram. The related information includes the type information of the entities and the triple information;
[0023] S43. Use Canvas and WebGL to visually represent the relationships between the entities according to the game scenario and the triple data.
[0024] The present invention also provides a device for simulating and demonstrating a game scenario based on a visual knowledge graph. Among them, the device includes:
[0025] A data acquisition module for acquiring game scenario data;
[0026] An ontology construction module for defining the entities in the game scenario data through ontology modeling to obtain entity types and the relationships between the entities;
[0027] A triple construction module for classifying and labeling the entities in the game scenario data according to the entity types and constructing triples according to the relationships between the entities;
[0028] A visualization module for visualizing the game scenario knowledge graph according to the triples.
[0029] The present invention also provides an electronic device, which includes a processor and a memory. At least one instruction is stored in the memory. The at least one instruction is loaded and executed by the processor to implement the above-mentioned method for simulating and demonstrating a game scenario based on a visual knowledge graph.
[0030] The present invention also provides a computer-readable storage medium. At least one instruction is stored in the storage medium. The at least one instruction is loaded and executed by a processor to implement the above-mentioned method for simulating and demonstrating a game scenario based on a visual knowledge graph.
[0031] Through the above technical solutions, a knowledge graph can be constructed based on game scenario data. Each entity in the game scenario is presented in the game scenario according to its actual position with the game scenario map as the background, and the information of each entity and the relationships between entities are visually displayed, realizing the visual display of the game scenario knowledge graph. Through the visual game scenario knowledge graph, game staff can observe the game scenario more clearly, understand game information more comprehensively, and master the situation of the game scenario more accurately, providing strong technical support for game staff and assisting game personnel in making correct decision-making judgments. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings included are used to provide a further understanding of the embodiments of the present invention, which form a part of the specification, are used to illustrate the embodiments of the present invention, and are used to explain the principles of the present invention together with the written description. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0033] Figure 1 is a flowchart of a method for simulating and demonstrating a game scenario based on a visual knowledge graph provided by an embodiment of the present invention;
[0034] Figure 2 is a block diagram of a device for simulating and demonstrating a game scenario based on a visual knowledge graph provided by an embodiment of the present invention;
[0035] Figure 3 is a schematic structural diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0036] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. The following description of at least one exemplary embodiment is actually only illustrative and in no way limits the present invention and its application or use. Based on the embodiments in the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the present invention.
[0037] It should be noted that the terms used herein are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present application. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.
[0038] Unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions, and values set forth in these embodiments do not limit the scope of the present invention. At the same time, it should be understood that, for the sake of convenience of description, the sizes of the various parts shown in the drawings are not drawn in actual proportional relationships. Technologies, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and devices should be regarded as part of the authorized specification. In all the examples shown and discussed here, any specific value should be interpreted as merely exemplary and not as a limitation. Therefore, other examples of the exemplary embodiments may have different values. It should be noted that: like reference numerals and letters denote like items in the following drawings, and thus, once an item is defined in one drawing, it does not need to be further discussed in subsequent drawings.
[0039] Figure 1 It is a flowchart of a method for simulating and demonstrating a game scenario based on a visual knowledge graph provided by an embodiment of the present invention.
[0040] As Figure 1 shown, an embodiment of the present invention provides a method for simulating and demonstrating a game scenario based on a visual knowledge graph, characterized in that the method includes:
[0041] S1. Obtain game scenario data;
[0042] S2. Define the entities in the game scenario data through ontology modeling to obtain entity types and the relationships between entities;
[0043] S3. Classify and label the entities in the game scenario data according to the entity type, and construct triples based on the relationships between the entities;
[0044] Thus, through S1 - S3, a game scenario knowledge graph can be obtained.
[0045] S4. Visualize the game scenario knowledge graph according to the triples and the location information of the entities.
[0046] Through the above technical solution, a knowledge graph can be constructed based on the game scenario data. With the game scenario map as the background, each entity in the game scenario is presented in the game scenario according to its actual location, and the information of each entity and the relationships between the entities are visually displayed, realizing the visual display of the game scenario knowledge graph. Through the visual game scenario knowledge graph, game staff can observe the game scenario more clearly, understand game information more comprehensively, and accurately grasp the situation of the game scenario, providing powerful technical support for game staff and assisting game personnel in making correct decision - making judgments.
[0047] According to an embodiment of the present invention, the obtaining of the game scenario data in S1 includes:
[0048] Obtain game news data and game encyclopedia data.
[0049] According to an embodiment of the present invention, the defining of the entities in the game scenario data, obtaining the entity type and the relationships between the entities in S2 through ontology modeling includes:
[0050] S21. Extract the entities in the game scenario data through expert knowledge;
[0051] S22. Define the entity types of the entities in the game scenario;
[0052] S23. Define the relationships between the entities.
[0053] According to an embodiment of the present invention, the entity types include location, place, and unit type, and the relationships between the entities include rescue, attack, assistance, and command.
[0054] According to an embodiment of the present invention, the classifying and labeling of the entities in the game scenario data according to the entity type, and constructing triples based on the relationships between the entities in S3 includes:
[0055] S31. Classify and label the entities in the game scenario data according to the entity type;
[0056] S32. Combine entities into triples according to the relationships between the entities.
[0057] According to an embodiment of the present invention, the visualization of the game scenario knowledge graph based on the triple in S4 includes:
[0058] S41. Obtain a simulation diagram of the game scenario and use the simulation diagram as the background of the visualized knowledge graph;
[0059] S42. Extract the entities in the knowledge graph according to the entity types defined in the game scenario data (i.e., the entities corresponding to the defined types will be extracted). According to the positions of the entities and the simulation diagram, use Canvas and WebGL to visualize the corresponding entities and their related information in the simulation diagram. The related information includes the type information and triple information of the entities;
[0060] S43. Use Canvas and WebGL to visually represent the relationships between entities according to the game scenario and the triple data.
[0061] For example, the visual representation can be achieved by drawing corresponding icons and programming corresponding interactive response programs. For example, visually represent the relationship between a soldier of one side attacking a hostile soldier in the game scenario.
[0062] As Figure 2 shown, an embodiment of the present invention also provides a device 200 for simulating and demonstrating a game scenario based on a visualized knowledge graph. Wherein, the device 200 includes:
[0063] A data acquisition module 210 for acquiring game scenario data;
[0064] An ontology construction module 220 for defining the entities in the game scenario data through ontology modeling to obtain entity types and the relationships between entities;
[0065] A triple construction module 230 for classifying and labeling the entities in the game scenario data according to the entity types and constructing triples according to the relationships between entities;
[0066] A visualization module 240 for visualizing the game scenario knowledge graph according to the triples.
[0067] The device for simulating and demonstrating a game scenario based on a visualized knowledge graph provided by the embodiment of the present invention has a functional structure corresponding to the method for simulating and demonstrating a game scenario based on a visualized knowledge graph provided by the embodiment of the present invention, and will not be elaborated here.
[0068] Figure 3It is a schematic structural diagram of an electronic device 300 provided by an embodiment of the present invention. The electronic device 300 may vary greatly due to different configurations or performances, and may include one or more central processing units (CPUs) 301 and one or more memories 302. Among them, at least one instruction is stored in the memory 302, and the at least one instruction is loaded and executed by the processor 301 to implement the steps of the method for simulating and demonstrating a game scenario based on a visual knowledge graph described in the above embodiment.
[0069] An embodiment of the present invention also provides a computer-readable storage medium, such as a memory including instructions, and the above instructions can be executed by a processor in a terminal to complete the method for simulating and demonstrating a game scenario based on a visual knowledge graph described in the above embodiment. For example, the computer-readable storage medium may be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0070] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above embodiment can be completed by hardware, or can be completed by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and the above-mentioned storage medium can be a read-only memory, a magnetic disk, or an optical disc, etc.
[0071] In the description of the present invention, it should be understood that the orientation or positional relationship indicated by orientation words such as "front, back, up, down, left, right", "horizontal, vertical, perpendicular, horizontal" and "top, bottom" is usually based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present invention and simplifying the description. Without contrary description, these orientation words do not indicate and imply that the device or element referred to must have a specific orientation or be constructed and operated in a specific orientation, so it cannot be understood as a limitation on the protection scope of the present invention; the orientation words "inside, outside" refer to the inside and outside relative to the contour of each component itself.
[0072] For ease of description, spatial relative terms such as "above", "over", "on the upper surface", "upper" etc. may be used herein to describe the spatial positional relationship of one device or feature to other devices or features as shown in the figures. It should be understood that the spatial relative terms are intended to encompass different orientations in use or operation in addition to the orientation depicted in the figures. For example, if the device in the figures is inverted, a device described as "above" or "over" other devices or structures will then be positioned "below" or "under" the other devices or structures. Thus, the exemplary term "above" can include both orientations of "above" and "below". The device may also be positioned in other different ways (rotated 90 degrees or in other orientations), and corresponding interpretations of the spatial relative descriptions used herein will be made accordingly.
[0073] In addition, it should be noted that the use of terms such as "first", "second" etc. to define components is only for the convenience of differentiating the corresponding components. Without additional statements, the above terms have no special meanings, and thus should not be construed as limiting the protection scope of the present invention.
[0074] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, the present invention can have various modifications and changes. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for simulating and demonstrating a game scenario based on a visual knowledge graph, characterized in that, the method comprises: S1. Obtain game scenario data; S2. Define entities in the game scenario data through ontology modeling to obtain entity types and relationships between entities; S3. Classify and label entities in the game scenario data according to the entity types, and construct triples according to the relationships between the entities; S4. Visualize the game scenario knowledge graph according to the triples and the position information of the entities.
2. The method according to claim 1, characterized in that, the obtaining of the game scenario data in S1 includes: Obtain game news data and game encyclopedia data.
3. The method according to claim 1, characterized in that, the defining of entities in the game scenario data through ontology modeling in S2 to obtain entity types and relationships between entities includes: S21. Extract entities in the game scenario data through expert knowledge; S22. Define the entity types of entities in the game scenario; S23. Define the relationships between the entities.
4. The method according to claim 3, characterized in that, the entity types include location, place and unit type, and the relationships between the entities include rescue, attack, assistance and command.
5. The method according to claim 4, characterized in that, the classifying and labeling of entities in the game scenario data according to the entity types and constructing triples according to the relationships between the entities in S3 includes: S31. Classify and label entities in the game scenario data according to the entity types; S32. Form triples by combining entities according to the relationships between the entities.
6. The method according to claim 5, characterized in that, the visualizing of the game scenario knowledge graph according to the triples in S4 includes: S41. Obtain a simulation diagram of the game scenario and use the simulation diagram as the background of the visual knowledge graph; S42. Extract entities in the knowledge graph according to the entity types defined in the game scenario data, and according to the positions of the entities and the simulation diagram, use Canvas and WebGL to visualize the corresponding entities and their related information in the simulation diagram, where the related information includes entity type information and triple information; S43. Use Canvas and WebGL to visually represent the relationships between entities according to the game scenario and the triple data.
7. A device for simulating and demonstrating a game scenario based on a visual knowledge graph, characterized in that, the device comprises: A data acquisition module for obtaining game scenario data; An ontology construction module for defining entities in the game scenario data through ontology modeling to obtain entity types and relationships between entities; A triple construction module for classifying and labeling entities in the game scenario data according to the entity types and constructing triples according to the relationships between the entities; A visualization module for visualizing the game scenario knowledge graph according to the triples.
8. An electronic device, the electronic device includes a processor and a memory, and at least one instruction is stored in the memory, wherein, the at least one instruction is loaded and executed by the processor to implement the method for simulating and demonstrating a game scenario based on a visual knowledge graph according to any one of claims 1-6.
9. A computer-readable storage medium, at least one instruction is stored in the storage medium, wherein, the at least one instruction is loaded and executed by a processor to implement the method for simulating and demonstrating a game scenario based on a visual knowledge graph according to any one of claims 1-6.