Information verification methods and systems, computer-readable storage media and computer equipment

By generating random passwords based on timestamps and device addresses for information verification in the manufacturing industry's information systems, the problems of information loss and security between information systems are solved, lightweight encrypted information verification is achieved, and the stability and security of the production system are improved.

CN117014164BActive Publication Date: 2026-11-17BOE TECHNOLOGY GROUP CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210465156.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-29
Publication Date
2026-11-17
Estimated Expiration
2042-04-29

AI Technical Summary

Technical Problem

In the manufacturing industry, insufficient information verification between information systems leads to information loss and security issues, affecting production stability. Furthermore, the complexity of existing encryption algorithms causes data transmission bottlenecks.

Method used

Information verification is performed by generating random passwords based on timestamps, device address information, and the information itself. Lightweight encryption methods are generated using hash and XOR operations to ensure information integrity and security.

Benefits of technology

It achieves comprehensive verification from three dimensions: time, information source, and information, thereby improving the security and stability of the information system and avoiding transmission bottlenecks caused by data loss and the complexity of encryption algorithms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117014164B_ABST
    Figure CN117014164B_ABST
Patent Text Reader

Abstract

This application discloses an information verification method and system, a computer-readable storage medium, and a computer device. One embodiment of the information verification method includes: a first device generating first information and obtaining a timestamp from a server; the first device generating a first random password based on the timestamp, the first device's address information, and the information body of the first information to generate second information, the second information including the first random password and the first information; and the first device sending the second information to a second device, causing the second device to generate multiple second random passwords, and comparing each of the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified. The information verification method provided by this application improves network security by generating a first random password based on a timestamp, the first device's address information, and the information body of the first information, and sending it to the second device, causing the second device to generate a second random password for verification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to an information verification method and system, a computer-readable storage medium, and a computer device. Background Technology

[0002] Manufacturing industry production analysis systems are diverse, with different systems working in tandem. However, if these systems directly send and receive information without verification, data loss may occur, leading to abnormal equipment information and significantly impacting production. Furthermore, unauthenticated third-party users can freely send broadcasts / multicasts by cracking Wi-Fi, penetrating intranets, using VPNs, or physical access, causing insecure information to spread freely across various systems. This can also severely disrupt the normal operation of production systems, and in severe cases, even lead to production shutdowns.

[0003] Furthermore, in the manufacturing industry, various production systems have high data transmission requirements depending on output volume. While ensuring information security, the large volume of concurrent information transmission means that overly complex encryption algorithms can make security a bottleneck for data transmission, leading to message delays and impacting production. Therefore, lightweight encryption algorithms are urgently needed in the manufacturing industry.

[0004] Therefore, there is a need to provide an information verification scheme that can comprehensively consider the integrity, security, and lightweight encryption of information to ensure the safe and stable operation of the production system. Summary of the Invention

[0005] To address at least one of the aforementioned problems, a first aspect of this application provides an information verification method applied to a first device, comprising:

[0006] The first device generates the first information and obtains a timestamp from the server. The first information is production information used for inter-device interaction in the production network.

[0007] The first device generates a first random password based on a timestamp, the address information of the first device, and the information body of the first information to generate second information, the second information including the first random password and the first information; and

[0008] The first device sends the second information to the second device, which then generates multiple second random passwords and compares each of the second random passwords with the first random password. When a match is found, the first information is successfully verified.

[0009] In some optional embodiments, the first information includes: a packet header, user information of the first device, address information of the first device, and an information body, wherein the information body includes information length and information content.

[0010] The first device generates a first random password based on a timestamp, the address information of the first device, and the information body of the first information to generate the second information, which further includes:

[0011] The user information, information content, and information packet header are respectively subjected to a first hash operation to obtain the first encrypted data, the second encrypted data, and the third encrypted data;

[0012] Perform a bit padding operation on the address information and timestamp to make the padded address information and the padded timestamp have the same number of bits.

[0013] The fourth encrypted data is obtained by performing an XOR operation between the padded address information and the padded timestamp, and then multiplying the result by the information length; and

[0014] The first to fourth encrypted data are combined and then subjected to a second hash operation to obtain the first random password.

[0015] In some optional embodiments, padding the address information and timestamp further includes:

[0016] The address information is padded to the same number of digits as the timestamp to obtain the intermediate value;

[0017] The intermediate value and the timestamp are encrypted separately to obtain the padded address information and the padded timestamp.

[0018] In some optional embodiments, the first information further includes: factory information of the first device.

[0019] The padding operation on the address information and the timestamp further includes:

[0020] The factory information is padded with stacked bits to obtain the complete data;

[0021] The supplementary data is combined with the address information to obtain the intermediate value.

