Power data compression encryption transmission method, device and server

CN115883203BActive Publication Date: 2026-10-16CHINA SOUTHERN POWER GRID BIG DATA SERVICE CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202211520197.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2026-10-16
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

[0002]电力数据的传输会涉及到用户的隐私数据,如用户用电量明细、缴费记录和欠费记录等敏感数据传输,所以在数据交易传输过程中需要保证数据的安全性,同时电力数据具备数据量大、数据密度高等特征,若直接对这些量大的电力数据进行传输,传输量过大,容易导致传输时间过长,且难以保证数据的安全性

Benefits of technology

[0035] The aforementioned method, apparatus, server, storage medium, and computer program product for compressing and encrypting power data mainly involves receiving a data acquisition request from a client of an analysis system, acquiring power data outside a set threshold range, generating a first key using a symmetric encryption algorithm, encrypting the power data outside the threshold range using the first key, encrypting the first key using a private key, and transmitting the encrypted power data outside the threshold range and the encrypted first key to the client. The client then performs the following steps: decrypting the encrypted first key using a public key to obtain the first key, and decrypting the encrypted power data using the first key. The private key and the public key are generated using an asymmetric algorithm. This approach first completes the compression and filtering of power data by setting a threshold, and then combines asymmetric and symmetric algorithms for power data transmission, greatly improving the transmission speed and security of power data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115883203B_ABST
    Figure CN115883203B_ABST
Patent Text Reader

Abstract

The application relates to the field of data transmission, and provides a power data compression and encryption transmission method and device. After receiving a data acquisition request of a client of an analysis system, power data outside a set threshold range is acquired, a first key is generated through a symmetric encryption algorithm, the power data outside the threshold range is encrypted through the first key, the first key is encrypted through a private key, the encrypted power data outside the threshold range and the encrypted first key are transmitted to the client, and the client executes the following steps: the encrypted first key is decrypted through a public key to obtain the first key, and the encrypted power data is decrypted through the first key, wherein the private key and the public key are generated through an asymmetric algorithm, so that the compression and screening of the power data are completed through the set threshold value, and then the power data is transmitted through the combination of the asymmetric algorithm and the symmetric algorithm, thereby greatly improving the transmission speed and security of the power data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of power data transmission, and in particular to a method, apparatus, server, storage medium, and computer program product for compressed and encrypted transmission of power data. Background Technology

[0002] The transmission of electricity data involves the transmission of users' private data, such as electricity consumption details, payment records, and arrears records. Therefore, it is necessary to ensure data security during the data transaction and transmission process. At the same time, electricity data is characterized by large volume and high data density. If this large volume of electricity data is transmitted directly, the transmission volume will be too large, which will easily lead to excessively long transmission time and make it difficult to guarantee data security. Summary of the Invention

[0003] Therefore, it is necessary to provide a method, apparatus, server, storage medium, and computer program product for the compressed and encrypted transmission of power data to address the aforementioned technical problems.

[0004] This application provides a method for compressing and encrypting power data transmission, applied to the server side of an analysis system, the method comprising:

[0005] Upon receiving a data acquisition request from the client of the analysis system, the system acquires power data outside the set threshold range.

[0006] A first key is generated using a symmetric encryption algorithm, and the first key is used to encrypt power data outside the threshold range. The first key is then encrypted using a private key.

[0007] The encrypted power data outside the threshold range and the encrypted first key are transmitted to the client; so that the client performs the following steps: using the public key, decrypting the encrypted first key to obtain the first key, and using the first key to decrypt the encrypted power data; wherein, the private key and the public key are generated by an asymmetric algorithm.

[0008] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0009] Verify whether the client IP address of the analysis system is in the whitelist; if not, reject the request directly.

[0010] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0011] The system verifies whether the frequency of data acquisition requests from the client of the analysis system exceeds a first preset value; if it does, the request is rejected.

[0012] In one embodiment, verifying whether the frequency of data acquisition requests from the client of the analysis system exceeds a set value includes:

[0013] Obtain the IP address of the client of the analysis system;

