Action determination method, device, readable medium and electronic device

By splicing the object feature vector to the position information of the environment image, the problem of insufficient correlation between the environment image and object information of the DRL algorithm is solved, and the accuracy and learning efficiency of the action model are improved.

CN113209622BActive Publication Date: 2024-09-24DOUYIN VISION CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110593881.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-28
Publication Date
2024-09-24
Estimated Expiration
2041-05-28

AI Technical Summary

Technical Problem

When existing deep reinforcement learning (DRL) algorithms process environmental images and object information, it is difficult to reflect the correlation between environmental images and object information, making it difficult to extract important features, which in turn affects the accuracy of the action model.

Method used

By obtaining the object feature vector and position information of each environmental object in the environment image, the object feature vector is spliced ​​to its corresponding position to form a more relevant environment image, and input into the pre-trained action model to generate the target action .

Benefits of technology

The accuracy of the target actions output by the action model is improved, allowing the action model to quickly extract important features from the spliced ​​environment images, improving learning efficiency and performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113209622B
    Figure CN113209622B
Patent Text Reader

Abstract

The present disclosure relates to a method, device, readable medium and electronic device for determining an action, and relates to the field of machine learning technology. The method comprises: obtaining an environmental image of the environment in which a target object is located, and an object feature vector of each environmental object in the environmental image, determining the position information of each environmental object in the environmental image, and for each environmental object, splicing the object feature vector of the environmental object to the position corresponding to the position information of the environmental object, using the spliced ​​environmental image as the input of a pre-trained action model, and obtaining a target action to be executed by the target object output by the action model. The present disclosure splices the object feature vector to the position corresponding to the position information, so that the object feature vector and the position information have a correlation, so that the action model can quickly extract important features from the spliced ​​environmental image, thereby improving the accuracy of the target action output by the action model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of machine learning, and in particular, to a method, device, readable medium and electronic device for determining an action. Background Art

[0002] In recent years, DRL (Deep Reinforcement Learning) has been widely used in games, robot control, and autonomous driving as one of the important research directions of machine learning technology. DRL can be divided into two stages: environmental cognition and decision-making. In the environmental cognition stage, deep neural networks are usually used to represent and learn the environmental information after multimodal fusion, and then the deep semantic information obtained by representation learning is output to the decision network for decision learning and the corresponding optimal action is generated.

[0003] Usually, when the environmental information includes an environmental image, it is necessary to directly splice the object information in the environmental information except the environmental image to the environmental image, or convert the environmental image into vector information and then splice it with the object information to achieve the fusion of the environmental information, and input the fusion result into the DRL algorithm for learning. However, such an information fusion method cannot reflect the correlation between the environmental image and the object information, which makes it difficult for the DRL algorithm to extract important features from the environmental information, and thus makes it difficult for the DRL algorithm to generate correct actions. Summary of the invention

[0004] This summary is provided to introduce concepts in a brief form that will be described in detail in the detailed description below. This summary is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.

[0005] In a first aspect, the present disclosure provides a method for determining an action, the method comprising:

[0006] Acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image;

[0007] Determine the position information of each of the environmental objects in the environmental image;

[0008] For each of the environmental objects, splicing the object feature vector of the environmental object to a position corresponding to the position information of the environmental object;

[0009] The spliced ​​environment image is used as the input of the pre-trained action model to obtain the target action to be performed by the target object output by the action model.

[0010] In a second aspect, the present disclosure provides a device for determining an action, the device comprising:

[0011] An acquisition module, used to acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image;

[0012] A determination module, used to determine the position information of each of the environmental objects in the environmental image;

[0013] A fusion module, for splicing, for each of the environmental objects, an object feature vector of the environmental object to a position corresponding to the position information of the environmental object;

[0014] The processing module is used to use the spliced ​​environment image as the input of the pre-trained action model to obtain the target action to be performed by the target object output by the action model.

[0015] In a third aspect, the present disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the method described in the first aspect of the present disclosure.

[0016] In a fourth aspect, the present disclosure provides an electronic device, including:

[0017] a storage device having a computer program stored thereon;

[0018] A processing device is used to execute the computer program in the storage device to implement the steps of the method described in the first aspect of the present disclosure.