[0022] In some alternative embodiments, the timestamp is the sum of the server's base time and a pre-set offset time.

[0023] In some optional embodiments, the first device sending the second information to the second device further includes:

[0024] The first device sends the second information to the second device.

[0025] The second device generates multiple offset timestamps based on the timestamp, the offset timestamps being obtained by adding or subtracting a predetermined offset value from the timestamps, and the second device obtains a second random password based on the same operation rules as the first device for obtaining the first encrypted information, wherein the timestamp is replaced with the offset timestamps during the operation.

[0026] In some optional embodiments, the first device sending the second information to the second device further includes:

[0027] The first device sends the second information to the information middleware, which then obtains the address of the second device included in the second information and forwards the second information to the second device.

[0028] In some optional embodiments, the first and second hash operations are performed using the MD5 hashing method.

[0029] A second aspect of this application provides an information verification method applied to a server, comprising:

[0030] Receive a time synchronization request from the first device;

[0031] In response to a time synchronization request, a timestamp is sent to the first device.

[0032] After the first device generates the first information, it generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate the second information. The second information includes the random password and the first information. The first device sends the second information to the second device, so that the second device generates multiple second random passwords and compares the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified.

[0033] In some alternative embodiments, the timestamp is the sum of the server's base time and a pre-set offset time.

[0034] A third aspect of this application provides an information verification system, comprising: a server, a first device, and a second device, wherein...

[0035] The server responds to the time synchronization request from the first device by sending a timestamp to the first device;

[0036] The first device generates first information, generates a first random password based on a timestamp, the address information of the first device, and the information body of the first information to generate second information, and sends the second information to the second device, wherein the second information includes the first random password and the first information;

[0037] The second device generates multiple second random passwords based on the second information, and compares the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified.

[0038] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon.

[0039] When the program is executed by the processor, it implements the method described in the first aspect above; or

[0040] When the program is executed by the processor, it implements the method described in the second aspect above.

[0041] A fifth aspect of this application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0042] When the processor executes the program, it implements the method described in the first aspect above; or

[0043] When the processor executes the program, it implements the method described in the second aspect above.

[0044] The beneficial effects of this application are as follows:

[0045] This application addresses existing problems by providing an information verification method and system, a computer-readable storage medium, and a computer device. It involves setting a first device to generate a first random password based on a timestamp, the device's address information, and the information content of the first information to generate second information. This second information is then sent to a second device, causing the second device to generate a second random password. Information verification is performed by comparing the second random password with the first random password. This allows for information verification from three dimensions: time, information source, and information itself, fully considering the security, legality, and integrity of information, improving the stable operation of production systems, and possessing broad application prospects. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0047] Figure 1 A flowchart illustrating the information verification method according to an embodiment of this application is shown;

[0048] Figure 2 A schematic diagram of an information verification system illustrating the application information verification method of this application embodiment is shown.

[0049] Figure 3 A flowchart illustrating the information verification method of an embodiment of this application is shown;

[0050] Figure 4 A schematic diagram of the encryption method in the information verification method of this application embodiment is shown;

[0051] Figure 5 This document illustrates a verification flowchart for the second device according to an embodiment of this application.

[0052] Figure 6A flowchart illustrating an information verification method according to another embodiment of this application is shown;

[0053] Figure 7 This illustration shows a structural schematic diagram of a computer device according to another embodiment of this application. Detailed Implementation

[0054] To more clearly illustrate this application, the following description, in conjunction with preferred embodiments and accompanying drawings, further clarifies the application. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of this application.

[0055] To solve at least one of the above problems, such as Figure 1 As shown, an embodiment of this application provides an information verification method applied to a first device, comprising:

[0056] The first device generates the first information and obtains a timestamp from the server. The first information is production information used for inter-device interaction in the production network.

[0057] The first device generates a first random password based on a timestamp, the address information of the first device, and the information body of the first information to generate second information, the second information including the first random password and the first information; and

[0058] The first device sends the second information to the second device, which then generates multiple second random passwords and compares each of the second random passwords with the first random password. When a match is found, the first information is successfully verified.

[0059] In this embodiment, a first random password is generated by the first device based on a timestamp, the address information of the first device, and the information body of the first information to generate the second information. The second information is then sent to the second device, which generates a second random password. The information is verified by comparing the second random password with the first random password. This allows for information verification from three dimensions: time, information source, and information itself. It fully considers the security, legality, and integrity of the information, improves the stable operation of the production system, and has broad application prospects.

[0060] To better understand the information verification method of this application, the structure of the information verification system applying the information verification method of the embodiments of this application will be described first in conjunction with the hardware structure.

