Power terminal equipment data encryption transmission method and device
By using the hash value comparison mechanism in power terminal equipment to screen the data of power terminal equipment and reduce data transmission and encryption operations without deviation, the encryption cost and encryption costs caused by the large amount of data and the diversity of timestamps in power terminal equipment are solved. The problem of high computing power consumption has been achieved by reducing encryption costs and computing power consumption.
Patent Information
- Application Number
- CN202411668940.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Due to the large amount of data and diverse timestamps of power terminal equipment, the encryption cost and computing power consumption during encryption transmission are high.
The second hash value is generated by receiving the monitoring value of the power terminal device based on the attributes and timestamp of the target data prediction of the data terminal, and the monitoring value of the power terminal equipment is used to generate the second hash value. If the hash values are the same, the filling instruction is generated to guide the data of the data station to fill in the prediction value; if different, the transmission instruction is generated and the monitoring value is encrypted to transmit the monitoring value to the data station.
Effective screening of power terminal equipment data is achieved, and data transmission and encryption operations are reduced without deviation, thereby reducing encrypted costs and computing power consumption.
Smart Images

Figure CN119172182B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data encryption transmission, and in particular to a method and device for data encryption transmission of power terminal equipment. Background Art
[0002] With the widespread use of power terminal equipment, the security of its data transmission has become an important part of power system security. Traditional encryption transmission methods can effectively ensure the security of data transmission, but due to the huge amount of data generated by power terminal equipment and the high diversity of timestamps generated by the data, frequent encryption operations lead to excessively high computing costs and serious consumption of computing power during the encryption transmission process, which in turn affects the overall operating efficiency of the system, especially in scenarios with high concurrency and large-scale data transmission, where encryption costs and performance losses are particularly prominent. Summary of the invention
[0003] The present application provides a method and device for encrypting and transmitting data of power terminal equipment, which is used to solve the technical problem in the prior art that the encryption cost and computing power consumption in the encryption transmission process are high due to the large amount of data in the power terminal equipment and the diversity of timestamps.
[0004] The first aspect of the present application provides a method for encrypting and transmitting data of a power terminal device, the method comprising: receiving a first hash value of a target data prediction value of a data center, wherein the first hash value has a target data attribute tag and a target data timestamp tag; according to the target data attribute tag and the target data timestamp tag, based on the log database of the power terminal device, retrieving a target data monitoring value to generate a second hash value; when the first hash value is the same as the second hash value, generating a fill instruction and sending it to the data center, wherein the data center uses the target data prediction value to fill the target data monitoring value with a null value through the fill instruction; when the first hash value is different from the second hash value, generating a transmission instruction; according to the transmission instruction, adding the target data monitoring value to a data packet to be encrypted, encrypting the data packet to be encrypted and transmitting it to the data center.
[0005] According to a second aspect of the present application, there is provided an apparatus for encrypting and transmitting data of a power terminal device, the apparatus comprising: a first hash value receiving module, the first hash value receiving module being used to receive a first hash value of a target data prediction value of a data center, wherein the first hash value has a target data attribute tag and a target data timestamp tag; a second hash value generating module, the second hash value generating module being used to retrieve a target data monitoring value based on a log database of the power terminal device according to the target data attribute tag and the target data timestamp tag, and generate a second hash value; a null value filling instruction generating module, the null value filling instruction generating module being used to generate a filling instruction when the first hash value is the same as the second hash value, and sending the filling instruction to the data center, wherein the data center uses the target data prediction value to perform null value filling on the target data monitoring value through the filling instruction; a transmission instruction generating module, the transmission instruction generating module being used to generate a transmission instruction when the first hash value is different from the second hash value; and a data packet transmission module to be encrypted, the data packet transmission module to be encrypted being used to add the target data monitoring value into the data packet to be encrypted according to the transmission instruction, and encrypt the data packet to be encrypted and transmit it to the data center.
[0006] One or more technical solutions provided in this application have at least the following technical effects or advantages:
[0007] The method and device for encrypting and transmitting data of power terminal equipment provided by the present application relate to the technical field of data encryption transmission. By predicting and collecting terminal data and calculating its hash value, if the predicted hash value is consistent with the locally stored hash value, it means that the prediction is without deviation, and the prediction result can be directly regarded as a monitoring value for storage without data transmission. In the case where there is a difference between the prediction result and the actual data, data transmission and encryption operations are performed. This solves the technical problem in the prior art that the encryption cost and computing power consumption in the encryption transmission process are high due to the large amount of data and the diversity of timestamps of power terminal equipment. This realizes the technical effect of effectively screening the data of power terminal equipment by introducing a hash value comparison mechanism, reducing data transmission and encryption operations without deviation, thereby reducing encryption costs and computing power consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. 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 creative work.
[0009] Figure 1A schematic flow chart of a method for encrypting and transmitting data of power terminal equipment provided in an embodiment of the present application.
[0010] Figure 2 A schematic diagram of the structure of a data encryption transmission device for power terminal equipment provided in an embodiment of the present application.
[0011] Explanation of reference numerals: first hash value receiving module 11 , second hash value generating module 12 , null value filling instruction generating module 13 , transmission instruction generating module 14 , to-be-encrypted data packet transmitting module 15 . DETAILED DESCRIPTION
[0012] The present application provides a method and device for encrypting and transmitting data of power terminal equipment, which is used to solve the technical problem in the prior art that the encryption cost and computing power consumption in the encryption transmission process are high due to the large amount of data in the power terminal equipment and the diversity of timestamps.
[0013] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0014] It should be noted that the terms "first", "second", etc. in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, device, product, or server that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products, or devices.
[0015] Embodiment 1, as Figure 1 As shown, the present application provides a method for encrypting and transmitting data of a power terminal device, the method is applied to a power terminal device and a data center, and when applied to a power terminal device, the method includes:
[0016] P10: Receive a first Hash value of a target data prediction value from a data center, wherein the first Hash value has a target data attribute tag and a target data timestamp tag.
[0017] Specifically, the power terminal device first receives the first hash value of the target data prediction value from the data center. The target data refers to a specific type of data that needs to be monitored, transmitted or processed in the system, which is usually related to the actual operating status or performance of the power terminal device. In the power system, the target data may include current, voltage, power, equipment temperature and other parameters closely related to the equipment or system status. The target data prediction value is an estimated value of the target data generated by the data center based on historical data, model calculations or other prediction algorithms. It is the system's estimate of the monitoring data to be generated, which is used to judge and verify the actual situation of the terminal device in advance to reduce unnecessary data transmission. The first hash value is encrypted and generated by the data center based on the target data prediction value, and is used to identify the uniqueness and integrity of the prediction value. This hash value is not only used for data integrity verification, but also contains two important identification information: the target data attribute label and the target data timestamp label.
[0018] Among them, the target data attribute tag includes key parameters such as voltage, current, power, etc., which are used to identify the category or characteristics of the target data. For example, some data may be related to power consumption, equipment status or power load, and the attribute tag can help the power terminal device accurately locate and distinguish different types of monitoring data. The target data timestamp tag indicates the generation or prediction time of the target data. Since the data generated by the power terminal device is time-series, the timestamp tag can ensure that the terminal device can retrieve the corresponding monitoring value based on the accurate time window.
[0019] After receiving this hash value, the power terminal device matches it with the local monitoring data through the attribute tag and timestamp tag of the target data for subsequent hash value comparison and data transmission decisions. This ensures that the terminal device can efficiently retrieve the monitoring data corresponding to the target data from the massive log data, providing data support for the subsequent hash value comparison and encrypted transmission steps.
[0020] P20: According to the target data attribute tag and the target data timestamp tag, based on the log database of the power terminal device, retrieve the target data monitoring value and generate a second hash value.
[0021] Optionally, the power terminal device retrieves the corresponding target data monitoring value from the local log database according to the previously received target data attribute tag and target data timestamp tag. The log database stores various types of historical data generated by the power terminal device, and these data are recorded in attribute and time order. Therefore, using the attribute tag and timestamp tag of the target data, the power terminal device can quickly locate the target data monitoring value corresponding to the target data prediction value sent by the data center.
[0022] After successfully retrieving the target data monitoring value that matches the target data attribute tag and the target data timestamp tag, the second hash value is calculated and generated based on this monitoring value using the device's built-in hash algorithm module. The hash value is an encryption technology used to ensure data integrity and consistency. By performing a hash operation on the monitoring value, the generated second hash value can uniquely identify the content of the monitoring data, which can be used to compare with the first hash value sent by the data center to determine whether the local monitoring value is consistent with the predicted value, providing basic support for subsequent data processing steps. This step ensures the accuracy and security of data transmission through technical means such as label-based data retrieval and hash verification, while greatly reducing the redundancy of data transmission.
[0023] P30: When the first hash value is the same as the second hash value, a filling instruction is generated and sent to the data center, wherein the data center uses the target data prediction value to fill the target data monitoring value with a null value through the filling instruction.
[0024] It should be understood that when the second hash value generated by the power terminal device is the same as the first hash value sent by the data center, the system will generate a fill instruction and send the instruction to the data center. At this time, the equality of the two hash values indicates that the local target data monitoring value of the power terminal device is completely consistent with the target data prediction value of the data center, indicating that the data is unbiased. Therefore, there is no need to transmit data, and this mechanism can be used to reduce unnecessary encryption transmission operations, thereby saving computing power and bandwidth resources.
[0025] The function of the fill instruction is to notify the data center, allowing the center to directly use the predicted value to fill the vacant part in the data set without obtaining the actual monitoring data from the terminal device. This method ensures the consistency of the data and reduces unnecessary data transmission. After the fill instruction is generated, the terminal device no longer needs to encrypt and transmit data, but directly completes the data synchronization through simplified communication.
[0026] Therefore, the data center uses the predicted value of the target data as the monitoring value to fill in the null value according to the filling instruction. This means that at the relevant position of the data set, the data center will use its originally predicted data to replace the data actually collected from the terminal device. Since the content of the two is consistent, using the predicted value to fill in the null value will not affect the accuracy and integrity of the data. In this way, not only the data transmission volume of the terminal device is reduced, but also the risk of data exposure in the network is reduced, further improving the overall security of the system. The core of this step is to use the hash verification mechanism to ensure the consistency of the data, avoid repeated data transmission, and reduce the cost and burden of encrypted transmission.
[0027] P40: When the first hash value is different from the second hash value, a transmission instruction is generated. P50: According to the transmission instruction, the target data monitoring value is added to the data packet to be encrypted, and the data packet to be encrypted is transmitted to the data center after being encrypted.
[0028] Specifically, when the first hash value (the hash value of the target data prediction value provided by the data center) is different from the second hash value (the hash value of the target data monitoring value generated locally by the power terminal device), it indicates that there is a deviation between the monitoring data of the power terminal device and the data predicted by the data center, and the actual monitoring data needs to be transmitted for synchronization.
[0029] Therefore, after detecting a hash value mismatch, the power terminal device generates a transmission instruction. This instruction not only identifies which data items differ (through attribute tags and timestamp tags), but may also contain the specific degree of the difference or other relevant metadata. According to the transmission instruction, the power terminal device adds the target data monitoring value to the data packet to be encrypted. The data packet to be encrypted is an encapsulation format for transmission, which contains the core data to be transmitted, namely the target data monitoring value. After the data packet is generated, it is encrypted to ensure that the data is not tampered with or leaked during transmission. The encryption process can use symmetric or asymmetric encryption algorithms, and the specific choice depends on the security requirements and computing resources of the system.
[0030] After encryption is completed, the power terminal device transmits the encrypted data packet to the data center through the network. In this way, the data center can receive the latest actual monitoring value that has been encrypted and protected, and further process and store it. Through the above steps, the interaction between the data center and the power terminal device realizes effective data transmission control, which not only improves the transmission efficiency, but also greatly reduces the encryption computing power consumption of the system.
[0031] When applied to a data center, the method includes:
[0032] T10: Generate a first hash value of a target data prediction value; T20: Send the first hash value, target data attribute tag and target data timestamp tag to the power terminal device to obtain device terminal feedback information, wherein the device terminal feedback information includes a filling instruction or an encrypted data packet; T30: When it is the filling instruction, use the target data prediction value to fill the target data monitoring value with a null value according to the filling instruction; T40: When it is the encrypted data packet, obtain the target data monitoring value after decryption.
[0033] In a possible embodiment of the present application, when the data station is executed, data interaction and processing are performed through the following steps: First, the data station generates a first hash value based on the predicted value of the target data. The hash value is obtained after an encryption operation is performed on the predicted target data, and is used to uniquely identify the integrity and consistency of the target data. This hash value is not only a data verification code, but also contains the attribute label of the target data (such as key parameters such as voltage and current) and the timestamp label (accurately recording the time of data prediction).
[0034] Next, the data center sends the generated first hash value, target data attribute tag, and target data timestamp tag to the power terminal device as input for requesting verification. After receiving this information, the power terminal device will generate a second hash value based on the actual monitoring data in the local log database, and after comparing it with the first hash value, generate device terminal feedback information, wherein the device terminal feedback information includes a filling instruction or an encrypted data packet. The filling instruction is a simple signal indicating that when the monitoring data of the terminal device is consistent with the predicted data of the center, it indicates that the data center can use the predicted value to fill in the null values or missing values in the actual monitoring data; the encrypted data packet contains the actual monitoring data transmitted back by the terminal device when the data is inconsistent.
[0035] When the power terminal device returns a fill instruction, the data center does not need to transmit actual data according to the instruction, but directly uses the target data prediction value to fill the empty value. This means that the center can use the prediction data to replace the actual monitoring data to fill the gap, thereby completing data recording and storage. This method optimizes the system's bandwidth and encryption resource utilization by reducing unnecessary data transmission.
[0036] If the terminal device returns an encrypted data packet, it means that the predicted data is inconsistent with the actual data. At this time, the data center will decrypt the encrypted data packet to obtain the actual target data monitoring value transmitted by the terminal device. The decryption process usually uses a decryption algorithm corresponding to the encryption process to ensure the secure transmission and correct restoration of the data. After obtaining the monitoring data, the data center can further analyze, process and store it.
[0037] Through the above steps, the interaction between the data center and the power terminal equipment realizes effective data transmission control. When the hash check is consistent, unnecessary encryption and transmission operations can be avoided; when the hash check is inconsistent, the system can quickly and securely obtain and decrypt the actual monitoring data. This design not only improves the transmission efficiency, but also greatly reduces the encryption computing power consumption of the system.
[0038] Furthermore, step T10 of the embodiment of the present application also includes:
[0039] T11: Obtain a target data attribute label and a target data timestamp label; T12: When the target data attribute label does not belong to the underlying data attribute label set, match the target data prediction model through the model library according to the target data attribute label and the target data timestamp label, wherein the target data prediction model has a mapped genotype data attribute, wherein the underlying data refers to unpredictable data; T13: According to the mapped genotype data attribute, collect the mapped genotype monitoring data that meets the target data timestamp label; T14: Input the mapped genotype monitoring data into the target data prediction model, obtain the target data prediction value, and generate the first hash value of the target data prediction value; T15: wherein the target data prediction model is generated by training the preconfigured target data identification data set and the mapped genotype data record data set.
[0040] It should be understood that the specific process of generating the first hash value of the target data prediction value involves the construction of the target data prediction model and the generation of the prediction value. Specifically, the data center first obtains the attribute label and timestamp label of the target data. The attribute label identifies the type or characteristics of the target data, such as the current, voltage and other parameters of the power equipment, and the timestamp label indicates the time point or time period corresponding to the data. These labels are the basic information for subsequent data processing and matching.
[0041] Next, the data center determines whether the attribute label of the target data belongs to the underlying data attribute label set. The underlying data refers to data that cannot be predicted by the prediction model (such as some data with strong real-time or abnormal fluctuations). If the target data attribute label does not belong to the underlying data attribute label set, it means that the data can be generated by model prediction. Then the data center will use these labels and timestamp labels to match a suitable target data prediction model through the model library. This model library is a database containing a variety of prediction models, each of which is optimized for different data types and scenarios. During the matching process, the data center will pay special attention to those prediction models with mapped genotype data attributes. Mapped genotype data attributes refer to data types that can be predicted by genotype data (such as equipment status, environmental parameters, etc.). This data attribute enables the prediction model to more accurately capture the complex relationship between data, thereby improving the accuracy of the prediction.
[0042] Once the appropriate target data prediction model is matched, the system will collect the mapped genotype monitoring data that meets the timestamp tag requirements according to the mapped genotype data attributes. These genotype monitoring data are obtained from historical data or monitoring data sets according to the specific requirements and mapping relationships of the model and are used as input for the prediction model. Further, the collected mapped genotype monitoring data are input into the target data prediction model to generate a predicted value for the target data, and based on this predicted value, a first hash value of the predicted value for the target data is generated for verification and comparison in subsequent steps.
[0043] The target data prediction model is generated by training a pre-configured target data identification dataset and a mapped genotype data record dataset. The target data identification dataset includes the basic information and identification of the target data, and the mapped genotype data record dataset contains historical data related to the prediction model. Through the joint training of these datasets, the model can accurately predict the target data.
[0044] By introducing the target data prediction model and genotype data mapping, the processing capability of predictable data can be significantly improved, while reducing the frequency of data transmission and encryption computing power requirements. By predicting non-underlying data, unnecessary transmission operations can be reduced while ensuring data accuracy, thereby optimizing the use of network resources.
[0045] Furthermore, step T14 of the embodiment of the present application also includes:
[0046] T14-1: When the target data prediction value is one, generate the first hash value; T14-2: When the target data attribute label is multiple, obtain the first target data attribute prediction value until the Nth target data attribute prediction value; T14-3: Construct a Merkle tree based on the first target data attribute prediction value until the Nth target data attribute prediction value to generate the first hash value.
[0047] Optionally, when the target data prediction value is one, that is, only a single target data attribute needs to be predicted, a first hash value is directly generated for the target data prediction value. At this time, there is only one predicted data attribute label, and a hash operation is performed based on the prediction value to generate a unique hash value for subsequent data transmission and verification.
[0048] However, in more complex scenarios, the target data may contain multiple attribute labels, that is, when there are multiple target data attribute labels, the predicted value of each attribute is obtained in sequence, from the first target data attribute predicted value to the Nth target data attribute predicted value. These attribute predicted values correspond to different data categories in the system (such as current, voltage, temperature, etc.), and each attribute has a corresponding predicted value. These predicted values will serve as the basic data for subsequent hash value calculations.
[0049] In order to efficiently manage and verify the predicted values of multiple target data attributes, a Merkle tree is constructed from the first target data attribute predicted value to the Nth target data attribute predicted value. The Merkle tree is a tree-like data structure that combines the hash values of multiple data blocks into a single root hash value, so that the data can be quickly verified and detected whether it has been tampered with. Specifically, first generate a corresponding hash value for each target data attribute prediction value, and then combine these hash values in pairs to generate the hash value of the previous level, and so on, until the final root hash value, that is, the first hash value, is generated. This root hash value represents the entirety of all target data attribute prediction values, which is convenient for subsequent rapid verification and transmission.
[0050] By constructing a Merkle tree, the system can effectively organize and verify the data when processing multiple target data attributes. The advantage of this tree structure is that even if only one attribute prediction value changes, the system only needs to recalculate the relevant partial hash value instead of reprocessing all the data, thereby improving the efficiency and security of data verification.
[0051] Furthermore, step T14-3 of the embodiment of the present application also includes:
[0052] T14-31: Randomly combine the first target data attributes to the Nth target data attributes to obtain a target data attribute combination scheme; T14-32: According to the target data attribute combination scheme, combine the first target data attribute prediction values to the Nth target data attribute prediction values in pairs to generate a first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values; T14-33: Traverse the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values, and construct the first node to the N / 2th node; T14-34: Construct the parent node of the first node to the N / 2th node as the root node, set the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values as child nodes of the first node to the N / 2th node, and generate The Merkle tree; T14-35: generating the first pair of target data attribute prediction value hash values of the first pair of target data attribute prediction values through the first node, until the N / 2th pair of target data attribute prediction value hash values are generated through the N / 2th node; T14-36: generating the first pair of target data attribute prediction value hash values through the root node until the hash value of the N / 2th pair of target data attribute prediction value hash values is set as the overall hash value; T14-37: adding the first pair of target data attribute prediction value hash values until the N / 2th pair of target data attribute prediction value hash values, and the overall hash value into the first hash value; T14-38: simultaneously sending the target data attribute combination scheme as the label data of the first hash value to the power terminal device.
[0053] Specifically, by randomly combining the target data attributes and their predicted values, a Merkle tree is constructed and the final hash value is generated. First, the first target data attribute to the Nth target data attribute are randomly combined to generate a target data attribute combination scheme. This scheme combines multiple attributes in different ways by randomly selecting, ensuring that the data has diversity and randomness during encryption processing, effectively improving the security of the data.
[0054] Furthermore, according to the generated target data attribute combination scheme, the first target data attribute prediction value to the Nth target data attribute prediction value are combined in pairs, thereby generating the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values (assuming that N is an even number, if N is an odd number, the last prediction value may be used as a node alone). Through such pairing, the prediction values of every two target data attributes are combined to provide a basis for subsequent hash calculations.
[0055] Next, traverse from the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values, and construct corresponding nodes for each pair of prediction values in turn, that is, from the first node to the N / 2th node. Each node represents the corresponding target data attribute prediction value pair, providing an initial node for constructing the Merkle tree.
[0056] After completing the construction of leaf nodes (the first node to the N / 2th node), the hash values of these nodes are used as child nodes to continue to build their parent nodes as the root node of the entire Merkle tree. At the same time, the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values are set as child nodes of the first node to the N / 2th node, thus completing the preliminary construction of the Merkle tree.
[0057] Next, the first pair of target data attribute prediction value hash values are generated through the first node, and the N / 2th pair of target data attribute prediction value hash values are generated through other nodes in turn. These hash values are the results of hashing the target data attributes, ensuring that each pair of attribute prediction values is encrypted and verified.
[0058] Continue through the root node, further hash the hash values of each pair of target data attribute prediction values generated previously to generate an overall hash value. This overall hash value serves as the root hash value of the Merkle tree, representing the unique identifier and checksum of the entire set of prediction values.
[0059] At this time, the data center will combine the hash values from the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values, as well as the overall hash value, and add them to the first hash value. This combined first hash value ensures the integrity and security of all data attribute prediction values, forming the final transmission encryption identifier.
[0060] Finally, the target data attribute combination scheme generated previously is attached to the first hash value as label data, and the hash value with the label is sent to the power terminal device. In this way, the power terminal device can identify and verify the transmitted data according to the label information to ensure the integrity and security of the data.
[0061] Through these steps, not only is the Merkle tree structure effectively used to organize and verify data, but the security of the data is also enhanced through random combinations. In addition, the generated hash values and tag data ensure the efficiency and security of data verification during transmission. This design greatly reduces redundancy in data transmission, while ensuring efficient and secure data management and verification even in the case of large amounts of data transmission.
[0062] Furthermore, step T14-31 of the embodiment of the present application also includes:
[0063] T14-311: When N is an even number, the first target data attributes to the Nth target data attributes are randomly combined in pairs to obtain a target data attribute combination scheme; T14-312: When N is an odd number, the first target data attributes to the N-1th target data attributes are randomly combined in pairs to obtain an initial target data attribute combination scheme, and the Nth target data attribute is taken as a separate combination and added to the initial target data attribute combination scheme to generate the target data attribute combination scheme.
[0064] It should be understood that different combinations are performed for the cases where the number N of target data attributes is an even number or an odd number, respectively, to ensure that all target data attributes can be effectively processed and participate in the subsequent hash value generation process.
[0065] When N is an even number, random combinations are performed on the first target data attribute to the Nth target data attribute to generate a target data attribute combination scheme. This random combination method ensures that every two target data attributes are randomly paired without omission or duplication, ensuring that all target data attribute prediction values can participate in the hash operation and ultimately generate an accurate root hash value. In the even number case, all attributes can be processed completely in pairs, and the combination scheme is relatively simple.
[0066] When N is an odd number, the situation is different. At this time, first randomly combine the first target data attribute to the N-1th target data attribute in pairs to generate an initial target data attribute combination scheme. Since the number of attributes is an odd number, the remaining Nth target data attribute cannot be directly combined with other attributes in pairs, so the Nth target data attribute is treated as a separate combination and added to the initial target data attribute combination scheme. Ensure that all target data attributes can participate in subsequent hash operations.
[0067] Through this different processing method for even and odd numbers, the system can flexibly handle various attribute quantities, ensuring that each target data attribute can be reasonably included in the combination plan and participate in the hash operation. Especially in the case of odd numbers, by processing the last attribute separately, the problem of missing data processing due to uneven attribute quantity is avoided.
[0068] Furthermore, the embodiment of the present application further includes step T12a, and step T12a further includes:
[0069] When the target data attribute tag belongs to the bottom layer data attribute tag set, the target data attribute tag and the target data timestamp tag are sent to the power terminal device.
[0070] Specifically, when it is detected that the target data attribute tag belongs to the underlying data attribute tag set, the system will not attempt to generate the target data prediction value through the prediction model. The underlying data attribute tag set contains data types that cannot be predicted by the model, such as real-time power fluctuation data, emergency data, or other target data that cannot be accurately predicted using historical data. For these data, the system handles them more directly to ensure the accuracy and timeliness of the data.
[0071] In this case, the target data attribute tag and the target data timestamp tag are sent directly to the power terminal device, informing the device that these data cannot be processed by prediction, and requiring the terminal device to directly collect real-time monitoring data and encrypt and transmit it according to the target data indicated by the tag. This means that the system no longer generates data through complex prediction models, but relies on the actual monitoring values provided by the terminal device, and ensures the security of transmission through encryption.
[0072] Through this method, when the target data attribute label is identified as the underlying data, the system can skip the prediction step and directly enter the encrypted transmission process, ensuring the accuracy and real-time nature of the underlying data, while avoiding errors caused by the prediction model not being applicable to certain data, thereby improving the flexibility and adaptability of the system.
[0073] In summary, the embodiments of the present application have at least the following technical effects:
[0074] This application generates a second hash value by receiving the first hash value of the target data prediction value of the data station, and calling the monitoring value of the power terminal device according to the attributes and timestamp of the first hash value. If the two hash values are the same, a filling instruction is generated to instruct the data station to fill with the prediction value. If they are different, a transmission instruction is generated to encrypt the monitoring value and transmit it to the data station. The technical effect of effectively screening the power terminal device data by introducing a hash value comparison mechanism, reducing data transmission and encryption operations without deviation, and thus reducing encryption costs and computing power consumption is achieved.
[0075] Embodiment 2 is based on the same inventive concept as the method for encrypting and transmitting data of a power terminal device in the above embodiment. Figure 2 As shown, the present application provides a data encryption transmission device for power terminal equipment, and the device and method embodiments in the embodiments of the present application are based on the same inventive concept. Among them, the device includes:
[0076] The first Hash value receiving module 11 is used to receive a first Hash value of a target data prediction value of a data center, wherein the first Hash value has a target data attribute tag and a target data timestamp tag.
[0077] The second hash value generating module 12 is used to retrieve the target data monitoring value and generate a second hash value based on the log database of the power terminal device according to the target data attribute tag and the target data timestamp tag.
[0078] A null value filling instruction generation module 13 is used to generate a filling instruction when the first hash value is the same as the second hash value, and send it to the data center, wherein the data center uses the target data prediction value to fill the target data monitoring value with a null value through the filling instruction.
[0079] The transmission instruction generating module 14 is configured to generate a transmission instruction when the first hash value is different from the second hash value.
[0080] The data packet transmission module 15 is used to add the target data monitoring value into the data packet to be encrypted according to the transmission instruction, encrypt the data packet to be encrypted and transmit it to the data station.
[0081] Furthermore, the device also includes:
[0082] A first Hash value generating module is used to generate a first Hash value of a target data prediction value.
[0083] The device terminal feedback information acquisition module is used to send the first hash value, target data attribute tag and target data timestamp tag to the power terminal device to obtain device terminal feedback information, wherein the device terminal feedback information includes filling instructions or encrypted data packets.
[0084] A null value filling module, wherein the null value filling module is used to fill the target data monitoring value with the target data prediction value according to the filling instruction when it is the filling instruction.
[0085] The target data monitoring value generating module is used to obtain the target data monitoring value after decryption when it is the encrypted data packet.
[0086] Furthermore, the first Hash value generating module is further configured to perform the following steps:
[0087] Obtain a target data attribute label and a target data timestamp label; when the target data attribute label does not belong to the underlying data attribute label set, match the target data prediction model through the model library according to the target data attribute label and the target data timestamp label, wherein the target data prediction model has a mapped genotype data attribute, wherein the underlying data refers to unpredictable data; according to the mapped genotype data attribute, collect mapped genotype monitoring data that meets the target data timestamp label; input the mapped genotype monitoring data into the target data prediction model, obtain a target data prediction value, and generate a first hash value of the target data prediction value; wherein the target data prediction model is generated by training a preconfigured target data identification data set and a mapped genotype data record data set.
[0088] Furthermore, the first Hash value generating module is further configured to perform the following steps:
[0089] When the target data attribute tag belongs to the bottom layer data attribute tag set, the target data attribute tag and the target data timestamp tag are sent to the power terminal device.
[0090] Furthermore, the first Hash value generating module is further configured to perform the following steps:
[0091] When the target data prediction value is one, the first Hash value is generated; when the target data attribute label is multiple, the first target data attribute prediction value is obtained until the Nth target data attribute prediction value; a Merkle tree is constructed according to the first target data attribute prediction value until the Nth target data attribute prediction value to generate the first Hash value.
[0092] Furthermore, the first Hash value generating module is further configured to perform the following steps:
[0093] Randomly combine the first target data attributes to the Nth target data attributes to obtain a target data attribute combination scheme; according to the target data attribute combination scheme, combine the first target data attribute prediction values to the Nth target data attribute prediction values in pairs to generate a first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values; traverse the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values to construct a first node to the N / 2th node; construct the parent node of the first node to the N / 2th node as the root node, set the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values as child nodes of the first node to the N / 2th node, and generate The Merkle tree; generating a first pair of target data attribute prediction value hash values of the first pair of target data attribute prediction values through the first node, until generating an N / 2th pair of target data attribute prediction value hash values of the N / 2th pair of target data attribute prediction values through the N / 2th node; generating the first pair of target data attribute prediction value hash values through the root node until the hash value of the N / 2th pair of target data attribute prediction value hash values is set as the overall hash value; adding the first pair of target data attribute prediction value hash values until the N / 2th pair of target data attribute prediction value hash values, and the overall hash value into the first hash value; and sending the target data attribute combination scheme as the label data of the first hash value to the power terminal device.
[0094] Furthermore, the first Hash value generating module is further configured to perform the following steps:
[0095] When N is an even number, the first target data attributes to the Nth target data attributes are randomly combined in pairs to obtain a target data attribute combination scheme; when N is an odd number, the first target data attributes to the N-1th target data attributes are randomly combined in pairs to obtain an initial target data attribute combination scheme, and the Nth target data attribute is taken as a separate combination and added to the initial target data attribute combination scheme to generate the target data attribute combination scheme.
[0096] It should be noted that the above-mentioned sequence of the embodiments of the present application is only for description and does not represent the advantages and disadvantages of the embodiments. And the above-mentioned specific embodiments of this specification are described. 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.
[0097] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
[0098] This specification and the drawings are merely exemplary illustrations of the present application and are deemed to cover any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the present application and its equivalents, the present application intends to include these modifications and variations.
Claims
1. A method for encrypting and transmitting data of a power terminal device, characterized in that: Applied to power terminal equipment, including: Receive a first Hash value of a target data prediction value from a data center, wherein the first Hash value has a target data attribute tag and a target data timestamp tag; According to the target data attribute tag and the target data timestamp tag, based on the log database of the power terminal device, the target data monitoring value is retrieved to generate a second hash value; When the first Hash value is the same as the second Hash value, a filling instruction is generated and sent to the data center, wherein the data center uses the target data prediction value to fill the target data monitoring value with a null value through the filling instruction; When the first hash value is different from the second hash value, generating a transmission instruction; According to the transmission instruction, the target data monitoring value is added into the data packet to be encrypted, and the data packet to be encrypted is transmitted to the data center after being encrypted.
2. The method for encrypting and transmitting data of a power terminal device according to claim 1, characterized in that: Applied to data center, including: Generate a first Hash value of a target data prediction value; Sending the first hash value, the target data attribute tag, and the target data timestamp tag to the power terminal device to obtain device terminal feedback information, wherein the device terminal feedback information includes a filling instruction or an encrypted data packet; When it is the fill instruction, the target data monitoring value is filled with null values using the target data prediction value according to the fill instruction; When it is the encrypted data packet, the target data monitoring value is obtained after decryption.
3. The method for encrypting and transmitting data of a power terminal device according to claim 2, characterized in that: Generating a first Hash value of a target data prediction value includes: Obtain target data attribute labels and target data timestamp labels; When the target data attribute tag does not belong to the underlying data attribute tag set, matching a target data prediction model through a model library according to the target data attribute tag and the target data timestamp tag, wherein the target data prediction model has a mapped genotype data attribute, wherein the underlying data refers to data that cannot be predicted; According to the mapped genotype data attributes, collecting the mapped genotype monitoring data that meets the target data timestamp tag; Inputting the mapped genotype monitoring data into the target data prediction model to obtain a target data prediction value, and generating a first Hash value of the target data prediction value; The target data prediction model is generated by training a preconfigured target data identification data set and a mapped genotype data record data set.
4. The method for encrypting and transmitting data of a power terminal device according to claim 3, characterized in that: Also includes: When the target data attribute tag belongs to the bottom layer data attribute tag set, the target data attribute tag and the target data timestamp tag are sent to the power terminal device.
5. The method for encrypting and transmitting data of a power terminal device according to claim 3, characterized in that: Generating a first Hash value of the target data prediction value includes: When the target data prediction value is one, generating the first Hash value; When there are multiple target data attribute labels, obtaining the first target data attribute prediction value until the Nth target data attribute prediction value; A Merkle tree is constructed based on the first target data attribute prediction value to the Nth target data attribute prediction value to generate the first hash value.
6. The method for encrypting and transmitting data of a power terminal device according to claim 5, characterized in that: Constructing a Merkle tree according to the first target data attribute prediction value to the Nth target data attribute prediction value to generate the first Hash value, including: Randomly combining the first target data attribute to the Nth target data attribute to obtain a target data attribute combination scheme; According to the target data attribute combination scheme, the first target data attribute prediction values up to the Nth target data attribute prediction values are combined in pairs to generate a first pair of target data attribute prediction values up to the N / 2th pair of target data attribute prediction values; Traversing the first pair of target data attribute prediction values until the N / 2th pair of target data attribute prediction values, constructing the first node until the N / 2th node; Constructing the parent node of the first node to the N / 2th node as a root node, setting the first pair of target data attribute prediction values to the N / 2th pair of target data attribute prediction values as child nodes of the first node to the N / 2th node, and generating the Merkle tree; Generate a first pair of target data attribute prediction value hash values of the first pair of target data attribute prediction values through the first node, until an N / 2th pair of target data attribute prediction value hash values of the N / 2th pair of target data attribute prediction values are generated through the N / 2th node; Generate the hash values of the first pair of target data attribute prediction value hash values up to the N / 2th pair of target data attribute prediction value hash values through the root node, and set them as the overall hash value; Add the first pair of target data attribute prediction value hash values up to the N / 2th pair of target data attribute prediction value hash values, and the overall hash value to the first hash value; At the same time, the target data attribute combination scheme is sent to the power terminal device as label data of the first hash value.
7. The method for encrypting and transmitting data of a power terminal device according to claim 6, characterized in that: Randomly combining the first target data attribute to the Nth target data attribute to obtain a target data attribute combination scheme, including: When N is an even number, the first target data attributes to the Nth target data attributes are randomly combined in pairs to obtain a target data attribute combination scheme; When N is an odd number, the first target data attributes to the N-1th target data attributes are randomly combined in pairs to obtain an initial target data attribute combination scheme, and the Nth target data attribute is taken as a separate combination and added to the initial target data attribute combination scheme to generate the target data attribute combination scheme.
8. A data encryption transmission device for power terminal equipment, characterized in that: The device comprises: A first Hash value receiving module, the first Hash value receiving module is used to receive a first Hash value of a target data prediction value of a data center, wherein the first Hash value has a target data attribute tag and a target data timestamp tag; A second Hash value generation module, the second Hash value generation module is used to retrieve the target data monitoring value based on the log database of the power terminal device according to the target data attribute tag and the target data timestamp tag, and generate a second Hash value; a null value filling instruction generation module, wherein the null value filling instruction generation module is used to generate a filling instruction when the first hash value is the same as the second hash value, and send the filling instruction to the data center, wherein the data center uses the target data prediction value to perform null value filling on the target data monitoring value through the filling instruction; a transmission instruction generation module, wherein the transmission instruction generation module is used to generate a transmission instruction when the first hash value is different from the second hash value; The module for transmitting the data packet to be encrypted is used to add the target data monitoring value into the data packet to be encrypted according to the transmission instruction, encrypt the data packet to be encrypted and transmit it to the data station.
Citation Information
Patent Citations
Secure file sharing method and system
CN103636160A
A method for improving virtual currency mining efficiency
CN109635234A