[0019] Through the above technical solution, the present disclosure first obtains the environment image of the environment where the target object is located, and the object feature vector of each environment object in the environment image, and determines the position information of each environment object in the environment image, and then for each environment object, splices the object feature vector of the environment object to the position corresponding to the position information of the environment object, and finally uses the spliced ​​environment image as the input of the pre-trained action model to obtain the target action to be executed by the target object output by the action model. The present disclosure splices the object feature vector to the position corresponding to the position information, so that the object feature vector and the position information have a correlation, so that the action model can quickly extract important features from the spliced ​​environment image, thereby improving the accuracy of the target action output by the action model.

[0020] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale. In the drawings:

[0022] Figure 1 is a flow chart of a method for determining an action according to an exemplary embodiment;

[0023] Figure 2 is based on Figure 1 A flow chart of step 102 is shown in the illustrated embodiment;

[0024] Figure 3 is a schematic diagram of an environment image according to an exemplary embodiment;

[0025] Figure 4 is based on Figure 1 A flow chart of step 103 is shown in the illustrated embodiment;

[0026] Figure 5 is a schematic diagram showing a corresponding position of position information of an environmental object and a target pixel point according to an exemplary embodiment;

[0027] Figure 6 is a block diagram of a device for determining an action according to an exemplary embodiment;

[0028] Figure 7 is based on Figure 6 A block diagram of a determination module shown in the illustrated embodiment;

[0029] Figure 8 is based on Figure 6 A block diagram of a fusion module shown in the illustrated embodiment;

[0030] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0031] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0032] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0033] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0034] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0035] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".

[0036] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0037] Before introducing the method, device, readable medium and electronic device for determining the action provided by the present disclosure, the application scenarios involved in each embodiment of the present disclosure are first introduced. The application scenario may be a scenario in which the target object perceives the environment in which it is located and performs actions according to the perceived environmental information. The application scenario may include a target object and multiple environmental objects contained in the environment in which the target object is located. In this scenario, the target object can fuse the environmental information of the environment in which the target object is located, and input the fused environmental information into the action model to obtain the target action to be performed by the target object. Among them, the target object can be any intelligent body that can interact with the environment and perform actions according to the environmental information of the environment in which it is located. For example, in a game scenario, the target object can be a game AI (English: Artificial Intelligence, Chinese: Artificial Intelligence) character, and the target action can be to control the game AI character to attack, move and stop, etc. In an autonomous driving scenario, the target object can be a vehicle that performs autonomous driving, and the target action can be to control the vehicle to turn, go straight and brake, etc. In a robot intelligent assembly scenario, the target object can be a robot, and the target action can be to control the robot to move, grab objects to be assembled and put down objects to be assembled, etc.

[0038] Figure 1 FIG. 1 is a flow chart showing a method for determining an action according to an exemplary embodiment. Figure 1 As shown, the method includes:

[0039] Step 101: Acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image.

[0040] For example, the target object can first perceive the environment in which the target object is located to obtain multimodal environmental information of the environment in which the target object is located. Among them, the environmental information may include an environmental image, and object information of each environmental object in the environmental image, and the object information includes specific parameters corresponding to the environmental object. For example, when the target object is a game agent (for example, a game AI character), the environmental image may be a game image of the game environment in which the game agent is located (for example, a game map containing the game environment), and the environmental object may be game objects such as enemy units, roads and buildings in the game image, and the object information may include information such as numerical parameters of the game object (for example: blood volume, attack power, skills), name and location. When the target object is a vehicle for automatic driving, the environmental image may be an image taken around the vehicle, and the environmental object may be other vehicles, obstacles and traffic signs around the vehicle, and the object information may include information such as the speed, driving direction and size of other vehicles. When the target object is a robot in an intelligent assembly scene, the environmental image may be an image taken of the area where the object to be assembled is located, and the environmental object may be an object to be assembled, and the object information may include information such as the size, shape and position of the object to be assembled.

[0041] Then, the object information of each environmental object may be preprocessed to obtain an object feature vector of each environmental object. For example, the object information of each environmental object may be input into a pre-trained deep learning network to convert the object information of each environmental object into an object feature vector of the environmental object.

[0042] Step 102: Determine the position information of each environmental object in the environmental image.

