Expressway detection data transmission verification method

By standardizing and encrypting highway inspection data and generating data verification codes, the security management problem caused by inconsistent inspection data formats in existing technologies is solved, thereby improving the effectiveness and security of data transmission.

CN121750366APending Publication Date: 2026-03-27SHENZHEN HUIWAN TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-28
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing highway data transmission verification technologies cannot provide unified and secure management of detection data in different formats, making it difficult to guarantee the authenticity of driving data and resulting in a serious waste of computing resources.

Method used

By collecting highway detection data and standardizing its format, the data is converted into homomorphic data. An encryption matrix is ​​constructed, and a security key is obtained to divide the region, generating a partition matrix. The homomorphic data is then subjected to bit transformation and recombination to generate a data verification code, which is then transmitted and verified securely.

Benefits of technology

It enables unified and secure management of detection data in different formats, improves the effectiveness and security of highway data transmission, and reduces the waste of computing resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121750366A_ABST
    Figure CN121750366A_ABST
Patent Text Reader

Abstract

The invention discloses a highway detection data transmission verification method, and relates to the technical field of highway data transmission verification, and the method comprises the following steps: collecting detection data in a highway, carrying out the format unification of the detection data, and converting the detection data into homomorphic data; performing data encryption on the homomorphic data, and converting the homomorphic data into security data; generating a data check code of homomorphic data based on continuous acquisition time and in combination with the security data; performing secure transmission on the secure data and the data check code; verifying the received security data and the data check code, and storing the security data into a database after the verification is passed; the method is used for solving the problems that the authenticity of driving data is difficult to ensure and unified safety management cannot be carried out on the detection data due to the fact that the safety protection on the detection data is weak and the processing on the detection data in different formats is not unified enough in the existing road data transmission verification technology.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The application relates to the field of highway data transmission verification, in particular to a highway detection data transmission verification method. BACKGROUND

[0002] The highway data transmission verification technology is a set of guarantee technology applied to the highway traffic infrastructure monitoring system. The core goal is to ensure that the original state data collected from various front-end sensors (such as cameras, radars, weather stations, road sensors, bridge structure sensors, etc.) meets the requirements of authenticity, integrity, timeliness and sequence during the transmission process to the back-end data center or cloud platform through the communication network.

[0003] In order to ensure the driving standardization of drivers in the expressway, detection devices are usually arranged for detecting driving data in the expressway. The driving data plays an important role in the judgment of accidents and the detection of violations. Therefore, the safety of the driving data needs strong protection to ensure the authenticity of the driving data. However, the existing highway data transmission verification technology has weak security protection for the detection data, and cannot guarantee the authenticity of the detection data. In addition, the detection data in the expressway has different data formats, and the existing highway data transmission verification technology usually adopts an independent processing method to process different data formats, that is, two sets of security protection means are adopted, which wastes computing resources and cannot uniformly manage the security of the detection data. For example, in the patent application with the publication number CN118041606A, a highway data security transmission method and system are disclosed. The encryption processes for image data and text data are independent of each other, different encryption algorithms are adopted, additional computing resources are consumed, the requirements for edge computing devices are higher, and the detection data cannot be uniformly managed. The existing highway data transmission verification technology has the problems of weak security protection for the detection data and insufficient uniformity in processing different formats of detection data, which makes it difficult to ensure the authenticity of the driving data and cannot uniformly manage the security of the detection data. SUMMARY

[0004] This invention aims to at least partially solve one of the technical problems in the prior art. It involves collecting detection data from highways, standardizing the data format, converting the data into homomorphic data, constructing an encryption matrix and obtaining a security key, dividing the encryption matrix into regions using the security key to obtain a partition matrix, performing bit transformation on the homomorphic data based on the security key to obtain transformed data, recording the transformed data into the partition matrix, and recombining the transformed data based on the partition matrix to obtain secure data. Then, based on continuous acquisition time and the secure data, a data verification code for the homomorphic data is generated. The secure data and the data verification code are then securely transmitted. Finally, the received secure data and data verification code are verified. Upon successful verification, the secure data is stored in a database. This addresses the problems of weak security protection for detection data and inconsistent processing of different formats in existing highway data transmission verification technologies, which makes it difficult to ensure the authenticity of driving data and to achieve unified security management of detection data.

[0005] To achieve the above objectives, this application provides a method for verifying data transmission in highway detection systems, comprising the following steps:

[0006] Collect detection data from highways, standardize the data format, and convert the data into homomorphic data;

[0007] Encrypt homomorphic data to convert it into secure data;

[0008] Data verification codes are generated based on continuous acquisition time and combined with security data to produce homomorphic data.

[0009] Securely transmit secure data and data verification codes;

[0010] The received security data and data verification code are verified, and the security data is stored in the database after successful verification.

[0011] Furthermore, collecting detection data from highways, standardizing the data format, and converting the detection data into homomorphic data includes the following sub-steps:

[0012] An edge computing device is installed in the detection equipment installed on the highway. The edge computing device is used to perform local calculations on the collected detection data and upload it to the cloud.

