Data processing method and related device thereof

By preprocessing the data using the first sub-model of the data processing model in the cloud management platform and matching the output vector from the vector set, the processing of the second sub-model is skipped, thus solving the problem of high computational cost caused by multiple neural network layers and achieving the effect of reducing data processing costs.

WO2026066149A1PCT designated stage Publication Date: 2026-04-02HUAWEI CLOUD COMPUTING TECHNOLOGIES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In existing technologies, user data processing involves processing multiple neural network layers, resulting in high computational load and excessive costs.

Method used

By acquiring the data processing model from the cloud management platform, the first sub-model is used to preprocess the data, generating an input vector to be input into the second sub-model. The corresponding output vector is then matched from a preset vector set, skipping the processing of the second sub-model and directly using the output vector to obtain the data processing result.

Benefits of technology

This reduces the amount of computation involved in data processing and lowers the cost of data processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025096317_02042026_PF_FP_ABST
    Figure CN2025096317_02042026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the present application are a data processing method and a related device thereof, which can reduce the computational load of a data processing process, thereby reducing the cost of data processing. The method of the present application comprises: when a certain piece of data of a user needs to be processed, first acquiring a data processing model, which may include a first sub-model and a second sub-model; next, inputting the data into the first sub-model, so as to use the first sub-model to convert the data into a first input vector to be input into the second sub-model; then, acquiring from a preset vector set a second input vector matching the first input vector, and a first output vector corresponding to the second input vector; and subsequently, using the first output vector as an output of the second sub-model, and then using the first output vector to acquire the processing result of the data. At this point, a processing process for the data is completed.
Need to check novelty before this filing date? Find Prior Art

Description

Data processing method and related device thereof

[0001] The present application claims priority from the Chinese patent application No. 202411336369.X filed on September 24, 2024, and entitled "A data processing method and related device thereof", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0002] Embodiments of the present application relate to the field of cloud technology, and in particular to a data processing method and related device thereof. BACKGROUND

[0003] With the rapid development of cloud technology, more and more users choose to deploy their data processing business in the cloud to complete data processing through the resources of the cloud, thereby meeting the data processing needs of users.

[0004] In related technologies, the data processing business of users often involves neural network models, so users can deploy the models on the resources of the cloud and provide data to these resources to enable these resources to complete data processing through the models. Specifically, the model often contains multiple neural network layers, and since the multiple neural network layers are stacked in sequence, the data of the user can obtain the final data processing result after being processed by the multiple neural network layers and returned to the user for use.

[0005] In the above process, different neural network layers in the model can process data differently, and most neural network layers involve a large amount of computation in the process of data processing, resulting in high cost of the entire data processing process. SUMMARY

[0006] Embodiments of the present application provide a data processing method and related device thereof, which can reduce the amount of computation in the data processing process, thereby reducing the cost of data processing.

[0007] A first aspect of embodiments of the present application provides a data processing method, which can be executed by a cloud management platform in a cloud service system or by an infrastructure managed by the cloud management platform, and the method comprises:

[0008] After receiving the data required to be processed by the user, a data processing model previously set can be obtained, wherein the data processing model can include a first sub-model and a second sub-model connected in series, the first sub-model is mainly used for pre-processing the data, and the second sub-model is mainly used for complex processing of the data. Generally, the data processing model is usually a trained neural network model, which can include a plurality of neural network layers, so the first sub-model can include at least one neural network layer of the plurality of neural network layers, and the second sub-model can include at least one neural network layer of the plurality of neural network layers.

[0009] After obtaining the data and the data processing model, the data can be input into the data processing model. After receiving the data, the first sub-model in the data processing model can pre-process the data to obtain a first input vector to be input into the second sub-model. The pre-processing operation can include a mapping operation and the like.

[0010] After obtaining the first input vector, a preset vector set can be obtained, and it is detected whether there is a second input vector matching the first input vector in the vector set. If there is a second input vector, the cloud management platform can also obtain a first output vector corresponding to the second output vector from the vector set. It should be noted that the vector set includes a plurality of vector pairs, each vector pair includes an input vector and an output vector corresponding to the input vector, and the output vector is a vector obtained by processing the input vector by the second sub-model. Since the vector pair formed by the second input vector and the first output vector is one of the plurality of vector pairs, the first output vector can be regarded as a vector obtained by processing the second input vector by the second sub-model.

[0011] Since the first output vector is the result obtained by processing the second input vector by the second sub-model, the first output vector can be regarded as the result obtained by processing the first input vector by the second sub-model, that is, the first output vector is regarded as the output of the second sub-model, and the processing of the first input vector by the second sub-model is directly skipped. After obtaining the first output vector, the processing result of the data can be obtained based on the first output vector. Thus, the data processing requirement of the user can be met.

[0012] As can be seen from the above method, according to the conventional data processing procedure, the data needs to be sequentially preprocessed by the first sub-model of the data processing model and complexly processed by the second sub-model, but after the data is processed by the first sub-model to obtain the first input vector to be input to the second sub-model, the second input vector matching the first input vector and the first output vector corresponding to the second input vector can be obtained from the vector set, since the first output vector is the result obtained by processing the second input vector by the second sub-model in advance, the first output vector can be used as the result obtained by processing the first input vector by the second sub-model to skip the complex processing of the first input vector by the second sub-model, and then the first output vector is used to obtain the processing result of the data. As can be seen, in the processing of the data, the data does not need to be processed by the entire data processing model, can skip the processing of part of the sub-models (i.e. the second sub-model mentioned above), can reduce the calculation amount of part of the data processing process, and thus reduces the cost of data processing.

[0013] In a possible implementation manner, the method further includes: obtaining sample data; pre-processing the sample data by the first sub-model to obtain a second input vector; processing the second input vector by the second sub-model to obtain a first output vector; and storing the second input vector and the first output vector in the vector set. In the foregoing implementation manner, when the vector set needs to be created, a sample data set can be obtained, and the sample data set can include a plurality of sample data. For any one of the plurality of sample data, the cloud management platform can input the sample data to the data processing model to pre-process the sample data by the first sub-model of the data processing model, so as to obtain a second input vector to be input to the second sub-model. Then, the cloud management platform can input the second input vector to the second sub-model by the first sub-model, so that the second sub-model processes the second input vector to obtain a first output vector. Then, the second input vector and the first output vector are a vector pair generated by the second sub-model, and the cloud management platform can store the vector pair in the vector set. For the remaining sample data, similar operations can be performed, and therefore a plurality of vector pairs can be stored in the vector set in total, so as to be matched when data is processed subsequently, so as to determine whether to skip the processing of the second sub-model, thereby reducing the cost of data processing.

[0014] In a possible implementation, the method further includes: obtaining a prediction processing result of the sample data based on the first output vector; and obtaining a target loss based on the prediction processing result and a real processing result of the sample data, the target loss being used to indicate a difference between the prediction processing result and the real processing result. The obtaining the processing result of the data based on the first output vector includes: adjusting the first output vector based on the target loss to obtain an adjusted first output vector; and obtaining the processing result of the data based on the adjusted first output vector. In the foregoing implementation, for the sample data, the first sub-model and the second sub-model of the data processing model are used to process the sample data, and the second sub-model can output the first output vector based on which the prediction processing result of the sample data is obtained. Since the sample data set further includes the real processing result of the sample data, the cloud management platform can calculate the prediction processing result of the sample data and the real processing result of the sample data to obtain the loss corresponding to the sample data. The same is true for the remaining sample data, and therefore the losses corresponding to the plurality of sample data can be finally obtained, which are the target losses and are used to indicate the difference between the prediction processing results of the plurality of sample data and the real processing results of the plurality of sample data. When the data processing model is used to process the data of the user, the first sub-model can pre-process the data to obtain the first input vector input to the second sub-model. Since the first input vector matches the second input vector and the second input vector corresponds to the first output vector, the first output vector can be used as the result of processing the first input vector by the second sub-model. In order to make the processing result of the data have better quality, the first output vector can be adjusted based on the target loss to obtain the adjusted first output vector. In this way, the processing result of the data can be obtained based on the adjusted first output vector, so that the processing result of the data has better accuracy.

[0015] In a possible implementation, the matching of the first input vector and the second input vector includes that a similarity between the first input vector and the second input vector is greater than or equal to a preset similarity threshold. In the foregoing implementation, since the vector set includes a plurality of vector pairs, after the first input vector is obtained, the similarity between the input vector in each vector pair and the first input vector can be calculated one by one. If the similarity between the input vector in a certain vector pair and the first input vector is greater than the similarity threshold, the input vector can be determined as the second input vector.