[0043] Further, in order to improve the correctness of the target action output by the action model, a mapping between the object feature vector and the position information of the environmental object can be established, and the object feature vector and the environmental image can be spliced ​​by using the mapping, so that the object feature vector and the environmental image have a strong correlation, so that the action model can quickly extract important features from the environmental information and output a highly correct target action. Specifically, first, the position identification point of each environmental object in the environmental image can be selected, and the position identification point is used to identify the position of the environmental object. After that, the position information of the position identification point of each environmental object (the position information can be, for example, pixel coordinates) can be used as the position information of the environmental object, that is, the position information of the environmental object is the position information of the position identification point of the environmental object, which can be understood as using the position of the position identification point of the environmental object to represent the position of the entire environmental object. For example, the center of mass or center of gravity of the environmental object in the environmental image can be used as the position identification point, that is, the position of the center of mass or center of gravity of the environmental object is used to represent the position of the entire environmental object.

[0044] Step 103: for each environmental object, splice the object feature vector of the environmental object to the position corresponding to the position information of the environmental object.

[0045] For example, after determining the position information of each environmental object in the environmental image, the object feature vector of each environmental object can be spliced ​​to the position corresponding to the position information of the environmental object in the environmental image. In this way, the position of the environmental object in the environmental image is considered during the splicing process, so that the spliced ​​environmental image and the object feature vector are more closely related.

[0046] Step 104 , using the spliced ​​environment image as an input of a pre-trained action model to obtain a target action to be performed by the target object output by the action model.

[0047] In this step, the spliced ​​environmental image can be input into a pre-trained action model to obtain the target action output by the action model, and control the target object to perform the target action. The action model can adopt a DRL model. It should be noted that the action model is obtained by splicing the environmental image samples and the object feature vector samples in the same splicing method as the above process, and then inputting them into the action model for training. In this way, the action model can quickly extract important features from the spliced ​​environmental image samples, which can improve the learning efficiency and performance of the action model.

[0048] Taking the target object as the game AI character and the environmental object as the enemy unit in the game environment where the game AI character is located as an example, steps 101-104 are further explained. First, the game AI character can perceive the game environment in which it is located (which can be understood as collecting environmental information near the game AI character), and obtain the game map of the game environment, as well as the object information including the blood volume, name and location of each enemy unit in the game environment. Secondly, the blood volume, name and location of each enemy unit can be converted into the object feature vector of the enemy unit by using a deep learning network, and then the center of mass of each enemy unit in the game map is determined, and the location information of the center of mass of each enemy unit in the game map is used as the location information of the enemy unit. Then, according to the location information of each enemy unit, the object feature vector of each enemy unit can be spliced ​​to the center of mass of the enemy unit in the game map to obtain the spliced ​​game map. Finally, the spliced ​​game map can be input into the action model to obtain the game action output by the action model, and the game AI character can be controlled to perform the game action. For example, the game AI character can be controlled to move to each enemy unit in turn and attack each enemy unit.

[0049] Furthermore, the present disclosure is not limited to outputting target actions through spliced ​​environmental images, but can also be applied to any scenario that requires the fusion of multimodal information including images. For example, it can be applied to scenarios where the fused multimodal information is used to train a policy model, and it can also be applied to scenarios where the fused multimodal information is used to obtain an intelligent agent through reinforcement learning training.

[0050] In summary, the present disclosure first obtains an environmental image of the environment in which the target object is located, and an object feature vector of each environmental object in the environmental image, and determines the position information of each environmental object in the environmental image, and then for each environmental object, splices the object feature vector of the environmental object to the position corresponding to the position information of the environmental object, and finally uses the spliced ​​environmental image as the input of the pre-trained action model to obtain the target action to be executed by the target object output by the action model. The present disclosure splices the object feature vector to the position corresponding to the position information, so that the object feature vector and the position information are correlated, so that the action model can quickly extract important features from the spliced ​​environmental image, thereby improving the accuracy of the target action output by the action model.

[0051] Figure 2 is based on Figure 1 The embodiment shown is a flow chart of step 102. Figure 2 As shown, step 102 may include the following steps:

[0052] Step 1021, determining the center of mass or gravity of the environmental object in the environmental image.

