Interpretation Map Processing Method, Apparatus, Device, Medium and Product of an Agent

By optimizing the interpreted image processing method of the agent, using resource initialization and environmental detection information to update the interpretation image, introducing component concepts and write-on-write copy technology, solving the problem of understanding the high complexity of translation image processing, and achieving efficient and accurate interpretation image representation and processing.

CN119740601BActive Publication Date: 2025-07-29BEIJING INSTITUTE FOR GENERAL ARTIFICIAL INTELLIGENCE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510246877.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-04
Publication Date
2025-07-29
Estimated Expiration
2045-03-04

AI Technical Summary

Technical Problem

In the prior art, the interpretation diagram processing of the agent has the problems of high complexity, low processing efficiency, and difficulty in accurately describing complex or new objects, and a narrow coverage range.

Method used

The first interpretation diagram is generated by obtaining the resource initialization of the agent, and the second interpretation diagram is generated based on the preset interpretation diagram representation rules and environmental detection information. The representation rules of the relationship between objects and objects are adopted, the component concept is introduced, and memory management is optimized using write-on-write copy technology, and the processing complexity is reduced in combination with streaming incremental analysis.

Benefits of technology

The time complexity of the translation process is reduced from O(n) to O(1), which improves processing efficiency and accuracy, and can flexibly and efficiently represent and process complex or new objects, reduces the cost of calculation, and avoids the high costs brought by cascade creation and destruction operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119740601B_ABST
    Figure CN119740601B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method for processing an agent's interpretation graph, which can be applied to the field of artificial intelligence technology. The method for processing the agent's interpretation graph includes: obtaining a first interpretation graph generated by the resource initialization operation of the agent; updating the first interpretation graph according to a preset interpretation graph representation rule and the detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for the object information and the relationship between objects of the second interpretation graph; and performing processing on the second interpretation graph. An embodiment of the present invention also provides an apparatus, a device, a storage medium, and a program product for processing the agent's interpretation graph.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and more specifically to a method, device, equipment, medium and product for processing interpretation graphs of an intelligent agent. Background Art

[0002] Artificial Intelligence (AI) is a key driving force behind the new scientific and technological revolution and industrial transformation. It is a new, critical technical discipline that studies and develops theories, methods, technologies, and application systems for simulating, extending, and expanding human intelligence. As a key component of intelligence science, AI aims to understand the essence of intelligence and produce new intelligent machines (i.e., agents) that can respond in a manner similar to human intelligence.

[0003] As a crucial vehicle for intelligent agents to understand and comprehend environmental information, the interpretation map dynamically updates as the agent perceives changes in the environment. This allows the agent to accurately comprehend the environment and perform intelligent behaviors. Processing the interpretation map is crucial in this process. Existing techniques for processing interpretation maps by intelligent agents incur high processing costs and often lack accurate descriptions of complex, new objects. Overall, interpretation map processing is inefficient and covers a narrow range of objects. Summary of the Invention

[0004] In view of at least one of the above problems, embodiments of the present invention are directed to methods, devices, equipment, media, and products for processing interpretation graphs that can significantly reduce the complexity of interpretation graph processing and thereby greatly improve the efficiency of interpretation graph processing.

[0005] One aspect of an embodiment of the present invention provides a method for processing an interpretation graph of an intelligent agent, which includes: obtaining a first interpretation graph generated by the resource initialization operation of the intelligent agent; updating the first interpretation graph according to preset interpretation graph representation rules and detected environmental detection information to generate a second interpretation graph, wherein the preset interpretation graph representation rules are representation rules for object information and relationships between objects in the second interpretation graph; and performing processing on the second interpretation graph.

[0006] According to one embodiment of the present invention, in obtaining the first interpretation graph generated by the resource initialization operation of the intelligent agent, it includes: applying for the corresponding virtual memory through the preset operating system; marking all virtual memory pages in the virtual memory as private; initializing the memory allocator according to the base address and capacity of the virtual memory after the marking is completed to obtain the first interpretation graph.

[0007] According to an embodiment of the present invention, in updating the first interpretation graph according to a preset interpretation graph representation rule and the detected environmental detection information to generate a second interpretation graph, it includes: updating the first interpretation graph according to the object-centered memory storage layout method in the preset interpretation graph representation rule and the object information of the environmental detection information to generate a second interpretation graph; and / or updating the first interpretation graph according to the component-centered memory storage layout method in the preset interpretation graph representation rule and the object information of the environmental detection information to generate a second interpretation graph.

[0008] According to an embodiment of the present invention, in updating the first interpretation graph according to a preset interpretation graph representation rule and the detected environmental detection information to generate a second interpretation graph, it further includes: updating the first interpretation graph according to the representation method of the relationship between objects in the preset interpretation graph representation rule and the relationship information between objects of the environmental detection information to generate a second interpretation graph.

[0009] According to an embodiment of the present invention, in processing the second interpretation graph, it includes: performing a modification operation on the second interpretation graph according to a preset streaming incremental processing rule.

[0010] According to an embodiment of the present invention, in processing the second interpretation graph, it includes: when it is found that the corresponding virtual memory capacity is insufficient during the execution of the modification operation of the second interpretation graph, performing an expansion operation.

[0011] According to an embodiment of the present invention, in processing the second interpretation graph, it further includes performing a copy operation on the second interpretation graph to generate a third interpretation graph, which includes: applying for virtual memory of the third interpretation graph with the same capacity as the second interpretation graph through a preset operating system, and mapping the data content of the second interpretation graph to the virtual memory pages of the virtual memory of the third interpretation graph; marking all virtual memory pages in the virtual memory of the second interpretation graph and all virtual memory pages in the virtual memory of the third interpretation graph as shared; copying the memory allocator of the second interpretation graph into the third interpretation graph, and then correcting the base address of the virtual memory of the memory allocator of the third interpretation graph to the base address of the virtual memory of the third interpretation graph.

[0012] According to an embodiment of the present invention, in processing the second interpretation graph, it further includes: in response to the destruction instruction of the second interpretation graph, releasing the virtual memory of the second interpretation graph through a preset operating system.

[0013] Another aspect of an embodiment of the present invention provides a device for processing an interpretation graph of an agent, which is characterized by including a resource initialization module, an interpretation graph representation module, and an interpretation graph processing module. The resource initialization module is configured to obtain a first interpretation graph generated by a resource initialization operation of the agent; the interpretation graph representation module is configured to update the first interpretation graph according to a preset interpretation graph representation rule and detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for object information and relationships between objects in the second interpretation graph; and the interpretation graph processing module is configured to perform processing on the second interpretation graph.

[0014] Another aspect of an embodiment of the present invention provides an electronic device, including one or more processors and a memory, where the memory is configured to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the above-mentioned method for processing an interpretation graph of an agent.

[0015] Another aspect of an embodiment of the present invention provides a computer-readable storage medium, on which executable instructions are stored, and when the instructions are executed by a processor, the processor is caused to execute the above-mentioned method for processing an interpretation graph of an agent.

[0016] Another aspect of an embodiment of the present invention provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned method for processing an interpretation graph of an agent is implemented.

[0017] The method for processing an interpretation graph of an agent provided by an embodiment of the present invention can at least partially solve the problems of relatively high complexity, low processing efficiency, and poor processing accuracy existing in the process of processing an interpretation graph in the related art, and thus can at least achieve one of the following technical effects:

[0018] (1) The copy and destruction operations of the interpretation graph can be transformed into management and release operations of underlying memory pages, and at the same time, with the copy-on-write of virtual memory pages, a large amount of memory data copying brought about by the interpretation graph copy operation is eliminated. Finally, the time complexity of the copy and destruction operations of the interpretation graph is reduced from O(n) to O(1), where n represents the number of objects in the interpretation graph.

[0019] (2) The concept of components is introduced through the representation rules of objects and the relationships between objects. Each component can represent a functional or attribute unit, and each object can be composed of several components. Through the combination of components, some new types of objects that are multifunctional, complex, and cannot be anticipated in advance during design can be represented (n components can combine to form 2^n different types of objects), and the types of objects that can be represented increase exponentially with the number of component types. For the users of the interpreted graph (such as planners), when their internal logic only depends on components, they can easily generalize to newly emerged types of objects. Through the component-centered memory layout method, it is ensured that the component data of the same type is continuous in memory, with a high cache hit rate during traversal, and it is also convenient to perform parallel processing using multi-core CPUs or GPUs.

