Intelligent data encryption system and method based on block chain
By storing only the data corresponding to key processes on the blockchain, the problems of redundant data storage and inefficient reading are solved, and efficient and secure data storage and reading are achieved.
Patent Information
- Application Number
- CN202510494158.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-20
- Publication Date
- 2025-08-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art stores all data directly on the blockchain, resulting in inefficient data redundant storage and storage and reading, and the inability to take into account the needs of secure storage and efficient reading of data.
Based on the task status information of the application on the server, the key process is determined, discrete sub-data is intercepted from the uploaded data queue of the user through the running characteristics of the key process, and encrypted and stored on the blockchain. The data extraction permission is judged based on the task execution progress of the application, and extracted from the blockchain and merged into the local cache.
Save the efficiency of blockchain space usage, shorten the time-consuming data storage and reading, and improve the security and reliability of data storage.
Smart Images

Figure CN120449177A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular to a blockchain-based intelligent data encryption system and method. Background Art
[0002] As a decentralized data storage method, blockchain provides an efficient and secure data storage model with tamper-proof, peer-to-peer transmission. Cloud-based platforms and other servers need to process large amounts of data during operation, and these tasks require the coordination of different types of data. To ensure that servers can process tasks safely and efficiently, all data is typically stored uniformly on the blockchain for complete and secure data storage. However, both storing data on the blockchain and reading it from the blockchain are time-consuming. This is particularly true for big data processing platforms like cloud-based platforms, which place high demands on the blockchain's storage capacity and data storage and reading efficiency. Existing technologies store all data directly on the blockchain, which can easily lead to redundant data storage and inefficient storage and reading, failing to balance the requirements of secure data storage and efficient data reading. Summary of the Invention
[0003] The purpose of the present invention is to provide a blockchain-based intelligent data encryption system and method, which determines the key process of the application executing the task based on the task status information of the application in the server; intercepts the uploaded data from the user side to the uploaded data queue based on the running characteristics of the key process; samples a number of discrete sub-data from the uploaded data queue, and encrypts and stores the discrete sub-data and its attribute information in the blockchain; based on the task execution progress of the application, determines whether the application has the data extraction permission for the blockchain, and based on the local cache data attribute information of the application, extracts the matching discrete sub-data from the blockchain and merges it into the local cache data, which only stores the data corresponding to the key process of the task, and extracts the discrete sub-data from the uploaded data queue and encrypts and stores it in the blockchain, without the need to encrypt and store all the data, thereby saving the space utilization efficiency of the blockchain, shortening the data storage and reading time of the blockchain, and improving the data storage security and reliability of the blockchain.
[0004] The present invention is achieved through the following technical solutions:
[0005] An intelligent data encryption system based on blockchain, comprising:
[0006] A task status identification module is used to analyze the work log of the server to obtain task status information of the application in the server;
[0007] A key process identification module, configured to determine a key process for executing a task by the application based on the task status information;
[0008] An upload data queue generation module, configured to intercept and process the user-end upload data received by the server based on the operation characteristics of the key process to obtain an upload data queue;
[0009] A data sampling and storage module, configured to sample the uploaded data queue based on its data characteristics to obtain a plurality of discrete sub-data, and encrypt and store the plurality of discrete sub-data and their attribute information in a blockchain;
[0010] A data extraction permission identification module, configured to determine whether the application has permission to extract data from the blockchain based on the task execution progress of the application;
[0011] A data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data.
[0012] Optionally, the task status identification module is used to analyze the work log of the server to obtain task status information of the application in the server, including:
[0013] Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval;
[0014] The key process identification module is used to determine the key process of the application executing the task based on the task status information, including:
[0015] Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
[0016] Optionally, the critical process identification module is further configured to trigger a control action on the application, including:
[0017] Step S1, using the following formula (1), according to the state information of the task processing process of the application during execution, determine the key process set,
[0018]
[0019] In the above formula (1), C represents the critical process set; P represents the task processing process set of the application; T represents the task set of the application; S represents the state information set of the task processing process during execution, where the state information includes load information and computing resource usage information; f(p, t, s) represents the performance evaluation function of the state s corresponding to the task processing process p corresponding to task t; R(p) represents the computing resource consumption of the task processing process p during execution; g(t, s) represents the importance weight function of the state s corresponding to task t, which is related to the priority of the task; θ represents the critical value for judging whether the task processing process belongs to the critical process; Indicates existence; ∈ indicates belonging;
[0020] Step S2, using the following formula (2), according to the key process set, obtain the state dynamic evaluation value,
[0021]
[0022] In the above formula (2), E(s) represents the state dynamic evaluation value, that is, the application work efficiency in state s; Q(s) represents the application quality factor, that is, the comprehensive operation quality evaluation value of the application in state s; h(s) represents the state adjustment function, that is, the influence function of state s on the application work efficiency; ∈ represents belonging;
[0023] Step S3, using the following formula (3), based on the key process set and the state dynamic evaluation value, a dynamic control decision is generated.
[0024]
[0025] In the above formula (3), D represents the dynamic control decision set, that is, the control actions that need to be performed on the key process; A represents the action set, that is, all control actions allowed to be performed on the key process; represents the evaluation threshold, i.e., the activation condition threshold for executing the control action; k represents the quantity threshold, i.e., the number of key processes in the key process set must exceed the data threshold to trigger the execution of the control action; & represents AND; a represents the ath control action in the action set A; Indicates triggering;
[0026] When the state dynamic evaluation value E(s) is less than the evaluation threshold And if the number of key processes in the key process set is greater than the number threshold k, the execution of the ath control action is triggered; otherwise, the execution of the ath control action is not triggered; among them, the control actions include adjusting the allocation of computing resources, starting backup processes, or reducing the task load.
[0027] Optionally, the upload data queue generation module is configured to intercept and process the user-end upload data received by the server based on the operation characteristics of the key process to obtain an upload data queue, including:
[0028] Based on the identity information of the computing data source of the key process, identity authentication is performed on all the user terminals connected to the server to determine the user terminals that are allowed to upload data to the server; based on the expected execution time interval of the key process, the uploaded data of the user terminals is subjected to time domain interception processing to obtain an uploaded data queue;
[0029] The data sampling and storage module is used to sample the uploaded data queue based on the data characteristics of the uploaded data queue to obtain a number of discrete sub-data, and encrypt and store the discrete sub-data and their attribute information in the blockchain, including:
[0030] Data code distribution identification is performed on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the number of discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and other data of the uploaded data queue except the discrete sub-data is cached locally in the application.
[0031] Optionally, the data extraction permission identification module is configured to determine whether the application has permission to extract data from the blockchain based on the task execution progress of the application, including:
[0032] Determining the remaining time until the application begins executing a critical process based on the application's task execution progress; if the remaining time is less than a preset time threshold, determining that the application has permission to extract data from the blockchain; otherwise, determining that the application does not have permission to extract data from the blockchain;
[0033] The data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data, including:
[0034] When the application has data extraction permission, data content identification is performed on the local cache data of the application to obtain data context association information of the data missing location of the local cache data; based on the data context association information of the data missing location, data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data are filled and merged into the local cache data.
[0035] A blockchain-based intelligent data encryption method, comprising:
[0036] Analyze the work log of the server to obtain task status information of the application in the server; determine the key process of the application executing the task based on the task status information;
[0037] Based on the operating characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain;
[0038] Based on the task execution progress of the application, determine whether the application has the data extraction permission for the blockchain; when the application has the data extraction permission, based on the local cache data attribute information of the application, extract the matching discrete sub-data from the blockchain, and merge the matching discrete sub-data into the local cache data.
[0039] Optionally, analyzing the work log of the server to obtain task status information of the application in the server; and determining the key process of the application executing the task based on the task status information includes:
[0040] Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval;
[0041] Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
[0042] Optionally, based on the operating characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain, including:
[0043] Based on the identity information of the computing data source of the key process, identity authentication is performed on all the user terminals connected to the server to determine the user terminals that are allowed to upload data to the server; based on the expected execution time interval of the key process, the uploaded data of the user terminals is subjected to time domain interception processing to obtain an uploaded data queue;
[0044] Data code distribution identification is performed on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the number of discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and other data of the uploaded data queue except the discrete sub-data is cached locally in the application.
[0045] Optionally, based on the task execution progress of the application, determining whether the application has data extraction permission for the blockchain; if the application has data extraction permission, extracting matching discrete sub-data from the blockchain based on the local cached data attribute information of the application, and merging the matching discrete sub-data into the local cached data, including:
[0046] Determining the remaining time until the application begins executing a critical process based on the application's task execution progress; if the remaining time is less than a preset time threshold, determining that the application has permission to extract data from the blockchain; otherwise, determining that the application does not have permission to extract data from the blockchain;
[0047] When the application has data extraction permission, data content identification is performed on the local cache data of the application to obtain data context association information of the data missing location of the local cache data; based on the data context association information of the data missing location, data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data are filled and merged into the local cache data.
[0048] Compared with the prior art, the present invention has the following beneficial effects:
[0049] The present application provides a blockchain-based intelligent data encryption system and method, which determines the key process of the application executing the task based on the task status information of the application in the server; intercepts the uploaded data from the user side and obtains the uploaded data queue based on the running characteristics of the key process; samples a number of discrete sub-data from the uploaded data queue, and encrypts and stores the discrete sub-data and its attribute information in the blockchain; based on the task execution progress of the application, determines whether the application has the data extraction permission for the blockchain, and extracts the matching discrete sub-data from the blockchain based on the attribute information of the local cached data of the application and merges them into the local cached data. It only stores the data corresponding to the key process of the task, and extracts the discrete sub-data from the uploaded data queue and encrypts and stores it in the blockchain. It does not need to encrypt and store all the data, which saves the space utilization efficiency of the blockchain, shortens the data storage and reading time of the blockchain, and improves the data storage security and reliability of the blockchain. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. Among them:
[0051] Figure 1 A schematic diagram of the structure of a blockchain-based intelligent data encryption system provided by the present invention.
[0052] Figure 2 A flowchart of a blockchain-based intelligent data encryption method provided by the present invention. DETAILED DESCRIPTION
[0053] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. It will be understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some, rather than all, structures related to the present application are shown in the accompanying drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0054] As used herein, the terms "comprise," "comprising," and "having," and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus comprising a series of steps or elements is not limited to the listed steps or elements but may optionally include steps or elements not listed, or may optionally include other steps or elements inherent to the process, method, product, or apparatus.
[0055] References to "embodiments" herein mean that a particular feature, structure, or characteristic described in connection with the embodiments may be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily refer to the same embodiment, nor does it constitute an independent or alternative embodiment that is mutually exclusive of other embodiments. It is understood, both explicitly and implicitly, by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0056] See also Figure 1 As shown, an embodiment of the present application provides a blockchain-based intelligent data encryption system. The blockchain-based intelligent data encryption system includes:
[0057] The task status identification module is used to analyze the work log of the server and obtain the task status information of the application in the server;
[0058] A key process identification module is used to determine the key process of the application program in executing the task based on the task status information;
[0059] An upload data queue generation module is used to intercept and process the user-end upload data received by the server based on the operation characteristics of the key process to obtain an upload data queue;
[0060] A data sampling and storage module is used to sample the uploaded data queue based on its data characteristics to obtain a number of discrete sub-data, and encrypt and store the discrete sub-data and their attribute information in the blockchain;
[0061] A data extraction permission identification module is used to determine whether the application has the permission to extract data from the blockchain based on the application's task execution progress;
[0062] The data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data.
[0063] The beneficial effects of the above embodiments are as follows: the blockchain-based intelligent data encryption system determines the key process of the application executing the task based on the task status information of the application in the server; based on the running characteristics of the key process, the data uploaded from the user end is intercepted and uploaded to the upload data queue; a number of discrete sub-data are sampled from the upload data queue, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain; based on the task execution progress of the application, it is judged whether the application has the data extraction permission for the blockchain, and based on the local cache data attribute information of the application, the matching discrete sub-data is extracted from the blockchain and merged into the local cache data. It only stores the data corresponding to the key process of the task, and extracts the discrete sub-data from the upload data queue and encrypts and stores it in the blockchain. There is no need to encrypt and store all the data, which saves the space utilization efficiency of the blockchain, shortens the data storage and reading time of the blockchain, and improves the data storage security and reliability of the blockchain.
[0064] In another embodiment, the task status identification module is used to analyze the work log of the server to obtain task status information of the application in the server, including:
[0065] Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval;
[0066] The key process identification module is used to determine the key process of the application executing the task based on the task status information, including:
[0067] Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
[0068] The beneficial effects of the above-described embodiments are that the server can complete different types of tasks, including but not limited to image recognition, document editing, and data computation. To ensure the reliability of the server's task execution, different types of applications are installed on the server, each of which accesses the server's memory resources to complete its assigned tasks. To avoid the heavy load caused by the simultaneous launch of a large number of applications on the server, generally, only applications that have been assigned or set to be assigned are allowed to access memory resources. Furthermore, not all applications require high-level security and confidentiality processing during task execution; only certain processes involving complex computations require it. It is precisely these processes that require high-level security and confidentiality that require data encrypted on the blockchain. To accurately determine the data encryption storage requirements of all applications on the server and identify the objects for subsequent data encryption storage, the memory resource usage of all applications on the server is compared with a preset memory resource usage threshold. If the memory resource usage exceeds the preset threshold, the application is determined to be active; otherwise, the application is determined to be inactive. Then analyze the work log of the active application to obtain the computing amount information of all task processing processes that the active application needs to execute in the future preset time interval, that is, the computing amount of each task processing process under the task assigned to the active application in the future preset time interval.
[0069] In addition, based on the computing amount information of all task processing processes that the active application needs to execute in the future preset time interval and the amount of computing resources allowed to be used by the active application on the server, the computing time of all task processing processes that the active application needs to execute in the future preset time interval is estimated, and the computing time is compared with the threshold. If the computing time exceeds the preset time threshold, it indicates that the corresponding task processing process involves complex calculations, that is, the data to be processed by the corresponding task processing is important data. At this time, the corresponding task processing process is determined as a critical process; otherwise, the corresponding task processing process is not determined as a critical process, so that only the data corresponding to the critical process is encrypted and stored subsequently, without the need to encrypt and store the data corresponding to the entire task, thereby reducing the workload of data encryption and storage.
[0070] In another embodiment, the critical process identification module is further configured to trigger a control action executed on the application, including:
[0071] Step S1, using the following formula (1), according to the status information of the task processing process of the application during execution, determine the key process set,
[0072]
[0073] In the above formula (1), C represents the critical process set; P represents the task processing process set of the application; T represents the task set of the application; S represents the state information set of the task processing process during execution, where the state information includes load information and computing resource usage information; f(p, t, s) represents the performance evaluation function of the state s corresponding to the task processing process p corresponding to task t; R(p) represents the computing resource consumption of the task processing process p during execution; g(t, s) represents the importance weight function of the state s corresponding to task t, which is related to the priority of the task; θ represents the critical value for judging whether the task processing process belongs to the critical process; Indicates existence; ∈ indicates belonging;
[0074] Step S2, using the following formula (2), according to the key process set, obtain the state dynamic evaluation value,
[0075]
[0076] In the above formula (2), E(s) represents the state dynamic evaluation value, that is, the application work efficiency in state s; Q(s) represents the application quality factor, that is, the comprehensive operation quality evaluation value of the application in state s; h(s) represents the state adjustment function, that is, the influence function of state s on the application work efficiency; ∈ represents belonging;
[0077] Step S3, using the following formula (3), based on the key process set and the state dynamic evaluation value, generates a dynamic control decision,
[0078]
[0079] In the above formula (3), D represents the dynamic control decision set, that is, the control actions that need to be performed on the key process; A represents the action set, that is, all control actions allowed to be performed on the key process; represents the evaluation threshold, i.e., the activation condition threshold for executing the control action; k represents the quantity threshold, i.e., the number of key processes in the key process set must exceed this data threshold to trigger the execution of the control action; & represents AND; a represents the ath control action in the action set A; Indicates triggering;
[0080] When the state dynamic evaluation value E(s) is less than the evaluation threshold And if the number of key processes in the key process set is greater than the number threshold k, the execution of the ath control action is triggered; otherwise, the execution of the ath control action is not triggered; among them, the control actions include adjusting the allocation of computing resources, starting a backup process, or reducing the task load.
[0081] The beneficial effects of the above embodiment are as follows: using the above formula (1), according to the state information of the task processing process of the application during execution, a critical process set is determined, and through enhanced critical process identification, a more comprehensive key process identification basis is provided in combination with resource consumption and task importance; then using the above formula (2), according to the critical process set, a state dynamic evaluation value is obtained, and the application quality factor and state adjustment function are added to the state dynamic evaluation to further improve the accuracy and dynamism of the evaluation; then using the above formula (3), according to the critical process set and the state dynamic evaluation value, a dynamic control decision is generated, and using the enhanced evaluation results and the key process set information, a more refined control strategy is formulated to achieve more effective process management and application operation optimization.
[0082] In another embodiment, the upload data queue generation module is used to intercept and process the user-end uploaded data received by the server based on the operation characteristics of the key process to obtain the upload data queue, including:
[0083] Based on the identity information of the computing data source of the key process, all the clients connected to the server are authenticated to determine the clients allowed to upload data to the server. Based on the expected execution time interval of the key process, the uploaded data of the client is intercepted in the time domain to obtain the uploaded data queue.
[0084] The data sampling and storage module is used to sample the uploaded data queue based on the data characteristics of the uploaded data queue to obtain a number of discrete sub-data, and encrypt and store the discrete sub-data and their attribute information in the blockchain, including:
[0085] Data code distribution is identified on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and all other data in the uploaded data queue except the discrete sub-data is cached locally in the application.
[0086] The beneficial effect of the above embodiment is that when the application on the server side executes different processes under the task, it is necessary to perform calculations and processing on the data from a specific user side. In order to accurately screen and encrypt the data that needs to be processed by the key process, the source identity information of the calculation data of the key process is compared and authenticated with the identity information of all user sides connected to the server side, and the user side with the same identity information as the source identity information of the calculation data is used as the user side allowed to upload data to the server side; then the expected execution time interval of the key process is compared with the entire time interval of the user side that is allowed to upload data to the server side to upload data to the server side, and the data uploaded by the user side to the server side is intercepted during the expected execution time interval of the key process to obtain the uploaded data queue.
[0087] The uploaded data queue contains all the data that needs to be processed during the execution of the key process. However, not all data in the uploaded data queue needs to be encrypted and stored in the blockchain. In order to perform targeted local encrypted storage of the uploaded data, the data code distribution of the uploaded data queue is identified to obtain the preset type data code distribution position information of the uploaded data queue. The preset type data code distribution position information can be, but is not limited to, the distribution position of a character string formed by a specific type of characters in the uploaded data queue within the uploaded data queue. Then, based on the preset type data code distribution position information, the data segment between two adjacent preset type data codes is used as a data interval of the upload data queue, thereby dividing the upload data queue into several data intervals, and then performing random sampling processing on each data interval. For example, one or more sub-data with a preset length are randomly extracted from each data interval, and then all the extracted sub-data are combined into discrete sub-data, and the several discrete sub-data and their data context association information within the upload data queue are encrypted and stored in the blockchain, and other data of the upload data queue except the discrete sub-data is cached locally in the application; wherein, the number of sub-data randomly extracted from each data interval is positively correlated with the length of the data interval. When the length of the data interval is longer, the number of sub-data randomly extracted is also larger; the data context association information of the discrete sub-data within the upload data queue refers to the content association information between the discrete sub-data and other data adjacent to it in the upload data queue. Through the above method, only the molecular data and its data context information within the uploaded data queue are encrypted and stored in the blockchain, while other sub-data in the uploaded data queue are directly cached locally in the application. Using this differentiated storage method, only a small amount of storage space on the blockchain is needed to achieve effective and secure storage of the uploaded data queue. Even if the application's local cached data is stolen, this data cannot be used, thereby improving the reliability of data encryption storage.
[0088] In another embodiment, the data extraction permission identification module is used to determine whether the application has the permission to extract data from the blockchain based on the task execution progress of the application, including:
[0089] Based on the application's task execution progress, determine the remaining time until the application begins executing the key process; if the remaining time is less than a preset time threshold, determine that the application has data extraction permission from the blockchain; otherwise, determine that the application does not have data extraction permission from the blockchain;
[0090] The data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data, including:
[0091] When the application has data extraction permission, the data content of the local cached data of the application is identified to obtain the data context association information of the data missing location of the local cached data; based on the data context association information of the data missing location, the blockchain is searched to extract the matching discrete sub-data, and the matching discrete sub-data is filled and merged into the local cached data.
[0092] The beneficial effect of the above embodiment is that if the corresponding data is extracted from the blockchain early before the critical process within the application is executed, the data will be exposed in an unencrypted and insecure environment. In order to ensure that the critical process obtains the data to be processed in a timely manner and avoids the data being exposed in an unencrypted environment too early, based on the application's task execution progress, the remaining time until the application begins executing the critical process is determined, and the remaining time is compared with a threshold to determine whether the application has data extraction permission from the blockchain, ensuring that the originally encrypted stored data is extracted from the blockchain at the appropriate time. In addition, when the application has data extraction permission, the data content of the application's local cached data is identified to obtain data context information of the data missing location of the local cached data. Using the data context information of the data missing location as an index, a data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data is filled and merged into the local cached data. This allows the application's local cached data to be globally restored, ensuring that the critical process can obtain complete data for processing.
[0093] See also Figure 2 As shown, an embodiment of the present application provides a blockchain-based intelligent data encryption method. The blockchain-based intelligent data encryption method includes:
[0094] Analyze the work log of the server to obtain the task status information of the application in the server; based on the task status information, determine the key process of the application to perform the task;
[0095] Based on the operating characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain;
[0096] Based on the task execution progress of the application, determine whether the application has the data extraction permission for the blockchain; when the application has the data extraction permission, based on the local cached data attribute information of the application, extract the matching discrete sub-data from the blockchain and merge the matching discrete sub-data into the local cached data.
[0097] The beneficial effects of the above embodiments are as follows: the blockchain-based intelligent data encryption method determines the key process of the application executing the task based on the task status information of the application in the server; based on the running characteristics of the key process, the data uploaded from the user end is intercepted and uploaded to the upload data queue; a number of discrete sub-data are sampled from the upload data queue, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain; based on the task execution progress of the application, it is judged whether the application has the data extraction permission for the blockchain, and based on the local cache data attribute information of the application, the matching discrete sub-data is extracted from the blockchain and merged into the local cache data. It only stores the data corresponding to the key process of the task, and extracts the discrete sub-data from the upload data queue and encrypts and stores it in the blockchain. There is no need to encrypt and store all the data, which saves the space utilization efficiency of the blockchain, shortens the data storage and reading time of the blockchain, and improves the data storage security and reliability of the blockchain.
[0098] In another embodiment, analyzing a work log of a server to obtain task status information of an application in the server; and determining a key process of the application executing a task based on the task status information includes:
[0099] Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval;
[0100] Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
[0101] The beneficial effects of the above-described embodiments are that the server can complete different types of tasks, including but not limited to image recognition, document editing, and data computation. To ensure the reliability of the server's task execution, different types of applications are installed on the server, each of which accesses the server's memory resources to complete its assigned tasks. To avoid the heavy load caused by the simultaneous launch of a large number of applications on the server, generally, only applications that have been assigned or set to be assigned are allowed to access memory resources. Furthermore, not all applications require high-level security and confidentiality processing during task execution; only certain processes involving complex computations require it. It is precisely these processes that require high-level security and confidentiality that require data encrypted on the blockchain. To accurately determine the data encryption storage requirements of all applications on the server and identify the objects for subsequent data encryption storage, the memory resource usage of all applications on the server is compared with a preset memory resource usage threshold. If the memory resource usage exceeds the preset threshold, the application is determined to be active; otherwise, the application is determined to be inactive. Then analyze the work log of the active application to obtain the computing amount information of all task processing processes that the active application needs to execute in the future preset time interval, that is, the computing amount of each task processing process under the task assigned to the active application in the future preset time interval.
[0102] In addition, based on the computing amount information of all task processing processes that the active application needs to execute in the future preset time interval and the amount of computing resources allowed to be used by the active application on the server, the computing time of all task processing processes that the active application needs to execute in the future preset time interval is estimated, and the computing time is compared with the threshold. If the computing time exceeds the preset time threshold, it indicates that the corresponding task processing process involves complex calculations, that is, the data to be processed by the corresponding task processing is important data. At this time, the corresponding task processing process is determined as a critical process; otherwise, the corresponding task processing process is not determined as a critical process, so that only the data corresponding to the critical process is encrypted and stored subsequently, without the need to encrypt and store the data corresponding to the entire task, thereby reducing the workload of data encryption and storage.
[0103] In another embodiment, based on the operating characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain, including:
[0104] Based on the identity information of the computing data source of the key process, all the clients connected to the server are authenticated to determine the clients allowed to upload data to the server. Based on the expected execution time interval of the key process, the uploaded data of the client is intercepted in the time domain to obtain the uploaded data queue.
[0105] Data code distribution is identified on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and all other data in the uploaded data queue except the discrete sub-data is cached locally in the application.
[0106] The beneficial effect of the above embodiment is that when the application on the server side executes different processes under the task, it is necessary to perform calculations and processing on the data from a specific user side. In order to accurately screen and encrypt the data that needs to be processed by the key process, the source identity information of the calculation data of the key process is compared and authenticated with the identity information of all user sides connected to the server side, and the user side with the same identity information as the source identity information of the calculation data is used as the user side allowed to upload data to the server side; then the expected execution time interval of the key process is compared with the entire time interval of the user side that is allowed to upload data to the server side to upload data to the server side, and the data uploaded by the user side to the server side is intercepted during the expected execution time interval of the key process to obtain the uploaded data queue.
[0107] The uploaded data queue contains all the data that needs to be processed during the execution of the key process. However, not all data in the uploaded data queue needs to be encrypted and stored in the blockchain. In order to perform targeted local encrypted storage of the uploaded data, the data code distribution of the uploaded data queue is identified to obtain the preset type data code distribution position information of the uploaded data queue. The preset type data code distribution position information can be, but is not limited to, the distribution position of a character string formed by a specific type of characters in the uploaded data queue within the uploaded data queue. Then, based on the preset type data code distribution position information, the data segment between two adjacent preset type data codes is used as a data interval of the upload data queue, thereby dividing the upload data queue into several data intervals, and then performing random sampling processing on each data interval. For example, one or more sub-data with a preset length are randomly extracted from each data interval, and then all the extracted sub-data are combined into discrete sub-data, and the several discrete sub-data and their data context association information within the upload data queue are encrypted and stored in the blockchain, and other data of the upload data queue except the discrete sub-data is cached locally in the application; wherein, the number of sub-data randomly extracted from each data interval is positively correlated with the length of the data interval. When the length of the data interval is longer, the number of sub-data randomly extracted is also larger; the data context association information of the discrete sub-data within the upload data queue refers to the content association information between the discrete sub-data and other data adjacent to it in the upload data queue. Through the above method, only the molecular data and its data context information within the uploaded data queue are encrypted and stored in the blockchain, while other sub-data in the uploaded data queue are directly cached locally in the application. Using this differentiated storage method, only a small amount of storage space on the blockchain is needed to achieve effective and secure storage of the uploaded data queue. Even if the application's local cached data is stolen, this data cannot be used, thereby improving the reliability of data encryption storage.
[0108] In another embodiment, based on the task execution progress of the application, determining whether the application has data extraction permission for the blockchain; if the application has data extraction permission, extracting matching discrete sub-data from the blockchain based on the application's local cached data attribute information, and merging the matching discrete sub-data into the local cached data, including:
[0109] Based on the application's task execution progress, determine the remaining time until the application begins executing the key process; if the remaining time is less than a preset time threshold, determine that the application has data extraction permission from the blockchain; otherwise, determine that the application does not have data extraction permission from the blockchain;
[0110] When the application has data extraction permission, the data content of the local cached data of the application is identified to obtain the data context association information of the data missing location of the local cached data; based on the data context association information of the data missing location, the blockchain is searched to extract the matching discrete sub-data, and the matching discrete sub-data is filled and merged into the local cached data.
[0111] The beneficial effect of the above embodiment is that if the corresponding data is extracted from the blockchain early before the critical process within the application is executed, the data will be exposed in an unencrypted and insecure environment. In order to ensure that the critical process obtains the data to be processed in a timely manner and avoids the data being exposed in an unencrypted environment too early, based on the application's task execution progress, the remaining time until the application begins executing the critical process is determined, and the remaining time is compared with a threshold to determine whether the application has data extraction permission from the blockchain, ensuring that the originally encrypted stored data is extracted from the blockchain at the appropriate time. In addition, when the application has data extraction permission, the data content of the application's local cached data is identified to obtain data context information of the data missing location of the local cached data. Using the data context information of the data missing location as an index, a data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data is filled and merged into the local cached data. This allows the application's local cached data to be globally restored, ensuring that the critical process can obtain complete data for processing.
[0112] In general, the blockchain-based intelligent data encryption system and method determines the key process of the application's task execution based on the task status information of the application in the server; based on the operating characteristics of the key process, the data uploaded from the user end is intercepted and uploaded to the upload data queue; a number of discrete sub-data are sampled from the upload data queue, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain; based on the task execution progress of the application, it is determined whether the application has the data extraction permission for the blockchain, and based on the local cache data attribute information of the application, the matching discrete sub-data is extracted from the blockchain and merged into the local cache data. It only stores the data corresponding to the key process of the task, and extracts the discrete sub-data from the upload data queue and encrypts and stores it in the blockchain. There is no need to encrypt and store all the data, which saves the space utilization efficiency of the blockchain, shortens the data storage and reading time of the blockchain, and improves the data storage security and reliability of the blockchain.
[0113] The above is only a specific embodiment of the present invention, and any other improvements made based on the concept of the present invention are considered to be within the scope of protection of the present invention.
Claims
1. An intelligent data encryption system based on blockchain, characterized in that: include: A task status identification module is used to analyze the work log of the server to obtain task status information of the application in the server; A key process identification module, configured to determine a key process for executing a task by the application based on the task status information; An upload data queue generation module, configured to intercept and process the user-end upload data received by the server based on the operation characteristics of the key process to obtain an upload data queue; A data sampling and storage module, configured to sample the uploaded data queue based on its data characteristics to obtain a plurality of discrete sub-data, and encrypt and store the plurality of discrete sub-data and their attribute information in a blockchain; A data extraction permission identification module, configured to determine whether the application has permission to extract data from the blockchain based on the task execution progress of the application; A data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data.
2. The blockchain-based intelligent data encryption system according to claim 1, characterized in that: The task status identification module is used to analyze the work log of the server to obtain the task status information of the application in the server, including: Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval; The key process identification module is used to determine the key process of the application executing the task based on the task status information, including: Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
3. The blockchain-based intelligent data encryption system according to claim 1, characterized in that: The key process identification module is further used to trigger control actions executed on the application, including: Step S1, using the following formula (1), according to the state information of the task processing process of the application during execution, determine the key process set, In the above formula (1), C represents the critical process set; P represents the task processing process set of the application; T represents the task set of the application; S represents the state information set of the task processing process during execution, where the state information includes load information and computing resource usage information; f(p, t, s) represents the performance evaluation function of the state s corresponding to the task processing process p corresponding to task t; R(p) represents the computing resource consumption of the task processing process p during execution; g(t, s) represents the importance weight function of the state s corresponding to task t, which is related to the priority of the task; θ represents the critical value for judging whether the task processing process belongs to the critical process; Indicates existence; ∈ indicates belonging; Step S2, using the following formula (2), according to the key process set, obtain the state dynamic evaluation value, In the above formula (2), E(s) represents the state dynamic evaluation value, that is, the application work efficiency in state s; Q(s) represents the application quality factor, that is, the comprehensive operation quality evaluation value of the application in state s; h(s) represents the state adjustment function, that is, the influence function of state s on the application work efficiency; ∈ represents belonging; Step S3, using the following formula (3), based on the key process set and the state dynamic evaluation value, a dynamic control decision is generated. In the above formula (3), D represents the dynamic control decision set, that is, the control actions that need to be performed on the key process; A represents the action set, that is, all control actions allowed to be performed on the key process; represents the evaluation threshold, i.e., the activation condition threshold for executing the control action; k represents the quantity threshold, i.e., the number of key processes in the key process set must exceed the data threshold to trigger the execution of the control action; & represents AND; a represents the ath control action in the action set A; Indicates triggering; when the state dynamic evaluation value E(s) is less than the evaluation threshold And if the number of key processes in the key process set is greater than the number threshold k, the execution of the ath control action is triggered; otherwise, the execution of the ath control action is not triggered; among them, the control actions include adjusting the allocation of computing resources, starting backup processes, or reducing the task load.
4. The blockchain-based intelligent data encryption system according to claim 1, wherein: The upload data queue generation module is used to intercept and process the user-end upload data received by the server based on the operation characteristics of the key process to obtain an upload data queue, including: Based on the identity information of the computing data source of the key process, identity authentication is performed on all the user terminals connected to the server to determine the user terminals that are allowed to upload data to the server; based on the expected execution time interval of the key process, the uploaded data of the user terminals is subjected to time domain interception processing to obtain an uploaded data queue; The data sampling and storage module is used to sample the uploaded data queue based on the data characteristics of the uploaded data queue to obtain a number of discrete sub-data, and encrypt and store the discrete sub-data and their attribute information in the blockchain, including: Data code distribution identification is performed on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the number of discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and other data of the uploaded data queue except the discrete sub-data is cached locally in the application.
5. The blockchain-based intelligent data encryption system according to claim 1, characterized in that: The data extraction permission identification module is used to determine whether the application has the permission to extract data from the blockchain based on the task execution progress of the application, including: Determining the remaining time until the application begins executing a critical process based on the application's task execution progress; if the remaining time is less than a preset time threshold, determining that the application has permission to extract data from the blockchain; otherwise, determining that the application does not have permission to extract data from the blockchain; The data extraction and merging module is used to extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application when the application has data extraction permission, and merge the matching discrete sub-data into the local cached data, including: When the application has data extraction permission, data content identification is performed on the local cache data of the application to obtain data context association information of the data missing location of the local cache data; based on the data context association information of the data missing location, data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data are filled and merged into the local cache data.
6. A blockchain-based intelligent data encryption method, characterized in that: include: Analyze the work log of the server to obtain task status information of the application in the server; Determining a key process for executing a task by the application based on the task status information; Based on the operating characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain; Based on the task execution progress of the application, determine whether the application has the data extraction permission for the blockchain; when the application has the data extraction permission, based on the local cache data attribute information of the application, extract the matching discrete sub-data from the blockchain, and merge the matching discrete sub-data into the local cache data.
7. The blockchain-based intelligent data encryption method according to claim 6, characterized in that: Analyze the work log of the server to obtain task status information of the application in the server; Determining a key process for executing a task by the application based on the task status information includes: Based on the memory resource usage information of all applications in the server, active applications are determined; work logs of the active applications are analyzed to obtain task status information of the active applications; wherein the task status information includes the computational load information of all task processing processes that the active applications need to execute in a preset future time interval; Based on the task status information, estimate the computing time of all task processing processes that the active application needs to execute in a preset time interval in the future; compare the computing time with a preset time threshold; if the computing time exceeds the preset time threshold, determine the corresponding task processing process as a key process for the active application to execute the task; otherwise, do not determine the corresponding task processing process as a key process for the active application to execute the task.
8. The blockchain-based intelligent data encryption method according to claim 6, characterized in that: Based on the operation characteristics of the key process, the user-end uploaded data received by the server is intercepted and processed to obtain an uploaded data queue; based on the data characteristics of the uploaded data queue, the uploaded data queue is sampled to obtain a number of discrete sub-data, and the discrete sub-data and their attribute information are encrypted and stored in the blockchain, including: Based on the identity information of the computing data source of the key process, identity authentication is performed on all the user terminals connected to the server to determine the user terminals that are allowed to upload data to the server; based on the expected execution time interval of the key process, the uploaded data of the user terminals is subjected to time domain interception processing to obtain an uploaded data queue; Data code distribution identification is performed on the uploaded data queue to obtain preset type data code distribution position information of the uploaded data queue; based on the preset type data code distribution position information, the uploaded data queue is divided into a number of data intervals; all data intervals are randomly sampled to obtain a number of discrete sub-data, and the number of discrete sub-data and their data context association information within the uploaded data queue are encrypted and stored in the blockchain, and other data of the uploaded data queue except the discrete sub-data is cached locally in the application.
9. The blockchain-based intelligent data encryption method according to claim 6, characterized in that: Based on the task execution progress of the application, determine whether the application has data extraction permission for the blockchain; if the application has data extraction permission, extract matching discrete sub-data from the blockchain based on the local cached data attribute information of the application, and merge the matching discrete sub-data into the local cached data, including: Determining the remaining time until the application begins executing a critical process based on the application's task execution progress; if the remaining time is less than a preset time threshold, determining that the application has permission to extract data from the blockchain; otherwise, determining that the application does not have permission to extract data from the blockchain; When the application has data extraction permission, data content identification is performed on the local cache data of the application to obtain data context association information of the data missing location of the local cache data; based on the data context association information of the data missing location, data search is performed on the blockchain to extract matching discrete sub-data, and the matching discrete sub-data are filled and merged into the local cache data.