WO2024067113A1 - 一种动作预测方法及其相关设备 - Google Patents

一种动作预测方法及其相关设备 Download PDF

Info

Publication number
WO2024067113A1
WO2024067113A1 PCT/CN2023/118708 CN2023118708W WO2024067113A1 WO 2024067113 A1 WO2024067113 A1 WO 2024067113A1 CN 2023118708 W CN2023118708 W CN 2023118708W WO 2024067113 A1 WO2024067113 A1 WO 2024067113A1
Authority
WO
WIPO (PCT)
Prior art keywords
agent
state
action
actions
joint
Prior art date
Application number
PCT/CN2023/118708
Other languages
English (en)
French (fr)
Inventor
李银川
邵云峰
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2024067113A1 publication Critical patent/WO2024067113A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • G06V20/41Higher-level, semantic clustering, classification or understanding of video scenes, e.g. detection, labelling or Markovian modelling of sport events or news items
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks

Definitions

  • the embodiments of the present application relate to the field of artificial intelligence (AI) technology, and in particular to an action prediction method and related equipment.
  • AI artificial intelligence
  • neural network models are widely used to describe and solve the action strategy selection of agents in the process of interaction with the environment, so that agents can maximize rewards or achieve specific goals after performing corresponding actions.
  • the neural network model provided by the relevant technology can process the information associated with the initial state of an intelligent agent after determining that the agent is in the initial state, thereby predicting the action of the intelligent agent, and the action of the intelligent agent is used to make the intelligent agent enter the terminal state from the initial state. In this way, the intelligent agent can execute the action predicted by the neural network model to reach the terminal state.
  • the neural network model only considers the information of the agent itself when predicting the action of the agent, and the factors considered are relatively simple.
  • the actions predicted by this method are not accurate enough (that is, not realistic enough), resulting in the agent being unable to maximize the reward or achieve specific goals after executing the predicted actions.
  • the embodiments of the present application provide an action prediction method and related equipment, and provide a new action prediction method, which predicts the action more accurately and enables the intelligent agent to obtain maximum rewards or achieve specific goals after executing the predicted action.
  • a first aspect of an embodiment of the present application provides an action prediction method, the method comprising:
  • the first agent and the second agent are in the first state in the environment (the first state can be either the initial state in the generative flow model or an intermediate state)
  • the first agent can collect its own state information from the environment at this time, and the state information can be used to indicate that the first agent and the second agent are in the first state.
  • the first agent After the first agent obtains its own state information, it can input its own state information into the generative flow model set in itself, so as to process its own state information through the generative flow model, thereby obtaining the occurrence probability of N joint actions between the first agent and the second agent, N ⁇ 1.
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state in the environment, and the i-th joint action is constructed by the i-th independent action among the N independent actions of the first agent and the i-th independent action among the N independent actions of the second agent.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N joint actions between the first agent and the second agent.
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first agent and the action of the second agent.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information of the first agent may be information collected when the first agent is in the first state, and the information may be an image taken by the first agent through a camera, or a video taken by the first agent through a camera, or It can be the audio collected by the first agent through a microphone, or it can be the text generated by the first agent, and so on.
  • the method further includes: selecting the joint action with the highest occurrence probability from the N joint actions; and executing the action of the first agent included in the joint action with the highest occurrence probability.
  • the first agent can select the joint action with the highest occurrence probability from the N joint actions, and execute the independent action of the first agent included in the joint action to enter one of the N second states. At this point, the first agent has completed the action execution for the first state.
  • a second aspect of the embodiments of the present application provides an action prediction method, the method comprising:
  • the first agent and the second agent are in the first state in the environment (the first state can be either the initial state in the generative flow model or an intermediate state)
  • the first agent can collect its own state information from the environment at this time, and the state information can be used to indicate that the first agent and the second agent are in the first state.
  • the first agent After the first agent obtains its own state information, it can input its own state information into the generative flow model set in itself, so as to process its own state information through the generative flow model, thereby obtaining the occurrence probability of N independent actions of the first agent, N ⁇ 1.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent.
  • the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive.
  • the actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the method further includes: selecting the action with the highest occurrence probability from the N actions; and executing the action with the highest occurrence probability.
  • a third aspect of the embodiments of the present application provides a model training method, the method comprising:
  • a batch of training data can be obtained, the batch of training data includes the state information of the first agent, and the state information is used to indicate that the first agent and the second agent are in the first state. It should be noted that the reward value corresponding to the first state is known.
  • the first agent After obtaining the state information of the first agent, the first agent can input its own state information into its own generation flow model to process the state information through the model to be trained to obtain the occurrence probability of N joint actions between the first agent and the second agent (that is, the N joint actions flowing out of the first state).
  • the i-th joint action flowing out of the first state is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the occurrence probabilities of N joint actions flowing out of the first state are obtained, and the parameters of the model to be trained can be updated based on the occurrence probabilities of the N joint actions flowing out of the first state until the model training conditions are met to obtain a generated flow model.
  • the generative flow model trained by the above method has the function of predicting the actions of intelligent agents. Specifically, after the first intelligent agent obtains the state information indicating that the first intelligent agent and the second intelligent agent are in the first state, the state information can be processed through the generative flow model to obtain the probability of occurrence of N joint actions between the first intelligent agent and the second intelligent agent. Among these N joint actions, the i-th joint action is used to make the first intelligent agent and the second intelligent agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first intelligent agent and the action of the second intelligent agent. At this point, the first intelligent agent has completed the action prediction for the first state.
  • the first intelligent agent The state information indicates information related to the first agent and the second agent. Therefore, when the generative flow model predicts the action of the first agent based on the state information, it not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents. The factors considered are more comprehensive. This new method predicts the action more accurately (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the first agent can also obtain the occurrence probabilities of the M joint actions flowing into the first state (i.e., the M joint actions between the first agent and the second agent). It should be noted that among the M joint actions flowing into the first state, the jth joint action flowing into the first state is used to make the first agent and the second agent enter the first state from the jth third state. Then, the occurrence probabilities of the M joint actions flowing into the first state, the occurrence probabilities of the N joint actions flowing out of the first state, and the reward value corresponding to the first state can be calculated to obtain the target loss.
  • a fourth aspect of the embodiments of the present application provides a model training method, the method comprising:
  • a batch of training data may be obtained, the batch of training data includes the state information of the first agent, and the state information is used to indicate that the first agent and the second agent are in the first state. It should be noted that the reward value corresponding to the first state is known.
  • the first agent After obtaining the state information of the first agent, the first agent can input its own state information into its own generation flow model to process the state information through the first agent's model to be trained to obtain the occurrence probability of N independent actions of the first agent (that is, the N independent actions of the first agent flowing out of the first state).
  • the first agent can also obtain the occurrence probabilities of the N independent actions of the second agent flowing out from the first state from the second agent.
  • the occurrence probabilities of the N independent actions of the second agent flowing out from the first state are obtained through the model to be trained of the second agent.
  • the first agent can calculate the occurrence probabilities of N independent actions of the first agent flowing out of the first state and the occurrence probabilities of N independent actions of the second agent flowing out of the first state, so as to obtain the occurrence probabilities of N joint behaviors flowing out of the first state.
  • the first agent can update the parameters of the model to be trained of the first agent based on the occurrence probability of the N joint actions flowing out of the first state until the model training conditions are met, thereby obtaining the generation flow model of the first agent.
  • the generative flow model trained by the above method has the function of predicting the action of the agent. Specifically, after the first agent obtains the state information indicating that the first agent and the second agent are in the first state, the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent. Among the N actions, the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state. At this point, the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the parameters of the to-be-trained model of the first agent are updated until the model training conditions are met, and the generation flow model of the first agent is obtained, including: determining the target loss based on the occurrence probabilities of the M joint actions between the first agent and the second agent, the occurrence probabilities of the N joint actions and the reward value corresponding to the first state, M
  • the parameters of the to-be-trained model of the first agent are updated until the model training conditions are met, and the generation flow model of the first agent is obtained.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N joint actions between the first agent and the second agent.
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first agent and the action of the second agent.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive.
  • the action predicted by this new method is more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the processing module is used to: select a joint action with the highest probability of occurrence from N joint actions; and execute the action of the first agent included in the joint action with the highest probability of occurrence.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent.
  • the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive.
  • the actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the processing module is used to: select the action with the highest probability of occurrence from N actions; and execute the action with the highest probability of occurrence.
  • the above-mentioned device is trained to obtain a generative flow model, which has the function of predicting the action of the agent. Specifically, after the first agent obtains the state information indicating that the first agent and the second agent are in the first state, the state information can be processed by the generative flow model to obtain the second state.
  • the probability of N joint actions between an agent and a second agent is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the i-th joint action includes the action of the first agent and the action of the second agent. At this point, the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the eighth aspect of the embodiment of the present application provides a model training device, which includes: an acquisition module, used to obtain state information of a first agent, the state information is used to indicate that the first agent and the second agent are in a first state; a first processing module, used to process the state information through the model to be trained of the first agent, and obtain the occurrence probability of N actions of the first agent, N ⁇ 1; a second processing module, used to determine the occurrence probability of N joint actions between the first agent and the second agent based on the occurrence probability of the N actions of the first agent and the occurrence probability of the N actions of the second agent, the N actions of the second agent are obtained through the model to be trained of the second agent, and the i-th joint action among the N joint actions is used to make the first agent and the second agent enter the i-th second state from the first state; an update module 1404, used to update the parameters of the model to be trained of the first agent based on the occurrence probability of the N joint actions until the model training conditions are met to obtain the generation flow model
  • the generative flow model trained by the above-mentioned device has the function of predicting the action of the agent. Specifically, after the first agent obtains the state information indicating that the first agent and the second agent are in the first state, the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent. Among the N actions, the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state. At this point, the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive.
  • the action predicted by this new method is more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • a ninth aspect of an embodiment of the present application provides an action prediction device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code.
  • the action prediction device performs the method described in the first aspect, any possible implementation of the first aspect, the second aspect, or any possible implementation of the second aspect.
  • the tenth aspect of an embodiment of the present application provides a model training device, which includes a memory and a processor; the memory stores code, and the processor is configured to execute the code.
  • the model training device executes the method described in the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect.
  • An eleventh aspect of the present application provides a circuit system, the circuit system comprising a processing circuit, the processing circuit being configured to execute
  • the method may be carried out as described in the first aspect, any possible implementation of the first aspect, the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect.
  • the twelfth aspect of an embodiment of the present application provides a chip system, which includes a processor for calling a computer program or computer instructions stored in a memory so that the processor executes a method as described in the first aspect, any possible implementation of the first aspect, the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect.
  • the processor is coupled to the memory through an interface.
  • the chip system also includes a memory, in which a computer program or computer instructions are stored.
  • a thirteenth aspect of an embodiment of the present application provides a computer storage medium, which stores a computer program.
  • the program When the program is executed by a computer, the computer implements the method described in the first aspect, any possible implementation of the first aspect, the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect.
  • a fourteenth aspect of an embodiment of the present application provides a computer program product, which stores instructions, which, when executed by a computer, enable the computer to implement the method described in the first aspect, any possible implementation of the first aspect, the second aspect, any possible implementation of the second aspect, the third aspect, any possible implementation of the third aspect, the fourth aspect, or any possible implementation of the fourth aspect.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N joint actions between the first agent and the second agent.
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first agent and the action of the second agent.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum return or achieve a specific goal after executing the predicted action.
  • FIG1 is a schematic diagram of a structure of an artificial intelligence main framework
  • FIG2a is a schematic diagram of a structure of a video processing system provided in an embodiment of the present application.
  • FIG2b is another schematic diagram of the structure of the video processing system provided in an embodiment of the present application.
  • FIG2c is a schematic diagram of a video processing related device provided in an embodiment of the present application.
  • FIG3 is a schematic diagram of the architecture of the system 100 provided in an embodiment of the present application.
  • FIG4 is a schematic diagram of a structure of a generation flow model provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of a flow chart of an action prediction method provided in an embodiment of the present application.
  • FIG6 is another schematic diagram of the structure of the generation flow model provided in an embodiment of the present application.
  • FIG7 is a schematic diagram of a flow chart of an action prediction method provided in an embodiment of the present application.
  • FIG8 is another schematic diagram of the structure of the generation flow model provided in an embodiment of the present application.
  • FIG9 is a flow chart of a model training method provided in an embodiment of the present application.
  • FIG10 is a flow chart of a model training method provided in an embodiment of the present application.
  • FIG11 is a schematic diagram of a structure of an action prediction device provided in an embodiment of the present application.
  • FIG12 is another schematic diagram of the structure of the action prediction device provided in an embodiment of the present application.
  • FIG13 is a schematic diagram of a structure of a model training device provided in an embodiment of the present application.
  • FIG14 is another schematic diagram of the structure of the model training device provided in an embodiment of the present application.
  • FIG15 is a schematic diagram of a structure of an execution device provided in an embodiment of the present application.
  • FIG16 is a schematic diagram of a structure of a training device provided in an embodiment of the present application.
  • FIG. 17 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
  • the embodiments of the present application provide an action prediction method and related equipment, and provide a new action prediction method, which predicts the action more accurately and enables the intelligent agent to obtain maximum rewards or achieve specific goals after executing the predicted action.
  • neural network models are widely used to describe and solve the action strategy selection of intelligent agents in the process of interaction with the environment, so that the intelligent agents can maximize the rewards or achieve specific goals after performing corresponding actions.
  • the neural network model provided by the relevant technology can process the information associated with the initial state of an intelligent agent after determining that the intelligent agent is in the initial state, thereby predicting the action of the intelligent agent, and the action of the intelligent agent is used to make the intelligent agent enter the terminal state from the initial state. In this way, the intelligent agent can execute the action predicted by the neural network model to reach the terminal state.
  • the intelligent agent is a vehicle in an automatic driving scene. When the vehicle approaches an intersection in a straight line, the vehicle detects that a red light appears at the intersection (for example, the camera of the vehicle captures a red light at the intersection). At this time, the vehicle driving to the intersection where the red light appears can be regarded as the initial state of the vehicle.
  • the vehicle can input the information indicating that it is in the initial state (for example, the image of the red light at the intersection captured by the camera) into the neural network model, and the model can analyze the information to predict the action to be performed by the vehicle (for example, the vehicle stops driving), so that the vehicle performs the action, and stops before the intersection where the red light appears, which can be regarded as the terminal state of the vehicle.
  • the initial state for example, the image of the red light at the intersection captured by the camera
  • the model can analyze the information to predict the action to be performed by the vehicle (for example, the vehicle stops driving), so that the vehicle performs the action, and stops before the intersection where the red light appears, which can be regarded as the terminal state of the vehicle.
  • the neural network model only considers the information of the agent itself when predicting the action of the agent, and the factors considered are relatively simple.
  • the actions predicted by this method are not accurate enough (that is, not realistic enough), resulting in the agent being unable to maximize the reward or achieve specific goals after executing the predicted actions.
  • AI technology is a technical discipline that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence. AI technology obtains the best results by sensing the environment, acquiring knowledge and using knowledge.
  • artificial intelligence technology is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence.
  • Using artificial intelligence for data processing is a common application of artificial intelligence.
  • Figure 1 is a structural diagram of the main framework of artificial intelligence.
  • the following is an explanation of the above artificial intelligence theme framework from the two dimensions of "intelligent information chain” (horizontal axis) and “IT value chain” (vertical axis).
  • the "intelligent information chain” reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, the data has undergone a condensation process of "data-information-knowledge-wisdom".
  • the "IT value chain” reflects the value that artificial intelligence brings to the information technology industry from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the industrial ecology process of the system.
  • the infrastructure provides computing power support for the artificial intelligence system, enables communication with the outside world, and is supported by the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips (CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips); the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
  • smart chips CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips
  • the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc.
  • sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.
  • the data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence.
  • the data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
  • machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
  • Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
  • Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.
  • some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
  • Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical applications. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
  • FIG2a is a schematic diagram of a structure of an action prediction system provided in an embodiment of the present application, wherein the action prediction system includes an intelligent agent and a data processing device.
  • the intelligent agent includes an intelligent terminal such as a robot, a vehicle-mounted device or a drone.
  • the intelligent agent is the initiator of the action prediction. As the initiator of the action prediction request, the intelligent agent can initiate the request on its own.
  • the above-mentioned data processing device can be a device or server with data processing function such as a cloud server, a network server, an application server and a management server.
  • the data processing device receives the action prediction request from the smart terminal through the interactive interface, and then performs information processing such as machine learning, deep learning, search, reasoning, decision-making, etc. through the memory for storing data and the processor link for data processing.
  • the memory in the data processing device can be a general term, including local storage and databases for storing historical data.
  • the database can be on the data processing device or on other network servers.
  • the agent can obtain its own state information, and then initiate a request to the data processing device, so that the data processing device executes the action prediction application for the state information obtained by the agent, thereby obtaining the occurrence probability of the action of the agent.
  • an agent can obtain state information indicating that it and other agents are in a certain state, and initiate a processing request for the state information to the data processing device.
  • the data processing device can call the generative flow model to process the state information, thereby obtaining the occurrence probability of the joint action between the agent and other agents, and return the occurrence probability of the joint action to the agent.
  • the joint action can make the agent and other agents enter the next state from this state, so that the action prediction for the agent is completed. Since the joint action is constructed by the independent action of the agent and the independent actions of other agents, the agent can select the joint action with the highest probability of occurrence, and execute its own independent action contained in the joint action to enter the next state. For another example, an agent can obtain state information indicating that it and other agents are in a certain state, and initiate a processing request for the state information to the data processing device. Next, the data processing device can call the generative flow model to process the state information, thereby obtaining the probability of occurrence of the agent's independent action, and returning the probability of occurrence of the independent action to the agent. The independent action can enable the agent and other agents to enter the next state from this state, so that the action prediction for the agent is completed. Then, the agent can select the independent action with the highest probability of occurrence and execute the independent action to enter the next state.
  • the data processing device may execute the action prediction method according to the embodiment of the present application.
  • Figure 2b is another structural diagram of the action prediction system provided in an embodiment of the present application.
  • the intelligent agent itself can complete the action prediction.
  • the intelligent agent can directly obtain its own state information and directly process it by the hardware of the intelligent agent itself. The specific process is similar to Figure 2a. Please refer to the above description and will not be repeated here.
  • an agent can obtain state information indicating that it and other agents are in a certain state, and process the state information to obtain the probability of occurrence of a joint action between the agent and other agents.
  • the joint action can make the agent and other agents enter the next state from this state, and thus the action prediction for the agent is completed. Since the joint action is constructed by the independent action of the agent and the independent actions of other agents, the agent can Select the joint action with the highest probability of occurrence, and execute its own independent action contained in the joint action to enter the next state.
  • an agent can obtain state information indicating that it and other agents are in a certain state, and call the generative flow model to process the state information to obtain the probability of occurrence of the agent's independent action.
  • the independent action can make the agent and other agents enter the next state from this state, so that the action prediction for the agent is completed. Then, the agent can select the independent action with the highest probability of occurrence and execute the independent action to enter the next state.
  • the intelligent agent itself can execute the action prediction method of the embodiment of the present application.
  • FIG. 2c is a schematic diagram of a device related to action prediction provided in an embodiment of the present application.
  • the intelligent agent in the above Figures 2a and 2b can specifically be the local device 301 or the local device 302 in Figure 2c, and the data processing device in Figure 2a can specifically be the execution device 210 in Figure 2c, wherein the data storage system 250 can store the data to be processed of the execution device 210, and the data storage system 250 can be integrated on the execution device 210, and can also be set on the cloud or other network servers.
  • the processors in Figures 2a and 2b can perform data training/machine learning/deep learning through a neural network model or other models (e.g., a generative flow model), and use the model finally trained or learned from the data to complete an action prediction application for the state information of the intelligent agent, thereby predicting the action of the intelligent agent.
  • a neural network model or other models e.g., a generative flow model
  • Figure 3 is a schematic diagram of the system 100 architecture provided in an embodiment of the present application.
  • the execution device 110 is configured with an input/output (I/O) interface 112 for data interaction with an external device.
  • the client device 140 i.e., the aforementioned intelligent agent
  • the input data may include: various tasks to be scheduled, callable resources, and other parameters in the embodiment of the present application.
  • the execution device 110 When the execution device 110 preprocesses the input data, or when the computing module 111 of the execution device 110 performs calculation and other related processing (such as implementing the function of the neural network in the present application), the execution device 110 can call the data, code, etc. in the data storage system 150 for the corresponding processing, and can also store the data, instructions, etc. obtained by the corresponding processing in the data storage system 150.
  • the I/O interface 112 returns the processing result to the client device 140 .
  • the training device 120 can generate corresponding target models/rules based on different training data for different goals or different tasks, and the corresponding target models/rules can be used to achieve the above goals or complete the above tasks, thereby providing the user with the desired results.
  • the training data can be stored in the database 130 and come from the training samples collected by the data collection device 160.
  • the user can manually give input data, and the manual giving can be operated through the interface provided by the I/O interface 112.
  • the client device 140 can automatically send input data to the I/O interface 112. If the client device 140 is required to automatically send input data and needs to obtain the user's authorization, the user can set the corresponding authority in the client device 140.
  • the user can view the results output by the execution device 110 on the client device 140, and the specific presentation form can be a specific method such as display, sound, action, etc.
  • the client device 140 can also be used as a data acquisition terminal to collect the input data of the input I/O interface 112 and the output results of the output I/O interface 112 as shown in the figure as new sample data, and store them in the database 130.
  • the I/O interface 112 directly stores the input data of the input I/O interface 112 and the output results of the output I/O interface 112 as new sample data in the database 130.
  • FIG3 is only a schematic diagram of a system architecture provided by an embodiment of the present application, and the positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation.
  • the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110.
  • a neural network can be obtained by training according to the training device 120.
  • the embodiment of the present application also provides a chip, which includes a neural network processor NPU.
  • the chip can be set in the execution device 110 as shown in Figure 3 to complete the calculation work of the calculation module 111.
  • the chip can also be set in the training device 120 as shown in Figure 3 to complete the training work of the training device 120 and output the target model/rule.
  • Neural network processor NPU is mounted on the main central processing unit (CPU) (host CPU) as a coprocessor, and the main CPU assigns tasks.
  • the core part of NPU is the operation circuit, and the controller controls the operation circuit to extract data from the memory (weight memory or input memory) and perform operations.
  • the arithmetic circuit includes multiple processing units (process engines, PEs) inside.
  • the arithmetic circuit is a two-dimensional systolic array.
  • the arithmetic circuit can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition.
  • the arithmetic circuit is a general-purpose matrix processor.
  • the operation circuit takes the corresponding data of matrix B from the weight memory and caches it on each PE in the operation circuit.
  • the operation circuit takes the matrix A data from the input memory and performs matrix operations with matrix B.
  • the partial results or final results of the matrix are stored in the accumulator.
  • the vector calculation unit can further process the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc.
  • the vector calculation unit can be used for network calculations of non-convolutional/non-FC layers in neural networks, such as pooling, batch normalization, local response normalization, etc.
  • the vector computation unit can store the processed output vector to a unified buffer.
  • the vector computation unit can apply a nonlinear function to the output of the computation circuit, such as a vector of accumulated values, to generate an activation value.
  • the vector computation unit generates a normalized value, a merged value, or both.
  • the processed output vector can be used as an activation input to the computation circuit, such as for use in a subsequent layer in a neural network.
  • the unified memory is used to store input data and output data.
  • the weight data is directly transferred from the external memory to the input memory and/or the unified memory through the direct memory access controller (DMAC), the weight data in the external memory is stored in the weight memory, and the data in the unified memory is stored in the external memory.
  • DMAC direct memory access controller
  • the bus interface unit (BIU) is used to enable interaction between the main CPU, DMAC and instruction fetch memory through the bus.
  • An instruction fetch buffer connected to the controller, used to store instructions used by the controller
  • the controller is used to call the instructions cached in the memory to control the working process of the computing accelerator.
  • the unified memory, input memory, weight memory and instruction fetch memory are all on-chip memories
  • the external memory is a memory outside the NPU, which can be a double data rate synchronous dynamic random access memory (DDR SDRAM), a high bandwidth memory (HBM) or other readable and writable memory.
  • DDR SDRAM double data rate synchronous dynamic random access memory
  • HBM high bandwidth memory
  • a neural network may be composed of neural units, and a neural unit may refer to an operation unit with xs and intercept 1 as input, and the output of the operation unit may be:
  • n is a natural number greater than 1
  • Ws is the weight of xs
  • b is the bias of the neural unit.
  • f is the activation function of the neural unit, which is used to introduce nonlinear characteristics into the neural network to convert the input signal in the neural unit into the output signal.
  • the output signal of the activation function can be used as the input of the next convolutional layer.
  • the activation function can be a sigmoid function.
  • a neural network is a network formed by connecting many of the above-mentioned single neural units together, that is, the output of one neural unit can be the input of another neural unit.
  • the input of each neural unit can be connected to the local receptive field of the previous layer to extract the characteristics of the local receptive field.
  • the local receptive field can be an area composed of several neural units.
  • the word "space” is used here because the classified object is not a single thing, but a class of things, and space refers to the collection of all individuals of this class of things.
  • W is a weight vector, and each value in the vector represents the weight value of a neuron in this layer of the neural network.
  • the vector W determines the spatial transformation from input space to output space described above, that is, the weight W of each layer controls how to transform the space.
  • the purpose of training a neural network is to finally obtain the weight matrix of all layers of the trained neural network (formed by many layers of vector W). Therefore, the training process of a neural network is essentially about learning how to control spatial transformations, and more specifically, learning the weight matrix.
  • Neural networks can use the error back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during the training process, so that the reconstruction error loss of the neural network model becomes smaller and smaller. Specifically, the forward transmission of the input signal to the output will generate error loss, and the error loss information is back-propagated to update the parameters in the initial neural network model, so that the error loss converges.
  • the back propagation algorithm is a back propagation movement dominated by error loss, which aims to obtain the optimal parameters of the neural network model, such as the weight matrix.
  • Generative flow models usually refer to models constructed in the form of directed acyclic graphs, that is, each state node has at least one parent state node, which is different from the tree structure where each state node has only one parent state node.
  • Generative flow models have a unique initial state node and multiple terminal state nodes. Generative flow models predict actions starting from the initial state node, thereby completing the transition between different states until reaching the terminal state node.
  • the initial state node may include output flow
  • the intermediate state node may include input flow, output flow and a preset reward value
  • the terminal node may include input flow and a preset reward value.
  • the generation flow model can be imagined as a water pipe
  • the output flow of the initial state node is the total inflow of the entire generation flow model
  • the sum of the input flows of all terminal state nodes is the total outflow of the entire generation flow model.
  • the input flow is equal to the output flow.
  • the input flow and output flow of each intermediate state node are predicted by a neural network, and finally the input flow of each terminal state node can be predicted.
  • FIG. 4 is a structural diagram of a generation flow model provided by an embodiment of the present application
  • s0 is an initial state node
  • s10 and s11 are terminal state nodes
  • x3, x4, x6, x10 and x11 are composite structures
  • a reward value is set in the composite structure.
  • the output flow of the initial state node S0 is equal to the sum of the input flow of the intermediate state node S1 and the input flow of the intermediate state node S2,...
  • the input flow of the terminal state node S10 is equal to the sum of the output flow of the intermediate state node S7 and the output flow of the intermediate state node S8, and the input flow of the terminal state node S11 is equal to the sum of the output flow of the intermediate state node S9.
  • the method provided in the present application is described below from the training side of the neural network and the application side of the neural network.
  • the model training method provided in the embodiment of the present application involves the processing of data sequences, and can be specifically applied to methods such as data training, machine learning, and deep learning, and symbolizes and formalizes intelligent information modeling, extraction, preprocessing, and training of training data (for example, the state information of the first agent in the model training method provided in the embodiment of the present application, etc.), and finally obtains a trained neural network (such as the generation flow model in the model training method provided in the embodiment of the present application); and the action prediction method provided in the embodiment of the present application can use the above-mentioned trained neural network to input input data (for example, the state information of the first agent in the action prediction method provided in the embodiment of the present application, etc.) into the trained neural network to obtain output data (such as the probability of occurrence of N joint actions between the first agent and the second agent in the action prediction method provided in the embodiment of the present application or the probability of occurrence of N actions of the first agent, etc.).
  • input input data for example, the state information of the first agent in the action prediction
  • model training method and action prediction method provided in the embodiment of the present application are inventions based on the same concept, and can also be understood as two parts in a system, or two stages of an overall process: such as the model training stage and the model application stage.
  • the action prediction method provided in the embodiment of the present application can be applied to a variety of scenarios.
  • the concepts of intelligent agents, actions, and states involved in the method change with the change of application scenarios.
  • a vehicle in an autonomous driving scenario, a vehicle can predict its next driving action and execute the driving action based on the current driving state of itself and other vehicles in the traffic environment, so as to change the driving state of itself and other vehicles in the traffic environment.
  • a robot in a supply chain scenario, a robot can predict its next driving action based on the current driving state of itself and other vehicles in the traffic environment.
  • the robot's current transportation state in the workshop predicts its next transportation direction and moves in these directions to change its own transportation state and that of other robots in the workshop.
  • FIG. 5 is a flow chart of the action prediction method provided in an embodiment of the present application. As shown in Figure 5, the method includes:
  • 501 Obtain state information of a first agent, where the state information is used to indicate that the first agent and the second agent are in a first state.
  • first agent and the second agent are two related agents (that is, the independent actions of the two agents will affect each other), and the two agents will constantly interact with the environment, that is, perform various independent actions in the environment, thereby changing the states of the two agents in the environment.
  • first agent can predict the independent action of the first agent by itself, and perform the independent action, thereby constantly changing the state of the first agent in the environment.
  • second agent is also the same. Since the prediction operations performed by the first agent and the second agent are similar, for the sake of ease of introduction, the following is a schematic introduction taking the first agent as an example:
  • the first agent can collect its own state information from the environment at this time, and the state information can be used to indicate that the first agent and the second agent are in the first state.
  • the state information of the first agent can be the information collected when the first agent is in the first state, and the information can be an image taken by the first agent through a camera, a video taken by the first agent through a camera, an audio collected by the first agent through a microphone, a text generated by the first agent, and so on.
  • the first agent and the second agent be vehicle 1 and vehicle 2 in the autonomous driving scenario, respectively.
  • Vehicle 1 and vehicle 2 are driving straight on two adjacent lanes and arrive at a certain intersection.
  • vehicle 1 can take a photo at this time, and the content of the photo shows the upcoming intersection and vehicle 2 driving straight next to it. It can be seen that the photo is used to indicate that vehicle 1 and vehicle 2 have arrived at the intersection (that is, vehicle 1 and vehicle 2 are in the initial state S0).
  • the first agent After the first agent obtains its own state information, it can input its own state information into the generative flow model set in itself, so as to process its own state information through the generative flow model (for example, a series of feature extraction processing, etc.), thereby obtaining the probability of occurrence of N joint actions between the first agent and the second agent (N is a positive integer greater than or equal to 1).
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state in the environment (the second state can also be understood as the state after the first state in the generative flow model), and the i-th joint action is constructed by the i-th independent action among the N independent actions of the first agent and the i-th independent action among the N independent actions of the second agent.
  • the first agent can select the joint action with the highest probability of occurrence among the N joint actions, and execute the independent action of the first agent included in the joint action to enter one of the N second states. At this point, the first agent has completed the action execution for the first state.
  • the first agent can collect new state information from the environment, and the new state information is used to indicate that the first agent and the second agent are in the second state in the environment.
  • the first agent can process the new state information through its own generative flow model, thereby completing the action prediction for the second state and the action execution for the second state (this process can refer to the relevant description of the action prediction for the first state and the action execution for the first state, here Not to be elaborated), until entering a certain terminal state, the action prediction and action execution are stopped.
  • FIG. 6 is another structural diagram of the generative flow model provided in an embodiment of the present application
  • the generative flow model can determine, based on the photograph, that vehicles 1 and 2 are in the initial state node S0 (i.e., vehicles 1 and 2 are in the initial state S0). Then, the generative flow model can process the photograph to obtain the flow of the joint action a1a2 between vehicle 1 and vehicle 2 (also referred to as the occurrence probability of the joint action a1a2), and the flow of the joint action a2a2 between vehicle 1 and vehicle 2.
  • the joint action a1a2 is composed of the independent action a1 of vehicle 1 (for example, turning left at the intersection) and the independent action a2 of vehicle 2 (for example, going straight at the intersection), the joint action a2a2 is composed of the independent action a2 of vehicle 1 and the independent action a2 of vehicle 2, the joint action a1a2 is used to make vehicles 1 and 2 directly enter the intermediate state node S1 from the initial state node S0 (it can also be called that the joint action a1a2 flows out from the initial state node S0 and flows into the intermediate state node S1), and the joint action a2a2 is used to make vehicles 1 and 2 directly enter the intermediate state node S2 from the initial state node S0.
  • the sum of the flow of the joint action a1a2 and the flow of the joint action a2a2 is the output flow of the initial state node S0
  • the flow of the joint action a1a2 is the input flow of the intermediate state node S1
  • the flow of the joint action a2a2 is the input flow of the intermediate state node S2.
  • vehicle 1 can choose the joint action a1a2, and regard the flow rate of the joint action a1a2 as the flow rate of the independent action a1, and execute the independent action a1, that is, turn left at the intersection.
  • vehicle 2 will also execute the behavior prediction of vehicle 1, and finally execute the independent action a2, that is, go straight at the intersection. It can be seen that vehicle 1 and vehicle 2 are now in the middle state S1 (that is, vehicle 1 turns left at the intersection, and vehicle 2 goes straight at the intersection).
  • vehicle 1 can take a new photo, which is used to indicate that vehicle 1 and vehicle 2 are in the intermediate state S1. Then, after vehicle 1 inputs the new photo into the generative flow model of vehicle 1, the generative flow model can process the photo to obtain the flow of the joint action a3a4 between vehicle 1 and vehicle 2 (also called the occurrence probability of the joint action a3a4).
  • the joint action a3a4 is composed of the independent action a3 of vehicle 1 and the independent action a4 of vehicle 2.
  • the joint action a3a4 is used to make vehicles 1 and 2 directly enter the intermediate state node S3 from the intermediate state node S1.
  • the flow of the joint action a3a4 is the output flow of the intermediate state node S1
  • the flow of the joint action a3a4 is the input flow of the intermediate state node S3.
  • vehicle 1 can perform independent action a3.
  • vehicle 2 will also perform the behavior prediction of vehicle 1 and finally perform independent action a4. It can be seen that vehicle 1 and vehicle 2 are in the intermediate state S3 at this time.
  • vehicle 1 and vehicle 2 are at a certain terminal state node.
  • vehicle 1 and vehicle 2 continue to transfer states (i.e., perform action prediction and action execution) from intermediate state node S3, pass through intermediate state node S7 and intermediate state node S10, and finally reach terminal state node S13 without any further state transfer.
  • states i.e., perform action prediction and action execution
  • the independent action of the first agent can be understood as the action of the first agent
  • the independent action of the second agent can be understood as the action of the second agent
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N joint actions between the first agent and the second agent.
  • the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first agent and the action of the second agent.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum return or achieve a specific goal after executing the predicted action.
  • FIG. 7 is a flow chart of an action prediction method provided in an embodiment of the present application. As shown in FIG. 7 , the method includes:
  • step 701 For the introduction of step 701, please refer to the relevant description of step 501 in the embodiment shown in FIG5, which will not be repeated here.
  • the first intelligent agent After the first intelligent agent obtains its own state information, it can input its own state information into the generative flow model set in itself, so as to process its own state information through the generative flow model (for example, a series of feature extraction processing, etc.), thereby obtaining the occurrence probability of N independent actions of the first intelligent agent (N is a positive integer greater than or equal to 1).
  • the first agent can select the independent action with the highest probability of occurrence from the N independent actions and execute the independent action to enter one of the N second states. At this point, the first agent has completed the action execution for the first state.
  • the first agent can collect new state information from the environment, and the new state information is used to indicate that the first agent and the second agent are in the second state in the environment.
  • the first agent can process the new state information through its own generative flow model, thereby completing the action prediction for the second state and the action execution for the second state (this process can refer to the relevant instructions for the action prediction for the first state and the action execution for the first state, which will not be repeated here), until entering a certain termination state, and then stopping the action prediction and action execution.
  • FIG. 8 is another structural diagram of the generative flow model provided in an embodiment of the present application
  • the generative flow model can determine, based on the photograph, that vehicles 1 and 2 are in the initial state node S0 (i.e., vehicles 1 and 2 are in the initial state S0). Then, the generative flow model can process the photograph to obtain the flow of independent action a1 of vehicle 1 (also referred to as the probability of occurrence of independent action a1), and the flow of independent action a2 of vehicle 1.
  • the independent action a1 of vehicle 1 is used to make vehicle 1 and vehicle 2 directly enter the intermediate state node S1 from the initial state node S0 (it can also be called that the independent action a1 of vehicle 1 flows out from the initial state node S0 and flows into the intermediate state node S1), and the independent action a2 of vehicle 1 is used to make vehicle 1 and vehicle 2 directly enter the intermediate state node S2 from the initial state node S0.
  • the sum of the flow of the independent action a1 of vehicle 1 and the flow of the independent action a2 of vehicle 1 is the output flow of the initial state node S0
  • the flow of the independent action a1 of vehicle 1 is the input flow of the intermediate state node S1
  • the flow of the independent action a2 of vehicle 1 is the input flow of the intermediate state node S2.
  • vehicle 1 can select independent action a1 and execute independent action a1.
  • vehicle 2 will also execute the behavior prediction of vehicle 1 and finally execute independent action a2 of vehicle 2. It can be seen that vehicles 1 and 2 are both in the intermediate state S1 at this time.
  • vehicle 1 can take a new photo, which is used to indicate that vehicle 1 and vehicle 2 are in the intermediate state S1. Then, after vehicle 1 inputs the new photo into the generative flow model of vehicle 1, the generative flow model can process the photo to obtain the flow of independent action a3 of vehicle 1 (which can also be called the occurrence probability of independent action a3 of vehicle 1).
  • the independent action a3 of vehicle 1 is used to make vehicle 1 and vehicle 2 directly enter the intermediate state node S3 from the intermediate state node S1.
  • the flow of the independent action a3 of vehicle 1 is the output flow of the intermediate state node S1
  • the flow of the independent action a3 of vehicle 1 is the input flow of the intermediate state node S3.
  • vehicle 1 and vehicle 2 are at a certain terminal state node.
  • vehicle 1 and vehicle 2 continue to transfer states (i.e., perform independent action prediction and independent action execution) from intermediate state node S3, pass through intermediate state node S7 and intermediate state node S10, and finally reach terminal state node S13 without any further state transfer.
  • states i.e., perform independent action prediction and independent action execution
  • the independent action of the first agent can be understood as the action of the first agent
  • the independent action of the second agent can be understood as the action of the second agent
  • this embodiment is only schematically introduced by taking two agents as an example, and the method provided in this application can also be applied to the action prediction and action execution of a larger number of agents, for example, three agents, four agents, five agents, etc., without limitation here. system.
  • the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent, in which the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive, and the actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • FIG. 9 is a flow chart of the model training method provided by the embodiment of the present application. As shown in FIG. 9 , the method includes:
  • a batch of training data can be obtained, the batch of training data includes the state information of the first agent, and the state information is used to indicate that the first agent and the second agent are in a first state (usually referring to an intermediate state in the model to be trained). It should be noted that the reward value corresponding to the first state is known.
  • the state information of the first agent is information collected when the first agent is in a first state, and the information includes at least one of the following: image, video, audio or text.
  • step 901 please refer to the relevant description of step 501 in the embodiment shown in FIG5, which will not be repeated here.
  • the first agent After obtaining the state information of the first agent, the first agent can input its own state information into its own generation flow model to process the state information through the model to be trained to obtain the occurrence probability of N joint actions between the first agent and the second agent (hereinafter these N joint actions are referred to as N joint actions flowing out from the first state).
  • N joint actions flowing out of the first state the i-th joint action flowing out of the first state is used to make the first agent and the second agent enter the i-th second state from the first state.
  • step 902 For an introduction to step 902, please refer to the relevant description of step 502 in the embodiment shown in FIG5, which will not be repeated here.
  • the parameters of the model to be trained are updated until the model training conditions are met, thereby obtaining a generation flow model.
  • the first agent can also obtain the occurrence probabilities of the M joint actions flowing into the first state (i.e., the M joint actions between the first agent and the second agent, M being a positive integer greater than or equal to 1).
  • the occurrence probabilities of the M joint actions flowing into the first state, the occurrence probabilities of the N joint actions flowing out of the first state, and the reward value corresponding to the first state can be calculated through a preset loss function (with flow matching as the constraint target), so as to obtain the loss corresponding to the first state, which is used to indicate the difference between the sum of the occurrence probabilities of the M joint actions flowing into the first state and the sum of the occurrence probabilities of the N joint actions flowing out of the first state.
  • the first agent can also perform the same operations on the remaining intermediate states as on the first state, so the losses corresponding to all intermediate states (including the losses corresponding to the first state) can be finally obtained.
  • the occurrence probabilities of all joint actions flowing into the terminal state and the reward value corresponding to the terminal state can be calculated through a preset loss function, thereby obtaining the loss corresponding to the terminal state (the loss is used to indicate the difference between the sum of the occurrence probabilities of all joint actions flowing into the terminal state and the reward value corresponding to the terminal state).
  • the first agent can also perform the same operations on the remaining terminal states as on the terminal state, so the losses corresponding to all terminal states can be obtained in the end.
  • the losses corresponding to all intermediate states and the losses corresponding to all terminal states can be superimposed to obtain the target loss.
  • the input flow of the state node is:
  • sk is the state node
  • aa i is the i-th joint action flowing into the state node sk
  • F( sk , aa i ) is the flow of the i-th joint action flowing into the state node sk
  • N is the number of all joint actions flowing into the state node sk .
  • the input flow of the intermediate state node S3 is the sum of the flow of joint action a3a4 and the flow of joint action a4a4
  • the input flow of the terminal state node S10 is the sum of the flow of joint action a9a10 and the flow of joint action a10a10.
  • aa′ j is the jth joint action flowing out from the state node sk
  • F( sk , aa′ j ) is the flow of the jth joint action flowing out from the state node sk
  • M is the number of all joint actions flowing out from the state node sk .
  • the output flow of the intermediate state node S3 is the flow of joint actions a5a6
  • the output flow of the intermediate state node S5 is the sum of the flow of joint actions a7a8 and the flow of joint actions a8a8, and the terminal state node S10 has no output flow.
  • the sum of the losses of all state nodes except the initial state node, that is, the target loss is:
  • R(s k ) is the reward value of the state node s k
  • P is the number of all state nodes except the initial state node
  • R(s k ) is 0, if the state node s k is a terminal state node, then is 0.
  • the parameters of the model to be trained can be updated based on the target loss, and the model to be trained with updated parameters can be continuously trained using the next batch of training data until the model training conditions are met (for example, the target loss converges, etc.), and the generation flow model in the embodiment shown in FIG5 can be obtained.
  • the generative flow model trained in the embodiment of the present application has the function of predicting the actions of the agent. Specifically, after the first agent obtains the state information indicating that the first agent and the second agent are in the first state, the state information can be processed by the generative flow model to obtain The probability of occurrence of N joint actions between the first agent and the second agent, among which the i-th joint action is used to make the first agent and the second agent enter the i-th second state from the first state, and the i-th joint action includes the action of the first agent and the action of the second agent. At this point, the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information. The factors considered are more comprehensive. The actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum reward or achieve a specific goal after executing the predicted action.
  • FIG10 is a flow chart of a model training method provided in an embodiment of the present application. As shown in FIG10 , the method includes:
  • a batch of training data can be obtained, the batch of training data includes the state information of the first agent, and the state information is used to indicate that the first agent and the second agent are in a first state (usually referring to a certain intermediate state in the to-be-trained model). It should be noted that the reward value corresponding to the first state is known.
  • the state information of the first agent is information collected when the first agent is in a first state, and the information includes at least one of the following: image, video, audio or text.
  • step 1001 For the introduction of step 1001, please refer to the relevant description of step 701 in the embodiment shown in FIG. 7, which will not be repeated here.
  • the first agent After obtaining the state information of the first agent, the first agent can input its own state information into its own generation flow model to process the state information through the model to be trained to obtain the occurrence probability of N independent actions of the first agent (hereinafter referred to as the N independent actions of the first agent as the N independent actions of the first agent flowing out of the first state).
  • step 1002 For an introduction to step 1002, please refer to the relevant description of step 702 in the embodiment shown in FIG. 7, which will not be repeated here.
  • the occurrence probabilities of N actions of the first agent and the occurrence probabilities of N actions of the second agent determine the occurrence probabilities of N joint actions between the first agent and the second agent, the N actions of the second agent are obtained through the model to be trained of the second agent, and the i-th joint action among the N joint actions is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent can also obtain the occurrence probabilities of the N independent actions of the second agent flowing out from the first state from the second agent.
  • the occurrence probabilities of the N independent actions of the second agent flowing out from the first state are obtained through the model to be trained of the second agent (this process can be referred to step 1002 and will not be repeated here).
  • the i-th independent action of the second agent flowing out from the first state is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent can calculate the occurrence probabilities of N independent actions of the first agent flowing out of the first state and the occurrence probabilities of N independent actions of the second agent flowing out of the first state, thereby obtaining the occurrence probabilities of N joint behaviors flowing out of the first state.
  • the i-th joint action flowing out of the first state is used to make the first agent and the second agent enter the i-th second state from the first state.
  • the first agent can also obtain the probability of occurrence of M joint actions flowing into the first state (i.e., M joint actions between the first agent and the second agent, M is a positive integer greater than or equal to 1). It should be noted that the probability of occurrence of M joint actions flowing into the first state is obtained based on the probability of occurrence of M independent actions of the first agent flowing into the first state and the probability of occurrence of M independent actions of the second agent flowing into the first state (the sources of these probabilities can refer to the above process and will not be repeated here).
  • the first intelligent agent can calculate the occurrence probabilities of the M joint actions flowing into the first state, the occurrence probabilities of the N joint actions flowing out of the first state, and the reward value corresponding to the first state (for example, the reward value is 0) through a preset loss function (with flow matching as the constraint target), thereby obtaining the loss corresponding to the first state, which is used to indicate the difference between the sum of the occurrence probabilities of the M joint actions flowing into the first state and the sum of the occurrence probabilities of the N joint actions flowing out of the first state.
  • a preset loss function with flow matching as the constraint target
  • the first agent can also perform the same operations on the remaining intermediate states as on the first state, so the losses corresponding to all intermediate states (including the losses corresponding to the first state) can be finally obtained.
  • the occurrence probabilities of all joint actions flowing into the terminal state and the reward value corresponding to the terminal state can be calculated through a preset loss function, thereby obtaining the loss corresponding to the terminal state (the loss is used to indicate the difference between the sum of the occurrence probabilities of all joint actions flowing into the terminal state and the reward value corresponding to the terminal state).
  • the first agent can also perform the same operations on the remaining terminal states as on the terminal state, so the losses corresponding to all terminal states can be obtained in the end.
  • the losses corresponding to all intermediate states and the losses corresponding to all terminal states can be superimposed to obtain the target loss.
  • the input flow of the state node is:
  • sk is the state node
  • Ft ( sk , ai ) is the flow of the t-th agent's i-th independent action flowing into the state node sk
  • Q is the number of agents
  • F( sk , aa i ) is the flow of the i-th joint action flowing into the state node sk
  • A is a constant
  • F( sk ) is the input flow of the state node sk .
  • the flow of the joint action a3a4 is calculated by the flow of the independent action a3 of vehicle 1 and the flow of the independent action a4 of vehicle 2 and the flow of the joint action a4a4 is calculated by the flow of the independent action a4 of vehicle 1 and the flow of the independent action a4 of vehicle 2.
  • the input flow of the intermediate state node S3 is the sum of the flow of the joint action a3a4 and the flow of the joint action a4a4.
  • F t (s k ,a′ j ) is the flow of the jth independent action of the tth agent flowing out of the state node s k
  • F(s k ,aa′ j ) is the flow of the jth joint action flowing out of the state node s k
  • B is a constant.
  • the flow of the joint action a5a6 is calculated by the flow of the independent action a5 of vehicle 1 and the flow of the independent action a6 of vehicle 2
  • the output flow of the intermediate state node S3 is the flow of the joint action a5a6.
  • the parameters of the to-be-trained model of the first agent can be updated based on the target loss, and the to-be-trained model with updated parameters can be continuously trained using the next batch of training data until the model training conditions are met (for example, the target loss converges, etc.).
  • the generation flow model of the first agent in the embodiment shown in FIG. 7 can be obtained.
  • the generative flow model trained by the embodiment of the present application has the function of predicting the action of the agent. Specifically, after the first agent obtains the state information indicating that the first agent and the second agent are in the first state, the state information can be processed by the generative flow model to obtain the probability of occurrence of N actions of the first agent, in which the i-th action is used to make the first agent and the second agent enter the i-th second state from the first state. So far, the first agent has completed the action prediction for the first state.
  • the generative flow model since the state information of the first agent indicates the information related to the first agent and the second agent, the generative flow model not only considers the information of the first agent itself, but also considers the information of the second agent itself and the relationship between the two agents when predicting the action of the first agent based on the state information.
  • the factors considered are more comprehensive, and the actions predicted by this new method are more accurate (more realistic), which can enable the first agent to obtain the maximum return or achieve a specific goal after executing the predicted action.
  • FIG11 is a schematic diagram of the structure of the action prediction device provided in the embodiment of the present application. As shown in FIG11 , the device includes:
  • An acquisition module 1101 is used to acquire state information of a first agent, where the state information is used to indicate that the first agent and the second agent are in a first state;
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the processing module 1102 is used to: select a joint action with the highest probability of occurrence from N joint actions; and execute the action of the first agent included in the joint action with the highest probability of occurrence.
  • FIG. 12 is another schematic diagram of the structure of the action prediction device provided in an embodiment of the present application. As shown in FIG. 12 , the device includes:
  • An acquisition module 1201 is used to acquire state information of a first agent, where the state information is used to indicate that the first agent and the second agent are in a first state;
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • the processing module 1202 is configured to: select the action with the highest probability of occurrence from N actions; and execute the action with the highest probability of occurrence.
  • FIG13 is a schematic diagram of a structure of a model training device provided in an embodiment of the present application. As shown in FIG13 , the device includes:
  • An acquisition module 1301 is used to acquire state information of a first agent, where the state information is used to indicate that the first agent and the second agent are in a first state;
  • the updating module 1303 is used to update the parameters of the model to be trained based on the occurrence probabilities of the N joint actions until the model training conditions are met to obtain a generated flow model.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • FIG. 14 is another schematic diagram of the structure of the model training device provided in an embodiment of the present application. As shown in FIG. 14 , the device includes:
  • An acquisition module 1401 is used to acquire state information of a first agent, where the state information is used to indicate that the first agent and the second agent are in a first state;
  • the first processing module 1402 is used to process the state information through the to-be-trained model of the first agent to obtain the occurrence probabilities of N actions of the first agent, where N ⁇ 1;
  • the second processing module 1403 is used to determine the probability of occurrence of N joint actions between the first agent and the second agent based on the probability of occurrence of N actions of the first agent and the probability of occurrence of N actions of the second agent, the N actions of the second agent are obtained through the to-be-trained model of the second agent, and the i-th joint action among the N joint actions is used to make the first agent and the second agent enter the i-th second state from the first state;
  • the updating module 1404 is used to update the parameters of the to-be-trained model of the first agent based on the occurrence probabilities of the N joint actions until the model training conditions are met, thereby obtaining the generation flow model of the first agent.
  • the state information is information collected when the first agent is in the first state, and the information includes at least one of the following: image, video, audio or text.
  • FIG. 15 is a structural schematic diagram of the execution device provided by the embodiment of the present application.
  • the execution device 1500 can be specifically manifested as a mobile phone, a tablet, a laptop computer, an intelligent wearable device, a server, etc., which is not limited here.
  • the action prediction device described in the corresponding embodiment of FIG. 11 or FIG. 12 can be deployed on the execution device 1500 to realize the function of action prediction in the corresponding embodiment of FIG. 5 or FIG. 7.
  • the execution device 1500 includes: a receiver 1501, a transmitter 1502, a processor 1503 and a memory 1504 (wherein the number of processors 1503 in the execution device 1500 can be one or more, and FIG.
  • the processor 1503 may include an application processor 15031 and a communication processor 15032.
  • the receiver 1501, the transmitter 1502, the processor 1503 and the memory 1504 may be connected via a bus or other means.
  • the memory 1504 may include a read-only memory and a random access memory, and provides instructions and data to the processor 1503. A portion of the memory 1504 may also include a non-volatile random access memory (NVRAM).
  • NVRAM non-volatile random access memory
  • the memory 1504 stores processor and operation instructions, executable modules or data structures, or subsets thereof, or extended sets thereof, wherein the operation instructions may include various operation instructions for implementing various operations.
  • the processor 1503 controls the operation of the execution device.
  • the various components of the execution device are coupled together through a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc.
  • the bus system includes not only a data bus but also a power bus, a control bus, and a status signal bus, etc.
  • various buses are referred to as bus systems in the figure.
  • the method disclosed in the above embodiment of the present application can be applied to the processor 1503, or implemented by the processor 1503.
  • the processor 1503 can be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 1503.
  • the above processor 1503 can be a general-purpose processor, a digital signal processor (digital signal processing, DSP), a microprocessor or a microcontroller, and can further include an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field-programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components.
  • the processor 1503 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application.
  • the general processor can be a microprocessor or the processor can also be any conventional processor, etc.
  • the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor to execute, or the hardware and software modules in the decoding processor can be combined and executed.
  • the software module can be located in a random access memory, flash memory, read-only memory, programmable read-only memory or electrically erasable programmable memory, register or other mature storage media in the art.
  • the storage medium is located in the memory 1504, and the processor 1503 reads the information in the memory 1504 and completes the above method in combination with its hardware. A step of.
  • the receiver 1501 can be used to receive input digital or character information and generate signal input related to the relevant settings and function control of the execution device.
  • the transmitter 1502 can be used to output digital or character information through the first interface; the transmitter 1502 can also be used to send instructions to the disk group through the first interface to modify the data in the disk group; the transmitter 1502 can also include a display device such as a display screen.
  • the processor 1503 is used to predict the behavior of the agent through the generation flow model in the corresponding embodiment of Figure 5 or Figure 7.
  • FIG. 16 is a structural schematic diagram of the training device provided by the embodiment of the present application.
  • the training device 1600 is implemented by one or more servers.
  • the training device 1600 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPU) 1614 (for example, one or more processors) and a memory 1632, and one or more storage media 1630 (for example, one or more mass storage devices) storing application programs 1642 or data 1644.
  • the memory 1632 and the storage medium 1630 can be short-term storage or permanent storage.
  • the program stored in the storage medium 1630 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the training device. Furthermore, the central processor 1614 can be configured to communicate with the storage medium 1630 to execute a series of instruction operations in the storage medium 1630 on the training device 1600.
  • the training device 1600 may also include one or more power supplies 1626, one or more wired or wireless network interfaces 1650, one or more input and output interfaces 1658; or, one or more operating systems 1641, such as Windows ServerTM, Mac OS XTM, UnixTM, LinuxTM, FreeBSDTM, etc.
  • An embodiment of the present application also relates to a computer storage medium, in which a program for signal processing is stored.
  • the program When the program is run on a computer, the computer executes the steps executed by the aforementioned execution device, or the computer executes the steps executed by the aforementioned training device.
  • An embodiment of the present application also relates to a computer program product, which stores instructions, which, when executed by a computer, enable the computer to execute the steps executed by the aforementioned execution device, or enable the computer to execute the steps executed by the aforementioned training device.
  • the execution device, training device or terminal device provided in the embodiments of the present application may specifically be a chip, and the chip includes: a processing unit and a communication unit, wherein the processing unit may be, for example, a processor, and the communication unit may be, for example, an input/output interface, a pin or a circuit, etc.
  • the processing unit may execute the computer execution instructions stored in the storage unit so that the chip in the execution device executes the data processing method described in the above embodiment, or so that the chip in the training device executes the data processing method described in the above embodiment.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit may also be a storage unit located outside the chip in the wireless access device end, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
  • ROM read-only memory
  • RAM random access memory
  • FIG. 17 is a schematic diagram of the structure of a chip provided in an embodiment of the present application.
  • the chip can be expressed as a neural network processor NPU 1700.
  • NPU 1700 is mounted on the host CPU (Host CPU) as a coprocessor, and tasks are assigned by the Host CPU.
  • the core part of the NPU is the operation circuit 1703, which is controlled by the controller 1704 to extract matrix data from the memory and perform multiplication operations.
  • the operation circuit 1703 includes multiple processing units (Process Engine, PE) inside.
  • the operation circuit 1703 is a two-dimensional systolic array.
  • the operation circuit 1703 can also be a one-dimensional systolic array or other electronic circuits capable of performing mathematical operations such as multiplication and addition.
  • the operation circuit 1703 is a general-purpose matrix processor.
  • the operation circuit takes the corresponding data of matrix B from the weight memory 1702 and caches it on each PE in the operation circuit.
  • the operation circuit takes the matrix A data from the input memory 1701 and performs matrix operation with matrix B, and the partial result or final result of the matrix is stored in the accumulator 1708.
  • Unified memory 1706 is used to store input data and output data. Weight data is directly transferred to weight memory 1702 through Direct Memory Access Controller (DMAC) 1705. Input data is also transferred to unified memory 1706 through DMAC.
  • DMAC Direct Memory Access Controller
  • BIU stands for Bus Interface Unit, i.e., bus interface unit 1713 , which is used for the interaction between AXI bus and DMAC and instruction fetch buffer (IFB) 1709 .
  • IFB instruction fetch buffer
  • the bus interface unit 1713 (Bus Interface Unit, BIU for short) is used for the instruction fetch memory 1709 to obtain instructions from the external memory, and is also used for the storage unit access controller 1705 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
  • BIU Bus Interface Unit
  • DMAC is mainly used to transfer input data in the external memory DDR to the unified memory 1706 or to transfer weight data to the weight memory 1702 or to transfer input data to the input memory 1701.
  • the vector calculation unit 1707 includes multiple operation processing units, which further process the output of the operation circuit 1703 when necessary, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional/fully connected layer network calculations in neural networks, such as Batch Normalization, pixel-level summation, upsampling of predicted label planes, etc.
  • the vector calculation unit 1707 can store the processed output vector to the unified memory 1706.
  • the vector calculation unit 1707 can apply a linear function; or, a nonlinear function to the output of the operation circuit 1703, such as linear interpolation of the predicted label plane extracted by the convolution layer, and then, for example, a vector of accumulated values to generate an activation value.
  • the vector calculation unit 1707 generates a normalized value, a pixel-level summed value, or both.
  • the processed output vector can be used as an activation input to the operation circuit 1703, for example, for use in a subsequent layer in a neural network.
  • An instruction fetch buffer 1709 connected to the controller 1704, for storing instructions used by the controller 1704;
  • Unified memory 1706, input memory 1701, weight memory 1702 and instruction fetch memory 1709 are all on-chip memories. External memories are private to the NPU hardware architecture.
  • the processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the above program.
  • the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment.
  • the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
  • the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
  • a computer device which can be a personal computer, a training device, or a network device, etc.
  • all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof.
  • all or part of the embodiments may be implemented in the form of a computer program product.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center.
  • the computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations.
  • the available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
  • a magnetic medium e.g., a floppy disk, a hard disk, a tape
  • an optical medium e.g., a DVD
  • a semiconductor medium e.g., a solid-state drive (SSD)

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Databases & Information Systems (AREA)
  • Computational Linguistics (AREA)
  • Medical Informatics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

本申请公开了一种动作预测方法及其相关设备,提供了一种新的动作预测方式,该方式预测得到的动作较为准确,可以使得智能体执行完预测的动作后,获取最大化的回报或实现特定目标。本申请的方法包括:第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。

Description

一种动作预测方法及其相关设备
本申请要求于2022年09月28日提交中国专利局、申请号为202211192232.2、发明名称为“一种动作预测方法及其相关设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请实施例涉及人工智能(artificial intelligence,AI)技术领域,尤其涉及一种动作预测方法及其相关设备。
背景技术
随着AI技术的飞速发展,神经网络模型被广泛应用于描述和解决智能体(agent)在与环境的交互过程中的动作策略选择,从而令智能体在执行相应的动作后能够实现回报最大化或实现特定目标。
目前,相关技术提供的神经网络模型,在确定某个智能体处于初始状态后,可对与该智能体的初始状态相关联的信息进行处理,从而预测出该智能体的动作,该智能体的动作用于令该智能体从初始状态进入终止状态。如此一来,该智能体可执行神经网络模型预测得到的动作,从而到达终止状态。
上述过程中,神经网络模型在预测该智能体的动作时,仅考虑该智能体自身的信息,所考虑的因素较为单一,这种方式预测得到的动作不够准确(即不够贴合实际),导致该智能体执行完预测得到的动作后,无法使回报最大化或实现特定目标。
发明内容
本申请实施例提供了一种动作预测方法及其相关设备,提供了一种新的动作预测方式,该方式预测得到的动作较为准确,可以使得智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
本申请实施例的第一方面提供了一种动作预测方法,该方法包括:
当第一智能体以及第二智能体在环境中处于第一状态(第一状态既可以是生成流模型中的初始状态,也可以是某一个中间状态)时,第一智能体可从此时的环境中采集自身的状态信息,该状态信息可用于指示第一智能体以及第二智能体处于第一状态。
第一智能体得到自身的状态信息后,可将自身的状态信息输入至设于自身的生成流模型中,以通过生成流模型对自身的状态信息进行处理,从而得到第一智能体与第二智能体之间的N个联合动作的发生概率,N≥1。
其中,对于这N个联合动作中的任意一个联合动作而言,即对于第i个联合动作而言,第i个联合动作用于令第一智能体和第二智能体在环境中从第一状态进入第i个第二状态,第i个联合动作由第一智能体的N个独立动作中的第i个独立动作和第二智能体的N个独立动作中的第i个独立动作构建。可以理解的是,对于第i个联合动作而言,第i个联合动作的发生概率也就是第一智能体的N个独立动作中的第i个独立动作的发生概率,也就是第二智能体的N个独立动作中的第i个独立动作的发生概率。至此,第一智能体则完成了针对第一状态的动作预测,i=1,...,N。
从上述方法可以看出:第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,第一智能体的状态信息可以是第一智能体处于第一状态时所采集的信息,该信息可以是第一智能体通过摄像头拍摄的图像,也可以是第一智能体通过摄像头拍摄的视频,也可以 是第一智能体通过麦克风收集的音频,也可以是第一智能体生成的文本等等。
在一种可能实现的方式中,通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率之后,该方法还包括:从N个联合动作中选择发生概率最大的联合动作;执行发生概率最大的联合动作所包含的第一智能体的动作。前述方式中,得到N个联合动作的发生概率后,第一智能体可在N个联合动作中,选择发生概率最大的联合动作,并执行该联合动作所包含的第一智能体的独立动作,以进入N个第二状态中的某一个第二状态。至此,第一智能体则完成了针对第一状态的动作执行。
本申请实施例的第二方面提供了一种动作预测方法,该方法包括:
当第一智能体以及第二智能体在环境中处于第一状态(第一状态既可以是生成流模型中的初始状态,也可以是某一个中间状态)时,第一智能体可从此时的环境中采集自身的状态信息,该状态信息可用于指示第一智能体以及第二智能体处于第一状态。
第一智能体得到自身的状态信息后,可将自身的状态信息输入至设于自身的生成流模型中,以通过生成流模型对自身的状态信息进行处理,从而得到第一智能体的N个独立动作的发生概率,N≥1。
其中,对于这N个独立动作中的任意一个独立动作而言,即对于第i个独立动作而言,第i个独立动作用于令第一智能体和第二智能体在环境中从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测,i=1,...,N。
从上述方法可以看出:第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率之后,该方法还包括:从N个动作中,选择发生概率最大的动作;执行发生概率最大的动作。
本申请实施例的第三方面提供了一种模型训练方法,该方法包括:
当需要对待训练模型进行训练时,可获取一批训练数据,该批训练数据包含第一智能体的状态信息,且该状态信息用于指示第一智能体和第二智能体处于第一状态。需要说明的是,与第一状态对应的的奖励值是已知的。
得到第一智能体的状态信息后,第一智能体可将自身的状态信息输入至自身的生成流模型,以通过待训练模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率(即从第一状态流出的N个联合动作),从第一状态流出的N个联合动作中,从第一状态流出的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,从第一状态流出的第i个联合动作包含第一智能体的N个独立动作中的第i个独立动作和第二智能体的N个独立动作中的第i个独立动作,i=1,...,N。
得到从第一状态流出的N个联合动作的发生概率,可基于从第一状态流出的N个联合动作的发生概率,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
上述方法训练得到生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体 的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,基于N个联合动作的发生概率,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型包括:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。前述实现方式中,在得到从第一状态流出的N个联合动作的发生概率后,第一智能体还可获取流入第一状态的M个联合动作(即第一智能体与第二智能体之间的M个联合动作)的发生概率。需要说明的是,流入第一状态的M个联合动作中,流入第一状态的第j个联合动作用于令第一智能体和第二智能体从第j个第三状态进入第一状态。那么,可对流入第一状态的的M个联合动作的发生概率,从第一状态流出的N个联合动作的发生概率以及与第一状态对应的奖励值进行计算,从而得到目标损失。
本申请实施例的第四方面提供了一种模型训练方法,该方法包括:
当需要对第一智能体的待训练模型进行训练时,可获取一批训练数据,该批训练数据包含第一智能体的状态信息,且该状态信息用于指示第一智能体和第二智能体处于第一状态。需要说明的是,与第一状态对应的的奖励值是已知的。
得到第一智能体的状态信息后,第一智能体可将自身的状态信息输入至自身的生成流模型,以通过第一智能体的待训练模型对状态信息进行处理,得到第一智能体的N个独立动作的发生概率(即第一智能体的从第一状态流出的N个独立动作)。
在得到第一智能体的从第一状态流出的N个独立动作的发生概率后,第一智能体还可从第二智能体处获取第二智能体的从第一状态流出的N个独立动作的发生概率,第二智能体的从第一状态流出的N个独立动作的发生概率通过第二智能体的待训练模型获取。
接着,第一智能体可对第一智能体的从第一状态流出的N个独立动作的发生概率以及第二智能体的从第一状态流出的N个独立动作的发生概率进行计算,从而得到从第一状态流出的N个联合行为的发生概率,从第一状态流出的N个联合动作中,从第一状态流出的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,i=1,...,N。
然后,第一智能体可基于从第一状态流出的N个联合动作的发生概率,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
上述方法训练得到的生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,基于N个联合动作的发生概率,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型包括:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M 个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
本申请实施例的第五方面提供了一种动作预测装置,该装置包括:获取模块,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;处理模块,用于通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N,N≥1。
从上述装置可以看出:第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,处理模块,用于:从N个联合动作中选择发生概率最大的联合动作;执行发生概率最大的联合动作所包含的第一智能体的动作。
本申请实施例的第六方面提供了一种动作预测装置,该装置包括:获取模块,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;处理模块,用于通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,i=1,...,N,N≥1。
从上述装置可以看出:第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,处理模块,用于:从N个动作中,选择发生概率最大的动作;执行发生概率最大的动作。
本申请实施例的第七方面提供了一种模型训练装置,该装置包括:获取模块,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;处理模块,用于通过待训练流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N;更新模块,用于基于N个联合动作的发生概率,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
上述装置训练得到生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第 一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,更新模块,用于:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
本申请实施例的第八方面提供了一种模型训练装置,该装置包括:获取模块,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;第一处理模块,用于通过第一智能体的待训练模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,N≥1;第二处理模块,用于基于第一智能体的N个动作的发生概率以及第二智能体的N个动作的发生概率,确定第一智能体与第二智能体之间的N个联合动作的发生概率,第二智能体的N个动作通过第二智能体的待训练模型获取,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态;更新模块1404,用于基于N个联合动作的发生概率,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
上述装置训练得到的生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,更新模块,用于:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
本申请实施例的第九方面提供了一种动作预测装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,动作预测装置执行如第一方面、第一方面中任意一种可能的实现方式、第二方面或第二方面中任意一种可能的实现方式所述的方法。
本申请实施例的第十方面提供了一种模型训练装置,该装置包括存储器和处理器;存储器存储有代码,处理器被配置为执行代码,当代码被执行时,模型训练装置执行如第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。
本申请实施例的第十一方面提供了一种电路系统,该电路系统包括处理电路,该处理电路配置为执 行如第一方面、第一方面中的任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。
本申请实施例的第十二方面提供了一种芯片系统,该芯片系统包括处理器,用于调用存储器中存储的计算机程序或计算机指令,以使得该处理器执行如第一方面、第一方面中的任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。
在一种可能的实现方式中,该处理器通过接口与存储器耦合。
在一种可能的实现方式中,该芯片系统还包括存储器,该存储器中存储有计算机程序或计算机指令。
本申请实施例的第十三方面提供了一种计算机存储介质,该计算机存储介质存储有计算机程序,该程序在由计算机执行时,使得计算机实施如第一方面、第一方面中的任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。
本申请实施例的第十四方面提供了一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时,使得计算机实施如第一方面、第一方面中的任意一种可能的实现方式、第二方面、第二方面中任意一种可能的实现方式、第三方面、第三方面中任意一种可能的实现方式、第四方面或第四方面中任意一种可能的实现方式所述的方法。
本申请实施例中,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
附图说明
图1为人工智能主体框架的一种结构示意图;
图2a为本申请实施例提供的视频处理系统的一个结构示意图;
图2b为本申请实施例提供的视频处理系统的另一结构示意图;
图2c为本申请实施例提供的视频处理的相关设备的一个示意图;
图3为本申请实施例提供的系统100架构的一个示意图;
图4为本申请实施例提供的生成流模型的一个结构示意图;
图5为本申请实施例提供的动作预测方法的一个流程示意图;
图6为本申请实施例提供的生成流模型的另一结构示意图;
图7为本申请实施例提供的动作预测方法的一个流程示意图;
图8为本申请实施例提供的生成流模型的另一结构示意图;
图9为本申请实施例提供的模型训练方法的一个流程示意图;
图10为本申请实施例提供的模型训练方法的一个流程示意图;
图11为本申请实施例提供的动作预测装置的一个结构示意图;
图12为本申请实施例提供的动作预测装置的另一结构示意图;
图13为本申请实施例提供的模型训练装置的一个结构示意图;
图14为本申请实施例提供的模型训练装置的另一结构示意图;
图15为本申请实施例提供的执行设备的一个结构示意图;
图16为本申请实施例提供的训练设备的一个结构示意图;
图17为本申请实施例提供的芯片的一个结构示意图。
具体实施方式
本申请实施例提供了一种动作预测方法及其相关设备,提供了一种新的动作预测方式,该方式预测得到的动作较为准确,可以使得智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
随着AI技术的飞速发展,神经网络模型被广泛应用于描述和解决智能体在与环境的交互过程中的动作策略选择,从而令智能体在执行相应的动作后能够实现回报最大化或实现特定目标。
目前,相关技术提供的神经网络模型,在确定某个智能体处于初始状态后,可对与该智能体的初始状态相关联的信息进行处理,从而预测出该智能体的动作,该智能体的动作用于令该智能体从初始状态进入终止状态。如此一来,该智能体可执行神经网络模型预测得到的动作,从而到达终止状态。例如,设智能体为自动驾驶场景中的车辆。当该车辆直行接近一个路口后,车辆检测到路口出现红灯(例如,车辆的摄像头拍摄到路口出现红灯)。此时,车辆行驶至出现红灯的路口可以视为车辆所处的初始状态。那么,车辆可将用于指示自身处于初始状态的信息(例如,摄像头拍摄到路口出现红灯的图像)输入到神经网络模型中,模型可对该信息进行分析,从而预测出车辆待执行的动作(例如,车辆停止行驶),以使得车辆执行该动作,从而停靠在出现红灯的路口前,可视为车辆所处的终止状态。
上述过程中,神经网络模型在预测该智能体的动作时,仅考虑该智能体自身的信息,所考虑的因素较为单一,这种方式预测得到的动作不够准确(即不够贴合实际),导致该智能体执行完预测得到的动作后,无法使回报最大化或实现特定目标。
为了解决上述问题,本申请实施例提供了一种动作预测方法,该方法可该方法可结合人工智能(artificial intelligence,AI)技术实现。AI技术是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能的技术学科,AI技术通过感知环境、获取知识并使用知识获得最佳结果。换句话说,人工智能技术是计算机科学的一个分支,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。利用人工智能进行数据处理是人工智能常见的一个应用方式。
首先对人工智能系统总体工作流程进行描述,请参见图1,图1为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。
(1)基础设施
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。
(2)数据
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。
(3)数据处理
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。
(4)通用能力
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。
(5)智能产品及行业应用
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、智慧城市等。
接下来介绍几种本申请的应用场景。
图2a为本申请实施例提供的动作预测系统的一个结构示意图,该动作预测系统包括智能体以及数据处理设备。其中,智能体包括机器人、车载设备或者无人机等智能终端。智能体为动作预测的发起端,作为动作预测请求的发起方,智能体可自行发起请求。
上述数据处理设备可以是云服务器、网络服务器、应用服务器以及管理服务器等具有数据处理功能的设备或服务器。数据处理设备通过交互接口接收来自智能终端的动作预测请求,再通过存储数据的存储器以及数据处理的处理器环节进行机器学习,深度学习,搜索,推理,决策等方式的信息处理。数据处理设备中的存储器可以是一个统称,包括本地存储以及存储历史数据的数据库,数据库可以在数据处理设备上,也可以在其它网络服务器上。
在图2a所示的动作预测系统中,智能体在与环境的交互过程中,智能体可获取自身的状态信息,然后向数据处理设备发起请求,使得数据处理设备针对智能体所得到的状态信息执行动作预测应用,从而得到智能体的动作的发生概率。例如,某个智能体可获取用于指示自身以及其余智能体处于某个状态的状态信息,并向数据处理设备发起针对该状态信息的处理请求。接着,数据处理设备可调用生成流模型对该状态信息进行处理,从而得到该智能体以及其余智能体之间的联合动作的发生概率,并将联合动作的发生概率返回给该智能体,联合动作可令该智能体以及其余智能体从该状态进入下一个状态,至此,则完成了针对该智能体的动作预测。由于联合动作由该智能体的独立动作以及其余智能体的独立动作构建,那么,该智能体可选择发生概率最大的联合动作,并执行该联合动作中包含的自身的独立动作,以进入下一个状态。又如,某个智能体可获取用于指示自身以及其余智能体处于某个状态的状态信息,并向数据处理设备发起针对该状态信息的处理请求。接着,数据处理设备可调用生成流模型对该状态信息进行处理,从而得到该智能体的独立动作的发生概率,并将独立动作的发生概率返回给该智能体,独立动作可令该智能体以及其余智能体从该状态进入下一个状态,至此,则完成了针对该智能体的动作预测。那么,该智能体可选择发生概率最大的独立动作,并执行该独立动作,以进入下一个状态。
在图2a中,数据处理设备可以执行本申请实施例的动作预测方法。
图2b为本申请实施例提供的动作预测系统的另一结构示意图,在图2b中,智能体自身可以完成动作预测,该智能体能够直接获取自身的状态信息并直接由智能体本身的硬件进行处理,具体过程与图2a相似,可参考上面的描述,在此不再赘述。
在图2b所示的动作预测系统中,例如,某个智能体可获取用于指示自身以及其余智能体处于某个状态的状态信息,并对该状态信息进行处理,从而得到该智能体以及其余智能体之间的联合动作的发生概率,联合动作可令该智能体以及其余智能体从该状态进入下一个状态,至此,则完成了针对该智能体的动作预测。由于联合动作由该智能体的独立动作以及其余智能体的独立动作构建,那么,该智能体可 选择发生概率最大的联合动作,并执行该联合动作中包含的自身的独立动作,从而进入下一个状态。又如,某个智能体可获取用于指示自身以及其余智能体处于某个状态的状态信息,并调用生成流模型对该状态信息进行处理,从而得到该智能体的独立动作的发生概率,独立动作可令该智能体以及其余智能体从该状态进入下一个状态,至此,则完成了针对该智能体的动作预测。那么,该智能体可选择发生概率最大的独立动作,并执行该独立动作,以进入下一个状态。
在图2b中,智能体自身就可以执行本申请实施例的动作预测方法。
图2c为本申请实施例提供的动作预测的相关设备的一个示意图。
上述图2a和图2b中的智能体具体可以是图2c中的本地设备301或者本地设备302,图2a中的数据处理设备具体可以是图2c中的执行设备210,其中,数据存储系统250可以存储执行设备210的待处理数据,数据存储系统250可以集成在执行设备210上,也可以设置在云上或其它网络服务器上。
图2a和图2b中的处理器可以通过神经网络模型或者其它模型(例如,生成流模型)进行数据训练/机器学习/深度学习,并利用数据最终训练或者学习得到的模型针对智能体的状态信息完成动作预测应用,从而预测出智能体的动作。
图3为本申请实施例提供的系统100架构的一个示意图,在图3中,执行设备110配置输入/输出(input/output,I/O)接口112,用于与外部设备进行数据交互,客户设备140(即前述的智能体)向I/O接口112输入数据,所述输入数据在本申请实施例中可以包括:各个待调度任务、可调用资源以及其他参数。
在执行设备110对输入数据进行预处理,或者在执行设备110的计算模块111执行计算等相关的处理(比如进行本申请中神经网络的功能实现)过程中,执行设备110可以调用数据存储系统150中的数据、代码等以用于相应的处理,也可以将相应处理得到的数据、指令等存入数据存储系统150中。
最后,I/O接口112将处理结果返回给客户设备140。
值得说明的是,训练设备120可以针对不同的目标或称不同的任务,基于不同的训练数据生成相应的目标模型/规则,该相应的目标模型/规则即可以用于实现上述目标或完成上述任务,从而为用户提供所需的结果。其中,训练数据可以存储在数据库130中,且来自于数据采集设备160采集的训练样本。
在图3中所示情况下,用户可以手动给定输入数据,该手动给定可以通过I/O接口112提供的界面进行操作。另一种情况下,客户设备140可以自动地向I/O接口112发送输入数据,如果要求客户设备140自动发送输入数据需要获得用户的授权,则用户可以在客户设备140中设置相应权限。用户可以在客户设备140查看执行设备110输出的结果,具体的呈现形式可以是显示、声音、动作等具体方式。客户设备140也可以作为数据采集端,采集如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果作为新的样本数据,并存入数据库130。当然,也可以不经过客户设备140进行采集,而是由I/O接口112直接将如图所示输入I/O接口112的输入数据及输出I/O接口112的输出结果,作为新的样本数据存入数据库130。
值得注意的是,图3仅是本申请实施例提供的一种系统架构的示意图,图中所示设备、器件、模块等之间的位置关系不构成任何限制,例如,在图3中,数据存储系统150相对执行设备110是外部存储器,在其它情况下,也可以将数据存储系统150置于执行设备110中。如图3所示,可以根据训练设备120训练得到神经网络。
本申请实施例还提供的一种芯片,该芯片包括神经网络处理器NPU。该芯片可以被设置在如图3所示的执行设备110中,用以完成计算模块111的计算工作。该芯片也可以被设置在如图3所示的训练设备120中,用以完成训练设备120的训练工作并输出目标模型/规则。
神经网络处理器NPU,NPU作为协处理器挂载到主中央处理器(central processing unit,CPU)(host CPU)上,由主CPU分配任务。NPU的核心部分为运算电路,控制器控制运算电路提取存储器(权重存储器或输入存储器)中的数据并进行运算。
在一些实现中,运算电路内部包括多个处理单元(process engine,PE)。在一些实现中,运算电路是二维脉动阵列。运算电路还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路是通用的矩阵处理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)中。
向量计算单元可以对运算电路的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。例如,向量计算单元可以用于神经网络中非卷积/非FC层的网络计算,如池化(pooling),批归一化(batch normalization),局部响应归一化(local response normalization)等。
在一些实现种,向量计算单元能将经处理的输出的向量存储到统一缓存器。例如,向量计算单元可以将非线性函数应用到运算电路的输出,例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元生成归一化的值、合并值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路的激活输入,例如用于在神经网络中的后续层中的使用。
统一存储器用于存放输入数据以及输出数据。
权重数据直接通过存储单元访问控制器(direct memory access controller,DMAC)将外部存储器中的输入数据搬运到输入存储器和/或统一存储器、将外部存储器中的权重数据存入权重存储器,以及将统一存储器中的数据存入外部存储器。
总线接口单元(bus interface unit,BIU),用于通过总线实现主CPU、DMAC和取指存储器之间进行交互。
与控制器连接的取指存储器(instruction fetch buffer),用于存储控制器使用的指令;
控制器,用于调用指存储器中缓存的指令,实现控制该运算加速器的工作过程。
一般地,统一存储器,输入存储器,权重存储器以及取指存储器均为片上(On-Chip)存储器,外部存储器为该NPU外部的存储器,该外部存储器可以为双倍数据率同步动态随机存储器(double data rate synchronous dynamic random access memory,DDR SDRAM)、高带宽存储器(high bandwidth memory,HBM)或其他可读可写的存储器。
由于本申请实施例涉及大量神经网络的应用,为了便于理解,下面先对本申请实施例涉及的相关术语及神经网络等相关概念进行介绍。
(1)神经网络
神经网络可以是由神经单元组成的,神经单元可以是指以xs和截距1为输入的运算单元,该运算单元的输出可以为:
其中,s=1、2、……n,n为大于1的自然数,Ws为xs的权重,b为神经单元的偏置。f为神经单元的激活函数(activation functions),用于将非线性特性引入神经网络中,来将神经单元中的输入信号转换为输出信号。该激活函数的输出信号可以作为下一层卷积层的输入。激活函数可以是sigmoid函数。神经网络是将许多个上述单一的神经单元联结在一起形成的网络,即一个神经单元的输出可以是另一个神经单元的输入。每个神经单元的输入可以与前一层的局部接受域相连,来提取局部接受域的特征,局部接受域可以是由若干个神经单元组成的区域。
神经网络中的每一层的工作可以用数学表达式y=a(Wx+b)来描述:从物理层面神经网络中的每一层的工作可以理解为通过五种对输入空间(输入向量的集合)的操作,完成输入空间到输出空间的变换(即矩阵的行空间到列空间),这五种操作包括:1、升维/降维;2、放大/缩小;3、旋转;4、平移;5、“弯曲”。其中1、2、3的操作由Wx完成,4的操作由+b完成,5的操作则由a()来实现。这里之所以用“空间”二字来表述是因为被分类的对象并不是单个事物,而是一类事物,空间是指这类事物所有个体的集合。其中,W是权重向量,该向量中的每一个值表示该层神经网络中的一个神经元的权重值。该向量W决定着上文所述的输入空间到输出空间的空间变换,即每一层的权重W控制着如何变换空间。训练神经网络的目的,也就是最终得到训练好的神经网络的所有层的权重矩阵(由很多层的向量W形 成的权重矩阵)。因此,神经网络的训练过程本质上就是学习控制空间变换的方式,更具体的就是学习权重矩阵。
因为希望神经网络的输出尽可能的接近真正想要预测的值,所以可以通过比较当前网络的预测值和真正想要的目标值,再根据两者之间的差异情况来更新每一层神经网络的权重向量(当然,在第一次更新之前通常会有初始化的过程,即为神经网络中的各层预先配置参数),比如,如果网络的预测值高了,就调整权重向量让它预测低一些,不断的调整,直到神经网络能够预测出真正想要的目标值。因此,就需要预先定义“如何比较预测值和目标值之间的差异”,这便是损失函数(loss function)或目标函数(objective function),它们是用于衡量预测值和目标值的差异的重要方程。其中,以损失函数举例,损失函数的输出值(loss)越高表示差异越大,那么神经网络的训练就变成了尽可能缩小这个loss的过程。
(2)反向传播算法
神经网络可以采用误差反向传播(back pragation,BP)算法在训练过程中修正初始的神经网络模型中参数的大小,使得神经网络模型的重建误差损失越来越小。具体地,前向传递输入信号直至输出会产生误差损失,通过反向传播误差损失信息来更新初始的神经网络模型中参数,从而使误差损失收敛。反向传播算法是以误差损失为主导的反向传播运动,旨在得到最优的神经网络模型的参数,例如权重矩阵。
(3)生成流模型(generative flow networks,GFlowNets)
生成流模型通常指以有向无环图的形式进行构建得到的模型,即每一个状态节点有至少一个父状态节点,这与树结构中每个状态节点仅有唯一父状态节点不同。生成流模型有唯一初始状态节点以及多个终止状态节点。生成流模型从初始状态节点开始预测动作,从而完成不同状态之间的转移,直至到达终止状态节点。
初始状态节点可以包括输出流量,中间状态节点可以包括输入流量、输出流量以及预设的奖励值,终止节点可以包括输入流量以及预设的奖励值。具体地,可以将生成流模型想象成水管,初始状态节点的输出流量为整个生成流模型的总流入,所有终止状态节点的输入流量之和为整个生成流模型的总流出。对于每一个中间状态节点,输入流量等于输出流量。每个中间状态节点的输入流量和输出流量用神经网络来预测,最终可以预测出每个终止状态节点的输入流量。
例如,如图4所示(图4为本申请实施例提供的生成流模型的一个结构示意图),在生成流模型中,si代表状态节点(i=0,...,11),xj代表复合结构(j=3,4,6,10,11)。s0为初始状态节点,s10和s11为终止状态节点,x3、x4、x6、x10以及x11为复合结构,复合结构中设置有奖励值。其中,初始状态节点S0的输出流量等于中间状态节点S1的输入流量以及中间状态节点S2的输入流量之和,...,终止状态节点S10的输入流量等于中间状态节点S7的输出流量以及中间状态节点S8的输出流量之和,终止状态节点S11的输入流量等于中间状态节点S9的输出流量之和。
下面从神经网络的训练侧和神经网络的应用侧对本申请提供的方法进行描述。
本申请实施例提供的模型训练方法,涉及数据序列的处理,具体可以应用于数据训练、机器学习、深度学习等方法,对训练数据(例如,本申请实施例提供的模型训练方法中的第一智能体的状态信息等等)进行符号化和形式化的智能信息建模、抽取、预处理、训练等,最终得到训练好的神经网络(如本申请实施例提供的模型训练方法中的生成流模型);并且,本申请实施例提供的动作预测方法可以运用上述训练好的神经网络,将输入数据(例如,将本申请实施例提供的动作预测方法中的第一智能体的状态信息等等)输入到所述训练好的神经网络中,得到输出数据(如本申请实施例提供的动作预测方法中的第一智能体与第二智能体之间的N个联合动作的发生概率或第一智能体的N个动作的发生概率等等)。需要说明的是,本申请实施例提供的模型训练方法和动作预测方法是基于同一个构思产生的发明,也可以理解为一个系统中的两个部分,或一个整体流程的两个阶段:如模型训练阶段和模型应用阶段。
需要说明的是,本申请实施例提供的动作预测方法可应用于多种场景中,该方法中所涉及的智能体、动作以及状态等概念随着应用场景的改变而改变,例如,在自动驾驶场景中,某个车辆可以依据自身以及其余车辆当前在交通环境中所处的驾驶状态,预测自身的下一驾驶动作并执行该驾驶动作,以改变自身以及其余车辆在交通环境中的驾驶状态。又如,在供应链场景中,某个机器人可以依据自身以及其余 机器人当前在车间中所处的运输状态,预测自身的下一运输方向并以这些方向前进,以改变自身以及其余机器人在车间中的运输状态。又如,在广告推荐场景中,广告商可以依据自身当前为用户所推荐的广告内容,预测广告内容之间的切换并执行该切换,以改变自身为用户所推荐的广告内容。又如,在游戏场景中,某个游戏玩家可以依据自身以及其余游戏玩家在虚拟游戏环境中所处的竞技状态,预测自身的下一个操作并执行该操作,以改变自身以及其余游戏玩家在虚拟游戏环境中的竞技状态等等。下文结合图5对本申请实施例供的动作预测方法做进一步的介绍,图5为本申请实施例提供的动作预测方法的一个流程示意图,如图5所示,该方法包括:
501、获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态。
本实施例中,设环境中存在第一智能体以及第二智能体,第一智能体和第二智能体是相关联的两个智能体(即这两个智能体的独立动作会相互影响),且两个智能体会不断地与环境发生交互,即在环境中执行各种独立动作,从而改变两个智能体在环境中的状态。需要说明的是,第一智能体可以自行来预测第一智能体的独立动作,并执行该独立动作,从而不断改变第一智能体在环境中的状态。同样地,第二智能体也是如此。由于第一智能体和第二智能体执行的预测操作是类似的,为了便于介绍,下文以第一智能体为例进行示意性介绍:
假设第一智能体以及第二智能体在环境中处于第一状态(第一状态既可以是生成流模型中的初始状态(节点),也可以是某一个中间状态(节点)),第一智能体可从此时的环境中采集自身的状态信息,该状态信息可用于指示第一智能体以及第二智能体处于第一状态。其中,第一智能体的状态信息可以是第一智能体处于第一状态时所采集的信息,该信息可以是第一智能体通过摄像头拍摄的图像,也可以是第一智能体通过摄像头拍摄的视频,也可以是第一智能体通过麦克风收集的音频,也可以是第一智能体生成的文本等等。
例如,设第一智能体和第二智能体分别为自动驾驶场景中的车辆1以及车辆2,车辆1和车辆2在相邻的两个车道上各自直行,且到达了某一个路口。为了预测车辆1到达该路口时所要执行的独立动作以及车辆2到达该路口时所要执行的独立动作,车辆1可在此时拍摄一张照片,该照片内容显示有即将到达的路口以及旁边直行的车辆2。可见,该照片用于指示车辆1和车辆到达该路口(即车辆1和车辆2处于初始状态S0)。
502、通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N,N≥1。
第一智能体得到自身的状态信息后,可将自身的状态信息输入至设于自身的生成流模型中,以通过生成流模型对自身的状态信息进行处理(例如,一系列特征提取处理等等),从而得到第一智能体与第二智能体之间的N个联合动作的发生概率(N为大于或等于1的正整数)。
其中,对于这N个联合动作中的任意一个联合动作而言,即对于第i个联合动作而言,第i个联合动作用于令第一智能体和第二智能体在环境中从第一状态进入第i个第二状态(第二状态也可以理解为在生成流模型中,第一状态的后一状态),第i个联合动作由第一智能体的N个独立动作中的第i个独立动作和第二智能体的N个独立动作中的第i个独立动作构建。可以理解的是,对于第i个联合动作而言,第i个联合动作的发生概率也就是第一智能体的N个独立动作中的第i个独立动作的发生概率,也就是第二智能体的N个独立动作中的第i个独立动作的发生概率。至此,第一智能体则完成了针对第一状态的动作预测,i=1,...,N。
如此一来,第一智能体可在N个联合动作中,选择发生概率最大的联合动作,并执行该联合动作所包含的第一智能体的独立动作,以进入N个第二状态中的某一个第二状态。至此,第一智能体则完成了针对第一状态的动作执行。
此后,由于第一智能体和第二智能体在环境中处于某个第二状态,第一智能体可从环境中采集新的状态信息,新的状态信息用于指示第一智能体和第二智能体在环境中处于该第二状态,第一智能体可通过自身的生成流模型对新的状态信息进行处理,从而完成针对该第二状态的动作预测以及针对该第二状态的动作执行(该过程可参考针对第一状态的动作预测以及针对第一状态的动作执行的相关说明,此处 不做赘述),直至进入某个终止状态,才停止动作预测以及动作执行。
依旧如上述例子,如图6所示(图6为本申请实施例提供的生成流模型的另一结构示意图),车辆1将其拍摄到的照片输入至车辆1的生成流模型后,该生成流模型可基于该照片,可确定车辆1和车辆2处于初始状态节点S0(即车辆1和车辆2处于初始状态S0),那么,生成流模型可对该照片进行处理,从而得到车辆1和车辆2之间的联合动作a1a2的流量(也可以称为联合动作a1a2的发生概率),以及车辆1和车辆2之间的联合动作a2a2的流量。
其中,联合动作a1a2由车辆1的独立动作a1(例如,在路口处左拐)和车辆2的独立动作a2(例如,在路口处直行)构成,联合动作a2a2由车辆1的独立动作a2和车辆2的独立动作a2构成,联合动作a1a2用于令车辆1和车辆2从初始状态节点S0直接进入中间状态节点S1(也可以称为联合动作a1a2从初始状态节点S0流出,并流入中间状态节点S1),联合动作a2a2用于令车辆1和车辆2从初始状态节点S0直接进入中间状态节点S2。此外,联合动作a1a2的流量以及联合动作a2a2的流量之和即为初始状态节点S0的输出流量,联合动作a1a2的流量为中间状态节点S1的输入流量,联合动作a2a2的流量即为中间状态节点S2的输入流量。
设联合动作a1a2的流量大于联合动作a2a2的流量,那么,车辆1可选择联合动作a1a2,并将联合动作a1a2的流量视为独立动作a1的流量,并执行独立动作a1,即在路口处左拐。同样地,车辆2也会执行如同车辆1的行为预测,并最终执行独立动作a2,即在路口处直行。可见,车辆1和车辆2此时共同处于中间状态S1(即车辆1在路口处左拐,且车辆2在路口处直行)。
车辆1和车辆2处于中间状态S1后,车辆1可拍摄新的照片,该照片用于指示车辆1和车辆2处于中间状态S1。那么,车辆1将新的照片输入至车辆1的生成流模型后,生成流模型可对该照片进行处理,从而得到车辆1和车辆2之间的联合动作a3a4的流量(也可以称为联合动作a3a4的发生概率)。
其中,联合动作a3a4由车辆1的独立动作a3和车辆2的独立动作a4构成,联合动作a3a4用于令车辆1和车辆2从中间状态节点S1直接进入中间状态节点S3。此外,联合动作a3a4的流量为中间状态节点S1的输出流量,联合动作a3a4的流量为中间状态节点S3的输入流量。
由于联合动作a3a4的流量最大,那么,车辆1可执行独立动作a3。同样地,车辆2也会执行如同车辆1的行为预测,并最终执行独立动作a4。可见,车辆1和车辆2此时共同处于中间状态S3。
以此类推,直至车辆1和车辆2处于某个终止状态节点。比如,车辆1和车辆2从中间状态节点S3继续进行状态转移(即进行动作预测以及动作执行),经过中间状态节点S7、中间状态节点S10,最终到达终止状态节点S13,不再进行状态转移。
应理解,本实施例中,第一智能体的独立动作可以理解为第一智能体的动作,同理,第二智能体的独立动作可以理解为第二智能体的动作。
还应理解,本实施例仅以两个智能体为例进行示意性介绍,本申请提供的方法还可应用于更多数量的智能体的动作预测以及动作执行中,例如,三个智能体、四个智能体、五个智能体等等,此处不做限制。
本申请实施例中,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
图7为本申请实施例提供的动作预测方法的一个流程示意图,如图7所示,该方法包括:
701、获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态。
关于步骤701的介绍,可参考图5所示实施例中步骤501的相关说明部分,此处不再赘述。
702、通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,i=1,...,N,N≥1。
第一智能体得到自身的状态信息后,可将自身的状态信息输入至设于自身的生成流模型中,以通过生成流模型对自身的状态信息进行处理(例如,一系列特征提取处理等等),从而得到第一智能体的N个独立动作的发生概率(N为大于或等于1的正整数)。
其中,对于这N个独立动作中的任意一个独立动作而言,即对于第i个独立动作而言,第i个独立动作用于令第一智能体和第二智能体在环境中从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测,i=1,...,N。
如此一来,第一智能体可在N个独立动作中,选择发生概率最大的独立动作,并执行该独立动作,以进入N个第二状态中的某一个第二状态。至此,第一智能体则完成了针对第一状态的动作执行。
此后,由于第一智能体和第二智能体在环境中处于某个第二状态,第一智能体可从环境中采集新的状态信息,新的状态信息用于指示第一智能体和第二智能体在环境中处于该第二状态,第一智能体可通过自身的生成流模型对新的状态信息进行处理,从而完成针对该第二状态的动作预测以及针对该第二状态的动作执行(该过程可参考针对第一状态的动作预测以及针对第一状态的动作执行的相关说明,此处不做赘述),直至进入某个终止状态,才停止动作预测以及动作执行。
依旧如上述例子,如图8所示(图8为本申请实施例提供的生成流模型的另一结构示意图),车辆1将其拍摄到的照片输入至车辆1的生成流模型后,该生成流模型可基于该照片,可确定车辆1和车辆2处于初始状态节点S0(即车辆1和车辆2处于初始状态S0),那么,生成流模型可对该照片进行处理,从而得到车辆1的独立动作a1的流量(也可以称为独立动作a1的发生概率),以及车辆1的独立动作a2的流量。
其中,车辆1的独立动作a1用于令车辆1和车辆2从初始状态节点S0直接进入中间状态节点S1(也可以称为车辆1的独立动作a1从初始状态节点S0流出,并流入中间状态节点S1),车辆1的独立动作a2用于令车辆1和车辆2从初始状态节点S0直接进入中间状态节点S2。此外,车辆1的独立动作a1的流量以及车辆1的独立动作a2的流量之和即为初始状态节点S0的输出流量,车辆1的独立动作a1的流量为中间状态节点S1的输入流量,车辆1的独立动作a2的流量即为中间状态节点S2的输入流量。
设车辆1的独立动作a1的流量大于车辆1的独立动作a2的流量,那么,车辆1可选择独立动作a1,并执行独立动作a1。同样地,车辆2也会执行如同车辆1的行为预测,并最终执行车辆2的独立动作a2。可见,车辆1和车辆2此时共同处于中间状态S1。
车辆1和车辆2处于中间状态S1后,车辆1可拍摄新的照片,该照片用于指示车辆1和车辆2处于中间状态S1。那么,车辆1将新的照片输入至车辆1的生成流模型后,生成流模型可对该照片进行处理,从而得到车辆1的独立动作a3的流量(也可以称为车辆1的独立动作a3的发生概率)。
其中,车辆1的独立动作a3用于令车辆1和车辆2从中间状态节点S1直接进入中间状态节点S3。此外,车辆1的独立动作a3的流量为中间状态节点S1的输出流量,车辆1的独立动作a3的流量为中间状态节点S3的输入流量。
由于车辆1的独立动作a3的流量最大,那么,车辆1可执行车辆1的独立动作a3。同样地,车辆2也会执行如同车辆1的行为预测,并最终执行车辆2的独立动作a4。可见,车辆1和车辆2此时共同处于中间状态S3。
以此类推,直至车辆1和车辆2处于某个终止状态节点。比如,车辆1和车辆2从中间状态节点S3继续进行状态转移(即进行独立动作预测以及独立动作执行),经过中间状态节点S7、中间状态节点S10,最终到达终止状态节点S13,不再进行状态转移。
应理解,本实施例中,第一智能体的独立动作可以理解为第一智能体的动作,同理,第二智能体的独立动作可以理解为第二智能体的动作。
还应理解,本实施例仅以两个智能体为例进行示意性介绍,本申请提供的方法还可应用于更多数量的智能体的动作预测以及动作执行中,例如,三个智能体、四个智能体、五个智能体等等,此处不做限 制。
本申请实施例中,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
以上是对本申请实施例提供的动作预测方法所进行的详细说明,以下将对本申请实施例提供的模型训练方法进行介绍。图9为本申请实施例提供的模型训练方法的一个流程示意图,如图9所示,该方法包括:
901、获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态。
本实施例中,当需要对待训练模型(即需要训练的神经网络模型)进行训练时,可获取一批训练数据,该批训练数据包含第一智能体的状态信息,且该状态信息用于指示第一智能体和第二智能体处于第一状态(通常指待训练模型中的某个中间状态)。需要说明的是,与第一状态对应的的奖励值是已知的。
在一种可能实现的方式中,第一智能体的状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
关于步骤901的介绍,可参考图5所示实施例中步骤501的相关说明部分,此处不再赘述。
902、通过待训练流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N。
得到第一智能体的状态信息后,第一智能体可将自身的状态信息输入至自身的生成流模型,以通过待训练模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率(下文将这N个联合动作称为从第一状态流出的N个联合动作),从第一状态流出的N个联合动作中,从第一状态流出的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,从第一状态流出的第i个联合动作包含第一智能体的N个独立动作中的第i个独立动作和第二智能体的N个独立动作中的第i个独立动作,i=1,...,N。
关于步骤902的介绍,可参考图5所示实施例中步骤502的相关说明部分,此处不再赘述。
903、基于N个联合动作的发生概率,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
在得到从第一状态流出的N个联合动作的发生概率后,第一智能体还可获取流入第一状态的M个联合动作的发生概率(即第一智能体与第二智能体之间的M个联合动作,M为大于或等于1的正整数)。需要说明的是,流入第一状态的M个联合动作中,流入第一状态的第j个联合动作是通过待训练模型对第一智能体的j个先前状态信息分别进行处理得到,第一智能体的j个先前状态信息用于指示第一智能体以及第二智能体处于第j个第三状态(即在待训练模型中,第一状态的前一状态),由此可见,流入第一状态的第j个联合动作用于令第一智能体和第二智能体从第j个第三状态进入第一状态,j=1,...,M。
那么,可通过预置的损失函数(以流匹配为约束目标)对流入第一状态的的M个联合动作的发生概率,从第一状态流出的N个联合动作的发生概率以及与第一状态对应的奖励值(例如,该奖励值为0)进行计算,从而得到第一状态对应的损失,该损失用于指示流入第一状态的的M个联合动作的发生概率之和与从第一状态流出的N个联合动作的发生概率之和之间的差异。
由于第一状态为待训练模型中的某一个中间状态,对于待训练模型中的其余中间状态,第一智能体也可以对其余中间状态执行如同对第一状态所执行的操作,故最终可以得到所有中间状态对应的损失(包含第一状态对应的损失)。
值得注意的是,对于待训练模型中的任意一个终止状态,可通过预置的损失函数对流入该终止状态的所有联合动作的发生概率以及该终止状态对应的奖励值(是已知的,且通常不为0)进行计算,从而得到该终止状态对应的损失(该损失用于指示流入该终止状态的所有联合动作的发生概率之和与该终止状态对应的奖励值之间的差异)。对于待训练模型中的其余终止状态,第一智能体也可以对其余终止状态执行如同对该终止状态所执行的操作,故最终可以得到所有终止状态对应的损失。
那么,可将所有中间状态对应的损失以及所有终止状态对应的损失进行叠加,从而得到目标损失。
例如,依旧如图6所示的例子,对于生成流模型中除初始状态节点之外的任意一个状态节点,该状态节点的输入流量为:
上式中,sk为该状态节点,aai为流入该状态节点sk的第i个联合动作,F(sk,aai)为流入该状态节点sk的第i个联合动作的流量,N为流入该状态节点sk的所有联合动作的数量。例如,中间状态节点S3的输入流量为联合动作a3a4的流量以及联合动作a4a4的流量之和,终止状态节点S10的输入流量为联合动作a9a10的流量以及联合动作a10a10的流量之和。
该状态节点的输入流量为:
上式中,aa′j为从该状态节点sk流出的第j个联合动作,F(sk,aa′j)为从该状态节点sk流出的第j个联合动作的流量,M为从该状态节点sk流出的所有联合动作的数量。例如,中间状态节点S3的输出流量为联合动作a5a6的流量,中间状态节点S5的输出流量为联合动作a7a8的流量以及联合动作a8a8的流量之和,终止状态节点S10不存在输出流量。
除初始状态节点之外的所有状态节点的损失之和,即目标损失为:
上式中,R(sk)为该状态节点sk的奖励值,P为除初始状态节点之外的所有状态节点的数量,若该状态节点sk为中间状态节点,则R(sk)为0,若该状态节点sk为终止状态节点,则为0。
得到目标损失后,可基于目标损失,对待训练模型的参数进行更新,并利用下一批训练数据对参数更新后的待训练模型继续进行训练,直至满足模型训练条件(例如,目标损失收敛等等),可得到图5所示实施例中的生成流模型。
本申请实施例训练得到生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得 到第一智能体与第二智能体之间的N个联合动作的发生概率,在这N个联合动作中,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
图10为本申请实施例提供的模型训练方法的一个流程示意图,如图10所示,该方法包括:
1001、获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态。
本实施例中,当需要对第一智能体的待训练模型(即第一智能体中需要训练的神经网络模型)进行训练时,可获取一批训练数据,该批训练数据包含第一智能体的状态信息,且该状态信息用于指示第一智能体和第二智能体处于第一状态(通常指待训练模型中的某个中间状态)。需要说明的是,与第一状态对应的的奖励值是已知的。
在一种可能实现的方式中,第一智能体的状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
关于步骤1001的介绍,可参考图7所示实施例中步骤701的相关说明部分,此处不再赘述。
1002、通过第一智能体的待训练模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,N≥1。
得到第一智能体的状态信息后,第一智能体可将自身的状态信息输入至自身的生成流模型,以通过待训练模型对状态信息进行处理,得到第一智能体的N个独立动作的发生概率(下文将第一智能体的N个独立动作称为第一智能体的从第一状态流出的N个独立动作),第一智能体的从第一状态流出的N个独立动作中,第一智能体的从第一状态流出的第i个独立动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,i=1,...,N。
关于步骤1002的介绍,可参考图7所示实施例中步骤702的相关说明部分,此处不再赘述。
1003、基于第一智能体的N个动作的发生概率以及第二智能体的N个动作的发生概率,确定第一智能体与第二智能体之间的N个联合动作的发生概率,第二智能体的N个动作通过第二智能体的待训练模型获取,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。
1004、基于N个联合动作的发生概率,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
在得到第一智能体的从第一状态流出的N个独立动作的发生概率后,第一智能体还可从第二智能体处获取第二智能体的从第一状态流出的N个独立动作的发生概率,第二智能体的从第一状态流出的N个独立动作的发生概率通过第二智能体的待训练模型获取(该过程可参考步骤1002,此处不再赘述),第二智能体的从第一状态流出的N个联合动作中,第二智能体的从第一状态流出的第i个独立动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。
接着,第一智能体可对第一智能体的从第一状态流出的N个独立动作的发生概率以及第二智能体的从第一状态流出的N个独立动作的发生概率进行计算,从而得到从第一状态流出的N个联合行为的发生概率,从第一状态流出的N个联合动作中,从第一状态流出的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。
然后,第一智能体还可获取流入第一状态的M个联合动作的发生概率(即第一智能体与第二智能体之间的M个联合动作,M为大于或等于1的正整数)。需要说明的是,流入第一状态的M个联合动作的发生概率是基于第一智能体的流入第一状态的M个独立动作的发生概率以及第二智能体的流入第一状态的M个独立动作的发生概率得到的(这些概率的来源可参考上述过程,此处不再赘述),由此可见,流入第一状态的第j个联合动作用于令第一智能体和第二智能体从第j个第三状态(即在待训练模型中,第一状态的前一状态)进入第一状态,j=1,...,M。
那么,第一智能体可通过预置的损失函数(以流匹配为约束目标)对流入第一状态的的M个联合动作的发生概率,从第一状态流出的N个联合动作的发生概率以及与第一状态对应的奖励值(例如,该奖励值为0)进行计算,从而得到第一状态对应的损失,该损失用于指示流入第一状态的的M个联合动作的发生概率之和与从第一状态流出的N个联合动作的发生概率之和之间的差异。
由于第一状态为待训练模型中的某一个中间状态,对于待训练模型中的其余中间状态,第一智能体也可以对其余中间状态执行如同对第一状态所执行的操作,故最终可以得到所有中间状态对应的损失(包含第一状态对应的损失)。
值得注意的是,对于待训练模型中的任意一个终止状态,可通过预置的损失函数对流入该终止状态的所有联合动作的发生概率以及该终止状态对应的奖励值(是已知的,且通常不为0)进行计算,从而得到该终止状态对应的损失(该损失用于指示流入该终止状态的所有联合动作的发生概率之和与该终止状态对应的奖励值之间的差异)。对于待训练模型中的其余终止状态,第一智能体也可以对其余终止状态执行如同对该终止状态所执行的操作,故最终可以得到所有终止状态对应的损失。
那么,可将所有中间状态对应的损失以及所有终止状态对应的损失进行叠加,从而得到目标损失。
例如,依旧如图8所示的例子,对于生成流模型中除初始状态节点之外的任意一个状态节点,该状态节点的输入流量为:
上式中,sk为该状态节点,Ft(sk,ai)为第t个智能体的流入该状态节点sk的第i个独立动作的流量,Q为智能体的数量,F(sk,aai)为流入该状态节点sk的第i个联合动作的流量,A为常数,F(sk)为该状态节点sk的输入流量。例如,对于中间状态节点S3而言,联合动作a3a4的流量由车辆1的独立动作a3的流量以及车辆2的独立动作a4的流量计算得到,联合动作a4a4的流量由车辆1的独立动作a4的流量以及车辆2的独立动作a4的流量计算得到,中间状态节点S3的输入流量为联合动作a3a4的流量以及联合动作a4a4的流量之和。
上式中,Ft(sk,a′j)为第t个智能体的从该状态节点sk流出的第j个独立动作的流量,F(sk,aa′j)为从该状态节点sk流出的第j个联合动作的流量,B为常数。例如,对于中间状态节点S3而言,联合动作a5a6的流量由车辆1的独立动作a5的流量以及车辆2的独立动作a6的流量计算得到,中间状态节点S3的输出流量为联合动作a5a6的流量。
除初始状态节点之外的所有状态节点的损失之和,即目标损失如公式(4)所示。
得到目标损失后,可基于目标损失,对第一智能体的待训练模型的参数进行更新,并利用下一批训练数据对参数更新后的待训练模型继续进行训练,直至满足模型训练条件(例如,目标损失收敛等等), 可得到图7所示实施例中第一智能体的生成流模型。
本申请实施例训练得到的生成流模型,具备预测智能体动作的功能。具体地,第一智能体获取用于指示第一智能体以及第二智能体处于第一状态的状态信息后,可通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,在这N个动作中,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态。至此,第一智能体则完成了针对第一状态的动作预测。前述过程中,由于第一智能体的状态信息指示了与第一智能体与第二智能体相关的信息,故生成流模型在基于该状态信息预测第一智能体的动作时,不仅考虑了第一智能体自身的信息,还考虑了第二智能体自身的信息以及两个智能体之间的关系,所考虑的因素较为全面,这种新的方式预测得到的动作较为准确(较为贴合实际),可以使得第一智能体执行完预测的动作后,获取最大化的回报或实现特定目标。
以上是对本申请实施例提供的模型训练方法所进行的详细说明,以下将对本申请实施例提供的动作预测装置以及模型训练装置进行介绍。图11为本申请实施例提供的动作预测装置的一个结构示意图,如图11所示,该装置包括:
获取模块1101,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;
处理模块1102,用于通过生成流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N,N≥1。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,处理模块1102,用于:从N个联合动作中选择发生概率最大的联合动作;执行发生概率最大的联合动作所包含的第一智能体的动作。
图12为本申请实施例提供的动作预测装置的另一结构示意图,如图12所示,该装置包括:
获取模块1201,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;
处理模块1202,用于通过生成流模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,第i个动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,i=1,...,N,N≥1。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,处理模块1202,用于:从N个动作中,选择发生概率最大的动作;执行发生概率最大的动作。
图13为本申请实施例提供的模型训练装置的一个结构示意图,如图13所示,该装置包括:
获取模块1301,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;
处理模块1302,用于通过待训练流模型对状态信息进行处理,得到第一智能体与第二智能体之间的N个联合动作的发生概率,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态,第i个联合动作包含第一智能体的动作和第二智能体的动作,i=1,...,N;
更新模块1303,用于基于N个联合动作的发生概率,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,更新模块1303,用于:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
图14为本申请实施例提供的模型训练装置的另一结构示意图,如图14所示,该装置包括:
获取模块1401,用于获取第一智能体的状态信息,状态信息用于指示第一智能体和第二智能体处于第一状态;
第一处理模块1402,用于通过第一智能体的待训练模型对状态信息进行处理,得到第一智能体的N个动作的发生概率,N≥1;
第二处理模块1403,用于基于第一智能体的N个动作的发生概率以及第二智能体的N个动作的发生概率,确定第一智能体与第二智能体之间的N个联合动作的发生概率,第二智能体的N个动作通过第二智能体的待训练模型获取,N个联合动作中的第i个联合动作用于令第一智能体和第二智能体从第一状态进入第i个第二状态;
更新模块1404,用于基于N个联合动作的发生概率,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
在一种可能实现的方式中,状态信息为第一智能体处于第一状态时所采集的信息,信息包含以下至少一项:图像、视频、音频或文本。
在一种可能实现的方式中,更新模块1404,用于:基于第一智能体与第二智能体之间的M个联合动作的发生概率,N个联合动作的发生概率以及与第一状态对应的奖励值,确定目标损失,M个联合动作中的第j个联合动作用于令第一智能体以及第二智能体从第j个第三状态进入第一状态,j=1,...,M,M≥1;基于目标损失,对第一智能体的待训练模型的参数进行更新,直至满足模型训练条件,得到第一智能体的生成流模型。
需要说明的是,上述装置各模块/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其带来的技术效果与本申请方法实施例相同,具体内容可参考本申请实施例前述所示的方法实施例中的叙述,此处不再赘述。
本申请实施例还涉及一种执行设备,图15为本申请实施例提供的执行设备的一个结构示意图。如图15所示,执行设备1500具体可以表现为手机、平板、笔记本电脑、智能穿戴设备、服务器等,此处不做限定。其中,执行设备1500上可部署有图11或图12对应实施例中所描述的动作预测装置,用于实现图5或图7对应实施例中动作预测的功能。具体的,执行设备1500包括:接收器1501、发射器1502、处理器1503和存储器1504(其中执行设备1500中的处理器1503的数量可以一个或多个,图15中以一个处理器为例),其中,处理器1503可以包括应用处理器15031和通信处理器15032。在本申请的一些实施例中,接收器1501、发射器1502、处理器1503和存储器1504可通过总线或其它方式连接。
存储器1504可以包括只读存储器和随机存取存储器,并向处理器1503提供指令和数据。存储器1504的一部分还可以包括非易失性随机存取存储器(non-volatile random access memory,NVRAM)。存储器1504存储有处理器和操作指令、可执行模块或者数据结构,或者它们的子集,或者它们的扩展集,其中,操作指令可包括各种操作指令,用于实现各种操作。
处理器1503控制执行设备的操作。具体的应用中,执行设备的各个组件通过总线系统耦合在一起,其中总线系统除包括数据总线之外,还可以包括电源总线、控制总线和状态信号总线等。但是为了清楚说明起见,在图中将各种总线都称为总线系统。
上述本申请实施例揭示的方法可以应用于处理器1503中,或者由处理器1503实现。处理器1503可以是一种集成电路芯片,具有信号的处理能力。在实现过程中,上述方法的各步骤可以通过处理器1503中的硬件的集成逻辑电路或者软件形式的指令完成。上述的处理器1503可以是通用处理器、数字信号处理器(digital signal processing,DSP)、微处理器或微控制器,还可进一步包括专用集成电路(application specific integrated circuit,ASIC)、现场可编程门阵列(field-programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。该处理器1503可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器1504,处理器1503读取存储器1504中的信息,结合其硬件完成上述方法 的步骤。
接收器1501可用于接收输入的数字或字符信息,以及产生与执行设备的相关设置以及功能控制有关的信号输入。发射器1502可用于通过第一接口输出数字或字符信息;发射器1502还可用于通过第一接口向磁盘组发送指令,以修改磁盘组中的数据;发射器1502还可以包括显示屏等显示设备。
本申请实施例中,在一种情况下,处理器1503,用于通过图5或图7对应实施例中的生成流模型,对智能体的行为进行预测。
本申请实施例还涉及一种训练设备,图16为本申请实施例提供的训练设备的一个结构示意图。如图16所示,训练设备1600由一个或多个服务器实现,训练设备1600可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上中央处理器(central processing units,CPU)1614(例如,一个或一个以上处理器)和存储器1632,一个或一个以上存储应用程序1642或数据1644的存储介质1630(例如一个或一个以上海量存储设备)。其中,存储器1632和存储介质1630可以是短暂存储或持久存储。存储在存储介质1630的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对训练设备中的一系列指令操作。更进一步地,中央处理器1614可以设置为与存储介质1630通信,在训练设备1600上执行存储介质1630中的一系列指令操作。
训练设备1600还可以包括一个或一个以上电源1626,一个或一个以上有线或无线网络接口1650,一个或一个以上输入输出接口1658;或,一个或一个以上操作系统1641,例如Windows ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM等等。
具体的,训练设备可以执行图9或图10对应实施例中的模型训练方法。
本申请实施例还涉及一种计算机存储介质,该计算机可读存储介质中存储有用于进行信号处理的程序,当其在计算机上运行时,使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例还涉及一种计算机程序产品,该计算机程序产品存储有指令,该指令在由计算机执行时使得计算机执行如前述执行设备所执行的步骤,或者,使得计算机执行如前述训练设备所执行的步骤。
本申请实施例提供的执行设备、训练设备或终端设备具体可以为芯片,芯片包括:处理单元和通信单元,所述处理单元例如可以是处理器,所述通信单元例如可以是输入/输出接口、管脚或电路等。该处理单元可执行存储单元存储的计算机执行指令,以使执行设备内的芯片执行上述实施例描述的数据处理方法,或者,以使训练设备内的芯片执行上述实施例描述的数据处理方法。可选地,所述存储单元为所述芯片内的存储单元,如寄存器、缓存等,所述存储单元还可以是所述无线接入设备端内的位于所述芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。
具体的,请参阅图17,图17为本申请实施例提供的芯片的一个结构示意图,所述芯片可以表现为神经网络处理器NPU 1700,NPU 1700作为协处理器挂载到主CPU(Host CPU)上,由Host CPU分配任务。NPU的核心部分为运算电路1703,通过控制器1704控制运算电路1703提取存储器中的矩阵数据并进行乘法运算。
在一些实现中,运算电路1703内部包括多个处理单元(Process Engine,PE)。在一些实现中,运算电路1703是二维脉动阵列。运算电路1703还可以是一维脉动阵列或者能够执行例如乘法和加法这样的数学运算的其它电子线路。在一些实现中,运算电路1703是通用的矩阵处理器。
举例来说,假设有输入矩阵A,权重矩阵B,输出矩阵C。运算电路从权重存储器1702中取矩阵B相应的数据,并缓存在运算电路中每一个PE上。运算电路从输入存储器1701中取矩阵A数据与矩阵B进行矩阵运算,得到的矩阵的部分结果或最终结果,保存在累加器(accumulator)1708中。
统一存储器1706用于存放输入数据以及输出数据。权重数据直接通过存储单元访问控制器(Direct Memory Access Controller,DMAC)1705,DMAC被搬运到权重存储器1702中。输入数据也通过DMAC被搬运到统一存储器1706中。
BIU为Bus Interface Unit即,总线接口单元1713,用于AXI总线与DMAC和取指存储器(Instruction Fetch Buffer,IFB)1709的交互。
总线接口单元1713(Bus Interface Unit,简称BIU),用于取指存储器1709从外部存储器获取指令,还用于存储单元访问控制器1705从外部存储器获取输入矩阵A或者权重矩阵B的原数据。
DMAC主要用于将外部存储器DDR中的输入数据搬运到统一存储器1706或将权重数据搬运到权重存储器1702中或将输入数据数据搬运到输入存储器1701中。
向量计算单元1707包括多个运算处理单元,在需要的情况下,对运算电路1703的输出做进一步处理,如向量乘,向量加,指数运算,对数运算,大小比较等等。主要用于神经网络中非卷积/全连接层网络计算,如Batch Normalization(批归一化),像素级求和,对预测标签平面进行上采样等。
在一些实现中,向量计算单元1707能将经处理的输出的向量存储到统一存储器1706。例如,向量计算单元1707可以将线性函数;或,非线性函数应用到运算电路1703的输出,例如对卷积层提取的预测标签平面进行线性插值,再例如累加值的向量,用以生成激活值。在一些实现中,向量计算单元1707生成归一化的值、像素级求和的值,或二者均有。在一些实现中,处理过的输出的向量能够用作到运算电路1703的激活输入,例如用于在神经网络中的后续层中的使用。
控制器1704连接的取指存储器(instruction fetch buffer)1709,用于存储控制器1704使用的指令;
统一存储器1706,输入存储器1701,权重存储器1702以及取指存储器1709均为On-Chip存储器。外部存储器私有于该NPU硬件架构。
其中,上述任一处提到的处理器,可以是一个通用中央处理器,微处理器,ASIC,或一个或多个用于控制上述程序执行的集成电路。
另外需说明的是,以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。另外,本申请提供的装置实施例附图中,模块之间的连接关系表示它们之间具有通信连接,具体可以实现为一条或多条通信总线或信号线。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请可借助软件加必需的通用硬件的方式来实现,当然也可以通过专用硬件包括专用集成电路、专用CPU、专用存储器、专用元器件等来实现。一般情况下,凡由计算机程序完成的功能都可以很容易地用相应的硬件来实现,而且,用来实现同一功能的具体硬件结构也可以是多种多样的,例如模拟电路、数字电路或专用电路等。但是,对本申请而言更多情况下软件程序实现是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在可读取的存储介质中,如计算机的软盘、U盘、移动硬盘、ROM、RAM、磁碟或者光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,训练设备,或者网络设备等)执行本申请各个实施例所述的方法。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。
所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、训练设备或数据中心通过有线(例如同轴电缆、光纤、数字用户线(DSL))或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、训练设备或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的训练设备、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,DVD)、或者半导体介质(例如固态硬盘(Solid State Disk,SSD))等。