[0020] (3) The relationship table is further introduced through the representation rules of objects and the relationships between objects. The relationship table can record the {source - relationship descriptor - target} 3-tuple relationship pairs, and the relationship descriptors are divided into 4 types: 1-to-1, 1-to-N, N-to-1, and N-to-N. Therefore, the relationship table can support the following operations with a complexity of O(1): relationship conflict detection, querying the relationships owned by an object (forward / backward), and querying the source sets of relationships (forward / backward).

[0021] (4) Through streaming incremental parsing, the calculation scope can be narrowed from all objects and component sets to the objects and component sets that have changed, further reducing the complexity of processing or updating operations on the interpreted graph.

[0022] Therefore, the interpreted graph processing method of the embodiments of the present invention can enable the interpreted graph of the intelligent agent to more accurately and comprehensively reflect the objective information of the real environment, achieving the effect of flexibly and efficiently representing and processing the interpreted graph, greatly reducing the complexity of the interpreted graph processing operations, and also avoiding the high computational cost caused by the cascade creation, copying, destruction, etc. of a large number of small objects due to interpreted graph processing operations (such as copying and destruction, etc.); moreover, it can accurately describe newly emerged multifunctional or more complex new types of objects, avoid inconsistent situations such as missing or redundant attributes, and can achieve more efficient batch processing, greatly reducing the computational cost.

[0023] It should be understood that the above general description and the following specific embodiments are only exemplary and explanatory, and they do not limit the scope of what the present invention intends to claim. Brief Description of the Drawings

[0024] Through the following description of the embodiments of the present invention with reference to the accompanying drawings, the above content and other objectives, features, and advantages of the present invention will become clearer. In the drawings:

[0025] Figure 1Schematically shows an application scenario diagram of a method, apparatus, device, medium, and program product for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0026] Figure 2A Schematically shows a flowchart of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0027] Figure 2B Schematically shows a specific application scenario diagram of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0028] Figure 3A Schematically shows a copy-on-write scenario diagram of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0029] Figure 3B Schematically shows an interpretation graph initialization scenario diagram of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0030] Figure 3C Schematically shows a scenario diagram of representing an interpretation graph centered on an object of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0031] Figure 3D Schematically shows a scenario diagram of representing an interpretation graph centered on a component of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0032] Figure 3E Schematically shows a structural diagram of an interpretation graph relationship table of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0033] Figure 4A Schematically shows a structural diagram of an interpretation graph pointer of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0034] Figure 4B Schematically shows a virtual memory expansion scenario diagram of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0035] Figure 4C Schematically shows an interpretation graph copying scenario diagram of a method for processing an interpretation graph of an agent according to an embodiment of the present invention;

[0036] Figure 5 Schematically shows a structural block diagram of an interpretation graph processing apparatus of an agent according to an embodiment of the present invention; and

[0037] Figure 6 Schematically shows a block diagram of an electronic device suitable for implementing a method for processing an interpretation graph of an agent according to an embodiment of the present invention.

[0038] The above-mentioned accompanying drawings are part of the specification of the embodiments of the present invention, which illustrate exemplary embodiments of the present invention. The accompanying drawings, together with the description of the specification, are used to explain the principles of the embodiments of the present invention. It should be understood that the above general description of the accompanying drawings and the following detailed description are only exemplary and explanatory, and they do not limit the scope of what the present invention claims. Detailed Description

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer and more understandable, the following will clearly explain the spirit of what is disclosed in the present invention with reference to the accompanying drawings and detailed description. Any person skilled in the relevant technical field, after understanding the embodiments of the content of the present invention, can make changes and modifications to the techniques taught by the content of the present invention, which do not depart from the spirit and scope of the content of the present invention.

[0040] The exemplary embodiments of the present invention and their descriptions are used to explain the present invention, but do not limit the present invention. In addition, the same or similar reference numerals for elements / components used in the accompanying drawings and embodiments represent the same or similar parts.

[0041] Regarding the use of "first", "second",... etc. in the present invention, it does not particularly refer to the order or sequence, nor is it used to limit the present invention. It is only used to distinguish elements or operations described with the same technical terms.

[0042] Regarding the directional terms used in the present invention, such as: up, down, left, right, front or back, etc., they are only references to the directions in the accompanying drawings. Therefore, the directional terms used are for explanation and not for limiting the present creation.

[0043] Regarding the use of "comprising", "including", "having", "containing", etc. in the present invention, they are all open-ended terms, that is, they mean including but not limited to.

[0044] Regarding the use of "and / or" in the present invention, it includes any one or all combinations of things.

[0045] Regarding "a plurality of" in the present invention, it includes "two" and "more than two"; regarding "a plurality of groups" in the present invention, it includes "two groups" and "more than two groups".

[0046] Regarding the terms "substantially", "about", etc. used in the present invention, they are used to modify any quantity or error that can vary slightly, but these slight variations or errors will not change their essence. Generally, the range of such slight variations or errors modified by such terms can be 20% in some embodiments, 10% in some embodiments, 5% in some embodiments, or other values. Those skilled in the art should understand that the aforementioned values can be adjusted according to actual needs and are not limited thereto.

[0047] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those of ordinary skill in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0048] In cases where expressions similar to "at least one of A, B, and C, etc." are used, generally, it should be interpreted according to the meaning commonly understood by those of ordinary skill in the art (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.). Those of ordinary skill in the art should also understand that substantially any disjunctive conjunction and / or phrase representing two or more alternative items, whether in the specification, claims, or drawings, should be understood as giving the possibility of including one of these items, either of these items, or both items. For example, the phrase "A or B" should be understood as including the possibility of "A" or "B", or "A and B".

[0049] In the field of artificial intelligence technology, a Parse Graph is a way to describe the environment in which an agent is located. The Parse Graph contains both objective information in the environment (such as the objects in the environment, and the attributes of the objects, such as category, function, quantity, coordinates, color, shape, etc.), as well as the relationships between objects (such as spatial relationships like support and attachment) and the motion states of objects (speed, direction, posture, and actions of movement, etc.); at the same time, the Parse Graph can also contain subjective information of the agent about these objects (such as the friendliness and ownership of the objects, etc.). Therefore, the Parse Graph is the key data for an agent to be able to recognize and understand the world.

[0050] The Parse Graph can be dynamically updated as the environment changes, enabling the agent to understand the environment with the help of the Parse Graph, and at the same time, combined with the agent's own goals and tasks, to perform behaviors such as learning, cognition, and planning. In this process, the agent will frequently read, copy, modify, and destroy the Parse Graph (for example, update the objective information in the Parse Graph in the perception unit, update the subjective information in the Parse Graph in the cognition unit, and copy and modify the Parse Graph in the planning unit to achieve simulation), so it is very crucial to represent and process the Parse Graph flexibly and efficiently.

[0051] The Parse Graph usually can contain a large number of objects, and each object can usually be composed of one or more small objects (or structures, with different terms in different programming languages) in the computer. Due to requirements such as cognition and simulation, the agent will perform operations such as copying and destroying the Parse Graph. However, these operations often cause a large number of cascaded creations, copies, and destructions of small objects, resulting in a high computational cost.

[0052] Moreover, when representing objects in an interpretation graph, conventional solutions often use an object type plus several loosely distributed attributes. This leads to the following three situations: (1) Since object types usually come from a pre-determined set, such as "refrigerator, microwave oven, oven, chair, bed, toy, book, etc.", for some newly emerging multi-functional or complex objects, such as "combination microwave, steam, grill and fryer" and "multi-functional reclining chair", they cannot be accurately described using these object types. (2) Usually, object types and attributes are stored separately, so the generator and user of the interpretation graph need to agree in advance which attributes correspond to each object type, which results in coupling between the two parties and is very likely to lead to inconsistent situations such as missing or extra attributes. At the same time, relying on object types makes it impossible for the user of the interpretation graph (such as a planner) to generalize to new objects. (3) Object information of the same type is often discontinuous in the memory address space, which also results in low batch processing efficiency.

