Micro-service-based energy data security circulation management method and system

By clustering and characterizing energy data on the server side of the microservice, generating private keys and encrypting energy data, the problem of low security in the energy data flow process is solved, and higher energy data flow security is achieved.

CN119862437APending Publication Date: 2025-04-22ECONOMIC TECH RES INST OF STATE GRID HENAN ELECTRIC POWER +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410403273.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-03
Publication Date
2025-04-22

AI Technical Summary

Technical Problem

Energy data is easily attacked by outsiders during the circulation process, resulting in data leakage, tampering and other problems, thereby reducing the security of energy data circulation.

Method used

Energy data is collected through the server side of microservices, and the two-dimensional characteristic coordinates of energy data are constructed using density peak clustering algorithms and information entropy methods, a private key is generated and the energy data is encrypted in combination with the elliptic curve encryption algorithm to achieve the secure flow of energy data.

Benefits of technology

It improves the security of energy data encryption, enhances the security of energy data flow, and effectively prevents data leakage and tampering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119862437A_ABST
    Figure CN119862437A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data encryption, in particular to a micro-service-based energy data security circulation management method and system, and the method comprises the steps: obtaining each cluster of an energy data collection sequence; obtaining the local density of each element in each cluster, and calculating the energy data aggregation degree index of each element; constructing an energy data structure chaos degree of a cluster in which each element is located, and further calculating a neighbor data magnitude degree index and an inter-cluster heterogeneous feature coefficient; constructing an intra-cluster heterogeneous characteristic index of each element to obtain a data heterogeneous change index of each element; the neighbor data magnitude degree index and the data isomerism change index of each element form a two-dimensional energy data feature coordinate; and constructing an energy data sampling sequence and obtaining a private key, encrypting the energy data, and completing safe circulation of the energy data by using the micro-service based on an encryption result of the energy data. Therefore, the security of energy data encryption is improved, and the security of energy data circulation is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data encryption technology, and in particular to a microservice-based energy data secure circulation management method and system. Background Art

[0002] As a new production factor, data is driving technology and talent to create important value for the economy. The production factors triggered by data have brought new opportunities for economic development. As an important part of the development of the digital economy, data circulation involves the transmission of data from the server to the user, so data security has become one of the urgent issues to be solved in the process of data circulation. Microservices, as a method of data circulation, include data management models, which can realize the mutual communication between various services, thereby realizing efficient data transmission.

[0003] However, with the rapid development of the digital economy, the flow of energy data is often accompanied by energy data security issues. When the data is attacked by outsiders during the flow of energy data, data leakage and tampering are prone to occur, resulting in low security of energy data flow.

[0004] With the development of data encryption technology, energy data is encrypted through the microservice server, and then the encrypted energy data is used to achieve secure flow management of energy data, thereby improving the security of energy data flow. For example, the DES data encryption algorithm, as a common symmetric encryption algorithm, uses the same key in the encryption and decryption process in the traditional DES data encryption algorithm, and the key length is short, resulting in low security of data encryption, and thus cannot effectively improve the security of energy data flow. Summary of the invention

[0005] In order to solve the above technical problems, the purpose of the present invention is to provide a method and system for managing the safe circulation of energy data based on microservices. The technical solutions adopted are as follows:

[0006] In a first aspect, an embodiment of the present invention provides a microservice-based energy data security flow management method, the method comprising the following steps:

[0007] The microservice server collects energy data at each moment to form an energy data collection sequence, and clusters the energy data collection sequence to obtain clusters;

[0008] Each energy data in the energy data collection sequence is recorded as each element, and the local density of each element in each cluster is obtained by using the density peak clustering algorithm. The energy data aggregation degree index of each element is obtained according to the local density of each element in each cluster and the relationship between the elements; the energy data structure disorder degree of the cluster where each element is located is constructed according to the information entropy of the cluster where each element is located and the local density of the element; the neighboring data magnitude degree index of each element is obtained according to the energy data aggregation degree index and the energy data structure disorder degree; the inter-cluster heterogeneous characteristic coefficient of each cluster is obtained according to the relationship between each cluster and other clusters; the intra-cluster heterogeneous characteristic index of each element is obtained according to the element distribution of the cluster where each element is located; the data heterogeneity change index of each element is obtained according to the intra-cluster heterogeneous characteristic index of each element and the inter-cluster heterogeneous characteristic coefficient of the cluster where it is located; the neighboring data magnitude degree index of each element and the data heterogeneity change index constitute the two-dimensional energy data characteristic coordinates of each element;