[0014] Determine whether the number of times the IP address is accessed within a set time period exceeds the set limit.

[0015] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0016] The timestamp of the data acquisition request from the client of the analysis system is compared with the current time on the server. If the difference between the two is greater than a second set value, the request is rejected.

[0017] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0018] The client of the analysis system is decrypted using the private key to obtain the request parameters of the request, and a signature is calculated based on the request parameters.

[0019] The obtained signature is compared with the signature of the data acquisition request from the analysis system client;

[0020] If the comparison results indicate that the signatures are equal, then the signature verification is successful and the request is accepted.

[0021] If the comparison results indicate that the signatures are not equal, the request is rejected.

[0022] In one embodiment, after decrypting the request parameters of the data acquisition request from the client of the analysis system using a private key, the method further includes:

[0023] Determine whether the request parameters contain sensitive words; if so, reject the request.

[0024] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0025] The system verifies the random number in the data retrieval request from the client of the analysis system and determines whether the random number already exists in the cache. If it does, the request is rejected.

[0026] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes:

[0027] The token in the data retrieval request from the client of the analysis system is verified to determine whether the token exists in the cache. If it does not exist, the request is rejected.

[0028] This application provides a power data compression and encryption transmission device, applied to the server side of an analysis system, the device comprising:

[0029] The power data acquisition module is used to acquire power data outside the set threshold range after receiving a data acquisition request from the client of the analysis system.

[0030] An encryption module is used to generate a first key using a symmetric encryption algorithm, and to encrypt power data outside the threshold range using the first key, and to encrypt the first key using a private key;

[0031] A transmission module is used to transmit encrypted power data outside the threshold range and an encrypted first key to the client; so that the client performs the following steps: decrypting the encrypted first key using the public key to obtain the first key, and decrypting the encrypted power data using the first key; wherein the private key and the public key are generated using an asymmetric algorithm.

[0032] This application provides a server, including a memory and a processor, wherein the memory stores a computer program and the processor executes the above-described method.

[0033] This application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor using the methods described above.

[0034] This application provides a computer program product having a computer program stored thereon, the computer program being executed by a processor using the above-described method.

[0035] The aforementioned method, apparatus, server, storage medium, and computer program product for compressing and encrypting power data mainly involves receiving a data acquisition request from a client of an analysis system, acquiring power data outside a set threshold range, generating a first key using a symmetric encryption algorithm, encrypting the power data outside the threshold range using the first key, encrypting the first key using a private key, and transmitting the encrypted power data outside the threshold range and the encrypted first key to the client. The client then performs the following steps: decrypting the encrypted first key using a public key to obtain the first key, and decrypting the encrypted power data using the first key. The private key and the public key are generated using an asymmetric algorithm. This approach first completes the compression and filtering of power data by setting a threshold, and then combines asymmetric and symmetric algorithms for power data transmission, greatly improving the transmission speed and security of power data. Attached Figure Description

[0036] Figure 1This is a diagram illustrating the application environment of a power data compression and encryption transmission method in one embodiment.

[0037] Figure 2 This is a flowchart illustrating a power data compression and encryption transmission method in one embodiment;

[0038] Figure 3 This is a flowchart illustrating a power data compression and encryption transmission method in one embodiment;

[0039] Figure 4 This is a flowchart illustrating a power data compression and encryption transmission method in one embodiment;

[0040] Figure 5 This is a structural block diagram of a power data compression and encryption transmission device in one embodiment;

[0041] Figure 6 This is an internal structure diagram of the server in one embodiment. Detailed Implementation

[0042] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0043] In this application, the reference to "embodiment" means that a specific feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described in this application can be combined with other embodiments.

[0044] The power data compression and encryption transmission method provided in this application can be applied to, for example... Figure 1 In the application environment shown, client 102 and server 104 communicate via a network. Specifically, client 102 sends a data retrieval request to server 104. After receiving the data query request, server 104 encrypts the power data outside the threshold range and then transmits it to client 102. Client 102 decrypts the encrypted power data to obtain the decrypted power data.

