WO2020108457A1 - 目标对象的控制方法、装置、设备及存储介质 - Google Patents

目标对象的控制方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020108457A1
WO2020108457A1 PCT/CN2019/120741 CN2019120741W WO2020108457A1 WO 2020108457 A1 WO2020108457 A1 WO 2020108457A1 CN 2019120741 W CN2019120741 W CN 2019120741W WO 2020108457 A1 WO2020108457 A1 WO 2020108457A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
processing
processed
convolution
interactive
Prior art date
Application number
PCT/CN2019/120741
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 腾讯科技(深圳)有限公司
Priority to EP19888588.1A priority Critical patent/EP3888769A4/en
Priority to JP2021505235A priority patent/JP7257497B2/ja
Publication of WO2020108457A1 publication Critical patent/WO2020108457A1/zh

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/30Interconnection arrangements between game servers and game devices; Interconnection arrangements between game devices; Interconnection arrangements between game servers
    • A63F13/35Details of game servers
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/55Controlling game characters or game objects based on the game progress
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/60Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor
    • A63F13/67Generating or modifying game content before or while executing the game program, e.g. authoring tools specially adapted for game development or game-integrated level editor adaptively or by learning from player actions, e.g. skill level adjustment or by storing successful combat sequences for re-use
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/048Activation functions
    • 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

