Method and device for realizing cloud password service resource pool
By constructing a classification model and objective function to optimize the resource allocation of the cloud cryptography service resource pool, the problem of resource imbalance is solved, the dynamic balance of resources and the stability of the system are achieved, and the reliability of the cloud cryptography service is improved.
Patent Information
- Application Number
- CN202510591237.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-08
- Publication Date
- 2025-09-12
AI Technical Summary
There is an imbalance in resource allocation in the cloud cryptographic service resource pool. Some servers are overloaded while others are idle, resulting in delayed cryptographic service responses and waste of resources. Existing technologies are difficult to adapt to the complex and changing needs of cryptographic service scenarios.
By acquiring and normalizing historical interaction data, building a classification model, calculating the time difference value and call ratio, and constructing the objective function, dynamic resource reallocation of the cloud cryptography resource pool is achieved, and resource allocation is optimized using unsupervised classification models and particle swarm algorithms.
It achieves the balance and stability of resource calls in the cloud cryptographic service resource pool, reduces resource allocation chaos, and improves the robustness and risk resistance of the system.
Smart Images

Figure CN120639719A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of resource pools, and in particular to an implementation method and device for a cloud cryptographic service resource pool. Background Art
[0002] With the rapid development of cloud computing technology, the cloud cryptographic service resource pool, as the core infrastructure for ensuring data security on the cloud, its stability and robustness are directly related to the reliability of cloud services and the security of user data.
[0003] However, in actual operation, due to the dynamic nature of cryptographic service requests, the volatility of server load and the static nature of cryptographic resource allocation policies, cloud cryptographic resource pools often face the problem of unbalanced resource allocation: some servers are overloaded due to high-frequency cryptographic calls, while other servers are idle due to inefficient utilization.
[0004] This imbalance can lead to risks such as delayed cryptographic service responses, wasted resources, and even service interruptions. Existing technologies often allocate resources through static thresholds or simple load balancing strategies, but these strategies are difficult to adapt to the complex and ever-changing needs of cryptographic service scenarios. Summary of the Invention
[0005] In order to solve the technical problem of unbalanced resource allocation in the above-mentioned cloud cryptographic resource pool, the present invention provides a method and device for implementing a cloud cryptographic service resource pool.
[0006] In a first aspect, the present invention provides a method for implementing a cloud cryptographic service resource pool, which adopts the following technical solutions: Obtain the historical interaction data of each password in each server of the cloud password service resource pool, normalize the historical interaction data, build a classification model to classify the normalized historical interaction data, obtain the classification results, and calculate the time difference value between any two classification results; in a single server, obtain the call ratio of a single classification result in all classification results, use the time difference value between any two clustering results and the maximum value of the call ratio to calculate the call balance value between any two clustering results, obtain the maximum value of the call balance value from any two clustering result combinations of a single server, as the call balance value of a single server; obtain the call balance value of each server in the cloud password service resource pool, use the call balance value of each server and the load of each server to construct the objective function, and by solving the objective function, realize the redistribution of password resources in the cloud password service resource pool and realize the cloud password resource pool.
[0007] Preferably, the normalized historical interaction data includes: Obtain password interaction information of each server in the cloud password service resource pool, obtain historical interaction data of each password, normalize the time point sequence in the historical interaction data, and obtain normalized historical interaction data; wherein, a sample data in the historical interaction data is a time point sequence corresponding to the time points when a single password is called multiple times.
[0008] Preferably, the normalization includes: Get the minimum time interval between two password call interactions as the minimum time scale value, get the total number of minimum time scale values in a day, get the number of minimum time scale values required from time 00:00 to the time point of the interaction, calculate the ratio of the number of values to the total number, and use the number of values as the numerator and the total number as the denominator of the fraction. This is the normalized time point of the interaction.
[0009] Preferably, calculating the time difference value between any two classification results includes: Obtain normalized time point series data for a single password, perform peak point detection on the normalized time point series data to obtain the representative time point of the single password, use an unsupervised classification model to classify the representative time points of all passwords in a single server, obtain the cluster centers of any two classification results, and calculate the Euclidean distance between the two cluster centers as the time difference value between the two classification results.
[0010] Preferably, the representative time points of the single password include: Perform histogram statistics on the normalized time point series data of a single password, perform peak point detection on the histogram statistical results to obtain the peak point detection results, sort the peak point detection results in descending order, obtain the peak points of the top 5 peaks in the peak sequence after descending order, and obtain the time points corresponding to the peak points of the top 5 peaks as the representative time points with interactive representativeness of the single password.
[0011] Preferably, the call balance value of the single server includes: Calculate the call balance value between the mth classification result and the nth classification result in a single server .
[0012] ;in, is an exponential function, and d is a hyperparameter; is the time difference between the m-th classification result and the n-th classification result; The maximum value of the call ratio between the mth classification result and the nth classification result; The call balance value between the mth classification result and the nth classification result is obtained; all possible pairwise combinations of any two classification results in all single servers are obtained, the call balance values corresponding to the two classification results in any two combinations are calculated, and the maximum call balance value is obtained from the call balance values of all combinations as the call balance value of a single server.
[0013] Preferably, the objective function construction includes: Get the target value function value W of the cloud password resource pool: ; I is the total number of all servers, i represents the traversal value of I, exp() is the exponential function, and s is the hyperparameter; is the call balance value of the i-th server in the cloud password resource pool; R is the load variance value of all servers in the cloud password resource pool.
[0014] Preferably, the reallocation of cryptographic resources in the cloud cryptographic service resource pool includes: By solving the corresponding objective function, the new server number of each classification result can be obtained. According to the new server number of each classification result, the cryptographic resources of the corresponding server in the cloud cryptographic service resource pool are exchanged and allocated to realize the cloud cryptographic resource pool.
[0015] In a second aspect, the present invention provides a device for implementing a cloud cryptographic service resource pool, which adopts the following technical solutions: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for implementing the cloud cryptographic service resource pool according to any one of claims 1 to 8 is implemented.
[0016] The above-mentioned implementation method of the cloud cryptographic service resource pool is generated into a computer program and stored in a memory so as to be loaded and executed by a processor, thereby making a system based on the memory and the processor for easy use.
[0017] The present invention has the following technical effects: The present invention classifies cipher data with similar cipher call resources into one category and performs overall migration of the similar data, thereby ensuring regularity in resource allocation and reducing the problem of chaotic allocation in resource allocation.
[0018] The present invention constructs the call balance value of a single server and the objective function of the cloud cryptographic service resource pool through the temporal and spatial characteristics of cryptographic resources, so that when cryptographic resources are allocated, high cryptographic resource call balance can be achieved, thereby improving the stability of the cloud cryptographic service resource pool. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1It is a method flow chart of steps S1 to S3 in the implementation method for a cloud cryptographic service resource pool in an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The embodiment of the present invention discloses a method for realizing a cloud cryptographic service resource pool, referring to Figure 1 ,include: S1: Obtain the historical interaction data of each password in each server of the cloud password service resource pool, normalize the historical interaction data, build a classification model to classify the normalized historical interaction data, obtain the classification results, and calculate the time difference between any two classification results.
[0021] Install password call management software on each server in the cloud password service resource pool to collect password interaction information from each server, obtaining historical interaction data for ten consecutive days from the current time. A sample of historical interaction data is a time series of points corresponding to multiple calls of a single password. The ten-day range for historical data collection is a rule of thumb and can be adjusted by implementers based on specific implementations.
[0022] Since each time point in the time point series is a representation of time, which is not convenient for subsequent data analysis and processing, each time point in the time series is normalized.
[0023] The specific normalization process includes: obtaining the minimum time interval between two password call interactions as the minimum time scale value, obtaining the total number of minimum time scale values in a day, obtaining the number of minimum time scale values required from time 00:00 to the interaction time point, calculating the ratio of the number of minimum time scale values to the total number of minimum time scale values, using the number of minimum time scale values as the numerator and the total number of minimum time scale values as the denominator of the fraction, which is the normalized interaction time point. One day is used as the empirical value for the interaction period, and implementers may adjust it according to the specific implementation.
[0024] After obtaining the normalized time point series data of a single password, since the number of interactions between different passwords is not consistent, resulting in inconsistent time point sequence lengths between different passwords, histogram statistics are performed on the normalized time point series data of a single password.
[0025] When performing histogram statistics, the normalized time point is used as the horizontal axis, and the number of interactions corresponding to the normalized time point is used as the vertical axis to obtain the histogram statistical result. Peak point detection is performed on the histogram statistical result to obtain the peak point detection result.
[0026] If the number of peaks in the peak point detection result is greater than five, the peak point detection result is sorted in descending order, and the peak points of the top five peaks in the peak sequence after descending order are obtained. The time points corresponding to the peak points of the top five peaks are obtained as representative time points with interactive representativeness of a single password.
[0027] If the peak point detection results show five or fewer peaks, the amount of interaction data for a single password is too low, and its impact on the server's password interaction resources is low. Therefore, the time point series data for that password is discarded and not included in subsequent data analysis. The value "5" is an empirically chosen number and can be adjusted by the implementer based on the specific implementation.
[0028] An unsupervised classification model is used to classify data at the five representative time points of a single password, and all representative time points corresponding to a single password are approximately classified into one category, obtaining multiple classification results. Each classification result includes at least one password, among which the optional unsupervised classification models include SOM (self-organizing map algorithm), hierarchical clustering algorithm and other unsupervised classification models.
[0029] Get the cluster centers of any two classification results and calculate the Euclidean distance between the two cluster centers as the time difference value between the two classification results. Since the classification is performed on normalized data, the time difference value ranges from [0, 1]. The larger the time difference value, the greater the difference in the time distribution of the representative time points in the two classification results, and the less likely it is that call congestion problems will occur when each server calls the password.
[0030] S2: In a single server, obtain the call ratio of a single classification result in all classification results, use the time difference value between any two clustering results and the maximum value of the call ratio to calculate the call balance value between any two clustering results, and obtain the maximum value of the call balance value from any two clustering result combinations of a single server as the call balance value of the single server.
[0031] Adjusting the time distribution differences can alleviate the congestion problem of password call interactions among servers in the cloud password service resource pool. However, if the time distribution differences among servers are large but the calls themselves are frequent, it is still easy to cause password call congestion problems.
[0032] To solve the problem that a single server has large time distribution differences but is frequently called, the call concentration coefficient of all passwords in a single classification result on a single server is obtained. The process of obtaining the call concentration coefficient is as follows: First, obtain the cumulative value of the peak value corresponding to the representative time point of a single password in all passwords of a single classification result as the call frequency of the single password, accumulate the call frequencies of all passwords to obtain the total call frequency of the single classification result, calculate the mean of the total call frequencies among all classification results, and obtain the mean of the total call frequencies of all classification results.
[0033] Secondly, obtain the ratio of the total call frequency of a single classification result to the average of the total call frequency of all classification results. In the ratio fraction, the total call frequency of a single classification result is the numerator, and the average of the total call frequency of all classification results in the ratio fraction is the denominator. The obtained ratio is used as the call ratio of a single classification result. If the call ratio of any single classification result among all classification results is less than 1, the probability of the risk occurring is lower. If the call ratio of a single classification result is greater than 1, it means that the probability of the password in the classification result being blocked during the call is greater.
[0034] Furthermore, the call balance value of a single server is calculated, the time difference value between any two classification results in a single server and the maximum call ratio of the two classification results are calculated, the call balance value between any two classification results in a single server is calculated, all combinations of any two classification results in a single server are obtained, and the maximum call balance value among all combinations is obtained as the call balance value of a single server.
[0035] Get the mth classification result and nth classification result in a single server, and calculate the time difference between the mth classification result and the nth classification result .
[0036] Get the maximum value of the call ratio between the mth classification result and the nth classification result ,in, is the call ratio of the mth classification result, is the recall ratio of the nth classification result.
[0037] Then calculate the call balance value between the mth classification result and the nth classification result ; ; in, is an exponential function, d is a hyperparameter, and the empirical value is d=2.
[0038] is the time difference between the m-th classification result and the n-th classification result, The larger the value, the greater the difference in the time distribution of the representative time points in the two classification results, and the less likely it is that call congestion problems will occur when passwords are called on each server.
[0039] It is the maximum value of the ratio between the m-th classification result and the n-th classification result. The larger the value, the greater the probability that the password in the classification result will be blocked during the call. The value will be greater than 1, using the exponential function Mapping is performed.
[0040] and then, The larger the value of , the better the balance of password call interaction between the m-th classification result and the n-th classification result, and the less likely the problem of password call interaction congestion will occur.
[0041] Then, all possible pairwise combinations of any two classification results in all single servers are obtained, the call balance values corresponding to the two classification results in any two combinations are calculated, and the maximum call balance value is obtained from the call balance values of all combinations as the call balance value of a single server.
[0042] S3: Obtain the call balance value of each server in the cloud cryptographic service resource pool, use the call balance value of each server and the load of each server to construct the objective function, and by solving the objective function, realize the redistribution of cryptographic resources in the cloud cryptographic service resource pool and realize the cloud cryptographic resource pool.
[0043] After obtaining the call balance value of a single server, the password call interaction resource balance of each server in the cloud password service resource pool can be achieved by adjusting the server where the single classification result in the single server is located in the cloud password service resource pool.
[0044] However, when using the call balance value of a single server to balance the password call interaction resources of each server in the cloud password service resource pool, due to the number ratio used in the call ratio, classification results with similar call times may be divided into the same server.
[0045] Although the number of password calls in each server in the cloud password service resource pool is similar, the overall amount of password data in a single server may be too high or too low, resulting in an imbalance in the password storage between different servers. For servers with high password storage, the risk resistance of a single server will be reduced, and in emergencies, it is very easy to cause password call interaction congestion, which is not conducive to the stability of the cloud password service resource pool.
[0046] Get the target value function value W of the cloud password resource pool: ; I is the total number of all servers, i represents the traversal value of I. exp() is the exponential function, s is the hyperparameter used to balance The weight distribution between α and R, s takes the empirical value s=1.5.
[0047] is the call balance value of the i-th server in the cloud password resource pool, The larger the value, the better the call balance of the passwords in the i-th server during password call interaction, and the less likely the problem of password call interaction congestion will occur. Therefore, the minimum value of the call balance value in all servers is obtained as the lower limit of the call balance value of the cloud password resource pool. The higher the lower limit of the call balance value of the cloud password resource pool, the better the call balance of the passwords in the current cloud password resource pool during password call interaction. Therefore, the exponential function is used for mapping to obtain the minimum value of the lower limit of the call balance value of the cloud password resource pool after mapping.
[0048] R is the load variance value of all servers in the cloud password resource pool, where the calculation process is: obtain the storage capacity upper limit value of a single server in the cloud password resource pool, obtain the current storage capacity value of the current single server, use the current storage capacity value as the numerator and the storage capacity upper limit value as the denominator, calculate the ratio of the current storage capacity value to the storage capacity upper limit value, and obtain the variance value of this ratio for all servers in the cloud password resource pool as the load variance value of all servers.
[0049] The smaller the load variance value of all servers in the cloud password resource pool, the more consistent the password storage capacity of all servers in the cloud password resource pool is compared to their respective storage limits, which can reduce the impact of excessive password storage capacity of a single server causing password call interaction congestion in emergencies and improve the stability of the cloud password service resource pool.
[0050] Since the passwords in a single classification result have consistency in the interaction time point, the objective function of the cloud password service resource pool is solved with the server numbers of all classification results of all servers in the cloud password service resource pool as variables. The method for solving the objective function can adopt particle swarm algorithm, genetic algorithm, etc.
[0051] By solving the corresponding objective function, the new server number of each classification result can be obtained. According to the new server number of each classification result, the cryptographic resources of the corresponding server in the cloud cryptographic service resource pool are exchanged and allocated to realize the cloud cryptographic resource pool.
[0052] To achieve dynamic allocation of the cloud cryptography resource pool, the objective function value of the cloud cryptography resource pool is obtained after a fixed interval, and a threshold for the objective function is set. When the objective function value is greater than or equal to the threshold, the objective function is solved again. Based on the objective function solution, the cryptographic resources in the cloud cryptography service resource pool are reallocated, achieving dynamic allocation of cryptographic resources in the cloud cryptography service resource pool and completing the implementation of the cloud cryptography resource pool. The fixed interval is set to an empirical value of 30 days, and the objective function threshold is set to an empirical value of 2. Both the fixed interval and the objective function threshold can be adjusted by the implementer based on the specific implementation scenario.
[0053] An embodiment of the present invention also discloses an implementation device for a cloud cryptographic service resource pool, including a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, an implementation method for the cloud cryptographic service resource pool according to the present invention is implemented.
[0054] The above system also includes other components well known to those skilled in the art, such as a communication bus and a communication interface. The configuration and functions of these components are known in the art and will not be described in detail here.
[0055] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, a computer-readable storage medium may be any suitable magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory, a dynamic random access memory, a static random access memory, or the like, or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of, accessible to, or connectable to a device.
[0056] The above are all preferred embodiments of the present invention, and are not intended to limit the scope of protection of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the scope of protection of the present invention.
Claims
1. A method for implementing a cloud cryptographic service resource pool, characterized in that: include: Obtain the historical interaction data of each password in each server of the cloud password service resource pool, normalize the historical interaction data, build a classification model to classify the normalized historical interaction data, obtain the classification results, and calculate the time difference between any two classification results; On a single server, obtain the call ratio of a single classification result among all classification results. Calculate the call balance value between any two clustering results using the time difference value and the maximum call ratio between any two clustering results. Obtain the maximum call balance value from any combination of two clustering results on a single server as the call balance value of the single server. Obtain the call balance value of each server in the cloud cryptographic service resource pool, use the call balance value of each server and the load of each server to construct the objective function, and solve the objective function to realize the redistribution of cryptographic resources in the cloud cryptographic service resource pool and realize the cloud cryptographic resource pool.
2. The method for implementing a cloud cryptographic service resource pool according to claim 1, characterized in that: The normalized historical interaction data includes: Obtain password interaction information for each server in the cloud password service resource pool, obtain historical interaction data for each password, normalize the time point sequence in the historical interaction data, and obtain normalized historical interaction data; Among them, a sample data in the historical interaction data is a time point sequence corresponding to the time points when a single password is called multiple times.
3. The method for implementing a cloud cryptographic service resource pool according to claim 2, characterized in that: The normalization includes: Get the minimum time interval between two password call interactions as the minimum time scale value, get the total number of minimum time scale values in a day, get the number of minimum time scale values required from time 00:00 to the time point of the interaction, calculate the ratio of the number of values to the total number, and use the number of values as the numerator and the total number as the denominator of the fraction. This is the normalized time point of the interaction.
4. The method for implementing a cloud cryptographic service resource pool according to claim 1, wherein: Calculating the time difference between any two classification results includes: Obtain normalized time point series data for a single password, perform peak point detection on the normalized time point series data to obtain the representative time point of the single password, use an unsupervised classification model to classify the representative time points of all passwords in a single server, obtain the cluster centers of any two classification results, and calculate the Euclidean distance between the two cluster centers as the time difference value between the two classification results.
5. The method for implementing a cloud cryptographic service resource pool according to claim 4, characterized in that: The representative time points of the single password include: Perform histogram statistics on the normalized time point series data of a single password, perform peak point detection on the histogram statistical results to obtain the peak point detection results, sort the peak point detection results in descending order, obtain the peak points of the top 5 peaks in the peak sequence after descending order, and obtain the time points corresponding to the peak points of the top 5 peaks as the representative time points with interactive representativeness of the single password.
6. The method for implementing a cloud cryptographic service resource pool according to claim 1, wherein: The call balance value of the single server includes: Calculate the call balance value between the mth classification result and the nth classification result in a single server ; ; in, is an exponential function, and d is a hyperparameter; is the time difference between the m-th classification result and the n-th classification result; The maximum value of the call ratio between the mth classification result and the nth classification result; is the call balance value between the m-th classification result and the n-th classification result; Obtain all possible pairwise combinations of any two classification results in all single servers, calculate the call balance values corresponding to the two classification results in any two combinations, and obtain the maximum call balance value from the call balance values of all combinations as the call balance value of a single server.
7. The method for implementing a cloud cryptographic service resource pool according to claim 1, wherein: The objective function construction includes: Get the target value function value W of the cloud password resource pool: ; I is the total number of all servers, i represents the traversal value of I, exp() is the exponential function, and s is the hyperparameter; is the call balance value of the i-th server in the cloud password resource pool; R is the load variance value of all servers in the cloud password resource pool.
8. The method for implementing a cloud cryptographic service resource pool according to claim 1, wherein: The reallocation of cryptographic resources in the cloud cryptographic service resource pool includes: By solving the corresponding objective function, the new server number of each classification result can be obtained. According to the new server number of each classification result, the cryptographic resources of the corresponding server in the cloud cryptographic service resource pool are exchanged and allocated to realize the cloud cryptographic resource pool.
9. A device for implementing a cloud cryptographic service resource pool, characterized in that: include: A processor and a memory, wherein the memory stores computer program instructions, and when the computer program instructions are executed by the processor, the method for implementing the cloud cryptographic service resource pool according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Load prediction method for cloud computation cluster tasks based on cluster characteristic extraction
CN108415777A
Resource prediction and scheduling method in cloud computing
CN111913780A
Load aggregation public service platform heterogeneous cryptographic computing service multi-task scheduling algorithm
CN114741169A
Scheduling system and method for heterogeneous cryptographic resource pool
CN115514766A
Multi-scene cloud platform password management method and system
CN117892287A