[0013] The system collects detection data from highways and records the collection time. The detection data includes image data and text data.

[0014] The text data is converted into binary format according to UTF-8 encoding, and the resulting encoding is named text conversion code. The text conversion code belongs to the homomorphic data.

[0015] The image data is converted into homomorphic data.

[0016] Furthermore, the image data undergoes format conversion to transform it into homomorphic data, which includes the following sub-steps:

[0017] Acquire frame images from image data, wherein the pixels in the frame images have RGB color value encoding, and the RGB color value encoding consists of six hexadecimal numbers;

[0018] The RGB color values ​​of the pixels in the frame image are numbered in order from top left to bottom right, using the symbol R. n It is represented as follows, where n is a non-zero natural number and n is the index of R;

[0019] Convert R by number base conversion n Converted to binary format encoding, P is obtained. n P is arranged in ascending order of n. n Combine them to obtain the initial image code;

[0020] Obtain the image resolution of the frame image, and convert the image resolution into a binary format encoding according to ASCII encoding, which is named resolution encoding;

[0021] Find consecutive adjacent zeros in the initial code of the image, group consecutive adjacent zeros into a set of interval reference groups, extract the number of zeros in the interval reference groups and name it the interval reference number, obtain the maximum value in the interval reference number and name it the interval value, represented by the symbol W.

[0022] Calculate W / 8, round the result to Q, add Q×8 zeros to the beginning of the initial image code to obtain the image relay code, fill the resolution code to the beginning of the image relay code to obtain the image conversion code, and the image conversion code belongs to the homomorphic data.

[0023] Furthermore, encrypting homomorphic data and converting it into secure data includes the following sub-steps:

[0024] Construct an encryption matrix and obtain a security key. Divide the encryption matrix into regions using the security key to obtain a partition matrix.

[0025] The homomorphic data is bit-transformed using a security key to obtain the transformed data;

[0026] The transformed data is entered into a partition matrix, and the transformed data is reorganized based on the partition matrix to obtain secure data.

[0027] Further, constructing an encryption matrix and obtaining a security key, then dividing the encryption matrix into regions using the security key to obtain a partitioned matrix includes the following sub-steps:

[0028] The administrator sets a security key for data encryption, converts the security key to decimal format according to ASCII encoding, names it the key code, and numbers the key codes from left to right, using the symbol E. m This indicates that m is a non-zero natural number and m is the index of E;

[0029] Count the number of characters in the homomorphic data and label it as N. Construct an (N / 8)×8 matrix and name it the encryption matrix. Label the cell in the i-th row and j-th column of the encryption matrix as G(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of G, 1≤i≤N / 8, 1≤j≤8.

[0030] Starting with i=j=m=1, determine the parity of m. If m is odd, then transfer G(i,j) to G(i,E). m The upper boundary of ) is named the region dividing line, and j is increased by E. m -1, if j is increased by E m If j is greater than or equal to 8 after -1, then output the single-zone division completion signal. If m is even, then G(i,j) to G(E) m The right boundary of (j) is named the region dividing line, and i is increased by E. m If i increases E m If i is greater than or equal to N / 8, then output a signal indicating that the single-area division is complete. Then, increment m and re-analyze the area division line until the signal indicating that the single-area division is complete is output.

[0031] If the output signal indicates that the single-zone division is complete, then obtain the values ​​of i and m at this time, and mark them as I and M respectively. Then, starting with i=I, j=1 and m=M, analyze the zone division line again, and repeat the process until I is greater than or equal to N / 8.

[0032] The final analysis yields different region dividing lines, which are then marked in the encryption matrix to obtain the partition matrix.

[0033] Furthermore, performing bit transformation on the homomorphic data based on the security key to obtain transformed data includes the following sub-steps:

[0034] Homomorphic data are numbered from left to right, using the symbol Y. d This indicates that d is a non-zero natural number and d is the index of Y;

[0035] Starting with d=m=1, determine E m The parity of E, if E mIf it is an odd number, then for Y d Perform bit transformation if Y d If it is 1, then Y d If Y is transformed to 0, d If it is 0, then Y d Transform to 1, if E m If it is even, then there is no need to consider Y. d Perform bit transformation;

[0036] Increment both d and m and re-evaluate. If m reaches max(m), reset m to 1. Repeat this process until max(d) is reached. Name the homomorphic data after bit transformation as transformed data.

[0037] Furthermore, the transformed data is entered into a partition matrix, and the transformed data is reorganized based on the partition matrix to obtain secure data, including the following sub-steps:

[0038] The partition matrix is ​​divided into different data partitions by region dividing lines. Without crossing the region dividing lines, consecutive adjacent G(i,j) values ​​form a data partition. These data partitions are numbered and labeled AR in top-to-bottom order. t , where t is a non-zero natural number and t is the index of AR;

[0039] The transformed data is entered into the partition matrix from top left to bottom right, and the transformed data corresponding to G(i,j) is marked as TS(i,j);