[0053] In addition, in conventional solutions, object relationships are usually treated as object attributes. For example, to represent that a teacup is on a table, that is, there is a support relationship between the teacup and the table, a support attribute is added to the teacup and the value is set to the ID of the table. This leads to the following two problems: (1) The maintenance and query efficiency of reverse relationships is low. Taking the support relationship as an example, when there is a need to quickly query what items are on the table, a simple way is to add a reverse support relationship to the table, but this will cause the forward relationship and the reverse relationship to be scattered on different objects, easily leading to inconsistent and missing relationships; and if the reverse support relationship is not added and the support is kept as a one-way relationship, then the above reverse query requirement needs to traverse the entire interpretation graph to be realized, which results in a high computational cost. (2) When querying which items have a support relationship, it also needs to traverse the entire interpretation graph to obtain, resulting in a high computational cost.

[0054] Furthermore, considering that the interpretation graph will be continuously updated as the environment changes, each time the interpretation graph is updated, when performing full-scale processing or update operations on it, when the scale of objects is large, the computational cost is high.

[0055] In view of at least one of the above technical problems existing in the prior art, embodiments of the present invention aim at an interpretation graph processing method, device, equipment, medium and product of an intelligent agent that can significantly reduce the complexity of interpretation graph processing to greatly improve the efficiency of interpretation graph processing.

[0056] An aspect of an embodiment of the present invention provides a method for processing an agent's interpretation graph, which includes: obtaining a first interpretation graph generated by a resource initialization operation of the agent; updating the first interpretation graph according to a preset interpretation graph representation rule and detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for the object information and the relationships between objects of the second interpretation graph; and performing processing on the second interpretation graph.

[0057] Figure 1 FIG. schematically shows an application scenario diagram of a method, apparatus, device, medium, and program product for processing an agent's interpretation graph according to an embodiment of the present invention.

[0058] As Figure 1 shown, the application scenario 1000 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.

[0059] Users can use the terminal devices 101, 102, 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0060] The terminal devices 101, 102, 103 may be various electronic devices with a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.

[0061] The server 105 may be a server providing various services, such as a background management server that supports the websites browsed by users using the terminal devices 101, 102, 103 (only as an example). The background management server may analyze and process data such as received user requests, and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal devices.

[0062] It should be noted that the method for processing the interpretation graph of the agent provided by the embodiments of the present invention can generally be executed by the server 105. Correspondingly, the device for processing the interpretation graph of the agent provided by the embodiments of the present invention can generally be set in the server 105. The method for processing the interpretation graph of the agent provided by the embodiments of the present invention can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and / or the server 105. Correspondingly, the device for processing the interpretation graph of the agent provided by the embodiments of the present invention can also be set in a server or a server cluster different from the server 105 and capable of communicating with the terminal devices 101, 102, 103 and / or the server 105.

[0063] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in

[0064] are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. Figure 1 Based on the Figures 2A to 4C scenario described below, the method for processing the interpretation graph of the agent of the disclosed embodiments will be described in detail through

[0065] Figure 2A FIG. schematically shows a flowchart of the method for processing the interpretation graph of the agent according to the embodiments of the present invention.

[0066] As Figure 2A shown, one aspect of the embodiments of the present invention provides a method for processing the interpretation graph of an agent, which includes operations S201 to S203.

[0067] In operation S201, a first interpretation graph generated by the resource initialization operation of the agent is obtained;

[0068] In operation S202, the first interpretation graph is updated according to a preset interpretation graph representation rule and the detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for the object information and the relationship between objects of the second interpretation graph; and

[0069] In operation S203, processing is performed on the second interpretation graph.

[0070] The agent can be the execution subject of the method for processing the interpretation graph of the agent in the above embodiments of the present invention, or can also be the execution party controlled by the method for processing the interpretation graph of the agent. Specifically, it can be a humanoid intelligent robot or other AI devices, and usually has an actuator capable of completing specific action tasks by itself. For example, a humanoid robot can use a mechanical manipulator to complete the action task of picking up an object.

[0071] The resource initialization operation is to perform the initialization execution of necessary resources and component units (such as memory allocators, component sets, entity sets, and relationship tables, etc.) for the construction of the interpretation graph, which is used for the generation of the basic architecture of the interpretation graph. Among them, the initialization execution can specifically involve operations such as applying for virtual memory and initializing the memory allocator. Thus, it can ensure that subsequent additions of objects, components, relationships between objects, etc. can be performed on the first interpretation graph to generate the second interpretation graph.

[0072] The first interpretation graph can only have the initial composition architecture of the interpretation graph. According to the generated content of the initial architecture of the interpretation graph, subsequent further representation of environmental information nodes can be made on the first interpretation graph according to the representation rules and requirements of the interpretation graph to generate a clearer and more complete interpretation graph. The so-called environmental information nodes can be the objective information in the environment where the agent is located as shown in the current frame image obtained by the agent at the current moment. For example, the environmental information nodes can include the objects themselves, such as objective objects like humans, dogs, tables, chairs, etc., and can also include behavioral actions, such as objective behaviors like pouring water and opening cabinet doors. Among them, the first interpretation graph can include functional units that the system has for configuring the structure of the interpretation graph, such as Figure 2B As shown, the interpretation graph 300 can include a memory allocator, an entity set, a component set, and a relationship table, etc. Therefore, subsequent modification, copying, and destruction operations on the interpretation graph can be made more efficient, reducing the computational complexity of modules such as detection and reasoning that rely on the interpretation graph.

[0073] The environmental detection information is the state information generated by the agent based on the perception of the environment at the current moment, which can include the objects contained in the environment at the current moment and the attribute information of the objects (such as category, function, quantity, coordinates, color, shape, etc.), the relationship information between objects (such as spatial relationships like support and attachment), the motion state information of the objects (such as speed, direction, posture, and actions, etc.), and the subjective information of the agent (such as friendliness, belonging, etc.). Among them, the environmental detection information can be obtained through the visual and tactile sensors of the agent. For example, the agent directly detects through "two eyes" (such as a camera), "two ears" (such as a microphone), and "two hands" (such as a dexterous hand).

[0074] According to the information content of the obtained environmental detection information, the content of the first interpretation graph can be represented and processed to form the second interpretation graph. The second interpretation graph can be an interpretation graph composition architecture that improves the environmental node information such as objects, object attributes, relationships between objects, motion states of objects, and subjective understanding information of the agent, as well as the relationships between nodes, based on the basic architecture of the interpretation graph of the first interpretation graph, and can be used to comprehensively represent the objective information of the environment where the agent is located in the current frame image and the subjective understanding information of the agent. The second interpretation graph can be continuously updated according to the changes in the environmental state detected by the agent to add new nodes and new node relationships.

[0075] The object information of the second interpretation graph can be the information of each object and its corresponding object components in the second interpretation graph. Here, a component can be a functional unit or information unit of an object. For example, a refrigerator and its function of refrigeration. Correspondingly, the relationship between objects in the second interpretation graph can be the interaction relationship between objects in the second interpretation graph. For example, a cup is on a table, and the table has a supporting relationship with the cup. In addition, it can also include the agent's subjective understanding information of the relationship between objects. For example, after seeing the cup on the table, the agent can infer that there may be water in the cup.

[0076] The processing of the second interpretation graph can include operations such as reading, modifying, copying, updating, and destroying the interpretation graph. Specifically, it can be executed by control units such as the agent's sensor and planner according to actual scenario requirements (such as cognition, simulation, etc.). Specifically, it can involve the copying, deletion, modification of each node in the second interpretation graph and the update of the relationships between nodes.

[0077] By performing representation on the first interpretation graph according to the above preset interpretation graph representation rules based on object information and the relationship between objects, compared with the traditional solution that usually represents object relationships as object attributes, the complexity of the interpretation graph processing operation can be reduced; at the same time, it can also accurately describe various newly emerging multifunctional complex objects; and it realizes the effect of flexibly and efficiently representing and processing the interpretation graph.

[0078] Figure 2B A specific application scenario diagram of the interpretation graph processing method of the agent according to an embodiment of the present invention is schematically shown.

[0079] As Figures 2A - 4C shown, according to an embodiment of the present invention, in the first interpretation graph generated by the resource initialization operation of the agent obtained in operation S201, it includes:

[0080] In response to a start instruction or a wake-up instruction, detect environmental detection information.

[0081] For the agent, detecting environmental detection information can be performed according to the received start instruction or wake-up instruction. Among them, the start instruction or wake-up instruction can be a control instruction for controlling the agent's perception sensor (such as a camera, etc.) to detect the state information of the environment where the agent is currently located. When the agent's sensor 100 receives the start instruction or wake-up instruction, it can control the agent's perception sensor to detect and identify the environment, such as obtaining data such as audio, RGB images, depth maps, etc., as Figure 2B the detection and identification of the sensor 100 in operation S220 shown.

