Observation method and device of intelligent agent, storage medium and electronic equipment
By constructing a decision graph for intelligent agents and utilizing multi-dimensional data processing technology, the problem of high time delay in intelligent agent observation was solved, enabling real-time observation and decision optimization, and improving the security and reliability of the system.
Patent Information
- Application Number
- CN202511134559.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-14
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-08-14
AI Technical Summary
Existing methods for observing intelligent agents rely on log information, resulting in high time delays and low system security and reliability.
By constructing a decision graph of the intelligent agent, real-time multi-dimensional observation is carried out based on sensor information, internal state information and decision results, including sensor encoding, feature extraction, intent inference and decision verification, and data processing is carried out using Transformer model, convolutional neural network, long short-term memory network and attention mechanism.
It enables real-time, multi-dimensional observation after the agent makes a decision, allowing for timely detection and handling of emergencies, thus improving the system's security and reliability.
Smart Images

Figure CN120706464B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, in particular to an observation method and device of an intelligent agent, a storage medium and an electronic device. BACKGROUND
[0002] With the development of artificial intelligence (AI) technology, AI agents have been widely used in many fields to make decisions. AI agent refers to an agent that can perceive the environment and take actions to achieve a specific goal, which can also be referred to as intelligent agent.
[0003] In the application scenario of the intelligent agent, the behavior of the intelligent agent usually needs to be observed to evaluate whether the decision of the intelligent agent meets the business requirements. At present, the observation method of the intelligent agent is generally through a log analysis system to record and analyze log information in the running process of the intelligent agent to realize observation.
[0004] In the existing intelligent agent observation method, the intelligent agent is observed by relying on log information, and the log information is generated after the intelligent agent performs corresponding operations. It usually takes a certain amount of time to obtain the log information for observing the intelligent agent and complete log analysis, resulting in a high time delay for observing the intelligent agent, which makes it difficult to discover and handle sudden situations in time, and the safety and reliability of the system are low. SUMMARY
[0005] Therefore, the embodiments of the present application provide an observation method of an intelligent agent to solve the problem of the existing intelligent agent observation method, which relies on log information to observe the intelligent agent, resulting in a high time delay and low safety and reliability of the system.
[0006] The embodiments of the present application also provide an observation device of an intelligent agent to ensure the implementation and application of the above method in practice.
[0007] To achieve the above object, the embodiments of the present application provide the following technical solutions:
[0008] An observation method of an intelligent agent, comprising:
[0009] determining sensor information corresponding to the intelligent agent to be observed; the sensor information comprises sensor data corresponding to a plurality of information dimensions;
[0010] determining internal state information corresponding to the intelligent agent;
[0011] encoding the sensor information and the internal state information respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information;
[0012] determining a decision result corresponding to the agent;
[0013] constructing a decision graph corresponding to the agent based on the sensor encoding information, the internal state encoding information, and the decision result;
[0014] performing feature extraction on the sensor information to obtain feature information corresponding to the sensor information;
[0015] performing intention inference on the agent based on the feature information to obtain an intention inference result corresponding to the agent;
[0016] determining decision path information corresponding to the decision result based on a pre-constructed behavior evaluation graph;
[0017] performing decision verification on the decision result based on a pre-set decision verification rule to obtain a decision verification result corresponding to the agent;
[0018] taking the decision graph, the intention inference result, the decision path information, and the decision verification result as observation results corresponding to the agent.
[0019] The above method can optionally include an image information dimension and a voice information dimension, and the feature extraction on the sensor information to obtain the feature information corresponding to the sensor information can include:
[0020] applying a pre-constructed image feature extraction model to perform image feature extraction on sensor data corresponding to the image information dimension to obtain image features corresponding to the image information dimension; the image feature extraction model is a feature extraction model constructed based on a convolutional neural network;
[0021] applying a pre-constructed voice feature extraction model to perform voice feature extraction on sensor data corresponding to the voice information dimension to obtain voice features corresponding to the voice information dimension; the voice feature extraction model is a feature extraction model constructed based on a long short-term memory network;
[0022] taking the image features and the voice features as the feature information corresponding to the agent.
[0023] The above method can optionally include performing intention inference on the agent based on the feature information to obtain an intention inference result corresponding to the agent, which can include:
[0024] The pre-constructed intention inference model is used for attention estimation processing of the feature information, and attention weights corresponding to each region feature in the feature information are obtained; the intention inference model is a model constructed based on an attention mechanism;
[0025] The attention weights corresponding to each region feature are compared in size, and the region feature with relatively larger attention weight is taken as a target region feature;
[0026] Based on the target region feature, a decision intention corresponding to the agent is determined, and the decision intention is taken as an intention inference result corresponding to the agent.
[0027] The above method, optionally, the construction process of the behavior evaluation graph includes:
[0028] Each running state corresponding to the agent is determined;
[0029] A value data set corresponding to each running state is determined; the value data set corresponding to each running state includes Q values corresponding to each action in the running state;
[0030] The behavior evaluation graph is constructed based on the value data set corresponding to each running state.
[0031] The above method, optionally, the determination of the decision path information corresponding to the decision result based on the pre-constructed behavior evaluation graph includes:
[0032] Based on the behavior evaluation graph, behavior evaluation information corresponding to the internal state information is determined;
[0033] Based on the behavior evaluation information, path tracing is performed on the decision result, and the decision path information corresponding to the decision result is obtained.
[0034] The above method, optionally, further includes:
[0035] Based on the decision verification result, the decision optimization of the agent is performed.
[0036] The above method, optionally, further includes:
[0037] In the process of observing the agent, each item of data is transmitted based on a pre-set lightweight bus.
[0038] An observation device of an agent includes:
[0039] A first determination unit is configured to determine sensor information corresponding to an agent to be observed; the sensor information includes sensor data corresponding to multiple information dimensions;
[0040] A second determining unit is configured to determine internal state information corresponding to the agent;
[0041] An information encoding unit is configured to encode the sensor information and the internal state information respectively, to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information;
[0042] A third determining unit is configured to determine a decision result corresponding to the agent;
[0043] A graph construction unit is configured to construct a decision graph corresponding to the agent based on the sensor encoding information, the internal state encoding information and the decision result;
[0044] A feature extraction unit is configured to extract features of the sensor information, to obtain feature information corresponding to the sensor information;
[0045] An intention inference unit is configured to infer an intention of the agent based on the feature information, to obtain an intention inference result corresponding to the agent;
[0046] A fourth determining unit is configured to determine decision path information corresponding to the decision result based on a pre-constructed behavior evaluation graph;
[0047] A decision verification unit is configured to verify the decision result based on a preset decision verification rule, to obtain a decision verification result corresponding to the agent;
[0048] A fifth determining unit is configured to take the decision graph, the intention inference result, the decision path information and the decision verification result as an observation result corresponding to the agent.
[0049] A storage medium includes stored instructions, wherein the instructions, when executed, control a device in which the storage medium is located to perform the observation method of the agent as described above.
[0050] An electronic device includes a memory, and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the observation method of the agent as described above.
[0051] Based on the above embodiment of the present application provides an observation method of an agent, comprising: determining the sensor information corresponding to the agent to be observed; the sensor information includes a plurality of information dimensions corresponding to the sensor data; determining the internal state information corresponding to the agent; encoding the sensor information and the internal state information respectively, obtaining the sensor encoding information corresponding to the sensor information and the internal state information corresponding to the internal state encoding information; determining the decision result corresponding to the agent; based on the sensor encoding information, the internal state encoding information and the decision result, constructing the decision graph corresponding to the agent; extracting the features of the sensor information, obtaining the feature information corresponding to the sensor information; based on the feature information, inferring the intention of the agent, obtaining the intention inference result corresponding to the agent; based on the pre-constructed behavior evaluation graph, determining the decision path information corresponding to the decision result; based on the preset decision verification rule, the decision result is verified, and the decision verification result corresponding to the agent is obtained; the decision graph, the intention inference result, the decision path information and the decision verification result are used as the observation result corresponding to the agent. The method provided by the embodiment of the present application can be based on the sensor data, the internal state information of the agent and the decision result, and the corresponding decision graph can be constructed, the intention of the agent can be inferred and the decision path can be traced back, and the decision result can be verified. Finally, the observation result containing the decision graph, the intention inference result, the decision path information and the decision verification result is obtained, which can be used to observe the agent in multiple dimensions in real time after the agent makes a decision, which is helpful to timely discover and handle the emergency, and improve the safety and reliability of the system. BRIEF DESCRIPTION OF DRAWINGS
[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or the prior art description. Obviously, the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor on the basis of the provided drawings.
[0053] Figure 1 The method flow chart of the observation method of the agent provided by the embodiment of the present application;
[0054] Figure 2 The example diagram of the observation process of the agent provided by the embodiment of the present application;
[0055] Figure 3 The example diagram of the state encoding flow provided by the embodiment of the present application;
[0056] Figure 4 The structural schematic diagram of the observation device of the agent provided by the embodiment of the present application;
[0057] Figure 5A structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0058] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application.
[0059] In the present application, the terms “comprising”, “containing” or any other variants thereof are intended to cover non-exclusive containing, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the sentence “including a…” does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0060] The embodiment of the present application provides an observation method of an intelligent agent. The method can be applied to a business system deploying an intelligent agent, and the execution subject of the method can be a processor of the system. The flowchart of the method is as shown in Figure 1 The method comprises the following steps.
[0061] S101: Determine sensor information corresponding to the intelligent agent to be observed; the sensor information comprises sensor data corresponding to a plurality of information dimensions.
[0062] The method provided by the embodiment of the present application can be applied to the scene of decision-making of various application intelligent agents such as automatic driving. In the running process of the intelligent agent, various sensor data applied by the intelligent agent for decision-making can be collected in real time, and the various sensor data are taken as the sensor information corresponding to the intelligent agent. The sensor information contains a plurality of types of sensor data, i.e. sensor data of a plurality of information dimensions, which are determined by the decision logic of the intelligent agent. For example, in the automatic driving scene, data of various environment sensors such as laser radar, camera and infrared sensor can be obtained.
[0063] S102: Determine internal state information corresponding to the intelligent agent.
[0064] In the method provided by the embodiment of the present application, the current internal state of the intelligent agent can be obtained in real time, and the current internal state of the intelligent agent is taken as the internal state information corresponding to the intelligent agent.
[0065] S103: encode the sensor information and the internal state information respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information.
[0066] In the method provided by the embodiment of the application, the encoder of the Transformer model can be used to encode the sensor information of each dimension (i.e., the sensor information), and the data obtained after encoding can be used as the sensor encoding information. The encoder of the Transformer model can be used to encode the internal state of the agent (i.e., the internal state information), and the data obtained after encoding can be used as the internal state encoding information.
[0067] S104: determine a decision result corresponding to the agent.
[0068] In the method provided by the embodiment of the application, the decision made by the agent based on various types of sensor data can be obtained, and the decision result corresponding to the agent can be obtained.
[0069] S105: based on the sensor encoding information, the internal state encoding information and the decision result, construct a decision graph corresponding to the agent.
[0070] In the method provided by the embodiment of the application, the sensor encoding information, the internal state encoding information and the decision result can be used as node information in the form of a directed graph, and a graph recording the sequence and association among the sensor data, the internal state and the decision result can be constructed, and the graph can be used as the decision graph corresponding to the agent.
[0071] S106: perform feature extraction on the sensor information to obtain feature information corresponding to the sensor information.
[0072] In the method provided by the embodiment of the application, a feature extraction model for extracting features of each type can be constructed in advance for each type of sensor data involved. For each type of sensor data in the sensor information, the corresponding feature extraction model can be used to perform feature extraction, and the features extracted from each type of sensor data can be used as the feature information corresponding to the sensor information.
[0073] S107: based on the feature information, perform intention inference on the agent to obtain an intention inference result corresponding to the agent.
[0074] In the method provided by the embodiment of the application, an intention inference model can be constructed in advance, and the intention inference model can be used to infer the intention of the agent based on the features of each sensor data. During the observation process, the intention inference model can be used to process the feature information corresponding to the sensor information to infer the intention of the agent, and the result inferred by the intention inference model can be used as the intention inference result corresponding to the agent.
[0075] S108: Determine the decision path information corresponding to the decision result based on the pre-constructed behavior evaluation graph.
[0076] In the method provided by the embodiment of the application, the behavior evaluation graph recording different decision paths of the agent can be constructed in advance based on the behavior of the agent in different states, and the decision basis and logic of the corresponding decision path are recorded in the behavior evaluation graph. In the observation process, the decision path can be traced in the pre-constructed behavior evaluation graph according to the decision result of the agent, and the decision path information corresponding to the decision result, i.e., the decision basis and logic in the decision path corresponding to the decision result, and other information, can be obtained.
[0077] S109: Perform decision checking on the decision result based on the preset decision checking rule to obtain the decision checking result of the agent.
[0078] In the method provided by the embodiment of the application, the decision checking rule can be set in advance according to the actual business requirement, and the decision checking rule is used to detect whether the decision conforms to the corresponding rule. For example, in the automatic driving scenario, the decision of the agent needs to conform to the traffic rules and safety principles, in the interactive scenario of the service robot, the decision of the agent should not violate the moral and legal norms, and the like. In the observation process, the preset decision checking rule can be applied to check the decision result of the agent, i.e., whether the current decision result conforms to the corresponding rule, and the checking result is taken as the decision checking result of the agent. The decision checking result represents whether the decision result conforms to the corresponding rule.
[0079] S110: Take the decision graph, the intention inference result, the decision path information, and the decision checking result as the observation result of the agent.
[0080] In the method provided by the embodiment of the application, the decision graph, the intention inference result, the decision path information, and the decision checking result of the agent are taken as the current observation result. The observation result can be reflected to the user in real time, or the observation result can be stored.
[0081] Based on the method provided in the embodiment of the present application, when an agent needs to be observed, the sensor information corresponding to the agent to be observed can be determined; the sensor information includes sensor data corresponding to multiple information dimensions; the internal state information corresponding to the agent is determined; the sensor information and the internal state information are encoded respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information; the decision result corresponding to the agent is determined; based on the sensor encoding information, the internal state encoding information and the decision result, a decision graph corresponding to the agent is constructed; the sensor information is feature extracted to obtain feature information corresponding to the sensor information; based on the feature information, the intention of the agent is inferred to obtain an intention inference result corresponding to the agent; based on a pre-constructed behavior evaluation graph, decision path information corresponding to the decision result is determined; based on a preset decision verification rule, the decision result is verified to obtain a decision verification result corresponding to the agent; the decision graph, the intention inference result, the decision path information and the decision verification result are taken as an observation result corresponding to the agent. By applying the method provided in the embodiment of the present application, the corresponding decision graph can be constructed based on the sensor data, the internal state information of the agent and the decision result, the intention of the agent is inferred and the decision path is traced back, the decision result is verified, and finally the observation result containing the decision graph, the intention inference result, the decision path information and the decision verification result is obtained. After the agent makes a decision, the agent can be observed in multiple dimensions in real time, which is beneficial to timely discover and handle the emergency and improve the safety and reliability of the system.
[0082] In Figure 1 Based on the method shown in the embodiment of the present application, the sensor data corresponding to each information dimension in the sensor information includes the sensor data corresponding to the image information dimension and the sensor data corresponding to the voice information dimension, that is, the image data and the voice data.
[0083] For the sensor data corresponding to the image information dimension, an image feature extraction model is applied to perform image feature extraction on the sensor data to obtain image features corresponding to the image information dimension; the image feature extraction model is a feature extraction model constructed based on a convolutional neural network.
[0084] In the method provided in the embodiment of the present application, the sensor data of each information dimension in the sensor information includes the sensor data corresponding to the image information dimension and the sensor data corresponding to the voice information dimension, that is, the image data and the voice data.
[0085] In the method provided by the embodiment of the application, a feature extraction model for extracting image features is constructed in advance based on a convolutional neural network (CNN), and the feature extraction model is used as an image feature extraction model. In the observation process, image data corresponding to the sensor data in the image information dimension, that is, image data, is input into the image feature extraction model, so that the image feature extraction model extracts features from the corresponding image data, for example, object features, and the extracted image features are used as image features corresponding to the image information dimension.
[0086] For the sensor data corresponding to the speech information dimension, a pre-constructed speech feature extraction model is applied to extract speech features from the sensor data, to obtain speech features corresponding to the speech information dimension; the speech feature extraction model is a feature extraction model constructed based on a long short-term memory network.
[0087] The image features and the speech features are used as feature information corresponding to the agent.
[0088] In the method provided by the embodiment of the application, a feature extraction model for extracting speech features is constructed in advance based on a long short-term memory network (LSTM), and the feature extraction model is used as a speech feature extraction model. In the observation process, the sensor data corresponding to the speech information in the sensor information, that is, speech data, can be input into the speech feature extraction model, so that the speech feature extraction model extracts features from the corresponding speech data, for example, time sequence features of the speech, and the extracted speech features are used as speech features corresponding to the speech information dimension. The speech features corresponding to the speech information dimension and the image features corresponding to the image information dimension are used as feature information corresponding to the agent.
[0089] In Figure 1 Based on the method shown in the figure, in the method provided by the embodiment of the application, the process of inferring the intention of the agent based on the feature information in step S107 to obtain an intention inference result corresponding to the agent includes:
[0090] The pre-constructed intention inference model is applied to perform attention estimation processing on the feature information, to obtain attention weights corresponding to each region feature in the feature information; the intention inference model is a model constructed based on an attention mechanism.
[0091] In the method provided by the embodiment of the application, an intention inference model can be constructed in advance based on an attention mechanism (Attention), the intention inference model can calculate the correlation weight between different regional features to identify a region where the attention of the agent is concentrated. During observation, the feature information corresponding to the agent can be input into the pre-constructed intention inference model to enable the intention inference model to calculate the attention weight of each regional feature.
[0092] The attention weights corresponding to the regional features are compared in size, and the regional feature corresponding to the relatively larger attention weight is taken as the target regional feature.
[0093] In the method provided by the embodiment of the application, the attention weights corresponding to the regional features calculated by the intention inference model can be compared in size, and the regional feature corresponding to the largest weight is taken as the target regional feature.
[0094] Based on the target regional feature, the decision intention corresponding to the agent is determined, and the decision intention is taken as the intention inference result corresponding to the agent.
[0095] In the method provided by the embodiment of the application, the prior knowledge stored in advance or the model trained in advance can be applied to infer the target that the agent pays attention to in the target regional feature, so as to infer the intention that the agent pays attention to, and the inferred intention is taken as the decision intention corresponding to the agent to obtain the intention inference result.
[0096] In Figure 1 Based on the method shown in the figure, in the method provided by the embodiment of the application, the construction process of the behavior evaluation graph mentioned in step S108 includes:
[0097] The running states corresponding to the agent are determined.
[0098] The value data set corresponding to each running state is determined; the value data set corresponding to each running state includes the Q value corresponding to each action in the running state.
[0099] Based on the value data set corresponding to each running state, the behavior evaluation graph is constructed.
[0100] In the method provided by the embodiment of the application, the agent can be caused to run in different states in advance in the reinforcement learning environment, and various state data of the agent in the running process can be acquired. The Q-value corresponding to each action of the agent, i.e., the estimated value of the long-term cumulative reward expected to be obtained by the action in the current state, can be calculated based on the various state data of the agent. The various running states that can be involved in the running process of the agent can be determined based on various data of the agent in the reinforcement learning process. For each running state, the Q-value calculated by the agent for each action in the reinforcement learning process is acquired, and the Q-values corresponding to various actions are combined to form a value data set corresponding to the running state. A distribution map of the Q-value in different running states can be constructed with the running state as the horizontal axis and different actions and the corresponding Q-values as the vertical axis, and the distribution map is used as a behavior evaluation map. The behavior evaluation map can intuitively display the value evaluation of the agent for various actions in different situations.
[0101] In Figure 1 Based on the method shown, in the method provided by the embodiment of the application, the process of determining the decision path information corresponding to the decision result based on the pre-constructed behavior evaluation map in step S108 includes:
[0102] Based on the behavior evaluation map, the behavior evaluation information corresponding to the internal state information is determined.
[0103] Based on the behavior evaluation information, the decision path information corresponding to the decision result is obtained by tracing back the decision result.
[0104] In the method provided by the embodiment of the application, in the observation process, the behavior evaluation information matched with the current internal state, such as the Q-value corresponding to various actions matched with the current internal state, can be found by tracing back the path in the behavior evaluation map based on the current internal state of the agent. In the behavior evaluation information, the behavior evaluation data matched with the current decision result of the agent is found, and the decision basis and logic of the current decision are determined based on the matched behavior evaluation data, which are used as the decision path information corresponding to the decision result. For example, in a game scenario, the agent controls a non-player character. When the decision path needs to be traced back, the Q-value distribution map can be reviewed. For example, in a certain game situation, the agent faces the decision of whether to attack the enemy or to dodge. By checking the Q-value of the "attack" and "dodge" actions in the state in the map, if the Q-value of the "attack" action is high, it indicates that the agent believes that attacking in the state can bring a higher expected reward, and thus the decision basis and logic of the selection of the attack action are determined, which is helpful to help the developer or the analyst to understand the decision process of the agent, so as to optimize the behavior of the agent.
[0105] In Figure 1Based on the method shown, the method provided by the embodiment of the application further includes:
[0106] Based on the decision verification result, the agent is optimized.
[0107] In the method provided by the embodiment of the application, whether the decision feedback in the decision verification result is compliant or not can be used to optimize the agent, for example, if the decision verification result indicates that the decision is not compliant, and it is found through analysis that the decision is not compliant due to insufficient extraction of some key environmental features, the feature extraction algorithm of the agent can be optimized to make the decision of the agent more accurate.
[0108] In Figure 1 Based on the method shown, the method provided by the embodiment of the application further includes:
[0109] In the process of observing the agent, based on the preset lightweight bus, the data is transmitted.
[0110] In the method provided by the embodiment of the application, the lightweight bus can be preset for data transmission, and in the process of observing the agent, the lightweight bus is used for transmission and processing of data transmission in each stage.
[0111] In order to better illustrate the method provided by the embodiment of the application, on the basis of the observation method of the agent provided in the foregoing embodiments, the embodiment of the application provides another observation method of the agent. The method provided by the embodiment of the application can be realized through a dynamic perception matrix, a hierarchical state coding module and a lightweight observation bus.
[0112] The dynamic perception matrix is mainly used to establish a three-dimensional association relationship among environmental sensors, internal states of AI agents and decision outputs. It can perceive the information flow of the agent in the process of interacting with the environment in all directions, understand the behavior and decision basis of the agent from multiple dimensions. Through this three-dimensional association, information from different sources is integrated, breaking the limitation of traditional single sensor data flow, thereby eliminating the observation blind area. The dynamic perception matrix mainly includes three parts, namely an external perception layer, a state coding layer and a decision graph layer. The external perception layer is responsible for collecting various sensor data, such as the data of environmental sensors such as laser radar, camera, infrared sensor and the like in automatic driving. The state coding layer encodes the internal state of the agent and the sensor data by means of the encoder of the Transformer model, forms the corresponding feature representation, and converts the complex state into a form conducive to analysis. The decision graph layer constructs the decision relationship in the form of a directed graph, records the sequence and association of the decisions of the agent, that is, constructs the decision graph according to the decisions such as acceleration and deceleration made by the agent based on the coded information, and records the decision process and related information.
[0113] The hierarchical state encoding module mainly consists of five layers of observation models, including a physical sensing layer, a feature extraction layer, an intention inference layer, a decision tracing layer, and an ethical compliance layer. The functions of each layer are as follows:
[0114] Physical sensing layer: This layer directly acquires raw data from various sensors, such as point cloud data from laser radar in autonomous driving, image data from cameras, and voice signals collected by microphones in service robots. These raw data are the most direct perception of the environment of the agent, but they lack interpretability and need further processing.
[0115] Feature extraction layer: Deep learning models such as Convolutional Neural Network (CNN) or Long Short-Term Memory Network (LSTM) are used to extract features from the raw data of the physical sensing layer. For example, CNN is used to extract object features from image data, and LSTM is used to extract temporal features from voice data. These features can more effectively represent the internal information of the data and provide a basis for subsequent analysis.
[0116] Intention inference layer: Attention mechanism is used to process the features obtained from the feature extraction layer, and the agent's intention is inferred by visualizing the Attention weights. Specifically, by calculating the correlation weights between different regional image features, the feature regions that are more critical to the current decision can be highlighted. For example, in the autonomous driving scenario, by analyzing the agent's attention to different regional image features, the target of its attention can be inferred, such as whether it pays attention to pedestrians or vehicles in front. When processing the image of the road in front, the attention mechanism will make the agent focus more on the regional features that may contain pedestrians or vehicles. Visualizing these calculated Attention weights can intuitively present the agent's attention to different regional image features. Based on this visualization result, if it is found that the Attention weight of a certain region is high, combined with prior knowledge or trained models, it can be inferred that there is a target of the agent's attention in that region, such as judging whether it is a pedestrian or a vehicle in front, thereby clarifying its attention map and providing a basis for subsequent decision-making.
[0117] Decision tracing layer: In the decision-making process of reinforcement learning, a Q-value distribution map (i.e., the behavior evaluation map in the previous embodiment) is constructed to record the value estimates of the agent taking different actions in different states. By analyzing the distribution and changes of Q-value, the decision-making path of the agent can be traced, and its decision-making basis and logic can be clarified. For example, in the decision-making process of a game non-player character, it can be clearly seen how it selects actions based on the environmental state and reward mechanism.
[0118] Ethical Compliance Layer: A set of ethical and compliance rules are preset to check the decisions of the agent. For example, in autonomous driving, ensure that the agent's decisions comply with traffic rules and safety principles, and in service robots interacting with users, ensure that the agent's responses do not violate moral and legal norms.
[0119] In the method provided by the embodiment of the application, the data generated by the dynamic perception matrix and the hierarchical state coding module in each stage is transmitted using a lightweight observation bus. The lightweight observation bus is deployed using an edge computing architecture and is a dedicated data channel. It processes and analyzes data as close to the data source as possible, which can reduce the delay of data in the transmission process. Through optimization of the data transmission path and the use of efficient data processing algorithms, the transmission and processing of observation data are realized quickly. The design and deployment scheme of the lightweight observation bus based on the edge computing architecture, including data transmission path optimization, efficient data processing algorithms, and techniques for reducing the transmission delay of observation data, can guarantee the realization of real-time observation.
[0120] Specifically, an example diagram of the agent observation process can be as shown in Figure 2 The hierarchical state coding module includes five layers of L1-L5, i.e., a physical sensing layer (L1), a feature extraction layer (L2), an intention inference layer (L3), a decision tracing layer (L4), and an ethical compliance layer (L5). The five layers constitute a complete coding system for gradually and deeply processing and analyzing data, converting raw data into interpretable semantic representations. Figure 2 The interaction between the data processed based on the hierarchical state coding module and the decision engine of the agent and the dynamic perception matrix is described. The decision engine is deployed with a corresponding policy rule base, a real-time inference machine, and a feedback learner. The dynamic perception matrix collects environmental sensor data, encodes the internal state of the agent, and constructs a decision graph, and the data generated thereby will be input to the hierarchical state coding module. After five layers of coding processing, the final output result can provide key information for the decision engine to make decisions of the agent, thereby forming a complete process from environmental perception to state coding to decision making.
[0121] The state coding process of the hierarchical state coding module can be as shown in Figure 3As shown, the physical sensing layer collects original sensor data, the feature extraction layer extracts features from the data through a CNN or LSTM model, the intention inference layer infers the intention of the agent through attention weights, and decision tracing is performed through the decision tracing layer. Finally, in the ethical compliance layer, the decision of the agent is checked against preset rules to determine whether the decision complies with the pre-set ethical, legal, etc. rules. If it is found that the decision does not comply with the rules, the ethical compliance layer will generate corresponding feedback information. These feedback information is transmitted back to the feature extraction layer through the hierarchical state encoding module. After returning to the feature extraction layer, the feature extraction layer can perform more targeted feature extraction on the subsequent input original data (from the physical sensing layer) based on the compliance feedback. For example, if it is found that the decision is not compliant due to insufficient extraction of some key environmental features in a certain decision-making scenario, the feature extraction layer can adjust the feature extraction algorithm or parameters to pay more attention to these key features. On the other hand, the compliance feedback can also prompt the feature extraction layer to re-evaluate and filter the extracted features, eliminate interfering features that may lead to non-compliant decisions, and retain or strengthen effective features related to compliant decisions, thereby optimizing the entire agent's data processing to decision-making process, making the subsequent generated decisions more compliant with ethical compliance requirements.
[0122] The method provided by the embodiment of the present application can adopt compatibility design compatible with existing AI development frameworks. Specifically, for interface design, the interface specifications of existing AI development frameworks (such as ROS and TensorFlow) can be analyzed, the general communication protocol and interaction mode can be extracted, and a unified, simple and extensible interface can be designed to realize efficient connection of the present technology and each framework and reduce access difficulty. For data format conversion, the data format standards supported by existing AI development frameworks can be researched, and data parsing and reconstruction algorithms can be constructed according to the data characteristics generated by the present method to realize accurate conversion of data format and ensure the compatibility and usability of data between different frameworks. For function adaptation, the function system and application scenarios of existing AI development frameworks can be deeply analyzed, and adaptive plug-ins or components can be developed according to the functional characteristics of the present technology by using modular design, so that the functions realized by the present method are organically combined with the functions of existing frameworks to meet different development needs.
[0123] Based on the method provided by the embodiment of the present application, by constructing a dynamic perception matrix, using a hierarchical state encoding module and deploying a lightweight observation bus, the observability of an AI agent throughout its life cycle can be realized, thereby improving the safety, reliability and performance of the AI agent in different application scenarios.
[0124] Corresponding to the observation method of the agent shown in Figure 1 The embodiment of the present application also provides an agent observation device for observing Figure 1 The specific implementation of the method shown in the figure is as follows:Figure 4 As shown, comprising:
[0125] The first determination unit 201 is configured to determine sensor information corresponding to the agent to be observed, wherein the sensor information comprises sensor data corresponding to a plurality of information dimensions.
[0126] The second determination unit 202 is configured to determine internal state information corresponding to the agent.
[0127] The information encoding unit 203 is configured to encode the sensor information and the internal state information respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information.
[0128] The third determination unit 204 is configured to determine a decision result corresponding to the agent.
[0129] The atlas construction unit 205 is configured to construct a decision atlas corresponding to the agent based on the sensor encoding information, the internal state encoding information and the decision result.
[0130] The feature extraction unit 206 is configured to extract features of the sensor information to obtain feature information corresponding to the sensor information.
[0131] The intention inference unit 207 is configured to infer an intention of the agent based on the feature information to obtain an intention inference result corresponding to the agent.
[0132] The fourth determination unit 208 is configured to determine decision path information corresponding to the decision result based on a pre-constructed behavior evaluation atlas.
[0133] The decision verification unit 209 is configured to verify the decision result based on a preset decision verification rule to obtain a decision verification result corresponding to the agent.
[0134] The fifth determination unit 210 is configured to take the decision atlas, the intention inference result, the decision path information and the decision verification result as an observation result corresponding to the agent.
[0135] By using the apparatus provided in the embodiment of the application, the corresponding decision atlas can be constructed based on the sensor data, the internal state information of the agent and the decision result, the intention of the agent can be inferred and the decision path can be traced back, the decision result can be verified, and finally the observation result containing the decision atlas, the intention inference result, the decision path information and the decision verification result can be obtained. The agent can be observed in multiple dimensions in real time after making a decision, which is beneficial to timely discovery and handling of unexpected situations and improves the safety and reliability of the system.
[0136] In Figure 4Based on the illustrated device, the device provided by the embodiment of the application can further extend a plurality of units, and the functions of the units can refer to the descriptions in the embodiments of the observation method of the intelligent agent provided in the foregoing, which will not be further illustrated herein.
[0137] The embodiment of the application further provides a storage medium, which comprises stored instructions, wherein when the instructions are executed, the device where the storage medium is located performs the observation method of the intelligent agent as described above.
[0138] The embodiment of the application further provides an electronic device, a structural schematic diagram of which is shown in the figure, and specifically comprises a memory 301 and one or more than one instruction 302, wherein the one or more than one instruction 302 is stored in the memory 301 and is configured to be executed by one or more than one processor 303 to perform the following operations: Figure 5
[0139] Determine the sensor information corresponding to the intelligent agent to be observed; the sensor information comprises sensor data corresponding to a plurality of information dimensions.
[0140] Determine the internal state information corresponding to the intelligent agent.
[0141] Encode the sensor information and the internal state information respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information.
[0142] Determine the decision result corresponding to the intelligent agent.
[0143] Based on the sensor encoding information, the internal state encoding information and the decision result, construct a decision graph corresponding to the intelligent agent.
[0144] Feature extraction is performed on the sensor information to obtain feature information corresponding to the sensor information.
[0145] Based on the feature information, intent inference is performed on the intelligent agent to obtain an intent inference result corresponding to the intelligent agent.
[0146] Based on a pre-constructed behavior evaluation graph, determine decision path information corresponding to the decision result;
[0147] Based on a preset decision verification rule, perform decision verification on the decision result to obtain a decision verification result corresponding to the intelligent agent.
[0148] The decision graph, the intent inference result, the decision path information and the decision verification result are taken as an observation result corresponding to the intelligent agent.
[0149] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, for system or system embodiments, since they are basically similar to method embodiments, the description is relatively simple, and relevant parts can be referred to the descriptions in the method embodiments. The systems and system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0150] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0151] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An observation method for an intelligent agent, characterized in that, include: Determine the sensor information corresponding to the intelligent agent to be observed; The sensor information includes sensor data corresponding to multiple information dimensions; Determine the internal state information corresponding to the intelligent agent; The sensor information and the internal state information are encoded respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information; Determine the decision result corresponding to the intelligent agent; Based on the sensor coding information, the internal state coding information, and the decision results, a decision graph corresponding to the agent is constructed. Feature extraction is performed on the sensor information to obtain the feature information corresponding to the sensor information; Based on the feature information, the agent's intent is inferred to obtain the intent inference result corresponding to the agent; Based on a pre-constructed behavioral evaluation graph, the decision path information corresponding to the decision result is determined; Based on preset decision verification rules, the decision result is verified to obtain the decision verification result corresponding to the intelligent agent. The decision graph, the intent inference result, the decision path information, and the decision verification result are used as the observation results corresponding to the agent. The step of inferring the intent of the agent based on the feature information to obtain the intent inference result corresponding to the agent includes: A pre-built intent inference model is applied to perform attention inference processing on the feature information to obtain the attention weights corresponding to each region feature in the feature information; the intent inference model is a model built based on an attention mechanism. The attention weights corresponding to each region feature are compared, and the region feature with the relatively larger attention weight is taken as the target region feature. Based on the features of the target region, the decision intention corresponding to the agent is determined, and the decision intention is used as the intention inference result corresponding to the agent. The construction process of the behavior assessment map includes: Determine the various operating states corresponding to the intelligent agent; Determine the value dataset corresponding to each of the aforementioned operating states; the value dataset corresponding to each of the aforementioned operating states includes the Q-values corresponding to each action in that operating state; The behavior evaluation graph is constructed based on the value dataset corresponding to each of the aforementioned operating states.
2. The observation method for an intelligent agent according to claim 1, characterized in that, Each of the aforementioned information dimensions includes image information dimension and voice information dimension. The step of extracting features from the sensor information to obtain the feature information corresponding to the sensor information includes: For the sensor data corresponding to the image information dimension, a pre-built image feature extraction model is applied to extract image features from the sensor data to obtain the image features corresponding to the image information dimension; the image feature extraction model is a feature extraction model built based on a convolutional neural network; For the sensor data corresponding to the aforementioned voice information dimension, a pre-built voice feature extraction model is applied to extract voice features from the sensor data to obtain the voice features corresponding to the aforementioned voice information dimension; the voice feature extraction model is a feature extraction model built based on a long short-term memory network. The image features and the speech features are used as the feature information corresponding to the intelligent agent.
3. The observation method for an intelligent agent according to claim 1, characterized in that, The process of determining the decision path information corresponding to the decision result based on a pre-constructed behavioral evaluation graph includes: Based on the behavior assessment map, determine the behavior assessment information corresponding to the internal state information; Based on the behavioral assessment information, the decision result is traced to obtain the decision path information corresponding to the decision result.
4. The observation method for an intelligent agent according to claim 1, characterized in that, Also includes: Based on the decision verification results, the agent performs decision optimization.
5. The observation method for an intelligent agent according to claim 1, characterized in that, Also includes: During the observation of the intelligent agent, various data are transmitted based on a preset lightweight bus.
6. An observation device for an intelligent agent, characterized in that, include: The first determining unit is used to determine the sensor information corresponding to the intelligent agent to be observed; The sensor information includes sensor data corresponding to multiple information dimensions; The second determining unit is used to determine the internal state information corresponding to the intelligent agent; An information encoding unit is used to encode the sensor information and the internal state information respectively to obtain sensor encoding information corresponding to the sensor information and internal state encoding information corresponding to the internal state information; The third determining unit is used to determine the decision result corresponding to the intelligent agent; The graph construction unit is used to construct the decision graph corresponding to the agent based on the sensor coding information, the internal state coding information and the decision result; The feature extraction unit is used to extract features from the sensor information to obtain feature information corresponding to the sensor information; The intent inference unit is used to infer the intent of the agent based on the feature information and obtain the intent inference result corresponding to the agent. The fourth determining unit is used to determine the decision path information corresponding to the decision result based on a pre-constructed behavior evaluation map; The decision verification unit is used to verify the decision result based on the preset decision verification rules and obtain the decision verification result corresponding to the intelligent agent. The fifth determining unit is used to take the decision graph, the intent inference result, the decision path information, and the decision verification result as the observation result corresponding to the agent; The step of inferring the intent of the agent based on the feature information to obtain the intent inference result corresponding to the agent includes: A pre-built intent inference model is applied to perform attention inference processing on the feature information to obtain the attention weights corresponding to each region feature in the feature information; the intent inference model is a model built based on an attention mechanism. The attention weights corresponding to each region feature are compared, and the region feature with the relatively larger attention weight is taken as the target region feature. Based on the features of the target region, the decision intention corresponding to the agent is determined, and the decision intention is used as the intention inference result corresponding to the agent. The construction process of the behavior assessment map includes: Determine the various operating states corresponding to the intelligent agent; Determine the value dataset corresponding to each of the aforementioned operating states; the value dataset corresponding to each of the aforementioned operating states includes the Q-values corresponding to each action in that operating state; The behavior evaluation graph is constructed based on the value dataset corresponding to each of the aforementioned operating states.
7. A storage medium, characterized in that, The storage medium includes stored instructions, wherein, when the instructions are executed, the device containing the storage medium is controlled to perform the observation method of the intelligent agent as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes a memory, and one or more instructions, wherein one or more instructions are stored in the memory and configured to be executed by one or more processors using the observation method of the agent as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Efficient reinforcement learning strategy model with self-adaptive capacity
CN111950690A
Reinforcement learning method based on environment prediction model
CN111950722A