Task execution method and apparatus, storage medium and electronic device

By integrating the low-important features in the Transformer network, the problem of excessive computing volume and resource utilization is solved, and the computing efficiency and resource utilization of the model are improved.

WO2025152544A1PCT designated stage expired Publication Date: 2025-07-24ANT BLOCKCHAIN TECHNOLOGY (SHANGHAI) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/127821
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-18
Filing Date
2024-10-28
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

As the amount of data increases, the computing volume and resource usage of the Transformer network have increased squarely, resulting in inefficient task execution and difficult to meet business needs.

Method used

By fusion of less important features in the Transformer network, the output sequence length is reduced, and the calculation amount and resource usage are reduced.

Benefits of technology

It effectively reduces the computing volume and resource usage of the Transformer network, and improves the computing efficiency and overall performance of the business model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024127821_24072025_PF_FP_ABST
    Figure CN2024127821_24072025_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present description are a task execution method and apparatus, a storage medium and an electronic device. The task execution method comprises: receiving a task execution request for target data; on the basis of the task execution request, inputting the target data into a preset service model, such that the service model determines data units contained in the target data, and for each data unit, on the basis of the association degree between the data unit and each data unit in the target data, determines a data feature corresponding to the data unit and a first weighting corresponding to the data unit, the first weighting being used for representing the degree of importance of the data unit with respect to the target data; fusing the data features corresponding to the data units the first weightings of which are smaller than a preset weighting threshold value, so as to obtain a fused feature; and on the basis of the fused feature and unfused data features, determining a target feature corresponding to the target data, so as to execute a task on the basis of the target feature.
Need to check novelty before this filing date? Find Prior Art

Description

Task execution method, device, storage medium and electronic device Technical Field

[0001] This specification relates to the field of computer technology, and in particular to a task execution method, device, storage medium, and electronic device. Background Art

[0002] With the advent of the era of large models, model performance and efficiency have also received widespread attention. Among them, the Transformer network, due to its excellent performance and efficient training methods, has been widely used in many fields such as intelligent customer service, risk control, target detection, and privacy protection, thereby serving as a business model to perform tasks in corresponding fields.

[0003] However, as the amount of data continues to increase, the computational complexity of the model and the computing resources occupied will also increase quadratically with the length of the input sequence. This leads to low overall task execution efficiency, large resource usage, and difficulty in meeting growing business needs.

[0004] Therefore, how to improve the computing efficiency of the business model, reduce resource usage, and fully meet business needs is an urgent problem to be solved.

[0005] Summary of the Invention

[0006] This specification provides a task execution method, device, storage medium, and electronic device, which can reduce the length of an output sequence by fusing less important features and improve the efficiency of subsequent tasks.

[0007] This manual adopts the following technical solutions.

[0008] This specification provides a task execution method, including: receiving a task execution request for target data; inputting the target data into a preset business model according to the task execution request, so that the business model determines each data unit contained in the target data, and for each data unit, determining the data feature corresponding to the data unit and the first weight corresponding to the data unit according to the degree of association between the data unit and each data unit in the target data, the first weight being used to characterize the importance of the data unit relative to the target data; fusing the data features corresponding to each data unit whose first weight is less than a preset weight threshold to obtain a fused feature; determining the target feature corresponding to the target data according to the fused feature and the data features that have not been fused, so as to execute the task according to the target feature.

[0009] Optionally, for each data unit, the data feature corresponding to the data unit and the first weight corresponding to the data unit are determined based on the degree of association between the data unit and each data unit in the target data, specifically including: determining the second weights of each data unit relative to the data unit based on the degree of association; determining the first weight based on the second weights; and determining the data feature corresponding to the data unit based on the second weights and the initial feature corresponding to each data unit.

[0010] Optionally, the data features corresponding to each data unit whose first weight is less than a preset weight threshold are fused to obtain a fused feature, specifically including: for each data unit, performing dimensionality reduction processing on the data features corresponding to the data unit through the linear network layer preset in the business model to obtain the reduced dimensionality feature corresponding to the data unit; fusing the reduced dimensionality features corresponding to each data unit whose first weight is less than the preset weight threshold to obtain a fused feature.

