Data model processing method, device, server and storage medium

By encrypting and processing the data model in a trusted execution environment and transmitting encrypted data, the problem of insufficient security in the data model transmission process is solved, and the high security transmission of the data model is achieved.

CN113836538BActive Publication Date: 2025-04-15GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110967919.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-23
Publication Date
2025-04-15
Estimated Expiration
2041-08-23

AI Technical Summary

Technical Problem

The prior art is difficult to ensure the security of the data model during the transmission of the data model and is vulnerable to tampering and attacks.

Method used

The data model is acquired in the first trusted execution environment, and the data model is encrypted based on the model encryption key to generate the first encrypted data. Then, the first encrypted data is sent to the model download terminal. Only after verification is passed in the second trusted execution environment can the model download terminal obtain the data model.

Benefits of technology

Through the combination of encryption processing and trusted execution environment, the risk of tampering of data models during transmission is reduced and the security of model acquisition is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113836538B_ABST
    Figure CN113836538B_ABST
Patent Text Reader

Abstract

The present application relates to the field of computer technology, and in particular to a data model processing method, device, server and storage medium. Among them, a data model processing method, applied to a server, includes: obtaining a data model in a first trusted execution environment; encrypting the data model based on a model encryption key to obtain first encrypted data, the model encryption key corresponds to the data model one-to-one; obtaining a model acquisition request for the data model from a model download terminal, and sending the first encrypted data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data. The present application can improve the security of model acquisition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data model processing method, device, server and storage medium. Background Art

[0002] With the development of science and technology, data model applications have emerged. For example, users can establish a connection between data models and actual application scenarios, and solve problems that arise in actual situations, so that data models can greatly improve users' lives. The development of data models usually consumes a lot of manpower, physical and financial resources, so the security of data models has gradually become a focus of users' attention. Summary of the invention

[0003] The embodiment of the present application provides a data model processing method, device, server and storage medium, which can improve the security of model acquisition. The technical solution of the embodiment of the present application is as follows:

[0004] In a first aspect, an embodiment of the present application provides a data model processing method, which is applied to a server, and the method includes:

[0005] Acquire a data model in a first trusted execution environment;

[0006] Encrypting the data model based on a model encryption key to obtain first encrypted data, wherein the model encryption key corresponds to the data model in a one-to-one manner;

[0007] The model download terminal obtains a model acquisition request for the data model and sends the first encrypted data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data.

[0008] In a second aspect, an embodiment of the present application provides a data model processing device, including:

[0009] A model acquisition unit, configured to acquire a data model in a first trusted execution environment;

[0010] A model encryption unit, configured to encrypt the data model based on a model encryption key to obtain first encrypted data, wherein the model encryption key corresponds to the data model in a one-to-one manner;

[0011] The data sending unit is used to obtain a model acquisition request from a model downloading terminal for the data model, and send the first encrypted data to the model downloading terminal, so that the model downloading terminal obtains the data model in the first encrypted data after verifying the first encrypted data.

[0012] In a third aspect, an embodiment of the present application provides a data model processing method, which is applied to a model download terminal, and the method includes:

[0013] Sending a model acquisition request to a server, wherein the model acquisition request includes a model identifier, and the model identifier is used to instruct the server to acquire first encrypted data corresponding to the model identifier, wherein the first encrypted data includes a data model corresponding to the model identifier;

[0014] Obtaining the first encrypted data sent by the server in response to the model acquisition request;

[0015] After the first encrypted data is verified in the second trusted execution environment, a data model in the first encrypted data is obtained.

[0016] In a fourth aspect, an embodiment of the present application provides a data model processing device, the device comprising:

[0017] a request sending unit, configured to send a model acquisition request to a server, wherein the model acquisition request includes a model identifier, and the model identifier is used to instruct the server to acquire first encrypted data corresponding to the model identifier, wherein the first encrypted data includes a data model corresponding to the model identifier;

[0018] a data acquisition unit, configured to acquire the first encrypted data sent by the server in response to the model acquisition request;

[0019] The data verification unit is used to obtain the data model in the first encrypted data after verifying the first encrypted data in the second trusted execution environment.

[0020] In a fifth aspect, an embodiment of the present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps of the above-mentioned first aspect.

[0021] In a sixth aspect, an embodiment of the present application provides a terminal, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps of the third aspect above.

[0022] In a seventh aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the above-mentioned method steps.

[0023] The beneficial effects brought about by the technical solutions provided by some embodiments of the present application include at least:

[0024] In one or more embodiments of the present application, by obtaining a data model in a first trusted execution environment, the data model can be encrypted based on a model encryption key to obtain first encrypted data, and a model acquisition request for the data model from a model download terminal is obtained, and the first encrypted data is sent to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data. Therefore, the server can only obtain the data model in a secure execution environment, which can reduce the probability of the data model being tampered with when the data model is obtained in an ordinary execution environment. What is sent to the model download terminal is the first encrypted data, rather than an unencrypted data model. In other words, the data model only exists in a secure execution environment, which can reduce the probability of the model being tampered with due to directly sending the data model, and can improve the security of model acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0026] Figure 1 A background schematic diagram showing a data model processing method provided by an embodiment of the present application;

[0027] Figure 2 A schematic diagram showing a scenario of a data model processing method provided by an embodiment of the present application;

[0028] Figure 3 A schematic diagram showing a flow chart of a data model processing method provided in an embodiment of the present application;

[0029] Figure 4 A schematic diagram showing a flow chart of a data model processing method provided in an embodiment of the present application;

[0030] Figure 5 A timing diagram showing a process of a server acquiring a data model provided by an embodiment of the present application is shown;

[0031] Figure 6 A system architecture diagram showing a data model processing method provided by an embodiment of the present application;

[0032] Figure 7 A flow chart showing a data model processing method provided by an embodiment of the present application;

[0033] Figure 8 A system architecture diagram showing a data model processing method provided by an embodiment of the present application;

[0034] Fig. 9 A flow chart showing a data model processing method provided by an embodiment of the present application;

[0035] Fig.10 A schematic diagram showing a flow chart of a data model processing method provided in an embodiment of the present application;

[0036] Fig.11 A schematic diagram showing a flow chart of a data model processing method provided in an embodiment of the present application;

[0037] Fig.12 A schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application is shown;

[0038] Fig.13 A schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application is shown;

[0039] Fig.14 A schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application is shown;

[0040] Fig.15 A schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application is shown;

[0041] Fig.16 A schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application is shown;

[0042] Fig.17 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;

[0043] Fig.18 It is a schematic diagram of the structure of the operating system and user space provided in the embodiment of the present application;

[0044] Fig.19 yes Fig.18 The architecture diagram of the Android operating system;

[0045] Fig. 20 yes Fig.18 Architecture diagram of the IOS operating system. DETAILED DESCRIPTION

[0046] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0047] In the description of the present application, it should be understood that the terms "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or implying relative importance. In the description of the present application, it should be noted that, unless otherwise clearly specified and limited, "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units that are not listed, or optionally also includes other steps or units inherent to these processes, methods, products or devices. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood in specific circumstances. In addition, in the description of the present application, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are an "or" relationship.

[0048] With the development of science and technology, the popularization and development of data models have greatly facilitated the lives of users. Since the development and training of data models consumes a lot of manpower, material resources and financial resources of enterprises or individuals, the security of data models has gradually become the focus of attention. Figure 1 A schematic diagram of a scenario of a data model processing method provided by an embodiment of the present application is shown. Figure 1 As shown, when the user completes the development of the data model through the model development terminal 11, the data can be encrypted and converted in the rich execution environment of the encryption server 13 through the network 12 to protect the data model. The data model encrypted by the encryption server can be sent to the model development terminal or the model download terminal 14 through the network 12. However, since the encryption process is completed in the rich execution environment, the data model is completely exposed to the rich execution environment, so it is easier for other users to tamper with the data model, which reduces the security of model acquisition.

[0049] Optional, Figure 2 A schematic diagram of a scenario of a data model processing method provided by an embodiment of the present application is shown. Figure 2As shown, when the user has completed the development of the data model through the model development terminal 11, the data model can be encrypted in the trusted execution environment of the encryption server 13 through the network 12 to obtain the encrypted data model. At this time, the encrypted data model can be loaded into the trusted execution environment of the model download terminal 14 for operation. In other words, the encrypted data model is running in the trusted execution environment of the model download terminal 14, not the unencrypted data model, and due to the resource limitations of the trusted execution environment itself, loading and running the encrypted data model alone will reduce the operating efficiency of the data model. For example, due to the low capacity of the trusted execution environment, the operating efficiency of the encrypted data model after loading and running will be limited by the capacity, which reduces the operating efficiency.