[0053] Step 1022: The position information of the center of mass or center of gravity in the environment image is used as the position information of the environment object in the environment image.

[0054] For example, when the center of mass or gravity of the environmental object in the environmental image is used as the position identification point, the environmental image can be rasterized first, and the position information of each pixel in the environmental image can be obtained, where the position information can be the coordinates of the pixel. Figure 3 As shown, when the environment image is an RGB image with three dimensions of h, w, c (i.e., height, width, channel), the position information of the pixel point can be recorded as Pi = [wi, hi], where wi represents the coordinate value of the pixel point in the w dimension, and hi represents the coordinate value of the pixel point in the h dimension. It should be noted that c can be understood as an image channel. For example, when c is 3, it represents three channels of R, G, and B. When c is 1, there is only one channel, i.e., a grayscale image.

[0055] Then, the area where each environmental object is located can be searched in the environmental image, and the location information of the area where each environmental object is located can be recorded. Then, based on the location information of the area where each environmental object is located, the center of mass or center of gravity of the environmental object can be calculated, wherein the method of calculating the center of mass or center of gravity of the environmental object can refer to the implementation method in the relevant technology, and this disclosure will not describe it in detail. Finally, the location information of the center of mass or center of gravity of each environmental object can be used as the location information of the environmental object.

[0056] Figure 4 is based on Figure 1 The embodiment shown is a flow chart of step 103. Figure 4 As shown, step 103 may include the following steps:

[0057] Step 1031, obtaining a plurality of target pixel points corresponding to the position information of the environmental object.

[0058] For example, since the location information of the environmental object is a numerical value in a continuous space, and the pixels in the environmental image are discrete, in order to better splice the object feature vector with the location information of the environmental object, the location information of the environmental object can be discretized by using a sub-pixel feature transformation method. Specifically, first, for each environmental object, the pixel whose distance to the position corresponding to the location information of the environmental object meets a preset distance condition can be used as the target pixel. Among them, the preset distance condition can be that the distance to the position corresponding to the location information of the environmental object is less than a distance threshold, or it can be the closest distance to the position corresponding to the location information of the environmental object. For example, the four pixel points that are closest to the position corresponding to the location information of the environmental object can be used as target pixels.

[0059] Step 1032: Determine a transformation feature vector of each target pixel point according to the object feature vector of the environmental object.

[0060] Step 1033, concatenate the transformed feature vector of each target pixel to the corresponding position of the target pixel.

[0061] Furthermore, the object feature vector of the environmental object can be assigned to multiple target pixels corresponding to the environmental object by using the corresponding position of the position information of each environmental object and the distance between each target pixel corresponding to the environmental object, so as to obtain the transformation feature vector of each target pixel. Using such a distribution method is equivalent to establishing a mapping between the transformation feature vector and the target pixel. Finally, the transformation feature vector of each target pixel can be spliced ​​to the position corresponding to the target pixel in the environmental image.

[0062] Optionally, step 1032 may be implemented in the following manner:

[0063] Step a), determining the distance between the position corresponding to the position information of the environmental object and each target pixel point.

[0064] Step b), determining a transformation feature vector according to the object feature vector of the environmental object and the distance.

[0065] For example, when determining the transformation feature vector of each target pixel, the distance between the position corresponding to the position information of each environmental object and each target pixel corresponding to the environmental object can be determined first. Then, the weight corresponding to each target pixel can be determined based on the distance between the position corresponding to the position information of the environmental object and each target pixel. For example, the first formula can be used to determine the weight corresponding to each target pixel. The first formula can be expressed as: Wn = 1 / r n , where Wn represents the weight corresponding to the target pixel numbered n, r n Indicates the distance between the target pixel numbered n and the position corresponding to the position information of the environmental object. Finally, the object feature vector of the environmental object can be assigned to each target pixel according to the weight corresponding to each target pixel to obtain the transformed feature vector of each target pixel.