[0061] Reference Figure 3The diagram illustrates an information verification system architecture, including: a first device 100-1, second devices 200-1 and 200-2, and a server 300, as shown in the figure. In embodiments of this application, the same device can be either the first device or the second device. For example, if the second device 200-2 also has the functions of the first device, then the second device 200-2 is also the first device 200-2. An information verification system may include multiple first devices and multiple second devices; the specific number is not limited.

[0062] In a specific example, such as an information verification system being a production analysis system in industrial manufacturing, the first device 100-1, the second device 200-1, and the second device 200-2 represent various production equipment, testing equipment, and analysis equipment at different stages of production within the system. Each device includes a communication unit for sending and receiving information.

[0063] In the embodiments of this application, the information verification method is implemented as software or a plug-in and installed or loaded into the systems of the first device 100-1 and the second devices 200-1 and 200-2, or stored in external hardware or firmware. The external hardware or firmware is plugged into the first device 100-1 and the second devices 200-1 and 200-2 so that the first device 100-1 and the second device 200-1 can implement the information verification method of the embodiments of this application.

[0064] Server 300 can be a central server independent of the first and second devices. This server can provide a timestamp for the synchronization time of all the first devices 100-1, second devices 200-1 and 200-2 in the information verification system, so as to ensure that each device can carry out production, testing and analysis control according to a unified time standard, and can perform information verification based on the same time standard to ensure the accuracy of verification. The specific principle will be described in detail below.

[0065] It should be noted that, under normal circumstances, the production network is an intranet environment, and the devices cannot be calibrated with the Internet. Server 300 also cannot be calibrated with the Internet. Server 300 is a separately purchased time server in the information verification system. The time of this server is the standard time, used for time synchronization of devices, switches, etc. in the system. In this embodiment, server 300 is loaded with a plugin to execute the information verification method, in order to cooperate with the first device 100-1 and the second devices 200-1 and 200-2 to perform the information verification process.

[0066] However, this application is not limited to this. In some production environments, there may be production networks that can be connected to the Internet. Therefore, server 300 can be a cloud-based time server. Each device in the system receives timestamps from server 300 by connecting to the Internet, which will not be elaborated here.

[0067] Continue to refer to Figure 2 As shown, in some manufacturing industries, due to the large variety of devices in the system, communication between multiple systems is conducted through an information middleware 400. This information middleware can be software or firmware loaded onto a server or terminal device. This middleware acts solely as an information forwarder in the information verification system, receiving information from the source device and forwarding it to the destination device based on the destination device information included in the information, thereby realizing the information transmission process from the source device to the destination device. Of course, those skilled in the art should understand that the information verification system of this application is not limited to including an information middleware; it is also applicable to systems that transmit information between devices solely through point-to-point communication.

[0068] Based on the above description of the system architecture, the following section combines... Figures 3 to 5 The verification process of the information verification method of the present application embodiment is described in detail with specific examples. In this example, it is assumed that in an information authentication process, the first device 100-1 sends information to the second device 200-1 to complete the information verification process.

[0069] Step S1: The first device generates the first information and obtains the timestamp from the server.

[0070] Specifically, in order to ensure that the time of the first device 100-1 and the second devices 200-1 and 200-2 are always synchronized, the first device 100-1 and the second devices 200-1 and 200-2 can periodically send time synchronization requests to the server 300. The server 300 sends timestamps to the first device 100-1 and the second devices 200-1 and 200-2 based on the received time synchronization requests to complete the time synchronization.

[0071] In the embodiments of this application, the timing of the time synchronization requests sent by the first device 100-1 and the second devices 200-1 and 200-2 is not necessarily scheduled. For example, during the production process, if the first device 100-1 and the second devices 200-1 and 200-2 continuously receive a large number of authentication failure results within a predetermined time, it is possible that the time of these devices may be deviated. Therefore, in order to eliminate the impact of time deviation and correct the information verification results in a timely manner to ensure the normal operation of the production process, preferably, when the number of authentication failure results received by the first device 100-1 and the second devices 200-1 and 200-2 within a predetermined time exceeds a threshold, a time synchronization request is sent to the server 300, so that the server 300 sends a timestamp to the device for time synchronization, thereby correcting the authentication error caused by the time deviation in a timely manner.

[0072] Preferably, in the embodiments of this application, the timestamp sent by server 300 to the first device 100-1 and the second devices 200-1 and 200-2 is the sum of the server 300's base time and a pre-set deviation time Δ. With this setting, when all the first devices 100-1 and the second devices 200-1 and 200-2 in the information authentication system use timestamps with this time deviation Δ, information sent by unauthorized users can be quickly located, improving the system's information security. The specific principle will be described in detail below and will not be repeated here.