[0040] Extract AR t For AR t Extract TS(i,j) from the given data. For any TS(i,j), calculate i+j, and label the result as LS. Sort TS(i,j) according to the ascending order of LS, and use the symbol KS. h Let h be a non-zero natural number and h be the index of KS. If LS are equal, then they are sorted in ascending order of i. If LS and i are equal, then they are sorted in ascending order of j.

[0041] Extract KS sequentially h KS is sorted in ascending order of h. h By combining them, we obtain AR. t The partitioned reorganized data is marked as FC. t Extract each AR t FC t FC in ascending order of t t Combine the data to obtain the encrypted data.

[0042] Obtain the acquisition time of the detection data, convert the acquisition time into binary format encoding according to ASCII encoding, and name it time encoding;

[0043] The time code is appended to the end of the ciphertext data to obtain the secure data.

[0044] Furthermore, generating a data checksum based on continuous acquisition time and combined with security data includes the following sub-steps:

[0045] Obtain the collection time corresponding to this security data and name it real-time time. At the same time, obtain the collection time corresponding to the previous security data and name it previous time. Calculate the difference between the real-time time and the previous time. The calculation result is in milliseconds and is marked as B.

[0046] The number of 1s and 0s in the statistical security data are labeled as X1 and X2, respectively.

[0047] Calculate X1×X2×B, and name the result as the data check code.

[0048] Furthermore, the secure transmission of security data and data verification codes specifically involves transmitting security data and data verification codes through different communication channels.

[0049] Furthermore, the received security data and data verification code are verified, and the security data is stored in the database after successful verification, including the following sub-steps:

[0050] Extract the time code from the received security data and restore it to obtain the real-time detection time, which is named the first time.

[0051] Get the detection time previously received by the receiving end and name it the second time. Calculate the difference between the first time and the second time. The calculation result is in milliseconds and is marked as U1.

[0052] Count the number of 1s and 0s in the security data excluding time-coded data, and label them as U2 and U3 respectively. Calculate U1×U2×U3 and name the calculation result as the data to be verified.

[0053] The system compares the data to be verified with the received data verification code. If they are the same, it outputs a verification pass signal; otherwise, it outputs a verification failure signal.

[0054] If the output verification pass signal is received, the secure data is stored in the database for retrieval. If the output verification fails signal is received, the corresponding detection data is re-requested from the edge computing device.

[0055] The beneficial effects of this invention are as follows: This invention collects detection data from highways, unifies the format of the detection data, and converts the detection data into homomorphic data. The advantage is that it can convert detection data of different formats into a unified format, and the same encryption algorithm can be used in subsequent encryption processing. It can also perform unified security management of detection data, thereby improving the effectiveness and rationality of highway data transmission verification.

[0056] This invention constructs an encryption matrix and obtains a security key. The encryption matrix is ​​then divided into regions using the security key to obtain a partition matrix. The homomorphic data is then bit-transformed based on the security key to obtain transformed data. The transformed data is then entered into the partition matrix and recombined based on the partition matrix to obtain secure data. The advantage is that it encrypts homomorphic data using a unified encryption method and integrates image-level region division processing, thereby improving the security and effectiveness of highway data transmission verification.

[0057] This invention generates a data check code for homomorphic data based on continuous acquisition time and combined with security data. Then, the security data and the data check code are transmitted securely. Finally, the received security data and data check code are verified. After successful verification, the security data is stored in a database. The advantage is that the data check code is generated based on continuous acquisition time, which can determine the authenticity of the security data based on the continuity of time sequence, thereby further improving the security and effectiveness of highway data transmission verification. Attached Figure Description

[0058] Figure 1 This is a flowchart of the steps of the method of the present invention;

[0059] Figure 2 This is a schematic diagram of the encryption matrix of the present invention;

[0060] Figure 3 This is a schematic diagram of the first region dividing line of the present invention;

[0061] Figure 4 This is a schematic diagram of a complete region division line of the present invention;

[0062] Figure 5 This is a schematic diagram of the partition matrix of the present invention;

[0063] Figure 6 This is a schematic diagram illustrating the process of inputting transformed data into a partition matrix according to the present invention;

[0064] Figure 7 This is a schematic diagram of AR1 of the present invention. Detailed Implementation

[0065] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0066] Example 1, please refer to Figure 1 As shown, this application provides a method for verifying data transmission in highway detection systems, comprising the following steps:

[0067] Step S1 involves collecting detection data from the highway, standardizing the data format, and converting the data into homomorphic data. Step S1 includes the following sub-steps:

[0068] Step S101: An edge computing device is installed in the detection device installed on the highway. The edge computing device is used to perform local calculations on the collected detection data and upload it to the cloud.

[0069] Step S102: Collect detection data on the highway and record the collection time. The detection data includes image data and text data.

[0070] Step S103: Convert the text data into binary format encoding according to UTF-8 encoding, and name it text conversion code. The text conversion code belongs to homomorphic data.