[0045] In one embodiment, such as Figure 2 As shown, a method for compressing and encrypting power data transmission is provided, which can be applied to... Figure 1 Taking the server-side as an example, the explanation includes the following steps:

[0046] Step S201: After receiving a data acquisition request from the client of the analysis system, acquire power data outside the set threshold range.

[0047] Specifically, the aforementioned thresholds are set based on the characteristics of power data. For example, if the standard voltage value of power data is set to 220V as a threshold, then power data with a standard voltage value greater than 220V is considered power data outside the threshold range. Data transmission only transmits power data outside the threshold range, which greatly reduces the amount of data and improves transmission efficiency.

[0048] Step S202: Generate a first key using a symmetric encryption algorithm, encrypt power data outside the threshold range using the first key, and encrypt the first key using a private key.

[0049] Step S203: The encrypted power data outside the threshold range and the encrypted first key are transmitted to the client; so that the client performs the following steps: decrypting the encrypted first key using the public key to obtain the first key, and decrypting the encrypted power data using the first key; wherein the private key and the public key are generated using an asymmetric algorithm.

[0050] Specifically, in combination Figure 3 To clarify, the data sender is the server, and the data receiver is the client. In the aforementioned symmetric encryption, a randomly generated key is used for both encrypting and decrypting power data; this key is called the first key, and this encryption method is also known as single-key encryption. For symmetric encryption, the sender and receiver must agree on a key before data transmission and ensure both parties keep it secure. Furthermore, if one party's key is leaked, the encrypted information is insecure. Additionally, each pair of users needs a unique key unknown to others each time they use the symmetric encryption algorithm, resulting in a huge number of keys possessed by both parties, making key management a burden for both.

[0051] The aforementioned asymmetric encryption uses a public key and a private key. The private key decrypts data encrypted with the public key, and vice versa; that is, the private and public keys can encrypt and decrypt each other. The private key must be kept secret by one party and cannot be disclosed, while the public key can be given to any requesting party. Therefore, the private key does not need to be sent over the network, greatly improving security, but at a slower speed. Therefore, a first key generated using a symmetric algorithm is used to encrypt the power data, and then the first key is encrypted with the private key generated using an asymmetric algorithm. The public key generated by the asymmetric algorithm is sent to the client before data transmission. After the power data and the first key are encrypted, the encrypted power data and the first key are transmitted to the client. Finally, the client decrypts the encrypted first key using the public key, and then decrypts the encrypted power data using the first key to obtain the unencrypted power data, ensuring both efficiency and security in data transmission.

[0052] In the aforementioned method for compressing and encrypting power data, the main process involves receiving a data acquisition request from the client of the analysis system, acquiring power data outside a set threshold range, generating a first key using a symmetric encryption algorithm, encrypting the power data outside the threshold range using the first key, encrypting the first key using a private key, and then transmitting the encrypted power data outside the threshold range and the encrypted first key to the client. This allows the client to execute the following steps: decrypting the encrypted first key using a public key to obtain the first key, and then decrypting the encrypted power data using the first key. The private key and the public key are generated using an asymmetric algorithm. This approach first completes the compression and filtering of power data by setting a threshold, and then combines asymmetric and symmetric algorithms for power data transmission, greatly improving the transmission speed and security of power data.

[0053] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: verifying whether the client IP (Internet Protocol) address of the analysis system is in a whitelist; if not, the request is directly rejected.

[0054] Specifically, the above method involves adding an IP whitelist on the server side, so that only IP addresses on the whitelist can access the server interface, also known as a whitelist mechanism.

[0055] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: verifying whether the frequency of the data acquisition request from the client of the analysis system exceeds a first preset value; if it does, the request is rejected.

[0056] Specifically, the above method is also called interface request frequency verification. It is mainly used to ensure service performance and protect data security. If there is no restriction, the client can access it at will, which will put a lot of pressure on the server and reduce performance. If the number of times the same interface is accessed exceeds a first set value within a period of time, an exception will be thrown and the request will be rejected. The first set value can be set to 20 times per minute.