[0082] Among them, when the intelligent agent is powered on for the first time, it can generate the startup instruction according to the power-on instruction and send it to the sensor 100 of the intelligent agent for performing perception on the control environment; in some other scenarios, the intelligent agent can also generate the wake-up instruction according to the voice control instruction of the user and send it to the sensor 100, so that the intelligent agent can perform detection and recognition of the environment according to the task content of the target included in the wake-up instruction. For example, when the user suddenly issues a voice control instruction to the intelligent agent, the intelligent agent turns its head towards the user according to the voice control instruction, generates a wake-up instruction, and the sensor can control the intelligent agent to perform detection on the environmental state and its changes from the turning process to seeing the user; the intelligent agent can stop performing environmental detection after the target and task are completed, so as to operate in a low-power mode to save power before receiving new targets and tasks. It should be noted that some intelligent agents may continuously perform environmental detection before shutting down for safety reasons.

[0083] Through the perception and detection of the environment, the original media information collected by each sensor controlled by the sensor can be obtained, such as media information such as audio, RGB images, depth maps, etc. Among them, after parsing and feature extraction of the original media information, the basic information in the environment where the intelligent agent is located can be determined, such as the people, objects, pets, etc. that exist, and can also include the corresponding action behaviors of these people, objects, pets, etc. and some directly related attribute information (such as a moving car has wheels). These basic information can be added to the first interpretation graph or updated to the second interpretation graph according to the above preset interpretation graph representation rules to form the second interpretation graph corresponding to the current environment.

[0084] Among them, as Figure 2B shown, the interpretation graph 300 can include a memory allocator, an entity set, a component set, a relationship table, etc. These components in the first interpretation graph are in a ready state after initialization and do not yet contain data such as object information and relationships between objects in the environment. Among them, the entity set can be understood as a set of identifiers or identification IDs of objects.

[0085] In response to the startup / wake-up instruction of the intelligent agent, after the initialization operation of the interpretation graph, the first interpretation graph is formed. Among them, it involves the initialization of the necessary resources and constituent units (memory allocator, component set, relationship table, etc.) of the interpretation graph, such as operations of applying for virtual memory and initializing the memory allocator. Thus, it is ensured that objects, components, and relationships can be added to the interpretation graph next to form the second interpretation graph.

[0086] In the embodiment of the present invention, as Figure 2BAs shown, the processing flow for the interpretation graph actually depends on the processing flows of the perceptron 100 and the planner 200. For example, operations such as cognitive reading, simulation, and execution actions for the interpretation graph can reflect various operation methods such as initialization, modification, and copying on the interpretation graph. In addition, the destruction processing operation of the interpretation graph can be implemented based on resource management, such as Figure 2B the operations S230 - S270 shown. Among them, the data content of the interpretation graph can be stored on virtual memory pages in memory. For the modification and update operations of the interpretation graph, they can be implemented based on virtual memory pages with the copy-on-write function.

[0087] Figure 3A Schematically shows a copy-on-write scenario graph of the interpretation graph processing method of the agent according to an embodiment of the present invention.

[0088] As Figure 3A shown, the virtual memory can contain multiple virtual memory pages, and each virtual memory page can have the copy-on-write function. Among them, copy-on-write depends on the following execution principles: First, it is necessary to consider that a shared flag is designed for each virtual memory page, and this shared flag has two state values: private and shared. Among them, the virtual memory page in the private state can directly perform write operations; for the virtual memory page in the shared state, when performing a write operation, it is necessary to first copy the physical memory page corresponding to this virtual memory page, map this virtual memory page to the newly copied physical memory page, set the shared flag to private, and then perform the write operation.

[0089] Therefore, by means of the execution of this copy-on-write for virtual memory pages, the copy and destruction operations of the interpretation graph can be transformed into remapping and releasing operations of the underlying memory pages, eliminating a large amount of memory data copying brought by the interpretation graph copy operation. Finally, the time complexity of the copy and destruction operations of the interpretation graph is reduced from O(n) to O(1), where n represents the number of objects in the interpretation graph.

[0090] Therefore, in response to the start / wake-up instruction of the agent, the basic skeleton of the first interpretation graph is determined, making the subsequent modification, copying, and destruction operations of the interpretation graph more efficient and reducing the computational complexity of modules such as detection and reasoning that depend on the interpretation graph.

[0091] Figure 3B Schematically shows a scenario graph of the initialization of the interpretation graph of the interpretation graph processing method of the agent according to an embodiment of the present invention.

[0092] As Figures 2A - 4C shown, according to an embodiment of the present invention, in the first interpretation graph obtained by operating S201 to acquire the resource initialization operation of the agent, it includes:

[0093] Apply for corresponding virtual memory through a preset operating system;

[0094] Mark all virtual memory pages in the virtual memory as private;

[0095] Initialize the memory allocator according to the base address and capacity of the virtual memory after the marking is completed, so as to obtain the first interpretation graph.

[0096] As Figure 2B shown in operation S210, for the construction of the first interpretation graph, before creating the second interpretation graph, it is necessary to perform a resource initialization operation to generate the initial architecture of the interpretation graph, so as to obtain the first interpretation graph.

[0097] First, as Figure 3B shown, apply for the virtual memory required for this first interpretation graph. Among them, a section of virtual memory can be applied through the API interface of a preset operating system, and the capacity of this virtual memory can be determined according to the size of the second interpretation graph estimated in advance. This operating system API (such as mmap on the Linux operating system) must meet the following requirements: this API only reserves the virtual memory of the corresponding capacity, but does not actually allocate the physical memory of the corresponding capacity. Only when the first write operation occurs on the virtual memory page of this virtual memory, the corresponding physical memory page is allocated. Therefore, the time complexity of this operation has nothing to do with the capacity of the applied memory. Among them, the preset operating system can be a platform for the normal operation and control of the agent, such as operating systems like Linux.

[0098] After that, perform memory page marking on all virtual memory pages of the applied virtual memory, and mark them all as private, as Figure 3B shown, memory pages #1 to #3 in the virtual memory of the interpretation graph are all marked as private.

[0099] After the virtual memory page completes the private marking operation, initialize the memory allocator with the base address and virtual memory capacity of the applied virtual memory, as Figure 2B shown in the memory allocator of the interpretation graph 300. Among them, the memory allocator is used to manage the virtual memory and is used to implement the allocation of the virtual memory by the memory allocator. In the embodiment of the present invention, this memory allocator itself can be located within this virtual memory. Of course, in other application scenarios, the memory allocator can also be designed to be outside the virtual memory. Among them, this memory allocator can select any memory allocation algorithm according to needs. For example, if the interpretation graph does not need to be concurrently read and written, a non-concurrent-safe memory allocation algorithm can be selected to improve the allocation efficiency.

[0100] At the end of the initialization operation, through the memory allocator that has completed the initialization operation, the initialization operation of the relevant containers for interpreting the object information stored in the graph and the relationships between objects can be performed, resulting in a relationship table, a component set, and an object set (entity set) with a size of 0. The relevant containers can include arrays, sets, dictionaries, smart pointers, etc. These containers can be understood as functional modules or units for performing modification operations such as object and object relationship adjustment on the interpreted graph.

[0101] Therefore, through the resource initialization operation in the generation process of the above-mentioned first interpreted graph, many functions of the first interpreted graph can be realized through the management of virtual memory pages (remapping, copy-on-write, release). At the same time, it can also make the time complexity of the subsequent operations on the interpreted graph independent of the virtual memory capacity applied, ensuring that the time complexity of the processing process of the second interpreted graph can be reduced from O(n) to O(1), greatly improving the processing efficiency of the interpreted graph.

[0102] Among them, it should be noted that considering that the agent can run continuously after the first power-on, constantly performing the cycle of perception, cognition, and planning. After the self-initialization operation and the generation of the first interpreted graph, it starts to continuously update the interpreted graph according to the obtained environmental state change data. As Figure 2B shown, in the resource initialization process of operation S210, a basic structure of the interpreted graph can be generated as the first interpreted graph according to the above initialization operation. Then, in operation S220, through the detection and recognition of the environment by the sensor 100, the original media data (such as audio, RGB images, depth images, etc.) and the basic environmental information detected therefrom (such as object information and the relationships between objects) can be obtained. Therefore, these data can be used to modify and process the first interpreted graph that has undergone the initialization operation (such as adding new objects, establishing relationships between objects, etc.) to construct the second interpreted graph.