[0050] The present application is described in detail below with reference to specific embodiments.

[0051] In one embodiment, Figure 3 As shown, a data model processing method is proposed, which can be implemented by a computer program and can be run on a device with a model encryption function. The computer program can be integrated into an application or run as an independent tool application.

[0052] Specifically, the method includes:

[0053] S101, obtaining a data model in a first trusted execution environment;

[0054] According to some embodiments, a trusted execution environment (TEE) refers to an execution environment that is encrypted or isolated and therefore considered secure and trusted. Therefore, code and data in an encrypted or isolated environment are not vulnerable to attacks from outside the environment. The first executable environment refers to the hardware-level security technology provided by the server, which can provide an isolated operating space for programs and data to ensure that the execution results are reliable. Therefore, the first executable environment only refers to the secure operating environment in the server and does not specifically refer to a fixed operating environment. When the memory set by the server for the first executable environment changes, the first trusted execution environment will also change accordingly.

[0055] It is easy to understand that a data model refers to a model that can represent data features, and the data model does not specifically refer to a fixed data model. The data model can be, for example, models of different types. When the model type of the data model changes, the data model will also change accordingly.

[0056] In some embodiments, when the server executes the data model processing method, the server can obtain the data model in the first trusted execution environment.

[0057] S102, encrypting the data model based on the model encryption key to obtain first encrypted data;

[0058] According to some embodiments, a key is a parameter that is input into an algorithm for converting plaintext to ciphertext or ciphertext to plaintext. An encryption key refers to a key for converting plaintext to ciphertext. A model encryption key refers to a key for encrypting a data model. The model encryption key does not specifically refer to a fixed key, and the model encryption key corresponds to a data model one-to-one. That is, different data models correspond to different model encryption keys, and the same model encryption key corresponds to only one data model.

[0059] It is easy to understand that encrypted data refers to ciphertext after plaintext is encrypted. The first encrypted data refers to the encrypted data obtained after the server performs encryption processing on the data model. The first encrypted data does not specifically refer to a fixed data. For example, when the model type of the data model changes, the data model will also change accordingly, and the first encrypted data will also change accordingly.

[0060] In some embodiments, when the server obtains the data model in the first trusted execution environment, the server may directly encrypt the data model based on the model encryption key to obtain the first encrypted data. That is, the server uses the model encryption key to encrypt the data model to obtain the first encrypted data.

[0061] S103, obtaining a model acquisition request of the model download terminal for the data model, and sending first encrypted data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data.

[0062] According to some embodiments, the model download terminal refers to a terminal that requests a server to obtain a data model. The model download terminal includes, but is not limited to, a wearable device, a handheld device, a personal computer, a tablet computer, a vehicle-mounted device, a smart phone, a computing device, or other processing devices connected to a wireless modem. In different networks, the terminal can be called by different names, such as user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital assistant (PDA), fifth generation mobile communication technology (5G) network, fourth generation mobile communication technology (4G) network, third generation mobile communication technology (3G) network or terminal in future evolution network.

[0063] It is easy to understand that the model acquisition request refers to a request sent by the model download terminal to the server for obtaining the data model. The model acquisition request does not specifically refer to a fixed request. For example, when the model download terminal changes, the model acquisition request will also change accordingly.

[0064] In some embodiments, when the server obtains the first encrypted data, the server obtains the model acquisition request of the model download terminal for the data model, and the server can send the first encrypted data to the model download terminal. Since the first encrypted data includes the data model, and since the model download terminal obtains the first encrypted data sent by the server and verifies the first encrypted data, the model download terminal can obtain the data model in the first encrypted data.

[0065] In one or more embodiments of the present application, by obtaining a data model in a first trusted execution environment, the data model can be encrypted based on a model encryption key to obtain first encrypted data, and a model acquisition request for the data model from a model download terminal is obtained, and the first encrypted data is sent to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data. Therefore, the server can only obtain the data model in a secure execution environment, which can reduce the probability of the data model being tampered with when the data model is obtained in an ordinary execution environment. What is sent to the model download terminal is the first encrypted data, rather than an unencrypted data model. In other words, the data model only exists in a secure execution environment, which can reduce the probability of the model being tampered with due to directly sending the data model, and can improve the security of model acquisition.

[0066] See also Figure 4 , Figure 4 A flow chart of a data model processing method provided by an embodiment of the present application is shown. Figure 4 As shown, specifically:

[0067] S201, obtaining second encrypted data obtained by encrypting a data model using a second public key at a model development terminal;

[0068] According to some embodiments, the model development terminal refers to a terminal used to develop a data model, and the model development terminal does not specifically refer to a fixed terminal. The model development terminal can, for example, receive a user's development instruction for a data model and develop a data model. The data model is a model developed by the model development terminal, that is, the data model is an unencrypted model.

[0069] It is easy to understand that the second public key is a key that the server shares with the model development terminal for the data model, and the second public key does not specifically refer to a fixed public key. The server can generate a second public key for the data model and share the second public key with the model development terminal.

[0070] Optionally, the second encrypted data refers to the encrypted data obtained after the model development terminal uses the second public key to encrypt the data model. The second encrypted data does not specifically refer to a fixed data, and when the data model changes, the second encrypted data will also change accordingly. For example, when a parameter in the data model changes, the data model will also change accordingly, and the second encrypted data will also change accordingly.

[0071] In some embodiments, see Figure 5 , Figure 5 FIG. 1 shows a flow chart of a server obtaining a data model provided by an embodiment of the present application. Figure 5 As shown, when the model development terminal uses the second public key to encrypt the data model to obtain the second encrypted data, the model development terminal can send the second encrypted data to the server. When the server detects that the model development terminal sends the second encrypted data, the server can obtain the second encrypted data sent by the model development terminal, that is, the server can obtain the second encrypted data obtained by the model development terminal using the second public key to encrypt the data model.

[0072] It is easy to understand that the data model can be, for example, an artificial intelligence (AI) data model. The model development terminal can be, for example, computer A. When computer A obtains the user's development instructions for the AI ​​data model, computer A can obtain the AI ​​data model based on the development instructions. Computer A can obtain the second public key shared by server B for the data model. Computer A can use the second public key to encrypt the AI ​​data model to obtain second encrypted data. For example, computer A can use the second public key and the AI ​​data model to use a preset encryption algorithm to obtain the second encrypted data. For example, when the second encryption algorithm changes, the second encrypted data will also change accordingly. When computer A obtains the second encrypted data, computer A can send the second encrypted data to server B. Server B can obtain the second encrypted data obtained by computer A using the second public key and the AI ​​data model using a preset encryption algorithm.

[0073] S202, decrypting the second encrypted data using the second private key in the first trusted execution environment to obtain a data model in the second data ciphertext;

[0074] According to some embodiments, the second private key is a key in the server that forms a key pair with the second public key. The second public key and the second private key are generated simultaneously, wherein the second private key is a key stored only in the server, and the second public key is a key shared by the server.

[0075] It is easy to understand that Figure 5 As shown, when the server obtains the second encrypted data obtained by the model development terminal using the second public key to encrypt the data model, the server can load the second encrypted data into the first trusted execution environment. The server can decrypt the second encrypted data using the second private key in the first trusted execution environment. That is, the server can decrypt the second encrypted data using the second private key in the first trusted execution environment to obtain the data model in the second encrypted data.

[0076] Optionally, the server may be, for example, server B. When server B obtains the second encrypted data obtained by computer A using the second public key and the AI ​​data model using a preset encryption algorithm, server B may load the second encrypted data into the first trusted execution environment. Server B may decrypt the second encrypted data using the second private key in the first trusted execution environment to obtain the AI ​​data model in the second encrypted data.

[0077] According to some embodiments, the server may include, for example, a first trusted execution environment and a rich execution environment, wherein the model development terminal sends the second encrypted data to the server, and the server may directly load the second encrypted data into the first trusted execution environment or load the second encrypted data into the rich execution environment.

[0078] It is easy to understand that when the server obtains the data model, for example, the model development terminal sends the second encrypted data to the server, and the server directly loads the second encrypted data in the first trusted execution environment, the server can directly decrypt the second encrypted data through the second private key in the first trusted execution environment to obtain the data model in the second data ciphertext.

[0079] Optionally, the server obtains the data model, for example, when the model development terminal sends the second encrypted data to the server, and when the server loads the second encrypted data in the rich execution environment, the server can load the second encrypted data into the first trusted execution environment. When the server loads the second encrypted data from the rich execution environment into the first trusted execution environment, the server can decrypt the second encrypted data using the second private key in the first trusted execution environment to obtain the data model in the second data ciphertext.