[0073] Returning to this example, the first device 100-1, acting as the information source, generates the first information to be sent. This first information is production information used for inter-device interaction within the production network, specifically including: process information, logistics information, production instructions, and status information. This first information is typically a packaged data packet, which may include a packet header H, user information U of the first device 100-1 (e.g., the username or user ID of the user using the device, the device ID of the first device 100-1, etc., representing identity information related to the current device), address information of the first device 100-1 (e.g., IP address), and the information body, which includes information content B and information length L.

[0074] Step S2: The first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information. The second information includes the first random password and the first information.

[0075] Specifically, refer to Figure 3 and Figure 4 As shown, in step S21, the user information U, the information content B, and the information packet header H are hashed to obtain the first encrypted data, the second encrypted data, and the third encrypted data.

[0076] Hash, also known as hashing, works by taking input of arbitrary length and applying a hash algorithm to obtain a fixed-length mapping. The output binary string is the hash value. Through hash algorithms, inputs of different lengths can be converted into fixed-length outputs; the result is the hash result.

[0077] Specifically, user information U can be an 8-digit employee ID of the user using the first device 100-1, such as 12345678, or a 7-digit device ID of the first device 100-1, such as CAEDE01. Therefore, user information may have varying lengths. In this embodiment, user information U is encrypted using a hash operation, for example, by using a 16-bit MD5 hash to unify user information U of various lengths into a 16-bit string as the first encrypted data H(U, 16). For example, when user information U is employee ID "12345678", the encrypted first encrypted data is "83aa400af464c76d"; when user information U is device ID "CAEDE01", the encrypted first encrypted data is "cae6b4c7602e1cc6". The MD5 algorithm used in this example leverages hash mapping to increase data randomness after encryption, resulting in strong security. Furthermore, the algorithm is simple, minimizing time wasted in the verification phase and preventing the verification process from impacting production schedules. Of course, those skilled in the art should understand that this encryption process aims to unify the number of bits for various user information Us during a single encryption, and does not necessarily require the same number of bits as other data. Therefore, MD5 encryption can also be performed with different bit lengths to obtain strings of different lengths, which will not be elaborated upon here.

[0078] Information content B represents the specific content of the first piece of information. Different pieces of first information often have different lengths of content (referring to the amount of data within the content). By performing a hash operation on information content B, for example, using the 32-bit MD5 hash, all information content Bs are unified into a 32-bit string as the second encrypted data H(B,32). Similarly, this encryption process aims to unify the bit length of various information content Bs while encrypting them, without necessarily having the same bit length as other data (such as the first encrypted data). Therefore, MD5 encryption can also be performed with different bit lengths to obtain strings of different lengths, which will not be elaborated further here. Information content B can be used for integrity verification and legality verification in information verification.

[0079] The packet header H is, for example, "MachineStateChanged". Because the packet header H is often only used to identify the information type or to distinguish information, its length often varies. In this application, the packet header H is also hashed, for example, using a 16-bit MD5 hash to unify the various lengths of the packet header H into a 16-bit string as the third encrypted data H(H,16). Similarly, MD5 encryption can also be performed on other lengths to obtain strings of other lengths, which will not be elaborated here.

[0080] Because in this step, refer to Figure 4 As shown, the hash operations on user information U, information content B, and information packet header H are performed in parallel. Therefore, the hash operations in this step can be collectively referred to as the first hash operation.

[0081] In step S22, the address information and timestamp are padded with bits to make the padded address information and the padded timestamp have the same number of bits.

[0082] Specifically, the address information is, for example, an IP address, such as 010.083.000.001. The timestamp T is in the form of YYYY-MM-DD HH:MM:SS+Δ, such as January 6, 2022, 00:33:30 + 1 minute 25 seconds 3703, where Δ is a pre-set deviation value, which can be changed periodically to prevent malicious decoding. Therefore, the timestamp T is 18 bits of data, "202201060034553703". It can be seen that the IP address usually has fewer bits than the timestamp T. In the padding operation, the IP address can be padded to the same number of bits as the timestamp T to obtain an intermediate value.

[0083] For example, you can pad the address information with zeros to get the intermediate value 010083000001000000. Of course, you can also pad other values.

[0084] Optionally, the first information also includes factory information F of the first device, such as the factory name or department name. When padding the address information IP to the same number of bits as the timestamp T to obtain an intermediate value, the factory information can be used for stacking bit padding to obtain the padded data. For example, if the factory name is "ARRAY", the padded data is "ARRAYA"; if the factory name is "CELL", the padded data is "CELLCE"; if the factory name is "ABCD", the padded data is "ABCDAB". Taking the padded data as "ABCDAB" as an example, in the padding operation, the padded data is combined with the address information to obtain the intermediate value "010083000001ABCDAB".