[0009] An energy data sampling sequence is constructed according to the two-dimensional energy data characteristic coordinates of each element. A private key is constructed according to the energy data sampling sequence and each energy data. The energy data is encrypted using the elliptic curve encryption algorithm. Microservices are used to complete the secure flow of energy data based on the encryption results of the energy data.

[0010] Furthermore, the energy data aggregation index of each element is obtained according to the local density of each element in each cluster and the relationship between the elements, including:

[0011] The Euclidean distance between each element and each element in the cluster is obtained, the sum of the Euclidean distance and a preset value greater than zero is calculated, the ratio of the local density of each element to the sum is calculated, and the average of the ratios between each element and all elements in the cluster is used as the energy data aggregation degree index of each element.

[0012] Furthermore, the energy data structure disorder degree of the cluster where each element is located is constructed according to the information entropy of the cluster where each element is located and the local density of the element, including:

[0013] Calculate the information entropy of the cluster where each element is located and the local density mean of all elements in the cluster where each element is located, obtain the absolute value of the difference between the local density of each element in the cluster where each element is located and the local density mean, calculate the sum of the absolute values ​​of the difference of all elements in the cluster where each element is located, and use the product of the information entropy and the sum as the energy data structure chaos degree of the cluster where each element is located.

[0014] Furthermore, the obtaining of the neighboring data magnitude index of each element according to the energy data aggregation index and the energy data structure disorder index includes:

[0015] Calculate the mean square error of all elements in the cluster where each element is located, obtain the product of the mean square error and the inverse of the energy data structure disorder degree of the cluster where each element is located, use the product as the exponent of an exponential function with a natural constant as the base, and use the product of the calculation result of the exponential function and the energy data aggregation degree index of each element as the neighbor data magnitude degree index of each element.

[0016] Furthermore, the step of obtaining the inter-cluster heterogeneous characteristic coefficient of each cluster according to the relationship between each cluster and other clusters includes:

[0017] The sequence of all elements in the clusters sorted in ascending order of element values ​​is used as the energy data sequence of the clusters, wherein the element value is the energy data corresponding to the element;

[0018] The DTW distance between each cluster and the energy data sequence of other clusters is obtained, the absolute value of the difference between the corresponding quartiles of the energy data sequence of each cluster and other clusters is calculated, the product of the DTW distance and the absolute value of the difference is calculated, and the mean of the product calculated between each cluster and all other clusters is used as the inter-cluster heterogeneous characteristic coefficient of each cluster.

[0019] Furthermore, the intra-cluster heterogeneous characteristic index of each element is obtained according to the element distribution of the cluster in which each element is located, including:

[0020] Obtain the absolute value of the difference between each quartile of the energy data sequence sequence of the cluster where each element is located and the adjacent previous quartile of each quartile, and calculate the normalized result of the average of the absolute value of the difference of all quartiles of the energy data sequence sequence of the cluster where each element is located; calculate the absolute value of the difference between the element value corresponding to each element in the energy data collection sequence and each quartile of the energy data sequence sequence of the cluster where each element is located, and record it as the first absolute value of the difference;

[0021] The product of the normalized result and the absolute value of the first difference is used as the intra-cluster heterogeneous characteristic index of each element.

[0022] Furthermore, the data heterogeneity change index of each element is obtained according to the intra-cluster heterogeneity characteristic index of each element and the inter-cluster heterogeneity characteristic coefficient of the cluster in which it is located, including:

[0023] Calculate the sum of the inter-cluster heterogeneous characteristic coefficient of the cluster where each element is located and the number 1, use the opposite number of the intra-cluster heterogeneous characteristic index of each element as the exponent of an exponential function with a natural constant as the base, obtain the ratio of the calculation result of the exponential function and the sum, and use the difference between the number 1 and the ratio as the data heterogeneity change index of each element.

[0024] Furthermore, the energy data sampling sequence is constructed according to the two-dimensional energy data characteristic coordinates of each element, including:

[0025] The Euclidean distance between the two-dimensional energy data feature coordinates of each element in the energy data collection sequence and the coordinate origin of the two-dimensional energy data feature space is used as the energy data feature index of each element, and all elements in the energy data collection sequence are sorted in ascending order according to the energy data feature index to form an energy data sampling sequence.

[0026] Furthermore, constructing a private key according to the energy data sampling sequence and each energy data includes:

[0027] The energy data sampling sequence is sampled, and each extracted energy data is converted into binary using UTF-8 encoding technology, and the binary numbers of all extracted energy data constitute the private key.

[0028] In the second aspect, an embodiment of the present invention also provides a microservice-based energy data security flow management system, including a memory, a processor, and a computer program stored in the memory and running on the processor, and the processor implements the steps of any one of the above methods when executing the computer program.

[0029] The present invention has at least the following beneficial effects:

[0030] The present invention analyzes the degree of aggregation and structural disorder of energy data based on the energy data acquisition sequence, constructs a neighbor data magnitude index, reflects the large amount of data characteristics of the neighbor data of each element in the energy data acquisition sequence, and more accurately analyzes the data characteristics of the energy data; based on the clustering results of the energy data acquisition sequence, the inter-cluster heterogeneous characteristics and intra-cluster heterogeneous characteristics in the clustering results of the energy data are analyzed, and a data heterogeneity change index is constructed to reflect the heterogeneous data characteristics of each element in the energy data acquisition sequence, and more accurately characterize the heterogeneous characteristics of the energy data. Based on the neighbor data magnitude index and the data heterogeneity change index, a two-dimensional energy data feature coordinate is constructed, and a private key is obtained based on the two-dimensional energy data feature coordinate. The present invention improves the complexity of the energy data characteristics obtained by sampling, so that the private key generated by the sampled energy data has higher security, thereby improving the security of energy data encryption. The present invention effectively improves the security of energy data circulation through the security of energy data encryption. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0032] Figure 1 A flowchart of the steps of a microservice-based energy data secure flow management method provided for one embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the energy data security flow management method and system based on microservices proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.

[0034] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.

[0035] The specific scheme of the energy data secure flow management method and system based on microservices provided by the present invention is described in detail below with reference to the accompanying drawings.

[0036] See also Figure 1 , which shows a flowchart of a method for managing the secure transfer of energy data based on microservices provided by an embodiment of the present invention, the method comprising the following steps:

[0037] Step S001: Collect energy data through the microservice server, and pre-process the energy data to obtain an energy data collection sequence.

[0038] This embodiment encrypts the energy data of the microservice server to improve the security of energy data encryption, so as to improve the security of energy data circulation. Energy data is collected through the microservice server. It should be noted that energy data includes many types: power data, coal mine related data, etc. The embodiment is determined according to the actual situation. In this embodiment, the power consumption data of the power industry is taken as an example to explain the energy data security circulation management process in detail. In this embodiment, the number of energy data collected is n, and the empirical value of n is 1000. The implementer can decide the number of energy data collected according to the actual situation. In order to facilitate the subsequent encryption of energy data, the sequence composed of all collected energy data in the order of collection time is used as the energy data collection sequence, that is, the first energy data collected is used as the first element of the energy data collection sequence, the second energy data collected is used as the second element of the energy data collection sequence, and the third energy data collected is used as the third element of the energy data collection sequence. By analogy, the last energy data collected is used as the last element of the energy data collection sequence.

[0039] At this point, the energy data collection sequence is obtained, which is used for subsequent analysis of the energy data encryption security.

[0040] Step S002, construct the energy data aggregation degree index and the energy data structure disorder degree, obtain the neighbor data magnitude degree index; calculate the inter-cluster heterogeneous characteristic coefficient and the intra-cluster heterogeneous characteristic index, and then calculate the data heterogeneity change index; obtain the two-dimensional energy data characteristic coordinates based on the neighbor data magnitude degree index and the data heterogeneity change index.

[0041] Generally speaking, in the energy data flow management based on microservices, energy data is transmitted in plain text, making the sensitive information in the energy data transparent, which will bring great security risks to the flow of energy data. In order to improve the security of energy data flow, it is often necessary to encrypt the energy data in plain text, and use the encrypted data to achieve the secure flow of energy data.