[0080] S203, in the first trusted execution environment, obtaining a model encryption key corresponding to the data model based on the model parameters of the data model;

[0081] According to some embodiments, the model parameters of the data model refer to the model parameters included in the data model, and the model parameters include but are not limited to data structure parameters, data operation parameters, data constraint parameters, etc. The model data parameters do not specifically refer to a fixed parameter. For example, when a model modification instruction for a data model is obtained, the model parameters in the data model can be modified based on the model modification instruction.

[0082] It is easy to understand that the model encryption key is an encryption key generated by the server for the data model in the first trusted execution environment. The model encryption key does not specifically refer to a fixed key. For example, when the data model changes, the model parameters in the data model will also change accordingly, and the model encryption key will also change accordingly.

[0083] In some embodiments, when the server decrypts the second encrypted data using the second private key in the first trusted execution environment and obtains the data model in the second data ciphertext, the server can obtain the model encryption key corresponding to the data model based on the model parameters of the model data in the first trusted execution environment. The model encryption key and the data model are in one-to-one correspondence. For example, when the model parameters of the data model change, the model encryption key will also change accordingly.

[0084] Optionally, when server B uses the second private key to decrypt the second encrypted data in the first trusted execution environment and obtains the AI ​​data model in the second encrypted data, server B can obtain the model parameters of the AI ​​data model in the first trusted execution environment. When server B obtains the model parameters of the AI ​​data model, server B can obtain the model encryption key corresponding to the AI ​​data model.

[0085] According to some embodiments, when the server obtains the model encryption key corresponding to the data model based on the model parameters of the data model, the server may adopt a key generation algorithm and generate a first encryption key according to the model parameters of the data model. The first encryption key refers to an encryption key generated only according to the data model parameters. The first encryption key does not specifically refer to a fixed encryption key. The first encryption key corresponds to the data model one by one. The key generation algorithm includes but is not limited to the Digital Signature Algorithm (DSA), the International Data Encryption Algorithm (IDEA), the one-way hash algorithm, and the like. The one-way hash algorithm includes but is not limited to the MD5 algorithm, the Secure Hash Algorithm (SHA), the Message Authentication Code (MAC), and the like. The service acquisition can obtain the encryption tag information assigned to the data model. The encryption tag information is used to identify the first encryption key as a key for encrypting the data model. The server can generate the model encryption key corresponding to the data model based on the first encryption key and the encryption tag information.

[0086] It is easy to understand that the server can, for example, use a secure hash algorithm to generate a first encryption key based on the model parameters of the AI ​​data model. The first encryption key can be, for example, key1, which is SHA1(Model) obtained through the model parameters of the AI ​​data model. The encryption tag information assigned by the server to the AI ​​data model includes an info1 value and a salt1 value. The info1 value can be set to, for example, "Encrypt Key", and the salt1 value can be, for example, a fixed value.

[0087] S204, encrypting the data model using the model encryption key to obtain first encrypted data;

[0088] The specific process is as described above and will not be repeated here.

[0089] According to some embodiments, after obtaining the first encrypted data, the server may send the first encrypted data to a Rich Execution Environment (REE) in the server and store the first encrypted data. The Rich Execution Environment refers to a common execution environment, and the security of the Rich Execution Environment is lower than that of the Trusted Execution Environment. Therefore, the first encrypted data stored by the server in the Rich Execution Environment, that is, the encrypted data model stored by the server in the Rich Execution Environment, can improve the security of the model data storage. In addition, due to the inherent limitations of the Trusted Execution Environment, the storage space of the Trusted Execution Environment can be saved.

[0090] Optionally, when server B obtains the model parameters of the AI ​​data model, server B can obtain the model encryption key corresponding to the AI ​​data model. Server B can use the model encryption key to encrypt the AI ​​data model to obtain the first encrypted data, that is, obtain the ciphertext corresponding to the encrypted AI data model. When server B obtains the first encrypted data in the first trusted execution environment, server B can send the first encrypted data to the rich execution environment in server B and store the first encrypted data, that is, server B can store the first encrypted data in the rich execution environment in server B.

[0091] In some embodiments, when the server stores the first encrypted data, it can store the model identifier of the data model and the first encrypted data in association, so that when the server obtains the model acquisition request for the data model from the model download terminal, it can obtain the corresponding first encrypted data based on the model identifier in the model acquisition request.

[0092] S205, obtaining a model acquisition request of the model download terminal for the data model, and sending first encrypted data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data.

[0093] The specific process is as described above and will not be repeated here.

[0094] According to some embodiments, the server obtains a model acquisition request for a data model from a model download terminal, and sends first encrypted data to the model download terminal. For example, the server may determine that it has obtained a model acquisition request for a data model from a model download terminal, and the server may use a first public key to encrypt the model encryption key to obtain an encrypted model encryption key. The first public key is a key that the model download terminal shares with an authorization server for the data model. The server may send the first encrypted data and the encrypted model encryption key to the model download terminal, so that the model download terminal decrypts the first encrypted data according to the encrypted model encryption key to obtain the data model in the first encrypted data.

[0095] According to some embodiments, Figure 6 A system architecture diagram of a data model processing method provided by an embodiment of the present application is shown. Figure 6 As shown, the server may include, for example, a model server and a license server (license server). Figure 7 , Figure 7 A flow chart of a data model processing method provided by an embodiment of the present application is shown. When the server sends the first encrypted data and the encrypted model encryption key to the model download terminal, the server can control the model server to obtain the model verification key corresponding to the data model based on the model parameters of the data model in the first trusted execution environment. After the server controls the model server to obtain the model verification key, the server can control the model server to synchronize the model verification key and the model encryption key to the authorization license server.

[0096] Optionally, when server B controls the model server to use the second private key to decrypt the second encrypted data in the first trusted execution environment of the model server and obtains the AI ​​data model in the second encrypted data, server B controls the model server to obtain the model parameters of the AI ​​data model in the first trusted execution environment of the model server. When server B controls the model server to obtain the model parameters of the AI ​​data model, server B can obtain the model encryption key corresponding to the AI ​​data model and obtain the model verification key corresponding to the AI ​​data model. Server B can control the model encryption key and model verification key corresponding to the AI ​​data model of the model server to the authorization license server.

[0097] It is easy to understand that the model server refers to a server that encrypts the data model to obtain the first encrypted data. The model server can obtain the data model in the first trusted execution environment, and encrypt the data model based on the model encryption key to obtain the first encrypted data.

[0098] In some embodiments, the server determines that the model server obtains the model acquisition request for the data model from the model download terminal, and can send the first encrypted data to the model download terminal. When the model server obtains the first encrypted data, it can parse the model acquisition request to obtain the model identifier. The model identifier is used to uniquely identify the data model. The model server can obtain the first encrypted data corresponding to the data model based on the model identifier. If the first encrypted data is stored in the rich execution environment of the model server, the model server can send the first encrypted data of the rich execution environment terminal to the model download terminal. For example, the model server can send the first encrypted data corresponding to the AI ​​data model to terminal A.

[0099] It is easy to understand that when the server determines that the authorization license server obtains the model license request of the model download terminal for the data model, the server can control the authorization license server to use the second private key to sign the permission information, model verification key and model encryption key corresponding to the data model to obtain the verification information corresponding to the data model. The second private key is the key generated in the server for the data model, and the second public key and the second private key form a key pair. When the server controls the authorization license server to obtain the verification information, the server can control the authorization license server to send the verification information to the model download terminal, and the verification information is used to instruct the model download terminal to obtain the data model in the first encrypted data according to the verification information.

[0100] According to some embodiments, the execution subject of obtaining the model verification key may specifically be a model server. When the server obtains the model verification key corresponding to the data model based on the model parameters of the data model, the server may adopt a key generation algorithm and generate a second encryption key according to the data model and the key generation algorithm. The second encryption key refers to an encryption key generated only according to the data model parameters. When the first encryption key and the second encryption key are generated for the same data model and the same key generation algorithm, the first encryption key and the second encryption key may be the same. When the model parameters of the data model change, the first encryption key and the second encryption key are different. The second encryption key corresponds to the data model one by one. The second encryption key does not specifically refer to a fixed encryption key. For example, when the model parameters of the data model change or the key generation algorithm changes, the second encryption key will change accordingly. The server may obtain the verification tag information assigned to the data model, and generate the model verification key corresponding to the data model according to the second encryption key and the verification tag information. The key generation algorithm includes but is not limited to the DSA algorithm, the IDEA algorithm, the one-way hash algorithm, and the like. The one-way hash algorithm includes but is not limited to the MD5 algorithm, the SHA algorithm, the MAC algorithm, and the like. The verification tag information is used to identify the second encryption key as a key for verifying the data model.