[0071] In practice, existing edge computing devices are used to provide edge computing capabilities for the detection devices installed on highways, enabling the detection devices to not only collect and transmit data, but also to have certain data processing capabilities. For example, if the collection time of a certain text data is 13:58:49 and its corresponding content is "speeding", the converted text code is 111010001011011010000101111010011000000010011111.

[0072] Step S104: Convert the image data into homomorphic data.

[0073] Step S104 includes the following sub-steps:

[0074] Step S1041: Obtain the frame image from the image data. The pixels in the frame image have RGB color value encoding, which consists of six hexadecimal numbers.

[0075] Step S1042: Number the RGB color values ​​of the pixels in the frame image in order from top left to bottom right, using the symbol R. nIt is represented as follows, where n is a non-zero natural number and n is the index of R;

[0076] Step S1043, convert R to a base. n Converted to binary format encoding, P is obtained. n P is arranged in ascending order of n. n Combine them to obtain the initial image code;

[0077] In practice, image data includes video and image formats. Video is actually composed of different frame images, which are in image format. Therefore, the image data can be assumed to be in image format, i.e., frame images. Since actual frame images have a large number of pixels, it's not convenient to explain the analysis process in this embodiment. Therefore, this embodiment only uses a test image with 2 pixels as a sample to explain the process of converting frame images into homomorphic data. The test image is in a 1x2 format, so the 2 pixels in the first row are arranged from left to right... The order from right to left is R1 and R2. R1 is the color value code corresponding to the pixel in the first row and first column, which is eb9e82. After conversion, P1 is 111010111001111010000010. R2 is e8c7b6, which is converted to P2 as 111010001100011110110110. Combining them, the initial image code is 111010111001111010000010111010001100011110110110.

[0078] Step S1044: Obtain the image resolution of the frame image, and convert the image resolution into binary format encoding according to ASCII encoding, named resolution encoding;

[0079] In practice, the image resolution is obtained as 1×2. "1×2" is treated as text and converted according to ASCII encoding to obtain the resolution encoding as "00110001 11010111 00110010". The spaces represent the bit-separated characters. The actual resolution encoding should remove the spaces, that is, the resolution encoding is "001100011101011100110010".

[0080] Step S1045: Find consecutive adjacent zeros in the initial code of the image, group consecutive adjacent zeros into a set of interval reference groups, extract the number of zeros in the interval reference groups, name it the interval reference number, obtain the maximum value in the interval reference number, name it the interval value, and represent it by the symbol W.

[0081] Step S1046: Calculate W / 8, round up the result and mark it as Q. Add Q×8 bits of zero to the beginning of the initial image code to obtain the image relay code. Fill the resolution code into the beginning of the image relay code to obtain the image conversion code. The image conversion code belongs to homomorphic data.

[0082] In practice, the interval reference group found includes 00, 000, 0, 0, 00, 00, and 0. The maximum interval reference number is 3, meaning the interval value W is 3. Calculating W / 8 = 3 / 8, and rounding the result, we get Q as 1. The calculation of W / 8 is because one byte contains 8 bits, which is needed to provide data for subsequent data analysis and reconstruction. Adding 1×8 zeros to the beginning of the initial image code yields the image relay code "000000". 00111010111001111010000010111010001100011110110110, by filling the resolution code before the first digit, the image conversion code is "00110001110101110011001000000000111010111001111010000010111010001100011110110110".

[0083] Step S2 involves encrypting the homomorphic data to convert it into secure data. Step S2 includes the following sub-steps:

[0084] Step S201: Construct an encryption matrix and obtain a security key. Divide the encryption matrix into regions using the security key to obtain a partition matrix.

[0085] Step S201 includes the following sub-steps:

[0086] Step S2011: The administrator sets a security key for data encryption, converts the security key to decimal format according to ASCII encoding, names it the key code, and numbers the key codes from left to right, using the symbol E. m This indicates that m is a non-zero natural number and m is the index of E;

[0087] Please see Figure 2 As shown, in step S2012, count the number of characters in the homomorphic data and mark it as N. Construct a (N / 8)×8 matrix and name it the encryption matrix. Mark the element cell in the i-th row and j-th column of the encryption matrix as G(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of G, 1≤i≤N / 8, 1≤j≤8;

[0088] In practice, the security key obtained is "qsc154" (without quotes), which is converted to the key encoding "11311599495352", and the resulting number is E.m Given that 1 ≤ m ≤ 14, and N is statistically determined to be 80, a 10×8 matrix is ​​constructed to obtain the encryption matrix as shown below. Figure 2 As shown, the construction of the encryption matrix at this point is only related to N, and the subsequent process of converting the encryption matrix into a partition matrix is ​​independent of the specific values ​​in the homomorphic data. Therefore, there is no need to enter homomorphic data at this point.

[0089] Please see Figures 3 to 4 As shown, in step S2013, starting with i=j=m=1, determine the parity of m. If m is odd, then G(i,j) to G(i,E) are... m The upper boundary of ) is named the region dividing line, and j is increased by E. m -1, if j is increased by E m If j is greater than or equal to 8 after -1, then output the single-zone division completion signal. If m is even, then G(i,j) to G(E) m The right boundary of (j) is named the region dividing line, and i is increased by E. m If i increases E m If i is greater than or equal to N / 8, then output a signal indicating that the single-area division is complete. Then, increment m and re-analyze the area division line until the signal indicating that the single-area division is complete is output.