[0016] In a possible implementation, the method further includes: receiving an accuracy of the processing result sent by the user; if the accuracy is greater than or equal to a preset upper limit of the accuracy, decreasing the similarity threshold to obtain a decreased similarity threshold; if the accuracy is less than or equal to a preset lower limit of the accuracy, increasing the similarity threshold to obtain an increased similarity threshold, and the lower limit of the accuracy is less than the upper limit of the accuracy. In the foregoing implementation, because the data comes from the user, after obtaining the processing result of the data, the processing result of the data can be returned to the user. After using the processing result of the data, the user can return the accuracy of the processing result of the data. If the accuracy is greater than or equal to the preset upper limit of the accuracy, the similarity threshold is decreased, and the decreased similarity threshold is obtained. In this way, the decreased similarity threshold can reduce the difficulty of matching the input vector from the vector set in the subsequent process, thereby increasing the probability of skipping the processing of the input vector by the sub-model, and being beneficial to further reducing the cost required by data processing. If the accuracy is less than or equal to the preset lower limit of the accuracy, the similarity threshold is increased, and the increased similarity threshold is obtained. In this way, the increased similarity threshold can increase the difficulty of matching the input vector from the vector set in the subsequent process, thereby reducing the probability of skipping the processing of the input vector by the sub-model, and being beneficial to improving the accuracy of the result of data processing.

[0017] In a possible implementation, the processing result of the data based on the output vector comprises: determining the first output vector as the processing result of the data; or determining the first output vector as a third input vector to be input to the third sub-model; if there is a fourth input vector matching the third input vector in the vector set, obtaining a second output vector corresponding to the fourth input vector from the vector set, the second output vector being a vector obtained by processing the fourth input vector by the third sub-model; obtaining the processing result based on the second output vector; or determining the first output vector as a third input vector to be input to the third sub-model of the data processing model; processing the third input vector by the third sub-model to obtain a third output vector; and obtaining the processing result based on the third output vector. In the foregoing implementation, when the data processing model only comprises the first sub-model and the second sub-model, the first output vector can be directly determined as the processing result of the data. When the data processing model comprises the first sub-model, the second sub-model, and the third sub-model, the first output vector can be determined as a third input vector to be input to the third sub-model. If there is a fourth input vector matching the third input vector in the vector set, a second output vector corresponding to the fourth input vector can be obtained from the vector set, and the second output vector can be used as a result obtained by processing the third input vector by the third sub-model, and the processing of the third input vector by the third sub-model can be skipped. In this way, the processing result of the data can be obtained based on the second output vector. When the data processing model comprises the first sub-model, the second sub-model, and the third sub-model, the first output vector can also be determined as a third input vector to be input to the third sub-model of the data processing model, and the third input vector can be directly input to the third sub-model to process the third input vector by the third sub-model, thereby obtaining a third output vector. In this way, the processing result of the data can be obtained based on the third output vector. As can be seen, for the data processing model, different model processing strategies can be formulated, which can indicate which part of the sub-models in the data processing model needs to be skipped and which part of the sub-models in the data processing model does not need to be skipped, so that various processing modes can be implemented in the data processing process, and the flexibility of the scheme can be improved.

[0018] In a possible implementation, the infrastructure comprises a first computing device and a second computing device, the first computing device is configured to execute the method, and the second computing device is configured to store the vector set and provide the vector set for the first computing device.

[0019] A second aspect of the embodiments of the present application provides a data processing apparatus, which is arranged in a cloud management platform or an infrastructure managed by the cloud management platform, and the infrastructure is configured to provide cloud services for a user. The apparatus comprises: a first obtaining module configured to obtain data to be processed from the user and a data processing model, the data processing model comprising a first sub-model and a second sub-model connected in series, the data processing model comprising a plurality of neural network layers, the first sub-model comprising at least one neural network layer in the plurality of neural network layers, and the second sub-model comprising at least one neural network layer in the plurality of neural network layers; a first preprocessing module configured to input the data into the first sub-model in the data processing model to pre-process the data by the first sub-model in the data processing model to obtain a first input vector to be input into the second sub-model, the pre-processing comprising mapping; a second obtaining module configured to, if a second input vector matching the first input vector exists in a preset vector set, obtain a first output vector corresponding to the second input vector from the vector set, wherein the vector set comprises a plurality of vector pairs, each vector pair comprising an input vector and an output vector corresponding to the input vector, the output vector being a vector obtained by processing the input vector by the second sub-model, and the vector pair formed by the second input vector and the first output vector being one of the plurality of vector pairs; and a third obtaining module configured to determine the first output vector as an output of the second sub-model, and obtain a processing result of the data based on the first output vector.

[0020] In a possible implementation, the apparatus further comprises: a fourth obtaining module configured to obtain sample data; a second preprocessing module configured to pre-process the sample data by the first sub-model to obtain the second input vector; a processing module configured to process the second input vector by the second sub-model to obtain the first output vector; and a storage module configured to store the second input vector and the first output vector in the vector set.

[0021] In a possible implementation, the apparatus further comprises: a fifth obtaining module configured to obtain a predicted processing result of the sample data based on the first output vector; a sixth obtaining module configured to obtain a target loss based on the predicted processing result and an actual processing result of the sample data, the target loss being configured to indicate a difference between the predicted processing result and the actual processing result; and the third obtaining module is configured to: adjust the first output vector based on the target loss to obtain an adjusted first output vector; and obtain the processing result of the data based on the adjusted first output vector.

[0022] In a possible implementation, the first input vector matches the second input vector comprises that a similarity between the first input vector and the second input vector is greater than or equal to a preset similarity threshold.

[0023] In a possible implementation, the apparatus further includes a receiving module configured to receive an accuracy of the processing result sent by the user; a decreasing module configured to decrease the similarity threshold if the accuracy is greater than or equal to a preset upper limit of the accuracy, to obtain a decreased similarity threshold; and an increasing module configured to increase the similarity threshold if the accuracy is less than or equal to a preset lower limit of the accuracy, to obtain an increased similarity threshold, the lower limit of the accuracy being less than the upper limit of the accuracy.

[0024] In a possible implementation, the third obtaining module is configured to determine the first output vector as the processing result of the data.

[0025] In a possible implementation, the third obtaining module is configured to: determine the first output vector as a third input vector to be input to the third sub-model; if there is a fourth input vector matching the third input vector in the vector set, obtain a second output vector corresponding to the fourth input vector in the vector set, the second output vector being a vector obtained by processing the fourth input vector by the third sub-model; and obtain the processing result based on the second output vector.

[0026] In a possible implementation, the third obtaining module is configured to: determine the first output vector as a third input vector to be input to the third sub-model of the data processing model; process the third input vector by the third sub-model to obtain a third output vector; and obtain the processing result based on the third output vector.

[0027] In a possible implementation, the infrastructure includes the first computing device and the second computing device, the first computing device includes the apparatus, and the second computing device is configured to store the vector set and provide the vector set for the apparatus in the first computing device.

[0028] A third aspect of the embodiment of the present application provides a computing device cluster, the computing device cluster including at least one computing device, each computing device including a processor and a memory: the memory is configured to store instructions; and the processor is configured to execute the instructions to cause the computing device cluster to perform the method in the first aspect or any possible implementation manner of the first aspect.

[0029] A fourth aspect of the embodiment of the present application provides a computer storage medium, the computer storage medium storing one or more instructions, the instructions causing one or more computers to implement the method in the first aspect or any possible implementation manner of the first aspect when executed by the one or more computers.

[0030] A fifth aspect of the embodiment of the present application provides a computer program product, the computer program product storing instructions, the instructions causing a computer to implement the method in the first aspect or any possible implementation manner of the first aspect when executed by the computer.

[0031] In the embodiments of the present application, when a certain data of a user needs to be processed, a data processing model can be acquired first. The data processing model can include a first sub-model and a second sub-model. The data processing model can include a plurality of neural network layers. The first sub-model includes a part of the plurality of neural network layers. The second sub-model includes another part of the plurality of neural network layers. Then, the data can be input into the first sub-model to convert the data into a first input vector to be input into the second sub-model by using the first sub-model. Then, a second input vector matched with the first input vector and a first output vector corresponding to the second input vector can be acquired from a preset vector set. Subsequently, the first output vector can be used as an output of the second sub-model, and the first output vector can be used to acquire a processing result of the data. Thus, the processing of the data is completed. In the foregoing process, according to a conventional data processing procedure, the data needs to be processed by the first sub-model of the data processing model and the second sub-model of the data processing model in sequence. However, after the data is processed by the first sub-model to obtain the first input vector to be input into the second sub-model, the second input vector matched with the first input vector and the first output vector corresponding to the second input vector can be acquired from the vector set. Since the first output vector is a result obtained by processing the second input vector by the second sub-model in advance, the first output vector can be used as a result obtained by processing the first input vector by the second sub-model to skip the complex processing of the first input vector by the second sub-model, and the first output vector can be used to acquire the processing result of the data. Therefore, in the processing of the data, the data does not need to be processed by the entire data processing model, and the processing of a part of the sub-model (i.e., the second sub-model) can be skipped. Thus, the calculation amount of the data processing procedure can be reduced, and the cost of data processing can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0032] FIG. 1 is a structural schematic diagram of a cloud service system according to an embodiment of the present application;

[0033] FIG. 2 is a structural schematic diagram of a cloud management platform according to an embodiment of the present application;

[0034] FIG. 3 is another structural schematic diagram of a cloud service system according to an embodiment of the present application;

