Key acquisition method and related equipment
By obtaining the current environment feature data and verifying it using the data feature loss model, the problem of low security of static keys is solved, and the security and management efficiency of dynamic key acquisition are improved.
Patent Information
- Application Number
- CN202411866092.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-09-02
- Estimated Expiration
- 2044-12-18
AI Technical Summary
In the prior art, the key acquisition device generates a static key and reads it directly after obtaining a user request, which is less secure.
By obtaining the current key request, in response to the current key request, the first feature data corresponding to the current environment is obtained, multiple segments of target password data are loaded from memory, the second feature data is determined, and the loss result of the feature data is calculated based on the preset data feature loss model. If it is less than or equal to the preset threshold, the target key data is obtained from the target password data.
It improves the security of the key acquisition process, and through dynamic verification of environmental characteristics, it enhances the security and management efficiency of the key.
Smart Images

Figure CN119324782B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information security technology, and in particular to a key acquisition method and related equipment. Background Art
[0002] With the rapid development of science and technology, in order to ensure information security, information needs to be encrypted and identity authenticated. As a result, key security management is becoming increasingly important.
[0003] In related technologies, key acquisition devices generate and store keys. When receiving a key acquisition instruction, they only need to perform a simple verification to obtain the key. In the actual key acquisition process, the key acquisition device generates a static key and directly reads it after receiving a user request, which is less secure.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a key acquisition method and related equipment, aiming to solve the technical problem that the key acquisition device generates a static key and directly reads it after receiving a user request, which has low security.
[0006] To achieve the above objectives, the present application proposes a key acquisition method, which includes:
[0007] Obtaining a current key request, and in response to the current key request, obtaining first feature data corresponding to a current environment;
[0008] Loading multiple segments of target cryptographic data corresponding to the key from a memory, and determining second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data;
[0009] Obtaining data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model;
[0010] If the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
[0011] In one embodiment, before the step of loading the multiple segments of target cryptographic data corresponding to the key from the memory, the method further includes:
[0012] receiving a password generation instruction, and acquiring second characteristic data corresponding to the environmental information in response to the password generation instruction;
[0013] Based on the second characteristic data, generating initial password data using a preset password generation algorithm, wherein the initial password data includes the target key data and the second characteristic data;
[0014] The initial password data is segmented to obtain multiple segments of target password data, and the target password data are randomly stored in different memories.
[0015] In one embodiment, the step of loading multiple segments of target cryptographic data corresponding to the key from the memory and determining the second characteristic data in the multiple segments of target cryptographic data further includes:
[0016] Loading multiple sets of target cryptographic data corresponding to the key from the memory;
[0017] Based on a preset data matching algorithm, the correlation between the two sets of target password data is obtained;
[0018] The two sets of target password data with the greatest correlation are spliced to obtain initial password data, and characteristic information in the initial password data is determined.
[0019] In one embodiment, if the data feature loss result is less than or equal to a preset loss threshold, the step of obtaining target key data from the multiple segments of target cryptographic data further includes:
[0020] If the data feature loss result is less than or equal to a preset loss threshold, obtaining target key data from the target cryptographic data;
[0021] If the data feature loss result is greater than a preset loss threshold, the current access permission is obtained; if the current access permission is to allow access, the key data is obtained from the target password data.
[0022] In one embodiment, after the step of obtaining target key data from the multiple segments of target cryptographic data, the method further includes:
[0023] Obtaining historical key request instructions, and determining a usage frequency of a key based on the current key request instruction and the historical key request instructions;
[0024] Determining a key update time based on the usage frequency and a preset number of key usages;
[0025] Based on the key update time, new target cryptographic data is generated, and the target cryptographic data is replaced with the new target cryptographic data.
[0026] In one embodiment, before the step of based on the environmental information data, the feature information data and the preset data feature loss model, the method further includes:
[0027] Obtaining a current data feature loss model, first sample data, and second sample data, wherein the data feature loss results of the first sample data and the second sample data are the first data feature loss results;
[0028] Obtaining second data feature loss results for the first sample data and the second sample data based on a current data feature loss model, the first sample data, and the second sample data;
[0029] Calculating the first data feature loss result and the second data feature loss result to obtain a loss difference;
[0030] If the loss difference is greater than a preset loss difference, adjusting the parameters of the current data feature loss model and recording the number of adjustments;
[0031] Based on the adjusted current data feature loss model, return to the step of obtaining the second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data and the second sample data, until the loss difference is less than or equal to the preset loss difference, or the number of adjustments is equal to the preset number of adjustments, and set the current data feature loss model corresponding to the minimum loss difference as the preset data feature loss model.
[0032] In addition, to achieve the above-mentioned purpose, the present application also proposes a key acquisition device, which includes:
[0033] an acquisition instruction module, the acquisition instruction module being configured to acquire a current key request, and in response to the current key request, acquire first characteristic data corresponding to a current environment;
[0034] a determination module, the determination module being configured to load multiple segments of target cryptographic data corresponding to the key from a memory and determine second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data;
[0035] a calculation module, configured to obtain data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model;
[0036] A key acquisition module is used to acquire target key data from the multiple segments of target password data if the data feature loss result is less than or equal to a preset loss threshold.
[0037] In one embodiment, the determining module includes:
[0038] a receiving unit, configured to receive a password generation instruction, and acquire second characteristic data corresponding to the environmental information in response to the password generation instruction;
[0039] a generating unit, configured to generate initial password data based on the second characteristic data using a preset password generation algorithm, wherein the initial password data includes target key data and the second characteristic data;
[0040] The segmentation unit is used to segment the initial password data to obtain multiple segments of target password data, and randomly store the target password data in different memories.
[0041] In one embodiment, the determining module further includes:
[0042] The loading unit loads multiple groups of target cryptographic data corresponding to the key from the memory;
[0043] A first obtaining unit, configured to obtain the correlation between the two sets of target password data based on a preset data matching relationship algorithm;
[0044] The splicing unit is used to splice the two groups of target password data with the greatest correlation to obtain initial password data and determine feature information in the initial password data.
[0045] In one embodiment, the key acquisition module includes:
[0046] a second obtaining unit, configured to obtain target key data from the target cryptographic data if the data feature loss result is less than or equal to a preset loss threshold;
[0047] The third acquisition unit is used to obtain the current access permission if the data feature loss result is greater than a preset loss threshold, and to obtain the key data from the target password data if the current access permission is to allow access.
[0048] In one embodiment, the key acquisition module further includes:
[0049] a first determining unit, configured to obtain a historical key request instruction, and determine a usage frequency of a key based on the current key request instruction and the historical key request instructions;
[0050] a second determining unit, configured to determine a key update time based on the usage frequency and a preset number of key usage times;
[0051] The replacing unit is configured to generate new target cryptographic data based on the key update time, and replace the target cryptographic data with the new target cryptographic data.
[0052] In one embodiment, the calculation module includes:
[0053] a fourth acquiring unit, configured to acquire a current data feature loss model, first sample data, and second sample data, wherein data feature loss results of the first sample data and the second sample data are first data feature loss results;
[0054] a fifth acquiring unit, configured to acquire a second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data, and the second sample data;
[0055] a calculation unit, configured to calculate the loss result of the first data feature and the loss result of the second data feature to obtain a loss difference;
[0056] a judgment unit, configured to adjust the parameters of the current data feature loss model if the loss difference is greater than a preset loss difference, and record the number of adjustments;
[0057] A training unit is used to return to the step of obtaining the second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data and the second sample data, based on the adjusted current data feature loss model, until the loss difference is less than or equal to the preset loss difference, or the number of adjustments is equal to the preset number of adjustments, and set the current data feature loss model corresponding to the minimum loss difference as the preset data feature loss model.
[0058] In addition, to achieve the above-mentioned purpose, the present application also proposes a key acquisition device, which includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program is configured to implement the steps of the key acquisition method described above.
[0059] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium. A computer program is stored on the storage medium, and when the computer program is executed by the processor, the steps of the key acquisition method described above are implemented.
[0060] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the key acquisition method described above.
[0061] One or more technical solutions proposed in this application have at least the following technical effects:
[0062] The present application proposes a key acquisition method and related equipment. In the related art, the key acquisition device generates a static key and reads it directly after obtaining a user request, which has low security. In the present application, first, a current key request is obtained, and in response to the current key request, first feature data corresponding to the current environment is obtained. Then, multiple segments of target password data corresponding to the key are loaded from the memory, and second feature data in the multiple segments of target password data are determined, wherein the target password data includes second feature data and target key data. Furthermore, based on the first feature data, the second feature data and a preset data feature loss model, a data feature loss result of the first feature data and the second feature data is obtained, wherein the preset data feature loss model is a trained data feature loss model. Finally, if the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
[0063] It can be understood that the key acquisition device obtains the environmental characteristics when the key request is made, and performs dynamic verification based on the environmental characteristics, thereby effectively improving the security of the key. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0065] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0066] Figure 1 A flowchart of the first embodiment of the key acquisition method of this application is provided;
[0067] Figure 2 A flowchart of the second embodiment of the key acquisition method of this application is provided;
[0068] Figure 3 A flowchart of the third embodiment of the key acquisition method of this application is provided;
[0069] Figure 4 This is a schematic diagram of the module structure of the key acquisition device according to an embodiment of the present application;
[0070] Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the key acquisition method in the embodiment of the present application.
[0071] The purpose, features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0072] It should be understood that the specific embodiments described herein are merely used to explain the technical solutions of the present application and are not intended to limit the present application.
[0073] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0074] The main solutions of the embodiments of this application are:
[0075] In this embodiment, for ease of description, the key acquisition device is used as the execution subject for explanation below.
[0076] Since the key acquisition device in the prior art generates a static key and directly reads it after receiving a user request, the security is low.
[0077] The present application provides a solution that obtains a current key request, obtains first characteristic data corresponding to the current environment in response to the current key request, loads multiple segments of target password data corresponding to the key from memory, and determines second characteristic data in the multiple segments of target password data. Based on the first characteristic data, the second characteristic data, and a preset data characteristic loss model, the data characteristic loss result of the first characteristic data and the second characteristic data is obtained. If the data characteristic loss result is less than or equal to a preset loss threshold, the target key data is obtained from the multiple segments of target password data. The present application generates dynamic password data with characteristic data through environmental characteristics, verifies the environmental characteristics, and confirms the key reading permission, effectively improving the key security.
[0078] It should be noted that the execution subject of this embodiment may be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, mobile phone, etc., or an electronic device capable of performing the above functions, a key acquisition device, etc. The following describes this embodiment and the following embodiments using a key acquisition device as an example.
[0079] Based on this, the embodiment of the present application provides a key acquisition method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the key acquisition method of this application.
[0080] In this embodiment, the key acquisition method includes steps S10 to S40:
[0081] Step S10, obtaining a current key request, and in response to the current key request, obtaining first feature data corresponding to the current environment;
[0082] It should be noted that a request to obtain the current key refers to a request received by the key acquisition device to obtain the currently required key. This key may be used for encrypted communication, access control, data verification, or other security operations that require a key.
[0083] After receiving a key request, the key acquisition device processes and responds to the request. This response may include verifying the legitimacy of the request, checking the identity and authority of the requester, and preparing the corresponding key.
[0084] While responding to the key request or afterward, the key acquisition device collects characteristic data related to the current environment. The "first characteristic data" here may refer to basic information related to the state, conditions, or attributes of the environment, such as location, network status, etc.
[0085] It should be noted that the characteristic data related to the current environment also includes user characteristic data, such as user fingerprints, the frequency of user button clicks, etc.
[0086] In this embodiment, specific application scenarios may be:
[0087] In an environment where a key is required for operational security, a key acquisition device detects a user clicking a "Get Key" button. This means the device receives a key request, verifies and responds to the request, and finally collects data related to the current state of the environment for further processing or analysis. This process is particularly important in areas such as the Internet of Things (IoT), smart homes, and security monitoring, where devices and systems need to dynamically adjust their operations and responses based on environmental changes.
[0088] Step S20, loading multiple segments of target cryptographic data corresponding to the key from the memory, and determining second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data;
[0089] First, the key acquisition device extracts the cryptographic data associated with a specific key from memory. This data may be segmented into multiple parts, each containing a portion of the key or related encrypted information. This segmentation may be done to improve processing efficiency, security, or to meet specific data management requirements.
[0090] Within this fragmented cryptographic data, the key acquisition device needs to identify and determine specific "second characteristic data." This "second characteristic data" may refer to other important information besides the key itself, such as the type of encryption algorithm, key usage conditions, frequency of use, usage habits, biometrics, and key validity period. This information is crucial for key management and use.
[0091] It can be understood that the target cryptographic data includes second characteristic data and target key data, which means that when processing encrypted data, we should not only pay attention to the key itself, but also to other characteristic data related to the key. These data together constitute a complete encryption information framework to ensure the security and correct use of the data.
[0092] The entire process involves extracting and processing encrypted data from memory, identifying key characteristic information, and ensuring the integrity and security of this information. This is very important for maintaining system security and data integrity, especially in environments that require high confidentiality and security.
[0093] Specifically, the step of loading multiple segments of target cryptographic data corresponding to the key from the memory and determining the second characteristic data in the multiple segments of target cryptographic data further includes steps S21 to S23:
[0094] Step S21, loading multiple sets of target cryptographic data corresponding to the key from the memory;
[0095] Step S22, obtaining the correlation between the two sets of target password data based on a preset data matching relationship algorithm;
[0096] It should be noted that a pre-defined data matching algorithm is used to identify and analyze matching relationships or similarities between two sets of data. This algorithm may be based on statistics, pattern recognition, machine learning, or deep learning techniques, and aims to discover potential association rules or patterns in the data.
[0097] It is understood that by applying a preset data matching algorithm, the key acquisition device can evaluate the correlation between the two sets of password data. This correlation may manifest as similarity in password patterns, consistency in encryption techniques, or commonality in usage conditions. The correlation analysis results can help identify potential security risks, optimize password management strategies, or enhance security measures.
[0098] Step S23: concatenate the two sets of target password data with the greatest correlation to obtain initial password data, and determine characteristic information in the initial password data.
[0099] It is understood that, based on the aforementioned preset data matching algorithm, the key acquisition device has identified the greatest correlation between the two sets of target password data. This means that the two sets of data have the strongest similarity or connection in certain aspects (such as pattern, structure, encryption algorithm, etc.).
[0100] Next, the key acquisition device concatenates the two sets of data, merging them into a single, continuous data set. This concatenation may be based on specific rules or algorithms to ensure that the merged data retains its original meaning and structure.
[0101] The result of the splicing is called the "initial password data." This initial password data set contains all the information from both sets of target password data, providing a complete data foundation for further analysis and processing.
[0102] After obtaining the initial password data, the key acquisition device needs to identify and extract the characteristic information contained therein. Characteristic information refers to key information that can represent or describe the characteristics of the password data, such as the password length, the character set used, the type of encryption algorithm, and the length of the key.
[0103] It is understandable that determining these characteristic information is crucial for understanding the structure and characteristics of password data, which can be used for further security analysis, password cracking attempts, security policy formulation, or password strength assessment.
[0104] The entire process involves data matching, splicing, and feature extraction, aiming to extract valuable information from multiple password datasets and provide support for security analysis and decision-making.
[0105] Step S30: obtaining data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model;
[0106] It should be noted that the first feature data and the second feature data respectively represent data features collected from different environments or conditions. They can be sensor readings, statistical data, user behavior data, etc., which are used for further analysis and comparison.
[0107] In addition, a pre-defined and trained data feature loss model is used to measure and quantify the difference between two sets of feature data. This model is called a "data feature loss model" because it focuses on evaluating the loss or change of data features.
[0108] In this example, the data feature loss model used is trained, meaning it has learned how to identify and quantify the differences between feature data using a large amount of data. This allows the model to more accurately estimate the feature loss between new datasets.
[0109] It is understood that based on the preset data feature loss model, the key acquisition device can calculate the difference between the first feature data and the second feature data. This difference is called the "data feature loss result." This result may be a single value or a set of values, indicating the similarity or difference between the two sets of data at the feature level.
[0110] Step S40: If the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
[0111] It should be noted that the preset loss threshold is a pre-set threshold used to determine whether the data feature loss result is within an acceptable range.
[0112] In addition, it should be noted that the target key data is the key used to decrypt data and is key information in cryptography.
[0113] In this embodiment, if the data feature loss result calculated by the preset data feature loss model is less than or equal to the preset loss threshold, then the currently attempted key can be considered correct or valid. In this case, the algorithm will extract the target key data from the multiple target password data segments, that is, find the correct key.
[0114] This method is often used for password cracking or verification, especially in some attack scenarios in cryptography, such as differential attacks and side channel attacks, to try to crack the password by comparing expected and actual data features.
[0115] Specifically, if the data feature loss result is less than or equal to a preset loss threshold, the step of obtaining target key data from the multiple segments of target password data further includes steps S41-S42:
[0116] Step S41, if the data feature loss result is less than or equal to a preset loss threshold, obtaining target key data from the target password data;
[0117] Step S42: If the data feature loss result is greater than a preset loss threshold, the current access permission is obtained; if the current access permission is to allow access, the key data is obtained from the target password data.
[0118] It is understandable that when the data feature loss result is greater than the preset loss threshold, the key acquisition device will check the access rights of the current user. Access rights are the ability of a user to be authorized to perform specific operations in the system. If the check result shows that the current user has the permission to access, the key acquisition device will further process the request. At the same time, the key acquisition device will adjust the second feature data and the preset loss threshold based on the current user's access rights, so that the feature loss result corresponding to the adjusted second feature data is less than or equal to the adjusted preset loss threshold, that is, the current user's access rights are also incorporated into the second feature data. The next time the user accesses the key, the adjusted second feature data can be referred to, which increases the probability of obtaining the key, reduces the number of searches for the current user's access rights, and improves efficiency.
[0119] For example, if it detects that an account is logged in from a different location, the key acquisition device will send a text message to the staff, who will then confirm whether to allow the login. If the key acquisition device detects that the staff clicks the "Allow" button, the current access permission will be set to Allow access.
[0120] If the key acquisition device detects that the staff member clicks the "Do Not Allow" button, it will set the current access permission to "Do Not Allow Access" and record the login information and save it to the exception log. The exception log can be used to adjust the access permission later.
[0121] Specifically, after the step of obtaining target key data from the multiple segments of target password data, steps S43 to S45 are further included:
[0122] Step S43, obtaining historical key request instructions, and determining the usage frequency of the key based on the current key request instruction and the historical key request instructions;
[0123] It should be noted that obtaining historical key request instructions means that the key acquisition device collects and stores records of past user key requests. These records are called "historical key request instructions" and contain detailed information about user key access requests at different points in time.
[0124] It should also be noted that the current key request instruction refers to the instruction currently issued by the user to request a key. The key acquisition device will compare this current request with the requests in the history.
[0125] By comparing current requests with historical requests, the key acquisition device can analyze how often a specific key is requested. Frequency of use refers to the number of times a key is requested within a certain period of time.
[0126] Understandably, this type of analysis is crucial for security management, as it helps identify which keys are critical or frequently used, allowing for stricter security measures to be implemented for these keys, such as more frequent rotation, more complex encryption algorithms, or higher levels of access control. It can also help identify possible abnormal behavior, such as a sudden increase in the frequency of requests for a particular key, which could signal a security threat.
[0127] Step S44, determining a key update time based on the usage frequency and a preset key usage count;
[0128] It should be noted that usage frequency refers to the number of times a key is used within a certain period of time. This frequency can be the number of times a key is used per minute, hour, day, or any other time unit.
[0129] Additionally, the preset key usage count is a threshold pre-set in a security policy, which is used to define the maximum number of times a key can be used before it is considered "outdated" or "no longer secure."
[0130] In this embodiment, the specific steps include:
[0131] First, the key acquisition device continuously monitors the usage of each key and records its usage frequency. Then, the key acquisition device compares the usage frequency of each key with the preset usage count.
[0132] Furthermore, if the key usage frequency approaches or reaches a preset number of times, the key acquisition device will calculate when the key should be updated. This may be immediately or at some point in the future, depending on the security policy.
[0133] It is understandable that once the key is used a preset number of times, the key acquisition device may automatically generate a new key and replace the old key to ensure data security.
[0134] When the key needs to be updated, the key acquisition device will automatically update the key.
[0135] Step S45: Generate new target password data based on the key update time, and use the new target password data to replace the target password data.
[0136] The present application proposes a key acquisition method and related equipment. In the related art, the key acquisition device generates a static key and reads it directly after obtaining a user request, which has low security. In the present application, first, a current key request is obtained, and in response to the current key request, first feature data corresponding to the current environment is obtained. Then, multiple segments of target password data corresponding to the key are loaded from the memory, and second feature data in the multiple segments of target password data are determined, wherein the target password data includes second feature data and target key data. Furthermore, based on the first feature data, the second feature data and a preset data feature loss model, a data feature loss result of the first feature data and the second feature data is obtained, wherein the preset data feature loss model is a trained data feature loss model. Finally, if the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
[0137] It can be understood that the key acquisition device obtains the environmental characteristics when the key request is made, and performs dynamic verification based on the environmental characteristics, thereby effectively improving the security of the key.
[0138] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above embodiment 1 can be referred to the above introduction and will not be described in detail later. Figure 2 Before step S20, the key acquisition method further includes steps A201 to S203:
[0139] Step A201: receiving a password generation instruction, and acquiring second feature data corresponding to environmental information in response to the password generation instruction;
[0140] It is understood that the key acquisition device receives an explicit instruction to generate a new password, which may come from the user, another system, or an automated security policy.
[0141] After receiving the password generation instruction, the key acquisition device will perform corresponding operations in response to the instruction. This may include starting the password generation algorithm and preparing the resources and environment required for password generation.
[0142] During the password generation process, the key acquisition device collects characteristic data related to the current environment, which is referred to as "secondary characteristic data." This data may include, but is not limited to: the exact time the password was generated, the geographic location at the time the password was generated, the type of device generating the password, its operating system, hardware configuration, and the user's behavior before and after password generation, such as keyboard input speed, mouse movement patterns, network connection stability and speed, IP address, system load, memory usage, and CPU usage.
[0143] This environmental characteristic data is used to enhance the complexity and security of passwords. For example, key acquisition devices use this data as a random number seed or combine it with password generation algorithms to ensure that the generated passwords are more random and unique.
[0144] Step A202: Based on the second characteristic data, generate initial password data using a preset password generation algorithm, wherein the initial password data includes the target key data and the second characteristic data;
[0145] Step A203, segmenting the initial password data to obtain multiple segments of target password data, and randomly storing the target password data in different memories.
[0146] As you can understand, a complete cryptographic data (which could be a password, key, encrypted data, etc.) is segmented into multiple parts. This is done to increase data security, as even if a portion is leaked or stolen, an attacker cannot obtain the complete cryptographic data. After segmentation, the original cryptographic data is converted into multiple smaller data segments, each containing a portion of the original data. These data segments are referred to as "target cryptographic data."
[0147] These data segments are then randomly stored in different memory locations on the computer. This random storage is intended to further increase security, because even if an attacker is able to access part of the memory, it will be difficult for them to predict and find the exact location of all stored password data.
[0148] It should be noted that different memories refer to different areas of physical memory, or different parts of virtual memory, or even different storage devices (such as hard disks, SSDs, memory sticks, etc.).
[0149] By segmenting and storing password data in random order, data security can be improved. This approach prevents a single attack point from leaking the entire password data and makes it more difficult for attackers to obtain the complete data.
[0150] In this embodiment, by combining environmental feature data, the password generation process can become more secure because even if the password generation algorithm is cracked, it is difficult for an attacker to copy or predict the generated password without the corresponding environmental feature data.
[0151] Based on the first and second embodiments of the present application, in the third embodiment of the present application, the same or similar contents as those of the first and second embodiments can be referred to above and will not be described in detail. Figure 3 Before step S30, the key acquisition method further includes steps A301 to S305:
[0152] Step A301: Obtain a current data feature loss model, first sample data, and second sample data, wherein the data feature loss results of the first sample data and the second sample data are the first data feature loss results;
[0153] Step A302: obtaining second data feature loss results of the first sample data and the second sample data based on the current data feature loss model, the first sample data, and the second sample data;
[0154] Step A303: Calculate the first data feature loss result and the second data feature loss result to obtain a loss difference;
[0155] Step A304: If the loss difference is greater than a preset loss difference, adjust the parameters of the current data feature loss model and record the number of adjustments;
[0156] It is understood that the loss difference is compared with a preset loss difference to determine whether they are the same or similar.
[0157] It is understandable that the purpose of adjusting parameters is to improve the accuracy, consistency, and generalization ability of the model, ensuring that the model can produce stable and reliable output when faced with the same input. By adjusting parameters, the performance of the model can be optimized to make it better suited to a specific task or dataset.
[0158] This process is usually iterative, requiring multiple comparisons of inference results and parameter adjustments until the model performs at a satisfactory level.
[0159] Step A305, based on the adjusted current data feature loss model, returns to the step of obtaining the second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data and the second sample data, until the loss difference is less than or equal to the preset loss difference, or the number of adjustments is equal to the preset number of adjustments, and sets the current data feature loss model corresponding to the minimum loss difference as the preset data feature loss model.
[0160] The adjusted model is used to process the sample data to generate the second data feature loss result. This step is repeated until the model output meets the specific conditions.
[0161] This process continues until the loss difference is less than or equal to the preset loss difference, which means that the model has achieved consistency during the processing and produces the same output for the same input.
[0162] It is understood that once the loss difference is less than or equal to or greater than the preset loss difference, it indicates that the model has been adjusted to an ideal state. This model is called the "preset data feature loss model." This "preset data feature loss model" is optimized and can stably process sample data and produce consistent results.
[0163] In this embodiment, continuous adjustment and testing are performed to ensure that the data feature loss model can produce consistent and reliable second data feature loss results when processing sample data. This process is crucial for improving the stability and reliability of the model, especially in application scenarios that require highly consistent model output.
[0164] It should be noted that the above examples are only used to understand this application and do not constitute a limitation on the key acquisition method of this application. More simple transformations based on this technical concept are all within the scope of protection of this application.
[0165] This application also provides a key acquisition device, please refer to Figure 4 , the key acquisition device includes:
[0166] An acquisition instruction module 10 is configured to acquire a current key request and, in response to the current key request, acquire first characteristic data corresponding to a current environment;
[0167] a determination module 20 configured to load multiple segments of target cryptographic data corresponding to the key from a memory and determine second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data;
[0168] A calculation module 30 is configured to obtain a data feature loss result of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model;
[0169] The key acquisition module 40 is used to acquire target key data from the multiple segments of target cryptographic data if the data feature loss result is less than or equal to a preset loss threshold.
[0170] In one embodiment, the determining module includes:
[0171] a receiving unit, configured to receive a password generation instruction, and acquire second characteristic data corresponding to the environmental information in response to the password generation instruction;
[0172] a generating unit, configured to generate initial password data based on the second characteristic data using a preset password generation algorithm, wherein the initial password data includes target key data and the second characteristic data;
[0173] The segmentation unit is used to segment the initial password data to obtain multiple segments of target password data, and randomly store the target password data in different memories.
[0174] In one embodiment, the determining module further includes:
[0175] The loading unit loads multiple groups of target cryptographic data corresponding to the key from the memory;
[0176] A first obtaining unit, configured to obtain the correlation between the two sets of target password data based on a preset data matching relationship algorithm;
[0177] The splicing unit is used to splice the two groups of target password data with the greatest correlation to obtain initial password data and determine feature information in the initial password data.
[0178] In one embodiment, the key acquisition module includes:
[0179] a second obtaining unit, configured to obtain target key data from the target cryptographic data if the data feature loss result is less than or equal to a preset loss threshold;
[0180] The third acquisition unit is used to obtain the current access permission if the data feature loss result is greater than a preset loss threshold, and to obtain the key data from the target password data if the current access permission is to allow access.
[0181] In one embodiment, the key acquisition module further includes:
[0182] a first determining unit, configured to obtain a historical key request instruction, and determine a usage frequency of a key based on the current key request instruction and the historical key request instructions;
[0183] a second determining unit, configured to determine a key update time based on the usage frequency and a preset number of key usage times;
[0184] The replacing unit is configured to generate new target cryptographic data based on the key update time, and replace the target cryptographic data with the new target cryptographic data.
[0185] In one embodiment, the calculation module includes:
[0186] a fourth acquiring unit, configured to acquire a current data feature loss model, first sample data, and second sample data, wherein data feature loss results of the first sample data and the second sample data are first data feature loss results;
[0187] a fifth acquiring unit, configured to acquire a second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data, and the second sample data;
[0188] a calculation unit, configured to calculate the loss result of the first data feature and the loss result of the second data feature to obtain a loss difference;
[0189] a judgment unit, configured to adjust the parameters of the current data feature loss model if the loss difference is greater than a preset loss difference, and record the number of adjustments;
[0190] A training unit is used to return to the step of obtaining the second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data and the second sample data, based on the adjusted current data feature loss model, until the loss difference is less than or equal to the preset loss difference, or the number of adjustments is equal to the preset number of adjustments, and set the current data feature loss model corresponding to the minimum loss difference as the preset data feature loss model.
[0191] The key acquisition device provided in this application utilizes the key acquisition method described in the aforementioned embodiments to address the technical issues surrounding key acquisition. Compared to the prior art, the key acquisition device provided in this application achieves the same beneficial effects as the key acquisition method described in the aforementioned embodiments. Other technical features of the key acquisition device are the same as those disclosed in the aforementioned embodiments and are not further detailed here.
[0192] The present application provides a key acquisition device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the key acquisition method in the above-mentioned embodiment one.
[0193] Reference below Figure 5, which shows a schematic diagram of the structure of a key acquisition device suitable for implementing embodiments of the present application. The key acquisition device in the embodiments of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 5 The key acquisition device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0194] like Figure 5 As shown, the key acquisition device may include a processing device 1001 (e.g., a central processing unit, graphics processing unit, etc.), which can perform various appropriate actions and processes based on programs stored in a read-only memory (ROM) 1002 or programs loaded from a storage device 1003 into a random access memory (RAM) 1004. RAM 1004 also stores various programs and data required for the operation of the key acquisition device. Processing device 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems may be connected to I / O interface 1006: input devices 1007, such as a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008, such as a liquid crystal display (LCD), speaker, vibrator, etc.; storage device 1003, such as a magnetic tape or hard disk; and communication device 1009. The communication device 1009 can allow the key acquisition device to communicate with other devices wirelessly or wired to exchange data. Although the figure shows a key acquisition device with various systems, it should be understood that it is not required to implement or have all of the systems shown. More or fewer systems can be implemented or provided instead.
[0195] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0196] The key acquisition device provided in this application utilizes the key acquisition method described in the aforementioned embodiment to resolve the technical problem of key acquisition. Compared to the prior art, the key acquisition device provided in this application achieves the same beneficial effects as the key acquisition method described in the aforementioned embodiment. Other technical features of the key acquisition device are the same as those disclosed in the aforementioned embodiment and are not further elaborated here.
[0197] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0198] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
[0199] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, a computer program) stored thereon, and the computer-readable program instructions are used to execute the key acquisition method in the above embodiment.
[0200] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0201] The computer-readable storage medium may be included in the key acquisition device, or may exist independently without being assembled into the key acquisition device.
[0202] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the key acquisition device, the key acquisition device:
[0203] Obtaining a current key request, and in response to the current key request, obtaining first feature data corresponding to a current environment;
[0204] Loading multiple segments of target cryptographic data corresponding to the key from a memory, and determining second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data;
[0205] Obtaining data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model;
[0206] If the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
[0207] Computer program code for performing the operations of the present application may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0208] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flow chart or block diagram can represent a module, program segment or a part of code, and the module, program segment or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions.
[0209] The modules described in the embodiments of the present application may be implemented in software or hardware, wherein the name of a module does not necessarily limit the unit itself.
[0210] The computer-readable storage medium provided in this application stores computer-readable program instructions (i.e., a computer program) for executing the aforementioned key acquisition method, thereby resolving the technical problem of key acquisition. Compared to the prior art, the beneficial effects of the computer-readable storage medium provided in this application are similar to those of the key acquisition method provided in the aforementioned embodiments, and are not further elaborated here.
[0211] The present application also provides a computer program product, including a computer program, which implements the steps of the key acquisition method as described above when executed by a processor.
[0212] The computer program product provided in this application can solve the technical problem of key acquisition. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as the beneficial effects of the key acquisition method provided in the above embodiment, which will not be repeated here.
[0213] The above description is only part of the embodiments of the present application and does not limit the patent scope of the present application. All equivalent structural transformations made by using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect application in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A key acquisition method, characterized in that: The key acquisition method includes: Obtaining a current key request, and in response to the current key request, obtaining first feature data corresponding to a current environment; Loading multiple segments of target cryptographic data corresponding to the key from a memory, and determining second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data, and the second characteristic data is automatically updated as the target cryptographic data is updated; Obtaining data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model; If the data feature loss result is less than or equal to a preset loss threshold, target key data is obtained from the multiple segments of target password data.
2. The key acquisition method according to claim 1, wherein: Before the step of loading the multiple segments of target cryptographic data corresponding to the key from the memory, the method further includes: receiving a password generation instruction, and acquiring second characteristic data corresponding to the environmental information in response to the password generation instruction; Based on the second characteristic data, generating initial password data using a preset password generation algorithm, wherein the initial password data includes the target key data and the second characteristic data; The initial password data is segmented to obtain multiple segments of target password data, and the target password data are randomly stored in different memories.
3. The key acquisition method according to claim 1, wherein: The step of loading multiple segments of target cryptographic data corresponding to the key from the memory and determining the second characteristic data in the multiple segments of target cryptographic data further includes: Loading multiple sets of target cryptographic data corresponding to the key from the memory; Based on a preset data matching algorithm, the correlation between the two sets of target password data is obtained; The two sets of target password data with the greatest correlation are spliced to obtain initial password data, and characteristic information in the initial password data is determined.
4. The key acquisition method according to claim 1, wherein: If the data feature loss result is less than or equal to a preset loss threshold, the step of obtaining target key data from the multiple segments of target password data further includes: If the data feature loss result is less than or equal to a preset loss threshold, obtaining target key data from the target cryptographic data; If the data feature loss result is greater than a preset loss threshold, the current access permission is obtained; if the current access permission is to allow access, the key data is obtained from the target password data.
5. The key acquisition method according to claim 1, wherein: After the step of obtaining target key data from the multiple segments of target password data, the method further includes: Obtaining historical key request instructions, and determining a key usage frequency based on the current key request and the historical key request instructions; Determining a key update time based on the usage frequency and a preset number of key usages; Based on the key update time, new target cryptographic data is generated, and the target cryptographic data is replaced with the new target cryptographic data.
6. The key acquisition method according to claim 1, wherein: Before the step of based on the first feature data, the second feature data and the preset data feature loss model, the method further includes: Obtaining a current data feature loss model, first sample data, and second sample data, wherein the data feature loss results of the first sample data and the second sample data are the first data feature loss results; Obtaining second data feature loss results for the first sample data and the second sample data based on a current data feature loss model, the first sample data, and the second sample data; Calculating the first data feature loss result and the second data feature loss result to obtain a loss difference; If the loss difference is greater than a preset loss difference, adjusting the parameters of the current data feature loss model and recording the number of adjustments; Based on the adjusted current data feature loss model, return to the step of obtaining the second data feature loss result of the first sample data and the second sample data based on the current data feature loss model, the first sample data and the second sample data, until the loss difference is less than or equal to the preset loss difference, or the number of adjustments is equal to the preset number of adjustments, and set the current data feature loss model corresponding to the minimum loss difference as the preset data feature loss model.
7. A key acquisition device, characterized in that: The key acquisition device includes: an acquisition instruction module, the acquisition instruction module being configured to acquire a current key request, and in response to the current key request, acquire first characteristic data corresponding to a current environment; a determination module, the determination module being configured to load multiple segments of target cryptographic data corresponding to the key from a memory and determine second characteristic data in the multiple segments of target cryptographic data, wherein the target cryptographic data includes the second characteristic data and target key data, and the second characteristic data is automatically updated as the target cryptographic data is updated; a calculation module, configured to obtain data feature loss results of the first feature data and the second feature data based on the first feature data, the second feature data, and a preset data feature loss model, wherein the preset data feature loss model is a trained data feature loss model; A key acquisition module is used to acquire target key data from the multiple segments of target password data if the data feature loss result is less than or equal to a preset loss threshold.
8. A key acquisition device, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the key acquisition method according to any one of claims 1 to 6.
9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the key acquisition method according to any one of claims 1 to 6 are implemented.
10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the key acquisition method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Password processing method and device, computer equipment and storage medium
CN114239000A
Remote access data processing method and device, equipment and storage medium
CN117371048A
File security management method and system, electronic equipment, medium and program product
CN119011244A