[0042] The elliptic curve encryption algorithm is an asymmetric encryption algorithm based on the mathematical theory of elliptic curves. However, in the traditional elliptic curve encryption algorithm, the private key is generated by random numbers. Since random numbers have large uncertainty, when the random numbers are relatively simple, the security of the private key is low, and thus the secure flow of energy data cannot be effectively realized. In order to obtain a more secure private key, it is necessary to analyze based on the characteristics of energy data.

[0043] Furthermore, energy data usually has large amounts of heterogeneous data characteristics. In order to obtain a more secure private key, it is necessary to analyze the data characteristics of energy data. In order to analyze the size of the neighbor data of each element in the energy data collection sequence, further analysis is performed through the clustering results of energy data.

[0044] Specifically, all elements in the energy data collection sequence are used as inputs of the CURE hierarchical clustering algorithm (Clustering Using Representative, CURE), the number of clusters is preset to 20, the number of representative points is preset to 30, the shrinkage factor is preset to 0.5, and the output of the CURE hierarchical clustering algorithm is used as the clustering result of all elements in the energy data collection sequence, and the clustering result includes different cluster clusters. The CURE hierarchical clustering algorithm is a well-known technology, and the specific process is not repeated. For each cluster cluster of energy data, all elements in the cluster cluster are used as inputs of the DPC density peak clustering algorithm, and the output of the DPC density peak clustering algorithm is used as the local density of each element in the cluster cluster. The DPC density peak clustering algorithm is a well-known technology, and the specific process is not repeated.

[0045] Furthermore, the magnitude index of the neighboring data of each element in the energy data collection sequence is calculated to reflect the size of the neighboring data of each element in the energy data collection sequence. The calculation formula is as follows:

[0046]

[0047]

[0048] F i =D i ×exp[-E(d i )×σ(d i )]

[0049] Where D i represents the energy data aggregation index of the i-th element in the energy data collection sequence, M represents the number of elements in the cluster where the i-th element in the energy data collection sequence belongs, ρ(d i ) represents the local density of the i-th element in the energy data collection sequence within the cluster, d i Represents the i-th element in the energy data collection sequence, It represents the jth element in the cluster where the i-th element in the energy data collection sequence belongs. dist() is the Euclidean distance function. represents the Euclidean distance between the i-th element in the energy data collection sequence and the j-th element in the cluster to which the i-th element belongs, ∈ is a preset value greater than zero to avoid the denominator being 0. In this embodiment, the value is 1;

[0050] E(d i ) represents the energy data structure disorder of the cluster where the i-th element in the energy data collection sequence belongs, P(B i ) represents the information entropy of all element values ​​in the cluster where the i-th element in the energy data collection sequence is located, represents the local density of the jth element in the cluster where the i-th element in the energy data collection sequence belongs, μ(A i ) represents the local density mean of all elements in the cluster where the i-th element in the energy data collection sequence is located;

[0051] F i represents the magnitude index of the neighboring data of the ith element in the energy data collection sequence, σ(d i ) represents the mean square error of all element values ​​in the cluster where the ith element in the energy data collection sequence belongs, and exp[] represents an exponential function with a natural constant as the base.

[0052] Local density ρ(d i ) is larger, to a certain extent, it shows that the clustering characteristics of the energy data around the i-th element are more obvious, and the Euclidean distance between elements is The smaller it is, the closer the spatial distance between the elements is, that is, the stronger the aggregation effect is, and the greater the energy data aggregation index is;

[0053] Information entropy P(B i ) is smaller, indicating that the degree of chaos of the energy data within the cluster is smaller, that is, there are more equal energy data within the cluster, and the difference between the local density and the local density mean is The smaller it is, the higher the similarity of density characteristics around different elements in the cluster is, and the less chaotic the energy data structure is;

[0054] Energy data concentration index D i The larger the value, to a certain extent, it reflects the greater the degree of energy data aggregation around the element, that is, the greater the amount of energy data adjacent to the element, and the greater the energy data structure chaos E(d i ) is smaller, the mean square error σ(d i ) is smaller, indicating that the energy data in the cluster where the element is located is less chaotic and the energy data is less discrete. To a certain extent, it reflects that the larger the amount of energy data of the element's neighbors, the larger the neighbor data magnitude index.

[0055] At this point, the neighbor data magnitude index of each element in the energy data collection sequence is obtained, which is used to characterize the large amount of data characteristics of energy data.