[0035] FIG. 4 is another structural schematic diagram of a cloud service system according to an embodiment of the present application;

[0036] FIG. 5 is a flowchart of a data processing method according to an embodiment of the present application;

[0037] FIG. 6a is a structural schematic diagram of a cloud management platform according to an embodiment of the present application;

[0038] FIG. 6b is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0039] FIG. 6c is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0040] FIG. 7a is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0041] FIG. 7b is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0042] FIG. 8a is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0043] FIG. 8b is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0044] FIG. 9 is another structural diagram of a cloud management platform according to an embodiment of the present application;

[0045] FIG. 10 is a diagram of a comparison result according to an embodiment of the present application;

[0046] FIG. 11 is another diagram of a comparison result according to an embodiment of the present application;

[0047] FIG. 12 is a structural diagram of a data processing apparatus according to an embodiment of the present application;

[0048] FIG. 13 is a structural diagram of a computing device according to an embodiment of the present application;

[0049] FIG. 14 is a structural diagram of a computing device cluster according to an embodiment of the present application;

[0050] FIG. 15 is a diagram of a network connection of computing devices in a computer cluster according to an embodiment of the present application. DETAILED DESCRIPTION

[0051] The embodiments of the present application provide a data processing method and related devices, which can reduce the computation amount of data processing and thus reduce the cost of data processing.

[0052] The terms "first", "second", and the like in the description and in the claims of the present application and above-described drawings are used to distinguish similar objects and are not necessarily used to describe a specific sequential or chronological order. It should be understood that terms so used are interchangeable under appropriate circumstances and are merely employed in the descriptions of embodiments of the present application for purposes of the description. Additionally, the terms "comprise", "have" and any variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of elements is not necessarily limited to those elements, but can include other elements not expressly listed or inherent to such process, method, system, article, or apparatus.

[0053] With the rapid development of cloud technology, more and more users choose to deploy their data processing services in the cloud to complete data processing through the resources of the cloud, thereby meeting the data processing needs of users.

[0054] In the related art, the data processing service of a user often involves a neural network model, so the user can deploy the model on the resources of the cloud and provide data to these resources, so that these resources complete data processing through the model. Specifically, the model often includes multiple neural network layers, and since the multiple neural network layers are stacked in sequence, the data of the user can obtain the final data processing result after being processed by the multiple neural network layers respectively, and is returned to the user for use. For example, assuming that a user needs to convert an image into a vector, the user can upload the image to the cloud, and the cloud deploys a transformer model of the user, which includes various neural network layers such as a mapping layer, a multi-head attention mechanism layer, and a fully connected network layer. After the image is processed by the transformer model, the vector corresponding to the image can be obtained to meet the needs of the user.

[0055] In the above process, different neural network layers in the model can process data differently, and most neural network layers involve a large amount of computation in the process of data processing, resulting in a high cost of the entire data processing process. For example, in the process of converting the image into a vector, the attention mechanism layer and the fully connected network layer in the transformer model involve a large amount of computation, which can result in a high cost of the conversion process.

[0056] To solve the above problem, the embodiments of the present application provide a data processing method, which can be implemented through a cloud service system. FIG. 1 is a structural schematic diagram of a cloud service system provided by an embodiment of the present application, as shown in FIG. 1, the cloud service system includes infrastructure that can provide cloud services and a cloud management platform that manages the infrastructure. The cloud management platform and the infrastructure are introduced respectively as follows:

[0057] The cloud management platform can manage the infrastructure in the whole cloud service system, and can also be open to users outside the cloud service system and respond to their requests. For example, the cloud management platform can provide various interfaces such as a login interface and a data processing interface for the client of a user (for example, a terminal device used by the user or a browser on the terminal device, etc.) to access. Among them, the cloud management platform can authenticate the client of a user through the login interface, and allow the client of the user to log in to the cloud management platform after successful authentication. For another example, the cloud management platform can also allow the client of the user to send a processing request of the user for a certain data to the cloud management platform through the data processing interface, so the cloud management platform can call a data processing model serving the user based on the processing request, and process the data through the data processing model to obtain the processing result of the data, which will not be expanded here.

[0058] The infrastructure includes a plurality of computing devices that provide cloud services for user services, which can be divided into two parts according to the specific function type. One part of the computing devices is used as a computing node, and the other part of the computing devices is used as a storage node. Among them, the computing node can provide cloud computing (for example, the foregoing data processing process) and cloud network services for the user, and the storage node can provide cloud storage (for example, storing the foregoing data) services for the user.

[0059] It is worth noting that the above-mentioned data processing process can be implemented by the cloud management platform alone, or can be implemented by the cloud management platform scheduling the computing node and the storage node in the infrastructure. The following will introduce these various cases respectively:

[0060] (1) As shown in FIG. 2 (FIG. 2 is a structural schematic diagram of a cloud management platform provided by an embodiment of the present application), a data processing model and a preset vector set are arranged in the cloud management platform. When the cloud management platform receives a processing request for a certain data sent by a user, the cloud management platform can acquire a data processing model based on the processing request. The data processing model can include multiple sub-models. A first sub-model (i.e., the aforementioned first sub-model) is usually used to pre-process the data into a vector, and the remaining sub-models (including the aforementioned second sub-model) are used to further process the vector, so as to obtain a final vector. Then, the cloud management platform can input the data into the first sub-model first, so as to obtain an input vector (i.e., the aforementioned first input vector) to be input into the remaining sub-models. Next, the cloud management platform can detect, from the vector set, whether there is another input vector (i.e., the aforementioned second input vector) matching the input vector. If there is, the cloud management platform can further acquire, from the vector set, an output vector (the output vector is a result obtained by processing another input vector through the remaining sub-models, i.e., the aforementioned first output vector) related to another input vector, and use the output vector as a result obtained by processing the input vector through the remaining sub-models. Therefore, the cloud management platform can skip the processing of the input vector by the remaining sub-models, and directly use the output vector to obtain the processing result of the data.

[0061] In this embodiment, the cloud management platform can be regarded as a combination of a vector generation system and a vector storage system.

[0062] (2) As shown in FIG. 3 (FIG. 3 is another structural schematic diagram of a cloud service system provided by an embodiment of the present application), the cloud management platform sets a data processing model in a certain computing node and sets a preset vector set in a certain storage node. When the cloud management platform receives a processing request for a certain data sent by a user, the cloud management platform can forward the processing request to the computing node, so that the computing node acquires a data processing model. Then, the computing node can input the data into a first sub-model of the data processing model first, so as to obtain an input vector to be input into the remaining sub-models. Next, the computing node can send a detection request for the input vector to the storage node, so that the storage node detects, from the vector set, whether there is another input vector matching the input vector. If there is, the storage node can further acquire, from the vector set, an output vector related to another input vector, and return the output vector as a result obtained by processing the input vector through the remaining sub-models to the computing node. Therefore, the computing node can skip the processing of the input vector by the remaining sub-models, and directly use the output vector to obtain the processing result of the data.

[0063] The computing node can be regarded as a vector generation system, and the storage node can be regarded as a vector storage system. Moreover, the computing device where the computing node is located is the first computing device, and the computing device where the storage node is located is the second computing device.

[0064] (3) As shown in FIG. 4 (which is another structural schematic diagram of a cloud service system provided by an embodiment of the present application), the cloud management platform sets a data processing model and a preset vector set in a certain computing node. When the cloud management platform receives a processing request for a certain data sent by a user, the cloud management platform can forward the processing request to the computing node, so that the computing node obtains the data processing model. Then, the computing node can first input the data into a first sub-model of the data processing model to obtain an input vector to be input into the remaining sub-models. Then, the computing node can detect whether there is another input vector matching the input vector from the vector set. If there is, the storage node can also obtain an output vector related to the other input vector from the vector set, and use the output vector as the result obtained after the remaining sub-models process the input vector. Therefore, the computing node can skip the processing process of the input vector by the remaining sub-models, and directly use the output vector to obtain the processing result of the data.

[0065] The computing node can be regarded as a combination of a vector generation system and a vector storage system.

[0066] Further, the aforementioned data processing model is usually a trained neural network model, which can include multiple neural network layers. Therefore, the multiple neural network layers can be logically divided to form multiple sub-models, and each sub-model can include at least one neural network layer in the multiple neural network layers. For example, the neural network model is a transformer model, which can include a mapping layer, a plurality of continuous processing modules, and a multilayer perceptron (MLP). Each module can include at least one self-attention layer and at least one feed forward neural network (FFN) layer. The model is used to convert unstructured data (images, voices, texts, videos, etc.) into corresponding vectors. In the model, the mapping layer can be regarded as a first sub-model, the plurality of continuous processing modules can be regarded as a second sub-model, and the MLP can be regarded as a third sub-model, and so on.

[0067] Further, the preset vector set can include a plurality of vector pairs, which are obtained by the data processing model processing a plurality of sample data in advance. For any one of the plurality of sample data, the first sub-model of the data processing model can first convert the sample data into an input vector to be input into the remaining sub-models, and input the input vector into the remaining sub-models, so that the remaining sub-models process the input vector to obtain an output vector. In this way, the input vector and the output vector can be stored in the vector set as a vector pair. The same is true for the remaining sample data, which will not be described here.