[0085] By padded data formed by stacking factory information, and then using this padded data to pad the IP address information, the randomness is further increased compared to using fixed values ​​such as zeros as padding data, thus increasing the difficulty of decryption and improving network security.

[0086] In the padding operation, preferably, after obtaining the intermediate value, to further improve security, the intermediate value and the timestamp can be hashed to obtain the padded address information and the padded timestamp. In this encryption step, the MD5 algorithm can also be used, thus providing one layer of encryption while minimizing computation time during verification, ensuring the normal operation of the production process.

[0087] Continue to refer to Figure 3 and Figure 4 As shown, in step S23, the padded address information and the padded timestamp are XORed and then multiplied by the information length to obtain the fourth encrypted data.

[0088] In the XOR operation, the result is 0 when the two values ​​are the same, and 1 when the two values ​​are different. In the embodiments of this application, each bit of the padded address information and the padded timestamp is converted into a four-bit binary number and then XORed.

[0089] Furthermore, considering the possibility of packet loss during the transmission of the first message, the embodiments of this application also add a message length L as one of the encryption criteria. The message length L represents the total number of lines of statements in the first message.

[0090] Specifically, in step S23, the padded address information and the padded timestamp are XORed and then multiplied by the information length L. After multiplication, MD5 encryption is further performed to obtain the fourth encrypted data, for example, a 32-bit fourth encrypted data H(R,32), such as "85CAA77AF753E00DB7C0B825861F9151". Through the XOR and multiplication operations, the obtained fourth encrypted data is further guaranteed to have extremely high randomness and is difficult to decipher. Furthermore, by performing a penalty operation before encryption, an additional layer of security is added, further increasing the difficulty of deciphering. The processing procedures of steps S22 and S23 can be further referred to Table 1.

[0091]

[0092] Table 1

[0093] In step S24, the first encrypted data to the fourth encrypted data are combined and then subjected to another hash operation to obtain the first random password.

[0094] Specifically, refer to Figure 4 As shown, the first encrypted data, the second encrypted data, the third encrypted data, and the fourth encrypted data are directly combined by data concatenation, and a hash operation is performed on the combined data.

[0095] For example, in this example, given the first encrypted data H(U,16) as “83aa400af464c76d”, the second encrypted data H(B,16) as “B7EB3D2733520627”, the third encrypted data H(H,16) as “A16A430650109182DB5B761A8D94B25”, and the fourth encrypted data H(R,32) as “85CAA77AF753E00DB7C0B825861F9151”, these can be combined in the order of the first, second, fourth, and third encrypted data. The resulting checksum K is: “first encrypted data”, “second encrypted data”, “fourth encrypted data”, and “third encrypted data” (K is 80 bits).

[0096] It should be noted that although the check code K obtained after combination appears to be an unordered check code, if a sufficient amount is obtained, it can still be observed that the first encrypted data and the second encrypted data are multiple cyclic constants. Therefore, in order to protect this data, a final hash operation is performed on the check code in this application.

[0097] In this example, the first encrypted data H(U,16), the second encrypted data H(B,16), the fourth encrypted data H(R,32), and the third encrypted data H(H,16) are 80-bit checksums K obtained by concatenating and combining them. After performing another hash operation, the first random password H(K) is obtained as D7FF58C52E92C25106E794DF4772830F.

[0098] It should be noted that in step S2, the generated first random password and first information will be encapsulated together by the first device 100-1. For example, the first random password can be added before the first information packet as the second information.

[0099] Through the above settings, the user information, information content, and information packet header in the first information are used to form the first encrypted data. The timestamp, address information, and information length are used as variables for operation, and the complexity of the variable data is increased by performing two complex variable operations: XOR and multiplication on the three. Furthermore, this application notes that the timestamp, address information, and information length vary greatly for each generated combination of the first information, but the user information, information content, and information packet header may be regular constants, which may pose a risk of decryption in targeted data analysis. Therefore, this application performs a hash operation on the combined data and uses the characteristics of the hash operation to obtain a first random password H(K) that is irregular and becomes a variable after each encryption. The first random password obtained by the above settings is encrypted in two layers, and two operations are performed on the most important variable information before encryption.

[0100] Furthermore, the first random password undergoes multiple hash operations, meaning each data item is hashed twice. This completely destroys the data structure, making it impossible to brute-force using existing methods, but it still provides crucial evidence for data verification. Based on the above calculations, it's clear that all content in the message is protected by a checksum K. If the destination is modified by an intruder or packet loss during transmission causes arbitrary data changes, the checksum K will change, leading to a change in H(K) and verification failure.

[0101] It is worth mentioning that although the above encryption rules have extremely high security, the encryption operation is more lightweight and will not have a significant impact on the operation. This advantage will be described in the verification section below.