[0101] It is easy to understand that the server can, for example, use a secure hash algorithm to generate a second encryption key based on the model parameters of the AI ​​data model. The second encryption key can be, for example, key2, which is SHA2 (Model) obtained by the model parameters of the AI ​​data model. The verification tag information assigned by the server to the AI ​​data model includes an info2 value and a salt2 value. The Info1 value can be set to "Hmac Key", for example, and the salt2 value can be a fixed value. The Salt1 value and the Salt2 value can be different values.

[0102] According to some embodiments, Figure 8 A system architecture diagram of a data model processing method provided by an embodiment of the present application is shown. Figure 8 As shown in the figure, the system architecture diagram includes only one server. Fig. 9 , Fig. 9 A flow chart of a data model processing method provided by an embodiment of the present application is shown. When the server sends the first encrypted data and the encrypted model encryption key to the model download terminal, the server can obtain permission information in the first trusted execution environment. The permission information is used to indicate whether the model download terminal has the authority to decrypt the first encrypted data. The server can package the first encrypted data, the permission information and the encrypted model encryption key to obtain the model header data. The server can use the second private key to sign the model header data to obtain the signed model header data, and the second private key is the key generated for the data model in the server. In response to the model acquisition request sent by the model download terminal, the server can send the signed model header data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data according to the signed model header data.

[0103] It is easy to understand that the permission information may include, for example, a set of authorized applications, which may include, for example, Q applications, W applications, E applications, R applications, and T applications, that is, only when the application using the AI ​​data model of the model download terminal is an authorized application, the model download terminal can decrypt the first encrypted data. For example, when the A terminal starts the W application, a model acquisition request including the P model identifier may be generated. The A terminal may send the model acquisition request to the B server. When the A terminal sends the model acquisition request, the first public key may be shared to the server at the same time. The B server may obtain the permission information and the first encrypted data corresponding to the P model identifier in the first trusted execution environment. The first encrypted data may include, for example, the p data model. The B server may use the first public key to encrypt the model encryption key to obtain the encrypted model encryption key. The B server may package the first encrypted data, the permission information, and the encrypted model encryption key to obtain the model header data. The server may use the second private key to sign the model header data to obtain the signed model header data. The B server may send the signed model header data to the A terminal. The A terminal may use the second public key to verify the signed model header data. When the A terminal verifies the signed model header data, the A terminal can parse the signed model header data to obtain the first encrypted data, permission information and the encrypted model encryption key. The A terminal can use the first private key to decrypt the encrypted model encryption key to obtain the model encryption key. The A terminal can detect whether the W application belongs to an authorized application, that is, determine whether the W application is in the permission information. When the A terminal determines that the W application belongs to an authorized application, the A terminal can use the model encryption key to decrypt the first encrypted data to obtain the AI ​​data model in the first encrypted data.

[0104] In one or more embodiments of the present application, when the server obtains the data model, it can obtain second encrypted data obtained by encrypting the data model with the second public key by the model development terminal, and can decrypt the second encrypted data with the second private key in the first trusted execution environment to obtain the data model in the second data ciphertext. Since the second private key only exists in the server and the server uses the second private key to decrypt the second encrypted data in the first trusted execution environment, the probability of the data model being tampered with is reduced, and the security of data model acquisition can be improved. Secondly, by obtaining the data model in the first trusted execution environment, the data model can be encrypted based on the model encryption key to obtain the first encrypted data, and the model download terminal's model acquisition request for the data model can be obtained, and the first encrypted data can be sent to the model download terminal, so that the model download terminal can obtain the data model in the first encrypted data after verifying the first encrypted data. Therefore, the server can only obtain the data model in a secure execution environment, which can reduce the probability of the data model being tampered with when the data model is obtained in an ordinary execution environment. What is sent to the model download terminal is the first encrypted data, not the unencrypted data model. In other words, the data model only exists in a secure execution environment, which can reduce the probability of the model being tampered with due to directly sending the data model, and can improve the security of model acquisition.

[0105] See also Fig.10 , Fig.10 A flow chart of a data model processing method provided in an embodiment of the present application is shown. Specifically:

[0106] S301, sending a model acquisition request to a server;

[0107] According to some embodiments, the execution subject in this embodiment is a model download terminal, which includes but is not limited to: wearable devices, handheld devices, personal computers, tablet computers, vehicle-mounted devices, smart phones, computing devices or other processing devices connected to wireless modems, etc. In different networks, the terminal can be called different names, such as: user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, terminal, wireless communication device, user agent or user device, cellular phone, cordless phone, personal digital processing, fifth generation mobile communication technology network, fourth generation mobile communication technology network, third generation mobile communication technology network or terminal in future evolution network, etc.

[0108] It is easy to understand that the model acquisition request includes a model identifier, and the model identifier is used to instruct the server to obtain the first encrypted data corresponding to the model identifier, and the first encrypted data includes the data model corresponding to the model identifier. The first encrypted data is generated by the server encrypting the data model in the first trusted execution environment. For example, it can be that the model development terminal receives the development instructions of the user for the data model and develops the data model. The model development terminal refers to a terminal used to develop the data model, and the model development terminal does not specifically refer to a fixed terminal. When the model development terminal uses the second public key to encrypt the data model to obtain the second encrypted data, the model development terminal can send the second encrypted data to the server. When the server detects that the model development terminal sends the second encrypted data, the server can obtain the second encrypted data sent by the model development terminal, that is, the server can obtain the second encrypted data obtained by the model development terminal using the second public key to encrypt the data model. The second public key is a key shared by the server to the model development terminal for the data model, and the second public key does not specifically refer to a fixed public key. The server can generate a second public key for the data model and share the second public key with the model development terminal.

[0109] According to some embodiments, when the server obtains the second encrypted data obtained by the model development terminal using the second public key to encrypt the data model, the server can load the second encrypted data into the first trusted execution environment. The server can decrypt the second encrypted data using the second private key in the first trusted execution environment. That is, the server can use the second private key to decrypt the second encrypted data in the first trusted execution environment to obtain the data model in the second encrypted data. The second private key is a key in the server that forms a key pair with the second public key. The second public key and the second private key are generated at the same time, wherein the second private key is a key stored only in the server, and the second public key is a key shared by the server.

[0110] It is easy to understand that when the model download terminal executes the model acquisition method, the model download terminal can send a model acquisition request to the server. The model acquisition request includes a model identifier. The model identifier is used to instruct the server to obtain the first encrypted data corresponding to the model identifier, that is, when the server receives the model acquisition request, it can obtain the model identifier in the model acquisition request and obtain the first encrypted data corresponding to the model identifier. When the server obtains the first encrypted data, it can send the first encrypted data to the model download terminal.

[0111] S302, obtaining first encrypted data sent by the server in response to the model acquisition request;

[0112] According to some embodiments, encrypted data refers to ciphertext obtained by encrypting plaintext. The first encrypted data refers to encrypted data obtained by the server after encrypting the data model. The first encrypted data does not specifically refer to a fixed data. For example, when the model type of the data model changes, the data model will also change accordingly, and the first encrypted data will also change accordingly.

[0113] It is easy to understand that after the model download terminal sends a model acquisition request to the server and determines that the server sends the first encrypted data, the model download terminal can obtain the first encrypted data sent by the server in response to the model acquisition request. The first encrypted data includes the data model requested by the model download terminal.

[0114] S303, after the first encrypted data is verified in the second trusted execution environment, a data model in the first encrypted data is obtained.

[0115] According to some embodiments, when the model download terminal obtains the first encrypted data sent by the server in response to the model acquisition request, the model download terminal can verify the first encrypted data. After the model download terminal verifies the first encrypted data in the second trusted execution environment, the model download terminal can obtain the data model in the first encrypted data.

[0116] Optionally, a trusted execution environment refers to an encrypted or isolated execution environment that is considered secure and trusted. Therefore, the code and data in the encrypted or isolated environment are not vulnerable to attacks from outside the environment. The second executable environment refers to the hardware-level security technology provided by the model download terminal, which can provide an isolated operating space for programs and data to ensure that the execution results are reliable. Therefore, the second executable environment only refers to the secure operating environment in the model download terminal, and does not specifically refer to a fixed operating environment. When the memory set by the model download terminal for the second executable environment changes, the second trusted execution environment will also change accordingly.