[0103] Furthermore, on the basis of the first interpreted graph, after the construction of the second interpreted graph is completed, the second interpreted graph can also be continuously updated according to the continuous detection and recognition of the environment by the sensor 100 in the above Figure 2B shown operation S220. According to the obtained detection and recognition data, the self-update operation of the second interpreted graph is continuously realized, so that the second interpreted graph is constantly adjusted and changed, and can accurately describe the latest environmental state in a timely manner.

[0104] Figure 3C Schematically shows a scene graph representing the interpreted graph of the agent according to an embodiment of the present invention with objects as the center. Figure 3D Schematically shows a scene graph representing the interpreted graph of the agent according to an embodiment of the present invention with components as the center.

[0105] As Figures 2A - 4C shown, according to an embodiment of the present invention, in operation S202, updating the first interpretation map according to a preset interpretation map representation rule and the detected environmental detection information to generate a second interpretation map includes:

[0106] Updating the first interpretation map according to the object-centered memory storage layout method in the preset interpretation map representation rule and the object information of the environmental detection information to generate a second interpretation map; and / or

[0107] Updating the first interpretation map according to the component-centered memory storage layout method in the preset interpretation map representation rule and the object information of the environmental detection information to generate a second interpretation map.

[0108] In an embodiment of the present invention, the preset interpretation map representation rule may include an object-centered memory storage layout method, which can be understood as a rule that different types of component data belonging to the same object are closer in memory layout, so as to generate a second interpretation map based on the first interpretation map; in addition, it may also include a component-centered memory storage layout method, which can be understood as a rule that the same type of component data from different objects are closer in memory layout, so as to generate a second interpretation map based on the first interpretation map. Both representation methods of the interpretation map can realize the interpretation map representation of environmental objects.

[0109] Among them, the component in the embodiment of the present invention may be a functional unit or information unit of an object, and each component may contain attribute information strongly related to the function or information unit. The object can be represented by combining components. Therefore, an object can be composed of multiple components. A corresponding component will be mounted on the object if and only if the object has the corresponding function and information unit. Among them, the object information of the environmental detection information may be the corresponding information of each object and object component in the environmental detection data.

[0110] Therefore, some multifunctional, complex, and unforeseeable objects during design can be represented by the combination of the above components (n components can combine into 2^n different types of objects), and the types of objects that can be represented increase exponentially with the number of component types. For the user of the interpretation map (such as a planner), when its internal logic only depends on components, it can be easily generalized to new types of objects that have never been seen before.

[0111] First, for the object-centered memory storage layout method, the object stores the mapping from the component types it mounts to the component data. As Figure 3CAs shown, object #1 can be represented by component data #1A, #1B, and component data #1D. For each component type, a corresponding component index can be optionally established, which records the object ID that has mounted this component type and the corresponding component data pointer. For example, Figure 3C As shown, according to the component A-index, it can be determined that the object IDs corresponding to this component A include object #1 to object #3, and the component pointers corresponding to each object are respectively represented as pointer #1A to pointer 3A. Therefore, through this component index, the list of objects that have mounted this component type can be quickly queried, or this component type can be quickly batch processed.

[0112] In addition, for the memory storage layout method centered on components, the component data of the same type from different objects can be stored in containers such as arrays or hash tables to ensure that the component data of the same type is continuous in memory space. The container type does not have to be fixed, and the container type used by the underlying lock can be automatically switched according to the sparsity of the components. For example, if a certain component is relatively dense (almost all objects have mounted this component), an array can be used for storage; if a certain component is relatively sparse (only a very small number of objects have mounted this component), a hash table is used for storage. For each object, an index can be optionally established to record the component types that the object has mounted (owns) to quickly query the list of components owned by the object. For example, Figure 3D As shown, for component A, it can be represented in terms of both the object ID and the component data. Object #1 with object ID #1 can mount the component data #1A of component A, the component data #1B of component B, and the component data #1D of component D. Therefore, by implementing the representation of objects in this way, the list of components owned by each object can be quickly queried.

[0113] In the embodiments of the present invention, there may further be a situation where the above-mentioned object-centered memory storage layout method and the component-centered memory storage layout method are mixed, that is, some components use the component-centered memory storage layout method for object representation, and the remaining components can use the object-centered memory storage layout method to perform object representation.

[0114] The advantage of the object-centered memory storage layout method is that it is relatively simple to implement. The advantage of the component-centered memory storage layout method is that it ensures that the component data of the same type is continuous in memory, has a high cache hit rate during traversal, and is also convenient for parallel processing using multi-core CPUs or GPUs.

[0115] In summary, in the above-described interpretation graph processing method according to the embodiments of the present invention, by introducing the concept of components, each component represents a functional or attribute unit, and each object is composed of several components. Through the combination of components, some new types of objects that are multifunctional, complex, and cannot be anticipated in advance during design can be represented (n components can combine to form 2^n different types of objects), and the types of objects that can be represented increase exponentially with the number of component types. For the user of the interpretation graph (such as a planner), when its internal logic only depends on components, it can be easily generalized to newly emerging objects. Through the component-centered memory layout method, it is ensured that component data of the same type is continuous in memory, the cache hit rate is high during traversal, and it is also convenient to perform parallel processing using a multi-core CPU or GPU.

[0116] Figure 3E FIG. schematically shows a structural diagram of an interpretation graph relationship table of an interpretation graph processing method of an agent according to an embodiment of the present invention.

[0117] As Figures 2A - 4C shown, according to an embodiment of the present invention, in operation S202 of updating the first interpretation graph according to the preset interpretation graph representation rule and the detected environment detection information to generate a second interpretation graph, it further includes:

[0118] Updating the first interpretation graph according to the representation manner of the relationship between objects in the preset interpretation graph representation rule and the relationship information between objects in the environment detection information to generate a second interpretation graph.

[0119] For the representation of the relationship between objects in the second interpretation graph, as Figure 3E shown, the relationship is split from the object and the attribute, and a new relationship table is added to manage the relationship between objects. This relationship table records all the relationships between objects, and each relationship is recorded with two positive and negative 3-tuples ("source, relationship descriptor, and target" and "target, reverse relationship descriptor, and source"). The relationship 3-tuples are stored in an associative container (such as a hash table) with "source, relationship descriptor" as the key and "target" as the value. As Figure 3E shown in the relationship 3-tuple list, source #1, relationship descriptor R1, and target #2, as well as the corresponding source #2, reverse relationship descriptor R1, and target #1. Therefore, the time complexity of querying the set of forward relationships and the set of reverse relationships of an object is both O(1). Among them, the relationship information between objects in the environment detection information can be the interaction relationship information between objects.

[0120] Among them, relationship descriptors can be classified into the following four categories: 1-to-1, 1-to-N, N-to-1, and N-to-N. Each time a relationship is inserted into the relationship table, it is detected whether the type constraints of the relationship descriptor are violated (for example, for a 1-to-N relationship descriptor, multiple sources cannot be related to the same target). At the same time, there is a built-in relationship index in the relationship table. When inserting a relationship, the relationship index will record the relationship descriptor and the corresponding source object at the same time, such as Figure 3E the source sets #1 and #2 corresponding to the relationship descriptor R1 shown.

[0121] Since the conflict detection of the insert operation is implemented by querying the above-mentioned relationship triple associative container, the time complexity of the insert operation of the relationship table is also O(1). Because of the existence of the relationship index, the complexity of querying the set of objects with a specific relationship is also O(1).

[0122] By detecting the relationship descriptor constraints during insertion, errors can be exposed in a timely manner, making it easier to locate relationship errors and inconsistencies. Moreover, the time complexity of operations such as querying, inserting, and deleting relationships is all O(1), making the traversal operation on the relationship graph very efficient (such as detecting whether a relationship forms a cycle). In addition, all relationships are stored in the relationship table. Compared with the way of being scattered in object attributes or components, it enables relationships to be centrally and uniformly processed (such as relationship graph drawing or serialization), and when adding or deleting relationship descriptors, there is no need to modify the logical implementation of the above centralized and unified processing. Finally, by introducing the relationship table, the relationship table can record the {source-relationship descriptor-target} triple relationship pair, and the relationship descriptors are divided into 4 types: 1-to-1, 1-to-N, N-to-1, and N-to-N. Therefore, the relationship table can support the following three operations with a complexity of O(1): relationship conflict detection, querying the relationships owned by an object (forward / backward), and querying the source sets of relationships (forward / backward).