[0102] It should be noted that although this example gives the combination order in step S24 as the first encrypted data H(U,16), the second encrypted data H(B,16), the fourth encrypted data H(R,32), and the third encrypted data H(H,16), those skilled in the art should understand that this is not restrictive. This combination order is merely a pre-agreed and stored operation rule in the software or plugin. As data is concatenated in combination, the order of each encrypted data does not substantially change the security of the first random password. Therefore, if the operation rules in each of the first devices 100-1 and the second devices 200-1 and 200-2 are consistent (i.e., the same combination order is predetermined in all devices in an information verification system), the combination order of the first to fourth encrypted data can be adjusted, which will not be elaborated further below.

[0103] In step S3, the first device sends the second information to the second device, causing the second device to generate multiple second random passwords and compare each of the multiple second random passwords with the first random password. When a match is found, the first information is successfully verified.

[0104] Optionally, the first device 100-1 sends the second information to the information middleware 400, so that the information middleware 400 obtains the second device address included in the second information and forwards the second information to the second device 200-1.

[0105] Specifically, in step S3, the first device 100-1 sends the second information to the second device 200-1, so that the second device 200-1 generates multiple deviation timestamps based on the timestamp. The deviation timestamps are obtained by adding or subtracting a predetermined deviation value from the timestamps. The second device obtains the second random password based on the same operation rules as the first device for obtaining the first encrypted information, wherein the timestamp is replaced with the deviation timestamps during the operation.

[0106] Reference Figure 5As shown, at the second device 200-1 end, after receiving the second information, the second device 200-1 obtains the timestamp T, address information IP, and information body B based on the first information contained in the second information as plaintext. Of course, those skilled in the art should also understand that this only emphasizes three important pieces of information as variables. In the actual verification process, user information U and information packet header H will also be read from the first information content contained in the second information, and factory information F will be read if necessary, which will not be elaborated here.

[0107] After reading the above information, the second device 200-1 generates a second random password according to a predetermined rule, which is the same operation rule stored in the second device 200-1 as the first device 100-1 for generating the first random password.

[0108] Preferably, considering the potential time discrepancies in the arrival time of information at each second device, in this embodiment, the second device 200-1 generates multiple deviation timestamps based on the timestamp. These deviation timestamps are obtained by adding or subtracting a predetermined deviation value from the timestamp. This deviation value is, for example, 0s, ±1s, ±2s, ±3s, ±4s, and ±5s. If the deviation timestamp is calculated by adding the deviation value, 11 second random passwords H(K)' will be obtained according to this deviation value. This setting allows for the correct verification of the first random information while considering environmental factors, thus avoiding errors.

[0109] Next, the second device 200-1 compares the 11 second random passwords H(K)' obtained one by one with the first random password protected in the second information. If a match is found, the verification is successful.

[0110] A successful verification result indicates that the information source, timestamp, and information body of the received information are consistent with the information of the first information. Thus, after verification, it can be guaranteed that the information source is secure and is an authorized information source in the information verification system, and that the information content is complete without packet loss. Therefore, for large-scale production systems where various devices need to cooperate closely, it can ensure that each device receives correct and complete information instructions, and ensure that each stage and node proceeds correctly and orderly.

[0111] Furthermore, since the encryption operation in this embodiment is a lightweight operation method, the corresponding authentication process, when generating multiple second random passwords through this lightweight operation method, has a short calculation time and will not cause unnecessary delays. For production networks that require large amounts of information and high information transmission rates, this can avoid product quality problems caused by excessively long process times, thereby ensuring orderly production and having broad application prospects.

[0112] It is worth mentioning that in the embodiments of this application, the received timestamp is obtained by adding a deviation time. Therefore, this value is unknowable to illegal information sources outside the system, allowing for a more comprehensive consideration of password security during information verification. Furthermore, because the information length L is used as a product factor in the calculation rules of this application, the information length L often decreases when packet loss occurs. This change in value is amplified after multiplication. Therefore, when verification fails, the received second information can be determined to be lost based on the calculated value of the fourth encrypted information generated during verification. Thus, other insecure factors can be identified and stored for alarm processing. Therefore, the calculation rules of the embodiments of this application are also advantageous in determining the cause of verification failure.

[0113] Based on the same inventive concept, referring to Figure 6 As shown, embodiments of this application also provide an information verification method, applied to a server, comprising:

[0114] S1', Receive a time synchronization request from the first device; and

[0115] S2': In response to the time synchronization request, send the timestamp to the first device.

[0116] After the first device generates the first information, it generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate the second information. The second information includes the random password and the first information. The first device sends the second information to the second device, so that the second device generates multiple second random passwords and compares the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified.