[0090] In practice, starting with i=j=m=1, where m=1 (an odd number) and E1=1, the upper boundary of G(1,1) to G(1,1) is named the region dividing line, resulting in the first region dividing line as follows: Figure 3 As shown, j is increased by E at the same time. m -1 = 1 - 1 = 0, meaning i and j are still 1, and j is less than 8. Therefore, we increase m by 1 and reanalyze. Now m = 2, which is even, and E2 is 1. We then name the right boundary of G(1,1) to G(1,1) the region dividing line, obtaining the second region dividing line. Simultaneously, we increase i by E2. m At this point, i=2, j=1. Increase m+1 and analyze the region segmentation line again until the single-region segmentation signal is output. Finally, a complete region segmentation line is obtained, as shown below. Figure 4 As shown, Figure 4 A series of consecutive dashed lines in the middle form a complete area dividing line.

[0091] Step S2014: If the single-zone division is completed, obtain the values ​​of i and m at this time and mark them as I and M respectively. Then, starting with i=I, j=1 and m=M, analyze the zone division line again and repeat the process until I is greater than or equal to N / 8.

[0092] Please see Figure 5 As shown in step S2015, the final analysis yields different region dividing lines. These region dividing lines are then marked in the encryption matrix to obtain the partition matrix.

[0093] In specific implementation, in step S2013, after analysis, a single-region partitioning completion signal is output. At this time, i is 8 and m is 7, i.e., I=8 and M=7. Then, starting with i=I=8, j=1, and m=M=7, step S2013 is executed again. The maximum value of m is 14. If m is greater than 14 during the analysis process, it is reset to 1. That is, when m=15, m is reset to 1. This process is repeated until the partitioning matrix is ​​finally obtained. Figure 5 As shown, Figure 5 The different colored areas represent different data partitions.

[0094] Step S202: Perform bit transformation on the homomorphic data based on the security key to obtain transformed data;

[0095] Step S202 includes the following sub-steps:

[0096] Step S2021: Number the homomorphic data from left to right, using the symbol Y. d This indicates that d is a non-zero natural number and d is the index of Y;

[0097] Step S2022, starting with d=m=1, determine E m The parity of E, if E m If it is an odd number, then for Y d Perform bit transformation if Y d If it is 1, then Y d If Y is transformed to 0, d If it is 0, then Y d Transform to 1, if E m If it is even, then there is no need to consider Y. d Perform bit transformation;

[0098] Step S2023: Increment both d and m and re-evaluate. If m reaches max(m), reset m to 1. Repeat this process until max(d) is reached. Name the homomorphic data after bit transformation as transformed data.

[0099] In specific implementation, the homomorphic data "001100011101011100110010000000001110101111001111010000010111010001100011110110110" is obtained by numbering Y. d 1≤d≤80, taking d=m=1 as an example, at this time E m Since E1 is 1, which is odd, we perform a bitwise transformation on Y1. Since Y1 is 0, we transform Y1 to 1. Similarly, we transform all Y... dAfter analysis, the transformed data was finally obtained as "11001110101011001100111111101111000111000010000101011100000101111011110001001011".

[0100] Step S203: Input the transformed data into the partition matrix and reorganize the transformed data based on the partition matrix to obtain secure data;

[0101] Step S203 includes the following sub-steps:

[0102] Step S2031: Divide the partition matrix into different data partitions using the region dividing lines. Without crossing the region dividing lines, consecutive adjacent G(i,j) can form a data partition. Number the data partitions and label them AR in top-to-bottom order. t , where t is a non-zero natural number and t is the index of AR;

[0103] Please see Figure 6 As shown, in step S2032, the transformed data is entered into the partition matrix from the top left to the bottom right, and the transformed data corresponding to G(i,j) is marked as TS(i,j);

[0104] Please see Figure 7 As shown, in step S2033, extract AR t For AR t Extract TS(i,j) from the given data. For any TS(i,j), calculate i+j, and label the result as LS. Sort TS(i,j) according to the ascending order of LS, and use the symbol KS. h Let h be a non-zero natural number and h be the index of KS. If LS are equal, then they are sorted in ascending order of i. If LS and i are equal, then they are sorted in ascending order of j.

[0105] Step S2034, extract KS sequentially h KS is sorted in ascending order of h. h By combining them, we obtain AR. t The partitioned reorganized data is marked as FC. t Extract each AR t FC t FC in ascending order of t t Combine the data to obtain the encrypted data.

[0106] Step S2035: Obtain the acquisition time of the detection data, convert the acquisition time into binary format encoding according to ASCII encoding, and name it time encoding;