[0068] It should be noted that for the sample data, when the number of the remaining sub-models is one, the vector set can include one vector pair generated based on the sample data, when the number of the remaining sub-models is a plurality, the vector set can include a plurality of vector pairs generated based on the sample data (each sub-model can generate a vector pair after the first sub-model converts the sample data to input the remaining sub-models), and the plurality of vector pairs are associated (because in the remaining sub-models, the output vector of the previous sub-model is the input vector of the next sub-model, so the input and output vectors of each sub-model are the vector pairs generated by each sub-model).

[0069] Further, the vectors transmitted inside the data processing model are usually multi-dimensional vectors, also known as tensors, and the vectors stored in the vector set are usually one-dimensional vectors, so when the cloud management platform matches the vectors output by the model with the vectors in the vector set, it can first reduce the dimension of the vectors output by the model, and then match the vectors in the vector set with the reduced vectors. The subsequent vector matching process involving the vector set can include the dimension reduction process, which will not be described here.

[0070] Further, the aforementioned computing nodes and storage nodes can be cloud instances in the infrastructure, which can be presented in various forms. For example, the cloud instances can be physical servers (i.e., the aforementioned computing devices) selected by the cloud management platform in the infrastructure, for example, the cloud instances can also be bare metal servers (i.e., the aforementioned computing devices) selected by the cloud management platform in the infrastructure. For example, the cloud instances can also be virtual machines (VM) created by the cloud management platform on the physical servers or bare metal servers through virtualization technology, for example, the cloud instances can also be containers (docker) created by the cloud management platform on the physical servers or bare metal servers through virtualization technology, for example, the cloud instances can also be micro virtual machines (microVM) created by the cloud management platform on the physical servers or bare metal servers through virtualization technology, and the like.

[0071] Further, for the multiple cloud instances serving the tenants, the cloud instances can be deployed in the same site or different sites, and the site can be presented in various forms, for example, the site can be a region in the infrastructure, for example, the site can be an availability zone in the infrastructure, for example, the site can be a data center (DC) in the infrastructure, for example, the site can be a room in the infrastructure, for example, the site can be a rack in the infrastructure, and the like.

[0072] Further, the data processing method provided by the embodiments of the present application can be applied to a cloud service system in the field of cloud technology, and can also be applied to a data processing system in other fields, for example, an intelligent system in the field of media technology. The system can include a terminal device of a user, so the data processing method provided by the embodiments of the present application can be executed by the terminal device of the user, that is, the data processing model and the vector set are both arranged in the terminal device of the user. Of course, the system can also include the terminal device of the user and a data processing device (for example, a network server, an application server, and a management server of the user, and a device or server with a data processing function), so the data processing method provided by the embodiments of the present application can be executed by the data processing device of the user (triggered by the terminal device of the user), that is, the data processing model and the vector set are both arranged in the data processing device of the user, and the like.

[0073] Based on the above system, when a certain data needs to be processed, a data processing model can be acquired first, which can include a first sub-model and the remaining sub-models. Then, the first sub-model can be used to convert the data into an input vector to be input to the remaining sub-models. Then, another input vector matching the input vector and an output vector corresponding to the another input vector can be acquired from a preset vector set. Subsequently, the output vector can be used to acquire the processing result of the data. Thus, the processing process for the data is completed. In the foregoing process, according to the conventional data processing procedure, the data needs to be sequentially subjected to the preprocessing of the first sub-model of the data processing model and the complex processing of the remaining sub-models. However, after the data is processed by the first sub-model to obtain an input vector to be input to the remaining sub-models, another input vector matching the input vector and an output vector corresponding to the another input vector can be acquired from a vector set. Since the output vector is the result obtained by processing the another input vector by the remaining sub-models in advance, the output vector can be used as the result obtained by processing the input vector by the remaining sub-models to skip the complex processing of the input vector by the remaining sub-models, and the output vector is used to acquire the processing result of the data. As can be seen, in the processing process of the data, the data does not need to be processed by the entire data processing model, and the processing of part of the sub-models (i.e., the foregoing remaining sub-models) can be skipped, thereby reducing the calculation amount of part of the data processing process and reducing the cost of data processing. In order to further understand the foregoing data processing process, the process will be further introduced below in combination with FIG. 5. FIG. 5 is a flowchart of a data processing method provided by an embodiment of the present application. For the convenience of description, the execution subject of the method is a cloud management platform, as shown in FIG. 5, the method includes:

[0074] 501, acquiring data to be processed from a user and a data processing model, the data processing model including a first sub-model and a second sub-model connected in series, the data processing model including a plurality of neural network layers, the first sub-model including at least one neural network layer of the plurality of neural network layers, and the second sub-model including at least one neural network layer of the plurality of neural network layers.

[0075] In this embodiment, when a user needs to process a certain data (for example, an image, text, video, voice, etc. of the user), the cloud management platform can provide a data processing interface (for example, a data processing column of a user interface, etc.) to the client of the user. Then, the user can input a processing request set by the user for the data to the data processing interface through the client used by the user, and the processing request is used to indicate that the user needs to process the data. In this way, the cloud management platform can receive the processing request sent by the client of the user through the data processing interface.

[0076] After obtaining the processing request, the cloud management platform can parse the processing request to obtain the data to be processed, and obtain a data processing model set in advance in the cloud management platform, where the data processing model can include a first sub-model and a second sub-model connected in series, the first sub-model is mainly used for preprocessing the data (for example, converting the data into a vector), and the second sub-model is mainly used for complex processing of the data (for example, further operation on the vector generated based on the data, etc.).

[0077] Specifically, the data processing model can be a trained neural network model, so the data processing model can include a plurality of neural network layers, the first sub-model usually includes at least one neural network layer of the plurality of neural network layers, and the second sub-model usually includes at least one neural network layer of the plurality of neural network layers, for example, the first sub-model includes the first several neural network layers of the plurality of neural network layers, which are used for preprocessing the data, and the second sub-model includes the middle several neural network layers or the remaining all neural network layers of the plurality of neural network layers, etc.

[0078] For example, as shown in FIG. 6a (FIG. 6a is a structural schematic diagram of a cloud management platform provided by an embodiment of the present application), it is assumed that a vector generation system and a vector query system are set in the cloud management platform, the data processing model provided by the vector generation system for data processing service of a user is a transformer model (also can be called an embedding model), the model includes an embedding layer, M-2 blocks and an MLP layer connected in series, where M is greater than 2, and a block can include a self attention layer and an FFN layer. Logically, the model can be divided into three sub-models, sub-model 1 (i.e., the first sub-model described above), sub-model 2 (i.e., the second sub-model described above) and sub-model 3, sub-model 1 is the embedding layer, sub-model 2 is the M-2 blocks, and sub-model 3 is the MLP layer.

[0079] In addition, as shown in FIG. 7a (FIG. 7a is another structural schematic diagram of a cloud management platform provided by an embodiment of the present application), the model can also be divided into sub-model 1 and sub-model 2, sub-model 1 is the embedding layer, and sub-model 2 is the M-2 blocks and the MLP layer. In addition, as shown in FIG. 8a (FIG. 8a is another structural schematic diagram of a cloud management platform provided by an embodiment of the present application), the model can also be divided into sub-model 1 to sub-model M, sub-model 1 is the embedding layer, sub-model 2 is the first block,..., sub-model M-1 is the M-2 block, and sub-model M is the MLP layer, which is not specifically limited here.

[0080] 502. Input the data into the first sub-model in the data processing model to preprocess the data through the first sub-model in the data processing model to obtain the first input vector to be input into the second sub-model. The preprocessing includes mapping.

[0081] After obtaining the data and the data processing model, the cloud management platform can input the data into the data processing model. Upon receiving the data, the first sub-model in the data processing model can preprocess the data (e.g., mapping operations, etc.), and the vector output by the first sub-model is the first input vector to be input into the second sub-model.

[0082] As in the example above, as shown in Figure 6a, when a user needs to convert an image into a vector, the user can log in to the cloud management platform. The cloud management platform can provide the user with a user interface, which includes a data processing bar. Therefore, the user can input a processing request for the image into the data processing bar, so that the cloud management platform can receive the processing request for the image through the data processing bar.

[0083] Based on this, the cloud management platform can parse the processing request to obtain the image to be processed. Then, it calls the transformer model in the vector generation system and inputs the image into the transformer model. Upon receiving the image, sub-model 1, the embedding layer, can perform an embedding operation on the image. This embedding operation can include patch embedding and position embedding. The patch embedding operation maps each image patch in the image to a corresponding vector, while the position embedding operation adds the position information of each image patch in the image to the corresponding vector. Therefore, the embedding layer can ultimately output vector A corresponding to the image, which is the input vector to sub-model 2 (i.e., the aforementioned first input vector).