[0011] Optionally, the data features corresponding to each data unit whose first weight is less than a preset weight threshold are fused to obtain each fused feature, specifically including: determining the number of groups according to the accuracy of the network parameters in the business model; grouping the data features corresponding to each data unit whose first weight is less than a preset weight threshold according to the number of groups, and for each group, fusing the data features in the group to obtain the fused feature corresponding to the group.

[0012] Optionally, the target feature corresponding to the target data is determined based on the fused feature and the unfused data features, specifically including: for each data processing network layer included in the business model, the fused feature output by the previous data processing network layer and the unfused data features are input into the data processing network layer as the input features corresponding to the data processing network layer, so that the data processing network layer determines, for each input feature, the data feature output by the data processing network layer for the input feature and the first weight corresponding to the input feature unit according to the degree of correlation between the input feature and other input features; the data features output by the data processing network layer whose first weight is less than a preset weight threshold are fused to obtain the fused feature output by the data processing network layer, and the data features and the fused feature output by the data processing network layer are input into the next network layer for processing, until the feature data output by the last data processing network layer is obtained, and the feature data output by the last data processing network layer is used as the target feature.

[0013] Optionally, the target data includes text data or image data.

[0014] This specification provides a task execution device, including: a receiving module for receiving a task execution request for target data; an input module for inputting the target data into a preset business model according to the task execution request, so that the business model determines each data unit contained in the target data, and for each data unit, determines the data feature corresponding to the data unit and the first weight corresponding to the data unit according to the degree of association between the data unit and other data units in the target data, wherein the first weight is used to characterize the importance of the data unit relative to the target data; a fusion module for fusing the data features corresponding to each data unit whose first weight is less than a preset weight threshold to obtain a fused feature; an execution module for determining the target feature corresponding to the target data based on the fused feature and each data feature that has not been fused, so as to execute the task according to the target feature.

[0015] Optionally, the input module is specifically used to determine the second weights of the other data units relative to the data unit based on the degree of association; determine the first weight based on the second weights; and determine the data characteristics corresponding to the data unit based on the second weights and the initial characteristics corresponding to the other data units.

[0016] Optionally, the fusion module is specifically used to, for each data unit, perform dimensionality reduction processing on the data features corresponding to the data unit through the linear network layer preset in the business model to obtain the reduced dimensionality features corresponding to the data unit; and fuse the reduced dimensionality features corresponding to each data unit whose first weight is less than a preset weight threshold to obtain a fused feature.

[0017] Optionally, the fusion module is specifically used to determine the number of groups according to the accuracy of the network parameters in the business model; group the data features corresponding to each data unit whose first weight is less than a preset weight threshold according to the number of groups, and for each group, fuse the data features in the group to obtain the fusion features corresponding to the group.

[0018] Optionally, the execution module is specifically used to, for each data processing network layer included in the business model, input the fused features output by the previous data processing network layer and the unfused data features as the input features corresponding to the data processing network layer into the data processing network layer, so that the data processing network layer determines, for each input feature, the data feature output by the data processing network layer for the input feature and the first weight corresponding to the input feature unit according to the degree of correlation between the input feature and other input features; fuse the data features output by the data processing network layer whose first weight is less than a preset weight threshold to obtain the fused features output by the data processing network layer, and input the data features and fused features output by the data processing network layer into the next network layer for processing, until the feature data output by the last data processing network layer is obtained, and the feature data output by the last data processing network layer is used as the target feature.

[0019] This specification provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the above-mentioned task execution method is implemented.

[0020] This specification provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned task execution method when executing the program.

[0021] At least one of the above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects: in the task execution method provided in this specification, a task execution request for target data is received; according to the task execution request, the target data is input into a preset business model so that the business model determines the data units contained in the target data, and for each data unit, according to the degree of association between the data unit and other data units in the target data, the data feature corresponding to the data unit and the first weight corresponding to the data unit are determined, and the first weight is used to characterize the importance of the data unit relative to the target data; the data features corresponding to the data units whose first weight is less than the preset weight threshold are fused to obtain a fused feature; based on the fused feature and the data features that have not been fused, the target feature corresponding to the target data is determined to execute the task according to the target feature.