[0057] In one embodiment, verifying whether the frequency of data acquisition requests from the client of the analysis system exceeds a set value includes: obtaining the IP address of the client of the analysis system; and determining whether the number of accesses by the IP address within a set time period exceeds a set number.

[0058] Specifically, whether the request frequency of a certain client exceeds the set value is determined by the access frequency of the client's IP address. If the access frequency of an IP address exceeds the set number within a certain time period, such as 20 times per minute, then the client corresponding to that IP address has exceeded the set number of accesses within the set time period.

[0059] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: comparing the timestamp of the data acquisition request from the client of the analysis system with the current time on the server side; if the difference between the two is greater than a second preset value, the request is rejected.

[0060] Specifically, the above method is also called the timestamp timeout mechanism. The client sends a timestamp of the current time with each request. After receiving the timestamp, the server compares it with the current time of the server. If the time difference is greater than a second set value, the request is rejected. The second set value can be set to 5 minutes.

[0061] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: decrypting the request parameters of the data acquisition request from the client of the analysis system using a private key; calculating a signature based on the request parameters; comparing the obtained signature with the signature of the data acquisition request from the client of the analysis system; if the comparison result indicates that the signatures are equal, then the signature verification is passed and the request is accepted; if the comparison result indicates that the signatures are not equal, then the request is rejected.

[0062] Specifically, the above method is also known as data message signature verification. The client can generate a message digest from the original request parameters using a hash algorithm, then encrypt it with a public key to obtain a digital signature, and decrypt the request parameters using a private key. The server recalculates the signature based on the request parameters and other information, and compares the resulting signature with the signature in the request header. If the signatures are equal, the verification is successful; otherwise, the request is rejected.

[0063] In one embodiment, after decrypting the request parameters of the data acquisition request of the client of the analysis system using a private key, the method further includes: determining whether there are sensitive words in the request parameters; if so, rejecting the request.

[0064] Specifically, the above method is also known as a sensitive word filtering mechanism. Sensitive words include delete, insert, drop, and truncate. The server replaces these sensitive words with whitespace characters to ensure system security.

[0065] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: verifying the random number in the data acquisition request from the client of the analysis system, determining whether the random number already exists in the cache, and if it exists, rejecting the request.

[0066] Specifically, adding a random number parameter during the signature request process ensures that even if the request parameters are the same, the generated signatures will be different. If the server finds that there is a random number in the server's cache that is the same as the one sent by the client within a certain period of time, it will determine that the request is invalid and reject the request.

[0067] In one embodiment, after receiving a data acquisition request from the client of the analysis system, the method further includes: verifying the token in the data acquisition request from the client of the analysis system, determining whether the token exists in the cache, and rejecting the request if it does not exist.

[0068] Specifically, before the client requests data from the server, the server returns a unique token to the client and stores the token in the cache as a key-value pair. The client must include this token in all subsequent operations on modules that require authorization. After receiving the request, the server first verifies the token. If the token exists, it indicates that the request is legitimate.

[0069] To better understand the above method, the following details an application example of the power data compression and encryption transmission method of this application.

[0070] Combination Figure 4 To explain, the client of the analysis system first calculates the request signature based on the request parameters such as the request address, timestamp, random number, and user key (account), and obtains the signature. The client of the analysis system then encrypts the request parameters to obtain the encryption key and the encrypted parameter body. The client of the analysis system sets the request signature, request timestamp, random number, and encryption key into the request header and sends the request.

[0071] Specifically, the client can use hash algorithms such as MD5 and SHA-256 to generate a message digest from the original request parameters, then encrypt it with a public key to obtain a digital signature, i.e., a request signature, and send the request signature and request together to the server.

[0072] When the server receives a request, it verifies whether the requesting IP address is in the whitelist. Requests from IPs not in the whitelist are rejected. Specifically, by adding IP addresses to a whitelist on the server side, only IP addresses on the whitelist can access the server's interface; this is also known as a whitelist mechanism.