[0123] Through the above representation of the relationship between objects, the subsequent processing of the generated second interpretation graph can greatly reduce the processing complexity, significantly reduce the coupling between the intelligent agent planner and the sensor, and improve the generality of both.

[0124] As Figures 2A - 4C shown, according to an embodiment of the present invention, in the process of performing processing on the second interpretation graph in operation S203, it includes:

[0125] Performing a modification operation on the second interpretation graph according to a preset streaming incremental processing rule.

[0126] As Figure 2BAs shown, in operation S230, the second interpreted graph can be subjected to streaming incremental processing by the perceptron 100, mainly involving operations such as modification and update, such as updating entity, component, or relationship tables, and involving modifications to these entities, components, or relationship tables.

[0127] Considering that the second interpreted graph will be continuously updated as the agent continuously detects changes in the environmental state, each time the interpreted graph is updated, when performing full-scale processing or update operations on it, when the object scale is large, the computational cost is high.

[0128] Suppose there is the following operation on the interpreted graph: This operation needs to calculate whether there is a support relationship between any two objects based on information such as the position and shape of the objects (for example, a teacup placed on a table is regarded as having a support relationship between the teacup and the table). When this operation needs to be performed on all objects on the interpreted graph, its complexity is O(n^2), where n is the number of objects in the interpreted graph.

[0129] When adopting the streaming incremental processing scheme, by recording the set of objects and components that have changed relative to the previous frame when each frame of the interpreted graph is updated. Subsequent processing operations only need to process the objects in the changed set, rather than processing all the objects in the interpreted graph. Among them, the preset streaming incremental processing rule can be a modification rule for modifying the current frame of the second interpreted graph based on the change difference between the previous frame of the interpreted graph and the current frame of the interpreted graph. Specifically, the change difference between the previous frame of the interpreted graph and the current frame of the interpreted graph can be obtained based on the streaming incremental parsing of the interpreted graph.

[0130] For example, for the above calculation of the support relationship, if the number of objects whose position components change in each frame is m, the update complexity of the support relationship of this interpreted graph will be reduced to O(n*m). In the actual scenario, m is very small and generally has nothing to do with n, so the complexity of this operation can be regarded as O(n), which is significantly improved compared to the original operation complexity of O(n^2).

[0131] It can be seen that through streaming incremental parsing, the calculation scope can be reduced from the set of all objects and components to the set of objects and components that have changed, greatly reducing the complexity of the processing or update operations on the second interpreted graph.

[0132] It should be noted that the streaming incremental processing modification module is only one of many modules that may modify the interpreted graph. Other modules such as detection and recognition, incremental processing, cognition, simulation, and the agent may also involve performing modification operations on the interpreted graph.

[0133] As Figures 2A - 4C shown, according to an embodiment of the present invention, in the process of processing the second interpreted graph, it includes:

[0134] When it is found that the corresponding virtual memory is insufficient during the execution of the modification operation on the second interpretation graph, an expansion operation is performed.

[0135] Among them, the second interpretation graph contains containers such as arrays, sets, dictionaries, and smart pointers. Modification operations on the interpretation graph (such as adding or deleting objects, adding or deleting components, adding object relationships, etc.) can be implemented through these containers, and these containers are also used for storing object information in the interpretation graph.

[0136] Figure 4A Schematically shows a structural diagram of an interpretation graph pointer of the interpretation graph processing method of an agent according to an embodiment of the present invention. Figure 4B Schematically shows a scenario graph of virtual memory expansion of the interpretation graph processing method of an agent according to an embodiment of the present invention.

[0137] Such as Figure 4B As shown, for the execution of the modification operation on the second interpretation graph, it depends on the implementation of the containers of the interpretation graph, and these containers need to meet the following requirements:

[0138] First, whenever these containers need to apply for or release memory, they can use the memory allocator in the interpretation graph to apply for or release memory. When the memory allocator finds that the virtual memory capacity is insufficient, it expands the memory through the following steps: First, determine a larger new virtual memory capacity according to the virtual memory growth strategy (this strategy can be selected as needed, such as doubling); then apply for a virtual memory of the above capacity, or expand the original virtual memory to the above capacity. The new virtual memory must meet the requirement that "the physical memory page and the shared flag corresponding to the virtual memory page at the same offset in the new virtual memory and the original virtual memory are the same, and the shared flag of the newly expanded page is set to private", such as Figure 4B The "newly expanded memory page" marked as "private" in the virtual memory of the interpretation graph after expansion as shown.

[0139] If the new virtual memory is not expanded from the original virtual memory, the original virtual memory is released. Then, notify the memory allocator of the base address of the new virtual memory and the expanded virtual memory capacity.

[0140] Whenever these containers or the elements stored in the containers need to use a pointer, it is necessary to distinguish whether the address pointed to by the pointer is within the virtual memory range used by the interpretation graph.

[0141] If it is within the virtual memory range used by the interpretation graph, a relative pointer type should be used. Among them, the relative pointer type records the offset value between the absolute virtual memory address pointed to by the pointer and its own memory address when writing; when reading, the actual pointed absolute virtual memory address is obtained by adding the offset value recorded when writing to its own memory address, specifically asFigure 4A as shown

[0142] If it is not within the virtual memory range used by the interpretation graph, an absolute pointer type should be used, which directly records the virtual memory address being pointed to, specifically as Figure 4A shown

[0143] Due to the requirement that "in the new virtual memory and the original virtual memory, the physical memory pages and shared flags corresponding to the virtual memory pages at the same offset are the same" in the above steps, combined with the requirements for the use of "relative pointers and absolute pointers" above, the data (such as the relationship table, component set, entity (object) set, etc.) contained in the expanded interpretation graph is substantially the same as that in the interpretation graph before expansion. Therefore, this solution meets the semantic requirement that "after expansion, the virtual memory capacity increases, but the interpretation graph data remains unchanged".

[0144] Through the above steps, the expansion operation of the interpretation graph can be transformed into a mapping operation of the underlying virtual memory pages, thereby effectively avoiding the movement or copying of all memory data in the virtual memory of the interpretation graph in the traditional interpretation graph expansion implementation solution. Therefore, the above steps achieve reducing the time complexity of the expansion operation of the interpretation graph from O(n) to O(1), where n represents the number of objects in the interpretation graph. This greatly improves the efficiency of a large number of modification operations (such as adding, modifying object / component information, and adding and deleting relationships) on the interpretation graph that widely exist in modules such as the detection and recognition, streaming incremental processing, cognition, and simulation of intelligent agents.

[0145] Figure 4C Schematically shows a scenario graph of an interpretation graph copy of the interpretation graph processing method of an intelligent agent according to an embodiment of the present invention.

[0146] such as Figures 2A - 4C shown, according to an embodiment of the present invention, in the process of processing the second interpretation graph in operation S203, it further includes performing a copy operation on the second interpretation graph to generate a third interpretation graph, including:[[]]

[0147] Applying for virtual memory of a third interpretation graph with the same capacity as the second interpretation graph through a preset operating system, and mapping the data content of the second interpretation graph to the virtual memory pages of the virtual memory of the third interpretation graph;

[0148] Marking all virtual memory pages in the virtual memory of the second interpretation graph and all virtual memory pages in the virtual memory of the third interpretation graph as shared;

[0149] Copying the memory allocator of the second interpretation graph into the third interpretation graph, and then correcting the base address of the virtual memory of the memory allocator of the third interpretation graph to the base address of the virtual memory of the third interpretation graph.

[0150] such as Figure 2BAs shown, in operation S250, the planner 200 can perform simulation operations. For example, the agent can discover through the interpreted graph that the water cup is placed on the table, and then calculate the possibility of the water cup falling from the table based on the proximity of the water cup to the edge of the table to determine whether the water cup is safe. When it is not safe, a safe position of the water cup is selected through simulation, and finally an action is generated to move the water cup to the safe position. Among them, during this simulation process, it may involve copying, updating, and destroying the interpreted graph.