[0022] It can be seen from the above method that in the process of feature extraction of data input into the business model, this solution can fuse the extracted data features based on the weight corresponding to each data unit. In this way, the features corresponding to data units with lower importance in the data can be fused into fewer features, thereby reducing the length of the output sequence, so that the downstream network layer of the model can perform subsequent computing tasks based on shorter input. Compared with traditional methods, this solution greatly reduces the computational amount of the model, thereby improving the overall computational efficiency of the business model and the computing resources occupied. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The drawings described herein are used to provide a further understanding of this specification and constitute a part of this specification. The exemplary embodiments and descriptions of this specification are used to explain this specification and do not constitute an improper limitation of this specification. In the drawings:

[0024] FIG1 is a flowchart of a task execution method provided in this specification;

[0025] FIG2 is a schematic diagram of a feature fusion process provided in this specification;

[0026] FIG3 is a schematic diagram of a task execution device provided in this specification;

[0027] FIG4 is a schematic diagram of an electronic device provided in this specification corresponding to FIG1 . DETAILED DESCRIPTION

[0028] To make the objectives, technical solutions, and advantages of this specification more clear, the following will clearly and completely describe the technical solutions of this specification in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.

[0029] Common solutions for optimizing model performance include reducing the length of the output sequence. For example, at deeper layers, words in the sequence are randomly discarded, or certain words are discarded through computational decision-making, thereby reducing sequence length and computational overhead. However, different layers focus on different semantic information, and simply discarding words can lead to poor modeling results in subsequent layers.

[0030] The technical solutions provided by the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0031] FIG1 is a flowchart of a task execution method provided in this specification, including the following steps S100 to S106 .

[0032] S100: Receive a task execution request for target data.

[0033] In the Transformer network, self-attention mechanism calculations are performed between layers. Assuming that the length of the input feature sequence is N, an N*N self-attention weight matrix will be calculated, which means the degree of correlation between the data at each position and the data at other positions. After that, the representation information of each position can be updated by weighted summation. In this process, the length of the input feature sequence and the output feature sequence remains unchanged.

[0034] For this reason, as the length of the model input sequence increases, the model's computational complexity increases quadratically. Existing model performance optimization solutions typically randomly discard features from the sequence at deeper layers in the model, or calculate and decide to discard certain features, thereby reducing the length of the feature sequence and lowering computational overhead. However, because different network layers in the model focus on different semantic information, directly discarding features can introduce errors and affect model accuracy.

[0035] Based on this, this specification provides a task execution method, in which the business model fuses features of lower importance during feature extraction, thereby effectively retaining their semantics while reducing the length of the data sequence required to be calculated in the next network layer, thereby reducing the computational overhead of the business model.

[0036] In this specification, the execution subject for implementing a task execution method can be a designated device such as a server. For the convenience of description, the following only takes the server as the execution subject as an example to illustrate a task execution method provided in this specification.

[0037] The server may receive a task execution request for target data, which may include text data and image data, and of course, other types of data such as audio data, which are not specifically limited in this specification.

[0038] S102: According to the task execution request, the target data is input into a preset business model so that the business model determines the data units contained in the target data, and for each data unit, according to the degree of association between the data unit and other data units in the target data, determines the data feature corresponding to the data unit and the first weight corresponding to the data unit, wherein the first weight is used to characterize the importance of the data unit relative to the target data.

[0039] The server can input the target data carried in the task execution request into the preset business model based on the received task execution request. The server can then determine the data units contained in the target data through the business model, and encode each data unit to obtain the initial features (tokens) corresponding to each data unit.

[0040] In this specification, the model structure of the business model may be the Transformer network mentioned in step S100 , and for different types of business data, the tasks performed by the business model and the data units divided therein may also be different.

[0041] For example, when the target data is text data, the business model can be a text recognition model. Each data unit corresponds to a character or word in the position sequence of the text data. Accordingly, each token corresponds to a word vector or character vector. The business model can perform text recognition on the target data based on the text features finally extracted.

[0042] For another example, when the target data is image data, the business model can be a target recognition model, where each data unit corresponds to an image block in a different area of ​​the image data. Accordingly, each token corresponds to a vector of an image block. The business model can perform target recognition on the target data based on the image features finally extracted.

[0043] In practical applications, the Transformer network is internally equipped with multiple data processing network layers (L, L+1, L+2...L+N) for feature extraction. Taking the data processing network layer L as an example, the data processing network layer will calculate the self-attention weight of the input feature sequence, and then perform weighted summation on each token according to the calculated weight matrix, thereby outputting the updated feature sequence and serving as the input of the L+1 layer. The L+1 layer repeats the above operation and inputs the updated features into the next network layer until the L+N layer outputs the final data features.

