A method and device for processing inspection data
By determining the target sequence order and parameter order of inspection parameters in intelligent inspection and encrypting them, the problem of easy leakage of inspection data is solved, and the security of data transmission is achieved.
Patent Information
- Application Number
- CN202210205509.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-03
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2042-03-03
AI Technical Summary
In intelligent inspection, if the sequence and order of inspection parameters in the inspection data are fixed, hackers can easily identify and leak core data.
By obtaining the initial sequence order and parameter order of the inspection parameter sequence, and combining them with event identifiers, the target sequence order and target parameter order are determined. Inspection data processing is then performed, including encryption and hashing, to generate and identify inspection data.
It effectively prevents hackers from guessing the inspection data according to a specific order, protects core data from being leaked, and improves data transmission security.
Smart Images

Figure CN114579994B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method and apparatus for processing inspection data. Background Technology
[0002] Currently, in intelligent inspection applications, the server and the inspector's terminal need to transmit inspection data. The inspection parameters within this data typically contain core information from the inspection process.
[0003] However, the sequence order of the inspection parameter sequences in the inspection data and the parameter order within their respective sequences are fixed. That is, the sequence order and parameter order are determined according to preset sequence order rules and preset parameter sequence rules, respectively. This makes it relatively easy for hackers to identify the inspection parameters contained in the inspection data after obtaining it, leading to the leakage of these parameters. Summary of the Invention
[0004] Therefore, it is necessary to provide a method and apparatus for processing inspection data to address the aforementioned technical problems.
[0005] Firstly, a method for processing inspection data is provided, the method comprising:
[0006] Obtain the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier; the initial sequence order is determined according to a preset sequence order rule; the initial parameter order is determined according to a preset parameter order rule.
[0007] Based on the event identifier and the initial sequence order corresponding to each of the inspection parameter sequences, determine the target sequence order corresponding to each of the inspection parameter sequences;
[0008] For each inspection parameter contained in each inspection parameter sequence, the target parameter order of the inspection parameter in the corresponding inspection parameter sequence is determined according to the event identifier, the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the corresponding inspection parameter sequence.
[0009] Inspection data processing is performed based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0010] As an optional implementation, determining the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence includes:
[0011] For each inspection parameter sequence, if the event identifier is odd, the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence.
[0012] If the event identifier is even, then the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence is incremented by 1 to determine the target sequence order corresponding to the inspection parameter sequence.
[0013] As an optional implementation, determining the target parameter order of each inspection parameter in each inspection parameter sequence, based on the event identifier, the number of inspection parameters in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the sequence, includes:
[0014] For each inspection parameter contained in each inspection parameter sequence, the remainder of the sum of the initial parameter order of the inspection parameter in its respective inspection parameter sequence and the event identifier, divided by the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, is determined as the target parameter order of the inspection parameter in its respective inspection parameter sequence.
[0015] As an optional implementation, when the method is applied to the sender, the step of processing the inspection data according to the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence includes:
[0016] Based on the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence, inspection data corresponding to the inspection parameters to be transmitted is generated.
[0017] The inspection data is sent to the recipient.
[0018] As an optional implementation, when the method is applied to the receiver, the step of processing the inspection data according to the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence includes:
[0019] Based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, the inspection parameters contained in the received inspection data are identified.
[0020] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes:
[0021] For each target character contained in each inspection parameter, the corresponding target encrypted character is queried from the preset character and encrypted character correspondence, and the target character is replaced with the target encrypted character corresponding to the target character.
[0022] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes:
[0023] Add a preset safety information header and / or a preset safety information tail to the inspection data to obtain the inspection data with added safety information.
[0024] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes:
[0025] The inspection data is hashed and encrypted to obtain the first hash value corresponding to the inspection data.
[0026] As an optional implementation, when the method is applied to the receiver, before identifying the inspection parameters contained in the received inspection data, the method further includes:
[0027] The second hash value corresponding to the inspection data sent by the sender;
[0028] In the pre-stored correspondence between inspection data and hash values, the target inspection data corresponding to the second hash value is queried and used as the received inspection data.
[0029] Secondly, a device for processing inspection data is provided, the device comprising:
[0030] The acquisition module is used to acquire the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier; the initial sequence order is determined according to a preset sequence order rule; the initial parameter order is determined according to a preset parameter order rule.
[0031] The first determining module is used to determine the target sequence order corresponding to each of the inspection parameter sequences based on the event identifier and the initial sequence order corresponding to each of the inspection parameter sequences;
[0032] The second determining module is used to determine the target parameter order of each inspection parameter in each inspection parameter sequence based on the event identifier, the number of inspection parameters in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the inspection parameter sequence.
[0033] The processing module is used to process inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0034] As an optional implementation, the first determining module is specifically used for:
[0035] For each inspection parameter sequence, if the event identifier is odd, the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence.
[0036] If the event identifier is even, then the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence is incremented by 1 to determine the target sequence order corresponding to the inspection parameter sequence.
[0037] As an optional implementation, the second determining module is specifically used for:
[0038] For each inspection parameter contained in each inspection parameter sequence, the remainder of the sum of the initial parameter order of the inspection parameter in its respective inspection parameter sequence and the event identifier, divided by the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, is determined as the target parameter order of the inspection parameter in its respective inspection parameter sequence.
[0039] As an optional implementation, when the device is applied to the sender, the processing module is specifically used for:
[0040] Based on the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence, inspection data corresponding to the inspection parameters to be transmitted is generated.
[0041] The inspection data is sent to the recipient.
[0042] As an optional implementation, when the device is applied to the receiver, the processing module is further configured to identify the inspection parameters contained in the received inspection data based on the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0043] As an optional implementation, when the device is applied to the sender, the processing module is further configured to, for each target character contained in each inspection parameter, query the target encrypted character corresponding to the target character in the preset character and encrypted character correspondence, and replace the target character with the target encrypted character corresponding to the target character.
[0044] As an optional implementation, when the device is applied to the sender, the processing module is further configured to add a preset security information header and / or a preset security information tail to the inspection data to obtain the inspection data after the security information is added.
[0045] As an optional implementation, when the device is applied to the sender, the processing module is further configured to perform hash encryption processing on the inspection data to obtain a first hash value corresponding to the inspection data.
[0046] As an optional implementation, when the device is applied to the receiver, the processing module is specifically used for:
[0047] The second hash value corresponding to the inspection data sent by the sender;
[0048] In the pre-stored correspondence between inspection data and hash values, the target inspection data corresponding to the second hash value is queried and used as the received inspection data.
[0049] Thirdly, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program executable on the processor, and the processor executes the computer program to perform the steps of the method described in the first aspect.
[0050] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in the first aspect.
[0051] This application provides a method and apparatus for processing inspection data. The technical solutions provided by the embodiments of this application bring at least the following beneficial effects:
[0052] In intelligent inspection applications, when the transmitted inspection data involves core data, the computer device, acting as a server or inspection terminal, acquires the initial sequence order of each inspection parameter sequence, the initial parameter order of each inspection parameter within its respective inspection parameter sequence, and the event identifier. The initial sequence order and the initial parameter order are determined according to preset sequence order rules. Based on the event identifier and the initial sequence order of each inspection parameter sequence, the computer device determines the target sequence order of each inspection parameter sequence. Then, for each inspection parameter contained in each inspection parameter sequence, the computer device determines the target parameter order of that inspection parameter within its respective inspection parameter sequence based on the event identifier, the number of inspection parameters in the sequence, and the initial parameter order of that inspection parameter within its respective sequence. Finally, the computer device processes the inspection data based on the target sequence order of each inspection parameter sequence and the target parameter order of each inspection parameter within its respective sequence. Using the above methods, the computer equipment performs sequence transformation processing on the sequence order of the inspection sequence and the parameter order of the inspection parameters contained in the inspection sequence based on the event identifier corresponding to the inspection data. This allows the inspection parameters in the inspection data corresponding to different event identifiers to be processed in different orders, which can solve the problem of hackers guessing the inspection parameters in the inspection data in a specific order, leading to the leakage of core data in the inspection data.
[0053] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 This is a schematic diagram illustrating the application environment of a method for processing inspection data provided in an embodiment of this application.
[0056] Figure 2 A flowchart illustrating a method for processing inspection data provided in this application embodiment;
[0057] Figure 3 A flowchart illustrating an example of a handshake data processing method provided in this application embodiment;
[0058] Figure 4A schematic diagram of the structure of the inspection data processing device provided in the embodiments of this application;
[0059] Figure 5 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation
[0060] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0061] The inspection data processing method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, the inspection terminal 101 communicates with the server 102 via a network. The content of the communication can be inspection data, specifically, the inspection parameters in the inspection data contain the core data of the inspection process. The inspection terminal 101 or the server 102 can obtain the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier. The inspection terminal 101 or the server 102 can determine the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence. For each inspection parameter contained in each inspection parameter sequence, the inspection terminal 101 or the server 102 can determine the target parameter order of that inspection parameter in its respective inspection parameter sequence based on the event identifier, the number of inspection parameters contained in the inspection parameter sequence to which that inspection parameter belongs, and the initial parameter order of that inspection parameter in its respective inspection parameter sequence. The inspection terminal 101 or server 102 can process inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence. The inspection terminal 101 can be, but is not limited to, various personal computers, laptops, smartphones, tablets and portable wearable devices, and the server 102 can be implemented using a standalone server or a server cluster composed of multiple servers.
[0062] The following will describe in detail, with reference to specific implementation methods, a method for processing inspection data provided in this application. Figure 2 A flowchart illustrating a method for processing inspection data provided in this application embodiment is shown below. Figure 2 As shown, the specific steps are as follows:
[0063] Step 201: Obtain the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier. The initial sequence order is determined according to preset sequence order rules, and the initial parameter order is determined according to preset parameter order rules.
[0064] In implementation, when the inspection terminal or server needs to process inspection data (such as generating inspection data corresponding to inspection parameters to be transmitted or identifying inspection parameters contained in received inspection data), it can obtain the initial sequence order of each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier. Inspection parameters in the inspection data are used to represent information such as inspected materials and inspection permissions. For example, the inspection data may include six inspection parameters: the first is the industry classification code, the second is the enterprise nature code, the third is the material classification code, the fourth is the temporary management code, the fifth is the super management code, and the sixth is the time validity code. To achieve isolation of inspection parameters for different purposes, inspection parameters with the same purpose can be divided into multiple inspection parameter sequences. For example, the first inspection parameter sequence consists of three inspection parameters representing basic information: industry classification code, enterprise nature code, and material classification code. The second inspection parameter sequence consists of three inspection parameters representing permission levels: temporary management code, super management code, and time validity period code. Within the inspection data, the inspection parameter sequences are sorted according to the initial sequence order; the initial parameter order is determined according to preset parameter order rules.
[0065] Each time an event related to inspection data is triggered, the server or inspection terminal generates an event identifier corresponding to that event, serving as the location path of the event. The preferred event identifier meets the following conditions: the event identifier is a numerical value, initialized to 0, incremented by 1 each time an event related to inspection data is triggered, and reset at system time 00:00 (midnight of the calendar day). Therefore, within the same calendar day, the event identifier corresponding to the inspection data triggered by the server or inspection terminal will be different for different events. For example, if the server needs to send inspection data to the inspection terminal, it can actively trigger an inspection data sending event and obtain the event identifier corresponding to that inspection data; if the inspection terminal receives inspection data from the server, it can trigger an inspection data receiving event and obtain the event identifier corresponding to that inspection data based on the inspection data receiving event. Since the server and inspection terminal have one-to-one private communication, for the sending and receiving of the same inspection data, the event identifier corresponding to the inspection data triggered by the inspection terminal and the server will be the same.
[0066] Step 202: Determine the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence.
[0067] In implementation, the server or inspection terminal determines the target sequence order of each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence. This target sequence order is used for subsequent inspection data processing. Because the event identifiers triggered by the server or inspection terminal are different for different events within the same natural day, the target sequence order corresponding to each inspection parameter sequence determined based on different events will also be different. This makes it difficult for external parties to identify the inspection parameter sequences in the inspection data.
[0068] As an optional implementation, the process by which the server or inspection terminal determines the target sequence order of each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence is as follows:
[0069] Step 1: For each inspection parameter sequence, if the event identifier is odd, then the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence.
[0070] In implementation, for each inspection parameter sequence, if the event identifier is odd, the server or inspection terminal determines the initial sequence order corresponding to that inspection parameter sequence as the target sequence order. For example, the inspection data contains two inspection parameter sequences, namely the first inspection parameter sequence and the second inspection parameter sequence. The initial sequence order of the first inspection parameter sequence is 0, and the initial sequence order of the second inspection parameter sequence is 1. If the event identifier is 1, then the target sequence order of the first inspection parameter sequence is 0, and the target sequence order of the second inspection parameter sequence is 1.
[0071] Step 2: If the event identifier is even, add 1 to the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence to determine the target sequence order corresponding to the inspection parameter sequence.
[0072] In implementation, if the event identifier is even, the server or inspection terminal will add 1 to the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to that inspection parameter sequence, and determine the target sequence order corresponding to that inspection parameter sequence. In other words, the target sequence order is adjusted to the reverse of the initial sequence order. For example, the inspection data contains two inspection parameter sequences, namely the first inspection parameter sequence and the second inspection parameter sequence. The initial sequence order of the first inspection parameter sequence is 0, and the initial sequence order of the second inspection parameter sequence is 1. If the event identifier is 2, then the target sequence order of the first inspection parameter sequence is 1, and the target sequence order of the second inspection parameter sequence is 0.
[0073] Step 203: For each inspection parameter contained in each inspection parameter sequence, determine the target parameter order of the inspection parameter in its respective inspection parameter sequence based on the event identifier, the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in its respective inspection parameter sequence.
[0074] In implementation, for each inspection parameter in each inspection parameter sequence, the server or inspection terminal determines the target parameter order within that sequence based on the event identifier, the number of inspection parameters in the sequence, and the initial parameter order of that parameter within the sequence. This target parameter order is used for subsequent inspection data processing. Because the event identifiers corresponding to the inspection data triggered by the server or inspection terminal differ for different events within the same calendar day, the target parameter order for each parameter in each inspection parameter sequence will also differ based on the event, making it difficult for external parties to identify the inspection parameters in the inspection data.
[0075] As an optional implementation, the server or inspection terminal determines the target parameter order of each inspection parameter in each inspection parameter sequence based on the event identifier, the number of inspection parameters in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the sequence. The process is as follows:
[0076] For each inspection parameter contained in each inspection parameter sequence, the remainder of the sum of the initial parameter order of the inspection parameter in its respective inspection parameter sequence and the event identifier, divided by the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, is determined as the target parameter order of the inspection parameter in its respective inspection parameter sequence.
[0077] In implementation, for each inspection parameter in each inspection parameter sequence, the server or inspection terminal determines the target parameter order of that parameter within its sequence by taking the remainder of the sum of the initial parameter order of that parameter in its sequence and the event identifier, modulo the number of inspection parameters in the sequence. For example, the first inspection parameter sequence contains three inspection parameters: industry classification code, enterprise nature code, and material classification code. The initial parameter order of the industry classification code is 0, the initial parameter order of the enterprise nature code is 1, and the initial parameter order of the material classification code is 2. If the event identifier is 5, the target parameter order of the industry classification code is 2, the target parameter order of the enterprise nature code is 0, and the target parameter order of the material classification code is 1. If the event identifier is 6, the target parameter order of the industry classification code is 0, the target parameter order of the enterprise nature code is 1, and the target parameter order of the material classification code is 2.
[0078] Step 204: Process the inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0079] In implementation, the server or inspection terminal processes the inspection data based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter within its respective inspection parameter sequence. Specifically, the sender generates the inspection data through this processing, and the receiver identifies the inspection data through the same processing. By employing this method, external parties cannot guess the inspection parameters within the inspection data based on the initial sequence order corresponding to each inspection parameter sequence and the initial parameter order of each inspection parameter within its respective inspection parameter sequence, thus resolving the issue of core data leakage within the inspection data.
[0080] As an optional implementation, the sender and receiver can be determined according to the flow of inspection data. When the server sends inspection data to the inspection terminal, the sender is the server and the receiver is the inspection terminal; conversely, when the inspection terminal sends inspection data to the server, the sender is the inspection terminal and the receiver is the server. When the method is applied to the sender, the sender processes the inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, as follows:
[0081] Step 1: Generate inspection data corresponding to the inspection parameters to be transmitted based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0082] In implementation, the sender generates inspection data corresponding to the inspection parameters to be transmitted based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter within its respective inspection parameter sequence. The target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter within its respective inspection parameter sequence are difficult for external parties to identify in the generated inspection data. Furthermore, depending on the needs of the actual application scenario, the sender can further process the inspection data during the generation process to enhance its security.
[0083] Step 2: Send the inspection data to the recipient.
[0084] In practice, the sender transmits inspection data to the receiver.
[0085] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the sender's processing also includes, to further enhance the security of the inspection data:
[0086] For each target character contained in each inspection parameter, query the target encrypted character corresponding to the target character in the preset character and encrypted character correspondence, and replace the target character with the target encrypted character corresponding to the target character.
[0087] In implementation, for each target character contained in each inspection parameter, the sender queries the preset character-encryption character correspondence to that target character from the pre-defined character-encryption character mapping, and replaces the target character with its corresponding encrypted character. For example, for the first inspection parameter a3b5dc, the preset character-encryption character mapping is: ab, bd, cf, dc. For each target character contained in the first inspection parameter, the sender queries the preset character-encryption character mapping to the pre-defined character-encryption character mapping, and replaces the target character with its corresponding encrypted character. After the character replacement, the first inspection parameter becomes b3d5cf. Through character replacement, the sender further encrypts the inspection parameters. Without knowing the preset character-encryption character mapping, it is difficult for outsiders to crack the core data in the inspection data based on the character-replaced inspection parameters. Correspondingly, the inspection parameters included in the inspection data received by the receiver are inspection data after character replacement. Therefore, during the inspection data processing process, the receiver needs to query the target initial character corresponding to each encrypted character in each inspection parameter from the preset correspondence between encrypted characters and initial characters, and replace the encrypted character with the target initial character corresponding to the encrypted character to obtain the initial inspection data. This initial inspection data is used by the receiver to identify the inspection parameters in the future.
[0088] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the sender's processing further includes the following steps to enhance the security of the inspection data:
[0089] Add preset safety information headers and / or preset safety information tails to the inspection data to obtain the inspection data with added safety information.
[0090] In implementation, the sender adds a preset security header and / or a preset security tail to the inspection data, resulting in inspection data with added security information. The security information may include an anti-interference function to increase the difficulty for computer programs designed based on artificial intelligence and other technologies to crack the arrangement patterns of the inspection parameters in the inspection data. The security information may also include other information, such as commands indicating the execution of a certain action or feature values indicating the importance level of the inspection data. Furthermore, the security information itself may also indicate the importance level of the inspection data. For example, inspection data with a preset security header and a preset security tail has an importance level of 1; inspection data with a preset security header but no preset security tail has an importance level of 2; inspection data without a preset security header but with a preset security tail has an importance level of 3; and inspection data without a preset security header and a preset security tail has an importance level of 4. Preferably, the preset security header and preset security tail meet the following condition: the preset security header and preset security tail contain a preset separator at the junction with the inspection data. Accordingly, the inspection data received by the receiver is the inspection data after security information has been added. Therefore, during the inspection data processing process, the receiver needs to identify the target security information header and / or target security information tail in the inspection data, as well as the inspection data before the security information was added, based on the preset correspondence between the separator and the security information header and tail. Furthermore, the receiver can identify the target security information header and / or target security information tail and perform corresponding processing, such as determining the importance level of the inspection data based on the target security information header and / or target security information tail.
[0091] As an optional implementation, when the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the sender's processing further includes the following steps to enhance the security of the inspection data:
[0092] The inspection data is hashed to obtain the first hash value corresponding to the inspection data.
[0093] In implementation, the sender performs hash encryption on the inspection data to obtain a first hash value corresponding to the inspection data, and then sends the first hash value to the receiver. Hash encryption is irreversible; it is difficult for outsiders to reconstruct the inspection data before hash encryption based on the first hash value. Therefore, sending the first hash value to the receiver further enhances the security of the inspection data.
[0094] As an optional implementation, when the method is applied to the receiver, the processing procedure for inspection data processing, based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, is as follows:
[0095] Based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, the inspection parameters contained in the received inspection data are identified.
[0096] In implementation, the receiver identifies the inspection parameters contained in the received inspection data based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence. In practical applications, after the inspection terminal identifies the inspection parameters contained in the inspection data, it performs corresponding actions based on the inspection parameters, such as transmitting data back.
[0097] As an optional implementation, when the method is applied to the receiver, the receiver's processing procedure further includes the following steps before identifying the inspection parameters contained in the received inspection data:
[0098] Step 1: Receive the second hash value corresponding to the inspection data sent by the sender.
[0099] In practice, the receiver receives the second hash value corresponding to the inspection data sent by the sender. This second hash value is the hash value obtained by the sender after performing hash encryption on the inspection data.
[0100] Step 2: In the pre-stored correspondence between inspection data and hash values, query the target inspection data corresponding to the second hash value, and use it as the received inspection data.
[0101] In implementation, the receiver queries the pre-stored mapping between inspection data and hash values to find the target inspection data corresponding to the second hash value, which is then used as the received inspection data. In practical applications, the pre-stored mapping between inspection data and hash values can be used as an unlocking dictionary file. The receiver performs a fuzzy search in this unlocking dictionary file based on the second hash value, and uses results with a similarity value greater than 50% as the target inspection data. The target inspection data and the event identifiers corresponding to the received inspection data are stored in an archive file for subsequent identification of the inspection parameters contained in the inspection data.
[0102] The inspection data processing method provided in this application embodiment can also be applied to the handshake processing between mobile terminals and communication base stations to prevent fake base stations from hijacking the handshake data. Figure 3 This is a flowchart illustrating an example of a handshake data processing method provided in this application. The computer device can be a mobile terminal or a communication base station, such as... Figure 3 As shown, the specific processing procedure of the computer device is as follows:
[0103] Step 301: Obtain the initial sequence order corresponding to each handshake parameter sequence, the initial parameter order of each handshake parameter in its respective handshake parameter sequence, and the event identifier. The initial sequence order is determined according to a preset sequence order rule, and the initial parameter order is determined according to a preset parameter order rule.
[0104] Step 302: For each handshake parameter sequence, if the event identifier is odd, the initial sequence order corresponding to the handshake parameter sequence is determined as the target sequence order corresponding to the handshake parameter sequence.
[0105] Step 303: If the event identifier is even, add 1 to the difference between the total number of handshake parameter sequences and the initial sequence order corresponding to the handshake parameter sequence to determine the target sequence order corresponding to the handshake parameter sequence.
[0106] Step 304: For each handshake parameter contained in each handshake parameter sequence, the remainder of the sum of the initial parameter order of the handshake parameter in its respective handshake parameter sequence and the event identifier, divided by the number of handshake parameters contained in the handshake parameter sequence to which the handshake parameter belongs, is determined as the target parameter order of the handshake parameter in its respective handshake parameter sequence.
[0107] The sender and receiver can be determined according to the flow of handshake data. When the communication base station sends handshake data to the mobile terminal, the sender is the communication base station and the receiver is the mobile terminal. When the mobile terminal sends handshake data to the communication base station, the sender is the mobile terminal and the receiver is the communication base station. If the method is applied to the sender, the sender executes steps 305 to 309; if the method is applied to the receiver, the receiver executes steps 310 to 312.
[0108] Step 305: Generate handshake data corresponding to the handshake parameters to be transmitted based on the target sequence order corresponding to each handshake parameter sequence and the target parameter order of each handshake parameter in its respective handshake parameter sequence.
[0109] Step 306: For each target character contained in each handshake parameter, query the target encrypted character corresponding to the target character in the preset character and encrypted character correspondence, and replace the target character with the target encrypted character corresponding to the target character.
[0110] Step 307: Add a preset security header and / or a preset security tail to the handshake data to obtain the handshake data with added security information.
[0111] Step 308: Perform hash encryption on the handshake data to obtain the first hash value corresponding to the handshake data.
[0112] Step 309: Send handshake data to the receiver.
[0113] Step 310: Receive the second hash value corresponding to the handshake data sent by the sender.
[0114] Step 311: In the pre-stored correspondence between handshake data and hash values, query the target handshake data corresponding to the second hash value, and use it as the received handshake data.
[0115] Step 312: Identify the handshake parameters contained in the received handshake data based on the target sequence order corresponding to each handshake parameter sequence and the target parameter order of each handshake parameter in its respective handshake parameter sequence.
[0116] This application provides a method for processing inspection data. In intelligent inspection applications, when the transmitted inspection data involves core data, a computer device acting as a server or inspection terminal obtains the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter within its respective inspection parameter sequence, and an event identifier. The initial sequence order and the initial parameter order are determined according to preset sequence order rules. The computer device determines the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order. Then, for each inspection parameter included in each inspection parameter sequence, the computer device determines the target parameter order of that inspection parameter within its respective inspection parameter sequence based on the event identifier, the number of inspection parameters in the sequence to which that parameter belongs, and the initial parameter order of that parameter within its respective inspection parameter sequence. Finally, the computer device processes the inspection data based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter within its respective inspection parameter sequence. Using the above methods, the computer equipment performs sequence transformation processing on the sequence order of the inspection sequence and the parameter order of the inspection parameters contained in the inspection sequence based on the event identifier corresponding to the inspection data. This allows the inspection parameters in the inspection data corresponding to different event identifiers to be processed in different orders, which can solve the problem of hackers guessing the inspection parameters in the inspection data in a specific order, leading to the leakage of core data in the inspection data.
[0117] It should be understood that, although Figures 2 to 3 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2 to 3 At least some of the steps in the process may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but may be executed at different times. The execution order of these steps or stages is not necessarily sequential, but may be executed in turn or alternately with other steps or at least some of the steps or stages in other steps.
[0118] It is understood that the same / similar parts between the various embodiments of the methods described above in this specification can be referred to each other. Each embodiment focuses on the differences from other embodiments, and relevant parts can be referred to the description of other method embodiments.
[0119] This application also provides a device for processing inspection data, such as... Figure 4 As shown, the device includes:
[0120] The acquisition module 410 acquires the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier; the initial sequence order is determined according to a preset sequence order rule; the initial parameter order is determined according to a preset parameter order rule.
[0121] The first determining module 420 determines the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence.
[0122] The second determining module 430, for each inspection parameter contained in each inspection parameter sequence, determines the target parameter order of the inspection parameter in the corresponding inspection parameter sequence based on the event identifier, the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the corresponding inspection parameter sequence.
[0123] The processing module 440 processes the inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0124] As an optional implementation, the first determining module is specifically used for:
[0125] For each inspection parameter sequence, if the event identifier is odd, the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence.
[0126] If the event identifier is even, the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence is incremented by 1 to determine the target sequence order corresponding to the inspection parameter sequence.
[0127] As an optional implementation, the second determining module is specifically used for:
[0128] For each inspection parameter contained in each inspection parameter sequence, the remainder of the sum of the initial parameter order of the inspection parameter in its respective inspection parameter sequence and the event identifier, divided by the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, is determined as the target parameter order of the inspection parameter in its respective inspection parameter sequence.
[0129] As an optional implementation, when the device is used on the sender, the processing module is specifically used for:
[0130] Based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, the inspection data corresponding to the inspection parameter to be transmitted is generated.
[0131] Send inspection data to the recipient.
[0132] As an optional implementation, when the device is applied to the receiver, the processing module is further configured to identify the inspection parameters contained in the received inspection data based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
[0133] As an optional implementation, when the device is applied to the sender, the processing module is further configured to, for each target character contained in each inspection parameter, query the target encrypted character corresponding to the target character in the preset character and encrypted character correspondence, and replace the target character with the target encrypted character corresponding to the target character.
[0134] As an optional implementation, when the device is applied to the sender, the processing module is also used to add a preset security information header and / or a preset security information tail to the inspection data to obtain the inspection data after the security information is added.
[0135] As an optional implementation, when the device is applied to the sender, the processing module is also used to perform hash encryption processing on the inspection data to obtain the first hash value corresponding to the inspection data.
[0136] As an optional implementation, when the device is applied to the receiver, the processing module is specifically used for:
[0137] The second hash value corresponding to the inspection data sent by the sender;
[0138] In the pre-stored correspondence between inspection data and hash values, query the target inspection data corresponding to the second hash value, and use it as the received inspection data.
[0139] This application provides a device for processing inspection data. In intelligent inspection applications, when the transmitted inspection data involves core data, a computer device acting as a server or inspection terminal obtains the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter within its respective inspection parameter sequence, and an event identifier. The initial sequence order and the initial parameter order are determined according to preset sequence order rules. The computer device determines the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order. Then, for each inspection parameter included in each inspection parameter sequence, the computer device determines the target parameter order of that inspection parameter within its respective inspection parameter sequence based on the event identifier, the number of inspection parameters in the sequence to which that parameter belongs, and the initial parameter order of that parameter within its respective inspection parameter sequence. Finally, the computer device processes the inspection data based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter within its respective inspection parameter sequence. Using the above methods, the computer equipment performs sequence transformation processing on the sequence order of the inspection sequence and the parameter order of the inspection parameters contained in the inspection sequence based on the event identifier corresponding to the inspection data. This allows the inspection parameters in the inspection data corresponding to different event identifiers to be processed in different orders, which can solve the problem of hackers guessing the inspection parameters in the inspection data in a specific order, leading to the leakage of core data in the inspection data.
[0140] Specific limitations regarding the inspection data processing device can be found in the above description of the inspection data processing method, and will not be repeated here. Each module in the aforementioned inspection data processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the computer device's memory as software, so that the processor can call and execute the corresponding operations of each module.
[0141] In one embodiment, a computer device is provided, such as Figure 5 As shown, it includes a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the computer program, it implements the method steps for processing the above-mentioned inspection data.
[0142] In one embodiment, a computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the method for processing the inspection data described above.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0144] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0145] It should also be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0146] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0147] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0148] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for processing inspection data, characterized in that, The method includes: Obtain the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier; the initial sequence order is determined according to a preset sequence order rule; the initial parameter order is determined according to a preset parameter order rule. Based on the event identifier and the initial sequence order corresponding to each of the inspection parameter sequences, determine the target sequence order corresponding to each of the inspection parameter sequences; For each inspection parameter contained in each inspection parameter sequence, the target parameter order of the inspection parameter in the corresponding inspection parameter sequence is determined according to the event identifier, the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the corresponding inspection parameter sequence. The inspection data is processed according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence. The step of determining the target sequence order corresponding to each inspection parameter sequence based on the event identifier and the initial sequence order corresponding to each inspection parameter sequence includes: for each inspection parameter sequence, if the event identifier is odd, then the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence; if the event identifier is even, then the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence is incremented by 1 to determine the target sequence order corresponding to the inspection parameter sequence.
2. The method according to claim 1, characterized in that, For each inspection parameter included in each inspection parameter sequence, the target parameter order of the inspection parameter in its respective inspection parameter sequence is determined based on the event identifier, the number of inspection parameters in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in its respective inspection parameter sequence. This includes: For each inspection parameter contained in each inspection parameter sequence, the remainder of the sum of the initial parameter order of the inspection parameter in its respective inspection parameter sequence and the event identifier, divided by the number of inspection parameters contained in the inspection parameter sequence to which the inspection parameter belongs, is determined as the target parameter order of the inspection parameter in its respective inspection parameter sequence.
3. The method according to claim 1, characterized in that, When the method is applied to the sender, the step of processing the inspection data according to the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence includes: Based on the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence, inspection data corresponding to the inspection parameters to be transmitted is generated. The inspection data is sent to the recipient.
4. The method according to claim 1, characterized in that, When the method is applied to the receiver, the step of processing the inspection data according to the target sequence order corresponding to each of the inspection parameter sequences and the target parameter order of each inspection parameter in its respective inspection parameter sequence includes: Based on the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence, the inspection parameters contained in the received inspection data are identified.
5. The method according to claim 3, characterized in that, When the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes: For each target character contained in each inspection parameter, the corresponding target encrypted character is queried from the preset character and encrypted character correspondence, and the target character is replaced with the target encrypted character corresponding to the target character.
6. The method according to claim 3, characterized in that, When the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes: Add a preset safety information header and / or a preset safety information tail to the inspection data to obtain the inspection data with added safety information.
7. The method according to claim 3, characterized in that, When the method is applied to the sender, after generating the inspection data corresponding to the inspection parameters to be transmitted, the method further includes: The inspection data is hashed and encrypted to obtain the first hash value corresponding to the inspection data.
8. The method according to claim 4, characterized in that, When the method is applied to the receiver, before identifying the inspection parameters contained in the received inspection data, the method further includes: The second hash value corresponding to the inspection data sent by the sender; In the pre-stored correspondence between inspection data and hash values, the target inspection data corresponding to the second hash value is queried and used as the received inspection data.
9. A device for processing inspection data, characterized in that, The device includes: The acquisition module is used to acquire the initial sequence order corresponding to each inspection parameter sequence, the initial parameter order of each inspection parameter in its respective inspection parameter sequence, and the event identifier; the initial sequence order is determined according to a preset sequence order rule; the initial parameter order is determined according to a preset parameter order rule. The first determining module is used to determine the target sequence order corresponding to each of the inspection parameter sequences based on the event identifier and the initial sequence order corresponding to each of the inspection parameter sequences; for each inspection parameter sequence, if the event identifier is odd, the initial sequence order corresponding to the inspection parameter sequence is determined as the target sequence order corresponding to the inspection parameter sequence; if the event identifier is even, the difference between the total number of inspection parameter sequences and the initial sequence order corresponding to the inspection parameter sequence is incremented by 1 to determine the target sequence order corresponding to the inspection parameter sequence. The second determining module is used to determine the target parameter order of each inspection parameter in each inspection parameter sequence based on the event identifier, the number of inspection parameters in the inspection parameter sequence to which the inspection parameter belongs, and the initial parameter order of the inspection parameter in the inspection parameter sequence. The processing module is used to process inspection data according to the target sequence order corresponding to each inspection parameter sequence and the target parameter order of each inspection parameter in its respective inspection parameter sequence.
Citation Information
Patent Citations
Method and server for generating and issuing inspection tasks
CN105809331A