[0084] 503. From the preset vector set, obtain the second input vector that matches the first input vector and the first output vector that corresponds to the second input vector. The vector set contains multiple vector pairs. Each vector pair contains an input vector and an output vector that corresponds to the input vector. The output vector is the vector obtained by processing the input vector through the second sub-model. The vector pair formed by the second input vector and the first output vector is one of the multiple vector pairs.

[0085] 504. Determine the first output vector as the output of the second sub-model, and obtain the data processing result based on the first output vector.

[0086] After obtaining the first input vector output by the first sub-model, the cloud management platform can obtain a preset vector set and traverse the vector set to detect whether there is a second input vector matching the first input vector. If there is a second input vector, the cloud management platform can further obtain, from the vector set, a first output vector corresponding to the second output vector. Since the first output vector is a result obtained by the second sub-model processing (for example, various complex operations, etc.) the second input vector, the cloud management platform can directly skip the processing of the first input vector by the second sub-model by taking the first output vector as a result obtained by the second sub-model processing the first input vector (i.e., taking the first output vector as the output of the second sub-model). In this way, the cloud management platform can obtain the processing result of the data based on the first output vector.

[0087] Specifically, the cloud management platform can construct the vector set in the following manner:

[0088] When it is necessary to create the vector set, the cloud management platform can obtain a sample data set, which can come from a user or be provided by a cloud vendor. The sample data set can include a plurality of sample data (for example, sample images, sample voices, sample texts, sample videos, etc.), which are all unstructured data. For any one of the plurality of sample data, the cloud management platform can input the sample data into the data processing model to pre-process the sample data by the first sub-model of the data processing model, so as to obtain a second input vector to be input into the second sub-model. Then, the cloud management platform can input the second input vector into the second sub-model by the first sub-model, so that the second sub-model processes the second input vector to obtain a first output vector. Then, the second input vector and the first output vector form a vector pair generated by the second sub-model, and the cloud management platform can store the vector pair in the vector set.

[0089] In addition, if the data processing model further includes a third sub-model, since the first output vector is a third input vector to be input into the third sub-model, the cloud management platform can input the third input vector into the third sub-model by the second sub-model, so that the third sub-model processes the third input vector to obtain a second output vector. Then, the third input vector and the second output vector form a vector pair generated by the third sub-model, and the cloud management platform can store the vector pair in the vector set.

[0090] It is worth noting that even if the data processing model comprises the third sub-model, the cloud management platform can determine whether to skip the processing of the third sub-model according to an actual model processing strategy. For example, when the strategy indicates that the processing of the second sub-model and the third sub-model needs to be skipped (for example, the second sub-model and the third sub-model involve a large amount of calculation), the cloud management platform can store the vector pair generated by the third sub-model in the vector set. If the strategy indicates that only the processing of the second sub-model needs to be skipped (for example, the second sub-model involves a large amount of calculation, while the third sub-model involves a small amount of calculation), the cloud management platform does not store the vector pair generated by the third sub-model in the vector set. In addition, if the data processing model further comprises a fourth sub-model and the like, the cloud management platform can also perform similar operations, which will not be described here.

[0091] As can be seen, the vector set can store at least one vector pair generated based on the sample data. For the remaining sample data, the cloud management platform can also perform similar operations on the remaining sample data, so that the vector set can store a plurality of vector pairs generated based on the plurality of sample data.

[0092] Still as in the above example, as shown in FIG. 6b (FIG. 6b is another structural schematic diagram of the cloud management platform provided by the embodiments of the present application, and FIG. 6b is drawn on the basis of FIG. 6a), assuming that the model processing strategy of the cloud management platform indicates that the processing of the sub-model 2 needs to be skipped, when the cloud management platform needs to construct the vector set, the cloud management platform can obtain a sample image set, which comprises sample image 1 to sample image N (N is greater than or equal to 2). For the sample image 1, the cloud management platform can first convert the sample image 1 through the sub-model 1 in the transformer model, so as to obtain a vector output by the sub-model 1, which is an input vector 1 to be input to the sub-model 2. Then, the cloud management platform can input the input vector 1 to the sub-model 2 for processing, and the vector output by the sub-model 2 is an output vector 1, so that the cloud management platform can store the input vector 1 and the output vector 1 as a vector pair 1 in the vector set. Since only the processing of the sub-model 2 needs to be skipped, the cloud management platform does not store the input and output of the sub-model 3 for the sample image 1 in the vector set after the output vector 1 is input to the sub-model 3 for processing and the output of the sub-model 3 is obtained, which is the processing result of the sample image 1.

[0093] For the sample image 2 to the sample image N, the cloud management platform can also perform similar operations, so that the vector set can finally store the vector pair 1 to the vector pair N, which correspond to the N sample images one by one.

[0094] In addition, as shown in FIG. 7b (FIG. 7b is another structural schematic diagram of the cloud management platform provided by the embodiments of the present application, and FIG. 7b is drawn on the basis of FIG. 7a), if the transformer model is divided according to the logic of FIG. 7a, at this time, the model processing strategy still indicates that the processing of the sub-model 2 is skipped, and therefore the vector set finally constructed by the cloud management platform still contains the vector pair 1 to the vector pair N, and the N vector pairs are associated with the N sample images. In addition, as shown in FIG. 8b (FIG. 8b is another structural schematic diagram of the cloud management platform provided by the embodiments of the present application, and FIG. 8b is drawn on the basis of FIG. 8a), if the transformer model is divided according to the logic of FIG. 8a, at this time, the model processing strategy still indicates that the processing of the sub-model 2 to the sub-model M-1 is skipped, and for the sample image 1, after sequentially passing through the processing of the sub-model 1, the sub-model 2, the sub-model 3 to the sub-model M-1, the input vector 1.1 and the output vector 1.1 of the sub-model 2 are the vector pair 1.1,..., and the input vector 1.M-2 and the output vector 1.M-2 of the sub-model M-1 are the vector pair 1.M-2. Then, the cloud management platform can store the vector pair 1.1 to the vector pair 1.M-2 into the vector set. For the sample image 2 to the sample image N, the same is true, and therefore the vector set finally stores the vector 1.1 to the vector 1.M-2, the vector 2.1 to the vector 2.M-2,..., and the vector N.1 to the vector N.M-2.

[0095] More specifically, the cloud management platform can detect whether there is a second input vector matching the first input vector in the following manner:

[0096] When the cloud management platform traverses the vector set, since the vector set contains a plurality of vector pairs, and since each vector pair contains an input vector and a corresponding output vector, the cloud management platform can detect the similarity between the input vectors in the plurality of vector pairs and the first input vector, and if the similarity between the input vector in a certain vector pair and the first input vector is greater than or equal to a preset similarity threshold (the size of the threshold can be set according to actual needs, which is not limited here), the input vector can be taken as the second input vector, and the output vector in the vector pair, i.e., the first output vector corresponding to the second input vector, can be obtained.

[0097] It should be noted that if the cloud management platform determines that the similarity between the input vector in each of the plurality of vector pairs and the first input vector is greater than or equal to the similarity threshold, the cloud management platform can select, from the plurality of input vectors, an input vector with the greatest similarity as the second input vector, or can select, from the plurality of input vectors, a first input vector (for example, a first input vector with a similarity greater than or equal to the similarity threshold, or a first input vector with the highest priority, and the like) as the second input vector, or can randomly select, from the plurality of input vectors, an input vector as the second input vector, and the like, which are not limited herein.

[0098] Still referring to the above example, as shown in FIG. 6a, after obtaining the vector A, the cloud management platform can obtain a vector set in the vector query system, the vector set including N vector pairs, the vector pair 1 including the input vector 1 and the output vector 1, the vector pair 2 including the input vector 2 and the output vector 2, and the vector pair N including the input vector N and the output vector N. Then, the cloud management platform can detect the similarity between the input vector in each vector pair and the vector A, and assume that the similarity between the input vector 1 in the vector pair 1 and the vector A is greater than the similarity threshold. The cloud management platform can select the output vector 1 as the vector B, which can be regarded as a vector obtained by processing the vector A by the sub-model 2.

[0099] More specifically, the cloud management platform can further perform the following operations:

[0100] After obtaining the processing result of the data, the cloud management platform can return the processing result of the data to the user. After using the processing result of the data, the user can return the accuracy of the processing result of the data to the cloud management platform. If the accuracy is greater than or equal to a preset upper limit of the accuracy (the size of the upper limit can be set according to specific requirements, which is not limited herein), the cloud management platform can decrease the similarity threshold to obtain a decreased similarity threshold. In this way, the decreased similarity threshold can reduce the difficulty of matching the input vector from the vector set in the future, thereby increasing the probability of skipping the processing of the input vector by the sub-model, which is conducive to further reducing the cost required for data processing. If the accuracy is less than or equal to a preset lower limit of the accuracy (the lower limit is less than the upper limit, and the size of the lower limit can be set according to specific requirements, which is not limited herein), the cloud management platform can increase the similarity threshold to obtain an increased similarity threshold. In this way, the increased similarity threshold can increase the difficulty of matching the input vector from the vector set in the future, thereby reducing the probability of skipping the processing of the input vector by the sub-model, which is conducive to improving the accuracy of the result of data processing.