[0044] In the above process, the computational complexity of each network layer increases quadratically with the length of the feature sequence. Therefore, this manual proposes the following solutions to reduce the computational complexity of the model:

[0045] For the network layer L used for data processing, after the server inputs the initial feature sequence corresponding to each data unit into the network layer L, for each data unit, the server can determine the second weight of each data unit relative to the data unit based on the degree of association between each data unit including the data unit and the data unit.

[0046] The server can then determine the first weight corresponding to each data unit based on the sum of the second weights of each data unit relative to the data unit. The larger the first weight, the greater the contribution of the data unit to the semantics of the target data, and the greater its importance to the target data. The smaller the first weight, the smaller the contribution of the data unit to the semantics of the target data, and the smaller its importance to the target data.

[0047] In other words, for data unit a and any data unit a n , a n The greater the correlation between a and n The larger the second weight relative to a, the smaller it is. n The second weights relative to data unit a are w1, w2, w3...w n , then the first weight w can be expressed as: w=w1+w2+w3+……+w n

[0048] Furthermore, the server may determine the data feature corresponding to each data unit according to each second weight and each initial feature.

[0049] Specifically, for data unit a, the server can n ) and data unit a, performs a weighted summation on the initial features of each data unit, and determines the data feature corresponding to data unit a based on the weighted result. Of course, the server can also determine the data feature corresponding to data unit a based on the weighted result and the initial feature corresponding to data unit a.

[0050] S104: Fusing data features corresponding to data units having a first weight less than a preset weight threshold to obtain a fused feature.

[0051] The server can fuse the data features corresponding to the data units that contribute less to the overall semantics of the target data, thereby reducing the number of output data features without losing the semantics of these data units.

[0052] Specifically, the server may determine the data features corresponding to the data units having a first weight less than a preset weight threshold from among the data features extracted by the data processing network layer L, and fuse these data features to obtain the fused features.

[0053] Furthermore, the server can determine the number of groups according to the accuracy of the network parameters in the business model, and then group the data features corresponding to each data unit whose first weight is less than the preset weight threshold according to the number of groups, and for each group, fuse the data features in the group to obtain the fused features corresponding to the group.

[0054] Among them, the higher the accuracy of the network parameters in the business model, the better the feature extraction effect, and the less semantic information is lost when fusing the data features.

[0055] Therefore, when the business model has high-precision network parameters, a smaller number of groups can be set, and the number of features that need to be fused in each group is relatively large, thereby fusing more data features into one feature, further improving the computational efficiency of the model.

[0056] When the business model has lower-precision network parameters, a larger number of groups can be set, and the number of features to be fused in each group is relatively small, thereby merging fewer data features into one feature. This improves the model's computational efficiency while ensuring the accuracy of the model's output results. For example, the number of features to be fused in each group can be set to 2, that is, the data features corresponding to every two data units whose first weight is less than a preset weight threshold are fused as a group, wherein the server can group the two data features that are closest to each other.

[0057] Of course, the number of features that need to be fused in each group can also be set according to actual conditions. The more the number of fusions in each group, the fewer the number of features output by the data processing network layer L, and the higher the computational efficiency of the model, but the accuracy of the extracted features will decrease; the fewer the number of fusions in each group, the more the number of features output by the data processing network layer L, and the lower the computational efficiency of the model, but the accuracy of the extracted features will increase.

[0058] It should be noted that, for the features to be fused in each group, the server may perform weighted summation of the features to be fused according to the first weight corresponding to each feature to be fused, thereby obtaining the fused feature.

[0059] In addition, the server can also determine the third weight corresponding to each feature to be fused based on the first weight corresponding to each feature to be fused, and then obtain the fused feature based on the third weight corresponding to each feature to be fused, wherein, for any group of features to be fused, the sum of the third weights of the group of features to be fused is 1.

[0060] Of course, the server may also set equal weights for each data feature, and the sum of these weights is 1, and then fuse the data features through these equal weights.

[0061] S106: Determine a target feature corresponding to the target data according to the fused feature and the unfused data features, so as to execute a task according to the target feature.