[0117] In one or more embodiments of the present application, by sending a model acquisition request to the server, the first encrypted data sent by the server in response to the model acquisition request can be obtained. After the first encrypted data is verified in the second trusted execution environment, the data model in the first encrypted data can be obtained. Since the first encrypted data is obtained by encrypting the data model by the server, the encrypted data model is transmitted by the server to the model download terminal, and the model download terminal obtains the data model in the second trusted execution environment, which reduces the probability of the data model being tampered with, can reduce the problem of inaccurate model acquisition caused by directly obtaining the data model in the rich execution environment, and can improve the security of data model acquisition. Secondly, the model download terminal can only obtain the data model in the first encrypted data after verification, which can reduce the risk of the data model being tampered with, reduce the probability of data model loss, and improve the security of data model acquisition.

[0118] See also Fig.11 , Fig.11 A flow chart of a data model processing method provided in an embodiment of the present application is shown. Specifically:

[0119] S401, sending a model acquisition request to a server;

[0120] The specific process is as described above and will not be repeated here.

[0121] S402, obtaining first encrypted data sent by the server in response to the model acquisition request;

[0122] The specific process is as described above and will not be repeated here.

[0123] S403, obtaining the first encrypted data and the encrypted model encryption key, and verifying the first encrypted data;

[0124] According to some embodiments, when the model download terminal obtains the first encrypted data, the terminal can determine whether the encrypted model encryption key is obtained. The encrypted model encryption key is obtained by encrypting the model encryption key by the server using the first public key, the model encryption key is used by the server to encrypt the data model into the key of the first model data using the model encryption key, and the first public key is the key shared by the model download terminal to the authorization license server for the data model.

[0125] It is easy to understand that when the model download terminal obtains the first encrypted data and the encrypted model encryption key, the model download terminal can verify the first encrypted data. The model download terminal verifies the first encrypted data including but not limited to server security verification, authority verification, data model integrity verification, encrypted data integrity verification, etc.

[0126] Optionally, when the model download terminal obtains the signed model header data, since the signed model header data is obtained by the server signing the model header data using the second private key, and the second private key is the key generated in the server for the data model, the model download terminal can use the second public key to verify the signed model header data.

[0127] In some embodiments, if the first encrypted data obtained by the model download terminal is sent by the model server, and the encrypted model encryption key is sent by the authorization license server, then the verification of the first encrypted data includes security verification, authority verification, etc. of the authorization license server.

[0128] S404, after the first encrypted data is verified, the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key;

[0129] According to some embodiments, when the model download terminal passes the verification of the first encrypted data, since the encrypted model encryption key is obtained by the server using the first public key to encrypt the model encryption key, the model download terminal can use the first private key to decrypt the encrypted model encryption key to obtain the model encryption key. The first private key is a key that only exists in the model download terminal, and the first private key is a key in the model download terminal that forms a first key pair with the first public key.

[0130] According to some embodiments, the server may include, for example, a model server and an authorization license server. After the verification of the first encrypted data is passed, when the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key, the model download terminal may, for example, determine whether the first encrypted data is sent by the model server. If the model download terminal determines that the first encrypted data is sent by the model server, a model license request is sent to the authorization license server. That is, the model download terminal generates a model license request for the data model, and the model license request may include, for example, a model identifier of the data model. When the authorization license server obtains the model license request, the authorization license server may obtain permission information corresponding to the data. The permission information may include, for example, at least one authorization license application, etc. The authorization license server may use the second private key to sign the permission information corresponding to the data model and the encrypted model encryption key to obtain verification information, and send the verification information to the model download terminal. Among them, the second private key is a key generated in the server for the data model, and the second private key is only stored in the server.

[0131] In some embodiments, the model download terminal can obtain verification information sent by the authorization license server. When the model download terminal obtains the verification information, the model download terminal can use the second public key to sign and verify the verification information. The second public key is the key that the server shares with the model download terminal for the data model, and the second private key and the second public key constitute a second key pair. After the model download terminal uses the second public key to sign and verify the verification information, the model download terminal can perform permission verification on the permission information so that the model download terminal can determine whether the model download terminal has the permission to obtain the data model. The signature verification performed by the model download terminal includes but is not limited to the verification of the server certificate, the verification of whether the server is trustworthy, the integrity of the encrypted data, etc.

[0132] Optionally, after the model download terminal passes the authority verification of the authority information, the model download terminal can decrypt the encrypted model encryption key using the first private key in the second trusted execution environment to obtain the model encryption key and the model verification key in the model encryption key. The second trusted execution environment is the secure execution environment in the model download terminal.

[0133] According to some embodiments, the number of servers is only one. After the model download terminal verifies the first encrypted data, when the first private key is used to decrypt the encrypted model encryption key to obtain the model encryption key, if the model download terminal determines that the first encrypted data is sent by the server, the model download terminal can use the second public key to perform signature verification on the signed model header data. The model download terminal performs signature verification on the signed model header data, including but not limited to verifying the security of the server, the integrity check of the model header data, etc. The second private key is the key generated in the server for the data model. The signed model header data is the data obtained by the server after packaging and signing the first encrypted data, permission information and the encrypted model encryption key. The second public key is the key shared by the server to the model download terminal for the data model, and the second private key and the second public key constitute a second key pair.

[0134] In some embodiments, after the model download terminal passes the signature on the model header data, the model download terminal performs permission verification on the permission information in the second trusted execution environment. After the model download terminal passes the permission verification on the permission information, the model download terminal can decrypt the model header data using the first private key in the second trusted execution environment to obtain the model encryption key in the model encryption key.

[0135] S405: Decrypt the first encrypted data using the model encryption key in the second trusted execution environment to obtain a data model in the first encrypted data.

[0136] According to some embodiments, when the model download terminal obtains the model encryption key, the model download terminal may use the model encryption key in the second trusted execution environment to decrypt the first encrypted data to obtain the data model in the first encrypted data.

[0137] According to some embodiments, the server includes a model server and an authorization license server. When the model download terminal obtains the model encryption key and the model verification key in the second trusted execution environment, the model download terminal uses the model encryption key to decrypt the first encrypted data to obtain the data model in the first encrypted data. For example, the model download terminal may perform an integrity check on the first encrypted data in the second trusted execution environment according to the model verification key. After the integrity check on the first encrypted data passes, the model download terminal may decrypt the first encrypted data in the second trusted execution environment using the model encryption key to obtain the data model in the first encrypted data. The model download terminal may perform an integrity check on the first encrypted data to determine whether the first encrypted data has been tampered with, thereby improving the security of the first encrypted data and further improving the accuracy of data model acquisition.

[0138] According to some embodiments, the number of servers is only one. When the model download terminal decrypts the model header data using the first private key in the second trusted execution environment to obtain the model encryption key in the model encryption key, the model download terminal can use the model encryption key in the second trusted execution environment to decrypt the first encrypted data to obtain the data model in the first encrypted data. For example, the model download terminal can use the model encryption key in the second trusted execution environment to decrypt the first encrypted data to obtain the data model in the first encrypted data.

[0139] In some embodiments, when the model download terminal obtains the data model in the first encrypted data in the second trusted execution environment, the model download terminal can run the data model. When the model download terminal runs the data model, the model download terminal can load the data model obtained in the second trusted execution environment into the rich execution environment of the model download terminal, and run the data model in the rich execution environment. Since the model download terminal obtains the data model in the first encrypted data in the second trusted execution environment, and runs the data model in the rich execution environment of the model download terminal, it can reduce the situation where the encrypted data model is directly run in the rich execution environment, resulting in low data model operation efficiency, and can also reduce the probability of the data model being tampered with, so the security of model acquisition can be improved while ensuring the data model operation efficiency.

[0140] In one or more embodiments of the present application, the model download terminal can send a model acquisition request to the server. Since the model acquisition request includes a model identifier, the time it takes for the server to acquire the first encrypted data can be reduced. The model download terminal can acquire the first encrypted data sent by the server in response to the model acquisition request, which can reduce the time it takes for the model download terminal to acquire the first encrypted data, thereby reducing the time it takes to acquire the data model. Secondly, the first encrypted data and the encrypted model encryption key are acquired, and the first encrypted data is verified. After the first encrypted data is verified, the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key. The model download terminal verifies the first encrypted data, which can improve the accuracy of acquiring the first encrypted data, thereby improving the accuracy of acquiring the data model. Secondly, the model download terminal acquires the data model in the second trusted execution environment, which reduces the probability of the data model being tampered with, reduces the problem of inaccurate model acquisition caused by directly acquiring the data model in the rich execution environment, and improves the security of data model acquisition.

