Data processing method, related device and computer readable medium
By splitting the network model into a dynamic control network and a static computing network, the computing device can adapt to data block operations of different sizes, solving the problem of low data block operation efficiency in multi-core processing systems and improving the efficiency and practicality of data processing. .
Patent Information
- Application Number
- CN201910829879.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-09-02
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2040-02-20
AI Technical Summary
In multi-core processing systems, how to adapt to data block operations of different sizes is an urgent problem that needs to be solved, especially for a single processor core.
By splitting the network model into a dynamic control network and a static computing network, the computing device can call the static computing network to perform logical operations on the input data blocks according to the instructions of the dynamic control network, thereby realizing data block operations of different sizes.
This improves the efficiency and practicality of data processing, enabling efficient processing of data blocks of different sizes in different processor cores.
Smart Images

Figure CN112445523B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, related equipment and a computer-readable medium. Background Art
[0002] In a multi-core processing system, in order to reduce the workload of a single processor core, the computing device can split the data blocks to be processed into different sizes according to the number of available processor cores in the system so as to perform operations on different processor cores.
[0003] However, in practice, it is found that how to adapt to the operation of data blocks of different sizes for a single processor core is a problem that needs to be solved urgently. Summary of the invention
[0004] The embodiment of the present invention provides a data processing method, which can realize the operation of input data blocks of different sizes, thereby improving the practicality and efficiency of data processing.
[0005] In a first aspect, an embodiment of the present invention provides a data processing method, the method comprising: a computing device obtains an input data block for a newly created network model, the newly created network model comprises a dynamic control network and a static operation network, the dynamic control network is used to control and implement the logic operation of the input data block, and the static operation network is used to perform the logic operation of the input data block. Further, the computing device may call the static operation network to perform the logic operation indicated by the dynamic control network on the input data block according to the instruction of the dynamic control network, so as to obtain the operation result.
[0006] In a second aspect, an embodiment of the present invention provides a computing device, which includes a unit for executing the method of the first aspect.
[0007] In a third aspect, an embodiment of the present invention provides another computing device, comprising a processor, a memory and a bus, wherein the processor and the memory are connected via the bus, the memory is used to store instructions, and the processor is used to call the instructions stored in the memory to execute the method of the first aspect above.
[0008] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method of the first aspect.
[0009] By implementing the embodiments of the present invention, operations on input data blocks of different sizes can be implemented in different processor cores, thereby facilitating the improvement of data processing efficiency and practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0011] Figure 1 It is a flowchart of a data processing method provided by an embodiment of the present invention.
[0012] Figure 2 It is a flowchart of a data processing method provided by an embodiment of the present invention.
[0013] Figure 3 It is a structural schematic diagram of a computing device provided by an embodiment of the present invention.
[0014] Figure 4 It is a schematic diagram of the structure of another computing device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0015] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0016] The terms "first", "second", "third" and "fourth" etc. in the specification and claims of the present application and the drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.
[0017] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0018] First, the instruction compilation and operation process applicable to this application is introduced. Figure 1, is a schematic diagram of an instruction compilation flow provided by an embodiment of the present invention. Figure 1 The process shown includes the following implementation steps:
[0019] S101. A computing device obtains an original network model.
[0020] In the present application, the original network model may be a mathematical model pre-customized by the system, which may include but is not limited to convolutional neural networks (CNN) models, feedforward neural networks (FNN) models, deep neural networks (DNN) models, BP (back propagation, BP) neural network models or other network models used for data processing.
[0021] The original network model includes a network topology structure, referred to as a network structure. The network structure consists of at least one network layer, which is used to implement a specific computing function. For example, the network layer can be a convolution layer, a pooling layer, and an activation layer. In this application, "network model", "network structure" and "topology network" can often be used interchangeably.
[0022] S102: The computing device preprocesses the original network model.
[0023] In order to achieve efficient operation of the network model, the computing device may also pre-process the original network model to obtain a processed network model, which may then be used to perform data operations. The pre-processing may be an operation process customized by the system, for example, it may include but is not limited to compression processing, format conversion processing, etc.
[0024] S103: The computing device performs layer matching on the newly created network model according to the network layers to obtain parameter information of each network layer.
[0025] Specifically, the computing device can perform layer matching on each network layer included in the newly created network model according to the network layer to calculate and obtain the parameter information of each network layer in the newly created network model. The parameter information includes but is not limited to the parameters required for each network layer, the registers or storage addresses where the parameters are stored, etc., such as the weight parameters (also referred to as weight data blocks) required for the network layer, etc.
[0026] In practical applications, the newly created network model can be obtained based on the original network model. For example, the newly created network model can be the network model preprocessed in S102, or can be the network model obtained after performing other setting operations on the preprocessed network model, or can be the network model obtained after performing setting operations on the original network model, etc., which is not limited in the present invention. The present application will hereinafter take the example of obtaining a newly created network model by performing network splitting on the original network model as an example for detailed description.
[0027] S104: The computing device compiles the parameter information of each network layer to obtain an abstract instruction ops. The abstract instruction can be specifically expressed in a preset instruction intermediate language.
[0028] S105. The computing device recompiles the abstract instruction ops.
[0029] S106. The computing device obtains the off-chip data block offchip_block according to the recompiled intermediate result instruction rawop.
[0030] After the computing device performs layer matching, it can compile the parameter information of each network layer obtained by layer matching to generate abstract instructions ops expressed in an intermediate language. The computing device can further recompile to compile the intermediate result instruction rawop, and then convert the rawop into a binary instruction that can be recognized by the computing device itself (or chip).
[0031] Optionally, the computing device may encapsulate the rawop into the initial off-chip data block offchip_block to output the off-chip data block offchip_block for use by the computing device. In practical applications, the above instruction compilation process may also be referred to as the encapsulation process of the off-chip data block offchip_block. The above process is encapsulated as a multicore_offline function in a code library (e.g., a C10-NGPF code library), the purpose of which is to encapsulate and obtain the off-chip data block offchip_block to pass it to the user interface sopa, and then implement the call of the newly created network model through the user interface sopa, so as to use the newly created network model to implement corresponding data operations.
[0032] The offchip_block can be divided into two types. One is used to store data. For example, the valid data stored in the compiler can be used to mark the address (or position) of the data operated by the code stored on the off-chip memory DDR. During the code compilation process, the address will be configured as an offset address to the corresponding input and output IO code. Among them, the base address is usually written at a fixed position outside the chip, so that the computing device can obtain the corresponding stored data to be processed according to the base address and offset address during the actual operation stage, so as to perform the corresponding specified operation. The other is used to store the code of the artificial intelligence processor (machine leaning unit, MLU). Due to the memory limitation of the on-chip instruction memory RAM, the code can be cut into blocks in the specific implementation to be stored in different offchip_blocks.
[0033] The following describes embodiments of network model splitting. The computing device can perform network splitting on any network model to obtain a new network model. The specific implementation steps of the new network model can be located between steps S102-S103 above, such as the computing device can perform network splitting on the preprocessed network model to obtain a new network model. The following application takes the example of a computing device performing network splitting on an original network model to describe a specific embodiment of obtaining a new network model.
[0034] Specifically, the original network model includes a network structure (also referred to as a topological network), and the present invention does not limit the topological network. For example, it may include one or more network layers with functions such as convolution and pooling. The computing device can split the topological network in the original network model to obtain at least two functional networks. The functions of each functional network and the network layers included in each functional network can be customized according to actual needs. The following application will take the splitting to obtain a dynamic control network and a static computing network as an example for explanation.
[0035] In other words, the input of network splitting is a topological network intf_t included in the original network model, and the output is two topological networks intf_t (specifically, a dynamic control network dynamic_intf_t and a static operation network static_intf_t). The two topological networks intf_t output by the splitting can form a new network model.
[0036] In practical applications, the dynamic control network and the static control network may have the same network structure, which may include one or more network layers. However, in order to realize the functions of each network, the operators called by each network layer in the dynamic control network and the static control network and the number of called operators may be different. For example, the dynamic control network can only call the dynamic operators included in the network, and the static operation network only supports calling the static operators included in the network, etc.
[0037] In an optional embodiment, during the network splitting process, the computing device may encapsulate the network layer supporting the call of dynamic operators in the original network model into a dynamic control network, and encapsulate the network layer supporting the call of static operators into a static operation network. The dynamic operator refers to an operator used to control the logical operation of data, and the static operator refers to an operator used to implement logical operation on data, such as a mapping function.
[0038] For any topology network intf_t (such as dynamic_intf_t or static_intf_t) after splitting, each split network includes a layer queue intf_layer_t and a data queue intf_data_t. Among them, the layer queue includes at least one network layer that constitutes the network, and each network layer has input data and output data. That is, each network layer has a pointer to the data queue intf_data_t, which can be called a data pointer (input, output, const). The data pointer is used to indicate the data required by the network layer, and the data includes but is not limited to the input data input of the network layer, the output data output of the network layer, and the static data const involved in the network layer (such as weight data). Among them, static data refers to data that does not change with the change of input data, and can also be called fixed data, such as user-defined constants, weight data, etc.
[0039] The data queue includes the data required by each network layer (i.e., data associated with the network layer). For each data associated with the network layer, each data is generated by one network layer and used by another network layer. Then, the data also has a pointer to the network layer in the layer queue intf_layer_t, which can be called a layer pointer (consumer, provider). The layer pointer is used to indicate the network layer that uses the data and the source network layer that generates the data.
[0040] For example, taking a network including three network layers as an example, after the input data is processed by the three network layers included in the network, output data 1, output data 2 and output data 3 can be obtained respectively, wherein output data 1 is the output data obtained after the input data is processed by the first network layer, output data 2 is the output data obtained after the output data 1 is processed by the second network layer, and output data 3 is the output data obtained after the output data 2 is processed by the third network layer. Accordingly, the layer pointer of output data 2 can be used to indicate the network layer that uses the output data 2 (the third network layer in this example), and the source network layer that generates the output data 2 (the second network layer in this example).
[0041] It should be noted that the data involved in this application may also be a data block. For the sake of convenience and unified description, this application only uses data as an example for explanation. Generally, "data" and "data block" can be used interchangeably. When the data is a data block, the size of the data block can be N*C*H*W, where N represents the number of data blocks, C represents the number of channels (also called dimension), H represents the height, and W represents the width. Taking the data block as a data block used to describe an image as an example, N represents the number of input images, C represents the number of channels of the image, and taking the image as an RGB color image as an example, C=3. H and W represent the height and width of the image, respectively. In practical applications, actual calculations are usually performed based on two-dimensional data blocks. This application will be explained below using a two-dimensional data block on the HW plane as an example. That is, the size of the data block can be specifically H*W, H represents the height of the data block, and W represents the width of the data block.
[0042] Optionally, when the input data is variable (for example, the size of the input data block is variable in height H and width W), the computing device may encapsulate the dynamic control network into a master control code (also referred to as a dynamic control code) and the static operation network into a controlled code (also referred to as a static operation code) during the actual operation process. When the dynamic control code is run, it will call part of the controlled code of the static operation network to operate on the input data. Among them, the static operation network is operated when the size of the input data is determined. Therefore, in order to improve the data operation performance, there will be multiple static operation networks in this application (that is, there will be multiple copies of static operation code during execution).
[0043] Optionally, when a computing device deploys multiple processor cores to process a data block, the computing device may use a preset segmentation strategy to split the data block to obtain input data blocks of different sizes, and then use the multiple processor cores to process the input data blocks of different sizes. The embodiment of the present application only takes a single processor core deployed in a computing device as an example to describe in detail the specific embodiments of how to process input variable data blocks (i.e., input data blocks of uncertain size).
[0044] Optionally, subject to the segmentation strategy of data blocks Ci and Co (i.e., the number of channels Ci of the input data block and the number of channels Co of the output data block), there are two specific Ci and Co situations: integer segmentation and remainder segmentation, i.e., there are two Ci and two Co segmentation methods, which will make the number of static operation codes four times the original. In order to save code resources and simplify the model network, the present application can split a topological network included in the original network model into a dynamic control network that supports calling dynamic operators and at least one static operation network that supports calling static operators.
[0045] Specifically, the computing device can copy the topological network (specifically, the network layer included in the topological network) in the original network model according to actual needs, and relink the data relationship between each network layer to generate a new network model including a dynamic control network and a static computing network. In actual applications, the computing device can pre-provide a configuration file, which includes network mapping relationships, such as the link relationship between the dynamic control network and the static computing network, the mapping link relationship between the network layers in each network, etc. Accordingly, the computing device can split the topological network in the original network model according to the configuration file, and then generate a new network model.
[0046] For example, taking the original network model as a convolutional neural network model, the convolutional neural network model includes a topological network with a convolution CONV as an identifier. During the actual operation, the computing device can call the operator contained in the topological network through the identifier CONV, and use the operator to perform convolution operations on the input data. Referring to the above description of this application, the topological network in the convolutional neural network model can be split into a dynamic and static network, so as to obtain a static operation network with a STATIC_CONV as an identifier and a dynamic control network with a DYNAMIC_CONV as an identifier.
[0047] Accordingly, in the actual operation process, the computing device can call the dynamic operator included in the dynamic control network through DYNAMIC_CONV, and call the static operator included in the static operation network through DYNAMIC_CONV according to the instruction of the dynamic operator (specifically, the layer pointer and data pointer included in each network layer in the static operation network) to perform convolution operation on the user's input data, thereby obtaining the final output data.
[0048] Optionally, other information may be defined in each network, such as the size of a static operator, where the size of a static operator represents the number of computing units required to process input data through a static computing network.
[0049] Optionally, after the computing device splits the original network model to obtain a dynamic control network and a static computing network, the computing device may refer to the description of the aforementioned steps S103-S106, and the computing device may match the two networks by network layer, and then compile them to obtain an off-chip data block offchip_block, which will not be repeated here.
[0050] Referring to the above embodiments, see Figure 2 FIG. 1 is a flow chart of a data processing method provided by an embodiment of the present invention. Figure 2 The method shown includes the following implementation steps:
[0051] Step S201: The computing device obtains an input data block for a newly created network model, wherein the newly created network model includes a dynamic control network and a static operation network, wherein the dynamic control network is used to control the logical operation of the input data block, and the static operation network is used to execute the logical operation of the input data block.
[0052] In the present application, the computing device may obtain an input data block for inputting into the newly created network model, and the size of the input data block may be N*C*H*W, where N represents the number of data blocks, C represents the number of channels (also referred to as dimensions), H represents the height, and W represents the width. In practical applications, actual calculations are usually performed based on two-dimensional data blocks. The present application will be described below using a two-dimensional data block on the HW plane as an example. That is, the data block may specifically be a two-dimensional data block of H*W, where H represents the height of the data block and W represents the width of the data block.
[0053] Among them, the newly created network model is a network model that the computing device has obtained in advance, and the newly created network model includes a dynamic control network and a static computing network. There is no limit on the number of static computing networks, which can be one or more. This application uses a static computing network as an example for explanation. For the specific acquisition of the newly created network model, please refer to the relevant explanation in the above embodiment, which will not be repeated here.
[0054] Step S202: The computing device calls the static operation network according to the dynamic control network to perform the logic operation indicated by the dynamic control network on the input data block to obtain an operation result.
[0055] After obtaining the input data block of the newly created network model, the computing device can call the static operation network according to the instructions of the dynamic control network in the model to perform the logical operations indicated by the dynamic control network on the input data block, such as convolution operations, multiplication and addition operations, etc., to obtain the corresponding operation results.
[0056] In a specific implementation, the static computing network includes a layer queue and a data queue, and the layer queue includes at least one network layer constituting the static computing network. Each network layer is configured with a data pointer, and the data pointer is used to indicate the data block associated with the network layer, such as the input data block, the output data block and the static data block, so that these data blocks are called when performing the relevant operations of the network layer to realize data operations. The data queue includes the data block associated with each network layer, and the data block is configured with a layer pointer, and the layer pointer is used to indicate the network layer using the data block and the source network layer from which the data block is generated. Accordingly, after the computing device obtains the input data block of the newly created network model, it can call the static computing network according to the instructions of the dynamic control network, so as to perform the logical operations indicated by the static operators associated with each network layer on the input data block in turn according to the data pointer and layer pointer associated with each network layer in the static computing network, so as to obtain the operation result output by the newly created network model.
[0057] In an optional embodiment, the computing device may also encapsulate or compile the dynamic control network and static operation network included in the newly created network model into corresponding network structure instructions, such as compiling the dynamic control network into dynamic control instructions and compiling the static operation network into static operation instructions. Accordingly, when using the newly created network model for data processing, the computing device may implement corresponding data processing by calling the network structure instructions (such as dynamic control instructions and static control instructions). For example, in the present application, after the computing device obtains the dynamic control instruction, it may call the corresponding static operation instruction according to the instruction of the dynamic control instruction, and then perform corresponding operations on the data block to be processed according to the static operation instruction.
[0058] By implementing the embodiment of the present invention, operations on input data blocks of different sizes can be realized, thereby improving the practicality and efficiency of data processing.
[0059] See also Figure 3 , is a schematic diagram of the structure of a data processing device provided by an embodiment of the present invention. Figure 3 The device 300 shown includes a communication module 302 and a processing module 304.
[0060] The communication module 302 is used to obtain an input data block for a newly created network model, wherein the newly created network model includes a dynamic control network and a static operation network, wherein the dynamic control network is used to control and implement the logic operation of the input data block, and the static operation network is used to execute the logic operation of the input data block;
[0061] The processing module 304 is used to call the static operation network according to the dynamic control network to perform the logic operation indicated by the dynamic control network on the input data block to obtain the operation result.
[0062] In some possible embodiments, the processing module 304 is also used to perform network splitting on the original network model, so as to encapsulate the network layer that calls the dynamic operator into a dynamic control network, and encapsulate the network layer that calls the static operator into a static operation network, thereby obtaining a new network model including the dynamic control network and the static operation network.
[0063] In some possible embodiments, the dynamic control network and the static operation network have the same network topology.
[0064] In some possible embodiments, the newly created network model includes a layer queue and a data queue, the layer queue includes at least one network layer constituting the newly created network model, and the data queue includes data blocks associated with each network layer in the at least one network layer; wherein each of the network layers is configured with a data pointer, the data pointer is used to indicate the data blocks associated with the network layer, the data blocks include the input data blocks, output data blocks and preset static data blocks of the network layer; each of the data blocks associated with the network layer is configured with a layer pointer, the layer pointer is used to indicate the network layer that currently needs to use the data block and the source network layer associated with the data block.
[0065] In some possible embodiments, the processing module 304 is specifically used to input the input data block into the static operation network, and according to the data pointer and layer pointer of each network layer included in the static operation network, perform the logical operations indicated by the static operator associated with each network layer in turn to obtain the operation result output by the static operation network.
[0066] In some possible embodiments, the processing module 304 is further used to compile the dynamic control network and the static operation network in the newly created network model into corresponding network structure instructions to call the network structure instructions to perform corresponding data operations.
[0067] Optionally, the device 300 also includes a storage module 306, which stores program codes for implementing relevant operations of the device 300. In practical applications, each module or unit involved in the device in the embodiment of the present invention can be implemented by a software program or hardware. When implemented by a software program, each module or unit involved in the device is a software module or software unit. When implemented by hardware, each module or unit involved in the device can be implemented by an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The above-mentioned PLD can be a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof, which is not limited by the present invention.
[0068] Need to explain, Figure 3 This is only a possible implementation of the embodiment of the present application. In practical applications, the data processing device may also include more or fewer components, which is not limited here. For the contents not shown or described in the embodiment of the present invention, please refer to the relevant description in the aforementioned method embodiment, which will not be repeated here.
[0069] See also Figure 4 , is a schematic diagram of the structure of a computing device provided by an embodiment of the present invention. Figure 4 The computing device 400 shown includes one or more processors 401, a communication interface 402, and a memory 403. The processor 401, the communication interface 402, and the memory 403 can be connected via a bus, or can communicate via other means such as wireless transmission. The embodiment of the present invention takes the connection via bus 404 as an example, wherein the memory 403 is used to store instructions, and the processor 401 is used to execute the instructions stored in the memory 403. The memory 403 stores program code, and the processor 401 can call the program code stored in the memory 403 to perform the following operations:
[0070] Acquire an input data block for a newly created network model, wherein the newly created network model includes a dynamic control network and a static operation network, wherein the dynamic control network is used to control and implement a logic operation of the input data block, and the static operation network is used to execute a logic operation of the input data block;
[0071] According to the dynamic control network, the static operation network is called to perform the logic operation indicated by the dynamic control network on the input data block to obtain the operation result.
[0072] For details about the contents not shown or described in the embodiments of the present invention, please refer to the aforementioned Figure 1-Figure 3 The relevant explanations in the embodiments are not repeated here.
[0073] It should be understood that in the embodiment of the present invention, the processor 401 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0074] The communication interface 402 may be a wired interface (e.g., an Ethernet interface) or a wireless interface (e.g., a cellular network interface or a wireless local area network interface) for communicating with other modules or devices. For example, in the embodiment of the present application, the communication interface 402 may be specifically used to obtain input data blocks for inputting a new network model.
[0075] The memory 403 may include a volatile memory, such as a random access memory (RAM); the memory may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD); the memory may also include a combination of the above-mentioned types of memory. The memory may be used to store a set of program codes so that the processor can call the program codes stored in the memory to implement the functions of the above-mentioned functional modules involved in the embodiments of the present invention.
[0076] Need to explain, Figure 4This is only a possible implementation of the embodiment of the present invention. In practical applications, the computing device may also include more or fewer components, which is not limited here. For the contents not shown or described in the embodiment of the present invention, please refer to the relevant description in the aforementioned method embodiment, which will not be repeated here.
[0077] The embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a processor, Figure 1 or Figure 2 The method flow shown is realized.
[0078] An embodiment of the present invention further provides a computer program product. When the computer program product is run on a processor, Figure 1 or Figure 2 The method flow shown in the embodiment is realized.
[0079] The computer-readable storage medium may be an internal storage unit of the computing device described in any of the foregoing embodiments, such as a hard disk or memory of the computing device. The computer-readable storage medium may also be an external storage device of the computing device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computing device. Furthermore, the computer-readable storage medium may also include both an internal storage unit of the client and an external storage device. The computer-readable storage medium is used to store the computer program and other programs and data required by the computing device. The computer-readable storage medium may also be used to temporarily store data that has been output or is to be output.
[0080] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0081] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the terminal devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0082] In the several embodiments provided in the present application, it should be understood that the disclosed terminal device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, or it can be an electrical, mechanical or other form of connection.
[0083] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0084] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0085] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0086] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A data processing method, It is characterized in that include: Acquire an input data block for a newly created network model, wherein the newly created network model includes a dynamic control network and a static operation network, wherein the dynamic control network is used to control and implement a logic operation of the input data block, and the static operation network is used to execute a logic operation of the input data block; According to the dynamic control network, calling the static operation network to perform the logic operation indicated by the dynamic control network on the input data block to obtain an operation result; Before obtaining the input data block for the newly created network model, the method further includes: Performing network splitting on the original network model, so as to encapsulate the network layer that calls the dynamic operator into a dynamic control network, and encapsulate the network layer that calls the static operator into a static operation network, thereby obtaining a new network model including the dynamic control network and the static operation network; The calling of the static operation network to perform the logic operation indicated by the dynamic control network on the input data block to obtain the operation result includes: The input data block is input into the static operation network, and according to the data pointer and layer pointer of each network layer included in the static operation network, the logical operation indicated by the static operator associated with each network layer is performed in sequence to obtain the operation result output by the static operation network.
2. The method according to claim 1, It is characterized in that The dynamic control network and the static operation network have the same network topology.
3. The method according to claim 2, It is characterized in that The newly created network model includes a layer queue and a data queue, wherein the layer queue includes at least one network layer constituting the newly created network model, and the data queue includes data blocks associated with each network layer in the at least one network layer; Each of the network layers is configured with a data pointer, and the data pointer is used to indicate a data block associated with the network layer, and the data block includes an input data block, an output data block, and a preset static data block of the network layer; Each data block associated with the network layer is configured with a layer pointer, and the layer pointer is used to indicate the network layer currently using the data block and the source network layer associated with the data block.
4. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: The dynamic control network and the static operation network in the newly created network model are compiled into corresponding network structure instructions, so as to call the network structure instructions to perform corresponding data operations.
5. A data processing device, It is characterized in that It includes a communication module and a processing module, wherein: The communication module is used to obtain an input data block for a newly created network model, wherein the newly created network model includes a dynamic control network and a static operation network, wherein the dynamic control network is used to control and implement a logical operation of the input data block, and the static operation network is used to execute a logical operation of the input data block; The processing module is used to call the static operation network according to the dynamic control network to perform the logic operation indicated by the dynamic control network on the input data block to obtain the operation result; The processing module is further used to perform network splitting on the original network model, so as to encapsulate the network layer that calls the dynamic operator into a dynamic control network, and encapsulate the network layer that calls the static operator into a static operation network, thereby obtaining a new network model including the dynamic control network and the static operation network; The processing module is specifically used to input the input data block into the static operation network, and according to the data pointer and layer pointer of each network layer included in the static operation network, perform the logical operations indicated by the static operators associated with each network layer in sequence to obtain the operation results output by the static operation network.
6. A computing device, It is characterized in that The method comprises a processor, a memory and a bus, wherein the processor and the memory are connected via the bus, the memory is used to store instructions, and the processor is used to call the instructions stored in the memory to execute the method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, It is characterized in that The computer storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor is caused to perform the method according to any one of claims 1 to 4.