[0062] The server can input the fused features output by the data processing network layer L and the unfused data features into the next network layer (L+1), and repeat the above steps in the (L+1) layer to update the data features output by the L layer. After that, the (L+1) layer will continue to input the updated data features into the next network layer until the final feature data output by the last data processing network layer (L+N layer) is obtained, and the feature data output by the last data processing network layer is used as the target feature.

[0063] For ease of understanding, this specification provides a schematic diagram of a feature fusion process, as shown in FIG2 .

[0064] FIG2 is a schematic diagram of a feature fusion process provided in this specification.

[0065] For features a1-a8 input to layer L, layer L can perform weighted summation using the self-attention matrix to obtain updated features b1-b8, where the first weights corresponding to features b2, b5, b6, and b8 are all less than the preset weight threshold. The server can perform pairwise fusion, fusing features b2 and b5 into c1 and features b6 and b8 into c2. It then inputs the unfused features b1, b3, b4, and b7, as well as the fused features c1 and c2, as target features into layer L+1.

[0066] In this specification, for any data processing network layer, a linear network layer can be additionally set in the network layer. Taking network layer L as an example, for each data unit, after the data processing network layer L extracts the data features corresponding to the data unit, the data features can be input into the linear network layer in the data processing network layer L, so that the data features are reduced in dimension through the linear network layer to obtain the reduced-dimensional features corresponding to the data unit.

[0067] For example, assuming that the feature dimension of the data feature is n*d, and the dimension corresponding to the mapping unit is k*n, where k<n, after inputting the data feature into the mapping unit, a k*d-dimensional reduced feature can be obtained. The mapping unit can be a linear mapping unit (k=1), and after inputting the data feature into the linear mapping unit, a d-dimensional linear feature can be obtained.

[0068] The server can then fuse the dimensionality reduction features corresponding to each data unit whose first weight is less than the preset weight threshold to obtain a fused feature, and then determine the target feature corresponding to the target data based on the fused feature and the unfused dimensionality reduction features.

[0069] After determining the target feature corresponding to the target data, the server can execute the task based on the target feature.

[0070] For example, when the business scenario is an intelligent customer service scenario, the target data can be the query text entered by the user. The server can determine the text features corresponding to the query text through the L~L+N layers of the business model, and then generate a reply based on the text features or determine the information the user wants to query and feedback it to the user.

[0071] For another example, when the business scenario is a target detection scenario, the target data can be the image to be detected collected by the sensor. The server can determine the image features corresponding to the image to be detected through the L~L+N layers of the business model, and then determine the information of the target object contained in the image to be detected based on the image features (such as classification, position, size, etc.).

[0072] It should be noted that the business model described herein may also include a corresponding output layer. This allows the server to input the target features output by multiple data processing network layers into this output layer, which then outputs the final task execution results. Of course, a business model can also be used solely to output target features, which the server can then input into another task model to execute subsequent tasks.

[0073] In addition, before using the above-mentioned business model, the server may train the business model, wherein the server may obtain historical business data, and then input the historical business data into the business model to be trained, so as to determine the data units contained in the historical business data through the business model; for each data unit in the historical business data, the server may determine the historical data feature corresponding to the data unit and the first weight corresponding to the data unit based on the degree of association between the data unit and each data unit in the target data, wherein the first weight is used to characterize the importance of the data unit relative to the historical business data.

[0074] The server can fuse the historical data features corresponding to each historical data unit whose first weight is less than a preset weight threshold to obtain each historical fusion feature; determine the historical target feature corresponding to the target data based on each historical fusion feature and each historical data feature that has not been fused, and then execute the task according to the historical target feature to obtain a prediction result.

[0075] The server can train the business model with the optimization goal of minimizing the deviation between the above-mentioned prediction results and the actual task execution results corresponding to the historical business data.

[0076] As can be seen from the above method, this solution can address the computational cost problem in the Transformer network and propose a solution that uses attention matrices to fuse features between layers. While effectively retaining semantic information, it reduces the length of the sequence that needs to be calculated in the next layer. This effectively reduces the computational overhead of the network while ensuring semantic parsing performance, contributing to green computing.

[0077] In this specification, the execution entity of the code testing method may refer to a designated device such as a server set up on the business platform. For the sake of convenience of description, this specification only takes the server as the execution entity as an example to illustrate a code testing method provided in this specification.

