A business processing method, apparatus and device
By dividing the business model into a first sub-model and a second sub-model, and setting the second sub-model in a trusted execution environment, combined with smart contract processing, the problem that business models in private clouds are easily stolen is solved, and security protection of model structure and data is achieved.
Patent Information
- Application Number
- CN202111063850.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-10
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2041-09-10
AI Technical Summary
In the prior art, business models deployed by enterprises or organizations in the private cloud are easily stolen by attackers, resulting in user privacy data leakage and immeasurable losses, and encryption protection methods are easily cracked.
The business model is divided into a first sub-model and a second sub-model. The second sub-model is set in a trusted execution environment and data is processed through a trusted execution environment. The first sub-model runs in a general execution environment and uses smart contracts to transmit and process data in the blockchain system.
It effectively protects the model structure and related data of the business model, prevents it from being stolen by malicious attackers, ensures the security of business processing and the core assets of the enterprise or organization being not infringed.
Smart Images

Figure CN113792297B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of computer technology, and in particular, to a service processing method, apparatus, and device. Background Art
[0002] Currently, many enterprises or organizations deploy the service models of some of their services locally to the service providers in the form of private clouds. In this method, the model structure and related data of the service model are extremely vulnerable to being stolen by attackers. Service models (such as OCR models and face recognition models, etc.) are usually the core assets of the enterprise or organization. Once the service model is leaked, not only will the user privacy data hidden in the service model be exposed, but also immeasurable losses will be caused to the enterprise or organization. Currently, the protection means for service models are extremely weak. For example, the service model can usually be protected by encryption. However, in this case, as long as the decryption point is found for hook processing, it is very easy to steal the model structure and related data of the service model by means such as dumping memory. Therefore, it is necessary to provide a technical solution that can more effectively protect the model structure and related data of the service model to prevent them from being stolen by malicious attackers. Summary of the Invention
[0003] The purpose of the embodiments of this specification is to provide a technical solution that can more effectively protect the model structure and related data of the service model to prevent them from being stolen by malicious attackers.
[0004] To achieve the above technical solution, the embodiments of this specification are implemented as follows:
[0005] A service processing method provided by the embodiments of this specification is applied to a service processing device. The service processing device includes a trusted execution environment. The method includes: obtaining service data for a target service, where the target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Inputting the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data. Transmitting the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0006] A service processing method provided by an embodiment of this specification is applied to a blockchain system. The blockchain system includes blockchain nodes, and the blockchain nodes include a trusted execution environment. The method includes: obtaining service data for a target service, where the target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. Inputting the service data into the first sub-model divided from the service model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system to obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data. Based on a second smart contract pre-deployed in the blockchain system, passing the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger passing the output result of the first sub-model to the trusted execution environment and trigger processing the output result of the first sub-model in the trusted execution environment.
[0007] A service processing device provided by an embodiment of this specification. The device includes a trusted execution environment. The device includes: a data acquisition module, which acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. A first result determination module, which inputs the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data. A model prediction module, which passes the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0008] A service processing device provided by an embodiment of this specification. The device is a device in a blockchain system, and a trusted execution environment is included in the device. The device includes: a data acquisition module, which acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the device and can run in the trusted execution environment. A first result determination module, which inputs the service data into the first sub-model divided from the service model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system, and obtains a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the acquired service data. A prediction result determination module, based on a second smart contract pre-deployed in the blockchain system, transmits the first output result to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
[0009] A service processing device provided by an embodiment of this specification. The service processing device is provided with a trusted execution environment and includes: a processor; and a memory arranged to store computer-executable instructions. When the executable instructions are executed, the processor: acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Inputs the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data. Transmits the first output result to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0010] A service processing device provided by an embodiment of this specification. The device is a device of a blockchain system. The service processing device is provided with a trusted execution environment, including: a processor; and a memory arranged to store computer-executable instructions. When the executable instructions are executed, the processor is caused to: obtain service data for a target service, where the target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the device and can run in the trusted execution environment. Input the service data into the first sub-model divided from the service model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system to obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data. Based on a second smart contract pre-deployed in the blockchain system, pass the first output result to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger passing the output result of the first sub-model to the trusted execution environment and trigger processing of the output result of the first sub-model in the trusted execution environment.
[0011] An embodiment of this specification also provides a storage medium. The storage medium is used to store computer-executable instructions. When the executable instructions are executed, the following process is implemented: obtain service data for a target service, where the target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in a trusted execution environment and can run in the trusted execution environment. Input the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data. Pass the first output result to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0012] An embodiment of this specification also provides a storage medium. The storage medium is used to store computer-executable instructions, and when the executable instructions are executed, the following process is implemented: Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. Based on a first smart contract pre-deployed in the blockchain system, input the service data into the first sub-model segmented from the service model corresponding to the target service to obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data. Based on a second smart contract pre-deployed in the blockchain system, through the application corresponding to the target service, transfer the first output result to the trusted execution environment, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger the transfer of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment. Brief Description of the Drawings
[0013] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments recorded in this specification. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0014] Figure 1 This is an embodiment of a service processing method in this specification;
[0015] Figure 2 This is a schematic diagram of the execution environment in a service processing device in this specification;
[0016] Figure 3 This is another embodiment of a service processing method in this specification;
[0017] Figure 4A This is yet another embodiment of a service processing method in this specification;
[0018] Figure 4B This is a schematic diagram of a service processing process in this specification;
[0019] Figure 5This is an embodiment of a service processing device in this specification;
[0020] Figure 6 This is another embodiment of a service processing device in this specification;
[0021] Figure 7 This is an embodiment of a service processing device in this specification. Detailed implementation manners
[0022] The embodiments of this specification provide a service processing method, device, and equipment.
[0023] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of this specification. Obviously, the described embodiments are only a part of the embodiments of this specification, rather than all the embodiments. Based on the embodiments in this specification, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of this specification.
[0024] Embodiment 1
[0025] As Figure 1 shown, the embodiments of this specification provide a service processing method. The execution subject of this method can be a service processing device, and this service processing device can be a terminal device or a server. Among them, the terminal device can be a computer device such as a notebook computer or a desktop computer, or can be an IoT device, etc. The server can be a server for a certain service (such as a service for conducting transactions or a financial service, etc.). Specifically, for example, this server can be a server for payment services, or can also be a server related to financial or instant messaging services, etc. A trusted execution environment can be set in this service processing device. This trusted execution environment can be a TEE (Trusted Execution Environment). This trusted execution environment can be implemented by a program written in a predetermined programming language (that is, can be implemented in the form of software), or can also be jointly implemented by a hardware device and a pre-written program (that is, can be implemented in the form of hardware + software), etc. This trusted execution environment can be a secure operating environment for data processing. This method can specifically include the following steps:
[0026] In step S102, obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameter to be protected recorded in the model protection rule corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment.
[0027] Among them, the target service can be any service, such as an information recommendation service, a risk prevention and control service in the financial system, or a commodity trading service, etc. Service data can be data related to the target service, which may include data generated when the user triggers the target service and during the execution of the target service, and may also include data provided when the user triggers the target service and during the execution of the target service, etc. The service model can be a model related to the target service, and different service models can be constructed based on different target services. For example, if the target service is an information recommendation service, the service model can be a model for information recommendation; if the target service is a risk prevention and control service in the financial system, the service model can be a model for risk prevention and control of the financial system; if the target service is a commodity trading service, the service model can be a model for predicting the sales volume of a certain commodity, etc. There can be multiple service models, and different service models can be constructed in different ways. For example, a model for information recommendation can be constructed through a classification algorithm, or a model for risk prevention and control of the financial system can be constructed through a convolutional neural network algorithm, etc. The model protection rule can be a rule for effectively protecting the structure and model parameters of the service model to prevent them from being stolen by malicious attackers. The model protection rule can record which model or models need to be protected, and the relevant data to be protected in each model, etc. The model parameters can vary according to different service models, and the model parameters can include, for example, a certain weight, coefficient, or a certain vector, etc. The trusted execution environment can be a secure data processing environment isolated from other environments, that is, the processing executed in the trusted execution environment and the data generated during the data processing process cannot be accessed by other execution environments or application programs outside the executable environment. Such as Figure 2As shown, the trusted execution environment can be implemented by creating a small operating system that can run independently in a trusted area (such as TrustZone, etc.). The trusted execution environment can directly provide services in the form of system calls (such as directly processed by the TrustZone kernel). The device can include a REE (Regular Execution Environment) and a trusted execution environment. Under the REE, the operating systems installed on the terminal device can run, such as the Android operating system, iOS operating system, Windows operating system, Linux operating system, etc. The characteristics of the REE can include being powerful, having good openness and scalability, etc., and can provide all the functions of the device for upper-layer application programs, such as the camera function, touch function, etc. However, there are many security risks in the REE. For example, the operating system can obtain all the data of a certain application program, but it is difficult to verify whether the operating system or the application program has been tampered with. If it has been tampered with, the user's information will have great security risks. In view of this, the trusted execution environment in the device needs to handle it. The trusted execution environment has its own execution space, that is, there is also an operating system under the trusted execution environment. The trusted execution environment has a higher security level than the REE. The software and hardware resources in the device that the trusted execution environment can access are separated from the REE, but the trusted execution environment can directly obtain the information of the REE, while the REE cannot obtain the information of the trusted execution environment. The trusted execution environment can perform verification and other processing through the provided interfaces, so as to ensure that user information (such as payment information, user privacy information, etc.) will not be tampered with, passwords will not be hijacked, and information such as fingerprints or faces will not be stolen.
[0028] In implementation, currently, many enterprises or organizations deploy the business models of some of their businesses to the local area of the business party in the form of private clouds. The model structure and related data of the business models in this method are extremely easy to be stolen by attackers. And business models (such as OCR models and face recognition models, etc.) are usually the core assets of the enterprise or organization. Once the business model is leaked, not only will the user privacy data hidden in the business model be exposed, but it will also cause incalculable losses to the enterprise or organization. Currently, the protection means for business models are extremely weak. For example, usually, the business model can be protected by encryption, but in this way, as long as the decryption point is found for hook processing, it is very easy to steal the model structure and related data of the business model by means such as dumping memory. Therefore, it is necessary to provide a more effective technical solution to protect the model structure and related data of the business model to prevent them from being stolen by malicious attackers. The embodiments of this specification provide an implementable processing method, which can specifically include the following content:
[0029] Generally, different business models can be divided into a public part and a private part. The private part is the sub-model where the model structure or relevant data that needs to be protected in the business model of an enterprise or organization is located. Based on this, for any target business, a business model for processing the business data of the target business can be set for the target business, and according to the requirements of the target business or according to the actual situation, the business model can be segmented, so as to obtain multiple different parts segmented therefrom. In practical applications, according to the requirements of the target business or according to the actual situation, the model protection rules corresponding to the target business can also be preset. The model protection rules can record information such as the model parameters and model architecture that need to be protected in the target model. Therefore, the business model can also be segmented based on the above model protection rules, so as to segment out multiple different parts. Among them, the segmented sub-models can be spliced to obtain the business model. In addition, in the business model, the output data of the sub-model arranged in the front can be used as the input data of a sub-model after the segmented sub-model. In this embodiment, the business model can be segmented into two parts. One of the parts can be the public part, and the other part can be the private part, that is, the business model can be segmented into a first sub-model and a second sub-model. In practical applications, the business model can also be segmented into more than two parts. For example, the business model can be segmented into Part 1, Part 2, and Part 3. Then, according to the actual situation, the above multiple parts can be classified to determine the parts that can be used as the public part and the parts that can be used as the private part. For example, the above Part 1 can be used as the public part, and the above Part 2 and Part 3 can be used as the private part, etc. The part that can be used as the public part can be used as the first sub-model, and the part that can be used as the private part can be used as the second sub-model.
[0030] Considering that a trusted execution environment is often set in a business processing device, and the trusted execution environment, as a security isolation environment in the business processing device, can be isolated from other environments in the business processing device, so as to ensure the security of the data in the trusted execution environment. Based on this, the sub-model that needs to protect the model architecture and relevant data can be set to run in the trusted execution environment, that is, the second sub-model in the business model can be analyzed. Based on the obtained analysis result, the second sub-model can be set to run in the trusted execution environment, so as to achieve the purpose of setting the second sub-model in the trusted execution environment and being able to run in the trusted execution environment. For the first sub-model, it can be set in the general execution environment of the business processing device, or, it can also be set in the execution environment with preset or specified environment parameters, or, it can also be set in the trusted execution environment, which can be specifically set according to the actual situation, and this embodiment of the present specification does not make a limitation in this regard.
[0031] After deploying the business model in the above manner, when a certain user requests a target business or triggers the execution of a target business, the business processing device can obtain the relevant data when the user requests or triggers the target business, as well as the relevant data generated by the execution of the target business, and can use the above as the business data for the target business.
[0032] In step S104, the above business data is input into the first sub-model segmented from the business model corresponding to the target business, and the first output result corresponding to the business data is obtained.
[0033] In implementation, generally, when the business model processes business data, as the processing of business data goes deeper, the later data processing in the business model is more complex or has stronger confidentiality, while the earlier data processing in the business model is more basic or has lower confidentiality, such as vectorizing business data or extracting features from business data. Since the vectorization processing of data and the feature extraction of data are usually commonly used data processing means, and their specific processing methods and processes include multiple types, the above processing can be easily implemented. However, the processing methods and processes after obtaining the vectorized data or the extracted features can be those with stronger confidentiality and can be the parts that need to be protected. Based on this, in the business model, the first sub-model can be the sub-model that is executed prior to the second sub-model. That is, during the operation of the business model, the business data will first be processed by the part corresponding to the first sub-model, and then the processing result will be continued to be processed by the second sub-model, and finally the output result of the business model will be obtained. Therefore, the above business data can be input into the first sub-model segmented from the business model corresponding to the target business, and the business data is processed accordingly by the first sub-model to obtain the corresponding output result, and this output result can be used as the first output result corresponding to the business data.
[0034] In step S106, the first output result is transmitted to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, the first output result is input into the second sub-model to obtain the model prediction result corresponding to the above business data.
[0035] Among them, the application corresponding to the target service can be a pre-set application that can be used for data transmission between different parts of the service model and has the specific permission to transmit data to the trusted execution environment. The application corresponding to the target service can be an application program that needs to be installed in the service processing device, or a code program pre-implanted in a certain hardware device of the service processing device, or a program running in the background of the operating system of the service processing device in the form of a plug-in, etc. The application corresponding to the target service can be an application that can only be called by components or assemblies with specified permissions (such as components corresponding to the trusted execution environment or the central processing unit, etc.), and can be specifically set according to the actual situation.
[0036] In implementation, to ensure the accuracy of the first output result, the component corresponding to the trusted execution environment can trigger the operation of the application corresponding to the target service. After the application corresponding to the target service verifies the component, the service processing device can call the application corresponding to the target service and transmit the first output result to the trusted execution environment through the application corresponding to the target service. Since the first output result is transmitted by the application corresponding to the target service and the user cannot obtain the first output result through other components or assemblies, and moreover, the plaintext first output result cannot be extracted from the application corresponding to the target service, the first output result can be prevented from being tampered with during the transmission process. In addition, to further ensure the security of data transmission, the first output result can also be encrypted, etc. The encryption method can include various types, such as symmetric encryption or asymmetric encryption, etc., and can be specifically set according to the actual situation. This embodiment of the present specification does not make any limitations in this regard.
[0037] After the first output result is transmitted to the trusted execution environment, the first output result can be further processed in the trusted execution environment. That is, in the trusted execution environment, the first output result is input into the second sub-model, and through the processing of the first output result by the second sub-model, the corresponding output result can be obtained, and this output result can be the model prediction result corresponding to the above-mentioned service data. In addition, for the case where the first output result is encrypted, after the encrypted first output result is transmitted to the trusted execution environment, the encrypted first output result can be decrypted in the trusted execution environment to obtain the decrypted first output result (i.e., the first output result), and then, subsequent processing is performed based on the decrypted first output result. For specific details, reference can be made to the above relevant content and will not be elaborated here. Finally, the trusted execution environment can output the obtained model prediction result.
[0038] An embodiment of this specification provides a service processing method, which is applied to a service processing device. The service processing device includes a trusted execution environment. Specifically: after obtaining service data for a target service, the service data is input into a first sub-model segmented from the service model corresponding to the target service to obtain a first output result corresponding to the service data. The target service corresponds to a service model for processing the service data. The service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service. The second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Then, the first output result is transmitted to the trusted execution environment through an application corresponding to the target service. In the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. In this way, by setting the model architecture and model parameters that need to be protected in the secure environment constituted by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers. Finally, the output result will not be outside the trusted execution environment, which can well prevent model extraction attacks and model reverse attacks, ensure the security of service processing and service models, and protect the core assets of enterprises or organizations.
[0039] Embodiment 2
[0040] As Figure 3 shown, an embodiment of this specification provides a service processing method. The execution subject of this method can be a service processing device, which can be a terminal device or a server. Among them, the terminal device can be a computer device such as a laptop or a desktop computer. The server can be a server for a certain service (such as a trading service or a financial service, etc.). Specifically, the server can be a server for payment services, or a server related to financial or instant messaging services, etc. A trusted execution environment can be set in the service processing device. The trusted execution environment can be a TEE. The trusted execution environment can be implemented by a program written in a predetermined programming language (that is, it can be implemented in the form of software), or can be jointly implemented by a hardware device and a pre-written program (that is, it can be implemented in the form of hardware + software), etc. The trusted execution environment can be a secure operating environment for data processing. The method can specifically include the following steps:
[0041] In step S302, obtain a service model for a target service.
[0042] Among them, the service model can be a deep learning model, etc. For example, a neural network model, a decision tree model, or a generative adversarial network model, etc.
[0043] In step S304, based on the model protection rules corresponding to the target service, the service model is split into a first sub-model and a second sub-model, and the second sub-model includes the model parameters to be protected recorded in the model protection rules.
[0044] Among them, the first sub-model can be constructed by the backbone feature network BackBone model, the second sub-model can be constructed by the feature data processing Neck model and the prediction using features Head model, and the second sub-model can be presented in the form of a graph Graph. The model parameters can include weight Weights parameters and / or bias Bias parameters, etc. The backbone feature network BackBone model can specifically be a feature extraction model, such as a convolutional neural network model or a residual network model, etc.
[0045] In step S306, the second sub-model is set in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0046] In implementation, the conversion rules or conversion algorithms corresponding to the second sub-model therein can be preset based on different models. There can be multiple types of such conversion rules or conversion algorithms, which can be specifically set according to the actual situation, and the embodiments of this specification do not limit this. In order to set the second sub-model in the business model of the target service in the trusted execution environment, the conversion rules or conversion algorithms corresponding to the second sub-model in the business model can be obtained, and the second sub-model can be converted through the obtained conversion rules or conversion algorithms, so that it can be converted into data that can run in the trusted execution environment, and then it is set in the trusted execution environment.
[0047] In practical applications, the specific processing of the above step S306 can be various. The following provides an optional processing method, which can specifically include the processing from step A2 to step A6:
[0048] In step A2, the second sub-model is converted into data of a preset type that can run in the trusted execution environment.
[0049] Among them, the preset type includes one or more of the graph Graph file type and the parameter type. In addition, in order to facilitate the trusted execution environment to efficiently execute the protected sub-model, a parameter index table can also be set in the trusted execution environment. The specific processing can be as follows: If the preset type includes the parameter type, corresponding parameter index information can be generated based on the converted data of this parameter type, and then, the parameter index information is encrypted and the encrypted parameter index information is set in the trusted execution environment, and the encrypted parameter index information can be decrypted in the trusted execution environment to obtain the original parameter index information.
[0050] In implementation, as Figure 2 shown, the second sub-model can be parsed by a preset parsing tool to parse the second sub-model into data of types such as a Graph file and parameters that can be directly run in the lightweight AI execution engine Nano Framework of the trusted execution environment, and a corresponding parameter index table can be constructed in the trusted execution environment, so that subsequently, the second sub-model can be easily set in the trusted execution environment and the second sub-model can run in the trusted execution environment.
[0051] In step A4, the converted data is encrypted and the encrypted data is set in the trusted execution environment.
[0052] In implementation, to protect the security of the data transmission process, an encryption algorithm for the data can be preset, such as the AES encryption algorithm, the RSA encryption algorithm, etc. After obtaining the converted data, the above encryption algorithm can be used to encrypt the corresponding converted data to obtain the encrypted data. Among them, different types of data included in the converted data can be encrypted using the same encryption algorithm or different encryption algorithms, which can be specifically set according to the actual situation. Then, the encrypted data can be passed to the trusted execution environment through the application corresponding to the target service.
[0053] In step A6, the encrypted data is decrypted in the trusted execution environment to obtain the converted data.
[0054] In step S308, the first sub-model is set in the general execution environment so that the first sub-model can run in the general execution environment. In implementation, as Figure 2 shown, the first sub-model can be set in the AI execution engine of the general execution environment and can run in the AI execution engine of the general execution environment, so that the first sub-model is set in the general execution environment and the first sub-model can run in the general execution environment.
[0055] In step S310, business data for the target service is obtained.
[0056] In step S312, the above business data is input into the first sub-model segmented from the business model corresponding to the target service to obtain the first output result corresponding to the business data.
[0057] In step S314, the first output result is encrypted and the encrypted first output result is passed to the trusted execution environment through the application corresponding to the target service.
[0058] In step S316, in the trusted execution environment, the encrypted first output result is decrypted, and the decrypted first output result is input into the second sub-model to obtain the model prediction result corresponding to the above-mentioned service data.
[0059] In implementation, as Figure 2 shown, when the AI execution engine Nano Framework in the trusted execution environment executes the relevant operations of the second sub-model, the TA (Trusted Application) corresponding to the CA (Client Application, that is, the application corresponding to the target service) will retrieve the corresponding data (the encrypted first output result) according to the parameter index table. After decrypting the data, it provides the data required during the execution to the corresponding operator in the AI execution engine Nano Framework. The AI execution engine Nano Framework of the trusted execution environment calls the corresponding operator library to execute the corresponding operator, and the TA provides the corresponding data. After the execution is completed, the output result can be saved in the trusted execution environment and subsequent inference prediction and other processes can continue to be executed.
[0060] Through the above processing, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment. This can well prevent model extraction attacks and model reverse attacks, ensure the security of business processing and business models, and protect the core assets of enterprises or organizations.
[0061] An embodiment of this specification provides a service processing method, which is applied to a service processing device. The service processing device includes a trusted execution environment, where: after obtaining service data for a target service, the service data is input into a first sub-model segmented from a service model corresponding to the target service to obtain a first output result corresponding to the service data. The target service corresponds to a service model for processing the service data, and the service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Then, the first output result is transmitted to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. In this way, by setting the model architecture and model parameters that need to be protected in the secure environment formed by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment. In this way, model extraction attacks and model reverse attacks are well prevented, the security of service processing and service models is ensured, and the core assets of enterprises or organizations are protected.
[0062] Embodiment III
[0063] As Figure 4A and 4B As shown, an embodiment of this specification provides a service processing method. The execution subject of this method can be a blockchain system, which includes blockchain nodes. The blockchain nodes can be terminal devices or servers, etc. Among them, the terminal devices can be mobile terminal devices such as mobile phones and tablet computers, and can also be devices such as personal computers. The server can be an independent server or a server cluster composed of multiple servers, etc. The blockchain nodes include a trusted execution environment, which can be a TEE. The trusted execution environment can be implemented by a program written in a predetermined programming language (that is, it can be implemented in the form of software), or can be jointly implemented by a hardware device and a pre-written program (that is, it can be implemented in the form of hardware + software), etc. The trusted execution environment can be a secure operating environment for data processing. The method can specifically include the following steps:
[0064] In step S402, business data for a target business is obtained. The target business corresponds to a business model for processing the business data. The business model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected as recorded in the model protection rules corresponding to the target business. The second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment.
[0065] Among them, the business model can be a deep learning model, etc. Based on this, the first sub-model can be constructed by the BackBone model of the backbone features, and the second sub-model can be constructed by the Neck model for feature data processing and the Head model for making predictions using features. Model parameters can include Weights parameters and / or Bias parameters, etc.
[0066] Before the above step S402, other devices can also pre-train the business model in advance to obtain the trained business model, and then deploy the trained business model. Based on this, it can be achieved through the processing of the following steps C2 to step C6:
[0067] In step C2, based on the third smart contract pre-deployed in the blockchain system, the business model for the target business is obtained.
[0068] Among them, the third smart contract can be a smart contract for executing the processing of steps C2 to C6. A smart contract can be a computer protocol designed to spread, verify, or execute a contract in an information-based manner. A smart contract allows for trusted interactions without a third party, and the above interaction process is traceable and irreversible. The smart contract includes an agreement on which the contract parties can execute the rights and obligations agreed upon by the contract parties.
[0069] In step C4, based on the third smart contract, the model protection rules corresponding to the target business are obtained, and based on the model protection rules, the business model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected as recorded in the model protection rules.
[0070] In step C6, based on the third smart contract, the second sub-model is set in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0071] The above specific processing process can refer to the above relevant content and will not be elaborated here.
[0072] Among them, the specific processing of the above step C6 can also be processed in the following manner, and specifically, it can refer to the processing of the following steps C62 to C66.
[0073] In step C62, based on the third smart contract, the second sub-model is converted into data of a preset type that can run in a trusted execution environment.
[0074] In step C64, based on the third smart contract, the converted data is encrypted, and the encrypted data is set in the trusted execution environment.
[0075] In step C66, based on the third smart contract, the encrypted data is decrypted in the trusted execution environment to obtain the converted data.
[0076] Among them, the third smart contract can be a smart contract used to execute the processing of steps C62 to C66.
[0077] It should be noted that the above preset type may include one or more of the graph file type and the parameter type;
[0078] If the preset type includes the parameter type, the following processing can also be performed: Based on the fourth smart contract pre-deployed in the blockchain system, through the converted data of the parameter type, the corresponding parameter index information is generated. Based on the fourth smart contract, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. Based on the fourth smart contract, the encrypted parameter index information is decrypted in the trusted execution environment to obtain the parameter index information.
[0079] Among them, the fourth smart contract can be a smart contract used to generate a parameter index table and process the parameter index table. In step S404, based on the first smart contract pre-deployed in the blockchain system, the business data is input into the first sub-model segmented from the business model corresponding to the target business, and the first output result corresponding to the business data is obtained. The first smart contract is used to trigger the first sub-model to process the obtained business data.
[0080] In implementation, the first smart contract can be pre-generated based on the processing process of processing the obtained business data by the first sub-model, and the first smart contract can be deployed in the blockchain system. Then, the corresponding processing can be performed based on the processing method, processing process, and rules specified in the first smart contract.
[0081] In step S406, based on the second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, the first output result is input into the second sub-model to obtain the model prediction result corresponding to the business data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
[0082] In implementation, a second smart contract can be pre-generated based on a process of transmitting the output result of the first sub-model to a trusted execution environment and processing the output result of the first sub-model in the trusted execution environment. The second smart contract can be deployed in a blockchain system. Then, corresponding processing can be performed based on the processing method, process, and rules specified in the second smart contract.
[0083] In addition, the first sub-model can be set in a general execution environment, that is, based on the second smart contract, the first sub-model is set in the general execution environment so that the first sub-model can run in the general execution environment. An embodiment of this specification provides a service processing method, which is applied to a blockchain system. The blockchain system includes blockchain nodes, and the blockchain nodes include a trusted execution environment, where: after obtaining service data for a target service, based on a first smart contract pre-deployed in the blockchain system, the service data is input into a first sub-model segmented from a service model corresponding to the target service to obtain a first output result corresponding to the service data. The target service corresponds to a service model for processing the service data, and the service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. The first smart contract is used to trigger the first sub-model to process the obtained service data. Then, based on a second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment. In this way, by setting the model architecture and model parameters that need to be protected in a secure environment formed by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of an organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment, thus well preventing model extraction attacks and model reverse attacks, ensuring the security of service processing and service models, and protecting the core assets of enterprises or organizations.
[0084] Embodiment 4
[0085] The above is the service processing method provided by the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a service processing device, and the device includes a trusted execution environment, as Figure 5 shown.
[0086] The service processing device includes: a data acquisition module 501, a first result determination module 502, and a model prediction module 503, where:
[0087] The data acquisition module 501 acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment;
[0088] The first result determination module 502 inputs the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data;
[0089] The model prediction module 503 transfers the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0090] In an embodiment of the present specification, the model prediction module 503 includes:
[0091] An encryption unit encrypts the first output result and transfers the encrypted first output result to the trusted execution environment through the application corresponding to the target service;
[0092] A model prediction unit decrypts the encrypted first output result in the trusted execution environment and inputs the decrypted first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0093] In an embodiment of the present specification, the device further includes:
[0094] A model acquisition module acquires a service model for a target service;
[0095] A second segmentation module divides the service model into a first sub-model and a second sub-model based on the model protection rules corresponding to the target service. The second sub-model includes model parameters to be protected recorded in the model protection rules;
[0096] A second setting module sets the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0097] In the embodiments of this specification, the second setting module includes:
[0098] A conversion unit that converts the second sub-model into data of a preset type that can run in the trusted execution environment;
[0099] A setting unit that encrypts the converted data and sets the encrypted data in the trusted execution environment;
[0100] A decryption unit that decrypts the encrypted data in the trusted execution environment to obtain the converted data.
[0101] In the embodiments of this specification, the preset type includes one or more of the graph file type and the parameter type;
[0102] When the preset type includes the parameter type, the device further includes:
[0103] An index generation module that generates corresponding parameter index information based on the data of the parameter type after conversion;
[0104] An index encryption module that encrypts the parameter index information and sets the encrypted parameter index information in the trusted execution environment;
[0105] An index decryption module that decrypts the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0106] In the embodiments of this specification, the device further includes:
[0107] A third setting module that sets the first sub-model in a general execution environment so that the first sub-model can run in the general execution environment.
[0108] In the embodiments of this specification, the service model is a deep learning model, the first sub-model is constructed by the BackBone model of the backbone features network, and the second sub-model is constructed by the Neck model for feature data processing and the Head model for making predictions using features.
[0109] In the embodiments of this specification, the model parameters include weight Weights parameters and / or bias Bias parameters.
[0110] An embodiment of this specification provides a service processing device. After obtaining service data for a target service, the service data is input into a first sub-model segmented from the service model corresponding to the target service, and a first output result corresponding to the service data is obtained. Among them, the target service corresponds to a service model for processing the service data, and the service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in a trusted execution environment and can run in the trusted execution environment. Then, the first output result is transmitted to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. In this way, by setting the model architecture and model parameters that need to be protected in a secure environment formed by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment, thus well preventing model extraction attacks and model reverse attacks, ensuring the security of service processing and service models, and protecting the core assets of enterprises or organizations.
[0111] Embodiment 5
[0112] Based on the same idea, an embodiment of this specification also provides a service processing device, which is a device in a blockchain system. The device includes a trusted execution environment, as Figure 6 shown.
[0113] The service processing device includes: a data acquisition module 601, a first result determination module 602, and a prediction result determination module 603, where:
[0114] The data acquisition module 601 acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the device and can run in the trusted execution environment;
[0115] The first result determination module 602 inputs the service data into a first sub-model segmented from the service model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system, and obtains a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the acquired service data;
[0116] A prediction result determination module 603, based on a second smart contract pre-deployed in the blockchain system, transfers the first output result to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger the transfer of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
[0117] In the embodiments of this specification, the device further includes:
[0118] A model acquisition module, based on a third smart contract pre-deployed in the blockchain system, acquires a service model for a target service;
[0119] A model segmentation module, based on the third smart contract, acquires a model protection rule corresponding to the target service, and based on the model protection rule, segments the service model into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rule;
[0120] A setting module, based on the third smart contract, sets the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0121] In the embodiments of this specification, the setting module includes:
[0122] A conversion unit, based on the third smart contract, converts the second sub-model into data of a preset type that can run in the trusted execution environment;
[0123] An encryption unit, based on the third smart contract, encrypts the converted data and sets the encrypted data in the trusted execution environment;
[0124] A decryption unit, based on the third smart contract, decrypts the encrypted data in the trusted execution environment to obtain the converted data.
[0125] In the embodiments of this specification, the preset type includes one or more of a Graph file type and a parameter type;
[0126] When the preset type includes a parameter type, the device further includes:
[0127] An index generation module, based on a fourth smart contract pre-deployed in the blockchain system, generates corresponding parameter index information through the converted data of the parameter type;
[0128] An index encryption module, based on the fourth smart contract, encrypts the parameter index information and sets the encrypted parameter index information in the trusted execution environment;
[0129] An index decryption module, based on the fourth smart contract, decrypts the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0130] In the embodiments of the present specification, the device further includes:
[0131] A general model setting module, based on the second smart contract, sets the first sub-model in the general execution environment so that the first sub-model can run in the general execution environment.
[0132] The embodiments of the present specification provide a service processing device. After obtaining service data for a target service, based on a first smart contract pre-deployed in a blockchain system, the service data is input into a first sub-model segmented from a service model corresponding to the target service to obtain a first output result corresponding to the service data. The target service corresponds to a service model for processing the service data. The service model is segmented into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the device and can run in the trusted execution environment. The first smart contract is used to trigger the first sub-model to process the obtained service data. Then, based on a second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through an application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment. In this way, by setting the model architecture and model parameters that need to be protected in a secure environment constituted by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of an organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment, thus well preventing model extraction attacks and model reverse attacks, ensuring the security of service processing and service models, and protecting the core assets of enterprises or organizations.
[0133] Embodiment Six
[0134] The above is the service processing device provided by the embodiments of the present specification. Based on the same idea, the embodiments of the present specification also provide a service processing device, as Figure 7 shown.
[0135] The service processing device may be the terminal device, server, or device in the blockchain system provided in the above embodiments. A trusted execution environment may be set in the service processing device.
[0136] The service processing device may have relatively large differences due to different configurations or performances. It may include one or more processors 701 and a memory 702. One or more application programs or data may be stored in the memory 702. Among them, the memory 702 may be transient storage or persistent storage. The application programs stored in the memory 702 may include one or more modules (not shown in the figure). Each module may include a series of computer-executable instructions for the service processing device. Further, the processor 701 may be set to communicate with the memory 702 and execute a series of computer-executable instructions in the memory 702 on the service processing device. The service processing device may also include one or more power supplies 1103, one or more wired or wireless network interfaces 704, one or more input / output interfaces 705, and one or more keyboards 706.
[0137] Specifically, in this embodiment, the service processing device includes a memory and one or more programs. One or more of the programs are stored in the memory, and one or more of the programs may include one or more modules. Each module may include a series of computer-executable instructions for the service processing device and is configured to be executed by one or more processors. The one or more programs include the following computer-executable instructions:
[0138] Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service. The second sub-model is set in the trusted execution environment and can run in the trusted execution environment;
[0139] Input the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data;
[0140] Transmit the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0141] In the embodiments of this specification, passing the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain the model prediction result corresponding to the service data includes:
[0142] Performing encryption processing on the first output result, and passing the encrypted first output result to the trusted execution environment through the application corresponding to the target service;
[0143] In the trusted execution environment, performing decryption processing on the encrypted first output result, and inputting the decrypted first output result into the second sub-model to obtain the model prediction result corresponding to the service data.
[0144] In the embodiments of this specification, before obtaining the service data for the target service, it further includes:
[0145] Obtaining the service model for the target service;
[0146] Based on the model protection rules corresponding to the target service, splitting the service model into a first sub-model and a second sub-model, where the second sub-model includes the model parameters to be protected recorded in the model protection rules;
[0147] Setting the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0148] In the embodiments of this specification, setting the second sub-model in the trusted execution environment includes:
[0149] Converting the second sub-model into data of a preset type that can run in the trusted execution environment;
[0150] Performing encryption processing on the converted data, and setting the encrypted data in the trusted execution environment;
[0151] Performing decryption processing on the encrypted data in the trusted execution environment to obtain the converted data.
[0152] In the embodiments of this specification, the preset type includes one or more of the Graph file type and the parameter type;
[0153] When the preset type includes the parameter type, it further includes:
[0154] Generating corresponding parameter index information based on the data of the converted parameter type;
[0155] Encrypt the parameter index information and set the encrypted parameter index information in the trusted execution environment;
[0156] Decrypt the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0157] In the embodiments of this specification, it further includes:
[0158] Set the first sub-model in the general execution environment so that the first sub-model can run in the general execution environment.
[0159] In the embodiments of this specification, the first sub-model is constructed by the backbone feature network BackBone model, and the second sub-model is constructed by the feature data processing Neck model and the prediction Head model using features.
[0160] In the embodiments of this specification, the model parameters include weight Weights parameters and / or bias Bias parameters.
[0161] In addition, specifically in this embodiment, the service processing device includes a memory and one or more programs, where one or more programs are stored in the memory, and one or more programs may include one or more modules, and each module may include a series of computer-executable instructions in the service processing device, and is configured to be executed by one or more processors. The one or more programs include the following computer-executable instructions:
[0162] Obtain service data for a target service, where the target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment;
[0163] Input the service data into the first sub-model divided from the service model corresponding to the target service based on the first smart contract pre-deployed in the blockchain system to obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data;
[0164] Based on the second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, the first output result is input into the second sub-model to obtain the model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
[0165] In the embodiments of this specification, it further includes:
[0166] Based on the third smart contract pre-deployed in the blockchain system, obtain the business model for the target business;
[0167] Based on the third smart contract, obtain the model protection rules corresponding to the target business, and based on the model protection rules, divide the business model into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules;
[0168] Based on the third smart contract, set the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0169] In the embodiments of this specification, the setting the second sub-model in the trusted execution environment based on the third smart contract includes:
[0170] Based on the third smart contract, convert the second sub-model into data of a preset type that can run in the trusted execution environment;
[0171] Based on the third smart contract, perform encryption processing on the converted data and set the encrypted data in the trusted execution environment;
[0172] Based on the third smart contract, perform decryption processing on the encrypted data in the trusted execution environment to obtain the converted data.
[0173] In the embodiments of this specification, the preset type includes one or more of the Graph file type and the parameter type;
[0174] When the preset type includes the parameter type, it further includes:
[0175] Based on the fourth smart contract pre-deployed in the blockchain system, generate corresponding parameter index information through the converted data of the parameter type;
[0176] Based on the fourth smart contract, encrypt the parameter index information, and set the encrypted parameter index information in the trusted execution environment;
[0177] Based on the fourth smart contract, decrypt the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0178] The embodiments of this specification further include:
[0179] Based on the second smart contract, set the first sub-model in the general execution environment so that the first sub-model can run in the general execution environment.
[0180] The embodiments of this specification provide a service processing device. After obtaining service data for a target service, the service data is input into the first sub-model segmented from the service model corresponding to the target service to obtain a first output result corresponding to the service data. Among them, the target service corresponds to a service model for processing the service data, and the service model is segmented into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Then, the first output result is transmitted to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the service data. In this way, by setting the model architecture and model parameters that need to be protected in the secure environment constituted by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment. In this way, model extraction attacks and model reverse attacks are well prevented, the security of service processing and service models is ensured, and the core assets of enterprises or organizations are protected.
[0181] Embodiment Seven
[0182] Further, based on the above Figure 1 and Figure 4B shown method, one or more embodiments of this specification further provide a storage medium for storing computer-executable instruction information. In a specific embodiment, the storage medium can be a USB flash drive, an optical disc, a hard disk, etc. When the computer-executable instruction information stored in the storage medium is executed by a processor, the following process can be implemented:
[0183] Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment;
[0184] Input the service data into the first sub-model divided from the service model corresponding to the target service to obtain a first output result corresponding to the service data;
[0185] Transmit the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0186] In the embodiments of this specification, the step of transmitting the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain a model prediction result corresponding to the service data includes:
[0187] Perform encryption processing on the first output result, and transmit the encrypted first output result to the trusted execution environment through the application corresponding to the target service;
[0188] In the trusted execution environment, perform decryption processing on the encrypted first output result, and input the decrypted first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
[0189] In the embodiments of this specification, before obtaining the service data for the target service, it further includes:
[0190] Obtain the service model for the target service;
[0191] Based on the model protection rules corresponding to the target service, divide the service model into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules;
[0192] Set the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0193] In the embodiments of this specification, setting the second sub-model in the trusted execution environment includes:
[0194] Convert the second sub-model into data of a preset type that can run in the trusted execution environment;
[0195] Encrypt the converted data and set the encrypted data in the trusted execution environment;
[0196] Decrypt the encrypted data in the trusted execution environment to obtain the converted data.
[0197] In the embodiments of this specification, the preset type includes one or more of the graph file type and the parameter type;
[0198] The preset type includes the parameter type and further includes:
[0199] Generate corresponding parameter index information based on the data of the converted parameter type;
[0200] Encrypt the parameter index information and set the encrypted parameter index information in the trusted execution environment;
[0201] Decrypt the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0202] In the embodiments of this specification, it further includes:
[0203] Set the first sub-model in a general execution environment so that the first sub-model can run in the general execution environment.
[0204] In the embodiments of this specification, the first sub-model is constructed by a backbone feature network BackBone model, and the second sub-model is constructed by a feature data processing Neck model and a head model for making predictions using features.
[0205] In the embodiments of this specification, the model parameters include weight Weights parameters and / or bias Bias parameters.
[0206] In addition, in another specific embodiment, the storage medium can be a USB flash drive, an optical disc, a hard disk, etc. When the computer-executable instruction information stored in the storage medium is executed by a processor, the following process can be implemented:
[0207] Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment;
[0208] Based on a first smart contract pre-deployed in the blockchain system, input the service data into a first sub-model segmented from the service model corresponding to the target service, and obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data;
[0209] Based on a second smart contract pre-deployed in the blockchain system, pass the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the service data. The second smart contract is used to trigger passing the output result of the first sub-model to the trusted execution environment and trigger processing the output result of the first sub-model in the trusted execution environment.
[0210] In the embodiments of this specification, it further includes:
[0211] Based on a third smart contract pre-deployed in the blockchain system, obtain a service model for the target service;
[0212] Based on the third smart contract, obtain a model protection rule corresponding to the target service, and based on the model protection rule, divide the service model into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rule;
[0213] Based on the third smart contract, set the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
[0214] In the embodiments of this specification, the setting the second sub-model in the trusted execution environment based on the third smart contract includes:
[0215] Based on the third smart contract, convert the second sub-model into data of a preset type that can run in the trusted execution environment;
[0216] Based on the third smart contract, perform encryption processing on the converted data, and set the encrypted data in the trusted execution environment;
[0217] Based on the third smart contract, perform decryption processing on the encrypted data in the trusted execution environment to obtain the converted data.
[0218] In the embodiments of this specification, the preset type includes one or more of a Graph file type, a parameter type, etc.;
[0219] The preset type includes parameter types and also includes:
[0220] Based on a fourth smart contract pre-deployed in the blockchain system, generate corresponding parameter index information through the data of the converted parameter type;
[0221] Based on the fourth smart contract, encrypt the parameter index information and set the encrypted parameter index information in the trusted execution environment;
[0222] Based on the fourth smart contract, decrypt the encrypted parameter index information in the trusted execution environment to obtain the parameter index information.
[0223] In the embodiments of this specification, it also includes:
[0224] Based on the second smart contract, set the first sub-model in the general execution environment so that the first sub-model can run in the general execution environment.
[0225] The embodiments of this specification provide a storage medium. After obtaining the business data for the target business, input the business data into the first sub-model segmented from the business model corresponding to the target business to obtain the first output result corresponding to the business data. Among them, the target business corresponds to a business model for processing the business data, and the business model is segmented into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target business, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. Then, transmit the first output result to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, input the first output result into the second sub-model to obtain the model prediction result corresponding to the business data. In this way, by setting the model architecture and model parameters that need to be protected in the secure environment constituted by the trusted execution environment and performing subsequent data processing in this secure environment, the model structure and model parameters of the sub-model of the private part of the organization or institution can be effectively protected from being stolen by attackers, and the final output result will not be outside the trusted execution environment, thus well preventing model extraction attacks and model reverse attacks, ensuring the security of business processing and business models, and protecting the core assets of enterprises or organizations.
[0226] The above description has been made of specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the acts or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order shown or sequential order to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0227] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) or software improvements (improvements to method flows). However, with the development of technology, many method flow improvements today can be regarded as direct improvements to hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement to a method flow cannot be implemented using a hardware entity module. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logical function is determined by the user programming the device. Designers can program themselves to "integrate" a digital system onto a single PLD, without having to ask a chip manufacturer to design and fabricate a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly implemented using "logic compiler" software, which is similar to the software compilers used in program development and writing. The original code before compilation also has to be written in a specific programming language, which is called a Hardware Description Language (HDL), and there is not just one type of HDL, but many types, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones currently are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also be aware that by simply performing a little logical programming on the method flow using the above-mentioned several hardware description languages and programming it into an integrated circuit, it is easy to obtain the hardware circuit that implements the logical method flow.
[0228] The controller can be implemented in any suitable manner. For example, the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program code (such as software or firmware) executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of the controller include, but are not limited to, the following microcontrollers: ARC625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that, in addition to implementing the controller in the form of pure computer-readable program code, it is entirely possible to logically program the method steps to enable the controller to be implemented in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers, etc. to achieve the same function. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be regarded as the structures within the hardware component. Or even, the devices for implementing various functions can be regarded as either software modules for implementing the method or structures within the hardware component.
[0229] The systems, devices, modules, or units illustrated in the above embodiments can be specifically implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0230] For the convenience of description, when describing the above devices, they are described separately as various units according to their functions. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0231] Those skilled in the art should understand that the embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, one or more embodiments of this specification can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk memories, CD-ROMs, optical memories, etc.) containing computer-usable program code.
[0232] Embodiments of this specification are described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processors of general-purpose computers, special-purpose computers, embedded processors, or other programmable parallel and serial devices for fraud cases to generate a machine, such that the instructions executed by the processors of the computer or other programmable parallel and serial devices for fraud cases generate means for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.
[0233] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable parallel and serial devices for fraud cases to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.
[0234] These computer program instructions can also be loaded onto a computer or other programmable parallel and serial devices for fraud cases, such that a series of operation steps are executed on the computer or other programmable devices to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable devices provide steps for implementing the functions specified in one flow Figure 1 one flow or multiple flows and / or blocks Figure 1 or means for implementing the functions specified in one block or multiple blocks.
[0235] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.
[0236] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM), and / or non-volatile memory, such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.
[0237] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0238] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0239] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0240] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0241] Each embodiment in this specification is described in a progressive manner. For the identical or similar parts among the embodiments, they can be referred to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0242] The above is only the embodiment of this specification and is not intended to limit this specification. For those skilled in the art, various modifications and changes can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification shall be included within the scope of the claims of this specification.
Claims
1. A service processing method, applied to a service processing device, the service processing device including a trusted execution environment, the method comprising: Obtaining service data for a target service, the target service corresponding to a service model for processing the service data, the service model being divided into a first sub-model and a second sub-model, the second sub-model including model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model being set in the trusted execution environment and capable of running in the trusted execution environment, the second sub-model being a sub-model converted into a preset type of data capable of running in the trusted execution environment; the preset type includes a parameter type, and during the conversion of the second sub-model, based on the data of the converted parameter type, corresponding parameter index information is generated, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment, and the encrypted parameter index information is decrypted in the trusted execution environment to obtain the parameter index information; Inputting the service data into the first sub-model segmented from the service model corresponding to the target service to obtain a first output result corresponding to the service data; Transmitting the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
2. The method according to claim 1, wherein the transmitting the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputting the first output result into the second sub-model to obtain a model prediction result corresponding to the service data, comprises: Encrypting the first output result, and transmitting the encrypted first output result to the trusted execution environment through the application corresponding to the target service; In the trusted execution environment, decrypting the encrypted first output result, and inputting the decrypted first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
3. The method according to claim 1, before obtaining the service data for the target service, the method further comprises: Obtaining a service model for the target service; Based on the model protection rules corresponding to the target service, dividing the service model into a first sub-model and a second sub-model, the second sub-model including the model parameters to be protected recorded in the model protection rules; Setting the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
4. The method according to claim 3, wherein setting the second sub-model in the trusted execution environment comprises: Converting the second sub-model into a preset type of data capable of running in the trusted execution environment; Encrypt the converted data and set the encrypted data in the trusted execution environment; Decrypt the encrypted data in the trusted execution environment to obtain the converted data.
5. The method according to claim 4, wherein the preset type includes one or more of a Graph file type and a parameter type.
6. The method according to any one of claims 1-5, further comprising: Set the first sub-model in a general execution environment so that the first sub-model can run in the general execution environment.
7. The method according to claim 6, wherein the first sub-model is constructed by a BackBone model of a backbone feature network, and the second sub-model is constructed by a Neck model for feature data processing and a Head model for making predictions using features.
8. The method according to claim 7, wherein the model parameters include Weights parameters and / or Bias parameters.
9. A service processing method applied to a blockchain system, wherein the blockchain system includes blockchain nodes, and the blockchain nodes include trusted execution environments. The method includes: Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. The second sub-model is a sub-model that is converted into data of a preset type that can run in the trusted execution environment based on a third smart contract; the preset type includes a parameter type. During the conversion of the second sub-model, based on a fourth smart contract pre-deployed in the blockchain system, corresponding parameter index information is generated through the data of the converted parameter type, the parameter index information is encrypted based on the fourth smart contract, and the encrypted parameter index information is set in the trusted execution environment. Based on the fourth smart contract, the encrypted parameter index information is decrypted in the trusted execution environment to obtain the parameter index information; Input the service data into the first sub-model divided from the service model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system to obtain a first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the obtained service data; Based on a second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, the first output result is input into the second sub-model to obtain the model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
10. The method according to claim 9, wherein the method further comprises: Obtaining a service model for a target service based on a third smart contract pre-deployed in the blockchain system; Obtaining a model protection rule corresponding to the target service based on the third smart contract, and splitting the service model into a first sub-model and a second sub-model based on the model protection rule. The second sub-model includes the model parameters to be protected recorded in the model protection rule; Based on the third smart contract, setting the second sub-model in the trusted execution environment so that the second sub-model can run in the trusted execution environment.
11. A service processing device, the device includes a trusted execution environment, and the device includes: A data acquisition module that acquires service data for a target service. The target service corresponds to a service model for processing the service data. The service model is split into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rule corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. The second sub-model is a sub-model converted into a preset type of data that can run in the trusted execution environment; the preset type includes a parameter type. During the conversion of the second sub-model, based on the data of the converted parameter type, corresponding parameter index information is generated, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. In the trusted execution environment, the encrypted parameter index information is decrypted to obtain the parameter index information; A first result determination module that inputs the service data into the first sub-model split from the service model corresponding to the target service to obtain a first output result corresponding to the service data; A model prediction module that transmits the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the service data.
12. A service processing device, the device is a device in a blockchain system, and the device includes a trusted execution environment, and the device includes: A data acquisition module acquires business data for a target service. The target service corresponds to a business model for processing the business data. The business model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target service. The second sub-model is set in the trusted execution environment of the device and can run in the trusted execution environment. The second sub-model is a sub-model converted into a preset type of data that can run in the trusted execution environment based on a third smart contract. The preset type includes a parameter type. During the conversion of the second sub-model, based on a fourth smart contract pre-deployed in the blockchain system, corresponding parameter index information is generated through the data of the converted parameter type. Based on the fourth smart contract, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. Based on the fourth smart contract, the encrypted parameter index information is decrypted in the trusted execution environment to obtain the parameter index information. A first result determination module inputs the business data into the first sub-model segmented from the business model corresponding to the target service based on a first smart contract pre-deployed in the blockchain system to obtain a first output result corresponding to the business data. The first smart contract is used to trigger the first sub-model to process the acquired business data. A prediction result determination module, based on a second smart contract pre-deployed in the blockchain system, transmits the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, inputs the first output result into the second sub-model to obtain a model prediction result corresponding to the business data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
13. A service processing device, which is provided with a trusted execution environment and includes: A processor; And A memory arranged to store computer-executable instructions, and when the executable instructions are executed, the processor is caused to: Obtain business data for a target business, where the target business corresponds to a business model for processing the business data. The business model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target business. The second sub-model is set in the trusted execution environment and can run in the trusted execution environment. The second sub-model is a sub-model that is converted into data of a preset type that can run in the trusted execution environment. The preset type includes a parameter type. During the conversion of the second sub-model, based on the data of the converted parameter type, corresponding parameter index information is generated, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. In the trusted execution environment, the encrypted parameter index information is decrypted to obtain the parameter index information; Input the business data into the first sub-model divided from the business model corresponding to the target business to obtain a first output result corresponding to the business data; Transmit the first output result to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, input the first output result into the second sub-model to obtain a model prediction result corresponding to the business data.
14. A business processing device, which is a device in a blockchain system. The business processing device is provided with a trusted execution environment, including: A processor; And A memory arranged to store computer-executable instructions, and the executable instructions, when executed, cause the processor to: Obtain business data for a target business, where the target business corresponds to a business model for processing the business data. The business model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target business. The second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. The second sub-model is a sub-model that is converted into data of a preset type that can run in the trusted execution environment based on a third smart contract. The preset type includes a parameter type. During the conversion of the second sub-model, based on a fourth smart contract pre-deployed in the blockchain system, corresponding parameter index information is generated through the data of the converted parameter type. Based on the fourth smart contract, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. Based on the fourth smart contract, in the trusted execution environment, the encrypted parameter index information is decrypted to obtain the parameter index information; Input the service data into the first sub-model segmented from the service model corresponding to the target service based on the first smart contract pre-deployed in the blockchain system, to obtain the first output result corresponding to the service data. The first smart contract is used to trigger the first sub-model to process the acquired service data; Based on the second smart contract pre-deployed in the blockchain system, transmit the first output result to the trusted execution environment through the application corresponding to the target service. And in the trusted execution environment, input the first output result into the second sub-model to obtain the model prediction result corresponding to the service data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment, and trigger the processing of the output result of the first sub-model in the trusted execution environment.
15. A storage medium, which is used to store computer-executable instructions. When the executable instructions are executed, the following process is implemented: Obtain service data for a target service. The target service corresponds to a service model for processing the service data. The service model is segmented into a first sub-model and a second sub-model. The second sub-model includes the model parameters to be protected recorded in the model protection rules corresponding to the target service, and the second sub-model is set in the trusted execution environment and can run in the trusted execution environment. The second sub-model is a sub-model converted into a preset type of data that can run in the trusted execution environment. The preset type includes a parameter type. During the conversion of the second sub-model, based on the data of the converted parameter type, generate corresponding parameter index information, encrypt the parameter index information, and set the encrypted parameter index information in the trusted execution environment. Decrypt the encrypted parameter index information in the trusted execution environment to obtain the parameter index information; Input the service data into the first sub-model segmented from the service model corresponding to the target service, to obtain the first output result corresponding to the service data; Transmit the first output result to the trusted execution environment through the application corresponding to the target service, and in the trusted execution environment, input the first output result into the second sub-model to obtain the model prediction result corresponding to the service data.
16. A storage medium, which is used to store computer-executable instructions. When the executable instructions are executed, the following process is implemented: Obtain business data for a target business. The target business corresponds to a business model for processing the business data. The business model is divided into a first sub-model and a second sub-model. The second sub-model includes model parameters to be protected recorded in the model protection rules corresponding to the target business. The second sub-model is set in the trusted execution environment of the blockchain node and can run in the trusted execution environment. The second sub-model is a sub-model that is converted into a preset type of data that can run in the trusted execution environment based on a third smart contract. The preset type includes a parameter type. During the conversion of the second sub-model, based on a fourth smart contract pre-deployed in the blockchain system, corresponding parameter index information is generated through the data of the converted parameter type. Based on the fourth smart contract, the parameter index information is encrypted, and the encrypted parameter index information is set in the trusted execution environment. Based on the fourth smart contract, the encrypted parameter index information is decrypted in the trusted execution environment to obtain the parameter index information. Based on a first smart contract pre-deployed in the blockchain system, input the business data into the first sub-model segmented from the business model corresponding to the target business to obtain a first output result corresponding to the business data. The first smart contract is used to trigger the first sub-model to process the obtained business data. Based on a second smart contract pre-deployed in the blockchain system, the first output result is transmitted to the trusted execution environment through the application corresponding to the target business, and in the trusted execution environment, the first output result is input into the second sub-model to obtain a model prediction result corresponding to the business data. The second smart contract is used to trigger the transmission of the output result of the first sub-model to the trusted execution environment and trigger the processing of the output result of the first sub-model in the trusted execution environment.
Citation Information
Patent Citations
Division processing and prediction method and device for service prediction model
CN111045829A