Data processing method and related apparatus
By splitting the data processing model into input and output side models and adding noise information on the output side, the problem of excessive computational complexity in existing technologies is solved, and efficient and secure data processing is achieved.
Patent Information
- Application Number
- PCT/CN2025/080397
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-18
- Filing Date
- 2025-03-04
- Publication Date
- 2025-09-25
AI Technical Summary
In the data processing process, existing technologies divide data into multiple parts to ensure the data security of data providers, which leads to a significant increase in the amount of calculation and makes it difficult to apply to efficient data processing scenarios.
The data processing model is split into a first model close to the input side and a second model close to the output side. The first model generates and adds data feature information with noise information, and the second model generates the data processing results, ensuring the security of the data provider and the model provider while reducing the amount of calculation.
On the premise of ensuring data processing accuracy and security, the computational complexity of the data processing process is reduced, data processing efficiency is improved, and it is suitable for a wider range of data processing scenarios.
Smart Images

Figure CN2025080397_25092025_PF_FP_ABST
Abstract
Description
Data processing method and related device
[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 18, 2024, with application number 2024103074890 and application name “Data Processing Methods and Related Devices”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of artificial intelligence technology, and in particular to data security technology. Background Art
[0003] With the continuous development of computer technology, computer modeling is being applied to a growing number of technical fields to improve processing accuracy and efficiency, while also delivering a more intelligent technological experience. In computer modeling, a data provider can provide data for model input to a model provider. The model provider then uses the model to generate output based on the input data and returns the output to the data provider for use.
[0004] In related technologies, the data provider can split the data into multiple data shards, retain some of the data shards for itself, and send other data shards to the model provider. Both parties input the data shards they own into the model to obtain corresponding output results. Finally, the output results obtained by both parties are spliced and restored to obtain the output results corresponding to the complete input data. In the above process, since the model provider cannot obtain the complete input data, the security of the data provided by the data provider is guaranteed.
[0005] However, the methods in related technologies greatly increase the computational complexity of data processing through models, significantly reduce data processing efficiency, and are difficult to be widely applied in various data processing scenarios. Summary of the Invention
[0006] In order to solve the above technical problems, the present application provides a data processing method that can, in the model application scenario, while ensuring the data processing accuracy, simultaneously ensure the data security of both the data provider and the model provider, reduce the amount of computation in the data processing process, and improve data processing efficiency, so that it can be applied to a wider range of data processing scenarios.
[0007] The embodiments of this application disclose the following technical solutions:
[0008] In a first aspect, an embodiment of the present application discloses a data processing method, which is performed by a first device, the first device including a first model, and the method includes:
[0009] generating, using the first model, first data feature information according to the first data, where the first data feature information is used to characterize data features of the first data;
[0010] adding noise information to the first data feature information to obtain second data feature information;
[0011] The second data characteristic information is sent to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information through a second model, the first model and the second model are used to constitute a data processing model, and the first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0012] In a second aspect, an embodiment of the present application discloses a data processing method, which is executed by a second device, the second device including a second model, and the method includes:
[0013] Obtaining second data feature information sent by the first device, where the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device based on the first data using a first model;
[0014] Through the second model, a first data processing result is generated according to the second data feature information. The first model and the second model are used to constitute a data processing model. The first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0015] In a third aspect, an embodiment of the present application discloses a data processing device, comprising a first generating unit, a first adding unit, and a first sending unit:
[0016] The first generating unit is configured to generate first data feature information according to the first data using the first model, where the first data feature information is used to represent data features of the first data;
[0017] The first adding unit is configured to add noise information to the first data feature information to obtain second data feature information;
[0018] The first sending unit is used to send the second data characteristic information to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information through a second model. The first model and the second model are used to constitute a data processing model, and the first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0019] In a fourth aspect, an embodiment of the present application discloses a data processing device, comprising a third acquisition unit and a third generation unit:
[0020] the third acquiring unit being configured to acquire second data feature information sent by the first device, where the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device based on the first data using the first model;
[0021] The third generation unit is used to generate a first data processing result based on the second data feature information through the second model. The first model and the second model are used to constitute a data processing model. The first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0022] In a fifth aspect, an embodiment of the present application discloses a computer device, comprising a processor and a memory:
[0023] The memory is used to store a computer program and transmit the computer program to the processor;
[0024] The processor is configured to execute the data processing method of the first aspect or the data processing method of the second aspect according to instructions in the computer program;
[0025] In a sixth aspect, an embodiment of the present application discloses a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is used to execute the data processing method described in the first aspect, or execute the data processing method described in the second aspect;
[0026] In the seventh aspect, an embodiment of the present application discloses a computer program product including a computer program, which, when running on a computer device, enables the computer device to execute the data processing method described in the first aspect, or execute the data processing method described in the second aspect.
[0027] It can be seen from the above technical solution that, first, in order to prevent the first device as the data provider from obtaining the complete data processing model, the present application can only place the first model close to the input side of the data processing model into the first device, that is, the data provider can only obtain part of the model, thereby ensuring the security of the model. The first device can generate first data feature information based on the first data as input data through the first model. Secondly, in order to prevent the second device as the model provider from knowing the first data, the first device can add noise information to the first data feature information to obtain second data feature information, and send the second data feature information to the second device to instruct the second device to determine the first data processing result through the second model close to the output side of the data processing model. The first data processing result is used to characterize the data processing result obtained by processing the first data through the data processing model. Since the second data feature information contains noise information, the second device cannot accurately restore the first data based on the second data feature information, thereby ensuring that the input data provided by the data provider will not be obtained by the model provider, thereby ensuring the security of the data. At the same time, since the noise information affects the data processing process in the second model close to the output side, the degree of influence on the data processing process is relatively small, thereby ensuring that the first data processing result finally obtained is closer to the actual data processing result obtained by processing the first data through the data processing model, thereby ensuring the accuracy of data processing. In summary, the present application can ensure the data security of the data provider and the model security of the model provider while ensuring the accuracy of data processing. At the same time, there is no need for repeated data processing processes, which reduces the amount of computing required for the overall data processing process and ensures data processing efficiency, so that the data processing method of the present application can be applied to a wider range of data processing scenarios. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0029] FIG1 is a schematic diagram of a data processing method in a practical application scenario provided by an embodiment of the present application;
[0030] FIG2 is a signaling diagram of a data processing method provided in an embodiment of the present application;
[0031] FIG3 is a signaling diagram of a data processing method provided in an embodiment of the present application;
[0032] FIG4 is a schematic diagram of a data processing method provided in an embodiment of the present application;
[0033] FIG5 is a signaling diagram of a data processing method provided in an embodiment of the present application;
[0034] FIG6 is a signaling diagram of a data processing method in an actual application scenario provided by an embodiment of the present application;
[0035] FIG7 is a schematic diagram of a data processing method in a practical application scenario provided by an embodiment of the present application;
[0036] FIG8 is a structural block diagram of a data processing device provided in an embodiment of the present application;
[0037] FIG9 is a structural block diagram of a data processing device provided in an embodiment of the present application;
[0038] FIG10 is a structural diagram of a terminal provided in an embodiment of the present application;
[0039] FIG11 is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The embodiments of the present application are described below with reference to the accompanying drawings.
[0041] Model-based data processing has a wide range of applications. For example, in artificial intelligence scenarios, models can be used to generate corresponding text processing results based on input text. Data processing typically requires the participation of both data providers and model providers. Data providers provide data to be input into the data processing model to obtain the corresponding processing results, while model providers provide data processing models to complete the data processing process.
[0042] In related technologies, in order to ensure the data security of the data provider and prevent the model provider from obtaining the complete input data, the data provider can divide the data to be input into two parts, which are input into the model for processing by the data provider and the model provider respectively. Finally, the results are spliced together to obtain the data processing results corresponding to the complete data.
[0043] However, the data processing method in the related technology converts the original one-time data processing for the complete data into one-time data processing for each of the two data parts. This leads to a significant increase in the amount of calculation in the data processing process. Although it can guarantee the data security of the data provider to a certain extent, it will lead to a significant decrease in data processing efficiency, making it difficult to provide efficient data processing services, and thus difficult to apply to various scenarios with high requirements for data processing efficiency.
[0044] In order to solve the above technical problems, the present application provides a data processing method, which splits the data processing model into a first model close to the data input side and a second model close to the data output side. The first device, as the data provider, can generate first data feature information based on the first data as input data through the first model, and then obtain second data feature information by adding noise information to the first data feature information. The second device, as the model provider, can obtain a first data processing result based on the second data feature information through the second model. The first data processing result is used to characterize the data processing result obtained by the data processing model by processing the first data. Since the data provider can only obtain part of the model, the security of the model provided by the model provider can be guaranteed; since the noise information is added to the second data feature information, the second device cannot restore the first data through the second data feature information, thereby ensuring the security of the data provider's data; at the same time, since the noise information affects the data processing process close to the output side, it has less interference with the data processing result, and the accuracy of the first data processing result is higher; in addition, the present application does not need to repeat the entire data processing process, the amount of computation required for the data processing process as a whole is small, and the data processing efficiency is high. To sum up, this application can take into account data security and model security while ensuring data processing accuracy and efficiency, bringing better data processing results.
[0045] It is understandable that the method can be executed by a computer device, which is a computer device with data processing capabilities, such as a terminal device or a server. The method can be executed independently by a terminal device or a server, and can also be applied to a network scenario in which a terminal device and a server communicate, and is executed in cooperation with the terminal device and the server. Among them, the terminal device can be a mobile phone, a tablet computer, a laptop computer, a desktop computer and other devices. The terminal device can also include a variety of virtual reality devices, for example, it can include augmented reality (AR) devices, such as AR glasses, AR screens and other devices, and can include virtual reality technology (VR) devices, such as head-mounted VR glasses and other devices. The server can be understood as an application server or a web server. In actual deployment, the server can be a standalone server, a cluster server, or a cloud server.
[0046] This application also relates to technologies in the field of large models, specifically model compression and quantization and model parallel computing technologies.
[0047] Model compression and quantization uses compression and quantization techniques to reduce model size and accelerate model inference, thereby lowering model storage and computational costs. Model compression typically includes pruning, low-rank decomposition, and knowledge distillation. Model quantization converts floating-point parameters in the model to fixed-point or integer parameters, reducing model size and accelerating model inference.
[0048] Model parallel computing involves distributing model computational tasks across multiple computing devices (such as CPUs, GPUs, and TPUs) to perform simultaneous computations, thereby accelerating model training and inference. Model parallel computing can effectively utilize computing resources, improving model computational efficiency and training speed.
[0049] In this application, model compression and quantization technology is mainly reflected in the ability to use compressed or quantized models to process data provided by the data provider, thereby speeding up data processing and reducing the size of the models deployed on the first and second devices. Model parallel computing is mainly reflected in the use of multiple first devices to perform parallel computing on input data through their respective deployed first models, or using multiple second devices to perform parallel computing on input data through their respective deployed second models, thereby improving data processing efficiency.
[0050] In order to facilitate understanding of the technical solution provided by this application, the data processing method provided by this application will be introduced in conjunction with an actual application scenario.
[0051] Refer to Figure 1, which is a schematic diagram of a data processing method in an actual application scenario provided by an embodiment of the present application. In this actual application scenario, the first device is a first server 101, the second device is a second server 102, the first server 101 is a server serving as a data provider, and the second server 102 is a server serving as a model provider.
[0052] The model architecture of the data processing model used for data processing can be divided into a first model architecture and a second model architecture, wherein the first model structure is close to the input side and is used to construct the first model, and the second model architecture is close to the output side and is used to construct the second model. The model provider can send the first model to the first server 101. The first server 101 can process the first data through the first model to obtain first data feature information, and the first data feature information is used to characterize the data features corresponding to the first data. The first server 101 can add noise information to the first data feature information to obtain second data feature information, and then send the second data feature information to the second server 102. Since the noise information is added to the second data feature information, the second server 102 cannot obtain the first data feature information and thus cannot restore the first data, thereby ensuring the data security of the data provider.
[0053] The second server 102 can use the second model to determine the first data processing result based on the second data feature information. Since the first data has been processed by the first model and the second model, and the first model and the second model can constitute a complete model architecture corresponding to the data processing model, the first data processing result can be used to represent the data processing result obtained by the data processing model by processing the first data.
[0054] First, as mentioned above, this method can ensure the security of the data provided by the first server 101; second, since the first server 101 can only obtain part of the model architecture and cannot restore the complete data processing model, the security of the model provided by the second server 102 is guaranteed; third, the present application adds noise information after the first data is processed by the first model, so the noise information only acts on the data processing flow close to the data output side, and has little impact on the data processing flow. Therefore, the first data processing result is closer to the data processing result obtained by the data processing model by directly processing the first data, and has higher accuracy; fourth, the present application does not need to repeatedly execute the data processing flow for the first data, and the overall computational cost of the data processing process is relatively small, with higher data processing efficiency.
[0055] Next, the data processing method provided by this application will be introduced in detail with reference to the accompanying drawings.
[0056] Referring to Figure 2, which is a signaling diagram of a data processing method provided in an embodiment of the present application, in this embodiment, a computer device may include a first device as a data provider and a second device as a model provider. Both the first device and the second device may be any computer device with data processing capabilities. The method includes:
[0057] S201: The first device generates first data feature information according to first data using a first model.
[0058] It is understandable that the model provided by the model provider is mainly reflected in two dimensions: model architecture and model parameters. For example, for a data processing model, the model architecture can characterize the processing flow for data processing, and the model parameters can determine the specific method of data processing based on the processing flow. These are all obtained by the model provider through model research and development.
[0059] Based on this, in this embodiment, in order to ensure the security of the model of the model provider and prevent the model architecture and model parameters from being completely obtained by the first device acting as the data provider, the model architecture of the data processing model can be split first to obtain a first model architecture close to the data input side and a second model architecture close to the output side, wherein the first model architecture is used to determine the data feature information corresponding to the input data, and the data feature information is used to characterize the input data; the second model architecture is used to determine the data processing result based on the data feature information, and the first model architecture and the second model architecture can be combined to realize the complete data processing function of the data processing model.
[0060] The first model can be constructed through the first model architecture, and the second model can be constructed through the second model architecture. In this embodiment, only the first model is provided to the first device. The first device, as the data provider, will not be able to know the complete model architecture and model parameters, and thus will not be able to construct the data processing model by itself, thereby ensuring the security of the data processing model.
[0061] The first device can generate first data feature information according to the first data through the first model, where the first data feature information is used to characterize data features of the first data. The first model corresponds to a first model architecture.
[0062] S202: The first device adds noise information to the first data feature information to obtain second data feature information.
[0063] To prevent the second device, acting as the model provider, from obtaining accurate input data, the first device can add noise information to the first data feature information to generate second data feature information, thereby ensuring that the second device cannot accurately restore the first data based on the second data feature information. Noise information can include various types, such as Gaussian distributed noise information, which is not limited here.
[0064] S203: The first device sends second data feature information to the second device to instruct the second device to generate a first data processing result according to the second data feature information through a second model.
[0065] Among them, the second model corresponds to the second model architecture, the first model architecture and the second model architecture are used to constitute the model architecture corresponding to the data processing model, and the first data processing result is used to represent the data processing result obtained by the data processing model by processing the first data.
[0066] S204: The second device obtains the second data characteristic information sent by the first device.
[0067] It can be seen from the above content that the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device according to the first data through the first model.
[0068] S205: The second device generates a first data processing result according to the second data feature information through the second model.
[0069] Since the first model architecture and the second model architecture can constitute a complete model architecture of the data processing model, and the first data processing result is obtained by processing the first data through data processing, noise addition, and data processing by the second model, the difference between the first data processing result and the data processing result obtained by directly processing the first data through the data processing model is only the influence of noise information, so that the first data processing result can be used to characterize the data processing result obtained by the data processing model by processing the first data.
[0070] It is understandable that, generally speaking, the longer the data processing process involved in the noise information is, the greater the impact on the data processing results; the closer the data processing process affected by the noise information is to the data input side, the greater the impact on the input data, and thus the greater the impact on the data processing results; conversely, the closer it is to the data output side, the smaller the impact on the input data, and thus the smaller the impact on the data processing results. Therefore, the present application adds noise information after the first model is processed, so that the noise information only affects the data processing part of the second model close to the output side, thereby reducing the impact of the noise information on the first data, and then reducing the impact on the data processing results, so that the first data processing results can be closer to the actual data processing results, ensuring the accuracy of data processing.
[0071] It can be seen from the above technical solutions that this application, while ensuring the security of the data provided by the data provider and the security of the model provided by the model provider, reduces the impact of noise information on the data processing results, so that the final first data processing result is closer to the actual data processing result obtained by directly processing the first data through the data processing model, ensuring the accuracy of data processing. At the same time, this application does not require multiple repetitions of the data processing process on a single device. For example, the data processing process corresponding to the second model only needs to be repeated once on the second device, and the data processing process corresponding to the first model only needs to be repeated once on the first device. The overall amount of computation required for the data processing process is relatively small, ensuring data processing efficiency, so that the data processing method of this application can be applied to a wider range of data processing scenarios.
[0072] As mentioned above, a model includes a model architecture and model parameters. While the above method can generally separate the complete model architecture and model parameters, the first model in the first device may still include the complete model parameters corresponding to the data processing model in the first model architecture. In one possible implementation, the computer device may further process the model parameters corresponding to the first model architecture to prevent the data provider from obtaining the complete model parameters corresponding to the first model architecture.
[0073] Referring to FIG3 , FIG3 is a signaling diagram of a data processing method provided in an embodiment of the present application, wherein steps S301 to S303 and S307 to S308 are a possible implementation of step S201. The method includes:
[0074] S301: A first device performs fragmentation processing on first data to obtain first data fragments and second data fragments.
[0075] Data sharding refers to dividing data into multiple data parts, each of which can be used as a data shard. In this application, it can be divided into two shards, namely the first data shard and the second data shard. It can also be divided into more shards, which is not limited here. The first data shard and the second data shard can be used to constitute the first data, that is, the first data shard and the second data shard can be combined to include the complete data content corresponding to the first data. Therefore, by performing data processing on the first data shard and performing data processing on the second data shard, the data results of data processing on the first data can be simulated.
[0076] S302: The first device generates first sub-feature information according to the first data slice using a first model.
[0077] In an embodiment of the present application, to protect the security of the model parameters provided by the model provider, as shown in FIG4 , the target model parameters can be divided into first model parameters and second model parameters. The target model parameters are model parameters of the first model architecture in the data processing model. The computer device can assign the first model parameters to the first model of the data provider, thereby preventing the data provider from obtaining the complete target model parameters and, therefore, from restoring the model portion of the first model architecture in the data processing model. The first sub-feature information is used to characterize the data features of the first data slice.
[0078] S303: The first device sends the second data slice to the second device to instruct the second device to generate second sub-feature information according to the second data slice using the third model.
[0079] The second model parameters can be assigned to a third model. The third model is located in a second device serving as a model provider. The third model also corresponds to the first model architecture. The second sub-feature information is used to characterize data features of the second data slice.
[0080] S304: The second device obtains the second data fragment sent by the first device.
[0081] S305: The second device generates second sub-feature information according to the second data slice using the third model.
[0082] S306: The second device sends the second sub-feature information to the first device to instruct the first device to determine the first data feature information according to the first sub-feature information and the second sub-feature information.
[0083] As mentioned above, the first sub-feature information is information generated by the first device through the first model according to the first data slice. The first model has a first model parameter. The first model parameter and the second model parameter are used to constitute the target model parameter. The model part corresponding to the first model architecture in the data processing model has the target model parameter.
[0084] S307: The first device obtains the second sub-feature information sent by the second device.
[0085] S308: The first device determines first data feature information according to the first sub-feature information and the second sub-feature information.
[0086] Since the first model parameters and the second model parameters can be used to constitute the target model parameters, and the first data slice and the second data slice can be used to constitute the first data, and the first model and the third model both correspond to the first model architecture, therefore, combined with the data processing of the first data slice by the first model and the data processing of the second data slice by the third model, the data processing of the first data by the first model part in the data processing model can be restored, and thus, the first data feature information can be determined based on the first sub-feature information and the second sub-feature information.
[0087] S309: The first device adds noise information to the first data feature information to obtain second data feature information.
[0088] S310: The first device sends second data feature information to the second device to instruct the second device to generate a first data processing result according to the second data feature information through a second model.
[0089] S311: The second device obtains the second data characteristic information sent by the first device.
[0090] S312: The second device generates a first data processing result according to the second data feature information through the second model.
[0091] As can be seen from the above process, during the entire data processing process, the first device, acting as the data provider, will not obtain the complete model parameters corresponding to any model architecture in the data processing model, thereby further ensuring the security of the model provider's model. At the same time, the second device, acting as the model provider, will not obtain the complete first data, thereby ensuring the security of the data provider's data. In addition, compared to related technologies, this application only needs to perform data processing twice on the first model architecture part, without repeating the entire data processing flow. Therefore, it still reduces the amount of computing required in the processing process to a certain extent and improves data processing efficiency.
[0092] It is understandable that the speed at which the model processes data is usually related to the size of the data. The larger the data, the slower the data processing speed is. When the model architecture of the first model and the third model are the same, that is, when the data processing process is the same, the data size determines the data processing speed of the first model and the third model. Therefore, in one possible implementation, since it is necessary to wait for both the first model and the third model to be processed before the first data feature information can be synthesized, in order to avoid the problem that due to the different data sizes, the model that processes the larger data slice in the first model and the third model has not yet been processed, and the other model has been processed, thus needing to wait, the first device can make the data size of the first data slice the same as that of the second data slice, thereby being able to achieve the best data processing speed as a whole and ensure data processing efficiency.
[0093] The above process mainly protects the data provider's data in the input data dimension. In another possible implementation method, the present application can also protect the data processing results output by the model to prevent other parties other than the data provider from knowing the data processing results.
[0094] Referring to FIG. 5 , FIG. 5 is a signaling diagram of a data processing method provided in an embodiment of the present application, wherein step S504 is a possible implementation of step S203, and step S505 is a possible implementation of step S204. The method includes:
[0095] S501: The first device determines encryption information and decryption information corresponding to first data.
[0096] The encryption information is used to represent the encryption method of the data processing result corresponding to the first data, and the decryption information is used to decrypt the data encrypted by the encryption method. The encryption method can include multiple methods and is not limited here.
[0097] S502: The first device generates first data feature information according to the first data using a first model.
[0098] S503: The first device adds noise information to the first data feature information to obtain second data feature information.
[0099] S504: The first device sends the second data characteristic information and the encryption information to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information and the encryption information through the second model.
[0100] When sending the second data feature information to the second device, the first device can also send the encryption information to the second device, so that the second model in the second device can encrypt the processed data processing results based on the encryption information, and finally output the encrypted first data processing results, so that the model provider cannot know the accurate data processing results, thereby ensuring the security of the data provider's data from the output side.
[0101] S505: The second device obtains the second data characteristic information and encryption information sent by the first device.
[0102] S506: The second device generates a first data processing result according to the second data feature information and the encryption information through the second model.
[0103] The second device can generate an initial data processing result based on the second data feature information using the second model, and then encrypt the initial data processing result based on the encryption information to output the first data processing result. The initial data processing result is the data processing result obtained by processing the second data feature information. The purpose of this embodiment of the application is to protect this data processing result from being known by the model provider.
[0104] It's important to emphasize that the second model's input is the second data feature information, and its output is the first data processing result. After obtaining the initial data processing result, it is not output, but the encryption process is directly executed. Therefore, the second device cannot obtain this initial data processing result. Because the decryption information is held by the first device, the second device cannot decrypt the first data processing result, thus ensuring data security.
[0105] S507: The second device sends the first data processing result to the first device to instruct the first device to decrypt the first data processing result by using the decryption information to obtain the initial data processing result.
[0106] S508: The first device obtains the first data processing result sent by the second device.
[0107] S509: The first device decrypts the first data processing result by using the decryption information to obtain an initial data processing result.
[0108] When the second model processes the second data feature information, it doesn't directly output the initial data processing result. Instead, it performs an encryption process on it to obtain the encrypted first data processing result. Therefore, the second device cannot obtain this initial data processing result. Furthermore, the decryption information is held by the first device, preventing the second device from decrypting the first data processing result. This ensures that the second device, as the model provider, cannot access the data provided by the data provider, thus ensuring data security.
[0109] Next, the technical details corresponding to the first device and the second device will be introduced in detail.
[0110] For the first device side, this application can be applied to data processing scenarios of various data. Taking data processing of text information type as an example, in one possible implementation, the first device can process the text information in the following manner to obtain first data for input into the model.
[0111] The first device can obtain text information to be processed, which is information that needs to obtain data processing results through a data processing model, such as query text information that needs to be input into a query model. In order to enable the data processing model to better understand the information composition of the text information, so as to perform more accurate data processing, the first device can perform word segmentation processing on the text information to be processed, and obtain a word segmentation set corresponding to the text information to be processed. The word segmentation set includes multiple word segments, and the word segments can be characters, phrases, phrases, short sentences, etc. in the text information, which are not limited here. Word segmentation processing can adopt a variety of word segmentation methods, such as Byte-Pair Encoding (BPE), word fragments (WordPiece), sentence fragments (SentencePiece), etc., which are not limited here.
[0112] Then, in order to enable the data processing model to understand the meaning of each segmentation, the first device can determine the segmentation codes corresponding to the multiple segmentations, thereby converting the text information into coding information that the model can understand. The segmentation code is used to characterize the corresponding segmentation, and the segmentation codes corresponding to different segmentations are different, so that the segmentations can be effectively characterized by the segmentation codes. The coding schemes for segmentation codes can include multiple, for example, 8-bit coding (Universal Character Set / Unicode Transformation Format, referred to as utf-8), etc., which are not limited here. The first device can generate the first data based on the segmentation codes corresponding to the multiple segmentations, so that the data processing model can fully understand the information content of the text information to be processed.
[0113] In order to further improve the accuracy of data processing, in addition to the information content corresponding to the word segmentation itself, the first device can also integrate other information that is helpful for data processing into the first data.
[0114] For example, in one possible implementation, when determining the segmentation codes corresponding to a plurality of segmentations, the first device can not only determine the segmentation code corresponding to each of the plurality of segmentations, but also determine the segmentation code corresponding to each of the plurality of segmentations. Specifically, the text information to be processed includes text information corresponding to a plurality of units, where a unit refers to a text information unit that can include a plurality of segmentations, such as a sentence unit, a paragraph unit, etc. Normally, the association between a plurality of segmentations in the same unit is closer, and the association between the segmentations in different units is weaker. Therefore, by identifying the units to which the plurality of segmentations belong, it can help the data processing model analyze the association between the segmentations, thereby enabling more accurate data processing.
[0115] Based on this, the first device can determine, for each of the multiple segmentations, a segmentation code corresponding to the segmentation, where the segmentation code is used to represent the unit in which the segmentation is located. Accordingly, when generating first data based on the segmentation codes corresponding to the multiple segmentations, the first device can generate the first data based on the segmentation codes and segmentation codes corresponding to the multiple segmentations, thereby enabling the model to clearly understand the association relationship between the multiple segmentations based on the segmentation codes, thereby improving data processing accuracy.
[0116] In addition to the relationship between the units to which they belong, the positional relationship between different segmentations is also an important factor affecting the content of the text information. When the same segmentation is distributed in different text information positions, the information content it brings may be different, and the positional relationship between multiple segmentations can also affect the information content of the text information composed of multiple segmentations to a certain extent. Therefore, in another possible implementation method, the first device can also determine the position code corresponding to each segmentation in the multiple segmentations. The position code is used to identify the position distribution of the segmentation in the text information to be processed. For example, the segmentation can be identified as the first segmentation, the second segmentation, etc. in the text information to be processed. When the text information to be processed includes only one unit, the position code can directly identify the positional relationship of the segmentation in the text information to be processed. When the text information to be processed includes multiple units, the position code can identify the positional relationship of the segmentation in the unit to which it belongs, such as the position distribution of multiple words in the same sentence.
[0117] When generating the first data based on the segmentation codes corresponding to multiple segmentations, the first device can generate the first data based on the segmentation codes and position codes corresponding to the multiple segmentations, so that the model can know the positional relationship between the multiple segmentations, which helps the model further understand the text semantics of the text information to be processed, and thus improve the data processing accuracy.
[0118] As mentioned above, there is a strong correspondence between word segmentation and word segmentation encoding. That is, under normal circumstances, there is a one-to-one correspondence between word segmentation and word segmentation encoding, which characterizes the uniqueness of each word segmentation. To further improve data processing efficiency, in one possible implementation, a code mapping relationship can be established, allowing the first device to quickly determine the word segmentation encoding based on the code mapping relationship.
[0119] When determining the segmentation codes corresponding to multiple segmentations, the first device can determine the segmentation codes corresponding to the multiple segmentations based on the code mapping relationship, wherein the code mapping relationship is used to record the mapping relationship between the segmentations and the segmentation codes, so that the segmentation codes can be determined by a simple mapping relationship search, which simplifies the segmentation code determination process. On the one hand, it can further improve the data processing efficiency, and on the other hand, it can reduce the data processing pressure of the first device, so that the data processing method of the present application can be applied to more devices with poor data processing performance, thereby expanding the versatility of data processing.
[0120] It is understandable that due to the large number of types and quantities of word segmentations, there may be some word segmentation codes that have not been generated, so there may not be word segmentation codes corresponding to some word segmentations in the code mapping relationship. At this time, the first device can generate the word segmentation codes corresponding to such word segmentations in other ways, such as through a coding algorithm. In order to improve the comprehensiveness of the coding mapping relationship, when a certain word segmentation is not included in the coding mapping relationship, the first device can update the mapping relationship between the word segmentation and the word segmentation code to the coding mapping relationship, so that the next time a word segmentation code needs to be generated for the word segmentation, it can be generated directly based on the coding mapping relationship without the need for other coding processing.
[0121] Next, a detailed technical introduction will be given to the second device serving as the model provider.
[0122] First of all, it can be understood that since the present application splits the original complete model architecture into a first model architecture and a second model architecture, it may have a certain impact on the data processing results. Based on this, in a possible implementation method, when splitting the model architecture, the second device can set a first degree threshold, and the first degree threshold is used to measure the impact of the model architecture splitting on the data processing accuracy. The second device can ensure that the degree of difference between the first data processing result and the second data processing result is less than the first degree threshold, and the second data processing result is the data processing result obtained by processing the first data through the data processing model. That is, when splitting the model architecture, the second device can ensure that the data processing result obtained based on the split model architecture is close to the data processing result obtained based on the complete model architecture, thereby ensuring the processing accuracy of data processing performed in the manner of the present application.
[0123] Specifically, in a possible implementation, the second device may perform model splitting in the following manner:
[0124] First, the second device can obtain the second data, and the second data has a corresponding sample data processing result. The sample data processing result is the result of processing the second data through the data processing model, that is, the data processing result obtained after data processing through the complete model architecture.
[0125] The second device can segment the model architecture corresponding to the data processing model based on the initial structure segmentation method to obtain a first initial model architecture and a second initial model architecture. The first initial model architecture and the second initial model architecture can constitute the model architecture corresponding to the data processing model. The second device can construct a first initial model and a second initial model, wherein the first initial model architecture is the model architecture corresponding to the first initial model, and the second initial model architecture is the model architecture corresponding to the second initial model, so that data processing by the first initial model and the second initial model can simulate data processing by the data processing model.
[0126] The second device can generate third data feature information based on the second data through the first initial model. The third data feature information is used to characterize the data features corresponding to the second data. Then, through the second initial model, the device generates a pending data processing result based on the fourth data feature information. The fourth data feature information is obtained by adding noise information to the third data feature information, thereby characterizing the impact of the noise information on the third data feature information. There are multiple ways to add noise information. For example, if the noise information needs to be kept confidential, it can be added by the first device to ensure that the second device cannot restore the data based on the noise information in subsequent processing. If the noise information does not need to be kept confidential, it can be added by the second device.
[0127] In addition, in order to ensure the accuracy of data processing in actual applications, the noise information used in the analysis of the structural segmentation method can be consistent with the noise information in actual applications, thereby ensuring that the impact of the noise information on the model data processing process is relatively close and avoiding interference from additional factors.
[0128] As mentioned above, the sample data processing result is the processing result of processing the second data based on the complete model architecture, while the pending data processing result is the processing result of processing the second data based on the two-part model architecture. Therefore, the difference between the pending data processing result and the sample data processing result can characterize the impact of the segmented model architecture on the data processing accuracy. The smaller the difference, the smaller the impact on the data processing accuracy when the model architecture is segmented based on the initial structural segmentation method. Therefore, the second device can adjust the initial structural segmentation method according to the difference to obtain the structural segmentation method. The degree of difference between the pending data processing result and the sample data processing result determined by the structural segmentation method is less than the first degree threshold, thereby ensuring that after the data processing model is segmented based on the structural segmentation method, the first model and the second model obtained can process the data more accurately.
[0129] The second device can segment the model architecture corresponding to the data processing model based on a structural segmentation method to obtain a first model architecture and a second model architecture, wherein the first model architecture can be used to construct the above-mentioned first model and third model, and the second model architecture can be used to construct the second model.
[0130] In addition, it can be seen from the above that noise information is also one of the factors that affect the accuracy of data processing. Since the purpose of noise information in this application is to change the data rather than to affect the data processing results, the type of noise information can be selected based on the degree of influence of the noise information on the data processing results. In this application, a second degree threshold can be preset, which is used to measure whether the noise information has a greater impact on the data processing results. The selected noise information satisfies the difference between the first data processing result and the second data processing result less than the second degree threshold. The second data processing result is the data processing result obtained by processing the first data through the data processing model, thereby ensuring that the data processing results will not be inaccurate due to the addition of noise information, affecting the model usage effect of the data provider.
[0131] In order to facilitate understanding of the technical solution provided by this application, the technical solution provided by this application will be introduced below in combination with an actual application scenario.
[0132] Referring to FIG. 6 , FIG. 6 is a signaling diagram of a data processing method in an actual application scenario provided by an embodiment of the present application. In this actual application scenario, a computer device includes a first device as a data provider and a second device as a model provider. The method includes:
[0133] S601: The first device determines encryption information and decryption information corresponding to first data.
[0134] In the present application, the original data may be text information, and the first data may be the word segmentation encoding result U after word segmentation and encoding processing. Segment encoding information (segment encoding), position encoding information (position encoding), etc. may be added to U, which is not limited here.
[0135] S602: The first device performs fragmentation processing on the first data to obtain a first data fragment and a second data fragment.
[0136] The first device may fragment the word segmentation result U to obtain a first data fragment and the second data shard First device holder Second device holder In this actual application scenario, data in the <>A format all represent data fragments, where: Indicates the data shard processed by the first model, Indicates the data shards processed by the third model.
[0137] S603: The first device generates first sub-feature information according to the first data slice using the first model.
[0138] In this application, the first model architecture can be N cycles of the model architecture shown in Figure 7. In one cycle, the input data passes through the multi-head attention mechanism layer (Multi-head Attention), the normalization layer (Layer Norm), the feed forward layer (Feed Forwards), and the second normalization layer. The first model and the third model both correspond to this first model architecture.
[0139] S604: The first device sends the second data slice to the second device, instructing the second device to generate second sub-feature information according to the second data slice using the third model.
[0140] S605: The second device obtains the second data fragment sent by the first device.
[0141] S606: The second device generates second sub-feature information according to the second data slice using the third model.
[0142] The functions of each layer in the first model architecture are as follows:
[0143] 1. Multi-head attention mechanism layer: It is composed of multiple attention mechanism layers (Attention), and the processing method is shown in the following formula:
[0144] ( <a0> A || <a1> A ||…||<A h > A ) <wo> A
[0145] Among them, W0 is the model weight, and the calculation of each attention is shown in the following formula:
[0146]
[0147] in <q> A = <x> A <wq> A , <k> A = <x> A <wk> A , <v> A = <x> A <wv> A , <x> A Data sharding for the input model, <wq> A , <wk> A and <wv> A are all model weights, i.e., model parameters. Among them, the first model architecture is applied to the first model and the third model, and the model parameters of the data processing model corresponding to the first model architecture can be divided into two data slices, the first model parameters and the second model parameters. Among them, the first model parameters corresponding to the first model are and The second model parameters corresponding to the third model are and A The output calculated for each attention mechanism can be strengthened through the multi-head attention mechanism layer to strengthen the model's understanding of the relationship between each word segmentation and the overall text information, thereby deepening the model's understanding of the input data.
[0148] 2. Normalization layer: The following calculations can be performed through the first and third models respectively:
[0149] <X i > A The output of each attention mechanism layer and the final normalized layer output are as follows:
[0150] LayerNorm( <x> A )= <g> A / <σ> A ⊙(<X i > A -<μ> A )+ A
[0151] Among them, G and B are hyperparameters in the model parameters.
[0152] 3. Feedforward layer: The following calculations can be performed through the first and third models respectively:
[0153] <z> A = <w1> A f( <x> A <w0> A )
[0154] Wherein, W0 and W1 are weight parameters in the model parameters, and f(·) is an activation function, for example, the activation function can be a Gaussian error linear unit GeLu.
[0155] Through the above process, the first model can output the first sub-feature information The third model can output the second sub-feature information
[0156] S607: The second device sends the second sub-feature information to the first device to instruct the first device to determine the first data feature information according to the first sub-feature information and the second sub-feature information.
[0157] S608: The first device obtains the second sub-feature information sent by the second device.
[0158] S609: The first device determines first data feature information according to the first sub-feature information and the second sub-feature information.
[0159] The combination method of the first data feature information X can be expressed as follows:
[0160] S610: The first device adds noise information to the first data feature information to obtain second data feature information.
[0161] The first device may add Gaussian noise to the first data feature information X As the noise information, where σ is a configurable parameter, the second data feature information X′ is obtained.
[0162] S611: The first device sends second data feature information and encryption information to the second device to instruct the second device to generate a first data processing result according to the second data feature information and encryption information through a second model.
[0163] S612: The second device obtains the second data characteristic information sent by the first device.
[0164] S613: The second device generates an initial data processing result according to the second data feature information through the second model, encrypts the initial data processing result according to the encryption information, and outputs the first data processing result.
[0165] S614: The second device sends the first data processing result to the first device to instruct the first device to decrypt the first data processing result through decryption information to obtain an initial data processing result.
[0166] S615: The first device obtains the first data processing result sent by the second device.
[0167] S616: The first device decrypts the first data processing result by using the decryption information to obtain an initial data processing result.
[0168] It should be emphasized that the models involved in this application can adopt multiple model architectures with similar functions. In the embodiments of this application, only one model architecture is used as an example and is not limited.
[0169] From the above process, it can be seen that the technical solution of this application has the following technical effects and improvements compared with the related art:
[0170] 1. This application can prevent data providers from obtaining a complete data processing model by splitting the model architecture and model parameters, thereby ensuring the model security of the model provider.
[0171] 2. This application can ensure the data security of data providers in both input data and output results by adding noise information, encrypting data processing results, and sharding input data.
[0172] 3. This application can improve the data processing efficiency of the data provider and reduce the data processing pressure of the data provider by establishing a coding mapping relationship, thereby further improving the versatility of the data processing method.
[0173] 4. This application can reduce the impact of model architecture segmentation and noise information addition on the accuracy of data processing results by adjusting the architecture segmentation method and noise information, thereby ensuring data processing accuracy.
[0174] Based on the data processing method applied to the first device provided in the above embodiment, the present application further provides a data processing device. Referring to FIG8 , FIG8 is a structural block diagram of a data processing device provided in an embodiment of the present application. The device 800 includes a first generating unit 801, a first adding unit 802, and a first sending unit 803:
[0175] The first generating unit 801 is configured to generate first data feature information according to the first data using the first model, where the first data feature information is used to represent data features of the first data;
[0176] The first adding unit 802 is configured to add noise information to the first data feature information to obtain second data feature information;
[0177] The first sending unit 803 is used to send the second data characteristic information to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information through a second model. The first model and the second model are used to constitute a data processing model, and the first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0178] In a possible implementation, the first generating unit 801 is specifically configured to:
[0179] Slice the first data to obtain a first data slice and a second data slice, wherein the first data slice and the second data slice are used to constitute the first data;
[0180] generating, using the first model, first sub-feature information according to the first data slice, where the first sub-feature information is used to characterize data features of the first data slice, and the first model has first model parameters;
[0181] Sending the second data slice to the second device, instructing the second device to generate second sub-feature information based on the second data slice using a third model, where the second sub-feature information is used to characterize data features of the second data slice, wherein the third model has the same architecture as the first model, the third model has second model parameters, and the first model parameters and the second model parameters are used to constitute target model parameters, where the target model parameters are model parameters of the first model in the data processing model;
[0182] Obtaining the second sub-feature information sent by the second device;
[0183] The first data feature information is determined according to the first sub-feature information and the second sub-feature information.
[0184] In a possible implementation, the first data slice and the second data slice have the same data size.
[0185] In a possible implementation, the apparatus further includes a first acquisition unit, a word segmentation unit, a first determination unit, and a second generation unit:
[0186] The first acquiring unit is used to acquire the text information to be processed;
[0187] The word segmentation unit is used to perform word segmentation processing on the text information to be processed to obtain a plurality of word segments included in the text information to be processed;
[0188] The first determining unit is used to determine the word segmentation codes corresponding to the multiple word segmentations respectively;
[0189] The second generating unit is configured to generate the first data according to the word segmentation codes corresponding to the multiple word segmentations.
[0190] In one possible implementation,
[0191] The text information to be processed includes text information corresponding to a plurality of units respectively, and the apparatus further includes a second determining unit:
[0192] The second determining unit is configured to determine, for each of the multiple segmentations, a segmentation code corresponding to the segmentation, wherein the segmentation code is used to represent the unit in which the segmentation is located;
[0193] The second generating unit is specifically configured to:
[0194] The first data is generated according to the word segmentation codes and segmentation codes corresponding to the multiple word segmentations.
[0195] In a possible implementation, the apparatus further includes a third determining unit:
[0196] The third determining unit is configured to determine, for each of the multiple segmented words, a position code corresponding to the segmented word, wherein the position code is used to represent a position distribution of the target segmented word in the text information to be processed;
[0197] The second generating unit is specifically configured to:
[0198] The first data is generated according to the word segmentation codes and position codes respectively corresponding to the multiple word segmentations.
[0199] In a possible implementation manner, the first determining unit is specifically configured to:
[0200] Determine the segmentation codes corresponding to the multiple segmentations according to the code mapping relationship, wherein the code mapping relationship is used to record the mapping relationship between the segmentations and the segmentation codes;
[0201] The device further comprises an updating unit:
[0202] The updating unit is configured to update the mapping relationship between the word segmentation and the word segmentation encoding into the encoding mapping relationship when the word segmentation is not included in the encoding mapping relationship.
[0203] In a possible implementation, the apparatus further includes a fourth determining unit:
[0204] The fourth determining unit is configured to determine encryption information and decryption information corresponding to the first data, wherein the encryption information is used to represent an encryption method for a data processing result corresponding to the first data, and the decryption information is used to decrypt data encrypted using the encryption method;
[0205] The first sending unit 803 is specifically configured to:
[0206] sending the second data characteristic information and the encryption information to the second device to instruct the second device to generate the first data processing result based on the second data characteristic information and the encryption information using a second model, wherein the second model is configured to generate an initial data processing result based on the second data characteristic information, encrypt the initial data processing result based on the encryption information, and output the first data processing result;
[0207] The device further includes a second acquisition unit and a decryption unit:
[0208] The second acquiring unit is configured to acquire the first data processing result sent by the second device;
[0209] The decryption unit is used to decrypt the first data processing result using the decryption information to obtain the initial data processing result.
[0210] Based on the data processing method applied to the second device provided in the above embodiment, the present application further provides a data processing device. See FIG9 , which is a structural block diagram of a data processing device provided in an embodiment of the present application. The device 900 includes a third acquisition unit 901 and a third generation unit 902:
[0211] The third acquiring unit 901 is configured to acquire second data feature information sent by the first device, where the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device based on the first data using the first model;
[0212] The third generation unit 902 is used to generate a first data processing result based on the second data feature information through the second model. The first model and the second model are used to constitute a data processing model. The first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
[0213] In a possible implementation, the degree of difference between the first data processing result and the second data processing result is less than a first degree threshold, and the second data processing result is a data processing result obtained by processing the first data through the data processing model.
[0214] In a possible implementation, the apparatus further includes a fourth acquiring unit, a first segmenting unit, a fourth generating unit, a fifth generating unit, an adjusting unit, and a second segmenting unit:
[0215] The fourth acquiring unit is configured to acquire second data, where the second data has a corresponding sample data processing result, where the sample data processing result is a result of processing the second data using the data processing model;
[0216] The first segmentation unit is configured to segment the data processing model based on the initial structure segmentation method to obtain a first initial model and a second initial model;
[0217] The fourth generating unit is configured to generate third data feature information based on the second data using the first initial model, where the third data feature information is used to represent data features corresponding to the second data;
[0218] the fifth generating unit is configured to generate a pending data processing result according to fourth data feature information using the second initial model, where the fourth data feature information is obtained by adding the noise information to the third data feature information;
[0219] the adjusting unit is configured to adjust the initial structural segmentation mode according to a difference between the pending data processing result and the sample data processing result, so as to obtain a structural segmentation mode, wherein a degree of difference between the pending data processing result and the sample data processing result determined by the structural segmentation mode is less than a first degree threshold;
[0220] The second segmentation unit is used to segment the data processing model based on the structural segmentation method to obtain the first model and the second model.
[0221] In a possible implementation, the noise information satisfies that the degree of difference between the first data processing result and the second data processing result is less than a second degree threshold, and the second data processing result is a data processing result obtained by processing the first data through the data processing model.
[0222] In one possible implementation, the first device is further configured to perform sharding processing on the first data to obtain first data shards and second data shards, wherein the first data shards and the second data shards are used to constitute the first data; the second device further includes a third model, the third model having the same architecture as the first model, and the third model having second model parameters; and the apparatus further includes a fifth acquiring unit, a sixth generating unit, and a second sending unit:
[0223] The fifth acquiring unit is configured to acquire the second data fragment sent by the first device;
[0224] The sixth generating unit is configured to generate second sub-feature information according to the second data slice using the third model;
[0225] The second sending unit is used to send the second sub-feature information to the first device to instruct the first device to determine the first data feature information based on the first sub-feature information and the second sub-feature information, where the first sub-feature information is feature information generated by the first device according to the first data slice through the first model, and the first model has first model parameters. The first model parameters and the second model parameters are used to constitute target model parameters, and the target model parameters are model parameters of the first model in the data processing model.
[0226] In a possible implementation, the third acquiring unit 901 is specifically configured to:
[0227] Obtaining second data characteristic information and encryption information sent by the first device, where the encryption information is used to represent an encryption method for a data processing result corresponding to the first data;
[0228] The third generating unit 902 is specifically configured to: generate an initial data processing result according to the second data feature information using the second model, encrypt the initial data processing result according to the encryption information, and output the first data processing result;
[0229] The device further includes a third sending unit:
[0230] The third sending unit is used to send the first data processing result to the first device to instruct the first device to decrypt the first data processing result through the decryption information to obtain the initial data processing result, and the decryption information is used to decrypt the data encrypted by the encryption method.
[0231] The embodiment of the present application further provides a computer device, as shown in FIG10 , which may be a terminal device. For example, the terminal device is a mobile phone.
[0232] FIG10 is a block diagram showing a partial structure of a mobile phone related to a terminal device provided in an embodiment of the present application. Referring to FIG10 , the mobile phone includes components such as a radio frequency (RF) circuit 710, a memory 720, an input unit 730, a display unit 740, a sensor 750, an audio circuit 760, a wireless fidelity (WiFi) module 770, a processor 780, and a power supply 790. It will be understood by those skilled in the art that the mobile phone structure shown in FIG10 does not constitute a limitation on the mobile phone, and the mobile phone may include more or fewer components than shown, or may combine certain components, or have different component arrangements.
[0233] The following is a detailed introduction to the various components of the mobile phone in conjunction with Figure 10:
[0234] The RF circuit 710 can be used to receive and send signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 780 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit 710 includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (LNA), a duplexer, etc. In addition, the RF circuit 710 can also communicate with the network and other devices through wireless communication. The above-mentioned wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
[0235] The memory 720 can be used to store software programs and modules. The processor 780 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in the memory 720. The memory 720 can mainly include a program storage area and a data storage area. The program storage area can store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, the memory 720 can include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device.
[0236] The input unit 730 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the mobile phone. Specifically, the input unit 730 may include a touch panel 731 and other input devices 732. The touch panel 731, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 731) and drive the corresponding connection device according to a pre-set program. Optionally, the touch panel 731 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 780. It can also receive commands sent by the processor 780 and execute them. In addition, the touch panel 731 can be implemented using various types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch panel 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick.
[0237] The display unit 740 can be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 740 may include a display panel 741. Optionally, the display panel 741 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. Further, the touch panel 731 may cover the display panel 741. When the touch panel 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of touch event, and then the processor 780 provides a corresponding visual output on the display panel 741 according to the type of touch event. Although in Figure 10, the touch panel 731 and the display panel 741 are used as two independent components to realize the input and output functions of the mobile phone, in some embodiments, the touch panel 731 and the display panel 741 can be integrated to realize the input and output functions of the mobile phone.
[0238] The mobile phone may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may turn off the display panel 741 and / or the backlight when the mobile phone is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors that the mobile phone can also be configured with, such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., they will not be described here.
[0239] Audio circuit 760, speaker 761, and microphone 762 provide an audio interface between the user and the phone. Audio circuit 760 converts received audio data into electrical signals and transmits them to speaker 761, which then converts them into sound signals for output. Microphone 762, on the other hand, converts collected sound signals into electrical signals, which are then received by audio circuit 760 and converted into audio data. The audio data is then processed by processor 780 and transmitted to, for example, another phone via RF circuit 710, or stored in memory 720 for further processing.
[0240] WiFi is a short-range wireless transmission technology. A mobile phone uses WiFi module 770 to help users send and receive emails, browse the web, and access streaming media, providing wireless broadband internet access. Although FIG10 illustrates WiFi module 770, it is understood that it is not a required component of the mobile phone and can be omitted as needed without changing the essence of the invention.
[0241] Processor 780 is the control center of the phone, connecting all parts of the phone using various interfaces and circuits. By running or executing software programs and / or modules stored in memory 720 and accessing data stored in memory 720, it performs various phone functions and processes data, thereby performing overall phone testing. Optionally, processor 780 may include one or more processing units; preferably, processor 780 may integrate an application processor and a modem processor, where the application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 780.
[0242] The mobile phone also includes a power supply 790 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 780 through a power management system, thereby managing charging, discharging, and power consumption management functions through the power management system.
[0243] Although not shown, the mobile phone may also include a camera, a Bluetooth module, etc., which will not be described in detail here.
[0244] In this embodiment, the processor 780 included in the terminal device is also used to execute the above-mentioned data processing method on the first device side or the second device side.
[0245] The embodiment of the present application also provides a server, as shown in Figure 11, which is a structural diagram of the server 800 provided in the embodiment of the present application. The server 800 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 822 (for example, one or more processors) and a memory 832, and one or more storage media 830 (for example, one or more mass storage devices) for storing application programs 842 or data 844. Among them, the memory 832 and the storage medium 830 can be temporary storage or permanent storage. The program stored in the storage medium 830 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 822 can be configured to communicate with the storage medium 830 to execute a series of instruction operations in the storage medium 830 on the server 800.
[0246] The server 800 may also include one or more power supplies 826 , one or more wired or wireless network interfaces 850 , one or more input and output interfaces 858 , and / or one or more operating systems 841 .
[0247] The steps executed by the server in the above embodiment may be based on the server structure shown in FIG11 .
[0248] An embodiment of the present application further provides a computer-readable storage medium for storing a computer program, which is used to execute any one of the data processing methods described in the aforementioned embodiments.
[0249] An embodiment of the present application further provides a computer program product including a computer program, which, when executed on a computer device, enables the computer device to execute the data processing method described in any one of the above embodiments.
[0250] It is understandable that in the specific implementation of this application, when it comes to user information (such as data provided by the data provider) and other related data, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0251] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: read-only memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0252] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0253] The above is merely one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims. < / x> < / w1> < / z> < / g> < / x> < / wv> < / wk> < / wq> < / x> < / wv> < / x> < / v> < / wk> < / x> < / k> < / wq> < / x> < / q> < / wo> < / a1> < / a0>
Claims
1. A data processing method, performed by a first device, wherein the first device includes a first model, the method comprising: generating, using the first model, first data feature information according to the first data, where the first data feature information is used to characterize data features of the first data; adding noise information to the first data feature information to obtain second data feature information; The second data characteristic information is sent to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information through a second model, the first model and the second model are used to constitute a data processing model, and the first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
2. The method according to claim 1, wherein generating first data feature information based on the first data using the first model comprises: Slice the first data to obtain a first data slice and a second data slice, wherein the first data slice and the second data slice are used to constitute the first data; generating, using the first model, first sub-feature information according to the first data slice, where the first sub-feature information is used to characterize data features of the first data slice, and the first model has first model parameters; Sending the second data slice to the second device to instruct the second device to generate second sub-feature information based on the second data slice using a third model, where the second sub-feature information is used to characterize data features of the second data slice, wherein the third model has the same architecture as the first model, the third model has second model parameters, and the first model parameters and the second model parameters are used to constitute target model parameters, which are model parameters of the first model in the data processing model; Obtaining the second sub-feature information sent by the second device; The first data feature information is determined according to the first sub-feature information and the second sub-feature information.
3. The method according to claim 2, wherein the data size of the first data slice is the same as that of the second data slice.
4. The method according to any one of claims 1 to 3, further comprising: Get the text information to be processed; Performing word segmentation processing on the text information to be processed to obtain a plurality of word segments included in the text information to be processed; Determine the word segmentation codes corresponding to the multiple word segmentations respectively; The first data is generated according to the word segmentation codes corresponding to the multiple word segmentations.
5. The method according to claim 4, wherein the text information to be processed includes text information corresponding to a plurality of units respectively, and the method further comprises: For each of the multiple participles, determining a segment code corresponding to the participle, wherein the segment code is used to represent the unit in which the participle is located; Generating the first data according to the segmentation codes corresponding to the multiple segmentations includes: The first data is generated according to the word segmentation codes and segmentation codes corresponding to the multiple word segmentations.
6. The method according to claim 4 or 5, further comprising: For each of the multiple participles, determining a position code corresponding to the participle, wherein the position code is used to represent a position distribution of the participle in the text information to be processed; Generating the first data according to the segmentation codes corresponding to the multiple segmentations includes: The first data is generated according to the word segmentation codes and position codes respectively corresponding to the multiple word segmentations.
7. The method according to any one of claims 4 to 6, wherein determining the segmentation codes corresponding to the plurality of segmentations comprises: Determine the segmentation codes corresponding to the multiple segmentations according to the code mapping relationship, wherein the code mapping relationship is used to record the mapping relationship between the segmentations and the segmentation codes; The method further comprises: In the case that the code mapping relationship does not contain the word segmentation, the mapping relationship between the word segmentation and the word segmentation code is updated to the code mapping relationship.
8. The method according to any one of claims 1 to 7, further comprising: Determining encryption information and decryption information corresponding to the first data, wherein the encryption information is used to represent an encryption method for a data processing result corresponding to the first data, and the decryption information is used to decrypt data encrypted by the encryption method; The sending the second data feature information to the second device to instruct the second device to generate a first data processing result according to the second data feature information using a second model includes: sending the second data characteristic information and the encryption information to the second device to instruct the second device to generate the first data processing result based on the second data characteristic information and the encryption information using a second model, wherein the second model is configured to generate an initial data processing result based on the second data characteristic information, encrypt the initial data processing result based on the encryption information, and output the first data processing result; The method further comprises: Obtaining a result of processing the first data sent by the second device; The first data processing result is decrypted using the decryption information to obtain the initial data processing result.
9. A data processing method, the method being performed by a second device, the second device including a second model, the method comprising: Obtaining second data feature information sent by the first device, where the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device based on the first data using a first model; Through the second model, a first data processing result is generated according to the second data feature information. The first model and the second model are used to constitute a data processing model. The first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
10. The method according to claim 9, wherein the degree of difference between the first data processing result and the second data processing result is less than a first degree threshold, and the second data processing result is a data processing result obtained by processing the first data through the data processing model.
11. The method according to claim 9 or 10, further comprising: Acquire second data, where the second data has a corresponding sample data processing result, where the sample data processing result is a result of processing the second data using the data processing model; Segmenting the data processing model based on the initial structure segmentation method to obtain a first initial model and a second initial model; generating, using the first initial model, third data feature information according to the second data, wherein the third data feature information is used to characterize data features corresponding to the second data; generating, by the second initial model, a pending data processing result according to fourth data feature information, wherein the fourth data feature information is obtained by adding the noise information to the third data feature information; adjusting the initial structural segmentation mode according to a difference between the pending data processing result and the sample data processing result to obtain a structural segmentation mode, wherein a degree of difference between the pending data processing result and the sample data processing result determined by the structural segmentation mode is less than a first degree threshold; Based on the structural segmentation method, the data processing model is segmented to obtain the first model and the second model.
12. The method according to any one of claims 9 to 11, wherein the noise information satisfies that the degree of difference between the first data processing result and the second data processing result is less than a second degree threshold, and the second data processing result is a data processing result obtained by processing the first data through the data processing model.
13. The method according to any one of claims 9 to 12, wherein the first device is further configured to perform sharding processing on the first data to obtain first data shards and second data shards, wherein the first data shards and the second data shards are used to constitute the first data, the second device further comprising a third model having the same architecture as the first model and having second model parameters, and the method further comprising: Obtaining the second data fragment sent by the first device; generating second sub-feature information according to the second data slice using the third model; The second sub-feature information is sent to the first device to instruct the first device to determine the first data feature information based on the first sub-feature information and the second sub-feature information, where the first sub-feature information is feature information generated by the first device according to the first data slice through the first model, and the first model has first model parameters. The first model parameters and the second model parameters are used to constitute target model parameters, and the target model parameters are model parameters of the first model in the data processing model.
14. The method according to any one of claims 9 to 13, wherein obtaining the second data characteristic information sent by the first device comprises: Obtaining second data characteristic information and encryption information sent by the first device, where the encryption information is used to represent an encryption method for a data processing result corresponding to the first data; Generating a first data processing result according to the second data feature information using the second model includes: generating an initial data processing result according to the second data feature information using the second model, encrypting the initial data processing result according to the encryption information, and outputting the first data processing result; The method further comprises: The first data processing result is sent to the first device to instruct the first device to decrypt the first data processing result through the decryption information to obtain the initial data processing result, and the decryption information is used to decrypt the data encrypted by the encryption method.
15. A data processing device, comprising a first generating unit, a first adding unit, and a first sending unit: The first generating unit is configured to generate first data feature information according to the first data using the first model, where the first data feature information is used to represent data features of the first data; The first adding unit is configured to add noise information to the first data feature information to obtain second data feature information; The first sending unit is used to send the second data characteristic information to the second device to instruct the second device to generate a first data processing result according to the second data characteristic information through a second model. The first model and the second model are used to constitute a data processing model, and the first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
16. A data processing device, comprising a third acquiring unit and a third generating unit: the third acquiring unit being configured to acquire second data feature information sent by the first device, where the second data feature information is obtained by the first device by adding noise information to the first data feature information, and the first data feature information is generated by the first device based on the first data using the first model; The third generation unit is used to generate a first data processing result based on the second data feature information through the second model. The first model and the second model are used to constitute a data processing model. The first data processing result is used to represent the data processing result obtained by processing the first data through the data processing model.
17. A computer device comprising a processor and a memory: The memory is used to store a computer program and transmit the computer program to the processor; The processor is configured to execute the data processing method described in any one of claims 1 to 8, or execute the data processing method described in any one of claims 9 to 14, according to instructions in the computer program.
18. A computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, wherein the computer program is used to execute the data processing method according to any one of claims 1 to 8, or execute the data processing method according to any one of claims 9 to 14.
19. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements the data processing method according to any one of claims 1 to 8, or the data processing method according to any one of claims 9 to 14.
Citation Information
Patent Citations
Model training method and device and electronic equipment
CN112668038A
Model training method and device, equipment and storage medium
CN114519436A
Data transmission method and device, computer equipment and storage medium
CN115801266A
Fine tuning method and device for federal learning large model
CN117056962A
Data processing method and related device
CN117955732A