[0073] The server compares the timestamp in the request header with the server time. If the difference is greater than 5 minutes, the request is rejected. This method is also known as the timestamp timeout mechanism. The client sends a timestamp with the current time every time it sends a request. After receiving the timestamp, the server compares it with the current time on the server. If the time difference is greater than 5 minutes, the request is rejected.

[0074] The server uses its private key to decrypt the request body parameters. The server then recalculates the signature based on the request parameters and other information. The resulting signature is compared with the signature in the request header. If the signatures are equal, the signature verification is successful; otherwise, the request is rejected.

[0075] After decrypting the parameter body, the server checks for sensitive words; if any are found, the request is rejected.

[0076] Specifically, the above method is also known as a sensitive word filtering mechanism. Sensitive words include delete, insert, drop, and truncate. The server replaces these sensitive words with whitespace characters to ensure system security.

[0077] The server checks whether the user's key has access permissions; if not, it rejects the request.

[0078] The server performs request frequency and uniqueness checks on the client, determining whether the same request address has been accessed more than 20 times within 1 minute. If so, the request is rejected. Based on the random number in the request, the server checks whether the random number already exists in the cache. If it does, the request is rejected.

[0079] Specifically, request frequency verification mainly determines whether the client's request frequency exceeds a set value. This is primarily determined by the access frequency of the client's IP address. If an IP address's access frequency exceeds a set number within a certain time period (e.g., 20 times per minute), then the client corresponding to that IP address has exceeded the set number of accesses within the set time period, and the request is rejected. Simultaneously, uniqueness verification is performed by adding a random number parameter during the request signing process. This ensures that even if the request parameters are the same, the generated signatures will be different. If the server finds a random number in its cache that is identical to the client's request within a certain period, it determines that the request is invalid and rejects it.

[0080] The server verifies the token in the data retrieval request from the client of the analysis system and checks whether the token exists in the cache. If it does not exist, the request is rejected.

[0081] Specifically, before the client requests data from the server, the server returns a unique token to the client and stores the token in the cache as a key-value pair. The client must include this token in all subsequent operations on modules that require authorization. After receiving the request, the server first verifies the token. If the token exists, it indicates that the request is legitimate.

[0082] Analyze data characteristics, classify data outside the threshold range as abnormal data, and encrypt power data within the threshold range.

[0083] Specifically, the aforementioned thresholds are set based on the characteristics of power data. For example, if the standard voltage value of power data is set to 220V as a threshold, then power data with a standard voltage value greater than 220V is considered power data outside the threshold range. Data transmission only transmits power data outside the threshold range, which greatly reduces the amount of data and improves transmission efficiency.

[0084] In the process of encrypting power data, a public key is distributed to each client before power data transmission. The server randomly generates a symmetric encryption key (typically a 16-character string) before encrypting the data. The data is then encrypted using the key, and the private key is used to encrypt the key again, resulting in the encrypted key. Both the encrypted power data and the encrypted key are sent to the calling client. The client receives the encrypted power data and the encrypted key, decrypts the encrypted key using the public key to obtain the unencrypted key, and then uses the key to decrypt the encrypted data again, thus completing the secure transmission of the power data.

[0085] Finally, request logs are recorded, the data is included in the response body, and the analysis system decrypts the data to display it to the user. Specifically, request logs can help users monitor important changes to the website, alert them to impending threats, detect external intrusions and vulnerabilities, and provide insights into the issues.

[0086] The above-mentioned method for compressing and encrypting power data transmission has at least the following advantages:

[0087] 1. Power data compression significantly reduces the amount of data transmitted and improves the efficiency of power data transmission.

[0088] 2. Symmetric encryption uses the same key for both encryption and decryption, making it fast, but its security is low because the key needs to be transmitted over the network. Asymmetric encryption uses a pair of keys, a public key and a private key, resulting in high security, but slower encryption and decryption speeds. By encrypting the symmetric encryption key using the asymmetric encryption public key and then sending it out, the receiver uses the private key to decrypt it to obtain the symmetric encryption key. Both parties can then use symmetric encryption for communication, greatly improving the efficiency and security of power data transmission.