[0056] Furthermore, the massive data characteristics and heterogeneous data characteristics of energy data are combined to generate the private key of the elliptic curve encryption algorithm. Therefore, in order to obtain a more secure private key, the heterogeneous characteristics of energy data need to be further analyzed.

[0057] Specifically, the heterogeneous characteristics of energy data are usually manifested as large differences between energy data at different levels. In order to analyze the heterogeneous characteristics of energy data, analysis is performed based on the clustering results of energy data. The sequence composed of all elements in each cluster in the clustering results of energy data in ascending order of element values ​​is taken as the energy data sequence sequence of each cluster, and the quartiles of the energy data sequence sequence of each cluster are counted. The quartiles of the energy data sequence sequence include the upper quartile, the median, and the lower quartile, which characterize the distribution characteristics of energy data in the cluster.

[0058] Furthermore, the data heterogeneity change index of each element in the energy data collection sequence is calculated to reflect the heterogeneous data characteristics of each element in the energy data collection sequence. The calculation formula is as follows:

[0059]

[0060]

[0061]

[0062] In the formula, H s represents the inter-cluster heterogeneous characteristic coefficient of the s-th cluster of energy data, G represents the number of clusters in the clustering result of energy data, N represents the number of quartiles of the energy data sequence of the cluster in the clustering result of energy data, C s and C a They represent the energy data sequence of the sth and ath clusters in the clustering results of energy data, respectively. dtw() is the dtw distance function. dtw(C s , C a ) represents the dtw distance between the energy data sequence of the sth and ath clusters in the clustering result of energy data, X s,g and X a,g They represent the g-th quartile of the energy data sequence of the s-th and a-th clusters in the clustering results of energy data respectively;

[0063] K i represents the intra-cluster heterogeneous characteristic index of the ith element in the energy data collection sequence, and Norm() is the normalization function. and They represent the fth and f-1th quartiles of the energy data sequence of the cluster where the i-th element in the energy data collection sequence belongs, respectively. L i Represents the value of the i-th element in the energy data collection sequence, Represents the g-th quartile of the energy data sequence of the cluster where the i-th element in the energy data collection sequence belongs;

[0064] V i It represents the data heterogeneity change index of the i-th element in the energy data collection sequence, exp() is an exponential function with a natural constant as the base, and H(i) represents the inter-cluster heterogeneity characteristic coefficient of the cluster where the i-th element in the energy data collection sequence belongs.

[0065] dtw distance dtw(C s , C a ) is larger, and the difference between quartiles |X s,g -X a,g The larger | is, the greater the difference between the energy data order sequences of the clusters is, which to a certain extent indicates that the inter-cluster heterogeneous characteristics of the energy data are greater, and the greater the inter-cluster heterogeneous characteristic coefficient is;

[0066] Differences between quartiles The larger the value, the greater the difference between the element value and the quartile. The larger the value is, the greater the difference is in the energy data sequence of the cluster where the element is located, and the greater the heterogeneous characteristics between the element value and the quartile in the energy data sequence, which to a certain extent reflects that the greater the intra-cluster heterogeneous characteristics of the element, the greater the intra-cluster heterogeneous characteristic index;

[0067] Therefore, the inter-cluster heterogeneous characteristic coefficient H s The larger the cluster, the more heterogeneous the feature index K is. i The larger it is, the greater the data heterogeneity change index is. Since different clusters can represent energy data at different levels, when the inter-cluster heterogeneity characteristics between the cluster where the element is located and other clusters are larger, and the intra-cluster heterogeneity characteristics between the element and its cluster are larger, the greater the heterogeneity characteristics of the element compared to energy data at different levels, and the larger the data heterogeneity change index is.

[0068] Furthermore, in order to generate a more secure key, the neighboring data magnitude index and data heterogeneity change index of each element in the energy data collection sequence are used as the two-dimensional horizontal coordinate and two-dimensional vertical coordinate of each element, respectively, to construct the two-dimensional energy data characteristic coordinates of each element in the energy data collection sequence:

[0069] Z i =(F i ,V i )

[0070] In the formula, Z i represents the two-dimensional energy data characteristic coordinates of the i-th element in the energy data collection sequence, F i Represents the magnitude index of the neighboring data of the ith element in the energy data collection sequence, V i Represents the data heterogeneity change index of the i-th element in the energy data collection sequence.