[0078] The above are one or more methods for implementing task execution in this specification. Based on the same idea, this specification also provides a corresponding task execution device, as shown in Figure 3.

[0079] FIG3 is a schematic diagram of a task execution device provided in this specification, including:

[0080] A receiving module 300 is configured to receive a task execution request for target data;

[0081] An input module 302 is configured to input the target data into a preset business model according to the task execution request, so that the business model determines each data unit included in the target data, and for each data unit, determines a data feature corresponding to the data unit and a first weight corresponding to the data unit based on a degree of association between the data unit and each data unit in the target data, wherein the first weight is used to represent the importance of the data unit relative to the target data;

[0082] A fusion module 304 is configured to fuse data features corresponding to data units having a first weight less than a preset weight threshold to obtain a fused feature;

[0083] The execution module 306 is configured to determine a target feature corresponding to the target data according to the fused feature and the unfused data features, so as to execute a task according to the target feature.

[0084] Optionally, the input module 302 is specifically used to determine the second weights of each data unit relative to the data unit based on the degree of association; determine the first weight based on the second weights; and determine the data features corresponding to the data unit based on the second weights and the initial features corresponding to each data unit.

[0085] Optionally, the fusion module 304 is specifically used to, for each data unit, perform dimensionality reduction processing on the data features corresponding to the data unit through the linear network layer preset in the business model to obtain the reduced dimensionality features corresponding to the data unit; and fuse the reduced dimensionality features corresponding to each data unit whose first weight is less than a preset weight threshold to obtain a fused feature.

[0086] Optionally, the fusion module 304 is specifically used to determine the number of groups according to the accuracy of the network parameters in the business model; group the data features corresponding to each data unit whose first weight is less than a preset weight threshold according to the number of groups, and for each group, fuse the data features in the group to obtain the fusion features corresponding to the group.

[0087] Optionally, the execution module 306 is specifically used to, for each data processing network layer included in the business model, input the fused features output by the previous data processing network layer and the unfused data features as the input features corresponding to the data processing network layer into the data processing network layer, so that the data processing network layer determines, for each input feature, the data features output by the data processing network layer for the input feature and the first weight corresponding to the input feature unit according to the degree of correlation between the input feature and each input feature; fuse the data features output by the data processing network layer whose first weight is less than a preset weight threshold to obtain the fused features output by the data processing network layer, and input the data features and fused features output by the data processing network layer into the next network layer for processing, until the feature data output by the last data processing network layer is obtained, and the feature data output by the last data processing network layer is used as the target feature.

[0088] Optionally, the target data includes text data or image data.

[0089] This specification also provides a computer-readable storage medium, which stores a computer program. The computer program can be used to execute a task execution method provided in FIG. 1 above.

[0090] This specification also provides a schematic structural diagram of an electronic device corresponding to Figure 1, as shown in Figure 4. As shown in Figure 4, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and of course may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the task execution method described in Figure 1 above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0091] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages ​​and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0092] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0093] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0094] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0095] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0096] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0097] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0098] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.

[0099] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0100] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0101] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0102] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0103] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0104] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0105] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0106] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A task execution method, comprising: Receiving a task execution request for target data; According to the task execution request, inputting the target data into a preset service model, so that the service model determines each data unit included in the target data, and for each data unit, according to the association degree between this data unit and each data unit in the target data, determining the data feature corresponding to this data unit and the first weight corresponding to this data unit, where the first weight is used to characterize the importance degree of this data unit relative to the target data; Fusing the data features corresponding to the data units with the first weight less than a preset weight threshold to obtain a fused feature; Determining the target feature corresponding to the target data according to the fused feature and the data features that are not fused, so as to execute the task according to the target feature.

2. The method according to claim 1, for each data unit, determining the data feature corresponding to this data unit and the first weight corresponding to this data unit according to the association degree between this data unit and each data unit in the target data, specifically including: Determining each second weight of each data unit relative to this data unit according to the association degree; Determining the first weight according to the second weights, and determining the data feature corresponding to this data unit according to the second weights and the initial feature corresponding to each data unit.