[0066] Taking the centroid of the environmental object as the position identification point as an example, if the four pixels closest to the position information of the environmental object are taken as the target pixels, such as Figure 5 As shown ( Figure 5Where P is the centroid of the environmental object, and P1, P2, P3, and P4 are the target pixels), the object feature vector corresponding to P can be distributed to P1, P2, P3, and P4 according to the weights to obtain the transformation feature vectors corresponding to P1, P2, P3, and P4. At this time, the process of obtaining the transformation feature vector of the target pixel can be understood as taking the object feature vector of the environmental object as the feature vector at the centroid of the environmental object (i.e., P), and using the transformation to distribute it to the pixels in the neighborhood near the centroid (i.e., P1, P2, P3, and P4) to obtain the transformation feature vector of the target pixel.

[0067] Optionally, step 1033 may include the following steps:

[0068] Step 1), if there are transformation feature vectors with different vector lengths among the transformation feature vectors of multiple target pixels, the transformation feature vector with the longest vector length is used as the target transformation feature vector.

[0069] Step 2), according to the vector length of the target transformed feature vector, the transformed feature vector is adjusted so that the vector length of the transformed feature vector is the same as the vector length of the target transformed feature vector.

[0070] In one scenario, if there are transformation feature vectors with different vector lengths among the transformation feature vectors of multiple target pixel points corresponding to the environmental object, in order to ensure the splicing effect of the transformation feature vectors and the target pixel points, the transformation feature vectors of the multiple target pixel points can be aligned. For example, the transformation feature vector with the longest vector length can be first used as the target transformation feature vector, and the transformation feature vector of each target pixel point can be adjusted so that the vector length of the transformation feature vector of each target pixel point is the same as the vector length of the target transformation feature vector. For example, the vector length of the target transformation feature vector can be used as a reference, and the transformation feature vector whose vector length is less than the reference can be padded with 0 to make the vector length of the transformation feature vector the same as the vector length of the target transformation feature vector.

[0071] Step 3), splicing the adjusted transformed feature vector of each target pixel to the position corresponding to the target pixel.

[0072] Furthermore, after adjusting the transformation feature vector, the adjusted transformation feature vector of each target pixel can be spliced ​​to the position corresponding to the target pixel in the environment image, and the preset feature vector can be spliced ​​to other positions in the environment image except the target pixel. For example, in the case where the environment image is an RGB image containing three dimensions of h, w, and c, the transformation feature vector corresponding to the target pixel can be spliced ​​on the c dimension of the target pixel (that is, the transformation feature vector corresponding to the target pixel is added to the dimension of the image channel of the target pixel), and 0 can be used as the preset feature vector, and the preset feature vector can be spliced ​​on the c dimension of other positions in the environment image except the target pixel.

[0073] In one scenario, the target object is a game agent, the environment image is a game image of the game environment in which the game agent is located, and the environment object is a game object in the game environment. Step 104 can be implemented in the following manner:

[0074] The spliced ​​game image is used as the input of the action model to obtain the game action to be executed by the game agent output by the action model.

[0075] Specifically, first, the game agent can perceive the game environment in which it is located, obtain the game image of the game environment, and the object information of each game object in the game environment. Secondly, the deep learning network can be used to convert the object information of each game object into the object feature vector of the game object, and then determine the center of mass (or center of gravity) of each game object in the game image, and use the position information of the center of mass (or center of gravity) of each game object in the game image as the position information of the game object. After that, the 4 pixels closest to the position corresponding to the position information of each game object can be used as the target pixel points corresponding to the game object. Then, according to the distance between the corresponding position of the position information of each game object and each target pixel point corresponding to the game object, the weight corresponding to each target pixel point is determined, and according to the weight, the object feature vector of the game object is assigned to the multiple target pixel points corresponding to the game object, and the transformation feature vector of each target pixel point is obtained. Then the transformation feature vector of each target pixel point can be spliced ​​to the position corresponding to the target pixel point in the environment image to obtain the spliced ​​game image. Finally, the spliced ​​game image can be input into the action model to obtain the game action output by the action model, and the game agent can be controlled to perform the game action. For example, the game agent can be controlled to attack each game object in turn.

[0076] In summary, the present disclosure first obtains an environmental image of the environment in which the target object is located, and an object feature vector of each environmental object in the environmental image, and determines the position information of each environmental object in the environmental image, and then for each environmental object, splices the object feature vector of the environmental object to the position corresponding to the position information of the environmental object, and finally uses the spliced ​​environmental image as the input of the pre-trained action model to obtain the target action to be executed by the target object output by the action model. The present disclosure splices the object feature vector to the position corresponding to the position information, so that the object feature vector and the position information are correlated, so that the action model can quickly extract important features from the spliced ​​environmental image, thereby improving the accuracy of the target action output by the action model.