[0107] Step S2036: The time code is appended to the end of the ciphertext data to obtain the secure data.

[0108] In practice Figure 5 The different colored areas represent different data partitions, labeled AR1 to AR4 in top-to-bottom order. Figure 5 In the diagram, the data is partitioned according to color from dark to light, corresponding to AR1 to AR4. After the transformed data is entered into the partition matrix, the partition matrix is ​​obtained as follows: Figure 6 As shown, taking AR1 as an example, AR1 is extracted as follows: Figure 7As shown, AR1 contains 26 TS(i,j) such as TS(1,2), TS(1,3), TS(1,4), TS(1,5), TS(1,6), TS(1,7), TS(1,8), TS(2,5), and TS(2,6). Taking the 9 TS(i,j) listed above as examples, the LS corresponding to these 9 TS(i,j) are 3, 4, 5, 6, 7, 8, 9, 7, and 8, respectively. Among them, 7 and 8 each have two. Taking 7 as an example, the TS(i,j) with LS of 7 include TS(1,6) and TS(2,5). Among them, TS(1,6) has... Since i is 1, and i is 2 for TS(2,5), TS(1,6) is placed before TS(2,5) during sorting. The final sorted results are KS1 to KS9 as TS(1,2), TS(1,3), TS(1,4), TS(1,5), TS(1,6), TS(2,5), TS(1,7), TS(2,6), and TS(1,8). Similarly, the 26 TS(i,j) are analyzed and sorted, resulting in FC1 as 10011111001011111100001100. Likewise, FC2 is extracted as 10111100100. The data is: 10010000111101000010110111. FC3 is 101111100011, FC4 is 1011. Combining these, the ciphertext data is: 100111110010111111000011001011110010010000111101000010110111101111100011101110111011. The acquisition time is 13:58:49. The converted time code is "001100010011001100111010001101010011100000111". The time code "0100011010000111001" has a fixed length of 64 bits. Therefore, during verification, the time code can be directly extracted from the security data and finally merged to obtain the security data as "00110001001100110011101000110101001110000011101000110100001110010011001100110011001100110001101000111000011100011010001110000111000111000111001".

[0109] Step S3 involves generating a data checksum for homomorphic data based on continuous acquisition time and combined with security data. Step S3 includes the following sub-steps:

[0110] Step S301: Obtain the collection time corresponding to the current security data and name it real-time time. At the same time, obtain the collection time corresponding to the previous security data and name it previous time. Calculate the difference between the real-time time and the previous time. The calculation result is in milliseconds and is marked as B.

[0111] Step S302: Count the number of digits 1 and 0 in the security data, and label them as X1 and X2 respectively;

[0112] Step S303: Calculate X1×X2×B and name the calculation result as the data check code;

[0113] In the specific implementation, the real-time time is obtained as 13:58:49, while the previous time is 13:58:44. That is, the detection time of the last received detection data is 13:58:44. The calculated value of B is 5 seconds, which is 5000 milliseconds. The statistical results show that X1 and X2 are 70 and 58 respectively. Finally, the data verification code is calculated to be 70×58×5000=20300000.

[0114] Step S4: Securely transmit the security data and data verification code; transmit the security data and data verification code through different communication channels;

[0115] In practice, two communication channels are provided, namely the first channel and the second channel. The first channel transmits only security data, and the second channel transmits only data verification codes.

[0116] Step S5 involves verifying the received security data and data verification code. Upon successful verification, the security data is stored in the database. Step S5 includes the following sub-steps:

[0117] Step S501: Extract the time code from the received security data and restore it to obtain the real-time detection time, which is named the first time.

[0118] Step S502: Obtain the detection time previously received by the receiving end, name it the second time, calculate the difference between the first time and the second time, and mark the result as U1 in milliseconds;

[0119] Step S503: Count the number of digits 1 and 0 in the security data excluding time encoding, and label them as U2 and U3 respectively. Calculate U1×U2×U3 and name the calculation result as the data to be verified.

[0120] Step S504: Compare the data to be verified with the received data verification code. If they are the same, output a verification pass signal; otherwise, output a verification failure signal.

[0121] Step S505: If the verification pass signal is output, the security data is stored in the database for retrieval; if the verification fail signal is output, the corresponding detection data at the first moment is re-requested from the edge computing device.

[0122] In practice, the first time obtained after restoration is 13:58:49, while the detection time obtained by the receiving end from the previous reception and restoration is 13:58:44, that is, the second time is 13:58:44. The calculated U1 is 5000, and the statistical results show that U2 and U3 are 70 and 58 respectively. Finally, the data to be verified is calculated to be 20300000, which is the same as the verification code of the received data. Therefore, the verification pass signal is output, and the secure data is stored in the database for retrieval.