[0141] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.

[0142] See also Fig.12 , which shows a schematic diagram of the structure of a data model processing device provided by an exemplary embodiment of the present application. The data model processing device can be implemented as all or part of the device through software, hardware or a combination of both. The data model processing device 1200 includes a model acquisition unit 1201, a model encryption unit 1202 and a data sending unit 1203, wherein:

[0143] A model acquisition unit 1201 is used to acquire a data model in a first trusted execution environment;

[0144] A model encryption unit 1202 is used to encrypt the data model based on the model encryption key to obtain first encrypted data, where the model encryption key corresponds to the data model one by one;

[0145] The data sending unit 1203 is used to obtain a model acquisition request for a data model from a model downloading terminal, and send the first encrypted data to the model downloading terminal, so that the model downloading terminal obtains the data model in the first encrypted data after verifying the first encrypted data.

[0146] According to some embodiments, Fig.13 FIG. 1 is a schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application. Fig.13As shown, the model encryption unit 1202 includes a key acquisition subunit 1212 and a model encryption subunit 1222. The model encryption unit 1202 is used to encrypt the data model based on the model encryption key to obtain the first encrypted data:

[0147] The key acquisition subunit 1212 is used to acquire, in the first trusted execution environment, a model encryption key corresponding to the data model based on the model parameters of the data model;

[0148] The model encryption subunit 1222 is used to encrypt the data model using the model encryption key to obtain first encrypted data.

[0149] According to some embodiments, the key acquisition subunit 1212 is used to acquire the model encryption key corresponding to the data model based on the model parameters of the data model, specifically for:

[0150] Using a key generation algorithm, and generating a first encryption key according to model parameters of the data model;

[0151] Obtaining encrypted tag information assigned to the data model;

[0152] A model encryption key corresponding to the data model is generated according to the first encryption key and the encryption tag information.

[0153] According to some embodiments, Fig.14 FIG. 1 is a schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application. Fig.14 As shown, the data model processing device 1200 also includes a data storage unit 1204, which is used to send the first encrypted data to the rich execution environment in the server after obtaining the first encrypted data, and store the first encrypted data.

[0154] According to some embodiments, the data sending unit 1203 is used to obtain a model acquisition request for a data model from a model download terminal, and when sending the first encrypted data to the model download terminal, is specifically used to:

[0155] Obtain a model acquisition request for a data model from a model download terminal, encrypt the model encryption key using a first public key, and obtain an encrypted model encryption key, where the first public key is a key shared by the model download terminal with an authorization license server for the data model;

[0156] The first encrypted data and the encrypted model encryption key are sent to the model download terminal, so that the model download terminal decrypts the first encrypted data according to the encrypted model encryption key to obtain the data model in the first encrypted data.

[0157] According to some embodiments, the server includes a model server and an authorization license server, and the data sending unit 1203 is used to send the first encrypted data and the encrypted model encryption key to the model download terminal, including:

[0158] In the first trusted execution environment, based on the model parameters of the data model, controlling the model server to obtain a model verification key corresponding to the data model;

[0159] Control the model server to synchronize the model verification key and model encryption key to the authorization license server;

[0160] Determine that the model server obtains the model acquisition request for the data model from the model download terminal, and send the first encrypted data to the model download terminal;

[0161] Determine that the authorization and licensing server obtains the model license request of the model download terminal for the data model, and control the authorization and licensing server to use the second private key to sign the permission information, model verification key and model encryption key corresponding to the data model to obtain verification information corresponding to the data model, where the second private key is a key generated in the server for the data model;

[0162] The authorization server is controlled to send verification information to the model download terminal, where the verification information is used to instruct the model download terminal to obtain the data model in the first encrypted data according to the verification information.

[0163] According to some embodiments, the key acquisition subunit 1212 is further used to acquire a model verification key corresponding to the data model based on the model parameters of the data model, and is specifically used to:

[0164] Using a key generation algorithm, and generating a second encryption key according to the data model and the key generation algorithm;

[0165] Get the verification label information assigned to the data model;

[0166] A model verification key corresponding to the data model is generated according to the second encryption key and the verification tag information.

[0167] According to some embodiments, the data sending unit 1203, when used to send the first encrypted data and the encrypted model encryption key to the model download terminal, is specifically used to:

[0168] In the first trusted execution environment, obtaining permission information;

[0169] Packing the first encrypted data, the permission information, and the encrypted model encryption key to obtain model header data;

[0170] The model header data is signed using the second private key to obtain the signed model header data, where the second private key is a key generated in the server for the data model;

[0171] The signed model header data is sent to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data according to the signed model header data.

[0172] According to some embodiments, the model acquisition unit 1201 is used to acquire a data model, including:

[0173] Obtaining second encrypted data obtained by encrypting the data model by the model development terminal using the second public key, where the second public key is a key shared by the server with the model development terminal for the data model;

[0174] The second encrypted data is decrypted in the first trusted execution environment using the second private key to obtain a data model in the second data ciphertext, where the second private key is a key in the server that forms a key pair with the second public key.

[0175] It should be noted that the data model processing device provided in the above embodiment only uses the division of the above functional modules as an example when executing the data model processing method. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the data model processing device provided in the above embodiment and the data model processing method embodiment belong to the same concept, and the implementation process thereof is detailed in the method embodiment, which will not be repeated here.

[0176] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0177] In one or more embodiments of the present application, a data model is acquired in a first trusted execution environment by a model acquisition unit, and a model encryption unit can encrypt the data model based on a model encryption key to obtain first encrypted data, and the model encryption key corresponds to the data model one by one. The data sending unit acquires a model acquisition request for the data model from a model download terminal, and sends the first encrypted data to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data after verifying the first encrypted data. Therefore, the data model processing device can only acquire the data model in a secure execution environment, which can reduce the probability of the data model being tampered with when the data model is acquired in a normal execution environment. What is sent to the model download terminal is the first encrypted data, not the unencrypted data model. In other words, the data model only exists in a secure execution environment, which can reduce the probability of the model being tampered with due to the direct sending of the data model, and can improve the security of model acquisition.

[0178] See also Fig.15 , which shows a schematic diagram of the structure of a data model processing device provided by an exemplary embodiment of the present application. The data model processing device can be implemented as all or part of the device through software, hardware or a combination of both. The data model processing device 1500 includes a request sending unit 1501, a data acquisition unit 1502 and a data verification unit 1503, wherein:

[0179] The request sending unit 1501 is used to send a model acquisition request to the server, where the model acquisition request includes a model identifier, and the model identifier is used to instruct the server to obtain first encrypted data corresponding to the model identifier, where the first encrypted data includes a data model corresponding to the model identifier;

[0180] A data acquisition unit 1502 is used to acquire first encrypted data sent by the server in response to the model acquisition request;

[0181] The data verification unit 1503 is used to obtain the data model in the first encrypted data after verifying the first encrypted data in the second trusted execution environment.

[0182] According to some embodiments, Fig.16 FIG. 1 is a schematic diagram showing the structure of a data model processing device provided in an embodiment of the present application. Fig.16 As shown, the data verification unit 1503 includes a data verification subunit 1513, an encryption key acquisition subunit 1523 and a data decryption subunit 1533. The data verification unit 1503 is used to obtain the data model in the first encrypted data after the first encrypted data is verified in the second trusted execution environment:

[0183] The data verification subunit 1513 is used to obtain the first encrypted data and the encrypted model encryption key, and verify the first encrypted data. The encrypted model encryption key is obtained by encrypting the model encryption key by the server using the first public key. The model encryption key is used by the server to encrypt the data model into the key of the first model data using the model encryption key. The first public key is the key shared by the model download terminal to the authorization license server for the data model.

[0184] The encryption key acquisition subunit 1523 is used to, after the verification of the first encrypted data is passed, use the first private key to decrypt the encrypted model encryption key to obtain the model encryption key, where the first private key is a key in the model download terminal that forms a first key pair with the first public key;

[0185] The data decryption subunit 1533 is used to decrypt the first encrypted data using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data.

[0186] According to some embodiments, the encryption key acquisition subunit 1523 is used to, after the first encrypted data is verified, use the first private key to decrypt the encrypted model encryption key to obtain the model encryption key, specifically to:

[0187] Determining that the first encrypted data is sent by the model server, sending a model license request to the authorization license server;

[0188] Obtain verification information sent by the authorization license server, where the verification information is obtained by the authorization license server signing the permission information corresponding to the data model and the encrypted model encryption key using the second private key, where the second private key is a key generated in the server for the data model;