[0077] Figure 6 FIG. 1 is a block diagram of a device for determining an action according to an exemplary embodiment. Figure 6 As shown, the device 200 includes:

[0078] The acquisition module 201 is used to acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image.

[0079] The determination module 202 is used to determine the position information of each environmental object in the environmental image.

[0080] The fusion module 203 is used to splice the object feature vector of each environmental object to the position corresponding to the position information of the environmental object.

[0081] The processing module 204 is used to use the spliced ​​environment image as the input of the pre-trained action model to obtain the target action to be executed by the target object output by the action model.

[0082] Figure 7 is based on Figure 1 The embodiment shown is a block diagram of a determination module. Figure 7 As shown, the determination module 202 includes:

[0083] The first determination submodule 2021 is used to determine the center of mass or center of gravity of the environmental object in the environmental image.

[0084] The second determining submodule 2022 is used to use the position information of the center of mass or the center of gravity in the environment image as the position information of the environment object in the environment image.

[0085] Figure 8 is based on Figure 1 The embodiment shown is a block diagram of a fusion module. Figure 8 As shown, the fusion module 203 includes:

[0086] The acquisition submodule 2031 acquires a plurality of target pixel points corresponding to the position information of the environmental object.

[0087] The third determining submodule 2032 determines the transformation feature vector of each target pixel point according to the object feature vector of the environmental object.

[0088] The splicing submodule 2033 splices the transformed feature vector of each target pixel to the corresponding position of the target pixel.

[0089] Optionally, the third determining submodule 2032 is used to:

[0090] Determine the distance between the position corresponding to the position information of the environmental object and each target pixel point.

[0091] The transformed feature vector is determined according to the object feature vector of the environmental object and the distance.

[0092] Optionally, the third determining submodule 2032 is used to:

[0093] According to the distance, the weight corresponding to each target pixel is determined.

[0094] According to the weight, the object feature vector of the environment object is assigned to each target pixel to obtain a transformed feature vector.

[0095] Optionally, the splicing submodule 2033 is used to:

[0096] If there are transformation feature vectors with different vector lengths among the transformation feature vectors of multiple target pixels, the transformation feature vector with the longest vector length is used as the target transformation feature vector.

[0097] According to the vector length of the target transformed feature vector, the transformed feature vector is adjusted so that the vector length of the transformed feature vector is the same as the vector length of the target transformed feature vector.

[0098] The adjusted transformed feature vector of each target pixel is spliced ​​to the corresponding position of the target pixel in the environment image.

[0099] Optionally, the acquisition submodule 2031 is used for:

[0100] The pixel point whose distance to the position corresponding to the position information of the environmental object meets the preset distance condition is taken as the target pixel point.

[0101] Optionally, the target object is a game agent, the environment image is a game image of the game environment in which the game agent is located, and the environment object is a game object in the game environment. The processing module 204 is used to:

[0102] The spliced ​​game image is used as the input of the action model to obtain the game action to be executed by the game agent output by the action model.

[0103] In summary, the present disclosure first obtains an environmental image of the environment in which the target object is located, and an object feature vector of each environmental object in the environmental image, and determines the position information of each environmental object in the environmental image, and then for each environmental object, splices the object feature vector of the environmental object to the position corresponding to the position information of the environmental object, and finally uses the spliced ​​environmental image as the input of the pre-trained action model to obtain the target action to be executed by the target object output by the action model. The present disclosure splices the object feature vector to the position corresponding to the position information, so that the object feature vector and the position information are correlated, so that the action model can quickly extract important features from the spliced ​​environmental image, thereby improving the accuracy of the target action output by the action model.

[0104] Reference below Fig. 9 , which shows an electronic device (eg, Figure 1 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig. 9 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0105] like Fig. 9 As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0106] Typically, the following devices may be connected to the I / O interface 305: input devices 306 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 308 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 309. The communication devices 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Although Fig. 9 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0107] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.

