A multi-source heterogeneous data transmission and processing method for engineering ships
By performing ZSTD lossless compression and encryption and decryption processing on the data of the dredging ship system, the problems of high bandwidth usage and insufficient security during the data transmission process are solved, and the efficiency and security of data transmission are achieved.
Patent Information
- Application Number
- CN202411002689.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-25
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-07-25
AI Technical Summary
Existing dredging ship systems face problems of high bandwidth usage and insufficient data security during data collection, centralized management, and uploading, especially during multi-source heterogeneous data transmission.
A multi-source heterogeneous data transmission processing method is adopted to perform efficient ZSTD lossless compression and encryption and decryption processing on the data, including data reorganization, numerical compression, asymmetric encryption and handshake generation to ensure that the data is transmitted during the transmission process. security and bandwidth efficiency.
It effectively reduces data transmission traffic, reduces communication costs, ensures data security, reduces resource occupation through symmetric encryption and key management, and achieves efficient data transmission and security.
Smart Images

Figure CN118524159B
Abstract
Description
Technical Field
[0001] The invention relates to a multi-source heterogeneous data transmission processing method for an engineering vessel. Background Art
[0002] Data Compression Technology Lossy Compression: Image Compression: JPEG is the most common lossy compression algorithm used for image compression, suitable for storing and transmitting images such as photos. Audio Compression: MP3 is a common lossy audio compression technology used to reduce the size of music files while maintaining auditory quality. Lossless Compression: ZIP Compression: Commonly used for archiving and transmitting files and folders to maintain data integrity, such as in email attachments. PNG Image Format: Uses lossless compression and is suitable for scenarios where image quality needs to be preserved, such as web design and graphic editing.
[0003] In the field of encryption and decryption technology, symmetric encryption (AES): Advanced encryption standard, used to protect the confidentiality of data, often used in scenarios such as file encryption and data transmission. Asymmetric encryption (RSA): Based on the problem of large prime number factorization, it is used for digital signatures, key exchange, etc. ECC: Elliptic curve cryptography, which provides relatively high security and efficiency, suitable for mobile devices and resource-constrained environments. Digital certificates (SSL / TLS): Use digital certificates to ensure the security of communication, used to encrypt website connections and protect data transmission. Encrypted transmission is divided into the requesting (client) end and the receiving (server) end, and the key system is also divided into symmetric keys and symmetric keys. In the initial distribution stage, the server saves the asymmetric private key, and the client saves the asymmetric public key. The private key is only saved by the server, and the client shares the public key. The public key is only used for encryption, and the private key is decrypted.
[0004] The existing dredging ship system needs to collect engine room data, navigation data, engineering data and mission data on board, involving multiple systems and N types of equipment. Currently, the data collected is centrally managed and needs to be uploaded to the shore, which involves traffic costs, bandwidth, and data security.
[0005] In view of the defects of the prior art, a multi-source heterogeneous data transmission and processing method for an engineering vessel is provided. Summary of the invention
[0006] The purpose of the present invention is to overcome the existing defects and provide a multi-source heterogeneous data transmission and processing method for a dredging engineering vessel, which ensures data bandwidth occupancy and data security by efficiently compressing and securely encrypting and decrypting data.
[0007] The technical solution to achieve the above purpose is:
[0008] A multi-source heterogeneous data transmission and processing method for an engineering vessel, comprising:
[0009] Step S1, the request end determines whether the input data is formatted data with a vertices mark;
[0010] Step S2: if yes, reorganize and compress the data;
[0011] Step S3, if not or after data reorganization and value compression, ZSTD (a lossless compression algorithm) compression algorithm is used to directly perform lossless compression on the data;
[0012] Step S4, after data compression, the requesting end performs encryption verification;
[0013] Step S5, the receiving end receives the verification request sent by the requesting end and performs authentication and decryption;
[0014] Step S6, after the requesting end passes the verification, the requesting end encrypts the compressed data and transmits the encrypted compressed data to the receiving end;
[0015] Step S7, the receiving end decrypts the encrypted compressed data and determines whether the compressed data is formatted data with a vertebral point;
[0016] Step S8: if not, then use the ZSTD compression algorithm to directly decompress the compressed data;
[0017] Step S9: If yes, the compressed data is directly decompressed using the ZSTD compression algorithm, and then numerical compression and data reorganization are performed to obtain the original data.
[0018] Preferably, in step S2, the data is first reorganized, and after the reorganization, the values are lossily compressed, and after compression, the data is rearranged; wherein, the data reorganization is performed by splitting the data and merging multiple common key values into a data set, and the data compression compresses the data by constructing an index table containing frequently occurring data fragments.
[0019] Preferably, in step S3, the ZSTD compression algorithm is verified by intercepting historical data and generating random data, and the historical data includes but is not limited to normal data, abnormal data, and boundary data.
[0020] Preferably, step S3 comprises:
[0021] Step S31, dividing the data to be compressed into data blocks by using the ZSTD compression algorithm;
[0022] Step S32, creating a dictionary, and finding a portion similar to the data segment in the current data block through the data segment identified by the ZSTD compression algorithm;
[0023] Step S33: Compressing the data by using a shorter code of the identified data fragment to represent the data fragment in the data block.
[0024] Preferably, in step S31, the ZSTD compression algorithm is implemented based on a combination of dictionary coding and entropy coding, wherein dictionary coding refers to compressing the current data segment using the previously occurring data segment, and entropy coding refers to representing the data segment with a higher frequency with a shorter code, and the data segment with a lower frequency with a longer code; wherein the ZSTD compression algorithm can be optimized through dynamic dictionary selection and multi-level hashing;
[0025] In step S32, the dictionary is composed of a series of data segments, and these data segments are extracted from previous data.
[0026] Preferably, step S4 comprises:
[0027] Step S41, the requesting end generates a random string and adds verification information;
[0028] Step S42: Use the public key to asymmetrically encrypt the verification information, and send the random string and the verification information to the server.
[0029] Preferably, step S5 comprises:
[0030] Step S51, the receiving end receives the random string and the verification request sent by the requesting end;
[0031] Step S52, decrypt the verification information using the private key to obtain decrypted data;
[0032] Step S53, determine whether the decrypted data is authentication data, if not, return an error, if yes, generate a random string and return it to the client.
[0033] Preferably, step S6 comprises:
[0034] Step S61, after receiving the random string returned by the receiving end, the requesting end uses the local random string and the random string returned by the receiving end to call the API to generate a secret key and save it;
[0035] Step S62, encrypting the compressed data using the generated key;
[0036] Step S63, transmitting the encrypted compressed data to the receiving end.
[0037] Preferably, step S7 includes:
[0038] Step S71, the receiving end uses the local random string and the random string sent by the requesting end to call the API to generate a secret key and save it;
[0039] Step S72, decrypting the compressed data using the generated key;
[0040] Step S73: after decryption, determine whether the compressed data is punctuation-formatted data.
[0041] Preferably, the step S8 comprises:
[0042] Step S81, extracting dictionary information from the data to be decompressed by using the ZSTD compression algorithm;
[0043] Step S82, restoring the encoding to the original data segment by matching the data segment in the dictionary;
[0044] Step S83, finally, all the decompressed data fragments are spliced together to obtain the original data.
[0045] The beneficial effects of the present invention are as follows: the present invention can reduce the data transmission flow to 5%-8% of the original data at the lowest through encryption and decryption of data, thereby reducing the communication cost for offshore operations; data security is ensured by transmitting after data encryption, and the handshake method of generating keys is adopted to ensure the security of the keys, and the use of symmetric encryption also reduces resource occupation; the present invention ensures data bandwidth occupation and data security by performing efficient compression and secure encryption and decryption of data. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Figure 1 It is a flow chart of a multi-source heterogeneous data transmission processing method for an engineering vessel of the present invention;
[0047] Figure 2 It is a specific flow chart of using the ZSTD compression algorithm to directly compress data losslessly and encrypt the data;
[0048] Figure 3 It is a specific flow chart of encryption verification performed by the requesting end after data compression in the present invention;
[0049] Figure 4 It is a specific flow chart of the receiving end receiving the verification request sent by the requesting end and performing authentication and decryption in the present invention;
[0050] Figure 5 It is a specific flow chart of the present invention in which the requesting end encrypts the compressed data after verification and transmits the encrypted compressed data to the receiving end;
[0051] Figure 6 It is a specific flow chart of the receiving end decrypting the encrypted compressed data and determining whether the compressed data is the marked point formatted data in the present invention;
[0052] Figure 7 It is a specific flow chart of directly decompressing compressed data using the ZSTD compression algorithm in the present invention. DETAILED DESCRIPTION
[0053] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. In the description of the present invention, it should be noted that the terms "center", "up", "down", "left", "right", "vertical", "horizontal", "inside", "outside" and the like indicate directions or positional relationships based on the directions or positional relationships shown in the accompanying drawings, which are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore cannot be understood as a limitation on the present invention. In addition, the terms "first", "second", and "third" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance.
[0054] The present invention will be further described below in conjunction with the accompanying drawings.
[0055] like Figure 1 As shown, a multi-source heterogeneous data transmission and processing method for an engineering ship includes:
[0056] Step S1, the requesting end determines whether the input data is punctuation-formatted data.
[0057] Step S2: If yes, reorganize and compress the data.
[0058] In an embodiment, the data is first reorganized, and after the reorganization, lossy compression of the values is performed, and after compression, the data is rearranged; wherein, the data reorganization is performed by splitting the data and merging multiple common key values into a data set, and the data compression compresses the data by constructing an index table containing frequently occurring data fragments.
[0059] In the embodiment, data reorganization is to remove other redundant public information such as meta information and centrally arrange data according to factors such as data type, perform lossy processing on numerical values, bitize Boolean types, and normalize time.
[0060] Numerical processing mainly targets: time, integers, floating-point numbers and Boolean values.
[0061] Time: Since time is linear, the system is designed based on millisecond timestamps, which currently requires 8 bytes to store. A time series data will have multiple times. The time value processing will take the minimum time as the complete time, and the difference between the minimum time and other times. Using one byte as a group, 255 time data are sequenced at a time, saving at least about 50% of the data. Only one time is retained for recording, and time alone can save a lot of space.
[0062] Integer: Integer data has a size of 1 to 8 bytes and is generally stored in 4 bytes. The numerical processing will determine the actual stored value and take the smallest byte that can be stored as the basis for numerical compression.
[0063] Floating point number: The default value of floating point number is at least 4 or 8 bytes. This algorithm plans to reserve fixed bits, such as 3 bits, round up by *1000, and then perform data compression based on the integer mode.
[0064] Boolean value: In actual computer storage, a Boolean type also occupies one byte. If it is in text format, it may be more than one byte. This algorithm will uniformly convert the bool type into a bit for storage.
[0065] Step S3: If not or after data reorganization and value compression, the ZSTD compression algorithm is used to directly perform lossless compression on the data.
[0066] In the embodiment, the ZSTD compression algorithm is verified by intercepting historical data and generating random data, and the historical data includes but is not limited to normal data, abnormal data, and boundary data.
[0067] like Figure 2 As shown, step S3 includes:
[0068] Step S31, dividing the data to be compressed into data blocks using the ZSTD compression algorithm.
[0069] In an embodiment, the ZSTD compression algorithm is implemented based on a combination of dictionary coding and entropy coding. Dictionary coding refers to using previously occurring data segments to compress current data segments, while entropy coding refers to representing higher frequency data segments with shorter codes and lower frequency data segments with longer codes. The ZSTD compression algorithm can be optimized through dynamic dictionary selection and multi-level hashing.
[0070] Step S32, creating a dictionary, and finding parts similar to the data segments in the current data block through the data segments identified by the ZSTD compression algorithm.
[0071] In an embodiment, the dictionary is composed of a series of data segments, which are extracted from previous data.
[0072] Step S33: Compressing the data by using a shorter code of the identified data fragment to represent the data fragment in the data block.
[0073] Step S4: After data compression, the requesting end performs encryption verification.
[0074] like Figure 3 As shown, step S4 includes:
[0075] Step S41: The requesting end generates a random string and appends verification information.
[0076] Step S42: Use the public key to asymmetrically encrypt the verification information, and send the random string and the verification information to the server.
[0077] In the embodiment, the asymmetric encryption handshake adopts the national secret SM2 algorithm, which adopts the principle of elliptic curve cryptography and has the characteristics of high security, high efficiency and scalability.
[0078] Step S5: The receiving end receives the verification request sent by the requesting end and performs authentication and decryption.
[0079] like Figure 4 As shown, step S5 includes:
[0080] Step S51: the receiving end receives the random character string and the verification request sent by the requesting end.
[0081] Step S52: Use the private key to decrypt the verification information to obtain decrypted data.
[0082] Step S53, determine whether the decrypted data is authentication data, if not, return an error, if yes, generate a random string and return it to the client.
[0083] Step S6: After the verification is passed, the requesting end encrypts the compressed data and transmits the encrypted compressed data to the receiving end.
[0084] like Figure 5 As shown, step S6 includes:
[0085] Step S61, after receiving the random string returned by the receiving end, the requesting end uses the local random string and the random string returned by the receiving end to call the API to generate a secret key and save it.
[0086] Step S62: Encrypt the compressed data using the generated key.
[0087] Step S63, transmitting the encrypted compressed data to the receiving end.
[0088] Step S7: The receiving end decrypts the encrypted compressed data and determines whether the compressed data is punctuation-formatted data.
[0089] like Figure 6 As shown, step S7 includes:
[0090] Step S71: The receiving end uses the local random string and the random string sent by the requesting end to call the API to generate a secret key and save it.
[0091] In the embodiment, for the receiving end, after each authentication information process is completed, the generated data key and validity period will be saved to the server, the key will be backed up, and the backed up key SDK will also be encrypted and needs to be decrypted by the SDK before use.
[0092] In the embodiment, the requesting end first encrypts with a public key, and the receiving end returns authentication data after authentication. Both parties then authenticate the data, generate a symmetric key through encryption and decryption, and then perform symmetric encryption to ensure data security.
[0093] Step S72: decrypt the compressed data using the generated key.
[0094] Step S73: after decryption, determine whether the compressed data is punctuation-formatted data.
[0095] Step S8: If not, the ZSTD compression algorithm is used to directly decompress the compressed data.
[0096] like Figure 7 As shown, step S8 includes:
[0097] Step S81, extracting dictionary information from the data to be decompressed by using the ZSTD compression algorithm.
[0098] Step S82, restore the code to the original data segment by matching the data segment in the dictionary.
[0099] Step S83, finally, all the decompressed data fragments are spliced together to obtain the original data.
[0100] Step S9: If yes, the compressed data is directly decompressed using the ZSTD compression algorithm, and then numerical compression and data reorganization are performed to obtain the original data.
[0101] The above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions described in the above embodiments may still be modified, or some or all of the technical features may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-source heterogeneous data transmission and processing method for an engineering vessel, characterized in that: include: Step S1, the request end determines whether the input data is formatted data with a vertices mark; Step S2: if yes, reorganize and compress the data; Step S3, if not or after data reorganization and value compression, then use ZSTD compression algorithm to directly perform lossless compression on the data; Step S4, after data compression, the requesting end performs encryption verification; Step S5, the receiving end receives the verification request sent by the requesting end and performs decryption authentication; Step S6, after the requesting end passes the verification, the requesting end encrypts the compressed data and transmits the encrypted compressed data to the receiving end; Step S7, the receiving end decrypts the encrypted compressed data and determines whether the compressed data is formatted data with a vertebral point; Step S8: if not, then use the ZSTD compression algorithm to directly decompress the compressed data to obtain the original data; Step S9: If yes, the compressed data is directly decompressed using the ZSTD compression algorithm, and then numerical decompression and data reorganization are performed to obtain the original data.
2. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 1, characterized in that: In step S2, the data is first reorganized, and after the reorganization, the values are lossily compressed, and after compression, the data is rearranged; wherein, the data reorganization is performed by splitting the data and merging multiple common key values into a data set, and the data compression is performed by constructing an index table containing frequently occurring data fragments to compress the data.
3. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 1, characterized in that: In step S3, the ZSTD compression algorithm is verified by intercepting historical data and generating random data, and the historical data includes but is not limited to normal data, abnormal data, and boundary data.
4. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 1, characterized in that: The step S3 comprises: Step S31, dividing the data to be compressed into data blocks by using the ZSTD compression algorithm; Step S32, creating a dictionary, identifying data segments through the ZSTD compression algorithm to find parts similar to the data segments in the current data block; Step S33: Compressing the data by using a shorter code of the identified data fragment to represent the data fragment in the data block.
5. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 4, characterized in that: In step S31, the ZSTD compression algorithm is implemented based on a combination of dictionary coding and entropy coding. Dictionary coding refers to compressing the current data segment using the previously occurring data segment, while entropy coding refers to representing the data segment with a higher frequency with a shorter code, and the data segment with a lower frequency with a longer code; wherein the ZSTD compression algorithm is optimized by dynamic dictionary selection and multi-level hashing; In step S32, the dictionary is composed of a series of data segments, and these data segments are extracted from previous data.
6. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 4, characterized in that: The step S4 comprises: Step S41, the requesting end generates a random string and adds verification information; Step S42: Use the public key to asymmetrically encrypt the verification information, and send the random string and the verification information to the receiving end.
7. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 6, characterized in that: The step S5 comprises: Step S51, the receiving end receives the random string and the verification request sent by the requesting end; Step S52, decrypt the verification information using the private key to obtain decrypted data; Step S53, determine whether the decrypted data is authentication data, if not, return an error, if yes, generate a random string and return it to the requesting end.
8. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 7, characterized in that: The step S6 comprises: Step S61, after receiving the random string returned by the receiving end, the requesting end uses the local random string and the random string returned by the receiving end to call the API to generate a secret key and save it; Step S62, encrypting the compressed data using the generated key; Step S63, transmitting the encrypted compressed data to the receiving end.
9. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 8, characterized in that: The step S7 comprises: Step S71, the receiving end uses the local random string and the random string sent by the requesting end to call the API to generate a secret key and save it; Step S72, decrypting the compressed data using the generated key; Step S73: after decryption, determine whether the compressed data is punctuation-formatted data.
10. The multi-source heterogeneous data transmission and processing method for an engineering vessel according to claim 9, characterized in that: The step S8 comprises: Step S81, extracting dictionary information from the data to be decompressed by using the ZSTD compression algorithm; Step S82, restoring the encoding to the original data segment by matching the data segment in the dictionary; Step S83, finally, all the decompressed data fragments are spliced together to obtain the original data.