3. The method according to claim 1, fusing the data features corresponding to the data units with the first weight less than a preset weight threshold to obtain a fused feature, specifically including: For each data unit, performing dimensionality reduction processing on the data feature corresponding to this data unit through a preset linear network layer in the service model to obtain the dimensionality-reduced feature corresponding to this data unit; Fusing the dimensionality-reduced features corresponding to the data units with the first weight less than a preset weight threshold to obtain a fused feature.

4. The method according to claim 1, fusing the data features corresponding to the data units with the first weight less than a preset weight threshold to obtain each fused feature, specifically including: Determining the number of groups according to the precision of the network parameters in the service model; Grouping the data features corresponding to the data units with the first weight less than a preset weight threshold according to the number of groups, and for each group, fusing the data features in this group to obtain the fused feature corresponding to this group.

5. The method according to claim 1, determining the target feature corresponding to the target data according to the fused feature and the data features that are not fused, specifically including: For each data processing network layer included in the service model, taking the fused feature output by the previous data processing network layer and the data features that are not fused as the input features corresponding to this data processing network layer and inputting them into this data processing network layer, so that for each input feature, according to the association degree between this input feature and each input feature, this data processing network layer determines the data feature output by this data processing network layer for this input feature and the first weight corresponding to this input feature unit; Fuse the data features whose first weights output by the data processing network layer are less than the preset weight threshold to obtain the fused features output by the data processing network layer, and input the data features and the fused features output by the data processing network layer into the next network layer for processing until the feature data output by the last data processing network layer is obtained, so as to use the feature data output by the last data processing network layer as the target feature.

6. The method according to any one of claims 1 to 5, wherein the target data includes: Text data or image data.

7. A task execution device, comprising: A receiving module, configured to receive a task execution request for target data; An input module, configured to input the target data into a preset service model according to the task execution request, so that the service model determines each data unit included in the target data, and for each data unit, determine the data feature corresponding to the data unit and the first weight corresponding to the data unit according to the association degree between the data unit and each data unit in the target data, where the first weight is used to characterize the importance of the data unit relative to the target data; A fusion module, configured to fuse the data features corresponding to the data units whose first weights are less than the preset weight threshold to obtain fused features; An execution module, configured to determine the target feature corresponding to the target data according to the fused features and the data features that are not fused, so as to execute a task according to the target feature.

8. The device according to claim 7, wherein the input module is specifically configured to determine each second weight of each data unit relative to the data unit according to the association degree; determine the first weight according to the second weights; and determine the data feature corresponding to the data unit according to the second weights and the initial feature corresponding to each data unit.

9. The device according to claim 7, wherein the fusion module is specifically configured to, for each data unit, perform dimensionality reduction processing on the data feature corresponding to the data unit through a preset linear network layer in the service model to obtain the dimensionality reduction feature corresponding to the data unit; and fuse the dimensionality reduction features corresponding to the data units whose first weights are less than the preset weight threshold to obtain fused features.

10. The device according to claim 7, wherein the fusion module is specifically configured to determine the number of groups according to the precision of the network parameters in the service model; group the data features corresponding to the data units whose first weights are less than the preset weight threshold according to the number of groups, and for each group, fuse the data features in the group to obtain the fused feature corresponding to the group.

11. The device according to claim 7, wherein the execution module is specifically configured to, for each data processing network layer included in the service model, input the fused features output by the previous data processing network layer and each data feature that has not been fused as the respective input features corresponding to this data processing network layer into this data processing network layer, so that for each input feature, this data processing network layer determines the data feature output by this data processing network layer for this input feature and the first weight corresponding to this input feature unit according to the degree of association between this input feature and each input feature; fuse the data features with the first weight less than a preset weight threshold output by this data processing network layer to obtain the fused features output by this data processing network layer, and input the data features and fused features output by this data processing network layer into the next network layer for processing until the feature data output by the last data processing network layer is obtained, so as to use the feature data output by the last data processing network layer as the target feature.

12. A computer-readable storage medium storing a computer program, which when executed by a processor, implements the method according to any one of claims 1 to 6 above.

13. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the method according to any one of claims 1 to 6 above.

Citation Information

Patent Citations

  • Video granularity feature determination method and device and computer readable storage medium

    CN110807437A

  • Feature extraction method, device and equipment, readable storage medium and program product

    CN115859169A

  • Task execution method and device, storage medium and electronic equipment

    CN117931400A

  • Guided training of machine learning models with convolution layer feature data fusion

    US20210150347A1