[0123] Example 2: This application provides an electronic device, which may include a processor, a communication interface, a memory, and a communication bus. The processor, communication interface, and memory communicate with each other via the communication bus. The memory stores computer-readable instructions. The processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, steps such as those in a highway detection data transmission verification method are performed to achieve the following functions: collecting detection data from the highway; unifying the format of the detection data; converting the detection data into homomorphic data; encrypting the homomorphic data; converting the homomorphic data into secure data; generating a data verification code for the homomorphic data based on continuous acquisition time and combined with the secure data; securely transmitting the secure data and the data verification code; verifying the received secure data and the data verification code; and storing the secure data in a database after successful verification.

[0124] Furthermore, when the logical instructions in the aforementioned memory can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] Example 3: This application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a highway detection data transmission verification method provided by the above methods. The method includes: collecting detection data from the highway; unifying the format of the detection data; converting the detection data into homomorphic data; encrypting the homomorphic data; converting the homomorphic data into secure data; generating a data verification code for the homomorphic data based on continuous acquisition time and combined with the secure data; securely transmitting the secure data and the data verification code; verifying the received secure data and the data verification code; and storing the secure data in a database after successful verification.

[0126] Example 4: This application also provides a computer-readable storage medium. This application provides a storage medium storing a computer program thereon. When the computer program is executed by a processor, it performs the steps of the above-described highway detection data transmission verification method to achieve the following functions: collecting detection data from the highway; unifying the format of the detection data; converting the detection data into homomorphic data; encrypting the homomorphic data; converting the homomorphic data into secure data; generating a data verification code for the homomorphic data based on continuous acquisition time and combined with the secure data; securely transmitting the secure data and the data verification code; verifying the received secure data and the data verification code; and storing the secure data in a database after successful verification.

[0127] Based on the above description of the embodiments, the embodiments of the present invention can be provided as methods, systems, or computer program products. Based on this understanding, the above technical solutions, in essence or in terms of their contribution to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or certain parts of the embodiments.

[0128] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or units may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces. The indirect coupling or communication connection between systems, modules, and units may be electrical, mechanical, or other forms.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.

Claims

1. A method for verifying data transmission in highway detection, characterized in that, Includes the following steps: Collect detection data from highways, standardize the data format, and convert the data into homomorphic data; Encrypt homomorphic data to convert it into secure data; Data verification codes are generated based on continuous acquisition time and combined with security data to produce homomorphic data. Securely transmit secure data and data verification codes; The received security data and data verification code are verified, and the security data is stored in the database after successful verification.

2. The method for verifying data transmission in highway detection according to claim 1, characterized in that, Collecting detection data from highways, standardizing the data format, and converting the detection data into homomorphic data includes the following sub-steps: An edge computing device is installed in the detection equipment installed on the highway. The edge computing device is used to perform local calculations on the collected detection data and upload it to the cloud. The system collects detection data from highways and records the collection time. The detection data includes image data and text data. The text data is converted into binary format according to UTF-8 encoding, and the resulting encoding is named text conversion code. The text conversion code belongs to the homomorphic data. The image data is converted into homomorphic data.

3. The method for verifying data transmission in highway detection according to claim 2, characterized in that, Converting image data to homomorphic data involves the following sub-steps: Acquire frame images from image data, wherein the pixels in the frame images have RGB color value encoding, and the RGB color value encoding consists of six hexadecimal numbers; The RGB color values ​​of the pixels in the frame image are numbered in order from top left to bottom right, using the symbol R. n It is represented as follows, where n is a non-zero natural number and n is the index of R; Convert R by number base conversion n Converted to binary format encoding, we get P. n P is arranged in ascending order of n. n Combine them to obtain the initial image code; Obtain the image resolution of the frame image, and convert the image resolution into a binary format encoding according to ASCII encoding, which is named resolution encoding; Find consecutive adjacent zeros in the initial code of the image, group consecutive adjacent zeros into a set of interval reference groups, extract the number of zeros in the interval reference groups and name it the interval reference number, obtain the maximum value in the interval reference number and name it the interval value, represented by the symbol W. Calculate W / 8, round the result to Q, add Q×8 zeros to the beginning of the initial image code to obtain the image relay code, fill the resolution code to the beginning of the image relay code to obtain the image conversion code, and the image conversion code belongs to the homomorphic data.

4. The method for verifying data transmission in highway detection according to claim 3, characterized in that, Encrypting homomorphic data and converting it into secure data involves the following sub-steps: Construct an encryption matrix and obtain a security key. Divide the encryption matrix into regions using the security key to obtain a partition matrix. The homomorphic data is bit-transformed using a security key to obtain the transformed data; The transformed data is entered into a partition matrix, and the transformed data is reorganized based on the partition matrix to obtain secure data.