Claims (19)

  1. 一种动作预测方法,其特征在于,所述方法包括:
    获取第一智能体的状态信息,所述状态信息用于指示所述第一智能体和第二智能体处于第一状态;
    通过生成流模型对所述状态信息进行处理,得到所述第一智能体的N个动作的发生概率,第i个动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,i=1,...,N,N≥1。
  2. 根据权利要求1所述的方法,其特征在于,所述通过生成流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率包括:
    通过生成流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,所述第i个联合动作包含所述第一智能体的第i个动作和所述第二智能体的第i个动作,所述N个联合动作的发生概率为所述第一智能体的N个动作的发生概率。
  3. 根据权利要求1或2所述的方法,其特征在于,所述通过生成流模型对所述状态信息进行处理,得到所述第一智能体的N个动作的发生概率之后,所述方法还包括:
    从所述N个动作中,选择发生概率最大的动作;
    执行所述发生概率最大的动作。
  4. 根据权利要求1至3任意一项所述的方法,其特征在于,所述状态信息为所述第一智能体处于所述第一状态时所采集的信息,所述信息包含以下至少一项:图像、视频、音频或文本。
  5. 一种模型训练方法,其特征在于,所述方法包括:
    获取第一智能体的状态信息,所述状态信息用于指示所述第一智能体和第二智能体处于第一状态;
    通过待训练流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,所述N个联合动作中的第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,所述第i个联合动作包含所述第一智能体的第i个动作和所述第二智能体的第i个动作,i=1,...,N;
    基于所述N个联合动作的发生概率,对所述待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
  6. 根据权利要求5所述的方法,其特征在于,所述通过待训练流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率包括:
    通过所述第一智能体的待训练模型对所述状态信息进行处理,得到所述第一智能体的N个动作的发生概率,N≥1;
    基于所述第一智能体的N个动作的发生概率以及所述第二智能体的N个动作的发生概率,确定所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,所述第二智能体的N个动作通过所述第二智能体的待训练模型获取,所述N个联合动作中的第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态。
  7. 根据权利要求5或6所述的方法,其特征在于,所述基于所述N个联合动作的发生概率,对所述待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型包括:
    基于所述第一智能体与所述第二智能体之间的M个联合动作的发生概率,所述N个联合动作的发生概率以及与所述第一状态对应的奖励值,确定目标损失,所述M个联合动作中的第j个联合动作用于令所述第一智能体以及所述第二智能体从第j个第三状态进入所述第一状态,j=1,...,M,M≥1;
    基于所述目标损失,对所述待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
  8. 根据权利要求5至7任意一项所述的方法,其特征在于,所述状态信息为所述第一智能体处于所述第一状态时所采集的信息,所述信息包含以下至少一项:图像、视频、音频或文本。
  9. 一种动作预测装置,其特征在于,所述装置包括:
    获取模块,用于获取第一智能体的状态信息,所述状态信息用于指示所述第一智能体和第二智能体处于第一状态;
    处理模块,用于通过生成流模型对所述状态信息进行处理,得到所述第一智能体的N个动作的发生 概率,第i个动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,i=1,...,N,N≥1。
  10. 根据权利要求9所述的装置,其特征在于,所述处理模块,用于通过生成流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,所述第i个联合动作包含所述第一智能体的第i个动作和所述第二智能体的第i个动作,所述N个联合动作的发生概率为所述第一智能体的N个动作的发生概率。
  11. 根据权利要求9或10所述的装置,其特征在于,所述处理模块,还用于:
    从所述N个动作中,选择发生概率最大的动作;
    执行所述发生概率最大的动作。
  12. 根据权利要求9至11任意一项所述的装置,其特征在于,所述状态信息为所述第一智能体处于所述第一状态时所采集的信息,所述信息包含以下至少一项:图像、视频、音频或文本。
  13. 一种模型训练装置,其特征在于,所述装置包括:
    获取模块,用于获取第一智能体的状态信息,所述状态信息用于指示所述第一智能体和第二智能体处于第一状态;
    处理模块,用于通过待训练流模型对所述状态信息进行处理,得到所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,所述N个联合动作中的第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态,所述第i个联合动作包含所述第一智能体的第i个动作和所述第二智能体的第i个动作,i=1,...,N;
    更新模块,用于基于所述N个联合动作的发生概率,对所述待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
  14. 根据权利要求13所述的装置,其特征在于,所述处理模块包括:
    第一处理模块,用于通过所述第一智能体的待训练模型对所述状态信息进行处理,得到所述第一智能体的N个动作的发生概率,N≥1;
    第二处理模块,用于基于所述第一智能体的N个动作的发生概率以及所述第二智能体的N个动作的发生概率,确定所述第一智能体与所述第二智能体之间的N个联合动作的发生概率,所述第二智能体的N个动作通过所述第二智能体的待训练模型获取,所述N个联合动作中的第i个联合动作用于令所述第一智能体和所述第二智能体从所述第一状态进入第i个第二状态。
  15. 根据权利要求13或14所述的装置,其特征在于,所述更新模块,用于:
    基于所述第一智能体与所述第二智能体之间的M个联合动作的发生概率,所述N个联合动作的发生概率以及与所述第一状态对应的奖励值,确定目标损失,所述M个联合动作中的第j个联合动作用于令所述第一智能体以及所述第二智能体从第j个第三状态进入所述第一状态,j=1,...,M,M≥1;
    基于所述目标损失,对所述待训练模型的参数进行更新,直至满足模型训练条件,得到生成流模型。
  16. 根据权利要求13至15任意一项所述的装置,其特征在于,所述状态信息为所述第一智能体处于所述第一状态时所采集的信息,所述信息包含以下至少一项:图像、视频、音频或文本。
  17. 一种动作预测装置,其特征在于,所述装置包括存储器和处理器;所述存储器存储有代码,所述处理器被配置为执行所述代码,当所述代码被执行时,所述动作预测装置执行如权利要求1至8任意一项所述的方法。
  18. 一种计算机存储介质,其特征在于,所述计算机存储介质存储有一个或多个指令,所述指令在由一个或多个计算机执行时使得所述一个或多个计算机实施权利要求1至8任一所述的方法。
  19. 一种计算机程序产品,其特征在于,所述计算机程序产品存储有指令,所述指令在由计算机执行时,使得所述计算机实施权利要求1至8任意一项所述的方法。