[0108] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0109] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0110] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0111] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: obtains an environmental image of the environment in which the target object is located, and an object feature vector of each environmental object in the environmental image; determines the position information of each of the environmental objects in the environmental image; for each of the environmental objects, splices the object feature vector of the environmental object to the position corresponding to the position information of the environmental object; uses the spliced ​​environmental image as the input of a pre-trained action model, and obtains the target action to be executed by the target object output by the action model.

[0112] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages ​​or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] The modules involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a module does not limit the module itself in some cases. For example, an acquisition module may also be described as a "module for acquiring an environment image and an object feature vector".

[0115] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.

[0116] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0117] According to one or more embodiments of the present disclosure, Example 1 provides a method for determining an action, including: obtaining an environmental image of the environment in which a target object is located, and an object feature vector of each environmental object in the environmental image; determining the position information of each of the environmental objects in the environmental image; for each of the environmental objects, splicing the object feature vector of the environmental object to a position corresponding to the position information of the environmental object; using the spliced ​​environmental image as input of a pre-trained action model, and obtaining the target action to be performed by the target object output by the action model.

[0118] According to one or more embodiments of the present disclosure, Example 2 provides the method of Example 1, wherein determining the position information of each of the environmental objects in the environmental image includes: determining the center of mass or center of gravity of the environmental object in the environmental image; and using the position information of the center of mass or the center of gravity in the environmental image as the position information of the environmental object in the environmental image.

[0119] According to one or more embodiments of the present disclosure, Example 3 provides the method of Example 1, which splices the object feature vector of the environmental object to the position corresponding to the position information of the environmental object, including: obtaining multiple target pixel points corresponding to the position information of the environmental object; determining the transformation feature vector of each of the target pixel points based on the object feature vector of the environmental object; and splicing the transformation feature vector of each of the target pixel points to the corresponding position of the target pixel point.

[0120] According to one or more embodiments of the present disclosure, Example 4 provides the method of Example 3, which determines the transformation feature vector of each of the target pixel points based on the object feature vector of the environmental object, including: determining the distance between the position corresponding to the position information of the environmental object and each of the target pixel points; determining the transformation feature vector based on the object feature vector of the environmental object and the distance.

[0121] According to one or more embodiments of the present disclosure, Example 5 provides the method of Example 4, wherein the transformation feature vector is determined based on the object feature vector of the environmental object and the distance, including: determining the weight corresponding to each of the target pixel points based on the distance; and assigning the object feature vector of the environmental object to each of the target pixel points based on the weight to obtain the transformation feature vector.

[0122] According to one or more embodiments of the present disclosure, Example 6 provides the method of Example 3, which splices the transformation feature vector of each of the target pixel points to the corresponding position of the target pixel point, including: if there are transformation feature vectors with different vector lengths among the transformation feature vectors of multiple target pixel points, taking the transformation feature vector with the longest vector length as the target transformation feature vector; adjusting the transformation feature vector according to the vector length of the target transformation feature vector so that the vector length of the transformation feature vector is the same as the vector length of the target transformation feature vector; and splicing the adjusted transformation feature vector of each of the target pixel points to the corresponding position of the target pixel point.

[0123] According to one or more embodiments of the present disclosure, Example 7 provides the method of Example 3, wherein obtaining multiple target pixel points corresponding to the position information of the environmental object includes: taking the pixel points whose distances to the positions corresponding to the position information of the environmental object satisfy a preset distance condition as the target pixel points.

[0124] According to one or more embodiments of the present disclosure, Example 8 provides a method of any one of Examples 1-7, wherein the target object is a game agent, the environment image is a game image of a game environment in which the game agent is located, and the environment object is a game object in the game environment; using the spliced ​​environment image as an input of a pre-trained action model to obtain a target action to be performed by the target object output by the action model, includes: using the spliced ​​game image as an input of the action model to obtain a game action to be performed by the game agent output by the action model.

[0125] According to one or more embodiments of the present disclosure, Example 9 provides an action determination device, which includes: an acquisition module, used to acquire an environmental image of the environment in which the target object is located, and an object feature vector of each environmental object in the environmental image; a determination module, used to determine the position information of each of the environmental objects in the environmental image; a fusion module, used to splice the object feature vector of the environmental object to the position corresponding to the position information of the environmental object for each of the environmental objects; and a processing module, used to use the spliced ​​environmental image as the input of a pre-trained action model to obtain the target action to be performed by the target object output by the action model.