[0151] When it is necessary to copy a new interpreted graph (a copy of the source interpreted graph, hereinafter also referred to as the third interpreted graph) from an existing second interpreted graph (i.e., the source interpreted graph), as Figure 4C shown, first, a new virtual memory can be applied for according to the second interpreted graph as the virtual memory of the third interpreted graph. The capacity of the virtual memory of the third interpreted graph can be the same as that of the virtual memory of the source interpreted graph. The virtual memory of the third interpreted graph must meet the requirement that "in the virtual memory of this virtual memory and the source interpreted graph, the physical memory pages corresponding to the virtual memory pages at the same offset position are the same, and the sharing flags of all memory pages in the new virtual memory pages are set to shared", as Figure 4C shown, all memory pages such as memory page #1, memory page #2, and memory page #3 involved in the replica of the source interpreted graph in the new virtual memory are marked as shared.

[0152] Due to the requirement in the above steps that "in the virtual memory of this virtual memory and the source interpreted graph, the physical memory pages corresponding to the virtual memory pages at the same offset position are the same", combined with the requirements for the use of "relative pointers and absolute pointers" above, the data (such as the relationship table, component set, entity (object) set) contained in the new interpreted graph and the source interpreted graph are substantially the same. At the same time, with the help of the copy-on-write function of the virtual memory page, after the copy operation, whether the source interpreted graph or the new interpreted graph (a copy of the source interpreted graph) is modified, it is only visible to the interpreted graph itself. Therefore, this solution meets the semantic requirement of "after copying, the source interpreted graph and the new interpreted graph have the same data, but the modification operations on the two do not affect each other".

[0153] Through the above steps, the copy operation of the interpreted graph can be transformed into a mapping operation of the underlying virtual memory pages, effectively avoiding the copying of all memory data in the virtual memory of the interpreted graph in the traditional interpreted graph copy implementation scheme. And subsequent modification operations on the source interpreted graph or the new interpreted graph can automatically complete the copying and remapping of the virtual memory pages where the modified data is located through the copy-on-write function of the virtual memory page, and there is no need for additional processing for the virtual memory pages where the data has not changed. Therefore, the above steps reduce the time complexity of the copy operation of the interpreted graph from O(n) to O(1), where n represents the number of objects in the interpreted graph. This greatly improves the efficiency of a large number of copy operations of the interpreted graph widely existing in modules such as the simulation of the agent.

[0154] As Figures 2A - 4C shown, according to an embodiment of the present invention, in the process of processing the second interpretation graph in operation S203, it further includes:

[0155] In response to the destruction instruction of the second interpretation graph, release the virtual memory of the second interpretation graph through a preset operating system.

[0156] As Figure 2B shown, in operation S270, when the second interpretation graph is no longer in use, the destruction operation can be performed on the second interpretation graph by executing resource cleaning. Specifically, the operating system can be notified through a destruction instruction to release the virtual memory applied for by the second interpretation graph, and there is no need to cascade and release various containers and objects in the interpretation graph as in the traditional technology. Among them, the destruction instruction can be a system control instruction for controlling the operating system to execute the specified virtual memory release.

[0157] Therefore, by converting the destruction operation of the interpretation graph into the release operation of the underlying memory page, the time complexity of the destruction operation of the interpretation graph is finally reduced from O(n) to O(1), where n represents the number of objects in the interpretation graph, greatly reducing the workload of interpretation graph processing and improving the processing efficiency.

[0158] It should be noted that for the above modification and copying operations of the second interpretation graph, the operations involving virtual memory application can be completely implemented by means of the operating system API or through the user-mode page fault handling mechanism provided by the operating system.

[0159] In addition, since as Figure 4A shown, the addresses of the virtual memory ranges used by the interpretation graph are all represented by relative pointers, so even if the virtual memory base addresses of the interpretation graphs obtained in the expansion and copying operations of the second interpretation graph are different from those of the source interpretation graph, the correct memory addresses can still be obtained after these relative pointers are read out, so these pointers do not need to be updated.

[0160] Moreover, since the above copying and destruction operations only involve the copying and destruction of the page table and do not involve the copying and modification of the content stored in the virtual memory, the time complexity of the copying and destruction operations depends on the page table size. The page table size is inversely proportional to the memory page size. The current mainstream memory page size is 4k, and some operating systems support specifying the page table size when applying for memory (such as MAP_HUGE_2MB and MAP_HUGE_1GB on Linux). Therefore, compared with the conventional scheme of cascading copying / destroying the interpretation graph, the performance of this scheme can be improved by at least 4k times. Under the current hardware conditions and practices, this complexity can be regarded as a constant, that is, O(1).

[0161] The method for processing the interpretation graph of an agent provided by an embodiment of the present invention can at least partially solve the problems of high complexity, low processing efficiency, and poor processing accuracy existing in the process of processing the interpretation graph in the related art, and thus can at least achieve one of the following technical effects:

[0162] (1) The copy and destruction operations of the interpretation graph can be transformed into the management and release operations of the underlying memory pages. At the same time, with the copy-on-write of virtual memory pages, a large amount of memory data copying brought by the interpretation graph copy operation is eliminated. Finally, the time complexity of the copy and destruction operations of the interpretation graph is reduced from O(n) to O(1), where n represents the number of objects in the interpretation graph.

[0163] (2) By introducing the concept of components through the representation rules of objects and the relationships between objects, each component can represent a functional or attribute unit, and each object can be composed of several components. Through the combination of components, some new types of objects that are multifunctional, complex, and cannot be anticipated in advance during design can be represented (n components can be combined into 2^n different types of objects), and the types of objects that can be represented increase exponentially with the number of component types. For the users of the interpretation graph (such as planners), when their internal logic only depends on components, it can be easily generalized to newly emerging types of objects. Through the component-centered memory layout method, it is ensured that the component data of the same type is continuous in memory, with a high cache hit rate during traversal, and it is also convenient to perform parallel processing using multi-core CPUs or GPUs.

[0164] (3) By further introducing a relationship table through the representation rules of objects and the relationships between objects, the relationship table can record the {source - relationship descriptor - target} ternary relationship pairs, and the relationship descriptors are divided into 4 types: 1-to-1, 1-to-N, N-to-1, and N-to-N. Therefore, the relationship table can support the following operations with a complexity of O(1): relationship conflict detection, querying the relationships (forward / backward) owned by an object, and querying the source sets of the relationships (forward / backward).

[0165] (4) Through streaming incremental parsing, the calculation scope can be reduced from all objects and component sets to the objects and component sets that have changed, further reducing the complexity of the processing or update operations on the interpretation graph.

[0166] Therefore, the interpretation graph processing method according to the embodiments of the present invention can enable the interpretation graph of the intelligent agent to more accurately and comprehensively reflect the objective information of the real environment, achieving the effect of flexibly and efficiently representing and processing the interpretation graph, greatly reducing the complexity of the interpretation graph processing operation, and also avoiding the high computational cost caused by the cascaded creation, copying, destruction, etc. of a large number of small objects due to the interpretation graph processing operations (such as copying and destruction, etc.); moreover, it can accurately describe newly emerging multi-functional or more complex new objects, avoid inconsistent situations such as missing or extra attributes, and can achieve more efficient batch processing, greatly reducing the computational cost.

[0167] Based on the above interpretation graph processing method of the intelligent agent, the present invention also provides an interpretation graph processing device for the intelligent agent. The following will be combined with Figure 5 to describe this device in detail.

[0168] Figure 5 The structural block diagram of the interpretation graph processing device for the intelligent agent according to the embodiments of the present invention is schematically shown.

[0169] As Figure 5 shown, the interpretation graph processing device 500 of the intelligent agent in this embodiment includes a resource initialization module 510, an interpretation graph representation module 520, and an interpretation graph processing module 530.

[0170] The resource initialization module 510 is used to obtain the first interpretation graph generated by the resource initialization operation of the intelligent agent. In one embodiment, the resource initialization module 510 can be used to perform the operation S201 described above, which will not be elaborated here.

[0171] The interpretation graph representation module 520 is used to update the first interpretation graph according to the preset interpretation graph representation rule and the detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is the representation rule of the object information and the relationship between objects in the second interpretation graph. In one embodiment, the interpretation graph representation module 520 can be used to perform the operation S202 described above, which will not be elaborated here.

[0172] The interpretation graph processing module 530 is used to perform processing on the second interpretation graph. In one embodiment, the interpretation graph processing module 530 can be used to perform the operation S203 described above, which will not be elaborated here.