PCT/CN2023/118708 2022-09-28 2023-09-14 一种动作预测方法及其相关设备 WO2024067113A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211192232.2 2022-09-28
CN202211192232.2A CN115565104A (zh) 2022-09-28 2022-09-28 一种动作预测方法及其相关设备

Publications (1)

Publication Number Publication Date
WO2024067113A1 true WO2024067113A1 (zh) 2024-04-04

Family

ID=84743078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/118708 WO2024067113A1 (zh) 2022-09-28 2023-09-14 一种动作预测方法及其相关设备

Country Status (2)

Country Link
CN (1) CN115565104A (zh)
WO (1) WO2024067113A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115565104A (zh) * 2022-09-28 2023-01-03 华为技术有限公司 一种动作预测方法及其相关设备

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726903A (zh) * 2018-12-19 2019-05-07 中国电子科技集团公司信息科学研究院 基于注意力机制的分布式多智能体协同决策方法
CN113341958A (zh) * 2021-05-21 2021-09-03 西北工业大学 一种混合经验的多智能体强化学习运动规划方法
CN114254567A (zh) * 2021-12-29 2022-03-29 北京博能科技股份有限公司 一种基于Muti-Agent与强化学习的机场融合仿真方法
US20220198709A1 (en) * 2019-04-02 2022-06-23 Buildots Ltd. Determining position of an image capture device
CN115034379A (zh) * 2022-05-13 2022-09-09 华为技术有限公司 一种因果关系确定方法及相关设备
CN115565104A (zh) * 2022-09-28 2023-01-03 华为技术有限公司 一种动作预测方法及其相关设备

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109726903A (zh) * 2018-12-19 2019-05-07 中国电子科技集团公司信息科学研究院 基于注意力机制的分布式多智能体协同决策方法
US20220198709A1 (en) * 2019-04-02 2022-06-23 Buildots Ltd. Determining position of an image capture device
CN113341958A (zh) * 2021-05-21 2021-09-03 西北工业大学 一种混合经验的多智能体强化学习运动规划方法
CN114254567A (zh) * 2021-12-29 2022-03-29 北京博能科技股份有限公司 一种基于Muti-Agent与强化学习的机场融合仿真方法
CN115034379A (zh) * 2022-05-13 2022-09-09 华为技术有限公司 一种因果关系确定方法及相关设备
CN115565104A (zh) * 2022-09-28 2023-01-03 华为技术有限公司 一种动作预测方法及其相关设备