[0126] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon, which implements the steps of the methods described in Examples 1 to 8 when executed by a processing device.

[0127] According to one or more embodiments of the present disclosure, Example 11 provides an electronic device, comprising: a storage device on which a computer program is stored; and a processing device for executing the computer program in the storage device to implement the steps of the method described in Examples 1 to 8.

[0128] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other.

[0129] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0130] Although the subject matter has been described in language specific to structural features and / or method logic actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims. Regarding the device in the above embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims

1. A method for determining an action, characterized in that: The method comprises: Acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image; Determine the position information of each of the environmental objects in the environmental image; For each of the environmental objects, splicing the object feature vector of the environmental object to a position corresponding to the position information of the environmental object; Using the spliced ​​environment image as an input of a pre-trained action model to obtain a target action to be performed by the target object output by the action model; The step of splicing the object feature vector of the environmental object to a position corresponding to the position information of the environmental object includes: Acquire multiple target pixel points corresponding to the position information of the environmental object; Determine a transformation feature vector of each target pixel according to the object feature vector of the environmental object; The transformed feature vector of each target pixel is spliced ​​to the corresponding position of the target pixel.

2. The method according to claim 1, characterized in that The determining the position information of each of the environmental objects in the environmental image includes: Determine the center of mass or center of gravity of the environmental object in the environmental image; The position information of the mass center or the gravity center in the environment image is used as the position information of the environment object in the environment image.

3. The method according to claim 1, characterized in that: The step of determining the transformation feature vector of each target pixel point according to the object feature vector of the environmental object comprises: Determine the distance between the position corresponding to the position information of the environmental object and each of the target pixel points; The transformed feature vector is determined according to the object feature vector of the environmental object and the distance.

4. The method according to claim 3, characterized in that The step of determining the transformation feature vector according to the object feature vector of the environmental object and the distance comprises: Determine a weight corresponding to each of the target pixels according to the distance; According to the weight, the object feature vector of the environment object is assigned to each of the target pixels to obtain the transformed feature vector.

5. The method according to claim 1, characterized in that The step of splicing the transformed feature vector of each target pixel point to a position corresponding to the target pixel point includes: If there are transformation feature vectors with different vector lengths among the transformation feature vectors of the plurality of target pixel points, the transformation feature vector with the longest vector length is used as the target transformation feature vector; According to the vector length of the target transformed feature vector, adjusting the transformed feature vector so that the vector length of the transformed feature vector is the same as the vector length of the target transformed feature vector; The adjusted transformed feature vector of each target pixel is spliced ​​to the corresponding position of the target pixel.

6. The method according to claim 1, characterized in that The step of obtaining a plurality of target pixel points corresponding to the position information of the environmental object includes: A pixel point whose distance to the position corresponding to the position information of the environmental object meets a preset distance condition is taken as the target pixel point.

7. The method according to any one of claims 1 to 6, characterized in that The target object is a game agent, the environment image is a game image of the game environment in which the game agent is located, and the environment object is a game object in the game environment; The step of using the spliced ​​environment image as the input of the pre-trained action model to obtain the target action to be performed by the target object output by the action model includes: The spliced ​​game image is used as the input of the action model to obtain the game action to be executed by the game agent output by the action model.

8. An action determination device, characterized in that: The device comprises: An acquisition module, used to acquire an environment image of the environment where the target object is located, and an object feature vector of each environment object in the environment image; A determination module, used to determine the position information of each of the environmental objects in the environmental image; A fusion module, for splicing, for each of the environmental objects, an object feature vector of the environmental object to a position corresponding to the position information of the environmental object; A processing module, used for taking the spliced ​​environment image as an input of a pre-trained action model to obtain a target action to be performed by the target object output by the action model; The fusion module includes: An acquisition submodule is used to acquire a plurality of target pixel points corresponding to the position information of the environmental object; A third determination submodule determines a transformation feature vector of each target pixel point according to the object feature vector of the environmental object; The splicing submodule splices the transformed feature vector of each target pixel point to the corresponding position of the target pixel point.

9. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 7 are implemented.

10. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 7.