Risk detection methods and related equipment in data processing
By deploying risk detection services in a trusted execution environment and using models to detect risks in data-related task requests, the problem of insecure data behavior during data mining is solved, and the security of data sources and data users is ensured.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING VOLCANO ENGINE TECH CO LTD
- Filing Date
- 2024-06-12
- Publication Date
- 2026-05-26
AI Technical Summary
In existing technologies, data mining processes cannot efficiently detect and alert on data security behaviors that may result from data-related tasks, such as detailed queries and differential attacks, leading to a waste of data resources.
Deploy risk detection services in a trusted execution environment, use models to detect risks in data task requests, use a first model to determine whether there are risky behaviors in the data processing logic, and perform data processing when the detection results meet preset conditions.
Effectively detect and prevent insecure data behavior, ensure the security of data sources and users, and improve the security and efficiency of the data mining process.
Smart Images

Figure CN118627117B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a risk detection method and related equipment in a data processing process. Background Technology
[0002] With the development of data mining technology, data security is receiving increasing attention from users. Currently, it is possible to protect the security of data during the computation and storage processes in the data mining process.
[0003] However, there are still possibilities that could lead to data insecurity during the data mining process. Summary of the Invention
[0004] In view of this, the purpose of this disclosure is to propose a risk detection method and related equipment in the data processing process, which at least to some extent solves one of the technical problems in the related technology.
[0005] To achieve the above objectives, the first aspect of this disclosure provides a risk detection method in a data processing process, the method comprising the following steps performed by a risk detection service deployed in a first trusted execution environment:
[0006] Obtain the data usage task request sent by the data user to the task processing module, wherein the data usage task request indicates the processing of data from the data source.
[0007] Based on the first model deployed in the first trusted execution environment, risk detection is performed on the data processing logic in the data task request to obtain the risk detection result.
[0008] The risk detection result is sent to the task processing module; wherein, in response to the risk detection result meeting the preset conditions, the task processing module obtains data from the data source based on the data usage task request, processes the data, and outputs the task processing result to the data user.
[0009] In some embodiments, the risk detection of the data processing logic in the data task request based on a first model deployed in the first trusted execution environment includes:
[0010] Obtain the task type corresponding to the data task request;
[0011] Based on the task type, the data usage task request is sent to a first model that matches the task type, and the data processing logic in the data usage task request is subjected to risk detection by the first model.
[0012] In the first trusted execution environment, at least two first models corresponding to different task types are deployed.
[0013] In some embodiments, the process of obtaining the first model includes:
[0014] Obtain test data;
[0015] The pre-acquired second model is deployed in the first trusted execution environment, and the second model is fine-tuned based on the test data to obtain the third model;
[0016] The input and output of the third model are adjusted based on preset prompts to obtain the first model.
[0017] In some embodiments, the test data includes input information and output information:
[0018] The input information includes data processing task information with various data processing behaviors;
[0019] The output information includes at least one of the risk type, risk level, and risk location information corresponding to the tagged data processing behavior.
[0020] In some embodiments, before sending the data task request to a first model matching the task type, the method further includes:
[0021] Remotely verify the first trusted execution environment; and,
[0022] After the remote verification is successful, the data task request is sent to the first model.
[0023] In some embodiments, the remote authentication of the first trusted execution environment further includes:
[0024] The first trusted execution environment discloses a first metric to the data source and the data user.
[0025] The first trusted execution environment receives remote proof requests sent by the data source party and the data user party, and returns a remote proof report to the data source party and the data user party based on the remote proof requests. The remote proof report includes a second metric.
[0026] The data source and the data user obtain remote proof results for the first trusted execution environment based on the first metric and the second metric.
[0027] In some embodiments, the task processing module is deployed in a second trusted execution environment.
[0028] In some embodiments, the risk detection result includes at least one of risk type, risk level, and risk location information; the risk detection result meets preset conditions, including at least one of the following:
[0029] The risk detection result does not conform to the preset risk type;
[0030] The risk detection results do not meet the preset risk level.
[0031] In some embodiments, the method further includes:
[0032] Generate detection logs and encrypt them before storing them in a database or blockchain.
[0033] A second aspect of this disclosure provides a risk detection device for data processing, comprising:
[0034] The acquisition module is configured to: acquire data usage task requests sent by the data user to the task processing module, wherein the data usage task requests indicate processing of data from the data source.
[0035] The detection module is configured to: perform risk detection on the data processing logic in the data task request based on the first model deployed in the first trusted execution environment, and obtain the risk detection result;
[0036] The sending module is configured to send the risk detection result to the task processing module; wherein, in response to the risk detection result meeting preset conditions, the task processing module obtains data from the data source based on the data usage task request, processes the data, and outputs the task processing result to the data user.
[0037] A third aspect of this disclosure provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements a risk detection method in a data processing process as described in the first aspect.
[0038] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the risk detection method in the data processing process described in the first aspect.
[0039] The fifth aspect of this disclosure provides a computer program product including computer program instructions that, when executed on a computer, cause the computer to perform the risk detection method in the data processing process described in the first aspect.
[0040] As can be seen from the above, the risk detection method and related equipment provided in this disclosure, when receiving a data task request sent by the data user to the task processing module, performs risk detection on the data processing logic in the data task request through a first model deployed in a trusted execution environment. This allows the determination of whether there are any risky behaviors in the data task request that could lead to data insecurity on the data source side. If no risky behaviors meet the conditions, data is obtained from the data source side based on the data task request for processing, thereby obtaining a data processing result that satisfies the data task request and sending it to the data user, thus ensuring the security of the data source side's data. At the same time, since the risk detection service is deployed in the first trusted execution environment, the risk detection process for the data task request is executed in the trusted execution environment, which also ensures the data security of the data user side. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 An exemplary process diagram provided by an embodiment of this disclosure is shown.
[0043] Figure 2 A flowchart illustrating an exemplary method provided by an embodiment of this disclosure is shown.
[0044] Figure 3 An exemplary process diagram provided by an embodiment of this disclosure is shown.
[0045] Figure 4 A schematic diagram of an exemplary apparatus provided by an embodiment of the present disclosure is shown.
[0046] Figure 5 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0048] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0049] With the development of information technology, in some scenarios that support data mining, the data user and the data source are usually independent. Data mining needs to be completed by the data user carrying the user solution and the data source carrying the data resources in order to obtain valuable data.
[0050] To ensure security during the aforementioned data mining process, a data security sandbox solution based on a Trusted Execution Environment (TEE) can be provided. The data sandbox offers a secure isolation environment based on hardware security mechanisms, protecting data security during computation and storage, and supporting data users in generating data value under secure and compliant conditions.
[0051] Figure 1 This paper presents a data security sandbox scheme based on a TEE (Task Environment), in which the task processing module is deployed within the TEE environment. The data mining process includes: 1. The data user sends a data task to the task processing module deployed in the TEE environment, where the data task may include SQL or code scripts; 2. The task processing module sends a request to the data source based on the data task, requests data authorization, and loads the data upon successful authorization; 3. The task processing module executes the data task in the TEE environment and returns the results to the data user.
[0052] In the above process, since the execution of data tasks (i.e., data calculation, processing, etc.) is carried out in the TEE environment, data security can be guaranteed.
[0053] However, the applicant of this disclosure discovered that in the aforementioned scenarios, the SQL or code scripts used for data processing may exhibit behaviors that could lead to data insecurity. For example, querying detailed data from a data source could expose specific data information from the data source, and differential attacks or injection attacks could corrupt the data in the data source. Related technologies are unable to efficiently detect and alert on these behaviors, resulting in a significant waste of resources.
[0054] In view of this, this disclosure provides a risk detection method in the data processing process to solve the above problems.
[0055] like Figure 2 As shown, the risk detection method in the data processing process includes the following steps performed by a risk detection service deployed in the first trusted execution environment:
[0056] Step S101: Obtain the data usage task request sent by the data user to the task processing module. The data usage task request indicates that the data from the data source should be processed.
[0057] The data source provider offers data resources. When the data user needs to perform data processing such as data mining on the data resources provided by the data source provider, the data user can generate a data processing task request. This data processing task request can utilize technologies such as artificial intelligence, machine learning, pattern recognition, statistics, databases, and visualization to perform data processing such as retrieval, filtering, statistics, and analysis on the data resources provided by the data source provider, in order to obtain data processing results that meet the requirements of the data processing task.
[0058] After generating a data usage task request, the data user sends the data usage task request to the task processing module. Then, the task processing module sends the data usage task request to the risk detection service deployed in the first trusted execution environment, and performs risk detection on the data usage task request through the risk detection service.
[0059] Step S103: Based on the first model deployed in the first trusted execution environment, perform risk detection on the data processing logic in the data task request to obtain the risk detection result.
[0060] In this embodiment, risk detection is performed on the data processing logic in the data task request based on the first model deployed in the first trusted execution environment, which can determine whether there are risky behaviors in the data processing logic of the data task request that could lead to data insecurity.
[0061] Alternatively, the risk detection service deployed in the first trusted execution environment can be used to call the first model deployed in the first trusted execution environment to perform risk detection on the data processing logic in the data task request, which can determine whether there are risky behaviors in the data processing logic in the data task request that could lead to data insecurity.
[0062] For example, when data usage task requests are SQL code, detailed query behavior may expose important data from the data source to the data user, or differential attacks or injection attacks may damage the corresponding data from the data source. When data usage task requests are script code, returning detailed information or log information may expose important data from the data source to the data user, or hard-coding detailed information may corrupt the corresponding data from the data source. By deploying a first model in the first trusted execution environment to perform risk detection on the data processing logic in data usage task requests, corresponding risky behaviors can be detected.
[0063] Simultaneously, the first model is deployed in a first Trusted Execution Environment (TEE). The TEE, based on hardware security mechanisms, loads the code and data involved in computation into a CPU-protected trusted environment, providing protection in terms of confidentiality and integrity. TEE offers a higher level of security compared to the operating system. Current TEE technologies include Intel SGX / TDX and AMD SEV based on the x86 instruction set architecture, and TrustZone / Realm based on the ARM instruction set architecture.
[0064] In this embodiment, because the TEE environment provides a more secure operating environment, deploying the first model in the TEE environment and using this first model to detect the data processing logic in the data task request ensures the security of the detection process. That is, the data processing logic in the data task request also contains content that the data user needs to protect, such as the user's self-developed code. By executing this detection process in the TEE environment, the data security of the data user can be protected.
[0065] Step S105: The risk detection result is sent to the task processing module; the task processing module responds to the risk detection result meeting the preset conditions by obtaining data from the data source based on the data usage task request, processing the data, and outputting the task processing result to the data user.
[0066] In this embodiment, after the risk detection service outputs the risk detection result, it sends the risk detection result to the task processing module.
[0067] When the risk detection result output by the risk detection service meets the preset conditions, it means that there are no risky behaviors in the data usage task request that would lead to data insecurity. In this case, the task processing module can send the data usage task request to the data source. After obtaining the data authorization from the data source, the corresponding data is loaded into the task processing module. The task processing module then performs statistical analysis and other processing on the data based on the data processing logic of the data usage task request, and returns the data processing result to the data user to complete the data mining process.
[0068] In this embodiment, when a data task request sent by the data user to the task processing module is obtained, the data processing logic in the data task request is subjected to risk detection by a first model deployed in a trusted execution environment. This allows the system to determine whether there are any risky behaviors in the data task request that could compromise the data security of the data source. If no risky behaviors meet the criteria, data is obtained from the data source based on the data task request and processed to obtain a data processing result that satisfies the data task request. This result is then sent to the data user, thus ensuring the security of the data source. Furthermore, since the risk detection service is deployed in the first trusted execution environment, the risk detection process for the data task request is executed within the trusted execution environment, which also ensures the data security of the data user.
[0069] In some embodiments, the risk detection of the data processing logic in the data task request based on the first model deployed in the first trusted execution environment in step S103 includes:
[0070] Step S201: Obtain the task type corresponding to the data task request.
[0071] In some embodiments, the task type may include SQL code task detection, script code task detection, etc. When the task type is SQL code task detection, the data task request is SQL code. There may be detailed query behavior that exposes important data from the data source to the data user, or there may be attacks such as differential attacks or injection attacks that damage the corresponding data from the data source. When the task type is script code task detection, the data task request is script code. There may be behavior such as returning detailed information or log information that exposes important data from the data source to the data user, or there may be behavior such as hard-coding of detailed information that damages the corresponding data from the data source.
[0072] In some embodiments, the task type may include data disclosure, data attack, etc. When the task type is data disclosure, the data user task request may involve detailed queries, returning detailed information, returning log information, etc., which may result in the important data of the data source being disclosed to the data user. When the task type is data attack, the data user task request may involve differential attacks, injection attacks, hard-coding of detailed information, etc., which may result in the corresponding data of the data source being destroyed. This embodiment does not limit this.
[0073] In some embodiments, the task type may also include detailed query, differential attack, injection attack, information return, hard-coded detailed information differential attack or injection attack, etc., and this embodiment does not limit it.
[0074] Step S203: Based on the task type, the data usage task request is sent to a first model that matches the task type, and the data processing logic in the data usage task request is subjected to risk detection by the first model; wherein, at least two first models corresponding to different task types are deployed in the first trusted execution environment.
[0075] In this embodiment, the risk detection service can be associated with multiple model services. Each model service is used to detect data usage task requests of a specific task type. That is, at least two first models corresponding to different task types are deployed in the first trusted execution environment. Therefore, after obtaining the task type corresponding to the data usage task request, the first model corresponding to the corresponding task type is obtained from the multiple model services based on the task type. The data usage task request is then sent to the first model, and the data processing logic in the data usage task request is subjected to risk detection through the first model to obtain the risk detection result.
[0076] In some embodiments, the process of obtaining the first model includes:
[0077] Step S301: Obtain test data.
[0078] In this embodiment, test data can be obtained first.
[0079] In some embodiments, the test data includes multiple sets of data, each set including paired input and output information.
[0080] The input information includes data processing task information with various data processing behaviors. In this embodiment, the input information is a data processing task request with multiple different data processing logics; that is, the input information is also SQL code or script code containing various data processing logics. Furthermore, these data processing task requests include various data processing behaviors, such as querying, retrieving, inserting, and deleting.
[0081] The output information includes at least one of the following: risk type, risk level, and risk location information corresponding to the marked data processing behavior. That is, the output information marks which data processing behaviors in the data task information will lead to data security risks, thereby determining the risk type.
[0082] For example, if the input information is SQL code, the risk type marked in the output information may include detailed query, differential attack, injection attack, etc.; if the input information is script code, the risk type marked in the output information may include logging important information, returning detailed data, hard-coding detailed data, etc.
[0083] Furthermore, it allows setting influence weights for each risk type, thereby enabling the determination of risk levels based on the weighted results.
[0084] In some embodiments, the aforementioned test data results in the public disclosure of important data from the data user and the data source; the scale of the test data needs to meet the minimum requirements for fine-tuning the model, and the risk types need to meet the requirements of most types involved in the business scenario and the data source.
[0085] Step S303: Deploy the pre-acquired second model in the first trusted execution environment, and fine-tune the second model based on the test data to obtain the third model.
[0086] In this embodiment, the second model can be a pre-trained model of a preset type, capable of understanding and generating human and machine language. After obtaining the latest second model, it is deployed in the first trusted execution environment, and fine-tuned using the test data obtained in step S301. This fine-tuning utilizes labeled test data to improve the performance of the second model in the risk detection task requested by the data task, thereby obtaining a third model with better performance in the risk detection task requested by the data task.
[0087] In this embodiment, the second model is fine-tuned using test data. The amount of data required is less than that required for training the model from scratch, and it can improve the model's generalization ability, making it perform better on new data.
[0088] Step S305: Adjust the input and output of the third model based on preset prompts to obtain the first model.
[0089] In this embodiment, after the model fine-tuning is completed, the input and output of the third model obtained after fine-tuning are debugged using the prompt word project, so that the input and output of the final first model meet the user's usage requirements.
[0090] In this embodiment, the test data can be set as a set of prompt words, each of which includes input information and structured output information, thereby constraining the input and output requirements, text size, etc. of the first model, thus illustrating the identified task type and risk type, and ensuring that the fine-tuned model can provide services and be used.
[0091] In this embodiment, the model can be fine-tuned using different test data, so that the first model obtained after fine-tuning can detect different types of data task requests and meet the needs of different application scenarios. Furthermore, during use, authorized users can supplement test data and prompts, provided authorization is granted, thereby further improving detection accuracy.
[0092] In this embodiment, one or more first models can be deployed in the first trusted execution environment; when multiple models are deployed, the model that matches the task type can be selected for detection based on the data task request, and this embodiment does not limit this.
[0093] In this embodiment, when the model deployed in the first trusted execution environment is upgraded or updated, steps S301-S305 are repeated to ensure that the model meets the detection requirements.
[0094] In some embodiments, after fine-tuning the first model, it is also necessary to verify the detection effect of the first model, and to perform detection after the requirements are met.
[0095] In some embodiments, before sending the data task request to the first model matching the task type in step S203, the method further includes: remotely verifying the first trusted execution environment; and, after the remote verification is successful, sending the data task request to the first model.
[0096] In this embodiment, since both the risk detection service and the first model are deployed in the first trusted execution environment, before the first model is called to detect the data task request, the first trusted execution environment including the first model needs to be remotely verified. Only after the remote verification is passed can the data task request be sent to the first model to call the first model for risk detection.
[0097] In some embodiments, the method further includes:
[0098] Step S401: The first trusted execution environment sends a first metric value to the data source.
[0099] In this embodiment, the first trusted execution environment needs to disclose a first metric value as benchmark metric information to the data source and the data user. Specifically, the first trusted execution environment needs to disclose its code information to the data source and the data user, who can then obtain the first metric value based on the core code logic within that code information; alternatively, the first trusted execution environment can directly send its first metric value to the data source and the data user. This embodiment does not limit this approach.
[0100] Step S403: The first trusted execution environment receives remote proof requests sent by the data source party and the data user party, and returns a remote proof report to the data source party and the data user party based on the remote proof requests. The remote proof report includes a second metric.
[0101] The data source can send a remote proof request to the first model (or the first trusted execution environment including the first model); after receiving the remote proof request, the first model (or the first trusted execution environment including the first model) can obtain a second metric as the current metric and generate a remote proof report based on the second metric and return it to the data source.
[0102] The data source and the data user first send a remote proof request to the first trusted execution environment. After receiving the remote proof request, the first trusted execution environment can obtain the second metric value as the current metric value, and generate a remote proof report based on the second metric value and return it to the data source and the data user. The remote proof report includes the current metric information of the first trusted execution environment, namely the second metric value.
[0103] In step S405, the data source and the data user obtain remote proof results for the first trusted execution environment based on the first metric and the second metric.
[0104] After the data source and data user obtain the remote proof report, they can verify it based on the second metric in the remote proof report and the first metric obtained in step S401. When the two are consistent, it means that the remote proof is successful. Then the data source and data user can trust the first trusted execution environment, thereby proving that the risk detection service provided by the first trusted execution environment is safe and reliable.
[0105] When the remote proof result is passed, the first model can be invoked to detect the data task request.
[0106] In some embodiments, the task processing module may be set in a trusted execution environment, such as a second trusted execution environment; or, the task processing module may be set in an untrusted execution environment, which is not limited in this embodiment.
[0107] In this embodiment, the task processing module is deployed in a second trusted execution environment, thereby ensuring the security of the task processing module in processing data task requests and obtaining data from the data source for processing.
[0108] The first trusted execution environment and the second trusted execution environment can be the same trusted execution environment or different trusted execution environments; this embodiment does not limit this.
[0109] When the task processing module is deployed in the second trusted execution environment, the second trusted execution environment needs to disclose benchmark metric information to the data source and data user. In this way, the data source and data user can remotely verify the second trusted execution environment based on the benchmark metric information, and send data task requests to the task processing module deployed in the second trusted execution environment or return corresponding data to the task processing module for data processing if the remote verification is successful. This embodiment does not limit this.
[0110] When the first trusted execution environment and the second trusted execution environment are different trusted execution environments, the second trusted execution environment also needs to disclose benchmark measurement information to the first trusted execution environment in order to realize remote proof between the first trusted execution environment and the second trusted execution environment. After the remote proof is passed, the task processing module deployed in the second trusted execution environment can send the data task request to the risk detection service deployed in the first trusted execution environment, so that the risk detection service can call the corresponding first model to perform risk detection on the data processing logic in the data task request.
[0111] In some embodiments, the risk detection result includes at least one of risk type, risk level, and risk location information. Meanwhile, the risk detection result in step S105 meets preset conditions, including at least one of the following: the risk detection result does not meet a preset risk type; the risk detection result does not meet a preset risk level.
[0112] In this embodiment, risk types, risk levels, and preset conditions can be set according to actual conditions. For example, based on application scenarios and / or data source requirements, it can be set which data processing behaviors will lead to data security issues, or although some behaviors are risky, they will not lead to data security issues if the risk level is low. Therefore, when the risk detection result does not meet the preset risk type and / or the detection result does not meet the preset risk level, it means that the data mining task request will not lead to data security issues. At this time, the data mining task request can be sent to the data source to complete the data mining task.
[0113] In some embodiments, the method further includes: generating detection logs and encrypting and storing the detection logs in a database or blockchain.
[0114] In this embodiment, a detection log is generated during the detection process, and the detection log is encrypted and stored in a database or blockchain for subsequent verification.
[0115] Based on the same inventive concept, corresponding to any of the above embodiments, this disclosure also provides a risk detection method in the data processing process.
[0116] like Figure 3 As shown, the method includes:
[0117] Step S401: Obtain the second model and deploy the second model in the first trusted execution environment.
[0118] The second model can be an open-source model or a model provided by a model provider that can understand and generate human and machine language; this embodiment does not limit this.
[0119] Step S402: Obtain test data, and use the test data to fine-tune the second model and perform prompt word engineering to obtain the first model.
[0120] In this embodiment, the second model is fine-tuned using labeled test data to improve its performance in the detection task of data task requests; and the input and output requirements, text size, etc. of the model are constrained by prompt word engineering to ensure that the fine-tuned first model can provide services and be used.
[0121] Step S403: Accept the detection results of the first model.
[0122] In this embodiment, after obtaining the fine-tuned first model, it is also necessary to verify the detection effect of the first model, and after meeting the requirements, to detect the data usage task request of the data user.
[0123] Step S404: The data provider generates a data processing task request for processing the data resources provided by the data source provider, and sends the data processing task request to the task processing module.
[0124] The task processing module is used to execute data task requests. The task processing module can be deployed in a second trusted execution environment or an untrusted execution environment; this embodiment does not impose any limitations on this.
[0125] Step S405: Perform remote authentication of the first trusted execution environment, and after successful authentication, call the risk detection service in the first trusted execution environment to perform risk detection on the data task request.
[0126] In step S406, in the first trusted execution environment, the risk detection service calls the first model corresponding to the task type of the data task request to detect the data processing logic in the data task request, and returns the risk detection result to the task processing module.
[0127] Step S407: Save the detection log.
[0128] In step S408, if the data task request is executable, the task processing module requests data authorization from the data source and loads the data.
[0129] When the risk detection result obtained in step S406 proves that the data task request will not cause data security issues, the task processing model requests data authorization from the data source and loads the data after the data authorization is approved, thus obtaining the data provided by the data source.
[0130] Step S409: Execute the task and return the result.
[0131] In this embodiment, the task processing module executes the data usage task request based on the acquired data to obtain the data processing result, and then returns the data processing result to the data user.
[0132] In this embodiment, a risk detection service deployed in a first trusted execution environment is used to call a first model to detect the data processing logic in the data usage task request. This allows for the determination of whether there are any data usage behaviors in the data usage task request that could lead to security issues for the data source, further ensuring the security of the data source. Deploying the risk detection service and the first model in a trusted execution environment, and using the risk detection service to call the first model to detect the data processing logic in the data usage task request within the trusted execution environment, ensures the security of the code used by the data user in the data usage task request, improving the data security of the data user. Fine-tuning the first model in the trusted execution environment improves the detection accuracy of the first model and reduces the training cost of the model. During the data mining process, the data source and the data user can remotely verify the first model at any time, ensuring the secure and verifiable nature of the detection service.
[0133] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0134] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.
[0135] As an optional but not limited implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0136] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0137] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0138] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0139] Based on the same inventive concept, corresponding to any of the above-described embodiments, this disclosure also provides a data processing apparatus.
[0140] refer to Figure 4 The risk detection device in the data processing process includes:
[0141] The acquisition module 11 is configured to: acquire a data usage task request sent by the data user to the task processing module, wherein the data usage task request indicates that data from the data source should be processed;
[0142] The detection module 13 is configured to: perform risk detection on the data processing logic in the data task request based on the first model deployed in the first trusted execution environment, and obtain the risk detection result;
[0143] The sending module 15 is configured to send the risk detection result to the task processing module; wherein, in response to the risk detection result meeting preset conditions, the task processing module obtains data from the data source based on the data user task request, processes the data, and outputs the task processing result to the data user.
[0144] In some embodiments, the detection module 13 is further configured to:
[0145] Obtain the task type corresponding to the data task request;
[0146] Based on the task type, the data usage task request is sent to a first model that matches the task type, and the data processing logic in the data usage task request is subjected to risk detection by the first model.
[0147] In the first trusted execution environment, at least two first models corresponding to different task types are deployed.
[0148] In some embodiments, the process of obtaining the first model includes:
[0149] Obtain test data;
[0150] The pre-acquired second model is deployed in the first trusted execution environment, and the second model is fine-tuned based on the test data to obtain the third model;
[0151] The input and output of the third model are adjusted based on preset prompts to obtain the first model.
[0152] In some embodiments, the test data includes input information and output information:
[0153] The input information includes data processing task information with various data processing behaviors;
[0154] The output information includes at least one of the risk type, risk level, and risk location information corresponding to the tagged data processing behavior.
[0155] In some embodiments, before sending the data task request to a first model matching the task type, the apparatus is further configured to:
[0156] Remotely verify the first trusted execution environment; and,
[0157] After the remote verification is successful, the data task request is sent to the first model.
[0158] In some embodiments, the device is further configured to:
[0159] The first trusted execution environment discloses a first metric to the data source and the data user.
[0160] The first trusted execution environment receives remote proof requests sent by the data source party and the data user party, and returns a remote proof report to the data source party and the data user party based on the remote proof requests. The remote proof report includes a second metric.
[0161] The data source and the data user obtain remote proof results for the first trusted execution environment based on the first metric and the second metric.
[0162] In some embodiments, the risk detection result includes at least one of risk type, risk level, and risk location information; the risk detection result meets preset conditions, including at least one of the following:
[0163] The risk detection result does not conform to the preset risk type;
[0164] The risk detection results do not meet the preset risk level.
[0165] In some embodiments, the device is further configured to:
[0166] Generate detection logs and encrypt them before storing them in a database or blockchain.
[0167] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0168] The apparatus described above is used to implement the risk detection method in the corresponding data processing process of any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0169] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the risk detection method in the data processing process described in any of the above embodiments.
[0170] Figure 5 This embodiment illustrates a more specific hardware structure of an electronic device, which may include a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, memory 1020, input / output interface 1030, and communication interface 1040 are interconnected internally via the bus 1050.
[0171] The processor 1010 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0172] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program code is stored in the memory 1020 and is called and executed by the processor 1010.
[0173] The input / output interface 1030 is used to connect input / output modules to realize information input and output. Input / output modules can be configured as components within the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Input devices may include keyboards, mice, touchscreens, microphones, various sensors, etc., while output devices may include displays, speakers, vibrators, indicator lights, etc.
[0174] The communication interface 1040 is used to connect a communication module (not shown in the figure) to enable communication between this device and other devices. The communication module can communicate via wired means (such as USB, Ethernet cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).
[0175] Bus 1050 includes a pathway for transmitting information between various components of the device, such as processor 1010, memory 1020, input / output interface 1030, and communication interface 1040.
[0176] It should be noted that although the above-described device only shows the processor 1010, memory 1020, input / output interface 1030, communication interface 1040, and bus 1050, in specific implementations, the device may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the above-described device may only include the components necessary for implementing the embodiments of this specification, and not necessarily all the components shown in the figures.
[0177] The electronic devices described above are used to implement the risk detection method in the corresponding data processing process of any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0178] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the risk detection method in the data processing process described in any of the above embodiments.
[0179] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0180] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the risk detection method in the data processing process as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0181] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors to cause the processors to perform the risk detection method in the data processing process. Corresponding to the execution entity for each step in each embodiment of the method, the processor executing the corresponding step may belong to the corresponding execution entity.
[0182] The computer program product of the above embodiments is used to cause the processor to execute the risk detection method in the data processing process as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0183] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0184] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0185] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0186] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A risk detection method in a data processing process, the method comprising the following steps performed by a risk detection service deployed in a first trusted execution environment: The task processing module receives a data usage task request sent by the data user to the task processing module. The data usage task request indicates that data from the data source should be processed. The task processing module is deployed in a second trusted execution environment. The task type corresponding to the data usage task request is obtained, the first trusted execution environment is remotely verified, and after the remote verification is passed, the data usage task request is sent to the first model matching the task type based on the task type. The data processing logic in the data usage task request is risk-detected through the first model, and the risk detection result is obtained. The risk detection result is used to characterize whether there are risky behaviors in the data processing logic in the data usage task request that lead to data insecurity. At least two first models corresponding to different task types are deployed in the first trusted execution environment. The risk detection results are sent to the task processing module; wherein... The first trusted execution environment and the second trusted execution environment perform remote verification. After the remote verification is successful, the task processing module forwards the data usage task request to the risk detection service. In response to the risk detection result meeting the preset conditions, the task processing module obtains data from the data source based on the data usage task request, processes it, and outputs the task processing result to the data user. The remote authentication of the first trusted execution environment includes: The first trusted execution environment discloses a first metric value to the data source and the data user. The first metric value is determined based on the core code logic in the code information of the first trusted execution environment. The first trusted execution environment receives remote proof requests sent by the data source and the data user, and returns a remote proof report to the data source and the data user based on the remote proof requests. The remote proof report includes a second metric. The data source and the data user obtain remote proof results for the first trusted execution environment based on the first metric and the second metric. The process of acquiring the first model includes: Obtain test data; The pre-acquired second model is deployed in the first trusted execution environment, and the second model is fine-tuned based on the test data to obtain the third model; The input and output of the third model are adjusted based on preset prompts to obtain the first model.
2. The method according to claim 1, wherein, The test data includes input and output information: The input information includes data processing task information with various data processing behaviors; The output information includes at least one of the risk type, risk level, and risk location information corresponding to the tagged data processing behavior.
3. The method according to claim 1, wherein, The risk detection result includes at least one of risk type, risk level, and risk location information; the risk detection result meets preset conditions, including at least one of the following: The risk detection result does not conform to the preset risk type; The risk detection results do not meet the preset risk level.
4. The method according to claim 1, further comprising: Generate detection logs and encrypt them before storing them in a database or blockchain.
5. A risk detection device in a data processing process, comprising: The acquisition module is configured to: acquire data usage task requests sent by the data user to the task processing module, wherein the data usage task requests indicate processing of data from the data source. The task processing module is deployed in the second trusted execution environment; The detection module is configured to: obtain the task type corresponding to the data usage task request, perform remote verification on the first trusted execution environment, and after the remote verification is passed, send the data usage task request to the first model matching the task type based on the task type, perform risk detection on the data processing logic in the data usage task request through the first model, and obtain a risk detection result. The risk detection result is used to characterize whether there are risky behaviors in the data processing logic of the data usage task request that lead to data insecurity. At least two first models corresponding to different task types are deployed in the first trusted execution environment. The sending module is configured to send the risk detection result to the task processing module; wherein, the first trusted execution environment and the second trusted execution environment perform remote authentication, and after the remote authentication is successful, the task processing module forwards the data usage task request to the risk detection service; the task processing module, in response to the risk detection result meeting preset conditions, obtains data from the data source based on the data usage task request, processes it, and outputs the task processing result to the data user; the risk detection service is deployed in the first trusted execution environment; The device is also configured to: The first trusted execution environment discloses a first metric value to the data source and the data user. The first metric value is determined based on the core code logic in the code information of the first trusted execution environment. The first trusted execution environment receives remote proof requests sent by the data source and the data user, and returns a remote proof report to the data source and the data user based on the remote proof requests. The remote proof report includes a second metric. The data source and the data user obtain remote proof results for the first trusted execution environment based on the first metric and the second metric. The process of acquiring the first model includes: Obtain test data; The pre-acquired second model is deployed in the first trusted execution environment, and the second model is fine-tuned based on the test data to obtain the third model; The input and output of the third model are adjusted based on preset prompts to obtain the first model.
6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the risk detection method in a data processing process as described in any one of claims 1 to 4.
7. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the risk detection method in the data processing process according to any one of claims 1 to 4.
8. A computer program product comprising computer program instructions that, when executed on a computer, cause the computer to perform a risk detection method in a data processing procedure as described in any one of claims 1 to 4.