[0189] After the verification information is signed and verified with the second public key, the permission information is verified. The second public key is the key that the server shares with the model download terminal for the data model. The second private key and the second public key form a second key pair.

[0190] After the permission verification of the permission information is passed, the encrypted model encryption key is decrypted by using the first private key in the second trusted execution environment to obtain a model encryption key and a model verification key in the model encryption key;

[0191] The data decryption subunit 1533 is used to decrypt the first encrypted data using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data, specifically to:

[0192] Performing integrity verification on the first encrypted data according to the model verification key in the second trusted execution environment;

[0193] After the integrity check of the first encrypted data is passed, the first encrypted data is decrypted using the model encryption key to obtain the data model in the first encrypted data.

[0194] According to some embodiments, the encryption key acquisition subunit 1523 is used to determine that after the verification of the first encrypted data is passed, when the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key, specifically for:

[0195] Determine that the first encrypted data is sent by the server, use the second public key to perform signature verification on the signed model header data, the second private key is the key generated in the server for the data model, the signed model header data is the data obtained by the server after packaging and signing the first encrypted data, the permission information and the encrypted model encryption key, the second public key is the key shared by the server to the model download terminal for the data model, and the second private key and the second public key constitute a second key pair;

[0196] After the signature of the model header data is passed, the permission information is verified in the second trusted execution environment;

[0197] After the permission verification of the permission information is passed, the model header data is decrypted by using the first private key to obtain the model encryption key in the model encryption key;

[0198] The data decryption subunit 1533 is used to decrypt the first encrypted data using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data, specifically to:

[0199] The first encrypted data is decrypted using the model encryption key in the second trusted execution environment to obtain a data model in the first encrypted data.

[0200] In one or more embodiments of the present application, a model acquisition request is sent to a server through a request sending unit, and the model acquisition request includes a model identifier. The data acquisition unit can obtain the first encrypted data sent by the server in response to the model acquisition request, and the data verification unit can obtain the data model in the first encrypted data after verifying the first encrypted data in the second trusted execution environment. Since the first encrypted data is obtained by encrypting the data model by the server, the encrypted data model is transmitted to the data model processing device by the server, and the data model processing device obtains the data model in the second trusted execution environment, which reduces the probability of the data model being tampered with, can reduce the problem of inaccurate model acquisition caused by directly obtaining the data model in the rich execution environment, and can improve the security of data model acquisition.

[0201] The present application also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 3-Figure 9 or Figure 10-11 The data model processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 3-Figure 9 or Figure 10-11 The specific description of the illustrated embodiment will not be repeated here.

[0202] The present application also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 3-Figure 9 or Figure 10-11 The data model processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 3-Figure 9 or Figure 10-11 The specific description of the illustrated embodiment will not be repeated here.

[0203] The present application provides a server, which may include: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the above Figure 3-Figure 9 The data model processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 3-Figure 9 or Figure 10-11 The specific description of the illustrated embodiment will not be repeated here.

[0204] Please refer to Fig.17 , which shows a block diagram of the structure of a terminal provided by an exemplary embodiment of the present application. The terminal in the present application may include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 may be connected via the bus 150. The processor loads and executes the above Figure 3-Figure 10 The data model processing method of the embodiment shown in the figure can be found in the specific execution process. Figure 3-Figure 10 The specific description of the illustrated embodiment will not be repeated here.

[0205] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire terminal, and executes various functions and processes data of the terminal 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0206] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a storage program area and a storage data area, wherein the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The operating system may be an Android system, including a system deeply developed based on the Android system, an IOS system developed by Apple, including a system deeply developed based on the IOS system or other systems. The storage data area may also store data created by the terminal during use, such as a phone book, audio and video data, chat record data, etc.

[0207] See also Fig.18 As shown, the memory 120 can be divided into an operating system space and a user space. The operating system runs in the operating system space, and native and third-party applications run in the user space. In order to ensure that different third-party applications can achieve good operating results, the operating system allocates corresponding system resources to different third-party applications. However, different application scenarios in the same third-party application also have different requirements for system resources. For example, in the local resource loading scenario, the third-party application has higher requirements for disk reading speed; in the animation rendering scenario, the third-party application has higher requirements for GPU performance. The operating system and third-party applications are independent of each other, and the operating system often cannot perceive the current application scenario of the third-party application in a timely manner, resulting in the operating system being unable to perform targeted system resource adaptation according to the specific application scenario of the third-party application.

[0208] In order for the operating system to distinguish the specific application scenarios of third-party applications, it is necessary to open up data communication between third-party applications and the operating system so that the operating system can obtain the current scenario information of third-party applications at any time, and then perform targeted system resource adaptation based on the current scenario.

[0209] Taking the Android operating system as an example, the programs and data stored in the memory 120 are as follows: Fig.19As shown, the memory 120 may store a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360 and an application layer 380, wherein the Linux kernel layer 320, the system runtime library layer 340 and the application framework layer 360 belong to the operating system space, and the application layer 380 belongs to the user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the terminal, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, etc. The system runtime library layer 340 provides the main feature support for the Android system through some C / C++ libraries. For example, the SQLite library provides database support, the OpenGL / ES library provides 3D drawing support, and the Webkit library provides browser kernel support, etc. The system runtime library layer 340 also provides an Android runtime library (Android runtime), which mainly provides some core libraries that allow developers to use Java language to write Android applications. The application framework layer 360 provides various APIs that may be used when building applications. Developers can also use these APIs to build their own applications, such as activity management, window management, view management, notification management, content provider, package management, call management, resource management, and location management. At least one application runs in the application layer 380. These applications can be native applications that come with the operating system, such as contact applications, text messaging applications, clock applications, camera applications, etc.; they can also be third-party applications developed by third-party developers, such as game applications, instant messaging applications, photo beautification applications, data model processing applications, etc.

[0210] Taking the operating system as an IOS system as an example, the programs and data stored in the memory 120 are as follows: Fig. 20As shown, the IOS system includes: a core operating system layer 420 (Core OS layer), a core service layer 440 (Core Services layer), a media layer 460 (Media layer), and a touchable layer 480 (Cocoa Touch Layer). The core operating system layer 420 includes the operating system kernel, drivers, and underlying program frameworks, which provide functions closer to the hardware for use by the program framework located in the core service layer 440. The core service layer 440 provides system services and / or program frameworks required by the application, such as the foundation framework, account framework, advertising framework, data storage framework, network connection framework, geographic location framework, motion framework, etc. The media layer 460 provides audio-visual interfaces for the application, such as graphics and image related interfaces, audio technology related interfaces, video technology related interfaces, and wireless playback (AirPlay) interfaces for audio and video transmission technologies. The touchable layer 480 provides various commonly used interface-related frameworks for application development, and the touchable layer 480 is responsible for the user's touch interaction operations on the terminal. For example, local notification service, remote push service, advertising framework, game tool framework, message user interface (UI) framework, user interface UIKit framework, map framework, etc.

[0211] exist Fig.17 Among the frameworks shown, the frameworks related to most applications include but are not limited to: the basic framework in the core service layer 440 and the UIKit framework in the touchable layer 480. The basic framework provides many basic object classes and data types, provides the most basic system services for all applications, and has nothing to do with UI. The classes provided by the UIKit framework are basic UI class libraries for creating touch-based user interfaces. iOS applications can provide UIs based on the UIKit framework, so it provides the basic architecture of applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, etc.

[0212] Among them, the method and principle of implementing data communication between third-party applications and the operating system in the IOS system can be referred to the Android system, and this application will not go into details here.

[0213] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In one example, the input device 130 and the output device 140 can be combined, and the input device 130 and the output device 140 are a touch display screen, which is used to receive touch operations on or near it by a user using any suitable object such as a finger or a touch pen, and to display the user interface of each application. The touch display screen is usually set on the front panel of the terminal. The touch display screen can be designed as a full screen, a curved screen or a special-shaped screen. The touch display screen can also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.

[0214] In addition, those skilled in the art will appreciate that the structure of the terminal shown in the above drawings does not constitute a limitation on the terminal, and the terminal may include more or fewer components than shown, or combine certain components, or arrange the components differently. For example, the terminal also includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a Bluetooth module, and other components, which will not be described in detail here.

[0215] In the embodiment of the present application, the execution subject of each step may be the terminal described above. Optionally, the execution subject of each step is the operating system of the terminal. The operating system may be an Android system, an IOS system, or other operating systems, which is not limited in the embodiment of the present application.

[0216] The terminal of the embodiment of the present application may also be equipped with a display device, which may be any device capable of realizing a display function, such as a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink screen, a liquid crystal display (LCD), a plasma display panel (PDP), etc. The user may use the display device on the terminal 100 to view displayed text, images, videos and other information. The terminal may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing and other devices.

