An event-triggered encryption method based on reinforcement learning
By using an event-triggered encryption method based on reinforcement learning, the division and adjustment of encryption strategies are optimized, which solves the problems of insufficient security and flexibility of encryption strategies in existing technologies, and achieves efficient adjustability and security of data encryption.
Patent Information
- Application Number
- CN202411696626.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2044-11-25
AI Technical Summary
Existing data encryption methods have design flaws in meeting security and flexibility requirements, making it difficult to implement adjustable encryption strategies. Furthermore, the input to reinforcement learning models is incomplete, resulting in poor training performance.
An event-triggered encryption method based on reinforcement learning is adopted. By designing partitioning strategies and event triggering threshold conditions, and combining the characteristics of the data to be encrypted and business requirements, the partitioning and adjustment of encryption strategies are optimized. The event triggering mechanism is used to select strategies with good security, reducing the amount of computation and enhancing security.
It improves the security and flexibility of encryption strategies, reduces computational load, meets the security requirements of data in different business scenarios, and achieves the adjustability and efficiency of encryption strategies.
Smart Images

Figure CN119766479B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of information security, specifically relating to an event-triggered encryption method based on reinforcement learning. Background Technology
[0002] In response to the increasing demand for data encryption and the varying security requirements for different data within the same business process, existing data encryption solutions, while meeting security and flexibility requirements, have significant design flaws in overall security. They fail to simultaneously satisfy both encryption security and flexibility while also implementing adjustable and practical encryption strategies. Furthermore, existing designs utilizing reinforcement learning rules for data security classification and encryption strategies suffer from incomplete inputs, making it difficult to train robust reinforcement learning models in practice.
[0003] This invention addresses the aforementioned problems by designing an event-triggered encryption method based on reinforcement learning, which solves the issues of security and flexibility of the encryption strategy, as well as the completeness of data types in the input of the reinforcement learning model. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] The technical problem to be solved by this invention is how to provide an event-triggered encryption method based on reinforcement learning to solve the problems of security and flexibility of encryption strategies and the completeness of data types in the input of reinforcement learning models.
[0006] (II) Technical Solution
[0007] To address the aforementioned technical problems, this invention proposes an event-triggered encryption method based on reinforcement learning, which includes the following steps:
[0008] The first step is to design a partitioning strategy based on the data to be encrypted and an event triggering threshold condition for the encryption strategy;
[0009] The second step is to determine the metadata partitioning strategy for the data to be encrypted; metadata refers to basic data units that use the same encryption method and encryption strength.
[0010] The third step is to select an encryption strategy for the divided data to be encrypted.
[0011] Step 4: Evaluation of event-triggered partitioning and encryption strategies;
[0012] Step 5: Divide the data to be encrypted and determine the encryption strategy based on reinforcement learning rules.
[0013] (III) Beneficial Effects
[0014] This invention proposes an event-triggered encryption method based on reinforcement learning. The beneficial effects of this invention are as follows:
[0015] 1. The event-triggered reinforcement learning encryption method proposed in this invention strengthens the security constraints caused by changes in encryption policies by utilizing the event-triggered mechanism. By setting an event-triggered security judgment for policy changes before policy changes are made based on reinforcement learning rules, policies that do not meet the security requirements are directly excluded. This eliminates the need for reinforcement learning-based judgments for such policies, saving a significant amount of computation while enhancing the overall security of the data to be encrypted.
[0016] 2. In the reinforcement learning-based partitioning and encryption strategy for data to be encrypted in this invention, the input of the strategy in the reinforcement learning rules comprehensively utilizes the historical, current, and future predicted security performance requirements and environmental requirements of the data to be processed. The future predicted security performance requirements refer to the security requirements of the data within its specific business context, as the security requirements of the specific business to which the data belongs exhibit a type of security requirement that does not change frequently over time. This type of security requirement is also one of the most important factors constituting the data's own security requirements, thus providing predictability for the data's security requirements over a future period. Therefore, the input information for the reinforcement learning rules in this invention encompasses all data security requirements along the timeline.
[0017] 3. This invention innovatively proposes a reinforcement learning-based rule-based partitioning strategy for data. Considering that different partitioning methods can affect the security of encryption strategies—too fine a partitioning reduces encryption efficiency, while too coarse a partitioning reduces security—this invention proposes a reinforcement learning-based comprehensive approach to optimize the partitioning method by considering the balance between security and efficiency resulting from the partitioning of the same data to be encrypted. Attached Figure Description
[0018] Figure 1 This is a flowchart of the present invention. Detailed Implementation
[0019] To make the objectives, contents, and advantages of the present invention clearer, the specific embodiments of the present invention will be described in further detail below with reference to the accompanying drawings and examples.
[0020] This invention ensures the security of event-triggered encryption by setting an event-triggered encryption strategy based on reinforcement learning. Simultaneously, adjustments to the reinforcement learning-based encryption strategy guarantee the flexibility and adjustability of the encryption method. Using this approach, an optimized encryption strategy can be determined by comprehensively considering the security of the data to be encrypted and the security requirements of the relevant business, ensuring the security of the encryption strategy while maintaining its own security foundation. Furthermore, the setting and adjustment of the event trigger threshold allows for the adjustment of the security of the data to be encrypted.
[0021] This invention proposes an event-triggered encryption method based on reinforcement learning, which mainly uses the characteristics of the data to be encrypted and the usage characteristics of the data to be encrypted in business as input feature data for learning;
[0022] The characteristics of the data to be encrypted include: the structure and type of the data or file, the business scope to which the data belongs, and the degree of relevance between the data and the business.
[0023] The characteristics of the data to be encrypted in business operations include: the business type to which the data belongs, the historical security policies used for the data, and the relationship between the data to be encrypted and different businesses.
[0024] Before encryption, the data to be encrypted needs to be initially divided according to the specific business usage scenario and the security encryption strategy. That is, the data to be encrypted is divided into different metadata according to different time and space security strengths and business needs.
[0025] Reinforcement learning rules are used in the process of dividing the data to be encrypted into metadata and in the process of using different encryption strategies. By comparing with the partitioning and encryption strategies used in the past and the feedback results of the current partitioning and encryption strategies, a comprehensive evaluation is conducted to obtain the partitioning and encryption strategy selection for the current data to be encrypted.
[0026] The principle of event triggering is to prevent frequent changes to the partitioning and encryption strategy of the data to be encrypted. Only when there is a particularly good performance after the partitioning or encryption strategy of the current data to be encrypted is the corresponding partitioning or encryption strategy implemented. Here, good performance means that the variable of the partitioning or encryption strategy to be implemented is quantitatively calculated by comparing it with the original partitioning or encryption strategy. When the value of this quantitative calculation exceeds a certain predetermined threshold, the corresponding partitioning or encryption strategy is implemented. The occurrence of an event is represented by exceeding a certain predetermined threshold.
[0027] This event-based reinforcement learning encryption strategy for data satisfies both the flexibility and security requirements of encryption strategies for different metadata in the data, and also allows for the implementation of security strategies based on predetermined security parameters. In other words, the event-triggered reinforcement learning encryption strategy proposed in this invention is a flexible encryption method for data to be encrypted while satisfying security requirements.
[0028] This invention provides an event-triggered encryption method based on reinforcement learning, which includes the following steps:
[0029] Step 1: Design a partitioning strategy based on the data to be encrypted and an event triggering threshold condition for the encryption strategy.
[0030] For the partitioning and encryption strategies of the data to be encrypted, specific implementation conditions are set. These implementation conditions are event-triggered threshold conditions. An event refers to the execution of the partitioning and encryption actions; that is, the partitioning or encryption actions can only be executed when their respective conditions are met, not simply based on the results obtained from reinforcement learning. The threshold conditions mentioned here are determined comprehensively based on historical experience and the specific business requirements of the data to be encrypted. In particular, it is necessary to pre-determine the impact of this threshold on the overall security of the encryption system; performance impacts other than security are not considered here.
[0031] Step 2: Determine the metadata partitioning strategy for the data to be encrypted; metadata refers to basic data units that use the same encryption method and encryption strength.
[0032] Because different business operations and the same business operation may have different encryption methods and strength requirements for the same data at different times, the metadata segmentation of the data to be encrypted needs to consider information such as the type of business to which the metadata currently belongs, the security policy of the current business, and the security requirements of the metadata itself, while also referring to information such as the historical segmentation of metadata. Based on the above information, a preliminary segmentation of the data to be encrypted is obtained.
[0033] Step 3: Select an encryption strategy for the divided data to be encrypted.
[0034] After the data to be encrypted is divided, an encryption strategy is selected based on the divided data and the encryption strategy itself. The selection of the encryption strategy is based on the historical encryption strategies and encryption strength of the data, the types of keys used, and the specific business security policy requirements.
[0035] Step 4: Evaluation of event-triggered partitioning and encryption strategies.
[0036] After the initial partitioning and encryption strategies are determined, the security and other performance of the partitioning and encryption strategies are assessed based on the event triggering conditions after their implementation, and a comprehensive decision is made on whether the partitioning and encryption strategies can be implemented.
[0037] The event triggering conditions are set by using partitioning and encryption strategies as input and security indicators as the judgment criteria. The event triggering conditions are determined according to the input partitioning and encryption strategies.
[0038] Taking partitioning as an example, the determination is based on the quantified value of the level of refinement for plaintext partitioning. For fixed plaintext, the refinement can be based on the current partitioning value X. h And the value Y of the latest partition that has been executed h The ratio X h / Y h Quantization is performed. The maximum value for the partition is 1, and the minimum value is 0. Here, 1 and 0 represent a specific security strategy: a partition of 1 represents a strong security partition using one-time pads per character or bit, while a partition of 0 represents a weak security partition where the plaintext is treated as a whole. The event trigger condition for the partition can be set to the ratio X. h / Y h Exceeding a certain number between [0,1] l That is, when X h / Y h<l When X is in a certain state, no updates are made to the current partition, and the partitioning is performed according to the latest partitioning that was previously executed; when X... h / Y h >= l When that happens, update and execute the current partitioning strategy.
[0039] The setting of event trigger conditions for encryption strategies follows a similar approach. It should be noted that the event trigger conditions for the partitioning and encryption strategies are interdependent, not independent. The specific settings depend on the designer's consideration of the overall security of the encrypted system and the actual security requirements. This is merely a framework and a relatively large degree of design freedom for actual users to design according to their specific circumstances.
[0040] This step does not need to consider the impact of reinforcement learning, because the event triggering conditions operate independently of the reinforcement learning-based policy framework. Once a certain partitioning or encryption policy does not meet the policy change conditions based on the event triggering conditions, then there is no need to determine whether the policy needs to be changed through subsequent reinforcement learning-based rule determinations.
[0041] The strategy for partitioning the data to be encrypted and the decision to change the encryption strategy based on event-triggered thresholds are independent and unrelated. They are only considered together when the merits of the two strategies are determined based on reinforcement learning rules.
[0042] Step 5: Divide the data to be encrypted based on reinforcement learning rules and determine the encryption strategy.
[0043] After determining the partitioning and encryption strategies for data to be encrypted based on event-triggered conditions, these strategies need to be evaluated using reinforcement learning rules. Specifically, the partitioning and encryption strategies undergo a policy transformation process, converting the corresponding strategies into data structures that the reinforcement learning model can recognize and compute. Then, after trying the current partitioning or encryption strategy, the evaluation and scoring of various potential impacts, such as the overall data security performance, encryption efficiency, and the overall security of the business to which the data belongs, are conducted. This yields the metadata security probability value, the overall data security probability value, and the overall efficiency impact value after the specific strategy implementation. Based on these feedback values from the environment, the strategy is continuously adjusted to align these indicators towards the predetermined goal, ultimately determining a suitable comprehensive strategy. The "suitable comprehensive strategy" is mentioned here because it is difficult to determine the optimal strategy in theory and practice; generally, only a relatively optimized strategy can be determined based on the specific situation, and it is difficult to determine whether there are other strategies superior to the currently chosen one.
[0044] As mentioned here, in the encryption strategy, after implementing the specific encryption method according to the selected encryption strategy, the encrypted data can be cracked without a key to obtain the cracked plaintext data. Then, by comparing the difference between the cracked plaintext data and the original plaintext data, the security performance of the key used in the strategy is determined. The repetition probability between the two is an important criterion for determining the security of the key used in this strategy. The reinforcement learning rule changes the security strength of the key used in the specific strategy based on this repetition probability, making the repetition probability change in a downward direction. Other factors involved in the encryption strategy, such as encryption methods (e.g., block and sequence encryption) and key length, are also optimized through a similar process.
[0045] The beneficial effects of this invention are:
[0046] 1. The event-triggered reinforcement learning encryption method proposed in this invention strengthens the security constraints caused by changes in encryption policies by utilizing the event-triggered mechanism. By setting an event-triggered security judgment for policy changes before policy changes are made based on reinforcement learning rules, policies that do not meet the security requirements are directly excluded. This eliminates the need for reinforcement learning-based judgments for such policies, saving a significant amount of computation while enhancing the overall security of the data to be encrypted.
[0047] 2. In the reinforcement learning-based partitioning and encryption strategy for data to be encrypted in this invention, the input of the strategy in the reinforcement learning rules comprehensively utilizes the historical, current, and future predicted security performance requirements and environmental requirements of the data to be processed. The future predicted security performance requirements refer to the security requirements of the data within its specific business context, as the security requirements of the specific business to which the data belongs exhibit a type of security requirement that does not change frequently over time. This type of security requirement is also one of the most important factors constituting the data's own security requirements, thus providing predictability for the data's security requirements over a future period. Therefore, the input information for the reinforcement learning rules in this invention encompasses all data security requirements along the timeline.
[0048] 3. This invention innovatively proposes a reinforcement learning-based rule-based partitioning strategy for data. Considering that different partitioning methods can affect the security of encryption strategies—too fine a partitioning reduces encryption efficiency, while too coarse a partitioning reduces security—this invention proposes a reinforcement learning-based comprehensive approach to optimize the partitioning method by considering the balance between security and efficiency resulting from the partitioning of the same data to be encrypted.
[0049] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the technical principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. An event-triggered encryption method based on reinforcement learning, characterized in that, The method includes the following steps: The first step is to design a partitioning strategy based on the data to be encrypted and an event triggering threshold condition for the encryption strategy; The second step is to determine the metadata partitioning strategy for the data to be encrypted. Metadata refers to basic data units that use the same encryption method and encryption strength; The third step is to select an encryption strategy for the divided data to be encrypted. Step 4: Evaluation of event-triggered partitioning and encryption strategies; Step 5: Dividing the data to be encrypted and determining the encryption strategy based on reinforcement learning rules; in, In the fourth step, after the initial partitioning and encryption strategies are determined, the security and other performance of the partitioning and encryption strategies are judged based on the event triggering conditions after their implementation. This comprehensive decision determines whether the partitioning and encryption strategies can be implemented. The event triggering conditions are set by using the partitioning and encryption strategies as inputs and security indicators as the basis for judgment. The event triggering conditions are determined according to the input partitioning and encryption strategies. The division is determined based on a quantified value of the level of refinement for the plaintext division. For a fixed plaintext, the refinement is based on the current division value X. h And the value Y of the latest partition that has been executed h The ratio X h / Y h Quantization is performed; the maximum value for the partition is 1, and the minimum value is 0. Here, 1 and 0 represent a specific security strategy: a partition of 1 represents a strong security partition using one-time pads per character or bit, while a partition of 0 represents a weak security partition where the plaintext is treated as a whole. The event trigger condition for the partition is set to the ratio X. h / Y h Exceeding a certain number between [0,1] l That is, when X h / Y h < l When X is in a certain state, no updates are made to the current partition, and the partitioning is performed according to the latest partitioning that was previously executed; when X... h / Y h >= l When that happens, update and execute the current partitioning strategy.
2. The event-triggered encryption method based on reinforcement learning as described in claim 1, characterized in that, This method uses the characteristics of the data to be encrypted and the usage characteristics of the data in business as input feature data for learning; The characteristics of the data to be encrypted include: the structure type of the data or file, the business scope to which the data belongs, and the degree of relevance between the data and the business; the usage characteristics of the data to be encrypted in the business include: the business type to which the data belongs, the historical security policies used by the data, and the relationship between the data to be encrypted and different businesses.
3. The event-triggered encryption method based on reinforcement learning as described in claim 1, characterized in that, In the first step, specific implementation conditions are set for the partitioning strategy and encryption strategy of the data to be encrypted. The implementation conditions mentioned here are the event triggering threshold conditions. The event refers to the implementation action of partitioning behavior and encryption behavior. That is, the partitioning behavior or encryption behavior can only be implemented when the two specific actions meet their respective conditions. It is not simply based on the result obtained from reinforcement learning.
4. The event-triggered encryption method based on reinforcement learning as described in claim 3, characterized in that, The threshold conditions for event triggering are determined based on historical experience and the specific business requirements of the data to be encrypted. It is necessary to pre-determine the impact of this threshold on the overall security of the encryption system.
5. The event-triggered encryption method based on reinforcement learning as described in any one of claims 1-4, characterized in that, In the second step, the metadata segmentation of the data to be encrypted needs to consider the type of business to which the metadata currently belongs, the security policy of the business to which the metadata currently belongs, and the security requirements of the metadata itself. It also needs to refer to the historical segmentation information of the metadata. Based on the above information, a preliminary segmentation of the data to be encrypted is obtained.
6. The event-triggered encryption method based on reinforcement learning as described in claim 5, characterized in that, In the third step, after the data to be encrypted is divided, an encryption strategy is selected for the divided data and the encryption strategy. The selection of the encryption strategy is based on the historical encryption strategy and encryption strength of the data, the type of key used, and the specific business security policy requirements.
7. The event-triggered encryption method based on reinforcement learning as described in claim 6, characterized in that, The event triggering conditions for partitioning and encryption strategies are interdependent, while the decision to change the partitioning strategy and encryption strategy based on event triggering thresholds for the data to be encrypted is independent.
8. The event-triggered encryption method based on reinforcement learning as described in claim 6, characterized in that, The fifth step includes: After determining the partitioning and encryption strategies for data to be encrypted based on event-triggered conditions, the partitioning and encryption strategies need to be determined based on reinforcement learning rules. Specifically, the partitioning and encryption strategies need to go through certain strategy transformation steps to transform the corresponding strategies into data structures that the reinforcement learning model can recognize and compute. Then, after trying the implementation of the current partitioning or encryption strategy, the security performance, encryption efficiency, and overall security impact of the data on the business to which the data belongs are evaluated and scored. This yields the metadata security probability value, the overall data security probability value, and the overall efficiency impact value after the specific strategy is implemented. Then, based on the specific values fed back from these environments, the strategy is continuously changed to make the above indicators change towards the predetermined goal, and finally, a suitable comprehensive strategy is determined. For an encryption strategy, after implementing the specific encryption method according to the selected encryption strategy, the encrypted data is cracked without a key to obtain the cracked plaintext data. Then, the security performance of the key used in the strategy is determined by comparing the difference between the cracked plaintext data and the original plaintext data. The repetition probability between the two is an important criterion for determining the security of the key used in this strategy. The reinforcement learning rule changes the security strength of the key used in the specific strategy based on this repetition probability, so that the repetition probability changes in the direction of decreasing.
Citation Information
Patent Citations
Data transmission information security management method and system based on Internet of Things
CN117914481A
Safety detection system, method and equipment for government affair industry large model and medium
CN118862063A