Definitions

  • the present application relates to the field of artificial intelligence, and in particular, to a control method, device, equipment, and storage medium of a target object.
  • the online game industry is an emerging sunrise industry. After rapid development in recent years, the online game industry is now rapidly approaching the stage of maturity. Among them, multiplayer online battle arena (multiplayer online battle (Arena, MOBA)) games are an important part of online games.
  • multiplayer online battle (Arena, MOBA) multiplayer online battle (Arena, MOBA)
  • MOBA games often involve the interaction of multiple players. Therefore, when a player is offline or in other abnormal situations in the same game, the player's team may lose due to the small number of players.
  • the server uses a general framework such as caffe or TensorFlow to obtain artificial intelligence (AI) models, and then the terminal device combines the AI model and the entire game data to predict the player's operation under the general framework.
  • AI artificial intelligence
  • general frameworks such as caffe or TensorFlow are high-level machine learning frameworks.
  • the use of such general frameworks to predict player operations usually requires more memory. Since the computing power of the terminal device is weak and there are few storage resources, deploying such a general framework in the terminal device will cause the performance of the terminal device to be greatly reduced.
  • the embodiments of the present application provide a control method, device, device and storage medium for a target object.
  • the terminal device can use a data processing framework to predict player operations.
  • the data processing framework can implement sparse convolution processing of data. It reduces the amount of data processing, effectively saves the consumption of memory, and at the same time improves the running speed, which can significantly improve the performance of the terminal device.
  • the first aspect of the present application provides a target object control method, which is applied to a terminal device and includes:
  • a second aspect of the present application provides an object control device, including:
  • the obtaining module is configured to obtain the interactive frame data from the target application according to the object control instruction if the object control instruction sent by the server is received, wherein the object control instruction carries the target object identifier;
  • the acquiring module is further configured to acquire the data to be processed corresponding to the interactive frame data through an object control model, wherein the object control model is obtained by training using global interactive data;
  • a processing module configured to process the data to be processed acquired by the acquiring module using a data processing framework to obtain an interactive control instruction, wherein the interactive control instruction carries the identification of the target object, and the data processing framework uses To achieve sparse convolution processing of data;
  • a sending module configured to send the interactive control instruction processed by the processing module to the server through the target application, wherein the interactive control instruction is used to instruct at least one terminal device to The target object is controlled.
  • the acquiring module is specifically configured to acquire the first to-be-processed data corresponding to the first interactive frame data through the object control model, wherein the first interactive frame data corresponds to the M frame data in the interactive frame data,
  • the M is a positive integer
  • the processing module is specifically configured to process the first to-be-processed data using the data processing framework to obtain a first interactive control instruction
  • the data processing framework is used to process the second data to be processed to obtain a second interactive control instruction.
  • the object control device further includes an extraction module
  • the extraction module is used by the acquisition module to extract the operation feature information according to the to-be-processed data after acquiring the to-be-processed data corresponding to the interactive frame data through the object control model, wherein the operation feature information includes the first feature An element set and a second characteristic element set, the number of elements in the first characteristic element set is less than the number of elements in the second characteristic element set;
  • the acquiring module is further configured to acquire the first feature element set from the operation feature information extracted by the extracting module;
  • the processing module is specifically configured to generate a depth map according to the first feature element set, where the depth map includes multiple boundary elements and multiple internal elements;
  • each boundary element in the plurality of boundary elements three adjacent elements are used for convolution calculation, or five adjacent elements are used for convolution calculation to obtain a first convolution result;
  • the object control device further includes an operation module
  • the operation module is used for the processing module to process the data to be processed by using a data processing framework, and before obtaining the interactive control instruction, an instruction set based on an advanced reduced instruction set machine ARM is used to run the data processing framework.
  • the processing module is specifically configured to process the data to be processed in a register using the data processing framework to obtain data to be fused;
  • the data processing framework is used to process the data to be fused in the memory.
  • the processing module is specifically used to process the data to be processed by using a pooling layer and a convolutional layer in the register, wherein the pooling layer is used to regularize the data to be processed and Pooling processing, the convolutional layer is used to perform activation processing and standardization processing on the data to be processed.
  • the processing module is specifically configured to process the data to be fused using a fully connected layer in the memory, wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected
  • the layer is used for splicing the first data to be fused and the second data to be fused, and performing fusion processing on the first data to be fused and the second data to be fused.
  • the processing module is specifically configured to obtain the data to be processed from the first memory
  • Data fusion processing is performed on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • the processing module is specifically configured to perform convolution processing on the data to be processed to obtain a convolution processing result, where the convolution processing result is stored in a target memory;
  • the processing module is specifically configured to perform convolution processing on the data to be processed to obtain a convolution processing result, where the convolution processing result is stored in a target memory;
  • the object control device 20 further includes a selection module
  • the acquiring module is further configured to acquire performance parameters of the terminal device before acquiring interactive frame data from the target application according to the object control instruction;
  • the selection module is configured to select a target matching template from a set of preset frame matching templates according to the operating parameters acquired by the acquiring module, wherein the set of preset frame matching templates includes at least one matching template, each matching template Including the parameters used by the data processing framework;
  • the processing module is specifically configured to process the data to be processed using the data processing framework according to the target matching template to obtain the interactive control instruction.
  • a third aspect of the present application provides a terminal device, including: a memory, a transceiver, a processor, and a bus system;
  • the memory is used to store programs
  • the processor is used to execute the program in the memory and includes the following steps:
  • the bus system is used to connect the memory and the processor to enable the memory and the processor to communicate.
  • the processor is specifically configured to perform the following steps:
  • the data processing framework is used to process the second data to be processed to obtain a second interactive control instruction.
  • the processor is further configured to execute the following steps:
  • the processor is specifically used to perform the following steps:
  • each boundary element in the plurality of boundary elements three adjacent elements are used for convolution calculation, or five adjacent elements are used for convolution calculation to obtain a first convolution result;
  • the processor is further configured to perform the following steps:
  • the instruction set based on the advanced reduced instruction set machine ARM is used to run the data processing framework.
  • the processor is specifically configured to perform the following steps:
  • the data processing framework is used to process the data to be fused in the memory.
  • the processor is specifically configured to perform the following steps:
  • the processor is specifically configured to perform the following steps:
  • Adopting a fully connected layer to process the data to be fused in the memory wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected layer is used to stitch the first The data to be fused and the second data to be fused, and performing fusion processing on the first data to be fused and the second data to be fused.
  • the processor is specifically configured to perform the following steps:
  • Data fusion processing is performed on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • the processor is specifically configured to perform the following steps:
  • the processor is specifically configured to perform the following steps:
  • the processor is further configured to perform the following steps:
  • a target matching template from a set of preset frame matching templates according to the operating parameters, wherein the set of preset frame matching templates includes at least one matching template, and each matching template includes parameters used by the data processing framework;
  • the processing of the data to be processed by using a data processing framework to obtain an interactive control instruction includes:
  • the data processing framework is used to process the data to be processed to obtain the interactive control instruction.
  • a fourth aspect of the present application provides a computer-readable storage medium that stores a program, which when executed on a processor, causes the processor to perform the methods described in the above aspects.
  • a method for controlling a target object is provided, and if an object control instruction sent by a server is received, the terminal device may according to the object control instruction Obtain the interactive frame data from the target application, where the object control instruction carries the target object ID, and then obtain the data to be processed corresponding to the interactive frame data through the object control model, and then use the data processing framework to process the processed data to obtain interactive control Instructions, where the interaction control instruction carries the identification of the target object, the data processing framework is used to implement sparse convolution processing of the data, and finally, the terminal device sends the interaction control instruction to the server through the target application, so that the server sends interaction to at least one terminal device Control instructions, wherein the interactive control instructions are used to instruct at least one terminal device to control the target object in the target application.
  • the terminal device can use the data processing framework to predict the player's operation.
  • the data processing framework can realize the sparse convolution processing of the data. Therefore, the data processing volume is greatly reduced, the memory consumption is effectively saved, and the The running speed can significantly improve the performance of the terminal equipment.
  • FIG. 1 is a schematic structural diagram of a target object control system in an embodiment of this application
  • FIG. 2 is a schematic diagram of the working process of the target object control system in the embodiment of the present application.
  • FIG. 3 is a schematic structural diagram of a data processing framework in an embodiment of this application.
  • FIG. 4 is a schematic diagram of an embodiment of a method for controlling a target object in an embodiment of the present application
  • FIG. 5 is a schematic diagram of an application process of a data processing framework in an embodiment of this application.
  • FIG. 6 is a schematic diagram of an embodiment of a filling diagram in an embodiment of the present application.
  • FIG. 7 is a schematic diagram of an embodiment of a depth map in an embodiment of the present application.
  • FIG. 8 is a schematic diagram of an embodiment of using a depth map to perform convolution calculation in an embodiment of the present application
  • FIG. 9 is a schematic diagram of an embodiment of a merged network layer in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of another embodiment of a merged network layer in an embodiment of this application.
  • FIG. 11 is a schematic diagram of an embodiment of deleting a network layer in an embodiment of the present application.
  • FIG. 12 is a schematic diagram of an embodiment of a chained network structure in an embodiment of this application.
  • FIG. 13 is a schematic diagram of data processing based on a chain network structure in an embodiment of the present application.
  • FIG. 14 is a schematic diagram of an embodiment of a multi-input network structure in an embodiment of this application.
  • 15 is a schematic diagram of data processing based on a multi-input network structure in an embodiment of the present application.
  • 16 is a schematic diagram of an embodiment of a multi-output network structure in an embodiment of this application.
  • 17 is a schematic diagram of data processing based on a multi-output network structure in an embodiment of the present application.
  • 18 is a schematic diagram of an embodiment of an object control device in an embodiment of the present application.
  • 19 is a schematic diagram of another embodiment of an object control device in an embodiment of this application.
  • 20 is a schematic diagram of another embodiment of an object control device in an embodiment of this application.
  • 21 is a schematic diagram of another embodiment of an object control device in an embodiment of this application.
  • 22 is a schematic structural diagram of a terminal device in an embodiment of this application.
  • Embodiments of the present application provide a target object control method and related device.
  • the terminal device can use a data processing framework to predict player operations.
  • the data processing framework can implement sparse convolution processing of data, therefore, data processing is greatly reduced Volume, which effectively saves memory consumption and improves the running speed, which can significantly improve the performance of the terminal device.
  • Artificial intelligence is a theory, method, technology, and application system that uses digital computers or digital computer-controlled machines to simulate, extend, and extend human intelligence, to perceive the environment, acquire knowledge, and use knowledge to obtain the best results.
  • artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a similar way to human intelligence.
  • Artificial intelligence is to study the design principles and implementation methods of various intelligent machines, so that the machine has the functions of perception, reasoning and decision-making.
  • Artificial intelligence technology is a comprehensive subject, covering a wide range of fields, both hardware-level technology and software-level technology.
  • Basic technologies of artificial intelligence generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, and mechatronics.
  • Artificial intelligence software technology mainly includes computer vision technology, speech processing technology, natural language processing technology and machine learning/deep learning.
  • Machine learning is a multidisciplinary interdisciplinary subject, involving multiple subjects such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and so on. Specially study how the computer simulates or realizes human learning behavior to acquire new knowledge or skills, and reorganize the existing knowledge structure to continuously improve its performance.
  • Machine learning is the core of artificial intelligence, and is the fundamental way to make computers intelligent, and its applications are in various fields of artificial intelligence.
  • Machine learning and deep learning usually include technologies such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, inductive learning, and pedagogical learning.
  • artificial intelligence technology has been researched and applied in many fields, such as common smart homes, smart wearable devices, virtual assistants, smart speakers, smart marketing, unmanned driving, autonomous driving, drones , Robots, intelligent medical care, intelligent customer service, etc., I believe that with the development of technology, artificial intelligence technology will be applied in more fields and play an increasingly important value.
  • FIG. 1 is a schematic structural diagram of the target object control system in the embodiment of the present application. As shown in the figure, taking the MOBA game as an example, assume that two teams are playing against each other, divided into teams A and Team B, team A has five players.
  • team B has five players, each player uses a terminal device, that is, team A corresponds to terminal device 1, terminal device 2, terminal device 3, terminal device 4 and For terminal equipment 5, team B corresponds to terminal equipment 6, terminal equipment 7, terminal equipment 8, terminal equipment 9, and terminal equipment 10.
  • the server can select one or more terminal devices with better performance, and the terminal device predicts the operation of the dropped player online.
  • the server first selects the terminal device 6 with the best performance, and then the terminal device 6 predicts the player operation in the terminal device 1, after the prediction, the operation command is fed back to the MOBA game, and uploaded to the server through the MOBA game Finally, the server feeds back the simulated operation instructions to each terminal device, so that the MOBA games of these terminal devices can simulate the operation of the dropped player.
  • FIG. 2 is a schematic diagram of the work flow of the target object control system in the embodiment of the present application.
  • the MOBA game uploads game recording data to the server.
  • the AI model is trained, where the AI model is usually obtained by offline training.
  • this application designed and developed a set of prediction framework suitable for the operation of MOBA games.
  • the prediction framework has the advantages of small code size, fast running speed, and low storage consumption.
  • the MOBA game sends the frame data of the game to the prediction framework, and the prediction framework generates operation instructions based on the frame data and the AI model, and then feeds back the operation instructions to the MOBA game.
  • the data processing framework is streamlined and clear in design, and only uses the necessary levels contained in the AI model corresponding to the terminal device MOBA game.
  • a network structure is used for network description, and each network layer is included in the network.
  • FIG. 3 is a schematic structural diagram of a data processing framework in an embodiment of the present application.
  • the layer includes input nodes and output nodes.
  • the base class of the network layer describes the network directed graph in the form of an adjacency table, and its subclasses represent Each network layer, the network layer may specifically include a convolution (Conv) layer, a full connection (FC) layer, a pooling (pooling) layer, a batch normalization (BN) layer, and a measurement (scale) layer 3.
  • Conv convolution
  • FC full connection
  • BN pooling
  • BN batch normalization
  • scale measurement
  • LRN Local response normalization
  • concatenation layer concatenation layer
  • slice layer element layer (element-wiseeltwise, Eltwise) layer
  • activation layer Among them, specific network layer (such as Conv layer and activiation layer) subclasses are different calculation methods of the network layer.
  • the Conv layer has General Matrix Multiplication (GEneral Matrix to Matrix Multiplication, GEMM), Winograd algorithm, and sparse Algorithms, direct algorithms, group algorithms, depthwise algorithms, etc.
  • the activiation layer has an activation function (rectified linear and leaky, ReLU) algorithm, a normalized (softmax) algorithm, and a hyperbolic tangent (tanh) function.
  • an embodiment of the control method of the target object in the embodiment of the present application includes:
  • the target application server selects a terminal device with better performance in the authority game and starts the The AI thread of the terminal device is used to simulate the offline player to control the target object.
  • the selected target terminal device will receive the object control instruction sent by the target application server.
  • the object control instruction carries the identification of the target object, so that the object to be simulated can be determined according to the object control instruction.
  • Get interactive frame data Perform feature extraction on the interactive frame data to obtain operation data.
  • the target application may specifically be a MOBA game, that is, the MOBA game thread sends interactive frame data to the AI thread, and the interactive frame data is several frames of game data in the MOBA game.
  • the AI thread uses interactive frame data for AI calculations and returns the calculation results to the MOBA game thread.
  • the MOBA game thread re-detects the player's network recovery or the player has a manual operation instruction upload, the AI hosting process can be terminated.
  • the AI thread running in the terminal device can obtain the data to be processed corresponding to the interactive frame data through an object control model, which is obtained by training using global interactive data.
  • object control model which is obtained by training using global interactive data.
  • the training frameworks include but are not limited to caffe and TensorFlow.
  • the AI thread running in the terminal device uses the data processing framework to process the data to be processed, thereby generating interactive control instructions.
  • the terminal device uses a lightweight data processing framework.
  • the lightweight data processing framework can perform sparse convolution on the data.
  • the use of the ReLU function as the activation function will cause the output to be sparse, thus It also makes the subsequent convolution input sparse, and then the data processing framework does not calculate the complete matrix multiplication, but only calculates the output of non-zero values.
  • the terminal device after generating the interactive control instruction, the terminal device sends the interactive control instruction to the target application server, and the target application server sends the interactive control instruction to other terminal devices in the authority game, so that these terminal devices receive the interactive control After the instruction, the target object controlled by the dropped player can also be simulated in the target application.
  • An embodiment of the present application provides a method for controlling a target object. If an object control instruction sent by a server is received, the terminal device may obtain interactive frame data from the target application according to the object control instruction, where the object control instruction carries Identify the target object, and then obtain the data to be processed corresponding to the interactive frame data through the object control model, and then use the data processing framework to process the data to be processed to obtain the interactive control instruction, in which the interactive control instruction carries the target object identification, the data processing framework It is used to realize sparse convolution processing of data.
  • the terminal device sends an interactive control instruction to the server through the target application, so that the server sends the interactive control instruction to at least one terminal device, where the interactive control instruction is used to instruct at least one terminal device to The target application controls the target object.
  • the terminal device can use the data processing framework to predict the player's operation.
  • the data processing framework can realize the sparse convolution processing of the data. Therefore, the data processing volume is greatly reduced, the memory consumption is effectively saved, and the The running speed can significantly improve the performance of the terminal equipment.
  • the data to be processed corresponding to the interactive frame data is obtained through the object control model.
  • Use the data processing framework to process the data to be processed to obtain interactive control instructions which can include:
  • the AI overall view instruction ie, the first interactive control instruction
  • the AI micro-operation instruction That is, the second interactive control instruction
  • FIG. 5 is a schematic diagram of an application process of the data processing framework in the embodiment of the present application.
  • the target application (For example, MOBA games)
  • the server can select a player terminal device with good performance to send an AI hosting command.
  • the target application main thread of the terminal device additionally starts a managed AI thread.
  • the main thread communication module of the target application sends interactive frame data to the AI communication module of the AI thread, and the AI communication module implements various operations on the target object through the AI interface.
  • the AI thread goes through the steps of feature extraction, logical judgment and calculation, and finally returns the operation instructions of the managed player to the main thread communication module of the target application.
  • the terminal device obtains the first to-be-processed data corresponding to the first interactive frame data through the object control model.
  • the first interactive frame data corresponds to the M frame data in the interactive frame data, M may be 15, that is, for 15 frames per second
  • M may be 15, that is, for 15 frames per second
  • the overall view is calculated every 15 frames.
  • the terminal device obtains the second to-be-processed data corresponding to the second interactive frame data through the object control model, where the second interactive frame data corresponds to the N frame data in the interactive frame data, and N may be 2, that is, for 15 frames For MOBA games per second, the calculation of micro-operations is performed every 2 frames.
  • the terminal device uses the data processing framework to process the first to-be-processed data to obtain a first interactive control instruction, which is generally used to control the movement of the target object.
  • the terminal device uses the data processing framework to process the second to-be-processed data to obtain a second interactive control instruction, which is generally used to control ordinary attacks, skills, and equipment of the target object.
  • the volume of the dynamic library generated by AI decoding is less than 200 kilobytes.
  • Running resource overhead taking the "King of Glory" offline hosting as an example, the overall operation of the Samsung S8 takes an average of 15 milliseconds, and the micro-operation takes an average of milliseconds.
  • the additional memory consumption for the operation of "King of Glory” does not exceed 10 trillion.
  • the terminal device may obtain the first data to be processed according to the M frame data in the interactive frame data, and obtain the second data to be processed according to the N frame data in the interactive frame data
  • the first interactive control instruction is obtained by processing the first data to be processed using the data processing framework
  • the second interactive control instruction is obtained by processing the second data to be processed using the data processing framework.
  • a target object provided by an embodiment of the present application, after acquiring the data to be processed corresponding to the interactive frame data through the object control model, It can also include:
  • Use the data processing framework to process the data to be processed to obtain interactive control instructions which can include:
  • the adjacent three elements are used for convolution calculation, or the adjacent five elements are used for convolution calculation to obtain the first convolution result;
  • the adjacent eight elements are used for convolution calculation to obtain the second convolution result
  • the terminal device after the terminal device obtains the data to be processed corresponding to the interactive frame data through the object control model, it will first perform feature extraction on the data to be processed to obtain operational feature information, which includes the first feature element set and the second feature An element set, where the first characteristic element set refers to an element with a characteristic value of "1", and the second characteristic element set refers to an element with a characteristic value of "0".
  • the terminal device extracts only the elements with the feature value of "1", that is, obtains the first feature element set, and generates a depth map according to the first feature element set.
  • FIG. 6 is a schematic diagram of an embodiment of the filling map in the embodiment of the present application.
  • the depth map on the left side of FIG. 6 is filled, thereby forming the right side of FIG. 6.
  • the depth map is shown in FIG. 7, and FIG. 7 is a schematic diagram of an embodiment of the depth map in the embodiment of the present application.
  • FIG. 8 is a schematic diagram of an embodiment using a depth map for convolution calculation. As shown in the figure, when calculating the boundary element (00) in the depth map, the following methods may be used:
  • the terminal device generates a target convolution result according to the first convolution result and the second convolution result, and generates an interactive control instruction according to the target convolution result.
  • the convolutional network often performs a zero-filling operation on the calculation boundary.
  • the traditional calculation method generally adopts the calculation process of padding first and then direct convolution.
  • padding takes a long time and the overall calculation time is also relatively long. Therefore, in this application, the elements after padding are no longer added to the convolution calculation.
  • convolution calculation methods include but are not limited to direct convolution, matrix multiplication and winograd.
  • the terminal device extracts the operation feature information according to the data to be processed, and then obtains the first feature element set from the operation feature information, and only generates the depth map based on the first feature element set, where the depth map includes multiple For boundary elements and multiple internal elements, for each boundary element among multiple boundary elements, use three adjacent elements for convolution calculation, or use five adjacent elements for convolution calculation to obtain the first volume Convolution result, then for each internal element in multiple internal elements, the adjacent eight elements are used to perform convolution calculation to obtain a second convolution result, and finally a target is generated according to the first convolution result and the second convolution result
  • the convolution result generates an interactive control instruction according to the target convolution result.
  • sparse convolution calculation is adopted, and only non-zero values are recorded in the convolution layer, and convolution calculation also calculates only non-zero values, thereby improving calculation efficiency and effectively saving storage consumption and calculation time.
  • a data processing framework is used to process the data to be processed before obtaining the interactive control instruction , which can also include:
  • the central processing unit (CPU) run by the terminal device is implemented based on the Advanced Reduced Instruction Set (Computer Machines, ARM) architecture, and uses the ARM Neon instruction set to run the data processing framework And process the algorithm of the data processing framework.
  • ARM Advanced Reduced Instruction Set
  • the ARM Neon instruction set includes normal instructions, wide instructions, narrow instructions, saturated instructions, and long instructions.
  • the normal instruction instructs to perform an operation on any vector type and generate a result vector of the same size and usually the same type as the operand vector.
  • Wide instructions instruct a two-word vector operand and a four-word vector operand to perform operations. This type of instruction generates a four-word vector result.
  • the generated element and the element of the first operand are two of the width of the second operand element. Times. Narrow instructions instruct to perform operations on four-word vector operands and generate double-word vector results.
  • the generated elements are generally half the width of the operand elements. Saturation instructions indicate that when the data type exceeds the specified range, it is automatically limited to that range. Long instructions instruct double-word vector operands to perform operations and generate four-word vector results.
  • the generated elements are usually twice the width of the operand elements and are of the same type.
  • NEON is an advanced single instruction multiple data (Single Instruction Multiple Data, SIMD) extension set. It is a SIMD instruction set that combines 64 bits and 128 specials. It has standardized acceleration capabilities for multimedia and signal processing programs. NEON can perform audio decoding on a 10-megahertz (Mega Hertz, MHz) CPU, and it can perform global multi-rate (Adaptive Multi-Rate, AMR) for global mobile communication systems (GSM) below 13 MHz. Speech coding. NEON has a broad set of instructions, respective register arrays, and independently executed hardware. NEON supports 8-bit, 16-bit, 32-bit, and 64-bit integer and single-precision floating-point data. In NEON technology, SIMD can support up to 16 operations simultaneously.
  • SIMD Single Instruction Multiple Data
  • the terminal device before the terminal device uses the data processing framework to process the data to be processed and obtain the interactive control instruction, it may also use the ARM NEON-based instruction set to run the data processing framework.
  • the ARM Neon instruction set can copy multiple operands and pack them in a set of instruction sets of large registers, it can be processed in parallel when processing some algorithms, thereby greatly improving the calculation efficiency of the data processing framework .
  • the fourth alternative embodiment of the method for controlling a target object uses data
  • the processing framework processes the data to be processed, which may include:
  • a data processing framework is used to process the fusion data in memory.
  • the terminal device may use the data processing framework to process the data to be processed in the register, that is, the data processing process is performed in the register, so as to obtain the data to be fused.
  • the data to be fused is performed in the memory of the terminal device, that is, the terminal device can process the fused data in the memory in the data processing framework.
  • the calculation speed of the register is fast, and the calculation speed of the memory is slower than that of the memory.
  • the memory is far from the CPU, so it takes longer to read data from the CPU.
  • the current can oscillate 3 billion times per second. Each time is approximately 0.33 nanoseconds. Light can advance 30 cm in 1 nanosecond. That is to say. Within one clock cycle of the CPU. The light can travel 10 centimeters. therefore. Assume that the memory is more than 5 cm away from the CPU. It will not finish reading data in one clock cycle. In contrast, the registers are internal to the CPU and will be faster when read.
  • the number of register bits in a terminal device is much smaller than that of memory. Therefore, high-performance, high-cost, and high-power designs can be used for registers, but it is difficult to use them in memory. This is because if it is used in memory, the cost and energy consumption of each bit will increase, resulting in the overall cost and energy consumption of the memory being too high.
  • the way the register works is very simple. Only two steps are required. The first step is to find the relevant bits in the register, and the second step is to read these bits.
  • the working method of memory is much more complicated and needs to be divided into five steps.
  • the first step is to find the pointer of the data.
  • the second step sends the pointer to the memory management unit, and the memory management unit translates the virtual memory address into an actual physical address.
  • the third step is to send the physical address to the memory controller.
  • the memory controller finds out which memory slot the address is on.
  • the fourth step is to determine which memory block the data is on. Read data from this block.
  • the fifth step is to send the data back to the memory controller, then back to the CPU, and then start using it.
  • the working process of memory is much more than that of registers. Every step creates a delay. Accumulating makes memory much slower than registers.
  • the register read speed is faster than the memory read speed.
  • the terminal device may divide the data into two parts in the process of processing the data using the data processing framework, each part is performed in a different area, and the terminal device uses the data processing framework in the register Process the data to be processed to obtain the data to be fused, and then use the data processing framework to process the data to be fused in the memory.
  • data calculation can be performed in the register of the terminal device, and the calculation result does not need to be written to the memory every time, which saves the efficiency of data processing, and the calculation efficiency of the register is higher than the calculation efficiency of the memory, Thereby improving the efficiency of data processing.
  • a data processing framework is used to process the data to be processed in the register , which can include:
  • a pooling layer and a convolutional layer are used in the register to process the data to be processed, wherein the pooling layer is used for regularization and pooling of the data to be processed, and the convolutional layer is used for activation processing and standardization of the data to be processed .
  • FIG. 9 is a schematic diagram of an embodiment of the merged network layer in the embodiment of the present application. As shown in the figure, the terminal device uses a pooling layer in the register to perform regularization processing and pooling processing on the data.
  • the function of the dropout layer is added to the pooling layer, so that the pooling layer can not only realize the pooling processing function that the pooling layer should have, but also realize the regularization processing function of the dropout layer.
  • the processed data is input to the FC layer, and the FC layer performs fusion calculation on the data in the memory.
  • FIG. 10 is a schematic diagram of another embodiment of the merged network layer in the embodiment of the present application.
  • the terminal device uses the Conv layer to activate and standardize data in the register, that is, the bathnorm layer
  • the functions of the Conv layer are added to the Conv layer, the function of the scale layer is added to the Conv layer, and the function of the ReLU layer is added to the Conv layer, so that the Conv layer can realize the convolution processing function that the Conv layer should have, and can also implement the bathnorm layer and Standard processing function of scale layer. And realize the activation processing function of the ReLU layer.
  • the processed data is input to the FC layer, and the FC layer performs fusion calculation on the data in the memory.
  • the terminal device uses a pooling layer and a convolutional layer in the register to process the data to be processed, wherein the pooling layer is used to perform regularization processing and pooling processing on the data to be processed, and the convolutional layer It is used for activation processing and standardization processing of the data to be processed.
  • the pooling layer is used to perform regularization processing and pooling processing on the data to be processed
  • the convolutional layer It is used for activation processing and standardization processing of the data to be processed.
  • the sixth alternative embodiment of the method for controlling a target object uses a data processing framework to process the data to be fused in memory , which can include:
  • a fully connected layer is used to process the data to be fused in the memory, wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected layer is used to stitch the first data to be fused and the second data to be fused, and Perform fusion processing on the first data to be fused and the second data to be fused.
  • the terminal device can directly use the FC layer to process the data to be fused in the memory.
  • the data to be fused includes at least the first data to be fused and the second data to be fused.
  • the first data to be fused is data A
  • the second The data to be fused is data B
  • the FC layer performs fusion calculation on data A and data B.
  • FIG. 11 is a schematic diagram of an embodiment of deleting the network layer in the embodiment of the present application.
  • the Conv layer undergoes convolution processing to obtain the first data to be fused, and the previous fc layer passes through After the data fusion calculation, the second data to be fused is obtained.
  • the terminal device uses the next FC layer in the memory to directly process the first data to be fused and the second data to be fused, without splicing the first through the concat layer The data to be fused and the second data to be fused.
  • the function of the concat layer is to splice two or more feature maps according to the channel or data dimension, and there is no eltwise layer (the operations of the eltwise layer are three, point multiplication, addition and subtraction, and taking large values). For example, if conv_9 and deconv_9 are spliced on the channel dimension, first of all, except that the channel dimension may be different, the other dimensions must be the same (that is, the data, the convolution input height and the convolution input width are the same). The operation is only the channel k1 of conv_9 plus the channel k2 of deconv_9.
  • the blob output by the Concat layer can be expressed as: N*(k1+k2)*H*W.
  • the stitching method is as follows:
  • Select axis 0, which means splicing in the data dimension, which can be expressed as: (k1+k2)*C*H*W.
  • the terminal device may use a fully connected layer to process the data to be fused in the memory, wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected layer is used to splice the first One data to be fused and a second data to be fused, and performing fusion processing on the first data to be fused and the second data to be fused.
  • the concat network layer can effectively reduce the amount of calculation, and also reduce the overall input and output memory required.
  • the seventh optional embodiment of the method for controlling a target object uses data
  • the processing framework processes the data to be processed, which may include:
  • double-buffering can also be used for the chained network structure to allocate the maximum input size and the maximum output size required in the entire network, and then use the two parts to achieve memory reuse.
  • FIG. 12 is a schematic diagram of an embodiment of a chained network structure in an embodiment of the present application. As shown in the figure, the chained network structure has one input and one output. It should be noted that the chain network structure in FIG. 12 is only an illustration. In practical applications, the order between the two Conv layers and the two FC layers is not limited.
  • FIG. 13 is a schematic diagram of data processing based on a chained network structure in an embodiment of the present application.
  • the data to be processed is stored in memory 1 (ie, the first memory), Conv
  • the input pointer of the layer indicates that the data A is taken from the memory 1, and the convolution processing result is obtained after the convolution process, that is, the data B is obtained, and then the output pointer of the Conv layer indicates that the data B is stored in the memory 2.
  • the input pointer of the FC layer indicates that data B is taken out from the memory 1, and the fusion result is obtained after data fusion calculation, that is, data C, and then the output pointer of the FC layer indicates that the data C is stored in the memory 1.
  • memory 1 and memory 2 belong to two different pre-allocated memories.
  • the terminal device may obtain the data to be processed from the first memory, and perform convolution processing on the data to be processed to obtain a convolution processing result, wherein the convolution processing result is stored in the second memory, and the second memory Two different memories that are pre-allocated from the first memory, and then obtain the convolution processing result from the second memory, and then perform data fusion processing on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • a double-buffer mechanism can be used to recycle the two parts of memory to achieve memory reuse, thereby improving memory utilization in the terminal device.
  • the eighth optional embodiment of the method for controlling a target object uses data
  • the processing framework processes the data to be processed, which may include:
  • FIG. 14 is a schematic diagram of an embodiment of a multi-input network structure in an embodiment of the present application. As shown in the figure, it should be noted that the multi-input network structure of FIG. 14 is only an illustration. In practical applications, Other types of network layers can also be used as child nodes, or other types of network layers can be used as parent nodes.
  • FIG. 15 is a schematic diagram of data processing based on a multi-input network structure in an embodiment of the present application.
  • the data to be processed is stored in memory (ie, target memory)
  • the Conv layer the Conv layer
  • the input pointer indicates that the data A is taken from the memory, and the convolution processing result is obtained after the convolution process, that is, the data B is obtained, and then the output pointer of the Conv layer indicates that the data B is stored in the memory.
  • the input pointer of the FC1 layer indicates that the data A is taken from the memory, and the first fusion result is obtained after data fusion processing, that is, the data C is obtained, and then the output pointer of the FC1 layer indicates that the data C is stored in the memory.
  • the input pointer of the FC2 layer indicates that the data B and the data C are taken out from the memory, and the second fusion result is obtained after data fusion processing, that is, the data D is obtained, and then the output pointer of the FC2 layer indicates that the data D is stored in the memory.
  • the terminal device may perform convolution processing on the data to be processed to obtain a convolution processing result, wherein the convolution processing result is stored in the target memory, and then the data to be processed is data fusion processed to obtain the first fusion result , Where the first fusion result is stored in the target memory, and then the convolution processing result and the first fusion result are obtained from the target memory, and finally the terminal device performs data fusion processing on the convolution processing result and the first fusion result to obtain a second fusion result.
  • memory can only be allocated to the input of the child node, saving the output of the parent node, sharing the node input, thereby realizing the memory reuse of the connection point, thereby improving the terminal equipment Memory utilization.
  • the ninth alternative embodiment of the method for controlling a target object uses data
  • the processing framework processes the data to be processed, which may include:
  • FIG. 16 is a schematic diagram of an embodiment of a multi-output network structure in an embodiment of the present application. As shown in the figure, it should be noted that the multi-output network structure of FIG. 16 is only an illustration. In practical applications, Other types of network layers can also be used as child nodes, or other types of network layers can be used as parent nodes.
  • FIG. 17 is a schematic diagram of data processing based on a multi-output network structure in an embodiment of the present application.
  • the data to be processed is stored in memory (ie, target memory), and the Conv1 layer
  • the input pointer indicates that the data A is taken from the memory, and the first convolution processing result is obtained after the convolution process, that is, the data B is obtained, and then the output pointer of the Conv1 layer indicates that the data B is stored in the memory.
  • the input pointer of the FC layer indicates that data B is taken from the memory, and data C is obtained after data fusion processing, and the output pointer of the FC1 layer indicates that the data C is stored in the memory.
  • the input pointer of the Conv2 layer indicates that data B is taken from the memory, and the second convolution processing result is obtained after the convolution calculation, that is, the data D is obtained, and the output pointer of the Conv2 layer indicates that the data D is stored in the memory.
  • the terminal device may obtain the first convolution processing result from the target memory, and then perform fusion processing on the first convolution processing result to obtain a fusion result, and/or, on the first convolution processing result Perform convolution processing to obtain the second convolution processing result.
  • the terminal device may obtain the first convolution processing result from the target memory, and then perform fusion processing on the first convolution processing result to obtain a fusion result, and/or, on the first convolution processing result Perform convolution processing to obtain the second convolution processing result.
  • the target matching template from the set of preset frame matching templates according to the operating parameters, where the set of preset frame matching templates includes at least one matching template, and each matching template includes parameters used by the data processing framework;
  • Use the data processing framework to process the data to be processed to obtain interactive control instructions which can include:
  • the data processing framework is used to process the data to be processed to obtain the interactive control instruction.
  • the terminal device can first obtain its own performance parameters, including but not limited to network delay time, memory size, supported routing protocols, device model, and modulation method.
  • an additional short period of time (such as about 1 second) is used to run different matching templates to dynamically test and generate the most suitable target matching template in the current performance state, so as to correspond to the target matching template.
  • the parameters of the data are processed by the data processing framework to obtain the interactive control instructions.
  • rules include but are not limited to the number of convolution input channels mentioned in Table 1, the length of the convolution input, the width of the convolution input, the height of the convolution input, and Computer cache size, etc.
  • the target terminal device before obtaining the interactive frame data from the target application according to the object control instruction, can also obtain the performance parameters of the terminal device, and select the target match from the preset frame matching template set according to the operating parameters Templates, wherein the preset frame matching template set includes at least one matching template, each matching template includes parameters used by the data processing framework, and then the target terminal device uses the data processing framework to process the data to be processed according to the target matching template to obtain Interactive control instructions.
  • the user can configure different matching templates in advance, and the terminal device selects the most suitable template according to its own operating conditions, and based on the template, the data processing framework is calculated to achieve the optimal performance of the data processing framework in the terminal device Configuration, in the actual running process of AI, directly load the parameters corresponding to the configuration of the template, thereby making the AI achieve the optimal performance.
  • the target object control method provided in this application is mainly deployed in terminal devices.
  • application scenarios such as MOBA games that require high real-time performance and high resource consumption, as well as other AI application scenarios running on terminal devices, the following will A set of experimental data is used as an example to illustrate the performance of using the target object control method in the above application scenario. Please refer to Table 2 for specific performance indicators.
  • FIG. 18, is a schematic diagram of an embodiment of the object control device in the embodiment of the present application.
  • the object control device 20 includes:
  • the obtaining module 201 is configured to receive an object control instruction sent by a server, and obtain interactive frame data from a target application according to the object control instruction, where the object control instruction carries an identification of the target object;
  • the obtaining module 201 is also used to obtain the data to be processed corresponding to the interactive frame data through an object control model, wherein the object control model is obtained by training using global interactive data;
  • the processing module 202 is configured to process the data to be processed acquired by the acquiring module 201 using a data processing framework to obtain an interactive control instruction, wherein the interactive control instruction carries the identification of the target object, and the data processing
  • the framework is used to implement sparse convolution processing of data
  • the sending module 203 is configured to send the interactive control instruction processed by the processing module 202 to the server through the target application, where the interactive control instruction is used to instruct at least one terminal device to The target object is controlled.
  • the object control instruction sent by the server is received, and the acquisition module 201 acquires the interactive frame data from the target application according to the object control instruction, where the object control instruction carries the target object identifier, and the acquisition module 201 Obtain the to-be-processed data corresponding to the interactive frame data through an object control model, where the object control model is obtained by training using global interactive data, and the processing module 202 uses a data processing framework to acquire the to-be-processed data obtained by the acquiring module 201 Process data for processing to obtain an interactive control instruction, where the interactive control instruction carries the identification of the target object, the data processing framework is used to implement sparse convolution processing of data, and the sending module 203 uses the target application to The server sends the interactive control instruction processed by the processing module 202, so that the server sends the interactive control instruction to at least one terminal device, where the interactive control instruction is used to instruct the at least one terminal device Control the target object in the target application.
  • An embodiment of the present application provides an object control device that receives an object control instruction sent by a server, and a terminal device can obtain interactive frame data from a target application according to the object control instruction, where the object control instruction carries the target object identifier, Then obtain the data to be processed corresponding to the interactive frame data through the object control model, and then use the data processing framework to process the processed data to obtain the interactive control instruction, in which the interactive control instruction carries the identification of the target object, and the data processing framework is used to implement the data Sparse convolution processing.
  • the terminal device sends an interactive control instruction to the server through the target application, so that the server sends the interactive control instruction to at least one terminal device, where the interactive control instruction is used to instruct the at least one terminal device to target the target object in the target application Take control.
  • the terminal device can use the data processing framework to predict the player's operation.
  • the data processing framework can realize the sparse convolution processing of the data. Therefore, the data processing volume is greatly reduced, the memory consumption is effectively saved, and the The running speed can significantly improve the performance of the terminal equipment.
  • the obtaining module 201 is specifically configured to obtain the first to-be-processed data corresponding to the first interactive frame data through the object control model, wherein the first interactive frame data corresponds to the M frame data in the interactive frame data , M is a positive integer;
  • the processing module 202 is specifically configured to process the first data to be processed by using the data processing framework to obtain a first interactive control instruction
  • the data processing framework is used to process the second data to be processed to obtain a second interactive control instruction.
  • the terminal device may obtain the first data to be processed according to the M frame data in the interactive frame data, and obtain the second data to be processed according to the N frame data in the interactive frame data
  • the first interactive control instruction is obtained by processing the first data to be processed using the data processing framework
  • the second interactive control instruction is obtained by processing the second data to be processed using the data processing framework.
  • the object control device 20 further includes an extraction module 204 ;
  • the extraction module 204 is used for the acquisition module 201 to extract the operation feature information according to the to-be-processed data after acquiring the to-be-processed data corresponding to the interactive frame data through the object control model, wherein the operation feature information includes the first A feature element set and a second feature element set, the number of elements in the first feature element set is less than the number of elements in the second feature element set;
  • the acquiring module 201 is further configured to acquire the first feature element set from the operation feature information extracted by the extracting module 204;
  • the processing module 202 is specifically configured to generate a depth map according to the first feature element set, where the depth map includes multiple boundary elements and multiple internal elements;
  • each boundary element in the plurality of boundary elements three adjacent elements are used for convolution calculation, or five adjacent elements are used for convolution calculation to obtain a first convolution result;
  • the terminal device extracts the operation feature information according to the data to be processed, and then obtains the first feature element set from the operation feature information, and only generates the depth map based on the first feature element set, where the depth map includes multiple For boundary elements and multiple internal elements, for each boundary element among multiple boundary elements, use three adjacent elements for convolution calculation, or use five adjacent elements for convolution calculation to obtain the first volume Convolution result, then for each internal element in multiple internal elements, the adjacent eight elements are used to perform convolution calculation to obtain a second convolution result, and finally a target is generated according to the first convolution result and the second convolution result
  • the convolution result generates an interactive control instruction according to the target convolution result.
  • sparse convolution calculation is adopted, and only non-zero values are recorded in the convolution layer, and convolution calculation also calculates only non-zero values, thereby improving calculation efficiency and effectively saving storage consumption and calculation time.
  • the object control device 20 further includes an operation module 205 ;
  • the operation module 205 is used by the processing module 202 to process the data to be processed by using a data processing framework, and before obtaining the interactive control instruction, an instruction set based on an advanced reduced instruction set machine ARM is used to run the data processing framework .
  • the terminal device before the terminal device uses the data processing framework to process the data to be processed and obtains the interactive control instruction, it may also use the ARM NEON instruction set to run the data processing framework.
  • the ARM Neon instruction set can copy multiple operands and pack them in a set of instruction sets of large registers, it can be processed in parallel when processing some algorithms, thereby greatly improving the calculation efficiency of the data processing framework .
  • the processing module 202 is specifically configured to process the data to be processed in a register using the data processing framework to obtain data to be fused;
  • the data processing framework is used to process the data to be fused in the memory.
  • the terminal device may divide the data into two parts in the process of processing the data using the data processing framework, each part is performed in a different area, and the terminal device uses the data processing framework in the register Process the data to be processed to obtain the data to be fused, and then use the data processing framework to process the data to be fused in the memory.
  • data calculation can be performed in the register of the terminal device, and the calculation result does not need to be written to the memory every time, which saves the efficiency of data processing, and the calculation efficiency of the register is higher than the calculation efficiency of the memory, Thereby improving the efficiency of data processing.
  • the processing module 202 is specifically configured to process the data to be processed by using a pooling layer and a convolutional layer in the register, wherein the pooling layer is used to regularize the data to be processed And pooling processing, the convolutional layer is used to perform activation processing and standardization processing on the data to be processed.
  • the terminal device uses a pooling layer and a convolutional layer in the register to process the data to be processed, wherein the pooling layer is used to perform regularization processing and pooling processing on the data to be processed, and the convolutional layer It is used for activation processing and standardization processing of the data to be processed.
  • the pooling layer is used to perform regularization processing and pooling processing on the data to be processed
  • the convolutional layer It is used for activation processing and standardization processing of the data to be processed.
  • the processing module 202 is specifically configured to process the data to be fused using a fully connected layer in the memory, wherein the data to be fused includes the first data to be fused and the second data to be fused.
  • the connection layer is used to splice the first data to be fused and the second data to be fused, and perform fusion processing on the first data to be fused and the second data to be fused.
  • the terminal device may use a fully connected layer to process the data to be fused in the memory, wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected layer is used to splice the first One data to be fused and a second data to be fused, and performing fusion processing on the first data to be fused and the second data to be fused.
  • the concat network layer can effectively reduce the amount of calculation, and also reduce the overall input and output memory required.
  • the processing module 202 is specifically configured to obtain the data to be processed from the first memory
  • Data fusion processing is performed on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • the terminal device may obtain the data to be processed from the first memory, and perform convolution processing on the data to be processed to obtain a convolution processing result, wherein the convolution processing result is stored in the second memory, and the second memory Two different memories that are pre-allocated from the first memory, and then obtain the convolution processing result from the second memory, and then perform data fusion processing on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • a double-buffer mechanism can be used to recycle the two parts of memory to achieve memory reuse, thereby improving memory utilization in the terminal device.
  • the processing module 202 is specifically configured to perform convolution processing on the data to be processed to obtain a convolution processing result, where the convolution processing result is stored in a target memory;
  • the terminal device may perform convolution processing on the data to be processed to obtain a convolution processing result, wherein the convolution processing result is stored in the target memory, and then the data to be processed is data fusion processed to obtain the first fusion result , Where the first fusion result is stored in the target memory, and then the convolution processing result and the first fusion result are obtained from the target memory, and finally the terminal device performs data fusion processing on the convolution processing result and the first fusion result to obtain a second fusion result.
  • memory can only be allocated to the input of the child node, saving the output of the parent node, sharing the node input, thereby realizing the memory reuse of the connection point, thereby improving the terminal equipment Memory utilization.
  • the processing module 202 is specifically configured to perform convolution processing on the data to be processed to obtain a convolution processing result, where the convolution processing result is stored in a target memory;
  • the terminal device may obtain the first convolution processing result from the target memory, and then perform fusion processing on the first convolution processing result to obtain a fusion result, and/or, on the first convolution processing result Perform convolution processing to obtain the second convolution processing result.
  • the terminal device may obtain the first convolution processing result from the target memory, and then perform fusion processing on the first convolution processing result to obtain a fusion result, and/or, on the first convolution processing result Perform convolution processing to obtain the second convolution processing result.
  • the object control apparatus 20 further includes a selection module 206 ;
  • the acquiring module 201 is further configured to acquire performance parameters of the terminal device before acquiring interactive frame data from the target application according to the object control instruction;
  • the selection module 206 is configured to select a target matching template from a set of preset frame matching templates according to the operating parameters acquired by the acquiring module 201, wherein the set of preset frame matching templates includes at least one matching template, each matching The template includes the parameters used by the data processing framework;
  • the processing module 202 is specifically configured to process the data to be processed according to the target matching template and use the data processing framework to obtain the interactive control instruction.
  • the target terminal device before obtaining the interactive frame data from the target application according to the object control instruction, can also obtain the performance parameters of the terminal device, and select the target match from the preset frame matching template set according to the operating parameters Templates, wherein the preset frame matching template set includes at least one matching template, each matching template includes parameters used by the data processing framework, and then the target terminal device uses the data processing framework to process the data to be processed according to the target matching template to obtain Interactive control instructions.
  • the user can configure different matching templates in advance, and the terminal device selects the most suitable template according to its own operating conditions, and based on the template, the data processing framework is calculated to achieve the optimal performance of the data processing framework in the terminal device Configuration, in the actual running process of AI, directly load the parameters corresponding to the configuration of the template, thereby making the AI achieve the optimal performance.
  • the embodiment of the present application also provides another image display control device. As shown in FIG. 22, for ease of description, only parts related to the embodiment of the present application are shown. For specific technical details not disclosed, please refer to the implementation of the present application Example method section.
  • the terminal may be any terminal device including a mobile phone, a tablet computer, a personal digital assistant (Personal Digital Assistant, PDA), a sales terminal (Point of Sales, POS), an on-board computer, etc. Taking the terminal as a mobile phone as an example:
  • the mobile phone includes: a radio frequency (Radio Frequency) circuit 310, a memory 320, an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a wireless fidelity (WiFi) module 370, and a processor 380 , And power supply 390 and other components.
  • a radio frequency (Radio Frequency) circuit 310 the radio frequency (Radio Frequency) circuit 310
  • a memory 320 includes an input unit 330, a display unit 340, a sensor 350, an audio circuit 360, a wireless fidelity (WiFi) module 370, and a processor 380 , And power supply 390 and other components.
  • WiFi wireless fidelity
  • the structure of the mobile phone shown in FIG. 22 does not constitute a limitation on the mobile phone, and may include more or less components than those illustrated, or combine certain components, or arrange different components.
  • the RF circuit 310 can be used for receiving and sending signals during receiving and sending information or during a call. In particular, after receiving the downlink information of the base station, it is processed by the processor 380; in addition, the uplink data designed to be sent to the base station.
  • the RF circuit 310 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, and the like.
  • the RF circuit 310 can also communicate with other devices through a wireless communication network.
  • the above wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile (GSM), General Packet Radio Service (GPRS), and Code Division Multiple Access (Code Division) Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), E-mail, Short Message Service (SMS), etc.
  • GSM Global System of Mobile
  • GPRS General Packet Radio Service
  • CDMA Code Division Multiple Access
  • WCDMA Wideband Code Division Multiple Access
  • LTE Long Term Evolution
  • SMS Short Message Service
  • the memory 320 may be used to store software programs and modules.
  • the processor 380 executes various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 320.
  • the memory 320 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; the storage data area may store Data created by the use of mobile phones (such as audio data, phone books, etc.), etc.
  • the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
  • the input unit 330 may be used to receive input numeric or character information, and generate key signal input related to user settings and function control of the mobile phone.
  • the input unit 330 may include a touch panel 331 and other input devices 332.
  • the touch panel 331 also known as a touch screen, can collect user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc. on or near the touch panel 331 Operation), and drive the corresponding connection device according to the preset program.
  • the touch panel 331 may include a touch detection device and a touch controller.
  • the touch detection device detects the user's touch orientation, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into contact coordinates, and then sends To the processor 380, and can receive the command sent by the processor 380 and execute it.
  • the touch panel 331 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves.
  • the input unit 330 may also include other input devices 332.
  • other input devices 332 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), trackball, mouse, joystick, and so on.
  • the display unit 340 may be used to display information input by the user or information provided to the user and various menus of the mobile phone.
  • the display unit 340 may include a display panel 341.
  • the display panel 341 may be configured in the form of a liquid crystal display (Liquid Crystal) (LCD), an organic light-emitting diode (Organic Light-Emitting Diode, OLED), or the like.
  • the touch panel 331 may cover the display panel 341, and when the touch panel 331 detects a touch operation on or near it, it is transmitted to the processor 380 to determine the type of touch event, and then the processor 380 according to the touch event The type provides corresponding visual output on the display panel 341.
  • the touch panel 331 and the display panel 341 are implemented as two independent components to realize the input and input functions of the mobile phone, in some embodiments, the touch panel 331 and the display panel 341 may be integrated and Realize the input and output functions of the mobile phone.
  • the mobile phone may further include at least one sensor 350, such as a light sensor, a motion sensor, and other sensors.
  • the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 341 according to the brightness of the ambient light, and the proximity sensor may close the display panel 341 and/or when the mobile phone moves to the ear Or backlight.
  • the accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes), and can detect the magnitude and direction of gravity when at rest, and can be used to identify mobile phone gesture applications (such as horizontal and vertical screen switching, related Games, magnetometer posture calibration), vibration recognition related functions (such as pedometers, percussion), etc.
  • other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., are no longer here Repeat.
  • the audio circuit 360, the speaker 361, and the microphone 362 can provide an audio interface between the user and the mobile phone.
  • the audio circuit 360 can transmit the converted electrical signal of the received audio data to the speaker 361, which converts the speaker 361 into a sound signal for output; on the other hand, the microphone 362 converts the collected sound signal into an electrical signal, which is converted by the audio circuit 360 After receiving, it is converted into audio data, and then processed by the audio data output processor 380, and then sent to, for example, another mobile phone through the RF circuit 310, or the audio data is output to the memory 320 for further processing.
  • WiFi is a short-distance wireless transmission technology.
  • the mobile phone can help users send and receive e-mails, browse web pages, and access streaming media. It provides users with wireless broadband Internet access.
  • FIG. 22 shows the WiFi module 370, it can be understood that it is not a necessary component of a mobile phone, and can be omitted as needed without changing the scope of the essence of the invention.
  • the processor 380 is the control center of the mobile phone, connects various parts of the entire mobile phone with various interfaces and lines, executes or executes the software programs and/or modules stored in the memory 320, and calls the data stored in the memory 320 to execute Various functions and processing data of the mobile phone, so as to monitor the mobile phone as a whole.
  • the processor 380 may include one or more processing units; optionally, the processor 380 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs Wait, the modem processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 380.
  • the mobile phone also includes a power supply 390 (such as a battery) that supplies power to various components.
  • a power supply 390 (such as a battery) that supplies power to various components.
  • the power supply can be logically connected to the processor 380 through a power management system, thereby implementing functions such as charging, discharging, and power management through the power management system.
  • the mobile phone may also include a camera, a Bluetooth module, etc., which will not be repeated here.
  • the processor 380 included in the terminal also has the following functions:
  • the processor 380 is specifically configured to perform the following steps:
  • the data processing framework is used to process the second data to be processed to obtain a second interactive control instruction.
  • the processor 380 is further configured to perform the following steps:
  • the processor 380 is specifically used to perform the following steps:
  • each boundary element in the plurality of boundary elements three adjacent elements are used for convolution calculation, or five adjacent elements are used for convolution calculation to obtain a first convolution result;
  • the processor 380 is further configured to perform the following steps:
  • the instruction set based on the advanced reduced instruction set machine ARM is used to run the data processing framework.
  • the processor 380 is specifically configured to perform the following steps:
  • the data processing framework is used to process the data to be fused in the memory.
  • the processor 380 is specifically configured to perform the following steps:
  • the processor 380 is specifically configured to perform the following steps:
  • Adopting a fully connected layer to process the data to be fused in the memory wherein the data to be fused includes the first data to be fused and the second data to be fused, and the fully connected layer is used to stitch the first The data to be fused and the second data to be fused, and performing fusion processing on the first data to be fused and the second data to be fused.
  • the processor 380 is specifically configured to perform the following steps:
  • Data fusion processing is performed on the convolution processing result to obtain a fusion result, where the fusion result is stored in the first memory.
  • the processor 380 is specifically configured to perform the following steps:
  • the processor 380 is specifically configured to perform the following steps:
  • the processor 380 is further configured to perform the following steps:
  • a target matching template from a set of preset frame matching templates according to the operating parameters, wherein the set of preset frame matching templates includes at least one matching template, and each matching template includes parameters used by the data processing framework;
  • the processing of the data to be processed by using a data processing framework to obtain an interactive control instruction includes:
  • the data processing framework is used to process the data to be processed to obtain the interactive control instruction.
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only schematic.
  • the division of the units is only a division of logical functions.
  • there may be other divisions for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • 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 may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application essentially or part of the contribution to the existing technology or all or part of the technical solution can be embodied in the form of a software product, the computer software product is stored in a storage medium , Including several instructions to enable a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in the embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM), random access memory (random access memory, RAM), magnetic disk or optical disk and other media that can store program codes .

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • General Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Biophysics (AREA)
  • Data Mining & Analysis (AREA)
  • General Health & Medical Sciences (AREA)
  • Molecular Biology (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Evolutionary Computation (AREA)
  • Computational Linguistics (AREA)
  • Biomedical Technology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Advance Control (AREA)
  • Stored Programmes (AREA)

Abstract

本申请实施例公开了一种目标对象的控制方法,包括:接收服务器发送的对象控制指令,根据对象控制指令从目标应用中获取交互帧数据;通过对象控制模型获取交互帧数据所对应待处理数据;采用数据处理框架对待处理数据进行处理,得到交互控制指令,数据处理框架用于实现数据的稀疏卷积处理;通过目标应用向服务器发送交互控制指令,其中,交互控制指令用于指示至少一个终端设备在目标应用对目标对象进行控制。本申请实施例中还公开了一种对象控制装置以及终端设备。本申请实施例利用数据处理框架来预测玩家操作,节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。

Description

目标对象的控制方法、装置、设备及存储介质
本申请要求于2018年11月28日提交的申请号为201811448777.9、发明名称为“一种目标对象的控制方法以及相关装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能领域,尤其涉及一种目标对象的控制方法、装置、设备及存储介质。
背景技术
网络游戏产业是一个新兴的朝阳产业,经过近几年的快速发展,现在网络游戏产业快速走向成熟期的阶段。其中,多人在线战斗竞技场(multiplayer online battle arena,MOBA)类游戏是网络游戏的重要组成部分。
由于MOBA类游戏往往涉及到多名玩家的交互操作,因此,当同一局游戏中有玩家处于掉线或者其他异常情形时,该玩家所在队伍可能会因为人数偏少而失利。在这种情况下,服务器采用类似caffe或者TensorFlow等通用框架训练得到人工智能(Artificial Intelligence,AI)模型,然后终端设备在通用框架下结合AI模型以及整局游戏数据预测玩家的操作。
然而,类似caffe或者TensorFlow等通用框架属于高阶的机器学习框架,采用这类通用框架进行玩家操作的预测,通常需要占用较多的内存。由于终端设备的计算能力较弱,存储资源较少,因此,将这类通用框架部署在终端设备中运行,会导致终端设备的性能大幅降低。
发明内容
本申请实施例提供了一种目标对象的控制方法、装置、设备及存储介质,终端设备可以利用数据处理框架来预测玩家操作,该数据处理框架可以实现数据的稀疏卷积处理,因此,大幅地减少了数据处理量,有效地节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。
有鉴于此,本申请第一方面提供了一种目标对象的控制方法,应用于终端设备,包括:
接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的;
采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
通过所述目标应用向所述服务器发送所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
本申请第二方面提供了一种对象控制装置,包括:
获取模块,用于若接收到服务器发送的对象控制指令,则根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
所述获取模块,还用于通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的;
处理模块,用于采用数据处理框架对所述获取模块获取的所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
发送模块,用于通过所述目标应用向所述服务器发送所述处理模块处理得到的所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
在一种可能的设计中,在本申请实施例的第二方面的第一种实现方式中,
所述获取模块,具体用于通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
所述处理模块,具体用于采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
在一种可能的设计中,在本申请实施例的第二方面的第二种实现方式中,所述对象控制装置还包括提取模块;
所述提取模块,用于所述获取模块通过对象控制模型获取所述交互帧数据所对应待处理数据之后,根据所述待处理数据提取操作特征信息,其中,所述操作特征信息包含第一特征元素集合以及第二特征元素集合,所述第一特征元素集合中的元素个数小于所述第二特征元素集合中的元素个数;
所述获取模块,还用于从所述提取模块提取的所述操作特征信息中获取所述第一特征元素集合;
所述处理模块,具体用于根据所述第一特征元素集合生成深度图,其中,所述深度图包括多个边界元素以及多个内部元素;
针对所述多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
针对所述多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
根据所述第一卷积结果以及所述第二卷积结果生成目标卷积结果;
根据所述目标卷积结果生成所述交互控制指令。
在一种可能的设计中,在本申请实施例的第二方面的第三种实现方式中,所述对象控制装置还包括运行模块;
所述运行模块,用于所述处理模块采用数据处理框架对所述待处理数据进行处理,得到交互控制指令之前,采用基于进阶精简指令集机ARM的指令集运行所述数据处理框架。
在一种可能的设计中,在本申请实施例的第二方面的第四种实现方式中,
所述处理模块,具体用于采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据;
采用所述数据处理框架在内存中对所述待融合数据进行处理。
在一种可能的设计中,在本申请实施例的第二方面的第五种实现方式中,
所述处理模块,具体用于在所述寄存器中采用池化层以及卷积层对所述待处理数据进行处理,其中,所述池化层用于对所述待处理数据进行正则化处理以及池化处理,所述卷积层用于对所述待处理数据进行激活处理以及标准化处理。
在一种可能的设计中,在本申请实施例的第二方面的第六种实现方式中,
所述处理模块,具体用于在所述内存中采用全连接层对所述待融合数据进行处理,其中,所述待融合数据包括第一待融合数据以及第二待融合数据,所述全连接层用于拼接所述第一待融合数据以及所述第二待融合数据,并对所述第一待融合数据以及所述第二待融合数据进行融合处理。
在一种可能的设计中,在本申请实施例的第二方面的第七种实现方式中,
所述处理模块,具体用于从第一内存中获取所述待处理数据;
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于第二内存,所述第二内存与所述第一内存属于预先分配的两个不同内存;
从所述第二内存中获取所述卷积处理结果;
对所述卷积处理结果进行数据融合处理,得到融合结果,其中,所述融合结果存储于所述第一内存。
在一种可能的设计中,在本申请实施例的第二方面的第八种实现方式中,
所述处理模块,具体用于对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
对所述待处理数据进行数据融合处理,得到第一融合结果,其中,所述第一融合结果存储于所述目标内存;
从所述目标内存中获取所述卷积处理结果以及所述第一融合结果;
对所述卷积处理结果以及所述第一融合结果进行数据融合处理,得到第二融合结果。
在一种可能的设计中,在本申请实施例的第二方面的第九种实现方式中,
所述处理模块,具体用于对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
从所述目标内存中获取第一卷积处理结果;
对所述第一卷积处理结果进行融合处理,得到融合结果,和/或,对所述第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
在一种可能的设计中,在本申请实施例的第二方面的第十种实现方式中,所述对象控制装置20还包括选择模块;
所述获取模块,还用于根据所述对象控制指令从目标应用中获取交互帧数据之前,获取终端设备的性能参数;
所述选择模块,用于根据所述获取模块获取的所述运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括所述数据处理框架所使用的参数;
所述处理模块,具体用于根据所述目标匹配模板,采用所述数据处理框架对所述待处理 数据进行处理,得到所述交互控制指令。
本申请第三方面提供了一种终端设备,包括:存储器、收发器、处理器以及总线系统;
其中,所述存储器用于存储程序;
所述处理器用于执行所述存储器中的程序,包括如下步骤:
接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的;
采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
通过所述目标应用向所述服务器发送所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制;
所述总线系统用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
在一种可能的设计中,在本申请实施例的第三方面的第一种实现方式中,处理器具体用于执行如下步骤:
通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
在一种可能的设计中,在本申请实施例的第三方面的第二种实现方式中,处理器还用于执行如下步骤:
根据所述待处理数据提取操作特征信息,其中,所述操作特征信息包含第一特征元素集合以及第二特征元素集合,所述第一特征元素集合中的元素个数小于所述第二特征元素集合中的元素个数;
从所述操作特征信息中获取所述第一特征元素集合;
处理器具体用于执行如下步骤:
根据所述第一特征元素集合生成深度图,其中,所述深度图包括多个边界元素以及多个内部元素;
针对所述多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
针对所述多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
根据所述第一卷积结果以及所述第二卷积结果生成目标卷积结果;
根据所述目标卷积结果生成所述交互控制指令。
在一种可能的设计中,在本申请实施例的第三方面的第三种实现方式中,处理器还用于执行如下步骤:
采用基于进阶精简指令集机ARM的指令集运行所述数据处理框架。
在一种可能的设计中,在本申请实施例的第三方面的第四种实现方式中,处理器具体用于执行如下步骤:
采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据;
采用所述数据处理框架在内存中对所述待融合数据进行处理。
在一种可能的设计中,在本申请实施例的第三方面的第五种实现方式中,处理器具体用于执行如下步骤:
在所述寄存器中采用池化层以及卷积层对所述待处理数据进行处理,其中,所述池化层用于对所述待处理数据进行正则化处理以及池化处理,所述卷积层用于对所述待处理数据进行激活处理以及标准化处理。
在一种可能的设计中,在本申请实施例的第三方面的第六种实现方式中,处理器具体用于执行如下步骤:
在所述内存中采用全连接层对所述待融合数据进行处理,其中,所述待融合数据包括第一待融合数据以及第二待融合数据,所述全连接层用于拼接所述第一待融合数据以及所述第二待融合数据,并对所述第一待融合数据以及所述第二待融合数据进行融合处理。
在一种可能的设计中,在本申请实施例的第三方面的第七种实现方式中,处理器具体用于执行如下步骤:
从第一内存中获取所述待处理数据;
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于第二内存,所述第二内存与所述第一内存属于预先分配的两个不同内存;
从所述第二内存中获取所述卷积处理结果;
对所述卷积处理结果进行数据融合处理,得到融合结果,其中,所述融合结果存储于所述第一内存。
在一种可能的设计中,在本申请实施例的第三方面的第八种实现方式中,处理器具体用于执行如下步骤:
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
对所述待处理数据进行数据融合处理,得到第一融合结果,其中,所述第一融合结果存储于所述目标内存;
从所述目标内存中获取所述卷积处理结果以及所述第一融合结果;
对所述卷积处理结果以及所述第一融合结果进行数据融合处理,得到第二融合结果。
在一种可能的设计中,在本申请实施例的第三方面的第九种实现方式中,处理器具体用于执行如下步骤:
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
从所述目标内存中获取第一卷积处理结果;
对所述第一卷积处理结果进行融合处理,得到融合结果,和/或,对所述第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
在一种可能的设计中,在本申请实施例的第三方面的第十种实现方式中,处理器还用于执行如下步骤:
获取终端设备的性能参数;
根据所述运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括所述数据处理框架所使用的参数;
所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,包括:
根据所述目标匹配模板,采用所述数据处理框架对所述待处理数据进行处理,得到所述交互控制指令。
本申请的第四方面提供了一种计算机可读存储介质,所述计算机可读存储介质中存储有程序,当其在处理器上运行时,使得处理器执行上述各方面所述的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:本申请实施例中,提供了一种目标对象的控制方法,若接收到服务器发送的对象控制指令,则终端设备可以根据对象控制指令从目标应用中获取交互帧数据,其中,对象控制指令中携带目标对象的标识,再通过对象控制模型获取交互帧数据所对应待处理数据,然后采用数据处理框架对待处理数据进行处理,得到交互控制指令,其中,交互控制指令携带目标对象的标识,数据处理框架用于实现数据的稀疏卷积处理,最后,终端设备通过目标应用向服务器发送交互控制指令,以使服务器向至少一个终端设备发送交互控制指令,其中,交互控制指令用于指示至少一个终端设备在目标应用对目标对象进行控制。通过上述方式,终端设备可以利用数据处理框架来预测玩家操作,该数据处理框架可以实现数据的稀疏卷积处理,因此,大幅地减少了数据处理量,有效地节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。
附图说明
图1为本申请实施例中目标对象控制系统的一个架构示意图;
图2为本申请实施例中目标对象控制系统工作流程的一个示意图;
图3为本申请实施例中数据处理框架的一个结构示意图;
图4为本申请实施例中目标对象的控制方法一个实施例示意图;
图5为本申请实施例中数据处理框架的一个应用流程示意图;
图6为本申请实施例中填充图的一个实施例示意图;
图7为本申请实施例中深度图的一个实施例示意图;
图8为本申请实施例中利用深度图进行卷积计算的一个实施例示意图;
图9为本申请实施例中合并网络层的一个实施例示意图;
图10为本申请实施例中合并网络层的另一个实施例示意图;
图11为本申请实施例中删除网络层的一个实施例示意图;
图12为本申请实施例中链式网络结构的一个实施例示意图;
图13为本申请实施例中基于链式网络结构的一个数据处理示意图;
图14为本申请实施例中多输入网络结构的一个实施例示意图;
图15为本申请实施例中基于多输入网络结构的一个数据处理示意图;
图16为本申请实施例中多输出网络结构的一个实施例示意图;
图17为本申请实施例中基于多输出网络结构的一个数据处理示意图;
图18为本申请实施例中对象控制装置的一个实施例示意图;
图19为本申请实施例中对象控制装置的另一个实施例示意图;
图20为本申请实施例中对象控制装置的另一个实施例示意图;
图21为本申请实施例中对象控制装置的另一个实施例示意图;
图22为本申请实施例中终端设备的一个结构示意图。
具体实施方式
本申请实施例提供了一种目标对象的控制方法以及相关装置,终端设备可以利用数据处理框架来预测玩家操作,该数据处理框架可以实现数据的稀疏卷积处理,因此,大幅地减少了数据处理量,有效地节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的本申请的实施例例如能够以除了在这里图示或描述的那些以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
人工智能是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法、技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。
人工智能技术是一门综合学科,涉及领域广泛,既有硬件层面的技术也有软件层面的技术。人工智能基础技术一般包括如传感器、专用人工智能芯片、云计算、分布式存储、大数据处理技术、操作/交互系统、机电一体化等技术。人工智能软件技术主要包括计算机视觉技术、语音处理技术、自然语言处理技术以及机器学习/深度学习等几大方向。
机器学习(Machine Learning,ML)是一门多领域交叉学科,涉及概率论、统计学、逼近论、凸分析、算法复杂度理论等多门学科。专门研究计算机怎样模拟或实现人类的学习行为,以获取新的知识或技能,重新组织已有的知识结构使之不断改善自身的性能。机器学习是人工智能的核心,是使计算机具有智能的根本途径,其应用遍及人工智能的各个领域。机器学习和深度学习通常包括人工神经网络、置信网络、强化学习、迁移学习、归纳学习、式教学习等技术。
随着人工智能技术研究和进步,人工智能技术在多个领域展开研究和应用,例如常见的智能家居、智能穿戴设备、虚拟助理、智能音箱、智能营销、无人驾驶、自动驾驶、无人机、机器人、智能医疗、智能客服等,相信随着技术的发展,人工智能技术将在更多的领域得到应用,并发挥越来越重要的价值。
本申请实施例提供的方案涉及人工智能的机器学习等技术,具体通过如下实施例进行说明。
应理解,本申请提供的目标对象控制方法可以应用于MOBA游戏,MOBA游戏是指多人玩家同时在线的对抗类游戏,比如英雄联盟、王者荣耀以及绝地逃生等都属于MOBA游戏。在终端设备进行MOBA游戏对战过程中经常会出现玩家掉线或者挂机情况,为了不影响其他用户体验,需要采用人工智能(Artificial Intelligence,AI)技术对掉线的玩家进行暂时托管。为了便于理解,请参阅图1,图1为本申请实施例中目标对象控制系统的一个架构示意图, 如图所示,以MOBA游戏为例,假设有两支队伍进行对战,分为队伍A和队伍B,队伍A拥有五位玩家,同样地,队伍B也拥有五位玩家,每位玩家使用一个终端设备,即队伍A对应于终端设备1、终端设备2、终端设备3、终端设备4和终端设备5,队伍B对应于终端设备6、终端设备7、终端设备8、终端设备9和终端设备10。当MOBA游戏中出现玩家掉线或者挂机时,服务器可以选择一个或者多个性能较好的终端设备,由该终端设备在线预测掉线玩家的操作。假设终端设备1掉线,服务器首先选择性能最佳的终端设备6,然后由终端设备6来预测终端设备1中的玩家操作,在预测后将操作指令反馈给MOBA游戏,通过MOBA游戏上传至服务器,最后,服务器将模拟得到的操作指令反馈给各个终端设备,从而使得这些终端设备的MOBA游戏中均能模拟该掉线玩家的操作。
请参阅图2,图2为本申请实施例中目标对象控制系统工作流程的一个示意图,如图所示,MOBA游戏会将游戏录像数据上传至服务器,由服务器采用caffe或者TensorFlow等机器学习框架对AI模型进行训练,其中,该AI模型通常是离线训练得到的。在预测玩家操作时,本申请设计和开发了一套适合MOBA游戏运行的预测框架。该预测框架有代码体积小,运行速度快,存储消耗低的优势。MOBA游戏向预测框架发送游戏的帧数据,由预测框架根据帧数据以及AI模型生成操作指令,再向MOBA游戏反馈操作指令。
基于上述提到的预测框架即为本申请提供的数据处理框架,数据处理框架在设计上精简清晰,只使用终端设备MOBA游戏所对应的AI模型中包含的必要层次。对于网络描述采用图结构,图中包含各网络层。请参阅图3,图3为本申请实施例中数据处理框架的一个结构示意图,图层包含有输入节点和输出节点,网络层基类采用邻接表的形式描述网络有向图,其子类表示各个网络层,网络层具体可以包括卷积(convolution,Conv)层、全连接(full connection,FC)层、池化(pooling)层、批标准化(batch normalization,BN)层、测量(scale)层、局部响应归一化(local response normalization,LRN)层、拼接(concat)层、切片(slice)层、元素操作(element-wiseeltwise,Eltwise)层以及激活(activiation)层。其中,特定网络层(如Conv层和activiation层)子类则是该网络层的不同计算方式选择,比如Conv层具有通用矩阵乘法(GEneral Matrix to Matrix Multiplication,GEMM)、Winograd算法、稀疏(sparse)算法、直接(direct)算法、组队(group)算法以及深度(depthwise)算法等。activiation层具有激活函数(rectified linear and leaky,ReLU)算法、归一化(softmax)算法以及双曲正切(tanh)函数。
下面将结合上述框架介绍,对本申请中目标对象的控制方法进行介绍,该方法各步骤的执行主体可以是终端设备,如手机、平板电脑、PC(Personal Computer,个人计算机)、游戏主机等电子设备。请参阅图4,本申请实施例中目标对象的控制方法一个实施例包括:
101、接收服务器发送的对象控制指令,根据对象控制指令从目标应用中获取交互帧数据,其中,对象控制指令中携带目标对象的标识;
本实施例中,当目标应用监控到玩家控制的目标对象静止不动,或者在一段时间内无法接收及发送网络消息时,由目标应用服务器选择当局游戏中性能较好的终端设备,并启动该终端设备的AI线程来模拟掉线玩家控制目标对象。被选中的目标终端设备会接收到目标应用服务器发送的对象控制指令,对象控制指令中携带目标对象的标识,从而根据该对象控制指令可以确定需要模拟的对象,于是,目标终端设备从目标应用中获取交互帧数据。对交互帧数据进行特征提取,从而得到操作数据。
需要说明的是,目标应用具体可以为MOBA游戏,也就是MOBA游戏线程向AI线程发送交 互帧数据,交互帧数据为MOBA游戏中的若干帧游戏数据。AI线程采用交互帧数据进行AI计算,并将计算结果返回给MOBA游戏线程,MOBA游戏线程在重新检测到玩家网络恢复或者玩家有手动操作的指令上传时,即可终止AI托管流程。
102、通过对象控制模型获取交互帧数据所对应待处理数据,其中,对象控制模型为采用全局交互数据训练得到的;
本实施例中,终端设备中运行的AI线程可以通过对象控制模型获取交互帧数据所对应待处理数据,该对象控制模型为采用全局交互数据训练得到的。具体地,MOBA游戏将大量的游戏录像数据用于对象控制模型的训练,训练所采用的框架包含但不仅限于caffe以及TensorFlow。将交互帧数据所对应的操作数据输入至对象控制模型之后,由对象控制模型对交互帧数据进行计算,从而得到相应的待处理数据,待处理数据用于表示模拟目标对象进行移动或者攻击等操作的数据。
103、采用数据处理框架对待处理数据进行处理,得到交互控制指令,其中,交互控制指令携带目标对象的标识,数据处理框架用于实现数据的稀疏卷积处理;
本实施例中,终端设备中运行的AI线程采用数据处理框架对待处理数据进行处理,从而生成交互控制指令。在生成交互控制指令的过程中,终端设备采用轻量级数据处理框架,轻量级的数据处理框架可以对数据进行稀疏卷积的处理,通常使用ReLU函数作为激活函数会导致输出很稀疏,从而也使得后续的卷积输入变得稀疏,然后数据处理框架不计算完整的矩阵乘法,而是只计算非0值的输出。
104、通过目标应用向服务器发送交互控制指令,以使服务器向至少一个终端设备发送交互控制指令,其中,交互控制指令用于指示至少一个终端设备在目标应用对目标对象进行控制。
本实施例中,终端设备在生成交互控制指令之后,会向目标应用服务器发送交互控制指令,该目标应用服务器向当局游戏中的其他终端设备发送交互控制指令,使得这些终端设备在接收到交互控制指令之后,也能在目标应用中模拟掉线玩家所控制的目标对象。
本申请实施例中,提供了一种目标对象的控制方法,若接收到服务器发送的对象控制指令,则终端设备可以根据对象控制指令从目标应用中获取交互帧数据,其中,对象控制指令中携带目标对象的标识,再通过对象控制模型获取交互帧数据所对应待处理数据,然后采用数据处理框架对待处理数据进行处理,得到交互控制指令,其中,交互控制指令携带目标对象的标识,数据处理框架用于实现数据的稀疏卷积处理,最后,终端设备通过目标应用向服务器发送交互控制指令,以使服务器向至少一个终端设备发送交互控制指令,其中,交互控制指令用于指示至少一个终端设备在目标应用对目标对象进行控制。通过上述方式,终端设备可以利用数据处理框架来预测玩家操作,该数据处理框架可以实现数据的稀疏卷积处理,因此,大幅地减少了数据处理量,有效地节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。
可选地,在上述图4对应的实施例的基础上,本申请实施例提供目标对象的控制方法第一个可选实施例中,通过对象控制模型获取交互帧数据所对应待处理数据,可以包括:
通过对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,第一交互帧数据对应于交互帧数据中的M帧数据,M为正整数;
通过对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,第二交互帧数据对应于交互帧数据中的N帧数据,N为正整数,且N小于M;
采用数据处理框架对待处理数据进行处理,得到交互控制指令,可以包括:
采用数据处理框架对第一待处理数据进行处理,得到第一交互控制指令;
采用数据处理框架对第二待处理数据进行处理,得到第二交互控制指令。
本实施例中,基于目标应用(如MOBA游戏)会根据玩家的操作生成两种类型的指令,一种是AI大局观指令(即第一交互控制指令),另一种是AI微操指令(即第二交互控制指令)。这是因为在MOBA游戏类应用程序中,玩家所控制的对象需要知道在整个地图中的位置,比如守塔、清兵线、打野、抓人以及支援等,因此,AI大局观指令就是控制目标对象移动位置的指令。此外,通过AI微操指令可以控制目标对象的具体操作,比如,走位以及技能释放等。
为了便于理解,请参阅图5,图5为本申请实施例中数据处理框架的一个应用流程示意图,如图所示,当玩家掉线2分钟左右或者2分钟原地不动时,目标应用(如MOBA游戏)服务器可以选择性能好的玩家终端设备发送AI托管命令,为不影响目标应用主线程自身业务计算,该终端设备的目标应用主线程额外启动一个托管AI线程。目标应用的主线程通信模块向AI线程的AI通信模块发送交互帧数据,由AI通信模块通过AI接口实现对目标对象的各种操作。AI线程经过特征提取、逻辑判断和计算等步骤,最终给目标应用的主线程通信模块返回被托管玩家的操作指令。
终端设备通过对象控制模型获取第一交互帧数据所对应第一待处理数据,第一交互帧数据对应于交互帧数据中的M帧数据,M可以为15,也就是说,对于15帧每秒的MOBA游戏而言,每间隔15帧进行一次大局观的计算。终端设备通过对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,第二交互帧数据对应于交互帧数据中的N帧数据,N可以为2,也就是说,对于15帧每秒的MOBA游戏而言,每间隔2帧进行一次微操的计算。
终端设备采用数据处理框架对第一待处理数据进行处理,得到第一交互控制指令,该第一交互控制指令通常用于控制目标对象的移动。终端设备采用数据处理框架对第二待处理数据进行处理,得到第二交互控制指令,该第二交互控制指令通常用于控制目标对象的普通攻击、技能以及装备等。
从运行效果上看,AI解码生成的动态库体积不足200千字节。运行资源开销,以对“王者荣耀”掉线托管为例,在三星S8上大局观运行平均耗时15毫秒,微操平均耗时毫秒,给“王者荣耀”运行带来的额外内存消耗不超过10兆。
其次,本申请实施例中,基于MOBA游戏类应用程序,终端设备可以根据交互帧数据中的M帧数据获取第一待处理数据,并且根据交互帧数据中的N帧数据获取第二待处理数据,由此,采用数据处理框架对第一待处理数据进行处理得到第一交互控制指令,并且采用数据处理框架对第二待处理数据进行处理,得到第二交互控制指令。通过上述方式,利用不同帧的数据可以生成用于控制大局观的指令,以及用于控制微操作的指令,适用于MOBA游戏类的应用程序,从而提升方案的可操作性和可行性。
可选地,在上述图4对应的实施例的基础上,本申请实施例提供目标对象的控制方法第二个可选实施例中,通过对象控制模型获取交互帧数据所对应待处理数据之后,还可以包括:
根据待处理数据提取操作特征信息,其中,操作特征信息包含第一特征元素集合以及第二特征元素集合,第一特征元素集合中的元素个数小于第二特征元素集合中的元素个数;
从操作特征信息中获取第一特征元素集合;
采用数据处理框架对待处理数据进行处理,得到交互控制指令,可以包括:
根据第一特征元素集合生成深度图,其中,深度图包括多个边界元素以及多个内部元素;
针对多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
针对多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
根据第一卷积结果以及第二卷积结果生成目标卷积结果;
根据目标卷积结果生成交互控制指令。
本实施例中,终端设备通过对象控制模型获取交互帧数据所对应待处理数据之后,首先会对待处理数据进行特征提取,得到操作特征信息,这些操作特征信息包括第一特征元素集合以及第二特征元素集合,其中,第一特征元素集合是指特征值为“1”的元素,第二特征元素集合是指特征值为“0”的元素。在实际应用中,特征值为“1”的元素数量远远少于特征值为“0”的元素数量。因此,终端设备只提取特征值为“1”的元素,即获取第一特征元素集合,根据第一特征元素集合生成深度图。
为了便于理解,请参阅图6,图6为本申请实施例中填充图的一个实施例示意图,如图所示,对图6左侧的深度图进行填充(padding),从而形成图6右侧的padding图,深度图具体如图7所示,图7为本申请实施例中深度图的一个实施例示意图,由此可见,a00、a01、a02、a03、a10、a 11、a 12、a13、a20、a 21、a 22、a23、a30、a31、a32和a33,其中,深度图包括边界元素以及内部元素,其中,边界元素为a00、a01、a02、a03、a10、a13、a20、a23、a30、a31、a32和a33,而内部元素为a 11、a 12、a 21和a 22。假设卷积核k,卷积核k包括元素k00、k01、k02、k10、k11、k12、k20、k21和k22。请参阅图8,图8为本申请实施例中利用深度图进行卷积计算的一个实施例示意图,如图所示,在对深度图中边界元素(00)进行计算时,可以采用如下方式:
Q=k11a00+k12a01+k21a10+k22a11;
其中,由于k00、k01、k02、k10和k20对应的值为0,因此不需要采用这些值进行计算。因此,对于边界元素中的四个顶点元素,采用相邻的三个元素(即共四个元素)进行卷积计算,得到第一卷积结果Q。
在对深度图中边界元素(01)进行计算时,可以采用如下方式:
Q=k10a00+k11a01+k12a10+k20a10+k21a11+k22a12;
其中,由于k00、k01和k02对应的值为0,因此不需要采用这些值进行计算。因此,对于边界元素中的非顶点边界元素,采用相邻的五个元素(即共六个元素)进行卷积计算,得到第一卷积结果Q。
在对深度图中内部元素(11)进行计算时,可以采用如下方式:
Q=k00 a00+k01 a01+k02 a02+k10 a10+k11 a11+k12 a12+k20 a20+k21 a21+k22 a22;
其中,对于边界元素中的内部元素,采用相邻的八个元素(即共九个元素)进行卷积计算,得到第一卷积结果Q。
最后,终端设备根据第一卷积结果以及第二卷积结果生成目标卷积结果,并且根据目标卷积结果生成交互控制指令。
可以理解的是,卷积网络经常会对计算边界做补0操作,传统的计算方式,一般是采用先进行padding,然后进行直接卷积的计算过程。但是考虑到基于MOBA游戏的AI模型普遍比较小,所以padding占用的时间比较长,整体计算的时间也比较长。因此,在本申请中,卷积计算不再加入padding后的元素。而且卷积计算方式包括但不仅限于直接卷积,矩阵乘 法和winograd。
其次,本申请实施例中,终端设备根据待处理数据提取操作特征信息,然后从操作特征信息中获取第一特征元素集合,只根据第一特征元素集合生成深度图,其中,深度图包括多个边界元素以及多个内部元素,针对多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果,然后针对多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果,最后根据第一卷积结果以及第二卷积结果生成目标卷积结果,根据目标卷积结果生成交互控制指令。通过上述方式,采用了稀疏卷积计算,在卷积层只记录非0值,卷积计算同样只计算非0值,从而提升计算效率,有效地节约存储消耗和计算时间。
可选地,在上述图4对应的实施例的基础上,本申请实施例提供目标对象的控制方法第三个可选实施例中,采用数据处理框架对待处理数据进行处理,得到交互控制指令之前,还可以包括:
采用基于进阶精简指令集机ARM的指令集运行数据处理框架。
本实施例中,终端设备运行的中央处理器(Central Processing Unit,CPU)是基于进阶精简指令集机(Advanced Reduced Instruction Set Computer Machines,ARM)架构实现的,使用ARM Neon指令集运行数据处理框架,并对该数据处理框架的算法进行处理。
ARM Neon指令集包括正常指令、宽指令、窄指令、饱和指令以及长指令等。正常指令指示对任意向量类型执行运算,并生成大小相同且类型通常与操作数向量相同的结果向量。宽指令指示一个双字向量操作数和一个四字向量操作数执行运算,此类指令生成四字向量结果,所生成的元素和第一个操作数的元素是第二个操作数元素宽度的两倍。窄指令指示对四字向量操作数执行运算,并生成双字向量结果,所生成的元素一般是操作数元素宽度的一半。饱和指令指示当超过数据类型指定到范围则自动限制在该范围内。长指令指示双字向量操作数执行运算,并生成四字向量结果。所生成的元素通常是操作数元素宽度的两倍,并属于同一类型。
NEON是进阶单指令多数据流(Single Instruction Multiple Data,SIMD)延伸集,它是一个结合64比特和128特和的SIMD指令集,其针对多媒体和讯号处理程式具备标准化加速的能力。NEON可以在10兆赫(Mega Hertz,MHz)的CPU上执行音效解码,且可以执行13MHz频率以下的全球移动通信系统(global system for mobile communication,GSM)自适应多速率(Adaptive Multi-Rate,AMR)语音编码。NEON具有一组广泛的指令集、各自的寄存器阵列,以及独立执行的硬件。NEON支援8比特、16比特、32比特和64比特的整数及单精度浮点数据,在NEON技术中,SIMD最高可同时支援到16个运算。
其次,本申请实施例中,终端设备在采用数据处理框架对待处理数据进行处理,得到交互控制指令之前,还可以采用基于ARM NEON的指令集运行数据处理框架。通过上述方式,由于ARM Neon指令集能够复制多个操作数,并把它们打包在大型寄存器的一组指令集中,因此在处理一些算法的时候,可以并行处理,从而大大提高数据处理框架的计算效率。
可选地,在上述图4以及图4对应的第一至第三个实施例中任一项的基础上,本申请实施例提供目标对象的控制方法第四个可选实施例中,采用数据处理框架对待处理数据进行处理,可以包括:
采用数据处理框架在寄存器中对待处理数据进行处理,得到待融合数据;
采用数据处理框架在内存中对待融合数据进行处理。
本实施例中,终端设备可以采用数据处理框架在寄存器中对待处理数据进行处理,也就是数据处理的过程在寄存器中进行,从而得到待融合数据。而待融合数据在终端设备的内存中进行,也就是终端设备可以数据处理框架在内存中对待融合数据进行处理。
在计算机的存储层次之中,寄存器的计算速度快,内存的计算速度慢于存器的计算速度。简单的说,内存距离CPU比较远,所以需要消耗更长的时间从CPU中读取数据。以3千兆赫兹的CPU为例,电流每秒钟能够振荡30亿次。每次耗时大约为0.33纳秒。光在1纳秒的时间内,能够前进30厘米。也就是说。在CPU的一个时钟周期内。光能够前进10厘米。因此。假设内存距离CPU超过5厘米。就不会在一个时钟周期内完毕数据的读取。相比之下,寄存器在CPU内部,读取的时候会快一点。
通常情况下,终端设备中的寄存器比特位数远远小于内存的比特位数,因此,高性能、高成本以及高耗电的设计能够用在寄存器上,但是难以用在内存上。这是因为如果用在内存上,那么每个比特位的成本和能耗就会增加,从而导致内存整体成本和能耗过高。
寄存器的工作方式非常简单。仅需要两个步骤,第一步找到寄存器内相关的比特位,第二步是读取这些比特位。内存的工作方式复杂很多,需要分为五个步骤,第一步找到数据的指针。第二步将指针送往内存管理单元,由内存管理单元将虚拟的内存地址翻译成实际的物理地址。第三步是将物理地址送往内存控制器。由内存控制器找出该地址在哪一根内存插槽上。第四步是确定数据在哪一个内存块上。从该块读取数据。第五步是将数据先送回内存控制器,再送回CPU,然后开始使用。内存的工作流程比寄存器多出很多步。每一步都会产生延迟。累积起来就使得内存比寄存器慢得多。
基于上述因素,使得寄存器的读取速度比内存读取速度更快。
再次,本申请实施例中,终端设备在采用数据处理框架对数据进行处理的过程中,可以将数据分成两个部分,每个部分在不同的区域中进行,终端设备采用数据处理框架在寄存器中对待处理数据进行处理,得到待融合数据,然后采用数据处理框架在内存中对待融合数据进行处理。通过上述方式,在终端设备的寄存器中就可以进行数据计算,不需要每次都将计算结果写入到内存,也就节省了数据处理的效率,而寄存器的计算效率高于内存的计算效率,从而提升了数据处理的效率。
可选地,在上述图4对应的第四个实施例的基础上,本申请实施例提供目标对象的控制方法第五个可选实施例中,采用数据处理框架在寄存器中对待处理数据进行处理,可以包括:
在寄存器中采用池化层以及卷积层对待处理数据进行处理,其中,池化层用于对待处理数据进行正则化处理以及池化处理,卷积层用于对待处理数据进行激活处理以及标准化处理。
本实施例中,考虑到有些网络层可以在原地计算,原地计算也就是说不需要依赖于来回搬运其他网络层的数据就可以计算。可在原地计算的网络层包含但不限于ReLU层、BN层、scale层以及偏置(bias)层。为了便于理解,请参阅图9,图9为本申请实施例中合并网络层的一个实施例示意图,如图所示,终端设备在寄存器中采用pooling层对数据进行正则化处理以及池化处理,也就是将退出(dropout)层的功能加入至pooling层,使得pooling层除了可以实现pooling层本该有的池化处理功能,还可以实现dropout层的正则化处理功能。对待处理数据经过处理后,将处理后的数据输入至FC层,FC层在内存中对数据进行融合计算。
请参阅图10,图10为本申请实施例中合并网络层的另一个实施例示意图,如图所示,终端设备在寄存器中采用Conv层对数据进行激活处理以及标准化处理,也就是将bathnorm 层的功能加入至Conv层,将scale层的功能加入至Conv层,将ReLU层的功能加入至Conv层,使得Conv层除了可以实现Conv层本该有的卷积处理功能,还可以实现bathnorm层和scale层的标准化处理功能。以及实现ReLU层的激活处理功能。对待处理数据经过处理后,将处理后的数据输入至FC层,FC层在内存中对数据进行融合计算。
进一步地,本申请实施例中,终端设备在寄存器中采用池化层以及卷积层对待处理数据进行处理,其中,池化层用于对待处理数据进行正则化处理以及池化处理,卷积层用于对待处理数据进行激活处理以及标准化处理。通过上述方式,将一些不需要改变数据的网络层直接合并到上一个网络层,并且消减这些合并后的网络层,不仅有效地降低计算量,同时也减少了整体所需要的输入输出内存。
可选地,在上述图4对应的第四个实施例的基础上,本申请实施例提供目标对象的控制方法第六个可选实施例中,采用数据处理框架在内存中对待融合数据进行处理,可以包括:
在内存中采用全连接层对待融合数据进行处理,其中,待融合数据包括第一待融合数据以及第二待融合数据,全连接层用于拼接第一待融合数据以及第二待融合数据,并对第一待融合数据以及第二待融合数据进行融合处理。
本实施例中,终端设备在内存中可以直接采用FC层对待融合数据进行处理,待融合数据至少包括第一待融合数据以及第二待融合数据,假设第一待融合数据为数据A,第二待融合数据为数据B,FC层对数据A和数据B进行融合计算。为了便于理解,请参阅图11,图11为本申请实施例中删除网络层的一个实施例示意图,如图所示,Conv层经过卷积处理后得到第一待融合数据,上一个fc层经过数据融合计算后得到第二待融合数据,最后,终端设备在内存中采用下一个FC层对直接对第一待融合数据和第二待融合数据进行数据处理,无需再通过concat层来拼接第一待融合数据和第二待融合数据。
concat层的作用就是将两个及以上的特征图按照在通道或数据维度上进行拼接,并没有eltwise层(eltwise层的操作有三个,点乘、相加减和取大值)的运算操作,举个例子,如果说是在通道维度上进行拼接conv_9和deconv_9的话,首先除了通道维度可以不一样,其余维度必须一致(也就是数据、卷积输入高度和卷积输入宽度一致),这时候所做的操作仅仅是conv_9的通道k1加上deconv_9的通道k2,Concat层输出的blob可表示为:N*(k1+k2)*H*W。通常情况下,考虑到concat层是希望将同大小的特征图拼接起来,拼接的方式如下:
选择axis=0,表示在数据维度上进行拼接,可表示为:(k1+k2)*C*H*W。
选择axis=1,表示在通道维度上进行拼接,可表示为:N*(k1+k2)*H*W。
进一步地,本申请实施例中,终端设备可以在内存中采用全连接层对待融合数据进行处理,其中,待融合数据包括第一待融合数据以及第二待融合数据,全连接层用于拼接第一待融合数据以及第二待融合数据,并对第一待融合数据以及第二待融合数据进行融合处理。通过上述方式,消减concat网络层可以有效地降低计算量,同时也减少了整体所需要的输入输出内存。
可选地,在上述图4以及图4对应的第一至第三个实施例中任一项的基础上,本申请实施例提供目标对象的控制方法第七个可选实施例中,采用数据处理框架对待处理数据进行处理,可以包括:
从第一内存中获取待处理数据;
对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于第二内存,第二内存与第一内存属于预先分配的两个不同内存;
从第二内存中获取卷积处理结果;
对卷积处理结果进行数据融合处理,得到融合结果,其中,融合结果存储于第一内存。
本实施例中,对于链式网络结构还可以采用双缓冲,分配整个网络中需要的最大输入大小和最大输出大小,然后循环使用这两部分实现内存复用。请参阅图12,图12为本申请实施例中链式网络结构的一个实施例示意图,如图所示,链式网络结构具有一个输入和一个输出。需要说明的是,图12的链式网络结构仅为一个示意,在实际应用中,两个Conv层和两个FC层之间的排序不做限定。
为了便于介绍,请参阅图13,图13为本申请实施例中基于链式网络结构的一个数据处理示意图,如图所示,假设待处理数据存储在内存1(即第一内存)中,Conv层的输入(input)指针指示从内存1中取出数据A,经过卷积处理后得到卷积处理结果,即得到数据B,然后Conv层的输出(output)指针指示将数据B存入内存2中。FC层的input指针指示从内存1中取出数据B,经过数据融合计算后得到融合结果,即数据C,然后FC层的output指针指示将数据C存入内存1中。
其中,内存1和内存2属于预先分配的两个不同内存。
再次,本申请实施例中,终端设备可以从第一内存中获取待处理数据,对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于第二内存,第二内存与第一内存属于预先分配的两个不同内存,然后从第二内存中获取卷积处理结果,再对卷积处理结果进行数据融合处理,得到融合结果,其中,融合结果存储于第一内存。通过上述方式,对于链式网络结构而言可以采用双缓存机制,循环使用这两部分内存,从而实现内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图4以及图4对应的第一至第三个实施例中任一项的基础上,本申请实施例提供目标对象的控制方法第八个可选实施例中,采用数据处理框架对待处理数据进行处理,可以包括:
对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于目标内存;
对待处理数据进行数据融合处理,得到第一融合结果,其中,第一融合结果存储于目标内存;
从目标内存中获取卷积处理结果以及第一融合结果;
对卷积处理结果以及第一融合结果进行数据融合处理,得到第二融合结果。
本实施例中,对于多输入网络结构还可以只给子节点的input分配内存,子节点的output指针指向父节点,从而实现连接点的内存复用。请参阅图14,图14为本申请实施例中多输入网络结构的一个实施例示意图,如图所示,需要说明的是,图14的多输入网络结构仅为一个示意,在实际应用中,还可以是其他类型的网络层作为子节点,也可以是其他类型的网络层作为父节点。
为了便于介绍,请参阅图15,图15为本申请实施例中基于多输入网络结构的一个数据处理示意图,如图所示,假设待处理数据存储在内存(即目标内存)中,Conv层的input指针指示从内存中取出数据A,经过卷积处理后得到卷积处理结果,即得到数据B,然后Conv层的output指针指示将数据B存入内存中。FC1层的input指针指示从内存中取出数据A,经过数据融合处理后得到第一融合结果,即得到数据C,然后FC1层的output指针指示将数据C存入内存中。FC2层的input指针指示从内存中取出数据B和数据C,经过数据融合处理后得到第二融合结果,即得到数据D,然后FC2层的output指针指示将数据D存入内存中。
再次,本申请实施例中,终端设备可以对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于目标内存,然后对待处理数据进行数据融合处理,得到第一融合结果,其中,第一融合结果存储于目标内存,再从目标内存中获取卷积处理结果以及第一融合结果,最后终端设备对卷积处理结果以及第一融合结果进行数据融合处理,得到第二融合结果。通过上述方式,对于多输入网络结构而言可以只给子节点的输入分配内存,节省了父节点的输出,对节点输入进行共享,从而实现连接点的内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图4以及图4对应的第一至第三个实施例中任一项的基础上,本申请实施例提供目标对象的控制方法第九个可选实施例中,采用数据处理框架对待处理数据进行处理,可以包括:
对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于目标内存;
从目标内存中获取第一卷积处理结果;
对第一卷积处理结果进行融合处理,得到融合结果,和/或,对第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
本实施例中,对于多输出网络结构还可以只给父节点的output分配内存,子节点的input指针指向父节点,从而实现连接点的内存复用。请参阅图16,图16为本申请实施例中多输出网络结构的一个实施例示意图,如图所示,需要说明的是,图16的多输出网络结构仅为一个示意,在实际应用中,还可以是其他类型的网络层作为子节点,也可以是其他类型的网络层作为父节点。
为了便于介绍,请参阅图17,图17为本申请实施例中基于多输出网络结构的一个数据处理示意图,如图所示,假设待处理数据存储在内存(即目标内存)中,Conv1层的input指针指示从内存中取出数据A,经过卷积处理后得到第一卷积处理结果,即得到数据B,然后Conv1层的output指针指示将数据B存入内存中。
FC层的input指针指示从内存中取出数据B,经过数据融合处理后得到数据C,FC1层的output指针指示将数据C存入内存中。或者,Conv2层的input指针指示从内存中取出数据B,经过卷积计算后得到第二卷积处理结果,即得到数据D,Conv2层的output指针指示将数据D存入内存中。
再次,本申请实施例中,终端设备可以从目标内存中获取第一卷积处理结果,然后对第一卷积处理结果进行融合处理,得到融合结果,和/或,对第一卷积处理结果进行卷积处理,得到第二卷积处理结果。通过上述方式,对于多输出网络结构而言可以只给父节点的输出分配内存,节省了子节点的输入,对节点输出进行共享,从而实现连接点的内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图4对应的实施例的基础上,本申请实施例提供目标对象的控制方法第十个可选实施例中,根据对象控制指令从目标应用中获取交互帧数据之前,还可以包括:
获取终端设备的性能参数;
根据运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括数据处理框架所使用的参数;
采用数据处理框架对待处理数据进行处理,得到交互控制指令,可以包括:
根据目标匹配模板,采用数据处理框架对待处理数据进行处理,得到交互控制指令。
本实施例中,在实际应用中,终端设备还可以先获取自身的性能参数,性能参数包含但 不仅限于网络延迟时间、内存大小、支持的路由协议、设备型号以及调制方式等。在终端设备更新目标应用的过程中,额外使用一小段时间(比如1秒钟左右)运行不同的匹配模板,动态测试和生成当前性能状态下最适合的目标匹配模板,从而根据目标匹配模板所对应的参数,采用数据处理框架对待处理数据进行处理,得到交互控制指令。
对于匹配模板而言,不同的匹配模板对应于不同的规则,这些规则难以适用于所有场景和终端设备,因此,根据不同的场景类型和终端设备的性能参数灵活地设置规则,可以更好地提升框架运行效率。请参阅表1,表1为不同匹配模板下的规则。
表1
Figure PCTCN2019120741-appb-000001
如表1所示,不同的匹配模板往往对应于不同的规则,这些规则包含但不仅限于表1所提到的卷积输入通道数、卷积输入长度、卷积输入宽度、卷积输入高度以及计算机缓存大小等。
其次,本申请实施例中,目标终端设备在根据对象控制指令从目标应用中获取交互帧数据之前,还可以获取终端设备的性能参数,并且根据运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括数据处理框架所使用的参数,然后目标终端设备根据目标匹配模板,采用数据处理框架对待处理数据进行处理,得到交互控制指令。通过上述方式,用户可以提前配置不同的匹配模板,终端设备根据自身的运行情况选择最合适的模板,基于该模板来实现数据处理框架的计算,从而达到数据处理框架在该终端设备的最优化性能配置,在AI真实运行过程中则直接加载该模板所对应配置的参数,由此使得AI达到最优性能。
本申请所提供的目标对象控制方法主要部署于终端设备,考虑到如MOBA游戏这类对运行实时性要求高且资源消耗大的应用场景,以及其他运行于终端设备的AI应用场景,下面将以一组实验数据为例,说明在上述应用场景中采用该目标对象控制方法的性能情况。请参阅表2,表2为具体的性能指标。
表2
设备 AI大局观平均耗时 AI微操耗平均时 AI占用内存
三星S8 15毫秒 5毫秒 10兆
以三星S8手机在MOBA游戏“王者荣耀”掉线托管的应用场景为例,从测试评判角度分析得到,大局观运行平均耗时为15毫秒,微操平均耗时5毫秒,AI给MOBA游戏带来的额外内存消耗不超过10兆,游戏的帧率、卡顿和耗电量均无明显变化,AI性能符合预期。
下面对本申请中的对象控制装置进行详细描述,请参阅图18,图18为本申请实施例中对象控制装置一个实施例示意图,对象控制装置20包括:
获取模块201,用于接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
所述获取模块201,还用于通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的;
处理模块202,用于采用数据处理框架对所述获取模块201获取的所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
发送模块203,用于通过所述目标应用向所述服务器发送所述处理模块202处理得到的所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
本实施例中,接收服务器发送的对象控制指令,获取模块201根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识,所述获取模块201通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的,处理模块202采用数据处理框架对所述获取模块201获取的所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理,发送模块203通过所述目标应用向所述服务器发送所述处理模块202处理得到的所述交互控制指令,以使所述服务器向至少一个终端设备发送所述交互控制指令,其中,所述交互控制指令用于指示所述至少一个终端设备在所述目标应用对所述目标对象进行控制。
本申请实施例中,提供了一种对象控制装置,接收服务器发送的对象控制指令,终端设备可以根据对象控制指令从目标应用中获取交互帧数据,其中,对象控制指令中携带目标对象的标识,再通过对象控制模型获取交互帧数据所对应待处理数据,然后采用数据处理框架对待处理数据进行处理,得到交互控制指令,其中,交互控制指令携带目标对象的标识,数据处理框架用于实现数据的稀疏卷积处理,最后,终端设备通过目标应用向服务器发送交互控制指令,以使服务器向至少一个终端设备发送交互控制指令,其中,交互控制指令用于指示至少一个终端设备在目标应用对目标对象进行控制。通过上述方式,终端设备可以利用数据处理框架来预测玩家操作,该数据处理框架可以实现数据的稀疏卷积处理,因此,大幅地减少了数据处理量,有效地节省了内存的消耗,同时提升了运行速度,从而可以显著地提升终端设备的性能。
可选地,在上述图18所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述获取模块201,具体用于通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交 互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
所述处理模块202,具体用于采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
其次,本申请实施例中,基于MOBA游戏类应用程序,终端设备可以根据交互帧数据中的M帧数据获取第一待处理数据,并且根据交互帧数据中的N帧数据获取第二待处理数据,由此,采用数据处理框架对第一待处理数据进行处理得到第一交互控制指令,并且采用数据处理框架对第二待处理数据进行处理,得到第二交互控制指令。通过上述方式,利用不同帧的数据可以生成用于控制大局观的指令,以及用于控制微操作的指令,适用于MOBA游戏类的应用程序,从而提升方案的可操作性和可行性。
可选地,在上述图18所对应的实施例的基础上,请参阅图19,本申请实施例提供的对象控制装置20的另一实施例中,所述对象控制装置20还包括提取模块204;
所述提取模块204,用于所述获取模块201通过对象控制模型获取所述交互帧数据所对应待处理数据之后,根据所述待处理数据提取操作特征信息,其中,所述操作特征信息包含第一特征元素集合以及第二特征元素集合,所述第一特征元素集合中的元素个数小于所述第二特征元素集合中的元素个数;
所述获取模块201,还用于从所述提取模块204提取的所述操作特征信息中获取所述第一特征元素集合;
所述处理模块202,具体用于根据所述第一特征元素集合生成深度图,其中,所述深度图包括多个边界元素以及多个内部元素;
针对所述多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
针对所述多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
根据所述第一卷积结果以及所述第二卷积结果生成目标卷积结果;
根据所述目标卷积结果生成所述交互控制指令。
其次,本申请实施例中,终端设备根据待处理数据提取操作特征信息,然后从操作特征信息中获取第一特征元素集合,只根据第一特征元素集合生成深度图,其中,深度图包括多个边界元素以及多个内部元素,针对多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果,然后针对多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果,最后根据第一卷积结果以及第二卷积结果生成目标卷积结果,根据目标卷积结果生成交互控制指令。通过上述方式,采用了稀疏卷积计算,在卷积层只记录非0值,卷积计算同样只计算非0值,从而提升计算效率,有效地节约存储消耗和计算时间。
可选地,在上述图18所对应的实施例的基础上,请参阅图20,本申请实施例提供的对象控制装置20的另一实施例中,所述对象控制装置20还包括运行模块205;
所述运行模块205,用于所述处理模块202采用数据处理框架对所述待处理数据进行处理,得到交互控制指令之前,采用基于进阶精简指令集机ARM的指令集运行所述数据处理框架。
其次,本申请实施例中,终端设备在采用数据处理框架对待处理数据进行处理,得到交 互控制指令之前,还可以采用基于ARM NEON的指令集运行数据处理框架。通过上述方式,由于ARM Neon指令集能够复制多个操作数,并把它们打包在大型寄存器的一组指令集中,因此在处理一些算法的时候,可以并行处理,从而大大提高数据处理框架的计算效率。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据;
采用所述数据处理框架在内存中对所述待融合数据进行处理。
再次,本申请实施例中,终端设备在采用数据处理框架对数据进行处理的过程中,可以将数据分成两个部分,每个部分在不同的区域中进行,终端设备采用数据处理框架在寄存器中对待处理数据进行处理,得到待融合数据,然后采用数据处理框架在内存中对待融合数据进行处理。通过上述方式,在终端设备的寄存器中就可以进行数据计算,不需要每次都将计算结果写入到内存,也就节省了数据处理的效率,而寄存器的计算效率高于内存的计算效率,从而提升了数据处理的效率。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于在所述寄存器中采用池化层以及卷积层对所述待处理数据进行处理,其中,所述池化层用于对所述待处理数据进行正则化处理以及池化处理,所述卷积层用于对所述待处理数据进行激活处理以及标准化处理。
进一步地,本申请实施例中,终端设备在寄存器中采用池化层以及卷积层对待处理数据进行处理,其中,池化层用于对待处理数据进行正则化处理以及池化处理,卷积层用于对待处理数据进行激活处理以及标准化处理。通过上述方式,将一些不需要改变数据的网络层直接合并到上一个网络层,并且消减这些合并后的网络层,不仅有效地降低计算量,同时也减少了整体所需要的输入输出内存。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于在所述内存中采用全连接层对所述待融合数据进行处理,其中,所述待融合数据包括第一待融合数据以及第二待融合数据,所述全连接层用于拼接所述第一待融合数据以及所述第二待融合数据,并对所述第一待融合数据以及所述第二待融合数据进行融合处理。
进一步地,本申请实施例中,终端设备可以在内存中采用全连接层对待融合数据进行处理,其中,待融合数据包括第一待融合数据以及第二待融合数据,全连接层用于拼接第一待融合数据以及第二待融合数据,并对第一待融合数据以及第二待融合数据进行融合处理。通过上述方式,消减concat网络层可以有效地降低计算量,同时也减少了整体所需要的输入输出内存。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于从第一内存中获取所述待处理数据;
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于第二内存,所述第二内存与所述第一内存属于预先分配的两个不同内存;
从所述第二内存中获取所述卷积处理结果;
对所述卷积处理结果进行数据融合处理,得到融合结果,其中,所述融合结果存储于所述第一内存。
再次,本申请实施例中,终端设备可以从第一内存中获取待处理数据,对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于第二内存,第二内存与第一内存属于预先分配的两个不同内存,然后从第二内存中获取卷积处理结果,再对卷积处理结果进行数据融合处理,得到融合结果,其中,融合结果存储于第一内存。通过上述方式,对于链式网络结构而言可以采用双缓存机制,循环使用这两部分内存,从而实现内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
对所述待处理数据进行数据融合处理,得到第一融合结果,其中,所述第一融合结果存储于所述目标内存;
从所述目标内存中获取所述卷积处理结果以及所述第一融合结果;
对所述卷积处理结果以及所述第一融合结果进行数据融合处理,得到第二融合结果。
再次,本申请实施例中,终端设备可以对待处理数据进行卷积处理,得到卷积处理结果,其中,卷积处理结果存储于目标内存,然后对待处理数据进行数据融合处理,得到第一融合结果,其中,第一融合结果存储于目标内存,再从目标内存中获取卷积处理结果以及第一融合结果,最后终端设备对卷积处理结果以及第一融合结果进行数据融合处理,得到第二融合结果。通过上述方式,对于多输入网络结构而言可以只给子节点的输入分配内存,节省了父节点的输出,对节点输入进行共享,从而实现连接点的内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图18、图19或图20所对应的实施例的基础上,本申请实施例提供的对象控制装置20的另一实施例中,
所述处理模块202,具体用于对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
从所述目标内存中获取第一卷积处理结果;
对所述第一卷积处理结果进行融合处理,得到融合结果,和/或,对所述第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
再次,本申请实施例中,终端设备可以从目标内存中获取第一卷积处理结果,然后对第一卷积处理结果进行融合处理,得到融合结果,和/或,对第一卷积处理结果进行卷积处理,得到第二卷积处理结果。通过上述方式,对于多输出网络结构而言可以只给父节点的输出分配内存,节省了子节点的输入,对节点输出进行共享,从而实现连接点的内存复用,由此提升终端设备中的内存利用率。
可选地,在上述图18所对应的实施例的基础上,请参阅图21,本申请实施例提供的对象控制装置20的另一实施例中,所述对象控制装置20还包括选择模块206;
所述获取模块201,还用于根据所述对象控制指令从目标应用中获取交互帧数据之前,获取终端设备的性能参数;
所述选择模块206,用于根据所述获取模块201获取的所述运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括所述数据处理框架所使用的参数;
所述处理模块202,具体用于根据所述目标匹配模板,采用所述数据处理框架对所述待处理数据进行处理,得到所述交互控制指令。
其次,本申请实施例中,目标终端设备在根据对象控制指令从目标应用中获取交互帧数据之前,还可以获取终端设备的性能参数,并且根据运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括数据处理框架所使用的参数,然后目标终端设备根据目标匹配模板,采用数据处理框架对待处理数据进行处理,得到交互控制指令。通过上述方式,用户可以提前配置不同的匹配模板,终端设备根据自身的运行情况选择最合适的模板,基于该模板来实现数据处理框架的计算,从而达到数据处理框架在该终端设备的最优化性能配置,在AI真实运行过程中则直接加载该模板所对应配置的参数,由此使得AI达到最优性能。
本申请实施例还提供了另一种图像显示控制装置,如图22所示,为了便于说明,仅示出了与本申请实施例相关的部分,具体技术细节未揭示的,请参照本申请实施例方法部分。该终端可以为包括手机、平板电脑、个人数字助理(Personal Digital Assistant,PDA)、销售终端(Point of Sales,POS)、车载电脑等任意终端设备,以终端为手机为例:
图22示出的是与本申请实施例提供的终端相关的手机的部分结构的框图。参考图22,手机包括:射频(Radio Frequency,RF)电路310、存储器320、输入单元330、显示单元340、传感器350、音频电路360、无线保真(wireless fidelity,WiFi)模块370、处理器380、以及电源390等部件。本领域技术人员可以理解,图22中示出的手机结构并不构成对手机的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。
下面结合图22对手机的各个构成部件进行具体的介绍:
RF电路310可用于收发信息或通话过程中,信号的接收和发送,特别地,将基站的下行信息接收后,给处理器380处理;另外,将设计上行的数据发送给基站。通常,RF电路310包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器(Low Noise Amplifier,LNA)、双工器等。此外,RF电路310还可以通过无线通信与网络和其他设备通信。上述无线通信可以使用任一通信标准或协议,包括但不限于全球移动通讯系统(Global System of Mobile communication,GSM)、通用分组无线服务(General Packet Radio Service,GPRS)、码分多址(Code Division Multiple Access,CDMA)、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)、长期演进(Long Term Evolution,LTE)、电子邮件、短消息服务(Short Messaging Service,SMS)等。
存储器320可用于存储软件程序以及模块,处理器380通过运行存储在存储器320的软件程序以及模块,从而执行手机的各种功能应用以及数据处理。存储器320可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器320可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
输入单元330可用于接收输入的数字或字符信息,以及产生与手机的用户设置以及功能控制有关的键信号输入。具体地,输入单元330可包括触控面板331以及其他输入设备332。 触控面板331,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板331上或在触控面板331附近的操作),并根据预先设定的程式驱动相应的连接装置。可选的,触控面板331可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器380,并能接收处理器380发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板331。除了触控面板331,输入单元330还可以包括其他输入设备332。具体地,其他输入设备332可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。
显示单元340可用于显示由用户输入的信息或提供给用户的信息以及手机的各种菜单。显示单元340可包括显示面板341,可选的,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板341。进一步的,触控面板331可覆盖显示面板341,当触控面板331检测到在其上或附近的触摸操作后,传送给处理器380以确定触摸事件的类型,随后处理器380根据触摸事件的类型在显示面板341上提供相应的视觉输出。虽然在图22中,触控面板331与显示面板341是作为两个独立的部件来实现手机的输入和输入功能,但是在某些实施例中,可以将触控面板331与显示面板341集成而实现手机的输入和输出功能。
手机还可包括至少一种传感器350,比如光传感器、运动传感器以及其他传感器。具体地,光传感器可包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板341的亮度,接近传感器可在手机移动到耳边时,关闭显示面板341和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别手机姿态的应用(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;至于手机还可配置的陀螺仪、气压计、湿度计、温度计、红外线传感器等其他传感器,在此不再赘述。
音频电路360、扬声器361,传声器362可提供用户与手机之间的音频接口。音频电路360可将接收到的音频数据转换后的电信号,传输到扬声器361,由扬声器361转换为声音信号输出;另一方面,传声器362将收集的声音信号转换为电信号,由音频电路360接收后转换为音频数据,再将音频数据输出处理器380处理后,经RF电路310以发送给比如另一手机,或者将音频数据输出至存储器320以便进一步处理。
WiFi属于短距离无线传输技术,手机通过WiFi模块370可以帮助用户收发电子邮件、浏览网页和访问流式媒体等,它为用户提供了无线的宽带互联网访问。虽然图22示出了WiFi模块370,但是可以理解的是,其并不属于手机的必须构成,完全可以根据需要在不改变发明的本质的范围内而省略。
处理器380是手机的控制中心,利用各种接口和线路连接整个手机的各个部分,通过运行或执行存储在存储器320内的软件程序和/或模块,以及调用存储在存储器320内的数据,执行手机的各种功能和处理数据,从而对手机进行整体监控。可选的,处理器380可包括一个或多个处理单元;可选的,处理器380可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器380中。
手机还包括给各个部件供电的电源390(比如电池),可选的,电源可以通过电源管理系 统与处理器380逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。
尽管未示出,手机还可以包括摄像头、蓝牙模块等,在此不再赘述。
在本申请实施例中,该终端所包括的处理器380还具有以下功能:
若接收到服务器发送的对象控制指令,则根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
通过对象控制模型获取所述交互帧数据所对应待处理数据,其中,所述对象控制模型为采用全局交互数据训练得到的;
采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
通过所述目标应用向所述服务器发送所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
可选地,在本申请实施例中,处理器380还用于执行如下步骤:
根据所述待处理数据提取操作特征信息,其中,所述操作特征信息包含第一特征元素集合以及第二特征元素集合,所述第一特征元素集合中的元素个数小于所述第二特征元素集合中的元素个数;
从所述操作特征信息中获取所述第一特征元素集合;
处理器380具体用于执行如下步骤:
根据所述第一特征元素集合生成深度图,其中,所述深度图包括多个边界元素以及多个内部元素;
针对所述多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
针对所述多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
根据所述第一卷积结果以及所述第二卷积结果生成目标卷积结果;
根据所述目标卷积结果生成所述交互控制指令。
可选地,在本申请实施例中,处理器380还用于执行如下步骤:
采用基于进阶精简指令集机ARM的指令集运行所述数据处理框架。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据;
采用所述数据处理框架在内存中对所述待融合数据进行处理。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
在所述寄存器中采用池化层以及卷积层对所述待处理数据进行处理,其中,所述池化层 用于对所述待处理数据进行正则化处理以及池化处理,所述卷积层用于对所述待处理数据进行激活处理以及标准化处理。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
在所述内存中采用全连接层对所述待融合数据进行处理,其中,所述待融合数据包括第一待融合数据以及第二待融合数据,所述全连接层用于拼接所述第一待融合数据以及所述第二待融合数据,并对所述第一待融合数据以及所述第二待融合数据进行融合处理。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
从第一内存中获取所述待处理数据;
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于第二内存,所述第二内存与所述第一内存属于预先分配的两个不同内存;
从所述第二内存中获取所述卷积处理结果;
对所述卷积处理结果进行数据融合处理,得到融合结果,其中,所述融合结果存储于所述第一内存。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
对所述待处理数据进行数据融合处理,得到第一融合结果,其中,所述第一融合结果存储于所述目标内存;
从所述目标内存中获取所述卷积处理结果以及所述第一融合结果;
对所述卷积处理结果以及所述第一融合结果进行数据融合处理,得到第二融合结果。
可选地,在本申请实施例中,处理器380具体用于执行如下步骤:
从目标内存中获取第一卷积处理结果;
对所述第一卷积处理结果进行融合处理,得到融合结果,和/或,对所述第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
可选地,在本申请实施例中,处理器380还用于执行如下步骤:
获取终端设备的性能参数;
根据所述运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配模板集合包括至少一个匹配模板,每个匹配模板中包括所述数据处理框架所使用的参数;
所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,包括:
根据所述目标匹配模板,采用所述数据处理框架对所述待处理数据进行处理,得到所述交互控制指令。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部 件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (15)

  1. 一种目标对象的控制方法,应用于终端设备,包括:
    接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
    通过对象控制模型获取所述交互帧数据所对应待处理数据;
    采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
    通过所述目标应用向所述服务器发送所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
  2. 根据权利要求1所述的方法,其中,所述通过对象控制模型获取所述交互帧数据所对应待处理数据,包括:
    通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
    通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
    所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,包括:
    采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
    采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
  3. 根据权利要求1所述的方法,其中,所述通过对象控制模型获取所述交互帧数据所对应待处理数据之后,所述方法还包括:
    根据所述待处理数据提取操作特征信息,其中,所述操作特征信息包含第一特征元素集合以及第二特征元素集合,所述第一特征元素集合中的元素个数小于所述第二特征元素集合中的元素个数;
    从所述操作特征信息中获取所述第一特征元素集合;
    所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,包括:
    根据所述第一特征元素集合生成深度图,其中,所述深度图包括多个边界元素以及多个内部元素;
    针对所述多个边界元素中的每个边界元素,采用相邻的三个元素进行卷积计算,或,采用相邻的五个元素进行卷积计算,得到第一卷积结果;
    针对所述多个内部元素中的每个内部元素,采用相邻的八个元素进行卷积计算,得到第二卷积结果;
    根据所述第一卷积结果以及所述第二卷积结果生成目标卷积结果;
    根据所述目标卷积结果生成所述交互控制指令。
  4. 根据权利要求1所述的方法,其中,所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令之前,所述方法还包括:
    采用基于进阶精简指令集机ARM的指令集运行所述数据处理框架。
  5. 根据权利要求1至4中任一项所述的方法,其中,所述采用数据处理框架对所述待处理数据进行处理,包括:
    采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据;
    采用所述数据处理框架在内存中对所述待融合数据进行处理。
  6. 根据权利要求5所述的方法,其中,所述采用所述数据处理框架在寄存器中对所述待处理数据进行处理,得到待融合数据,包括:
    在所述寄存器中采用池化层以及卷积层对所述待处理数据进行处理,其中,所述池化层用于对所述待处理数据进行正则化处理以及池化处理,所述卷积层用于对所述待处理数据进行激活处理以及标准化处理。
  7. 根据权利要求5所述的方法,其中,所述采用所述数据处理框架在内存中对所述待融合数据进行处理,包括:
    在所述内存中采用全连接层对所述待融合数据进行处理,其中,所述待融合数据包括第一待融合数据以及第二待融合数据,所述全连接层用于拼接所述第一待融合数据以及所述第二待融合数据,并对所述第一待融合数据以及所述第二待融合数据进行融合处理。
  8. 根据权利要求1至4中任一项所述的方法,其中,所述采用数据处理框架对所述待处理数据进行处理,包括:
    从第一内存中获取所述待处理数据;
    对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于第二内存,所述第二内存与所述第一内存属于预先分配的两个不同内存;
    从所述第二内存中获取所述卷积处理结果;
    对所述卷积处理结果进行数据融合处理,得到融合结果,其中,所述融合结果存储于所述第一内存。
  9. 根据权利要求1至4中任一项所述的方法,其中,所述采用数据处理框架对所述待处理数据进行处理,包括:
    对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
    对所述待处理数据进行数据融合处理,得到第一融合结果,其中,所述第一融合结果存储于所述目标内存;
    从所述目标内存中获取所述卷积处理结果以及所述第一融合结果;
    对所述卷积处理结果以及所述第一融合结果进行数据融合处理,得到第二融合结果。
  10. 根据权利要求1至4中任一项所述的方法,其中,所述采用数据处理框架对所述待处理数据进行处理,包括:
    对所述待处理数据进行卷积处理,得到卷积处理结果,其中,所述卷积处理结果存储于目标内存;
    从所述目标内存中获取第一卷积处理结果;
    对所述第一卷积处理结果进行融合处理,得到融合结果,和/或,对所述第一卷积处理结果进行卷积处理,得到第二卷积处理结果。
  11. 根据权利要求1至4任一项所述的方法,其中,所述根据所述对象控制指令从目标应用中获取交互帧数据之前,所述方法还包括:
    获取终端设备的性能参数;
    根据所述运行参数从预设框架匹配模板集合中选择目标匹配模板,其中,预设框架匹配 模板集合包括至少一个匹配模板,每个匹配模板中包括所述数据处理框架所使用的参数;
    所述采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,包括:
    根据所述目标匹配模板,采用所述数据处理框架对所述待处理数据进行处理,得到所述交互控制指令。
  12. 一种对象控制装置,包括:
    获取模块,用于接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
    所述获取模块,还用于通过对象控制模型获取所述交互帧数据所对应待处理数据;
    处理模块,用于采用数据处理框架对所述获取模块获取的所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
    发送模块,用于通过所述目标应用向所述服务器发送所述处理模块处理得到的所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制。
  13. 一种终端设备,所述终端设备包括:存储器、收发器、处理器以及总线系统;
    其中,所述存储器用于存储程序;
    所述处理器用于执行所述存储器中的程序,包括如下步骤:
    接收服务器发送的对象控制指令,根据所述对象控制指令从目标应用中获取交互帧数据,其中,所述对象控制指令中携带目标对象的标识;
    通过对象控制模型获取所述交互帧数据所对应待处理数据;
    采用数据处理框架对所述待处理数据进行处理,得到交互控制指令,其中,所述交互控制指令携带所述目标对象的标识,所述数据处理框架用于实现数据的稀疏卷积处理;
    通过所述目标应用向所述服务器发送所述交互控制指令,其中,所述交互控制指令用于指示至少一个终端设备在所述目标应用对所述目标对象进行控制;
    所述总线系统用于连接所述存储器以及所述处理器,以使所述存储器以及所述处理器进行通信。
  14. 根据权利要求13所述的终端设备,所述处理器具体用于执行如下步骤:
    通过所述对象控制模型获取第一交互帧数据所对应第一待处理数据,其中,所述第一交互帧数据对应于所述交互帧数据中的M帧数据,所述M为正整数;
    通过所述对象控制模型获取第二交互帧数据所对应第二待处理数据,其中,所述第二交互帧数据对应于所述交互帧数据中的N帧数据,所述N为正整数,且所述N小于所述M;
    采用所述数据处理框架对所述第一待处理数据进行处理,得到第一交互控制指令;
    采用所述数据处理框架对所述第二待处理数据进行处理,得到第二交互控制指令。
  15. 一种计算机可读存储介质,所述计算机可读存储介质中存储有程序,当所述程序在处理器上运行时,使得所述处理器执行如权利要求1至11任一项所述的方法。
PCT/CN2019/120741 2018-11-28 2019-11-25 目标对象的控制方法、装置、设备及存储介质 WO2020108457A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP19888588.1A EP3888769A4 (en) 2019-11-25 Control method for target object, apparatus, device, and storage medium
JP2021505235A JP7257497B2 (ja) 2018-11-28 2019-11-25 目標オブジェクトの制御方法、装置、機器及びプログラム

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811448777.9 2018-11-28
CN201811448777.9A CN109550249B (zh) 2018-11-28 2018-11-28 一种目标对象的控制方法、装置及设备

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/191,056 Continuation US11351458B2 (en) 2018-11-28 2021-03-03 Method for controlling target object, apparatus, device, and storage medium

Publications (1)

Publication Number Publication Date
WO2020108457A1 true WO2020108457A1 (zh) 2020-06-04

Family

ID=65868075

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/120741 WO2020108457A1 (zh) 2018-11-28 2019-11-25 目标对象的控制方法、装置、设备及存储介质

Country Status (4)

Country Link
US (1) US11351458B2 (zh)
JP (1) JP7257497B2 (zh)
CN (1) CN109550249B (zh)
WO (1) WO2020108457A1 (zh)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10888788B2 (en) * 2016-06-30 2021-01-12 Sony Interactive Entertainment Inc. Automated artificial intelligence (AI) control mode for playing specific tasks during gaming applications
CN109550249B (zh) * 2018-11-28 2022-04-29 腾讯科技(深圳)有限公司 一种目标对象的控制方法、装置及设备
CN110064205B (zh) * 2019-04-24 2023-02-17 腾讯科技(深圳)有限公司 用于游戏的数据处理方法、设备和介质
CN110263670A (zh) * 2019-05-30 2019-09-20 湖南城市学院 一种面部局部特征分析系统
CN110333827B (zh) * 2019-07-11 2023-08-08 山东浪潮科学研究院有限公司 一种数据加载装置和数据加载方法
CN111459626B (zh) * 2020-03-11 2021-06-01 完美世界(北京)软件科技发展有限公司 一种用于实现不分线无缝游戏世界的方法和装置
CN113761045B (zh) * 2021-09-03 2024-03-26 中国人民解放军63920部队 航天器上行控制数据生成方法及装置

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040266526A1 (en) * 2003-06-30 2004-12-30 Ralf Herbrich Modified motion control for a virtual reality environment
CN108057249A (zh) * 2017-11-29 2018-05-22 腾讯科技(成都)有限公司 一种业务数据处理方法和装置
CN108283809A (zh) * 2018-02-11 2018-07-17 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备和存储介质
CN108888958A (zh) * 2018-06-22 2018-11-27 深圳市腾讯网络信息技术有限公司 虚拟场景中的虚拟对象控制方法、装置、设备及存储介质
CN109550249A (zh) * 2018-11-28 2019-04-02 腾讯科技(深圳)有限公司 一种目标对象的控制方法以及相关装置

Family Cites Families (25)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7584082B2 (en) * 2003-08-07 2009-09-01 The Mathworks, Inc. Synchronization and data review system
US7440447B2 (en) * 2004-03-25 2008-10-21 Aiseek Ltd. Techniques for path finding and terrain analysis
JP2006212288A (ja) * 2005-02-04 2006-08-17 Konami Digital Entertainment:Kk 不正行為防止方法、ゲーム装置及び不正行為防止プログラム
US8016664B2 (en) 2005-04-13 2011-09-13 Take Two Interactive Software, Inc. Systems and methods for simulating a particular user in an interactive computer system
US8142268B2 (en) * 2005-04-13 2012-03-27 Take Two Interactive Software, Inc. Systems and methods for simulating a particular user in an interactive computer system
US7953521B2 (en) * 2005-12-30 2011-05-31 Microsoft Corporation Learning controller for vehicle control
JP3954630B1 (ja) * 2006-03-27 2007-08-08 株式会社コナミデジタルエンタテインメント ゲーム装置、ゲーム装置の制御方法及びプログラム
US8069124B2 (en) * 2008-03-26 2011-11-29 Intel Corporation Combining speculative physics modeling with goal-based artificial intelligence
US8366526B2 (en) * 2010-04-16 2013-02-05 Disney Enterprises, Inc. Power play game mechanics
US9248819B1 (en) * 2014-10-28 2016-02-02 Nissan North America, Inc. Method of customizing vehicle control system
US9132839B1 (en) * 2014-10-28 2015-09-15 Nissan North America, Inc. Method and system of adjusting performance characteristic of vehicle control system
JP5887458B1 (ja) * 2015-11-04 2016-03-16 株式会社Cygames プレイヤの移動履歴に基づいてノンプレイヤキャラクタの経路探索を行うゲームシステム等
US10528864B2 (en) * 2016-08-11 2020-01-07 Nvidia Corporation Sparse convolutional neural network accelerator
US10891538B2 (en) * 2016-08-11 2021-01-12 Nvidia Corporation Sparse convolutional neural network accelerator
US11321613B2 (en) * 2016-11-17 2022-05-03 Irida Labs S.A. Parsimonious inference on convolutional neural networks
US10096134B2 (en) * 2017-02-01 2018-10-09 Nvidia Corporation Data compaction and memory bandwidth reduction for sparse neural networks
US10512846B2 (en) 2017-03-07 2019-12-24 Sony Interactive Entertainment LLC Emulating player behavior after player departure
US11934934B2 (en) * 2017-04-17 2024-03-19 Intel Corporation Convolutional neural network optimization mechanism
CN108805276B (zh) * 2017-06-16 2020-09-22 上海兆芯集成电路有限公司 处理器、用于操作处理器的方法和计算机可用介质
US11061402B2 (en) * 2017-11-15 2021-07-13 Uatc, Llc Sparse convolutional neural networks
US11176439B2 (en) * 2017-12-01 2021-11-16 International Business Machines Corporation Convolutional neural network with sparse and complementary kernels
CN108229360B (zh) * 2017-12-26 2021-03-19 美的集团股份有限公司 一种图像处理的方法、设备及存储介质
CN108197705A (zh) * 2017-12-29 2018-06-22 国民技术股份有限公司 卷积神经网络硬件加速装置及卷积计算方法及存储介质
CN108537331A (zh) * 2018-04-04 2018-09-14 清华大学 一种基于异步逻辑的可重构卷积神经网络加速电路
US11188744B2 (en) * 2019-03-15 2021-11-30 Microsoft Technology Licensing, Llc Spatially sparse convolutional neural networks for inking applications

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040266526A1 (en) * 2003-06-30 2004-12-30 Ralf Herbrich Modified motion control for a virtual reality environment
CN108057249A (zh) * 2017-11-29 2018-05-22 腾讯科技(成都)有限公司 一种业务数据处理方法和装置
CN108283809A (zh) * 2018-02-11 2018-07-17 腾讯科技(深圳)有限公司 数据处理方法、装置、计算机设备和存储介质
CN108888958A (zh) * 2018-06-22 2018-11-27 深圳市腾讯网络信息技术有限公司 虚拟场景中的虚拟对象控制方法、装置、设备及存储介质
CN109550249A (zh) * 2018-11-28 2019-04-02 腾讯科技(深圳)有限公司 一种目标对象的控制方法以及相关装置

Also Published As

Publication number Publication date
CN109550249A (zh) 2019-04-02
US11351458B2 (en) 2022-06-07
EP3888769A1 (en) 2021-10-06
JP7257497B2 (ja) 2023-04-13
JP2021531907A (ja) 2021-11-25
US20210187394A1 (en) 2021-06-24
CN109550249B (zh) 2022-04-29

Similar Documents

Publication Publication Date Title
WO2020108457A1 (zh) 目标对象的控制方法、装置、设备及存储介质
CN110704661B (zh) 一种图像分类方法和装置
TWI533241B (zh) 一種實現人工智能的方法、服務器和設備
CN110163367B (zh) 一种终端部署方法和装置
CN109670174B (zh) 一种事件识别模型的训练方法和装置
CN112052841B (zh) 一种视频摘要的生成方法以及相关装置
CN110738211A (zh) 一种对象检测的方法、相关装置以及设备
WO2015035870A1 (zh) 多cpu调度方法及装置
CN113284142B (zh) 图像检测方法、装置、计算机可读存储介质及计算机设备
CN104363988B (zh) 一种多核处理器的管理方法及装置
CN108021454A (zh) 一种处理器负载均衡的方法、终端及计算机存储介质
CN110069715A (zh) 一种信息推荐模型训练的方法、信息推荐的方法及装置
CN110443190A (zh) 一种对象识别方法和装置
CN107132974A (zh) 终端冻屏处理方法、终端及计算机可读存储介质
WO2021109703A1 (zh) 数据处理方法、芯片、设备及存储介质
CN116208613A (zh) 云主机的迁移方法、装置、电子设备及存储介质
CN107133085B (zh) 优化oat中冗余指令的方法及移动终端
CN112748899A (zh) 一种数据处理方法和相关设备
CN116958715A (zh) 一种手部关键点的检测方法、装置以及存储介质
CN110503189B (zh) 一种数据处理方法以及装置
CN109471708B (zh) 一种任务处理方法、装置及系统
CN108269223A (zh) 一种网页图形绘制方法及终端
CN116450808B (zh) 一种数据的处理方法、装置以及存储介质
CN117454930B (zh) 一种针对图神经网络的表达特征数据输出方法和装置
CN107273034A (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: 19888588

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2021505235

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019888588

Country of ref document: EP

Effective date: 20210628