[0217] Those skilled in the art can clearly understand that the technical solution of the present application can be implemented with the help of software and / or hardware. The "unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array (FPGA), an integrated circuit (IC), etc.

[0218] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0219] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0220] In the several embodiments provided in the present application, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of the units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.

[0221] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0222] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0223] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a memory, including a number of instructions to enable a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned memory includes: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, disk or optical disk and other media that can store program code.

[0224] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by entering a program to instruct the relevant hardware. The program may be stored in a computer-readable memory, and the memory may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0225] The above is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure cannot be limited thereto. That is, any equivalent changes and modifications made according to the teachings of the present disclosure are still within the scope of the present disclosure. After considering the specification and practicing the disclosure here, those skilled in the art will easily think of other embodiments of the present disclosure. This application is intended to cover any variation, use or matching change of the present disclosure, which follows the general principles of the present disclosure and includes common knowledge or customary technical means in the art that are not recorded in the present disclosure. The description and examples are only regarded as exemplary, and the scope and spirit of the present disclosure are defined by the claims.

Claims

1. A data model processing method, characterized in that: Applied to a server, the method comprises: Acquire a data model in a first trusted execution environment; In the first trusted execution environment, based on the model parameters of the data model, obtaining a model encryption key corresponding to the data model; The data model is encrypted using the model encryption key to obtain first encrypted data, wherein the model encryption key corresponds to the data model in a one-to-one manner; Obtain a model acquisition request for the data model from the model download terminal, encrypt the model encryption key with a first public key, and obtain an encrypted model encryption key, where the first public key is a key shared by the model download terminal with the authorization server for the data model; The first encrypted data and the encrypted model encryption key are sent to the model download terminal, so that the model download terminal decrypts the first encrypted data according to the encrypted model encryption key to obtain the data model in the first encrypted data.

2. The method according to claim 1, characterized in that The acquiring, based on the model parameters of the data model, a model encryption key corresponding to the data model, comprises: Using a key generation algorithm, and generating a first encryption key according to model parameters of the data model; Obtaining encrypted tag information assigned to the data model; A model encryption key corresponding to the data model is generated according to the first encryption key and the encryption tag information.

3. The method according to claim 1, characterized in that After obtaining the first encrypted data, the method further includes: The first encrypted data is sent to a rich execution environment in the server, and the first encrypted data is stored.

4. The method according to claim 1, characterized in that: The server includes a model server and an authorization license server, and the sending of the first encrypted data and the encrypted model encryption key to the model download terminal includes: In the first trusted execution environment, based on the model parameters of the data model, controlling the model server to obtain a model verification key corresponding to the data model; Control the model server to synchronize the model verification key and the model encryption key to the authorization server; Determine that the model server obtains the model acquisition request of the model download terminal for the data model, and send the first encrypted data to the model download terminal; Determine that the authorization and licensing server obtains the model license request of the model download terminal for the data model, control the authorization and licensing server to use a second private key to sign the permission information corresponding to the data model, the model verification key and the model encryption key, and obtain verification information corresponding to the data model, where the second private key is a key generated in the authorization and licensing server for the data model; The authorization license server is controlled to send the verification information to the model downloading terminal, where the verification information is used to instruct the model downloading terminal to obtain the data model in the first encrypted data according to the verification information.

5. The method according to claim 4, characterized in that The controlling the model server to obtain a model verification key corresponding to the data model based on the model parameters of the data model includes: Using a key generation algorithm, and generating a second encryption key according to the data model and the key generation algorithm; Obtaining verification tag information assigned to the data model; A model verification key corresponding to the data model is generated according to the second encryption key and the verification tag information.

6. The method according to claim 1, characterized in that The sending the first encrypted data and the encrypted model encryption key to the model download terminal includes: In the first trusted execution environment, obtaining permission information; Packing the first encrypted data, the permission information and the encrypted model encryption key to obtain model header data; The model header data is signed using a second private key to obtain the signed model header data, where the second private key is a key generated in the server for the data model; The signed model header data is sent to the model download terminal, so that the model download terminal obtains the data model in the first encrypted data according to the signed model header data.

7. The method according to claim 1, characterized in that The obtaining of the data model comprises: Acquire second encrypted data obtained by encrypting the data model by the model development terminal using a second public key, where the second public key is a key shared by the server with the model development terminal for the data model; The second encrypted data is decrypted in the first trusted execution environment using a second private key to obtain the data model in the second data ciphertext, where the second private key is a key in the server that forms a key pair with the second public key.

8. A data model processing device, characterized in that: The device comprises: A model acquisition unit, configured to acquire a data model in a first trusted execution environment; A key acquisition subunit, configured to acquire, in the first trusted execution environment, a model encryption key corresponding to the data model based on a model parameter of the data model; A model encryption subunit, used to encrypt the data model using the model encryption key to obtain first encrypted data; A data sending unit is used to obtain a model acquisition request from a model download terminal for the data model, encrypt the model encryption key with a first public key to obtain an encrypted model encryption key, wherein the first public key is a key shared by the model download terminal with an authorization server for the data model; and send the first encrypted data and the encrypted model encryption key to the model download terminal, so that the model download terminal decrypts the first encrypted data according to the encrypted model encryption key to obtain the data model in the first encrypted data.

9. A data model processing method, characterized in that: Applied to a model downloading terminal, the method comprises: Sending a model acquisition request to a server, wherein the model acquisition request includes a model identifier, and the model identifier is used to instruct the server to acquire first encrypted data corresponding to the model identifier, wherein the first encrypted data includes a data model corresponding to the model identifier; Obtaining the first encrypted data sent by the server in response to the model acquisition request; Obtaining the first encrypted data and the encrypted model encryption key, and verifying the first encrypted data, wherein the encrypted model encryption key is obtained by the server encrypting the model encryption key with the first public key, and the model encryption key is used by the server to encrypt the data model into the key of the first model data with the model encryption key, and the first public key is the key shared by the model download terminal with the authorization license server for the data model; After the verification of the first encrypted data is passed, the encrypted model encryption key is decrypted using a first private key to obtain the model encryption key, where the first private key is a key in the model download terminal that forms a first key pair with the first public key; The first encrypted data is decrypted using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data.

10. The method according to claim 9, characterized in that After the verification of the first encrypted data is passed, the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key, including: Determining that the first encrypted data is sent by the model server, and sending a model license request to the authorization license server; Obtain verification information sent by the authorization and licensing server, where the verification information is obtained by the authorization and licensing server signing the permission information corresponding to the data model and the encrypted model encryption key using a second private key, where the second private key is a key generated in the server for the data model; After the verification information is signed and verified by the second public key, the permission information is verified, where the second public key is a key shared by the authorization server to the model download terminal for the data model, and the second private key and the second public key form a second key pair; After the permission verification of the permission information is passed, the encrypted model encryption key is decrypted by using the first private key in the second trusted execution environment to obtain a model encryption key and a model verification key in the model encryption key; The decrypting the first encrypted data using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data includes: Performing integrity verification on the first encrypted data according to the model verification key in the second trusted execution environment; After the integrity check of the first encrypted data is passed, the first encrypted data is decrypted using the model encryption key to obtain the data model in the first encrypted data.

11. The method according to claim 9, characterized in that After the verification of the first encrypted data is passed, the encrypted model encryption key is decrypted using the first private key to obtain the model encryption key, including: Determine that the first encrypted data is sent by the server, use the second public key to perform signature verification on the signed model header data, the second private key is the key generated in the server for the data model, the signed model header data is data obtained by the server after packaging and signing the first encrypted data, permission information and the encrypted model encryption key, the second public key is the key shared by the server to the model download terminal for the data model, and the second private key and the second public key constitute a second key pair; After the signature of the model header data is passed, performing permission verification on the permission information in the second trusted execution environment; After the permission verification of the permission information is passed, the model header data is decrypted by using the first private key to obtain the model encryption key in the model encryption key; The decrypting the first encrypted data using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data includes: The first encrypted data is decrypted using the model encryption key in the second trusted execution environment to obtain the data model in the first encrypted data.

12. A server, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 1 to 7.

13. A terminal device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the method steps as claimed in any one of claims 9 to 11.

14. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, which are suitable for being loaded by a processor and executing the method steps as claimed in any one of claims 1-7 or 9-11.

Citation Information

Patent Citations

  • Data processing method and device

    CN110034924A

  • Training model protection method, device and system, equipment and computer storage medium

    CN111241559A