Also Published As

Publication number Publication date
CN115565104A (zh) 2023-01-03

Similar Documents

Publication Publication Date Title
WO2021120719A1 (zh) 神经网络模型更新方法、图像处理方法及装置
WO2019228358A1 (zh) 深度神经网络的训练方法和装置
WO2021190451A1 (zh) 训练图像处理模型的方法和装置
CN112183718B (zh) 一种用于计算设备的深度学习训练方法和装置
WO2021057056A1 (zh) 神经网络架构搜索方法、图像处理方法、装置和存储介质
WO2022052601A1 (zh) 神经网络模型的训练方法、图像处理方法及装置
WO2021238366A1 (zh) 一种神经网络构建方法以及装置
WO2022022274A1 (zh) 一种模型训练方法及装置
WO2022001805A1 (zh) 一种神经网络蒸馏方法及装置
CN112418392A (zh) 一种神经网络构建方法以及装置
WO2021008206A1 (zh) 神经网络结构的搜索方法、图像处理方法和装置
WO2024160186A1 (zh) 一种模型训练方法及其相关设备
CN111931901A (zh) 一种神经网络构建方法以及装置
WO2024067113A1 (zh) 一种动作预测方法及其相关设备
WO2024175014A1 (zh) 一种图像处理方法及其相关设备
WO2024067884A1 (zh) 一种数据处理方法及相关装置
CN113627163A (zh) 一种注意力模型、特征提取方法及相关装置
WO2024199404A1 (zh) 一种消费预测方法及其相关设备
WO2024188171A1 (zh) 一种图像处理方法及其相关设备
WO2024179485A1 (zh) 一种图像处理方法及其相关设备
WO2024179503A1 (zh) 一种语音处理方法及其相关设备
CN115238909A (zh) 一种基于联邦学习的数据价值评估方法及其相关设备
WO2022179599A1 (zh) 一种感知网络及数据处理方法
CN116739071A (zh) 一种模型训练方法及相关装置
WO2024140973A1 (zh) 一种动作计数方法及其相关设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23870350

Country of ref document: EP

Kind code of ref document: A1