[0071] The difference between the two-dimensional energy data characteristic coordinates of different elements in the energy data collection sequence reflects the difference between the energy data characteristics of different elements. Elements with larger differences between energy characteristics are selected to generate private keys in order to improve the security of the private keys.

[0072] At this point, the two-dimensional energy data characteristic coordinates of each element in the energy data acquisition sequence are obtained.

[0073] Step S003, obtain an energy data sampling sequence according to the two-dimensional energy data characteristic coordinates, obtain a private key according to the energy data sampling sequence, use an elliptic curve encryption algorithm to obtain an encryption result of the energy data based on the private key, and use microservices to complete the secure flow of energy data based on the encryption result of the energy data.

[0074] In order to obtain a private key with higher security, the Euclidean distance between the two-dimensional energy data feature coordinate point of each element in the energy data collection sequence and the coordinate origin of the two-dimensional energy data feature space is used as the energy data feature index of each element in the energy data collection sequence, and the sequence composed of all elements in the energy data collection sequence in ascending order of the energy data feature index is used as the energy data sampling sequence.

[0075] Furthermore, the energy data in the energy data sampling sequence is sampled. The sampling process in this embodiment is as follows: according to the arrangement order of each energy data in the energy data sampling sequence, 16 energy data are extracted by systematic sampling, and the sampling distance is preset to 50. Each sampled energy data is converted into a 16-bit binary number using UTF-8 encoding technology (Unicode Transformation Format-8), and a 256-bit binary number composed of 16 16-bit binary numbers is used as a private key with a length of 256 bits, wherein UTF-8 encoding is a well-known technology, and the specific process is not repeated. The energy data collection sequence and the private key with a length of 256 bits are respectively used as the input of the elliptic curve encryption algorithm, and the output of the elliptic curve encryption algorithm is used as the ciphertext, public key and private key of the energy data, wherein the elliptic curve encryption algorithm is a well-known technology, and the specific process is not repeated.

[0076] At this point, the ciphertext and private key of the energy data are transmitted to the user through the microservice server, which improves the security of energy data flow and completes the safe flow management of energy data.

[0077] Based on the same inventive concept as the above method, an embodiment of the present invention also provides a microservice-based energy data security flow management system, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of any one of the above-mentioned microservice-based energy data security flow management methods are implemented.

[0078] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The above is a description of a specific embodiment of this specification. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0079] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.

[0080] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.

Claims

1. A microservice-based energy data security flow management method, characterized in that: The method comprises the following steps: The microservice server collects energy data at each moment to form an energy data collection sequence, and clusters the energy data collection sequence to obtain clusters; Each energy data in the energy data collection sequence is recorded as each element, and the local density of each element in each cluster is obtained by using the density peak clustering algorithm. The energy data aggregation degree index of each element is obtained according to the local density of each element in each cluster and the relationship between the elements; the energy data structure disorder degree of the cluster where each element is located is constructed according to the information entropy of the cluster where each element is located and the local density of the element; the neighboring data magnitude degree index of each element is obtained according to the energy data aggregation degree index and the energy data structure disorder degree; the inter-cluster heterogeneous characteristic coefficient of each cluster is obtained according to the relationship between each cluster and other clusters; the intra-cluster heterogeneous characteristic index of each element is obtained according to the element distribution of the cluster where each element is located; the data heterogeneity change index of each element is obtained according to the intra-cluster heterogeneous characteristic index of each element and the inter-cluster heterogeneous characteristic coefficient of the cluster where it is located; the neighboring data magnitude degree index of each element and the data heterogeneity change index constitute the two-dimensional energy data characteristic coordinates of each element; An energy data sampling sequence is constructed according to the two-dimensional energy data characteristic coordinates of each element. A private key is constructed according to the energy data sampling sequence and each energy data. The energy data is encrypted using the elliptic curve encryption algorithm. Microservices are used to complete the secure flow of energy data based on the encryption results of the energy data.

2. The microservice-based energy data security flow management method according to claim 1, characterized in that: The energy data aggregation index of each element is obtained according to the local density of each element in each cluster and the relationship between the elements, including: The Euclidean distance between each element and each element in the cluster is obtained, the sum of the Euclidean distance and a preset value greater than zero is calculated, the ratio of the local density of each element to the sum is calculated, and the average of the ratios between each element and all elements in the cluster is used as the energy data aggregation degree index of each element.

