Concentrator and data security processing method, device and storage medium thereof
By decrypting in the concentrator and determining the verification position and rules based on the data size for verification, the risk of illegal modification when the concentrator transmits data is solved, and the reliability of remote management is improved.
Patent Information
- Application Number
- CN202410818266.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-06-24
AI Technical Summary
When the data is transmitted by the concentrator, there is a risk of illegally modifying the data, which affects the reliability of remote management.
By obtaining the encrypted data transmitted by the data acquisition terminal, decryption, determine the location and verification rules of the verification data based on the size of the plain text data, perform security verification, and send verification results to the server.
Even if the key is cracked, it can still be effectively verified based on the data size, increasing data security and improving the reliability of remote management.
Smart Images

Figure CN118381676B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of concentrators, and in particular to concentrators and data security processing methods, devices and storage media thereof. Background Art
[0002] A concentrator is a device used to connect multiple data acquisition terminals and centrally process the data from multiple data acquisition terminals, including classification, statistics and analysis, and transmit the processed data to the main station or server to achieve remote management and monitoring of data, including monitoring the electricity consumption data of the data acquisition terminals to bill according to the monitored electricity consumption data.
[0003] When the concentrator monitors and bills data, there may be illegal acts of modifying the billing data. Although the security of the monitoring data can be improved by encrypting the key between the concentrator and the data collection terminal, if the key is illegally obtained, the collected data may be illegally modified, such as modifying a large value collected by the data collection terminal to a smaller value, which is not conducive to improving the reliability of remote management. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a concentrator and a data security processing method, device and storage medium thereof to solve the problem in the prior art that it is not conducive to improving the reliability of remote management when transmitting data through the concentrator.
[0005] A first aspect of an embodiment of the present application provides a data security processing method of a concentrator, the method comprising:
[0006] Acquire encrypted data transmitted by a data acquisition terminal, wherein the encrypted data includes verification data and monitoring data;
[0007] Decrypting the encrypted data to determine the plaintext data included in the encrypted data;
[0008] Determining, according to the size of the transmitted plaintext data, a location and a verification rule of the verification data included in the plaintext data;
[0009] According to the location and verification rules of the verification data, the plaintext data is security verified, and the result of the security verification is sent to the server.
[0010] In combination with the first aspect, in a first possible implementation manner of the first aspect, determining the position of the check data included in the plaintext data according to the size of the transmitted plaintext data includes:
[0011] Obtaining a difference between currently received plaintext data and predicted data corresponding to the plaintext data;
[0012] When the difference is greater than a predetermined difference threshold, and the interval time between the previous verification data and the previous verification data is greater than a predetermined first interval time threshold, it is determined that the next plaintext data of the currently received plaintext data is the verification data.
[0013] In combination with the first possible implementation manner of the first aspect, in a second possible implementation manner of the first aspect, after obtaining a difference between the currently received plaintext data and the predicted data corresponding to the plaintext data, the method further includes:
[0014] When the difference is less than or equal to a predetermined difference threshold, and the interval between the currently received encrypted data and the previous verification data is greater than a second interval threshold, determining that the next plaintext data of the currently received plaintext data is the verification data;
[0015] The second interval duration threshold is greater than the first interval duration threshold.
[0016] In combination with the first possible implementation manner of the first aspect, in a third possible implementation manner of the first aspect, before determining that plaintext data subsequent to the currently received plaintext data is verification data, the method further includes:
[0017] Determine a first numerical range to which the difference value belongs;
[0018] According to the correspondence between the preset value range and the interval duration threshold, the first interval duration threshold corresponding to the difference is determined, wherein the larger the difference is, the smaller the corresponding first interval duration threshold is.
[0019] In combination with the first aspect, in a fourth possible implementation manner of the first aspect, determining the position of the check data included in the plaintext data according to the size of the transmitted plaintext data includes:
[0020] Determine a first calculation rule based on plaintext data obtained by decrypting encrypted data received at a previous time before the encrypted data received at a current time, and obtain a first calculation result based on the plaintext data and the first calculation rule, wherein the amount of plaintext data obtained by decrypting the encrypted data received at a single time is a first predetermined amount;
[0021] Determine a second numerical range to which the first calculation result belongs according to a preset numerical range;
[0022] According to the correspondence between the preset numerical range and the position, the first position corresponding to the second numerical range is determined, and the first position is the position of the verification data in the plaintext data currently received.
[0023] In combination with the first aspect, in a fifth possible implementation manner of the first aspect, determining, according to the size of the transmitted plaintext data, a verification rule for the verification data included in the plaintext data includes:
[0024] Calculating a second predetermined number of data before the verification data, obtaining a second calculation result using a second calculation rule, and determining a third numerical range to which the second calculation result belongs;
[0025] The amount of plaintext data used for verification calculation is determined according to the corresponding relationship between the preset numerical range and the amount of plaintext data.
[0026] In combination with the fifth possible implementation manner of the first aspect, in a sixth possible implementation manner of the first aspect, after calculating a second predetermined number of data before the verification data, obtaining a second calculation result using a second calculation rule, and determining a third numerical range to which the second calculation result belongs, the method further includes:
[0027] According to the correspondence between the preset numerical range and the verification rule, the verification rule corresponding to the third numerical range and used for performing security verification is determined.
[0028] A second aspect of an embodiment of the present application provides a data security processing device of a concentrator, the device comprising:
[0029] A data acquisition unit, used to acquire encrypted data transmitted by the data acquisition terminal, wherein the encrypted data includes verification data and monitoring data;
[0030] A decryption unit, used to decrypt the encrypted data to determine the plaintext data included in the encrypted data;
[0031] A position and verification rule determination unit, configured to determine the position and verification rule of the verification data included in the plaintext data according to the size of the transmitted plaintext data;
[0032] The security verification unit is used to perform security verification on the plaintext data according to the location and verification rules of the verification data, and send the result of the security verification to the server.
[0033] A third aspect of an embodiment of the present application provides a concentrator, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any method described in the first aspect when executing the computer program.
[0034] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method described in any one of the first aspects are implemented.
[0035] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the present application obtains the encrypted data transmitted by the data acquisition terminal, decrypts the encrypted data to obtain the plaintext data, and determines the position and verification rules of the verification data included in the plaintext data according to the size of the plaintext data, and performs verification according to the position and verification rules of the verification data. For example, the first verification value included in the received plaintext data can be determined according to the position of the verification data, and the second verification value can be determined after verification calculation according to the verification rules, and the verification result is determined by comparing whether the first verification value and the second verification value are the same. Since the present application further encrypts the verification position and verification rules according to the size of the plaintext data based on the key, even if the key is cracked, the verification data can still be effectively encrypted based on the size of the data, which increases the security of the data and is conducive to improving the reliability of remote management using the concentrator. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0037] Figure 1 This is a schematic diagram of an application environment of a concentrator provided in an embodiment of the present application;
[0038] Figure 2 It is a schematic diagram of the implementation flow of a data security processing method of a concentrator provided in an embodiment of the present application;
[0039] Figure 3 It is a schematic diagram of a structure of encrypted data provided by an embodiment of the present application;
[0040] Figure 4 This is a schematic diagram of a data verification structure provided by an embodiment of the present application;
[0041] Figure 5 is a schematic diagram of determining the location of verification data provided by an embodiment of the present application;
[0042] Figure 6 It is a schematic diagram of an implementation flow of determining the location of verification data provided by an embodiment of the present application;
[0043] Figure 7 It is a schematic diagram of an implementation flow of determining the location of verification data provided by an embodiment of the present application;
[0044] Figure 8 It is a schematic diagram of a data security processing device of a concentrator provided in an embodiment of the present application;
[0045] Fig. 9 It is a schematic diagram of a concentrator provided in an embodiment of the present application. DETAILED DESCRIPTION
[0046] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0047] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0048] Figure 1 A schematic diagram of an application topology structure of a concentrator provided in an embodiment of the present application. Figure 1 As shown, the application topology of the concentrator includes an electric meter, a concentrator and a server. The electric meters include electric meter 1, electric meter 2 and electric meter 3, which are not limited to the three electric meters connected in the figure, and can also include any other number of electric meters. Among them, the electric meter is a data acquisition terminal installed at the user end. In the smart grid, the electric meter is usually a smart meter, which is used to collect the user's electricity usage data and send the collected data to the concentrator through the communication network. The data acquisition terminal is not limited to the electric meter, but can also include other types of equipment, including water meters, gas meters, etc., or can also be connected to other sensors, controllers or actuators. Sensors can include temperature, humidity, pressure, gas detection sensors, etc. Controllers can include PLC controllers of industrial machinery or automation systems, etc. Actuators can include motors, valves, switches, etc.
[0049] The concentrator is used to receive data collected by data collection terminals such as electric meters, analyze and process the collected data, and send the received data of multiple electric meters to the server to reduce the communication pressure of the server. In order to improve the security of data transmission between the electric meter and the concentrator, the data transmitted from the electric meter to the concentrator is usually encrypted with a key. If possible, after obtaining the key, illegal personnel will tamper with the uploaded electric meter data, thereby underreporting the electricity usage data and causing losses to the power company.
[0050] In order to solve the above problems and improve the reliability of the collected data, the embodiment of the present application further processes the data securely through a concentrator on the basis of the key, and dynamically updates the location and verification rules of the verification data based on the data value, thereby improving the reliability of the verification of the collected data, and enabling more reliable remote management of data collection terminals such as electric meters through the concentrator.
[0051] Figure 2 A schematic diagram of the implementation flow of a data security processing method of a collector provided for the implementation of this application is described in detail as follows:
[0052] In S201, encrypted data transmitted by a data acquisition terminal is obtained, wherein the encrypted data includes verification data and monitoring data.
[0053] The data acquisition terminal in the embodiment of the present application may include devices such as electric meters, or may also include sensors, actuators, controllers, etc. The concentrator can centrally process the collected data and forward it to the server to which the data acquisition device needs to upload. The concentrator can centrally process the data, which can effectively reduce the communication pressure of the server.
[0054] The data collected by the data collection terminal may be the user's resource usage data. In this case, when the concentrator transmits the collected data to the server, the server can charge according to the collected data. In order to make the billing more reliable, the data collection terminal will encrypt the collected data. For example, the data collection terminal can use the first key to encrypt the data to obtain encrypted data; the concentrator can decrypt the encrypted data using the second key.
[0055] The first key and the second key may be symmetric keys or asymmetric keys. When the first key and the second key are symmetric keys, the first key and the second key are the same. When the first key and the second key are asymmetric keys, the first key may be a public key and the second key may be a private key.
[0056] In an embodiment of the present application, when the data acquisition terminal generates encrypted data based on the collected data, it can perform an encryption calculation and send the collected predetermined amount of data once, that is, send the single ciphertext data including the first predetermined amount of data as a data packet, thereby reducing the communication power consumption of the concentrator.
[0057] When the encrypted data generated by the data collection terminal includes the first predetermined amount of data, one or more verification data may be included in one encrypted data, or one verification data may be included in one or more encrypted data.
[0058] A first predetermined number of data may be included in one encrypted data, the first predetermined number is N, and N is a natural number greater than 2. Figure 3 In the schematic diagram of the structure of encrypted data shown in FIG. 1 , among the N data, there is a verification data y1 and N-1 sensor data x1, x2, x3, x4, x5, x6, x7, x8…x N-1(When the data collection terminal is an electric meter, the sensor data is electric energy data.) That is, one encrypted data can be sent at a time, and the encrypted data includes a first predetermined amount of data N. The position of the verification data and the verification rule of the verification data can be determined according to the size of the data in the previous encrypted data.
[0059] N1 data ranges can be pre-set, and different verification data positions and different verification rules can be set for each data range. When determining the position of the verification data in the data packet sent by the data acquisition terminal at the current time, the first calculation rule of the data in the data packet sent last time can be used, such as by calculating the first calculation result of the data in the data packet sent last time, including arithmetic mean, weighted mean, median, geometric mean, etc. According to the correspondence between the calculation result and the numerical range, the second numerical range to which the first calculation result belongs is determined. Based on the correspondence between the numerical range and the position of the verification data, and the correspondence between the numerical range and the verification rule of the verification data, the position of the verification data in the data packet sent at the current time and the verification rule of the data are determined. According to the multiple data in the encrypted data sent last time, combined with the determined verification rule, the size of the verification value is calculated.
[0060] There is no encrypted data before the earliest encrypted data, so the earliest encrypted data may not include verification data. When it is detected that the encrypted data is the earliest encrypted data, security verification may not be performed.
[0061] In a possible implementation, the concentrator may also perform encryption calculation on each data and transmit it to the server in real time to meet the real-time requirements of the server to obtain data from the data acquisition terminal. In this case, the first predetermined number may also be the data collected within a pre-set data verification cycle. That is, for the data collected within the current data verification cycle, the first calculation result can be calculated based on the data within the previous data verification cycle in combination with the first calculation rule, and the position of the verification data within the current data verification cycle and the verification rule of the verification data can be determined based on the second numerical range to which the first calculation result belongs, in combination with the correspondence between the numerical range and the position, and the correspondence between the numerical range and the verification rule.
[0062] When the concentrator receives the data collected by the data collection terminal in real time for decryption, or the data collection terminal encrypts the collected data, the size of the data verification period can be determined in advance according to the frequency of data collection, for example, the data verification period can be preset to be 1 hour, 6 hours, or one day. After determining the size of the data verification period, the corresponding relationship between the data verification period and the time period can be set. According to the corresponding relationship, the data collected at different times can be divided into corresponding data verification periods.
[0063] like Figure 4 As shown is a schematic diagram of a data verification structure provided in an embodiment of the present application. When a data verification cycle is 6 hours and a day includes a total of 4 data verification cycles, the data verification cycle division may include: [0 o'clock, 6 o'clock) is the first data verification cycle of the day, [6 o'clock, 12 o'clock) is the second data verification cycle of the day, [12 o'clock, 18 o'clock) is the third data verification cycle of the day, and [18 o'clock, 24 o'clock) is the fourth data verification cycle of the day.
[0064] In a data verification cycle, the position of the verification data in the current data verification cycle and the verification rule of the verification data can be determined according to the size of the data in the previous data verification cycle.
[0065] like Figure 4 As shown, M data can be collected in the i-th (i is a natural number greater than 1) data verification cycle, and the position and verification rules of the verification data in the current data verification cycle can be determined according to the size of the plaintext data included in the ciphertext data sent in the previous data verification cycle of the i-th data verification cycle, that is, the i-1-th data verification cycle (which may include verification data and sensor data, or may only include sensor data). Assuming that there is 1 verification data in the data verification cycle, a data verification cycle may include M-1 sensor data and 1 verification data, and the M-1 sensor data are encrypted by the key to obtain M-1 encrypted data, and the verification data is encrypted by the key to obtain encrypted data of one key.
[0066] There is no data verification cycle before the earliest data verification cycle, so the initial data verification cycle may not include verification data. When it is detected that the encrypted data is the encrypted data in the earliest data verification cycle, security verification may not be performed.
[0067] The sensing data includes the usage value within the detection period and the cumulative usage value. For example, when the data collection terminal is an electric meter, the sensing data includes the power used within the detection period and the cumulative power used. The usage value within the detection period in the verification data is determined according to the verification rules, and the cumulative usage value in the verification data is determined according to the value of the verification data and the sum of the cumulative usage value in the previous sensing data of the verification data.
[0068] For example, use the validation rule to determine the value of the validation data to be x i , the cumulative usage value of the previous sensor data of the verification data is z i-1 , then the accumulated usage value in the verification data is x i +z i-1Since the cumulative usage value in the verification data matches the verification value, there is no obvious difference between the verification data and the ordinary sensor data.
[0069] In a possible implementation, if the concentrator also performs separate encryption calculations on each data and transmits it to the server in real time, the server can obtain the real-time requirements of the data from the data acquisition terminal. In this case, the same data prediction method can be used in the data acquisition terminal and the concentrator to predict the size of the currently collected data, that is, to determine the predicted data through the data prediction method. If there is a difference between the currently collected sensor data and the predicted data, the location and verification rules of the verification data are determined according to the size of the difference.
[0070] According to the difference between the predicted data and the currently collected sensor data, it is compared with the preset difference threshold. If the difference is greater than the difference threshold, and the interval time length with the previous verification data is greater than the predetermined first interval time length threshold, the position of the verification data can be determined to be the next position of the current sensor data. By comparing the difference, it can be determined whether the current data obviously deviates from the normal data range. The density of the verification data can be effectively reduced by the first interval time length threshold, so that the system can detect anomalies in a timely manner while effectively reducing the verification density.
[0071] like Figure 5 As shown, the numerical value of the currently collected sensor data is xi, the numerical value of the predicted data is xj, and the difference between the two is △x=|xi-xj|. The next data of the currently collected sensor data is xi+1, the first interval time threshold is T1, the second interval time threshold is T2, T1 is less than T2, the interval between the currently collected sensor data and the previous verification data is Tx, and the difference threshold is T3. If △x>T3, and Tx is greater than T1, the data position xi+1 can be set as the position of the verification data. In other words, although the interval between the current data and the previous verification data may be short, due to the large data deviation, the generation of verification data can be triggered.
[0072] If △x<=T3, and Tx is greater than T2, the data position xi+1 can be set as the position of the verification data. In other words, although the deviation of the current data prediction is small, the interval between the current time and the previous verification data generation time may be long, which can trigger the generation of verification data.
[0073] In a possible implementation, multiple different difference thresholds and multiple different interval duration thresholds may be set to achieve more sophisticated verification data triggering.
[0074] After triggering the generation of verification data, the next plaintext data after the current plaintext data can be used as verification data. According to the size of the difference threshold, verification rules of different verification levels are determined, and different amounts of sensor data are selected for verification calculation.
[0075] For example, when the difference is larger, a more complex verification rule can be selected, and a larger amount of plaintext data can be selected for verification calculation. When the difference is smaller, a less complex rule can be selected, and a smaller amount of plaintext data can be selected for calculation.
[0076] In S202, the encrypted data is decrypted to determine the plaintext data included in the encrypted data.
[0077] The decryption algorithm in the embodiment of the present application corresponds to the data encryption algorithm in the data acquisition terminal. According to the symmetric encryption algorithm or asymmetric encryption algorithm adopted by the data acquisition terminal, the key used for decryption is determined, and the decryption processing is performed according to the key to obtain the plaintext data included in the encrypted data, the plaintext data includes sensor data and verification data, the verification data includes a verification value and a cumulatively used value, and the sensor data includes a usage value and a cumulatively used value within a detection period.
[0078] In S203, the location and verification rule of the verification data included in the plaintext data are determined according to the size of the transmitted plaintext data.
[0079] For the sensor data and verification data included in the plaintext data, the embodiment of the present application introduces position verification and calculation verification of verification rules. The first verification value is determined by position verification, and the second verification value is determined by verification rule verification, so as to facilitate the detection of data security based on the comparison of the first verification value and the second verification value.
[0080] When determining the location and verification rules of the verification data in the plaintext data, if the data collection terminal Figure 3 In the manner shown, plaintext data, including sensing data and verification data, are encrypted in batches, and a first predetermined amount of plaintext data is encrypted each time. After the concentrator receives the encrypted data including sensing data and verification data in batches and decrypts the encrypted data to obtain plaintext data, if the plaintext data is not the earliest plaintext data (i.e., the first plaintext data obtained by decrypting the first encrypted data), it is necessary to determine the position of the verification data in the decrypted plaintext data. The process of determining the position of the verification data can be as follows: Figure 6 As shown, including:
[0081] In S601, a first calculation rule is determined based on plaintext data obtained by decrypting encrypted data received previously before the currently received encrypted data, and a first calculation result is obtained based on the plaintext data and the first calculation rule, wherein the amount of plaintext data obtained by decrypting encrypted data received at a single time is a first predetermined amount.
[0082] It is necessary to determine the position of the verification data and the first calculation rule of the verification data in the plaintext data obtained by decrypting the encrypted data received currently.
[0083] Since the encrypted data received before the currently received encrypted data is certain, the encrypted data received before can be decrypted to obtain the plaintext data. According to the size of the plaintext data, the position of the verification data applied to the currently received encrypted data and the first calculation rule of the verification data can be determined.
[0084] like Figure 3 As shown, the k-1th (k is a natural number) encrypted data can be decrypted to obtain a first predetermined number, that is, N plaintext data. The decrypted plaintext data is calculated according to a preset first calculation rule, such as arithmetic mean, weighted average and other calculation rules to obtain a first calculation result.
[0085] In S602, a second numerical range to which the first calculation result belongs is determined according to a preset numerical range.
[0086] After the first calculation result is calculated based on the encrypted data received last time, the second numerical range to which the first calculation result belongs can be determined based on a preset correspondence between the calculation result and the numerical range.
[0087] In S603, according to the correspondence between the preset numerical range and the position, the first position corresponding to the second numerical range is determined, and the first position is the position of the verification data in the plaintext data currently received.
[0088] Different numerical ranges may correspond to different locations of verification data. For example, the first numerical range may correspond to the first plaintext as verification data, or the first data range may correspond to the ith plaintext and the jth plaintext as verification data. The location of one or more verification data in the plaintext data may be determined according to the numerical range. Based on the determined location of the verification data, after decrypting the plaintext data, the verification data in the plaintext data may be extracted to determine the first verification value.
[0089] After the concentrator extracts and obtains the first verification value, it is also necessary to determine the amount of data for verification calculation and the verification rule for the verification calculation according to the received data.
[0090] Since the encrypted data before the currently received encrypted data is certain, the second calculation result can be determined by using the second calculation rule according to the second predetermined amount of encrypted data before the currently received encrypted data, or the second predetermined amount of plaintext data. The amount of plaintext data for verification calculation is determined according to the third numerical range to which the second calculation result belongs, combined with the correspondence between the preset numerical range and the amount of plaintext data.
[0091] Correspondingly, based on the third numerical range to which the second calculation result belongs, combined with the correspondence between the numerical range and the verification rule, the verification rule corresponding to the third numerical range can be determined, and according to the verification rule, the determined plaintext data is verified and calculated to obtain a second verification value.
[0092] The second check value is compared with the first check address. If the two are consistent, it indicates that the encrypted data has not been tampered with. If they are inconsistent, a data abnormality prompt can be generated to remind the staff to check the abnormal data.
[0093] for Figure 4 In the data encryption method shown, a single plaintext data is encrypted to obtain encrypted data, and the data verification period corresponding to each encrypted data can be determined. After receiving the encrypted data, the concentrator decrypts each encrypted data to obtain the plaintext data corresponding to each encrypted data. According to the generation time or collection time of the plaintext data, the data verification period to which the plaintext data belongs can be determined. For example Figure 4 In the data verification period division method shown, when the collection time of the plaintext data is 5:20, the data verification period to which the plaintext data belongs is the first data verification period.
[0094] After all data in a data verification cycle is received, a first calculation result can be obtained according to the plaintext data in the data verification cycle according to a first calculation rule, and the position of the verification data in the next data verification cycle can be determined according to the numerical range to which the first calculation result belongs.
[0095] Alternatively, the plaintext data used for verification calculation and the fourth calculation rule for verification calculation can be determined based on the data range to which the first calculation result belongs, combined with the correspondence between the numerical range and the plaintext data used for calculation, and the correspondence between the data range and the calculation rule.
[0096] for Figure 5 The data encryption method shown is to encrypt a single plaintext data to obtain encrypted data. The position of the verification data can be determined according to the deviation between the plaintext data and the predicted data, as well as the verification density of the verification data. Specifically, Figure 7 As shown, including:
[0097] In S701, a difference between currently received plaintext data and predicted data corresponding to the plaintext data is obtained.
[0098] After decrypting any received encrypted data to obtain the plaintext data xi, the concentrator determines the predicted data xj corresponding to the plaintext data through the same data prediction method as the data acquisition terminal, and determines the difference △x between xi and xj by comparison.
[0099] In S702, when the difference is greater than a predetermined difference threshold, and the interval time between the previous verification data and the previous verification data is greater than a predetermined first interval time threshold, it is determined that the next plaintext data of the currently received plaintext data is the verification data.
[0100] The first interval time threshold is T1, the difference threshold is T3, and the interval time between the current plaintext data and the previous verification data is Tx. If △x is greater than T3, it indicates that the deviation of the currently received plaintext data is large, and a security verification needs to be performed as soon as possible.
[0101] On the basis of large deviations, the verification frequency requirement needs to be further confirmed. If the next plaintext data of the currently received plaintext data (obtained through decryption) can meet the minimum interval duration requirement, that is, the interval duration between the current plaintext data and the previous verification data is greater than the first interval duration threshold T1, then the generation of verification data can be triggered, that is, the next plaintext data of the current plaintext data is determined as verification data.
[0102] In a possible implementation, the implementation process of determining the position of the verification data may also include S703. In S703, when the difference is less than or equal to a predetermined difference threshold, and the interval time between the currently received encrypted data and the previous verification data is greater than the second interval time threshold, it is determined that the next plaintext data after the currently received plaintext data is the verification data.
[0103] The second interval duration threshold is greater than the first interval duration threshold.
[0104] If the deviation between the plaintext data and the predicted data is small, that is, the deviation is less than or equal to the predetermined difference threshold, and △x is less than or equal to T3, in this case, in order to detect the data tampering problem that exists in the case of a small deviation, when the interval time Tx between the currently received encrypted data and the previous verification data is greater than the second interval time threshold T2, the generation of verification data can be triggered, and the next plaintext data of the current plaintext data can be determined as the verification data.
[0105] By comparing the degree of deviation and the verification frequency, the system can verify the deviation in a timely manner while effectively balancing the effectiveness of the verification calculation.
[0106] In addition, since the data prediction methods of the concentrator and the data collection terminal can be updated and aligned according to a predetermined update cycle, the prediction values calculated by the concentrator and the data collection terminal are consistent.
[0107] In S204, security verification is performed on the plaintext data according to the location of the verification data and the verification rule, and the result of the security verification is sent to the server.
[0108] According to the position of the verification data, the first verification value can be directly extracted from the decrypted plaintext data. According to the verification rule, the second verification value can be obtained by calculation. By comparing the consistency of the first verification value and the second verification value, the result of the security verification can be obtained. That is, if the first verification value and the second verification value are the same, it means that the security verification has been passed, and if they are different, the security verification has not been passed.
[0109] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0110] Figure 8 A schematic diagram of a data security processing device of a concentrator proposed in an embodiment of the present application, the device comprising:
[0111] The data acquisition unit 801 is used to acquire the encrypted data transmitted by the data acquisition terminal, wherein the encrypted data includes verification data and monitoring data;
[0112] A decryption unit 802, configured to decrypt the encrypted data to determine the plaintext data included in the encrypted data;
[0113] A position and verification rule determination unit 803, configured to determine the position and verification rule of the verification data included in the plaintext data according to the size of the transmitted plaintext data;
[0114] The security verification unit is used to perform security verification on the plaintext data according to the location and verification rules of the verification data, and send the result of the security verification to the server.
[0115] Figure 8 The data security processing device of the concentrator shown in FIG. Figure 2 The data security processing method of the concentrator shown corresponds to this.
[0116] Fig. 9 Schematic diagram of the concentrator provided in the embodiment of the present application. Fig. 9As shown, the concentrator 9 of this embodiment includes: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90, such as a data security processing program of the concentrator. When the processor 90 executes the computer program 92, the steps of the above-mentioned data security processing method embodiments of the concentrator are implemented. Alternatively, when the processor 90 executes the computer program 92, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0117] Exemplarily, the computer program 92 may be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to complete the present application. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 92 in the concentrator 9.
[0118] The concentrator 9 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The concentrator may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will appreciate that Fig. 9 It is only an example of the concentrator 9 and does not constitute a limitation of the concentrator 9. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the concentrator may also include input and output devices, network access devices, buses, etc.
[0119] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0120] The memory 91 may be an internal storage unit of the concentrator 9, such as a hard disk or memory of the concentrator 9. The memory 91 may also be an external storage device of the concentrator 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the concentrator 9. Further, the memory 91 may also include both an internal storage unit of the concentrator 9 and an external storage device. The memory 91 is used to store the computer program and other programs and data required by the concentrator. The memory 91 may also be used to temporarily store data that has been output or is to be output.
[0121] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0122] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0123] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0124] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0125] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0126] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0127] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by hardware related to computer program instructions. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0128] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A data security processing method of a concentrator, characterized in that: The method comprises: Acquire encrypted data transmitted by a data acquisition terminal, wherein the encrypted data includes verification data and sensor data, wherein the sensor data includes a usage value within a detection period and a cumulative usage value, wherein the usage value within the detection period in the verification data is determined according to a verification rule, and the cumulative usage value in the verification data is determined according to a value determined according to the verification rule and a sum of a cumulative usage value in a previous sensor data of the verification data; Decrypting the encrypted data to determine the plaintext data included in the encrypted data; Determining, according to the size of the transmitted plaintext data, a location and a verification rule of the verification data included in the plaintext data; According to the location of the verification data and the verification rule, the plaintext data is security verified, a first verification value is extracted from the decrypted plaintext data, the amount of plaintext data for verification calculation is determined, verification calculation is performed on the determined plaintext data according to the verification rule to obtain a second verification value, the consistency of the first verification value and the second verification value is compared to obtain a result of the security verification, and the result of the security verification is sent to the server; Determining the position of the check data included in the plaintext data according to the size of the plaintext data transmitted, including: Obtaining a difference between currently received plaintext data and predicted data corresponding to the plaintext data; When the difference is greater than a predetermined difference threshold, and the interval time between the previous verification data and the previous verification data is greater than a predetermined first interval time threshold, it is determined that the next plaintext data of the currently received plaintext data is the verification data.
2. The method according to claim 1, characterized in that After obtaining the difference between the currently received plaintext data and the predicted data corresponding to the plaintext data, the method further includes: When the difference is less than or equal to a predetermined difference threshold, and the interval between the currently received encrypted data and the previous verification data is greater than a second interval threshold, determining that the next plaintext data of the currently received plaintext data is the verification data; The second interval duration threshold is greater than the first interval duration threshold.
3. The method according to claim 1, characterized in that Before determining that the next plaintext data of the currently received plaintext data is the verification data, the method further includes: Determine a first numerical range to which the difference value belongs; According to the correspondence between the preset value range and the interval duration threshold, the first interval duration threshold corresponding to the difference is determined, wherein the larger the difference is, the smaller the corresponding first interval duration threshold is.
4. The method according to claim 1, characterized in that When the concentrator receives data in batches, determining the position of the check data included in the plaintext data according to the size of the transmitted plaintext data includes: Determine a first calculation rule based on plaintext data obtained by decrypting encrypted data received at a previous time before the encrypted data received at a current time, and obtain a first calculation result based on the plaintext data and the first calculation rule, wherein the amount of plaintext data obtained by decrypting the encrypted data received at a single time is a first predetermined amount; Determine a second numerical range to which the first calculation result belongs according to a preset numerical range; According to the correspondence between the preset numerical range and the position, the first position corresponding to the second numerical range is determined, and the first position is the position of the verification data in the plaintext data currently received.
5. The method according to claim 1, characterized in that When the concentrator continuously receives data, determining a verification rule for verification data included in the plaintext data according to the size of the transmitted plaintext data includes: Calculating a second predetermined number of data before the verification data, obtaining a second calculation result using a second calculation rule, and determining a third numerical range to which the second calculation result belongs; The amount of plaintext data used for verification calculation is determined according to the corresponding relationship between the preset numerical range and the amount of plaintext data.
6. The method according to claim 1, characterized in that After calculating a second predetermined amount of data before the verification data, obtaining a second calculation result using a second calculation rule, and determining a third numerical range to which the second calculation result belongs, the method further includes: According to the correspondence between the preset numerical range and the verification rule, the verification rule corresponding to the third numerical range and used for performing security verification is determined.
7. A data security processing device of a concentrator, characterized in that: The device comprises: A data acquisition unit, used to acquire encrypted data transmitted by a data acquisition terminal, wherein the encrypted data includes verification data and sensor data, wherein the sensor data includes a usage value within a detection period and a cumulative usage value, wherein the usage value within the detection period in the verification data is determined according to a verification rule, and the cumulative usage value in the verification data is determined according to a value determined by the verification rule and a sum of a cumulative usage value in a sensor data before the verification data; A decryption unit, used to decrypt the encrypted data to determine the plaintext data included in the encrypted data; A position and verification rule determination unit, configured to determine the position and verification rule of the verification data included in the plaintext data according to the size of the transmitted plaintext data; A security verification unit is used to perform a security verification on the plaintext data according to the location of the verification data and the verification rule, extract a first verification value from the decrypted plaintext data, perform a verification calculation on the determined plaintext data according to the verification rule to obtain a second verification value, compare the consistency of the first verification value and the second verification value to obtain a security verification result, and send the security verification result to the server; The position and verification rule determination unit is used to obtain the difference between the currently received plaintext data and the predicted data corresponding to the plaintext data; when the difference is greater than a predetermined difference threshold and the interval time length with the previous verification data is greater than a predetermined first interval time length threshold, it is determined that the next plaintext data after the currently received plaintext data is the verification data.
8. A concentrator, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