[0089] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0090] In one embodiment, such as Figure 5 As shown, a power data compression and encryption transmission device is provided, characterized in that it is applied to the server side of an analysis system, and the device includes:

[0091] The power data acquisition module 501 is used to acquire power data outside a set threshold range after receiving a data acquisition request from the client of the analysis system.

[0092] The encryption module 502 is used to generate a first key using a symmetric encryption algorithm, and to encrypt power data outside the threshold range using the first key, and to encrypt the first key using a private key;

[0093] The transmission module 503 is used to transmit the encrypted power data outside the threshold range and the encrypted first key to the client, so that the client can perform the following steps: decrypting the encrypted first key with the public key to obtain the first key, and decrypting the encrypted power data with the first key; wherein the private key and the public key are generated by an asymmetric algorithm.

[0094] In one embodiment, the device further includes a whitelist verification module for verifying whether the client IP address of the analysis system is in the whitelist; if not, the request is directly rejected.

[0095] In one embodiment, the device further includes a frequency verification module for verifying whether the frequency of data acquisition requests from the client of the analysis system exceeds a first preset value; if it does, the request is rejected.

[0096] In one embodiment, the frequency verification module is further configured to obtain the IP address of the client of the analysis system and determine whether the number of accesses by the IP address within a set time period exceeds a set number.

[0097] In one embodiment, the device further includes a time comparison module, which compares the timestamp of the data acquisition request from the client of the analysis system with the current time on the server side. If the difference between the two is greater than a second preset value, the request is rejected.

[0098] In one embodiment, the device further includes a signature comparison module, used to decrypt the request parameters of the data acquisition request of the client of the analysis system using a private key, calculate a signature based on the request parameters, compare the obtained signature with the signature of the data acquisition request of the client of the analysis system, if the comparison result indicates that the signatures are equal, then the signature verification is passed and the request is accepted; if the comparison result indicates that the signatures are not equal, then the request is rejected.

[0099] In one embodiment, the device further includes a sensitive word determination module, used to determine whether there are sensitive words in the request parameters, and if so, to reject the request.

[0100] In one embodiment, the device further includes a sensitive word judgment module, used to verify the random number in the data acquisition request of the client of the analysis system, determine whether the random number has already existed in the cache, and if it exists, reject the request.

[0101] Specific limitations regarding the power data compression and encryption transmission device can be found in the limitations of the power data compression and encryption transmission method described above, and will not be repeated here. Each module in the aforementioned power data compression and encryption transmission device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0102] In one embodiment, a server is provided, which may be a physical server, and its internal structure diagram may be as follows: Figure 6 As shown, the server includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores power-compressed encrypted transmission data. The network interface communicates with external terminals via a network connection. The server also includes input / output interfaces, which are circuits connecting the processor and external devices for exchanging information; these interfaces are connected to the processor via a bus and are referred to as I / O interfaces. When the computer program is executed by the processor, it implements a power-compressed encrypted transmission method.

[0103] Those skilled in the art will understand that Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0104] In one embodiment, a server is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the various method embodiments described above.

[0105] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps in the various method embodiments described above.

[0106] In one embodiment, a computer program product is provided having a computer program stored thereon, the computer program being executed by a processor of the steps described in the various method embodiments above.