[0101] More specifically, the cloud management platform can obtain the processing result of the data in the following multiple ways:

[0102] (1) When the data processing model only contains the first sub-model and the second sub-model, the cloud management platform can directly determine the first output vector as the processing result of the data.

[0103] Still as the above example, as shown in FIG. 7a, the transformer model only contains the sub-model 1 and the sub-model 2. For the vector A to be input to the sub-model 2, the cloud management platform finds the input vector 1 matching the vector A from the vector set, and takes the output vector 1 corresponding to the input vector 1 as the vector B, and then directly takes the vector B as the final output of the transformer model, that is, the processing result of the image.

[0104] (2) When the data processing model contains the first sub-model, the second sub-model and the third sub-model, and the model processing strategy indicates that the third sub-model also needs to be skipped, the cloud management platform can determine the first output vector as the third input vector to be input to the third sub-model, and traverse the vector set. If there is a fourth input vector matching the third input vector in the vector set (as described above, the third input vector has been stored in the vector set, so the fourth input vector and the third input vector can be understood as the same vector), the cloud management platform obtains the second output vector corresponding to the fourth input vector from the vector set, and takes the second output vector as the result obtained by processing the third input vector by the third sub-model, so the cloud management platform can skip the processing of the third input vector by the third sub-model. In this way, the cloud management platform can obtain the processing result of the data based on the second output vector, and the obtaining process can refer to the processing process of the first output vector, which will not be described here.

[0105] Still as the above example, as shown in FIG. 8a, the transformer model contains the sub-model 1 to the sub-model M. Since the model processing strategy indicates that the sub-model 2 to the sub-model M-1 need to be skipped, for the vector A to be input to the sub-model 2, the cloud management platform finds the input vector 1.1 matching the vector A from the vector set, and takes the output vector 1.1 corresponding to the input vector 1.1 as the vector B, and then takes the vector B as the input of the sub-model 3 (i.e. the third sub-model). Since the output vector 1.1 is the input vector 1.2, the cloud management platform can also find the input vector 1.2 matching the vector B from the vector set, and take the output vector 1.2 corresponding to the input vector 1.2 as the vector C, so as to skip the processing of the sub-model 3. Then, the subsequent sub-model 4 to the sub-model M-1 can also be skipped in turn, and finally the cloud management platform can obtain the output vector 1.M-2 as the vector Z from the vector set, so as to skip the processing of the sub-model M-1, and input the vector Z to the sub-model M to process the vector Z by the sub-model M. The output of the sub-model M is the processing result of the image.

[0106] (3) When the data processing model comprises the first sub-model, the second sub-model, and a third sub-model, and the model processing strategy indicates that the third sub-model does not need to be skipped, the cloud management platform can determine the first output vector as a third input vector to be input to the third sub-model of the data processing model, and directly input the third input vector to the third sub-model, so as to process the third input vector through the third sub-model, thereby obtaining a third output vector. In this way, the cloud management platform can obtain the processing result of the data based on the third output vector. The obtaining process can refer to the processing process of the first output vector, which will not be described here.

[0107] Still as the above example, as shown in FIG. 6a, the transformer model only comprises the sub-model 1 to the sub-model 3. Since the model processing strategy indicates that the sub-model 2 needs to be skipped, for the vector A to be input to the sub-model 2, the cloud management platform finds the input vector 1 matching the vector A from the vector set, and takes the output vector 1 corresponding to the input vector 1 as the vector B, and then inputs the vector B to the input of the sub-model 3 (i.e., the third sub-model mentioned above). The vector B is input to the sub-model 3, so as to process the vector B through the sub-model 3. The output of the sub-model 3 is the processing result of the image.

[0108] More specifically, the cloud management platform can further perform the following operations:

[0109] For the sample data mentioned above, after the sample data passes through the first sub-model and the second sub-model of the data processing model, the second sub-model can output a first output vector. If the data processing model does not comprise the remaining sub-models, the first output vector is the predicted processing result of the sample data. If the data processing model comprises the remaining sub-models, the result obtained by processing the first output vector through the remaining sub-models is the predicted processing result of the sample data. Since the sample data set further comprises the real processing result of the sample data, the cloud management platform can calculate the predicted processing result of the sample data and the real processing result of the sample data to obtain the loss corresponding to the sample data. For the remaining sample data, the cloud management platform can perform similar operations. Therefore, the cloud management platform can finally obtain the losses corresponding to the plurality of sample data. The sum of the losses is the target loss, which is used to indicate the difference between the predicted processing results of the plurality of sample data and the real processing results of the plurality of sample data.

[0110] Then, when the data processing model processes the data of the user, the first sub-model in the data processing model can pre-process the data to obtain a first input vector to be input to the second sub-model. Since the first input vector matches the second input vector, and the second input vector corresponds to the first output vector, the cloud management platform obtains the first output vector from the vector set as the result of processing the first input vector by the second sub-model. In order to make the processing result of the data have better quality, the cloud management platform can adjust the first output vector by using the target loss (for example, superimposing the target loss on the first output vector), thereby obtaining an adjusted first output vector. In this way, the cloud management platform can obtain the processing result of the data based on the adjusted first output vector.

[0111] Still as the above example, as shown in FIG. 6c (FIG. 6c is another structure schematic diagram of the cloud management platform provided by the embodiment of the present application, and FIG. 6c is drawn on the basis of FIG. 6a), after the vector set is constructed, the cloud management platform can input the output vector 1 to the output vector N to the sub-model 3 for processing, thereby obtaining the prediction processing result of the sample image 1 (i.e., the final prediction vector corresponding to the sample image 1) to the prediction processing result of the sample image N (i.e., the final prediction vector corresponding to the sample image N). Since the sample image set contains the real processing result of the sample image 1 (i.e., the real vector corresponding to the sample image 1) and the real processing result of the sample image N (i.e., the real vector corresponding to the sample image N), the cloud management platform can calculate a target loss △W by using the prediction processing result and the real processing result. Then, after the vector B is obtained, the cloud management platform can superimpose the △W on the vector B, and the vector B with the superimposed △W is input to the sub-model 3 for processing, thereby obtaining the processing result of the image (i.e., the prediction vector corresponding to the image).

[0112] It should be understood that in the above examples, only the sub-model 2 is illustratively introduced as containing at least one block, that is, the sub-model 2 contains multiple neural network layers, and in actual application, the sub-model 2 can also contain only one neural network layer, for example, as shown in FIG. 9 (FIG. 9 is another structural schematic diagram of the cloud management platform provided by the embodiments of the present application), for the transformer model, the model can be divided into sub-model 1, sub-model 2 and sub-model 3, the sub-model 1 is the embedding layer and the self attention layer of the first block, the sub-model 2 is the FFN layer of the first block, and the sub-model 3 is the remaining blocks and the MLP layer. At this time, the model processing strategy is to skip the processing of the sub-model 2, so the vector set stores the vector pair 1 to the vector pair N, the output vector 1 is obtained by processing the input vector 1 by the sub-model 2,..., and the output vector N is obtained by processing the input vector N by the sub-model 2. When a certain image needs to be processed, the sub-model 1 can convert it into a vector A, the cloud management platform can find the input vector 1 matched with the vector A from the vector set, and take the output vector 1 as a vector B to input to the sub-model 3 for processing, so as to obtain the processing result of the image. It can be seen that this image processing process skips the processing of the sub-model 2.

[0113] In the embodiments of the present application, when a certain data of a user needs to be processed, a data processing model can be acquired first. The data processing model can include a first sub-model and a second sub-model. The data processing model can include a plurality of neural network layers. The first sub-model includes a part of the plurality of neural network layers. The second sub-model includes another part of the plurality of neural network layers. Then, the data can be input into the first sub-model to convert the data into a first input vector to be input into the second sub-model by using the first sub-model. Then, a second input vector matching the first input vector and a first output vector corresponding to the second input vector can be acquired from a preset vector set. Subsequently, the first output vector can be used as the output of the second sub-model, and the first output vector can be used to acquire the processing result of the data. Thus, the processing of the data is completed. In the foregoing process, according to a conventional data processing procedure, the data needs to be processed by the first sub-model of the data processing model and the second sub-model of the data processing model in sequence. However, after the data is processed by the first sub-model to obtain the first input vector to be input into the second sub-model, the second input vector matching the first input vector and the first output vector corresponding to the second input vector can be acquired from the vector set. Since the first output vector is the result obtained by processing the second input vector by the second sub-model in advance, the first output vector can be used as the result obtained by processing the first input vector by the second sub-model to skip the complex processing of the first input vector by the second sub-model, and the first output vector can be used to acquire the processing result of the data. As can be seen, in the processing of the data, the data does not need to be processed by the entire data processing model, and the processing of a part of the sub-model (i.e., the second sub-model) can be skipped, thereby reducing the calculation amount of a part of the data processing procedure and reducing the cost of data processing.