[0117] In this embodiment, the server responds to the time synchronization request of the first device by sending a timestamp to the first device. After generating the first information, the first device generates a first random password based on the timestamp, address information, and the information body of the first information to generate the second information, and sends the second information to the second device. The second device then generates a second random password and verifies the information by comparing the second random password with the first random password. This allows for information verification from three dimensions: time, information source, and information itself, fully considering the security, legality, and integrity of the information, improving the stable operation of the production system, and has broad application prospects.

[0118] Optionally, the timestamp is the sum of the base time of server 300 and the preset offset time.

[0119] This setting allows for increased completeness of the production network in terms of timestamp dimensions.

[0120] Based on the same inventive concept, referring to Figure 2 As shown, embodiments of the present invention also provide an information verification system, including: a server 300, a first device 100, and a second device 200. When no distinction is needed, the first device is collectively referred to as the first device 100, and the second device is collectively referred to as the second device 200.

[0121] In response to a time synchronization request from the first device 100, server 300 sends a timestamp to the first device.

[0122] First device 100 generates first information, and generates a first random password based on a timestamp, the address information of first device 100, and the information body of the first information to generate second information, and sends the second information to second device, wherein the second information includes the first random password and the first information.

[0123] The second device 200-1 generates multiple second random passwords based on the second information, and compares the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified.

[0124] In this embodiment, a server, a first device, and a second device are provided. The server provides a timestamp. The first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information, and sends the second information to the second device, so that the second device generates a second random password. The information is verified by comparing the second random password with the first random password. Thus, information verification can be performed from three dimensions: time, information source, and information. This fully considers the security, legality, and integrity of information, improves the stable operation of the production system, and has broad application prospects.

[0125] Another embodiment of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the following: a first device generates first information and obtains a timestamp from a server; the first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information, the second information including the first random password and the first information; and the first device sends the second information to a second device, causing the second device to generate multiple second random passwords and compare the multiple second random passwords with the first random password one by one, and when a match is found, the first information is successfully verified.

[0126] Another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the program performs the following: receiving a time synchronization request from a first device; and in response to the time synchronization request, sending a timestamp to the first device so that after the first device generates first information, it generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information, the second information including the random password and the first information. The first device sends the second information to a second device, causing the second device to generate multiple second random passwords and compare the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified.

[0127] In practical applications, the computer-readable storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0129] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0130] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0131] like Figure 7 As shown, another embodiment of this application provides a structural schematic diagram of a computer device. Figure 7 The computer device 13 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0132] like Figure 7 As shown, the computer device 13 is presented in the form of a general-purpose computing device. The components of the computer device 13 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0133] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0134] Computer device 13 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 13, including volatile and non-volatile media, removable and non-removable media.

[0135] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 13 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0136] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this application.

[0137] Computer device 13 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 13, and / or with any device that enables the computer device 13 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 52. Furthermore, computer device 13 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 50. Figure 7 As shown, network adapter 50 communicates with other modules of computer device 13 via bus 18. It should be understood that, although... Figure 7 As not shown, other hardware and / or software modules may be used in conjunction with computer device 13, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0138] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing an information verification method provided in the embodiments of this application.

[0139] This application addresses existing problems by providing an information verification method and system, a computer-readable storage medium, and a computer device. It involves setting a first device to generate a first random password based on a timestamp, the device's address information, and the information content of the first information to generate second information. This second information is then sent to a second device, causing the second device to generate a second random password. Information verification is performed by comparing the second random password with the first random password. This allows for information verification from three dimensions: time, information source, and information itself, fully considering the security, legality, and integrity of information, improving the stable operation of production systems, and possessing broad application prospects.

[0140] Obviously, the above embodiments of this application are merely examples for clearly illustrating this application, and are not intended to limit the implementation of this application. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all implementation methods here. Any obvious variations or modifications derived from the technical solutions of this application are still within the protection scope of this application.

Claims

1. An information verification method applied to a first device, characterized in that, include: The first device generates the first information and obtains a timestamp from the server. The first information is production information used for inter-device interaction in the production network. The first information includes: a packet header, user information of the first device, address information of the first device, and information body. The information body includes information length and information content. The first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information, the second information including the first random password and the first information; and The first device sends the second information to the second device, causing the second device to generate multiple second random passwords and compare each of the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified. The first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate the second information, which further includes: The user information, the information content, and the information packet header are respectively subjected to a first hash operation to obtain first encrypted data, second encrypted data, and third encrypted data; Perform a bit padding operation on the address information and the timestamp to make the padded address information and the padded timestamp have the same number of bits. The fourth encrypted data is obtained by performing an XOR operation between the padded address information and the padded timestamp, and then multiplying the result by the information length; and The first encrypted data is combined with the fourth encrypted data and then subjected to a second hash operation to obtain the first random password. The first device sending the second information to the second device further includes: The first device sends the second information to the second device; The second device generates multiple offset timestamps based on the timestamp, the offset timestamps being obtained by adding or subtracting a predetermined offset value from the timestamp, and the second device obtains the second random password based on the same calculation rules as the first device for obtaining the first random password, wherein the timestamp is replaced with the offset timestamps during the calculation.