[0107] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0109] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0110] The above embodiments are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for compressed and encrypted transmission of power data, characterized in that, The method, applied to the server side of an analysis system, includes: Upon receiving a data retrieval request from the client of the analysis system, if the client's IP address is in the whitelist, the frequency of the client's data retrieval requests does not exceed a first preset value, the difference between the timestamp of the client's data retrieval request and the current time on the server does not exceed a second preset value, and the token in the client's data retrieval request exists in the cache, then the request parameters of the data retrieval request are decrypted using the private key. If the request parameters do not contain any sensitive words, a signature is calculated based on the request parameters. The token is pre-sent to the client by the server. The obtained signature is compared with the signature of the data acquisition request from the analysis system client; If the comparison results indicate that the signatures are equal, then the signature verification is confirmed to be successful, the request is accepted, and the power data outside the set threshold range is obtained; the power data outside the set threshold range is abnormal data determined through data feature analysis. A first key is generated using a symmetric encryption algorithm, and the first key is used to encrypt power data outside the threshold range. The first key is then encrypted using a private key. The encrypted power data outside the threshold range and the encrypted first key are transmitted to the client; so that the client performs the following steps: using the public key, decrypting the encrypted first key to obtain the first key, and using the first key to decrypt the encrypted power data; wherein, the private key and the public key are generated by an asymmetric algorithm.

2. The method according to claim 1, characterized in that, After receiving a data acquisition request from the client of the analysis system, the method further includes: Verify whether the client IP address of the analysis system is in the whitelist; if not, reject the request directly.

3. The method according to claim 1, characterized in that, After receiving a data acquisition request from the client of the analysis system, the method further includes: The system verifies whether the frequency of data acquisition requests from the client of the analysis system exceeds a first preset value; if it does, the request is rejected.

4. The method according to claim 3, characterized in that, The verification of whether the frequency of data acquisition requests from the client of the analysis system exceeds a first preset value includes: Obtain the IP address of the client of the analysis system; Determine whether the number of times the IP address is accessed within a set time period exceeds the set limit.

5. The method according to claim 1, characterized in that, After receiving a data acquisition request from the client of the analysis system, the method further includes: The timestamp of the data acquisition request from the client of the analysis system is compared with the current time on the server. If the difference between the two is greater than a second set value, the request is rejected.

6. The method according to claim 1, characterized in that, The method further includes: If the comparison results indicate that the signatures are not equal, the request is rejected.

7. The method according to claim 1, characterized in that, After decrypting the request parameters of the data retrieval request from the client of the analysis system using the private key, the method further includes: Determine whether the request parameters contain sensitive words; if so, reject the request.

8. The method according to claim 1, characterized in that, After receiving a data acquisition request from the client of the analysis system, the method further includes: The system verifies the random number in the data retrieval request from the client of the analysis system and determines whether the random number already exists in the cache. If it does, the request is rejected.

9. A device for compressing and encrypting power data transmission, characterized in that, The device, used in the server-side of an analysis system, includes: The power data acquisition module, upon receiving a data acquisition request from a client of the analysis system, determines the following: if the client's IP address is in a whitelist, the frequency of the client's data acquisition requests does not exceed a first preset value, the difference between the timestamp of the client's data acquisition request and the current time on the server does not exceed a second preset value, and the token in the client's data acquisition request exists in the cache, then the module uses a private key to decrypt the request parameters of the data acquisition request. If the request parameters contain no sensitive words, a signature is calculated based on the request parameters. The obtained signature is compared with the signature of the data acquisition request from the analysis system client. If the comparison result indicates that the signatures are equal, the signature verification is successful, the request is accepted, and power data outside a set threshold range is acquired. The power data outside the set threshold range is abnormal data determined through data feature analysis. The token is pre-sent to the client by the server. An encryption module is used to generate a first key using a symmetric encryption algorithm, and to encrypt power data outside the threshold range using the first key, and to encrypt the first key using a private key; A transmission module is used to transmit encrypted power data outside the threshold range and an encrypted first key to the client; so that the client performs the following steps: decrypting the encrypted first key using the public key to obtain the first key, and decrypting the encrypted power data using the first key; wherein the private key and the public key are generated using an asymmetric algorithm.

10. A server comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 8.

Citation Information

Patent Citations

  • Scada quasi-real-time data storage method and system

    CN108595120A

  • Encryption method, system and terminal device for electric power data

    CN109104279A

  • Data transmission method and system based on hybrid encryption algorithm

    CN110535868A

  • Terminal security access method and terminal security access system based on narrowband Internet of Things

    CN111372247A

  • Data transmission method, device and system and storage medium

    CN114726597A