3. The energy data security transfer management method based on microservices according to claim 1 is characterized in that: The energy data structure disorder degree of the cluster where each element is located is constructed according to the information entropy of the cluster where each element is located and the local density of the element, including: Calculate the information entropy of the cluster where each element is located and the local density mean of all elements in the cluster where each element is located, obtain the absolute value of the difference between the local density of each element in the cluster where each element is located and the local density mean, calculate the sum of the absolute values ​​of the difference of all elements in the cluster where each element is located, and use the product of the information entropy and the sum as the energy data structure chaos degree of the cluster where each element is located.

4. The energy data security transfer management method based on microservices according to claim 1 is characterized in that: The step of obtaining the neighboring data magnitude index of each element according to the energy data aggregation index and the energy data structure disorder index includes: Calculate the mean square error of all elements in the cluster where each element is located, obtain the product of the mean square error and the inverse of the energy data structure disorder degree of the cluster where each element is located, use the product as the exponent of an exponential function with a natural constant as the base, and use the product of the calculation result of the exponential function and the energy data aggregation degree index of each element as the neighbor data magnitude degree index of each element.

5. The microservice-based energy data security transfer management method according to claim 1, characterized in that: The method of obtaining the inter-cluster heterogeneous characteristic coefficient of each cluster according to the relationship between each cluster and other clusters includes: The sequence of all elements in the clusters sorted in ascending order of element values ​​is used as the energy data sequence of the clusters, wherein the element value is the energy data corresponding to the element; The DTW distance between each cluster and the energy data sequence of other clusters is obtained, the absolute value of the difference between the corresponding quartiles of the energy data sequence of each cluster and other clusters is calculated, the product of the DTW distance and the absolute value of the difference is calculated, and the mean of the product calculated between each cluster and all other clusters is used as the inter-cluster heterogeneous characteristic coefficient of each cluster.

6. The energy data security transfer management method based on microservices according to claim 5 is characterized in that: The intra-cluster heterogeneous characteristic index of each element is obtained according to the element distribution of the cluster in which each element is located, including: Obtain the absolute value of the difference between each quartile of the energy data sequence sequence of the cluster where each element is located and the adjacent previous quartile of each quartile, and calculate the normalized result of the average of the absolute value of the difference of all quartiles of the energy data sequence sequence of the cluster where each element is located; calculate the absolute value of the difference between the element value corresponding to each element in the energy data collection sequence and each quartile of the energy data sequence sequence of the cluster where each element is located, and record it as the first absolute value of the difference; The product of the normalized result and the absolute value of the first difference is used as the intra-cluster heterogeneous characteristic index of each element.

7. The energy data security transfer management method based on microservices according to claim 1 is characterized in that: The method of obtaining the data heterogeneity change index of each element according to the intra-cluster heterogeneity characteristic index of each element and the inter-cluster heterogeneity characteristic coefficient of the cluster in which the element is located includes: Calculate the sum of the inter-cluster heterogeneous characteristic coefficient of the cluster where each element is located and the number 1, use the opposite number of the intra-cluster heterogeneous characteristic index of each element as the exponent of an exponential function with a natural constant as the base, obtain the ratio of the calculation result of the exponential function and the sum, and use the difference between the number 1 and the ratio as the data heterogeneity change index of each element.

8. The energy data security transfer management method based on microservices according to claim 1 is characterized in that: The energy data sampling sequence is constructed according to the two-dimensional energy data characteristic coordinates of each element, including: The Euclidean distance between the two-dimensional energy data feature coordinates of each element in the energy data collection sequence and the coordinate origin of the two-dimensional energy data feature space is used as the energy data feature index of each element, and all elements in the energy data collection sequence are sorted in ascending order according to the energy data feature index to form an energy data sampling sequence.

9. The microservice-based energy data security transfer management method according to claim 8, characterized in that: The private key is constructed according to the energy data sampling sequence and each energy data, including: The energy data sampling sequence is sampled, and each extracted energy data is converted into binary using UTF-8 encoding technology, and the binary numbers of all extracted energy data constitute the private key.

10. An energy data security circulation management system based on microservices, comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 9 are implemented.