[0173] According to an embodiment of the present invention, any multiple of the resource initialization module 510, the interpretation graph representation module 520, and the interpretation graph processing module 530 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present invention, at least one of the resource initialization module 510, the interpretation graph representation module 520, and the interpretation graph processing module 530 may be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means such as hardware or firmware for integrating or packaging circuits, or may be implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the resource initialization module 510, the interpretation graph representation module 520, and the interpretation graph processing module 530 may be at least partially implemented as a computer program module, and when the computer program module is run, it can execute the corresponding functions.

[0174] Figure 6 FIG. schematically shows a block diagram of an electronic device suitable for implementing an interpretation graph processing method of an agent according to an embodiment of the present invention.

[0175] The above-mentioned electronic device provided by the embodiment of the present invention includes one or more processors and a memory. The memory is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the above-mentioned interpretation graph processing method of the agent.

[0176] As Figure 6 shown, the electronic device 600 according to an embodiment of the present invention includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage section 608 into a random access memory (RAM) 603. The processor 601 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 601 may also include on-board memory for caching purposes. The processor 601 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present invention.

[0177] In the RAM 603, various programs and data required for the operation of the electronic device 600 are stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. The processor 601 performs various operations of the method flow according to the embodiments of the present invention by executing the programs in the ROM 602 and / or the RAM 603. It should be noted that the programs may also be stored in one or more memories other than the ROM 602 and the RAM 603. The processor 601 may also perform various operations of the method flow according to the embodiments of the present invention by executing the programs stored in the one or more memories.

[0178] According to an embodiment of the present invention, the electronic device 600 may further include an input / output (I / O) interface 605, and the input / output (I / O) interface 605 is also connected to the bus 604. The electronic device 600 may further include one or more of the following components connected to the I / O interface 605: an input portion 606 including a keyboard, a mouse, etc.; an output portion 607 including, for example, a cathode ray tube (CRT), a liquid crystal display (LCD), etc. and a speaker, etc.; a storage portion 608 including a hard disk, etc.; and a communication portion 609 including a network interface card such as a LAN card, a modem, etc. The communication portion 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed so that a computer program read from it can be installed into the storage portion 608 as needed.

[0179] The present invention also provides a computer-readable storage medium having executable instructions stored thereon, and when the instructions are executed by a processor, the processor is caused to execute the above-described agent's interpretation graph processing method.

[0180] Among them, the computer-readable storage medium may be included in the device / apparatus / system described in the above embodiments; or it may exist separately and not be assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present invention is implemented.

[0181] According to an embodiment of the present invention, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present invention, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present invention, the computer-readable storage medium may include one or more memories other than the above-described ROM 602 and / or RAM 603 and / or ROM 602 and RAM 603.

[0182] An embodiment of the present invention further includes a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the above-described agent's interpretation graph processing method.

[0183] Among them, the computer program contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present invention.

[0184] When the computer program is executed by the processor 601, it executes the above-described functions defined in the system / apparatus of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0185] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program may also be transmitted and distributed in the form of a signal on a network medium, and be downloaded and installed through the communication part 609, and / or be installed from the removable medium 611. The program code contained in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0186] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or be installed from the removable medium 611. When the computer program is executed by the processor 601, it executes the above-described functions defined in the system of the embodiment of the present invention. According to an embodiment of the present invention, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.

[0187] According to an embodiment of the present invention, program code for executing the computer program provided by the embodiments of the present invention can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. The programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).

[0188] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.

[0189] Those skilled in the art can understand that the features recited in the various embodiments and / or claims of the present invention can be combined or combined in various ways, even if such combinations or combinations are not explicitly recited in the present invention. In particular, without departing from the spirit and teachings of the present invention, the features recited in the various embodiments and / or claims of the present invention can be combined and combined in various ways. All such combinations and / or combinations fall within the scope of the present invention.

[0190] The embodiments of the present invention have been described above. However, these embodiments are for illustrative purposes only and are not intended to limit the scope of the present invention. Although the embodiments have been described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. The scope of the present invention is defined by the appended claims and their equivalents. Without departing from the scope of the present invention, those skilled in the art can make various substitutions and modifications, and these substitutions and modifications should fall within the scope of the present invention.

Claims

1. A method for processing an interpretation graph of an agent, characterized in that, including: obtaining a first interpretation graph generated by a resource initialization operation of the agent; updating the first interpretation graph according to a preset interpretation graph representation rule and detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for object information and relationships between objects in the second interpretation graph, and the environment detection information is state information generated by the agent based on perception of the surrounding environment at the current moment; and performing processing on the second interpretation graph including reading, modifying, copying, updating, and destroying; wherein, in the updating the first interpretation graph according to a preset interpretation graph representation rule and detected environment detection information to generate a second interpretation graph, it includes: (1) updating the first interpretation graph according to the representation method of relationships between objects in the preset interpretation graph representation rule and the relationship information between objects in the environment detection information to generate the second interpretation graph; and / or (2) updating the first interpretation graph according to the object-centered memory storage layout method in the preset interpretation graph representation rule and the object information in the environment detection information to generate the second interpretation graph; and / or updating the first interpretation graph according to the component-centered memory storage layout method in the preset interpretation graph representation rule and the object information in the environment detection information to generate the second interpretation graph.

2. The method according to claim 1, wherein In the obtaining the first interpretation graph generated by a resource initialization operation of the agent, it includes: applying for corresponding virtual memory through a preset operating system; marking all virtual memory pages in the virtual memory as private; initializing a memory allocator according to the base address and capacity of the virtual memory after marking to obtain the first interpretation graph.

3. The method according to claim 1, characterized in that, In the performing processing on the second interpretation graph, it includes: performing a modification operation on the second interpretation graph according to a preset streaming incremental processing rule.

4. The method according to claim 1, wherein In the performing processing on the second interpretation graph, it includes: when it is found that the corresponding virtual memory capacity is insufficient during the execution of the modification operation of the second interpretation graph, performing an expansion operation.

5. The method according to claim 1, characterized in that, In the performing processing on the second interpretation graph, it further includes generating a third interpretation graph by performing a copy operation on the second interpretation graph, where it includes: applying for virtual memory for the third interpretation graph with the same capacity as the second interpretation graph through a preset operating system, and mapping the data content of the second interpretation graph to the virtual memory pages of the virtual memory of the third interpretation graph; marking all virtual memory pages in the virtual memory of the second interpretation graph and all virtual memory pages in the virtual memory of the third interpretation graph as shared; copying the memory allocator of the second interpretation graph to the third interpretation graph, and then correcting the base address of the virtual memory of the memory allocator of the third interpretation graph to the base address of the virtual memory of the third interpretation graph.

6. The method according to claim 1, characterized in that, In the performing processing on the second interpretation graph, it further includes: responding to a destruction instruction of the second interpretation graph, and releasing the virtual memory of the second interpretation graph through a preset operating system.

7. An interpretation graph processing device for an agent, characterized in that, including: a resource initialization module for obtaining a first interpretation graph generated by a resource initialization operation of the agent; An interpretation graph representation module, configured to update the first interpretation graph according to a preset interpretation graph representation rule and detected environment detection information to generate a second interpretation graph, where the preset interpretation graph representation rule is a representation rule for object information and relationships between objects in the second interpretation graph, and the environment detection information is state information generated by an intelligent agent based on perception of the environment at the current moment; and An interpretation graph processing module, configured to perform processing including reading, modifying, copying, updating, and destroying on the second interpretation graph; Wherein, in the process of updating the first interpretation graph according to the preset interpretation graph representation rule and the detected environment detection information to generate the second interpretation graph, it includes: (1) Updating the first interpretation graph according to the representation manner of relationships between objects in the preset interpretation graph representation rule and the relationship information between objects in the environment detection information to generate the second interpretation graph; and / or (2) Updating the first interpretation graph according to the object-centered memory storage layout manner in the preset interpretation graph representation rule and the object information in the environment detection information to generate the second interpretation graph; and / or updating the first interpretation graph according to the component-centered memory storage layout manner in the preset interpretation graph representation rule and the object information in the environment detection information to generate the second interpretation graph.

8. An electronic device, comprising: One or more processors; A memory, configured to store one or more programs, Wherein, when the one or more programs are executed by the one or more processors, the one or more processors are caused to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, having executable instructions stored thereon, which when executed by a processor cause the processor to execute the method according to any one of claims 1 to 6.

10. A computer program product, comprising a computer program, which when executed by a processor implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Intelligent agent behavior planning method, electronic equipment, medium and program product

    CN119378595A

  • Intelligent agent control method and device and intelligent agent

    CN119396161A