[0114] Further, in the embodiments of the present application, on the basis of ensuring the reduction of the cost (latency, etc.) of data processing, the accuracy of the data processing result can also be ensured (due to the existence of the vector set, a part of the data processing procedure (such as the processing required by the second sub-model) is performed in advance, and the vector obtained by the part of the procedure is directly used, thereby skipping the part of the procedure, but the essence can also be understood as “performing” the part of the procedure). As shown in FIG. 10 (FIG. 10 is a schematic diagram of a comparison result provided by the embodiments of the present application) and FIG. 11 (FIG. 11 is another schematic diagram of a comparison result provided by the embodiments of the present application), the embodiments of the present application can be compared with related technologies. After data 1 to data 6 are processed respectively, the processing latency of the data in the embodiments of the present application is lower than the processing latency of the data in the related technologies, and the accuracy of the processing result of the data obtained in the embodiments of the present application is better than the accuracy of the processing result of the data obtained in the related technologies.

[0115] The above is a detailed description of the data processing method provided by the embodiments of the present application. The data processing apparatus provided by the embodiments of the present application will be introduced below. FIG. 12 is a structural schematic diagram of a data processing apparatus provided by an embodiment of the present application. As shown in FIG. 12, the apparatus is arranged in a cloud management platform or an infrastructure managed by the cloud management platform, and the infrastructure is used to provide cloud services for users. The apparatus includes:

[0116] The first obtaining module 1201 is configured to obtain data to be processed from the user and a data processing model. The data processing model includes a first sub-model and a second sub-model connected in series. The data processing model includes a plurality of neural network layers. The first sub-model includes at least one neural network layer in the plurality of neural network layers. The second sub-model includes at least one neural network layer in the plurality of neural network layers.

[0117] The first preprocessing module 1202 is configured to input the data into the first sub-model in the data processing model, so as to pre-process the data through the first sub-model in the data processing model, to obtain a first input vector to be input into the second sub-model. The pre-processing includes mapping.

[0118] The second obtaining module 1203 is configured to obtain, if there is a second input vector matching the first input vector in a preset vector set, a first output vector corresponding to the second input vector from the vector set. The vector set includes a plurality of vector pairs. Each vector pair includes an input vector and an output vector corresponding to the input vector. The output vector is a vector obtained by processing the input vector through the second sub-model. The vector pair composed of the second input vector and the first output vector is one of the plurality of vector pairs.

[0119] The third obtaining module 1204 is configured to determine the first output vector as an output of the second sub-model, and obtain a processing result of the data based on the first output vector.

[0120] In a possible implementation manner, the apparatus further includes a fourth obtaining module configured to obtain sample data; a second preprocessing module configured to pre-process the sample data through the first sub-model to obtain a second input vector; a processing module configured to process the second input vector through the second sub-model to obtain a first output vector; and a storage module configured to store the second input vector and the first output vector in the vector set.

[0121] In a possible implementation, the apparatus further includes a fifth obtaining module, configured to obtain a prediction processing result of the sample data based on the first output vector; a sixth obtaining module, configured to obtain a target loss based on the prediction processing result and a real processing result of the sample data, the target loss being used to indicate a difference between the prediction processing result and the real processing result; and a third obtaining module, configured to adjust the first output vector based on the target loss to obtain an adjusted first output vector, and obtain the processing result of the data based on the adjusted first output vector.

[0122] In a possible implementation, the matching of the first input vector and the second input vector includes that a similarity between the first input vector and the second input vector is greater than or equal to a preset similarity threshold.

[0123] In a possible implementation, the apparatus further includes a receiving module, configured to receive an accuracy of the processing result sent by a user; a decreasing module, configured to decrease the similarity threshold to obtain a decreased similarity threshold, if the accuracy is greater than or equal to a preset upper limit of accuracy; and an increasing module, configured to increase the similarity threshold to obtain an increased similarity threshold, if the accuracy is less than or equal to a preset lower limit of accuracy, the lower limit of accuracy being less than the upper limit of accuracy.

[0124] In a possible implementation, the third obtaining module 1204 is configured to determine the first output vector as the processing result of the data.

[0125] In a possible implementation, the third obtaining module 1204 is configured to determine the first output vector as a third input vector to be input to a third sub-model, and if there is a fourth input vector matching the third input vector in the vector set, obtain a second output vector corresponding to the fourth input vector in the vector set, the second output vector being a vector obtained by processing the fourth input vector by the third sub-model, and obtain the processing result based on the second output vector.

[0126] In a possible implementation, the third obtaining module 1204 is configured to determine the first output vector as a third input vector to be input to a third sub-model of the data processing model, process the third input vector by the third sub-model to obtain a third output vector, and obtain the processing result based on the third output vector.

[0127] In a possible implementation, the infrastructure includes a first computing device and a second computing device, the first computing device includes the apparatus, and the second computing device is configured to store the vector set and provide the vector set for the apparatus in the first computing device.

[0128] It should be noted that the information interaction and implementation process between the modules / units of the above apparatus, since the same concept as the method embodiments of the present application, the technical effects brought by it are the same as the method embodiments of the present application, and the specific content can be referred to the description of the method embodiments of the foregoing method embodiments of the present application, which will not be repeated here.

[0129] Referring to FIG. 13, FIG. 13 is a structural schematic diagram of a computing device provided by an embodiment of the present application. As shown in FIG. 13, the computing device 1300 (which can be used to present the foregoing data processing apparatus) includes a processor 1301, a memory 1302, a communication interface 1303 and a bus 1304, and the processor 1301, the memory 1302 and the communication interface 1303 are coupled through the bus (not labeled in the figure). The memory 1302 stores instructions, and when the execution instructions in the memory 1302 are executed, the computing device 1300 executes the method performed by the cloud management platform in the foregoing method embodiments.

[0130] The computing device 1300 can be one or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASICs), or one or more digital signal processors (DSPs), or one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms. For another example, when the units in the apparatus can be implemented in the form of a processing element scheduler, the processing element can be a general-purpose processor, such as a central processing unit (CPU) or other processor that can call a program. For another example, these units can be integrated together in the form of a system-on-a-chip (SOC).

[0131] The processor 1301 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. The general-purpose processor can be a microprocessor or any conventional processor.

[0132] The memory 1302 can be a volatile memory or a nonvolatile memory, or can include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (ROM), a programmable ROM (PROM), an erasable PROM (EPROM), an electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM) used as an external cache. By way of example, and not limitation, many forms of RAM can be used, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic RAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchlink DRAM (SLDRAM), and direct rambus RAM (DR RAM).

[0133] The executable program code stored in the memory 1302 is executed by the processor 1301 to realize the functions of the aforementioned first acquisition module, first preprocessing module, second acquisition module, and third acquisition module, etc., thereby realizing the data processing method described above. That is, the memory 1302 has instructions for executing the data processing method described above.

[0134] The communication interface 1303 uses a transceiving module such as, but not limited to, a network interface card, a transceiver, etc., to realize the communication between the computing device 1300 and other devices or communication networks.

[0135] Bus 1304 can include a data bus in addition to, or instead of, the address bus and control bus. The bus can be a peripheral component interconnect express (PCIe) bus, or an extended industry standard architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL), a cache coherent interconnect for accelerators (CCIX), or the like. The bus can be divided into an address bus, a data bus, and a control bus.

[0136] Referring to FIG. 14, FIG. 14 is a structural schematic diagram of a computing device cluster provided by an embodiment of the present application. As shown in FIG. 14, the computing device cluster 1400 includes at least one computing device 1300.

[0137] As shown in FIG. 14, the computing device cluster 1400 includes at least one computing device 1300. The memory 1302 in one or more computing devices 1300 in the computing device cluster 1400 can store the same instructions for performing the data processing method described above.

[0138] In some possible implementation manners, the memory 1302 in one or more computing devices 1300 in the computing device cluster 1400 can also respectively store partial instructions for performing the data processing method described above. In other words, the combination of one or more computing devices 1300 can collectively perform the instructions for performing the data processing method described above.

[0139] It should be noted that the memory 1302 in different computing devices 1300 in the computing device cluster 1400 can store different instructions, respectively, for performing part of the functions of the cloud management platform described above. That is, the instructions stored in the memory 1302 in different computing devices 1300 can implement the functions of one or more of the first obtaining module, the first preprocessing module, the second obtaining module, and the third obtaining module, and the like.

[0140] In some possible implementation manners, one or more computing devices 1300 in the computing device cluster 1400 can be connected through a network. The network can be a wide area network or a local area network, or the like.

[0141] Referring to FIG. 15, FIG. 15 is a schematic diagram of connection of computer devices in a computer cluster according to an embodiment of the present application. As shown in FIG. 15, two computer devices 1300A and 1300B are connected through a network. Specifically, the communication interface in each computer device is connected to the network.

[0142] In a possible implementation, the memory in the computer device 1300A stores instructions for performing the functions of the first obtaining module and the like. Meanwhile, the memory in the computer device 1300B stores instructions for performing the functions of the first preprocessing module, the second obtaining module, the third obtaining module and the like.

[0143] It should be understood that the functions of the computer device 1300A shown in FIG. 15 can also be completed by multiple computer devices. Similarly, the functions of the computer device 1300B can also be completed by multiple computer devices.