2. The information verification method according to claim 1, characterized in that, The step of padding the address information and the timestamp with bits further includes: The address information is padded to have the same number of digits as the timestamp to obtain an intermediate value; The intermediate value and the timestamp are encrypted respectively to obtain the padded address information and the padded timestamp.

3. The information verification method according to claim 2, characterized in that, The first information also includes: the factory information of the first device. The step of padding the address information and the timestamp with bits further includes: The factory information is padded with stacked bits to obtain the padded data; The padding data is combined with the address information to obtain the intermediate value.

4. The information verification method according to claim 1, characterized in that, The timestamp is the sum of the server's base time and a pre-set deviation time.

5. The information verification method according to claim 1, characterized in that, The first device sending the second information to the second device further includes: The first device sends the second information to the information middleware, which then obtains the second device address included in the second information and forwards the second information to the second device.

6. The information verification method according to claim 1, characterized in that, The first and second hash operations are performed using the MD5 hash method.

7. An information verification method, applied to a server, characterized in that, include: Receive a time synchronization request from the first device; as well as In response to the time synchronization request, a timestamp is sent to the first device. After the first device generates first information, it generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information. The first information includes: a packet header, user information of the first device, address information of the first device, and the information body, the information body including information length and information content. The second information includes the first random password and the first information. The first device sends the second information to the second device, causing the second device to generate multiple second random passwords and compare the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified. The process of generating a first random password from a timestamp, the address information of the first device, and the information body of the first information to generate second information further includes: performing a first hash operation on the user information, the information content, and the information packet header to obtain first encrypted data, second encrypted data, and third encrypted data; performing a bit padding operation on the address information and the timestamp to make the padded address information and the padded timestamp have the same number of bits; performing an XOR operation on the padded address information and the padded timestamp and multiplying the result by the information length to obtain fourth encrypted data; and combining the first encrypted data and the fourth encrypted data and performing a second hash operation to obtain the first random password. The first device sending the second information to the second device further includes: the first device sending the second information to the second device, causing the second device to generate multiple deviation timestamps based on the timestamp, wherein the deviation timestamps are obtained by adding or subtracting a predetermined deviation value from the timestamps, and causing the second device to obtain the second random password based on the same calculation rules as the first device for obtaining the first random password, wherein the timestamp is replaced with the deviation timestamps during the calculation.

8. The information verification method according to claim 7, characterized in that, The timestamp is the sum of the server's base time and a pre-set deviation time.

9. An information verification system, characterized in that, include: Server, first device, and second device, among which... The server sends a timestamp to the first device in response to a time synchronization request from the first device. The first device generates first information, and based on the timestamp, the address information of the first device, and the information body of the first information, generates a first random password to generate second information, and sends the second information to the second device. The second information includes the first random password and the first information. The first information includes: a packet header, user information of the first device, address information of the first device, and the information body. The information body includes information length and information content. The second device generates multiple second random passwords based on the second information, and compares each of the multiple second random passwords with the first random password one by one. When a match is found, the first information is successfully verified. The first device generates a first random password based on the timestamp, the address information of the first device, and the information body of the first information to generate second information. This further includes: performing a first hash operation on the user information, the information content, and the information packet header to obtain first encrypted data, second encrypted data, and third encrypted data; performing a bit-padding operation on the address information and the timestamp to make the padded address information and the padded timestamp have the same number of bits; performing an XOR operation on the padded address information and the padded timestamp and multiplying the result by the information length to obtain fourth encrypted data; and combining the first encrypted data and the fourth encrypted data and performing a second hash operation to obtain the first random password. The first device sending the second information to the second device further includes: the first device sending the second information to the second device, causing the second device to generate multiple deviation timestamps based on the timestamp, wherein the deviation timestamps are obtained by adding or subtracting a predetermined deviation value from the timestamps, and causing the second device to obtain the second random password based on the same calculation rules as the first device for obtaining the first random password, wherein the timestamp is replaced with the deviation timestamps during the calculation.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-6; or When the program is executed by the processor, it implements the method as described in any one of claims 7-8.

11. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-6; or When the processor executes the program, it implements the method as described in any one of claims 7-8.

Citation Information

Patent Citations

  • Method and system for verifying information integrity

    CN102761560A