5. The method for verifying data transmission in highway detection according to claim 4, characterized in that, Constructing an encryption matrix and obtaining a security key, then dividing the encryption matrix into regions using the security key to obtain a partitioned matrix includes the following sub-steps: The administrator sets a security key for data encryption, converts the security key to decimal format according to ASCII encoding, names it the key code, and numbers the key codes from left to right, using the symbol E. m This indicates that m is a non-zero natural number and m is the index of E; Count the number of characters in the homomorphic data and label it as N. Construct an (N / 8)×8 matrix and name it the encryption matrix. Label the cell in the i-th row and j-th column of the encryption matrix as G(i,j), where i and j are both non-zero natural numbers and (i,j) is the index of G, 1≤i≤N / 8, 1≤j≤8. Starting with i=j=m=1, determine the parity of m. If m is odd, then transfer G(i,j) to G(i,E). m The upper boundary of ) is named the region dividing line, and j is increased by E. m -1, if j is increased by E m If j is greater than or equal to 8 after -1, then output the single-zone division completion signal. If m is even, then G(i,j) to G(E) m The right boundary of (j) is named the region dividing line, and i is increased by E. m If i increases E m If i is greater than or equal to N / 8, then output a signal indicating that the single-area division is complete. Then, increment m and re-analyze the area division line until the signal indicating that the single-area division is complete is output. If the output signal indicates that the single-zone division is complete, then obtain the values ​​of i and m at this time, and mark them as I and M respectively. Then, starting with i=I, j=1 and m=M, analyze the zone division line again, and repeat the process until I is greater than or equal to N / 8. The final analysis yields different region dividing lines, which are then marked in the encryption matrix to obtain the partition matrix.

6. The method for verifying data transmission in highway detection according to claim 5, characterized in that, The process of performing bit transformation on homomorphic data based on a secure key to obtain transformed data includes the following sub-steps: Homomorphic data are numbered from left to right, using the symbol Y. d This indicates that d is a non-zero natural number and d is the index of Y; Starting with d=m=1, determine E m The parity of E, if E m If it is an odd number, then for Y d Perform bit transformation if Y d If it is 1, then Y d If Y is transformed to 0, d If it is 0, then Y d Transform to 1, if E m If it is even, then there is no need to consider Y. d Perform bit transformation; Increment both d and m and re-evaluate. If m reaches max(m), reset m to 1. Repeat this process until max(d) is reached. Name the homomorphic data after bit transformation as transformed data.

7. The method for verifying data transmission in highway detection according to claim 6, characterized in that, The process of inputting the transformed data into a partition matrix and then reorganizing the transformed data based on the partition matrix to obtain secure data includes the following sub-steps: The partition matrix is ​​divided into different data partitions by region dividing lines. Without crossing the region dividing lines, consecutive adjacent G(i,j) values ​​form a data partition. These data partitions are numbered and labeled AR in top-to-bottom order. t , where t is a non-zero natural number and t is the index of AR; The transformed data is entered into the partition matrix from top left to bottom right, and the transformed data corresponding to G(i,j) is marked as TS(i,j); Extract AR t For AR t Extract TS(i,j) from the given data. For any TS(i,j), calculate i+j, and label the result as LS. Sort TS(i,j) according to the ascending order of LS, and use the symbol KS. h Let h be a non-zero natural number and h be the index of KS. If LS are equal, then they are sorted in ascending order of i. If LS and i are equal, then they are sorted in ascending order of j. Extract KS sequentially h KS is sorted in ascending order of h. h By combining them, we obtain AR. t The partitioned reorganized data is marked as FC. t Extract each AR t FC t FC in ascending order of t t Combine the data to obtain the encrypted data. Obtain the acquisition time of the detection data, convert the acquisition time into binary format encoding according to ASCII encoding, and name it time encoding; The time code is appended to the end of the ciphertext data to obtain the secure data.

8. The method for verifying data transmission in highway detection according to claim 7, characterized in that, The data checksum generated based on continuous acquisition time and combined with security data includes the following sub-steps: Obtain the collection time corresponding to this security data and name it real-time time. At the same time, obtain the collection time corresponding to the previous security data and name it previous time. Calculate the difference between the real-time time and the previous time. The calculation result is in milliseconds and is marked as B. The number of 1s and 0s in the statistical security data are labeled as X1 and X2, respectively. Calculate X1×X2×B, and name the result as the data check code.

9. The method for verifying data transmission in highway detection according to claim 8, characterized in that, Secure transmission of security data and data verification codes specifically involves transmitting security data and data verification codes through different communication channels.

10. A method for verifying data transmission in highway detection according to claim 9, characterized in that, Verify the received security data and data verification code, and store the security data in the database after successful verification, including the following sub-steps: Extract the time code from the received security data and restore it to obtain the real-time detection time, which is named the first time. Get the detection time previously received by the receiving end and name it the second time. Calculate the difference between the first time and the second time. The calculation result is in milliseconds and is marked as U1. Count the number of 1s and 0s in the security data excluding time-coded data, and label them as U2 and U3 respectively. Calculate U1×U2×U3 and name the calculation result as the data to be verified. The system compares the data to be verified with the received data verification code. If they are the same, it outputs a verification pass signal; otherwise, it outputs a verification failure signal. If the output verification pass signal is received, the secure data is stored in the database for retrieval. If the output verification fails signal is received, the corresponding detection data is re-requested from the edge computing device.

Citation Information

Patent Citations

  • Expressway data secure transmission method and system

    CN118041606A