[0144] An embodiment of the present application also relates to a computer storage medium, which stores a program for performing signal processing, and when the program is executed on a computer, the computer is caused to perform the steps of the embodiment shown in FIG. 5.

[0145] An embodiment of the present application also relates to a computer program product, which stores instructions, and the instructions cause a computer to perform the steps in the embodiment shown in FIG. 5 when the instructions are executed by the computer.

[0146] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, the device and the unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here.

[0147] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented by other manners. For example, the device embodiments described above are merely schematic, for example, the division of the units is merely a logical function division, and actual implementation can have another division manner, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the units shown or discussed can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical, mechanical or other forms.

[0148] The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment scheme.

[0149] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware, or in the form of a software functional unit.

[0150] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on such understanding, the technical solutions of the present application essentially or the part of the prior art that contributes to the technical solutions or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM, read-only memory), a random access memory (RAM, random access memory), a magnetic disk or an optical disk, and various program code storage media.

Claims

1. A data processing method, characterized by, The method is performed by a cloud management platform or an infrastructure managed by the cloud management platform, the infrastructure being configured to provide cloud services for a user, and the method comprises: obtaining data to be processed from the user and a data processing model, the data processing model comprising a first sub-model and a second sub-model connected in series, the data processing model comprising a plurality of neural network layers, the first sub-model comprising at least one neural network layer of the plurality of neural network layers, and the second sub-model comprising at least one neural network layer of the plurality of neural network layers; inputting the data into the first sub-model in the data processing model to pre-process the data by the first sub-model to obtain a first input vector to be input into the second sub-model, the pre-processing comprising mapping; if there is a second input vector matching the first input vector in a preset vector set, obtaining a first output vector corresponding to the second input vector from the vector set, wherein the vector set comprises a plurality of vector pairs, each vector pair comprising an input vector and an output vector corresponding to the input vector, the output vector being a vector obtained by processing the input vector by the second sub-model, and the vector pair formed by the second input vector and the first output vector being one of the plurality of vector pairs; determining the first output vector as an output of the second sub-model, and obtaining a processing result of the data based on the first output vector.

2. The method of claim 1, wherein, The method further comprises: obtaining sample data; pre-processing the sample data by the first sub-model to obtain the second input vector; processing the second input vector by the second sub-model to obtain the first output vector; storing the second input vector and the first output vector in the vector set.

3. The method of claim 2, wherein, The method further comprises: obtaining a predicted processing result of the sample data based on the first output vector; obtaining a target loss based on the predicted processing result and an actual processing result of the sample data, the target loss being used to indicate a difference between the predicted processing result and the actual processing result; The method further comprises: adjusting the first output vector based on the target loss to obtain an adjusted first output vector; obtaining the processing result of the data based on the adjusted first output vector.

4. The method according to any one of claims 1 to 3, characterized in that, The first input vector matches the second input vector, which includes that a similarity between the first input vector and the second input vector is greater than or equal to a preset similarity threshold.

5. The method of claim 4, wherein, The method further comprises: receiving an accuracy of the processing result sent by the user; if the accuracy is greater than or equal to a preset upper limit of accuracy, decreasing the similarity threshold to obtain a decreased similarity threshold; if the accuracy is less than or equal to a preset lower limit of accuracy, increasing the similarity threshold to obtain an increased similarity threshold, the lower limit of accuracy being less than the upper limit of accuracy.

6. The method according to any one of claims 1 to 5, characterized in that, The processing result of the data based on the output vector comprises: The first output vector is determined as the processing result of the data.

7. The method according to any one of claims 1 to 5, characterized in that, The processing result of the data based on the output vector comprises: The first output vector is determined as a third input vector to be input to the third sub-model; If there is a fourth input vector matching the third input vector in the vector set, a second output vector corresponding to the fourth input vector is obtained from the vector set, the second output vector being a vector obtained by processing the fourth input vector by the third sub-model; The processing result is obtained based on the second output vector.

8. The method according to any one of claims 1 to 5, characterized in that, The processing result of the data based on the output vector comprises: The first output vector is determined as a third input vector to be input to the third sub-model of the data processing model; The third input vector is processed by the third sub-model to obtain a third output vector; The processing result is obtained based on the third output vector.

9. The method according to any one of claims 1 to 8, characterized in that, The infrastructure comprises a first computing device for executing the method and a second computing device for storing the vector set and providing the vector set for the first computing device.

10. A data processing apparatus, characterized by, The device is arranged in a cloud management platform or an infrastructure managed by the cloud management platform, the infrastructure being used to provide cloud services for users, and the device comprises: A first obtaining module is configured to obtain data to be processed from the user and a data processing model, the data processing model comprising a first sub-model and a second sub-model connected in series, the data processing model comprising a plurality of neural network layers, the first sub-model comprising at least one neural network layer in the plurality of neural network layers, and the second sub-model comprising at least one neural network layer in the plurality of neural network layers; A first preprocessing module is configured to input the data into the first sub-model in the data processing model to pre-process the data by the first sub-model in the data processing model to obtain a first input vector to be input into the second sub-model, the preprocessing comprising mapping; A second obtaining module is configured to obtain a first output vector corresponding to a second input vector matching the first input vector from a preset vector set if the second input vector exists in the vector set, wherein the vector set comprises a plurality of vector pairs, each vector pair comprising an input vector and an output vector corresponding to the input vector, the output vector being a vector obtained by processing the input vector by the second sub-model, and the vector pair formed by the second input vector and the first output vector being one of the plurality of vector pairs; A third obtaining module is configured to determine the first output vector as an output of the second sub-model and obtain a processing result of the data based on the first output vector.

11. The apparatus of claim 10, wherein, The device further comprises: A fourth obtaining module is configured to obtain sample data. The second preprocessing module is configured to preprocess the sample data by using the first sub-model to obtain the second input vector. The processing module is configured to process the second input vector by using the second sub-model to obtain the first output vector. The storage module is configured to store the second input vector and the first output vector in the vector set.

12. The apparatus of claim 11, wherein, The apparatus further includes: The fifth acquisition module is configured to acquire a predicted processing result of the sample data based on the first output vector. The sixth acquisition module is configured to acquire a target loss based on the predicted processing result and a real processing result of the sample data, the target loss being used to indicate a difference between the predicted processing result and the real processing result. The third acquisition module is configured to: adjust the first output vector based on the target loss to obtain an adjusted first output vector; and acquire the processing result of the data based on the adjusted first output vector.

13. The apparatus of any one of claims 10 to 12, wherein, The matching of the first input vector and the second input vector includes that a similarity between the first input vector and the second input vector is greater than or equal to a preset similarity threshold.

14. The apparatus of claim 13, wherein, The apparatus further includes: The receiving module is configured to receive an accuracy of the processing result sent by the user. The decreasing module is configured to decrease the similarity threshold to obtain a decreased similarity threshold if the accuracy is greater than or equal to a preset upper limit of accuracy. The increasing module is configured to increase the similarity threshold to obtain an increased similarity threshold if the accuracy is less than or equal to a preset lower limit of accuracy, the lower limit of accuracy being less than the upper limit of accuracy.

15. The apparatus of any one of claims 10 to 14, wherein, The third acquisition module is configured to determine the first output vector as the processing result of the data.

16. The apparatus of any one of claims 10 to 14, wherein, The third acquisition module is configured to: determine the first output vector as a third input vector to be input to the third sub-model; and if there is a fourth input vector matching the third input vector in the vector set, acquire a second output vector corresponding to the fourth input vector from the vector set, the second output vector being a vector obtained by processing the fourth input vector by using the third sub-model. acquire the processing result based on the second output vector.

17. The apparatus of any one of claims 10 to 14, wherein, The third acquisition module is configured to: determine the first output vector as a third input vector to be input to a third sub-model of the data processing model; and process the third input vector by using the third sub-model to obtain a third output vector. acquire the processing result based on the third output vector.

18. The apparatus of any one of claims 10 to 17, wherein, The infrastructure includes a first computing device and a second computing device, the first computing device including the apparatus, and the second computing device being configured to store the vector set and provide the vector set for the apparatus in the first computing device.

19. A cluster of computing devices, characterized in that, The computing device cluster includes at least one computing device, each computing device including a processor and a memory: The memory is configured to store instructions. The processor is configured to execute the instructions to cause the computing device cluster to perform the method in any one of claims 1 to 9.

20. A computer storage medium, comprising, The computer storage medium stores one or more instructions which, when executed by one or more computers, cause the one or more computers to implement the method of any one of claims 1-9.

21. A computer program product, characterised in that, The computer program product stores instructions which, when executed by a computer, cause the computer to implement the method of any one of claims 1-9.

Citation Information

Patent Citations

  • Search intention recognition method and device, model training method and device, medium and equipment

    CN113343692A

  • Image processing method and device, electronic equipment and storage medium

    CN114612672A

  • Model training method and device and semantic similarity determination method and device

    CN114970545A

  • Adjusting automated neural network generation based on evaluation of candidate neural networks

    US20190122119A1

  • System and method of accelerating execution of a neural network

    US20210042624A1