Test equipment control method and system based on UDP (User Datagram Protocol)

Through the user interface, custom test process and UDP protocol encrypted transmission, combined with the gzip algorithm to compress data, the problem of fixed test process of test equipment is solved, the flexibility, real-time and security of test equipment is improved, and efficient automated management is achieved.

CN120508018APending Publication Date: 2025-08-19FUJIAN NEBULA ELECTRONICS CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510397508.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-01
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The existing testing equipment has a fixed test process, cannot be flexibly adjusted, poor real-time communication, slow data transmission speed, insufficient security, and low degree of automation.

Method used

Customized testing process through the user interface, data transmission and encryption are used using UDP protocol, data compression is compressed with gzip algorithm, and multiple encryption is used using SM3, SM4, ECDH, ECDSA and AES-GCM algorithms to generate test reports.

Benefits of technology

It realizes the flexibility and real-time nature of the test process, improves data transmission speed and security, enhances the degree of automation, and ensures the legality and security of test data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120508018A_ABST
    Figure CN120508018A_ABST
Patent Text Reader

Abstract

The invention provides a test equipment control method and system based on a UDP (User Datagram Protocol) in the technical field of intelligent manufacturing, and the method comprises the steps: S1, carrying out the identity verification through a user interface, and selecting a process template from a template library to customize a test process; s2, generating a test command based on the test process, packaging the test command into a first UDP data packet through a UDP protocol, and sending the first UDP data packet to the test equipment; step S3, the test device decapsulates and verifies the first UDP data packet through a UDP protocol to obtain a test command; s4, executing a test operation based on a test process carried by the test command, and collecting test data in real time; s5, after the test is completed, packaging the test data into a second UDP data packet through the UDP protocol, and uploading the second UDP data packet in real time; and S6, automatically analyzing the test data carried by the second UDP data packet and generating a test report. The method has the advantages that the flexibility, the real-time performance, the safety and the automation degree of testing of the testing equipment are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a test equipment control method and system based on the UDP protocol. Background Art

[0002] In the field of intelligent manufacturing technology, after production is complete, products need to be subjected to a series of tests using test equipment to ensure product quality. Test equipment plays an increasingly important role in product quality control, performance evaluation, and fault diagnosis. As product complexity increases, the traditional method of controlling test equipment for testing has revealed the following problems:

[0003] 1. The test equipment uses a fixed test process, which users cannot flexibly adjust according to actual needs. They can only rely on the standard test process provided by the manufacturer. As a result, in different test scenarios, additional tools or manual operations are often required, which reduces test efficiency and increases the risk of errors.

[0004] 2. The test equipment uses serial or other complex protocols for communication, resulting in slow data transmission speed and poor real-time performance, which makes it difficult to meet the needs of high-frequency data interaction. In addition, these communication methods have high requirements for the network environment and are easily interfered with.

[0005] 3. There is a lack of effective mechanisms to protect relevant sensitive information. Key test parameters and indicators may be obtained by test equipment manufacturers, resulting in the leakage of commercial secrets.

[0006] 4. The test data generated by the test equipment is not fed back in a timely manner, and the test status cannot be grasped in a timely manner, which affects the timeliness and accuracy of decision-making. After receiving the test data, manual analysis and processing are often required, resulting in a long response time and inability to achieve automated management.

[0007] Therefore, how to provide a test equipment control method and system based on the UDP protocol to improve the flexibility, real-time performance, security and automation of test equipment testing has become a technical problem that needs to be solved urgently. Summary of the Invention

[0008] The technical problem to be solved by the present invention is to provide a test equipment control method and system based on the UDP protocol, so as to improve the flexibility, real-time performance, security and automation level of the test equipment test.

[0009] In a first aspect, the present invention provides a test equipment control method based on the UDP protocol, comprising the following steps:

[0010] Step S1: After identity authentication through the user interface, select a process template from the template library, drag and drop or add or delete each test function module on the process template, and set the test parameters of each test function module to customize the test process;

[0011] Step S2: Generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device;

[0012] Step S3: The test device decapsulates and verifies the first UDP data packet through the UDP protocol to obtain the test command;

[0013] Step S4: The test device performs a test operation based on the test process carried by the test command, collects test data in real time, and records a test log;

[0014] Step S5: After the test is completed, the test device encapsulates the test data into a second UDP data packet through the UDP protocol and uploads it in real time;

[0015] Step S6: After decapsulating and verifying the second UDP data packet through the UDP protocol, the test data is obtained, and the test data is automatically analyzed and a test report is generated.

[0016] Furthermore, the step S1 is specifically as follows:

[0017] After obtaining the user name and password entered by the user through the user interface for identity authentication, a process template is selected from the preset template library through the user interface, and each test function module is dragged or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations.

[0018] Furthermore, the step S2 is specifically as follows:

[0019] Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time;

[0020] The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

[0021] Furthermore, the step S3 is specifically as follows:

[0022] The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data;

[0023] Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

[0024] Furthermore, the step S4 is specifically as follows:

[0025] The test device automatically triggers the test process to execute the test operation based on the test start time and test duration carried in the test command, collects test data in real time, and records the test log;

[0026] The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log;

[0027] The test device regularly clears the encrypted log based on a preset log storage period;

[0028] The step S5 is specifically as follows:

[0029] After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time;

[0030] The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

[0031] In a second aspect, the present invention provides a test equipment control system based on the UDP protocol, comprising the following modules:

[0032] A test process definition module is used to select a process template from a template library after identity verification through a user interface, drag and drop or add or delete each test function module on the process template, and set test parameters for each test function module to customize the test process;

[0033] a test command issuing module, configured to generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device;

[0034] A test command acquisition module, configured to obtain the test command after the test device decapsulates and verifies the first UDP data packet through the UDP protocol;

[0035] A test operation execution module is used to test the device to execute the test operation based on the test process carried by the test command, collect test data in real time, and record the test log;

[0036] The test data uploading module is used to encapsulate the test data into a second UDP data packet through the UDP protocol and upload it in real time after the test is completed;

[0037] The test report generating module is used to decapsulate and verify the second UDP data packet through the UDP protocol to obtain the test data, automatically analyze the test data and generate a test report.

[0038] Furthermore, the test process definition module is specifically used to:

[0039] After obtaining the user name and password entered by the user through the user interface for identity authentication, a process template is selected from the preset template library through the user interface, and each test function module is dragged or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations.

[0040] Furthermore, the test command issuing module is specifically used to:

[0041] Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time;

[0042] The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

[0043] Furthermore, the test command acquisition module is specifically used to:

[0044] The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data;

[0045] Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

[0046] Furthermore, the test operation execution module is specifically used to:

[0047] The test device automatically triggers the test process to execute the test operation based on the test start time and test duration carried in the test command, collects test data in real time, and records the test log;

[0048] The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log;

[0049] The test device regularly clears the encrypted log based on a preset log storage period;

[0050] The test data upload module is specifically used to:

[0051] After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time;

[0052] The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

[0053] The advantages of the present invention are:

[0054] 1. After authentication through the user interface, select a process template from the template library, drag and drop or add or delete each test function module on the process template, and customize the test parameters of each test function module to generate a test command based on the test process, and encapsulate the test command into a first UDP data packet through the UDP protocol and send it to the test device; then the test device decapsulates and verifies the first UDP data packet through the UDP protocol to obtain the test command, executes the test operation based on the test process carried by the test command, collects test data in real time and records the test log. After the test is completed, encapsulate the test data into a second UDP data packet through the UDP protocol and upload it in real time; finally, decapsulate and verify the second UDP data packet through the UDP protocol to obtain the test data, automatically analyze the test data and generate a test report; that is, users can use the process template The test process can be flexibly adjusted according to the board and test parameters to adapt to different test scenarios; communication through the UDP protocol can effectively improve the data transmission speed, reduce delays, and meet the needs of high-frequency data interaction; identity authentication is performed through the user interface, and the timeliness and integrity are verified through the timestamp and checksum carried by the UDP data packet. The legitimacy and timeliness are verified through the test equipment serial number carried by the test command and the command generation time. By encrypting the test log and test data and taking multiple security measures, the legitimacy of the test and the security of related data transmission are guaranteed; by automatically uploading the second UDP data packet after the test is completed, and automatically analyzing and generating a test report based on the second UDP data packet, the test status can be grasped in time, the response time can be shortened, and ultimately the flexibility, real-time performance, security and automation of the test equipment test are greatly improved.

[0055] 2. Data transmission is carried out through the UDP protocol, and the gzip algorithm is used to compress the test data to be transmitted, effectively reducing the amount of data to be transmitted, greatly improving the data transmission speed, and thus greatly improving the real-time performance of the test equipment test.

[0056] 3. Select a process template from the preset template library through the user interface, drag and drop or add or delete each test function module on the selected process template, and set the test parameters and logical relationships of each test function module to generate a customized test process for controlling the test equipment to perform test operations. That is, the test process is generated in an interactive manner based on the process template by dragging and dropping, which greatly improves the convenience of test process generation.

[0057] 4. The test log is hashed using the SM3 algorithm to obtain a hash value. A key is generated using the SM4 algorithm. The test log and hash value are encrypted using the key to obtain encrypted data. A public and private key pair is generated using the ECDH algorithm. The public key is used to encrypt the key to obtain the encryption key. The encrypted data is signed with the private key to obtain the signature data. The private key and public key are encrypted into an encrypted public-private key using the ECDSA algorithm. The encrypted data, encryption key, signature data, and encrypted public-private keys are then encapsulated using the AES-GCM algorithm to obtain the encrypted log. The hash value is then used for integrity verification. Data encrypted with the public key can only be decrypted by the private key, and data signed with the private key can only be verified by the public key. The public and private keys are doubly encrypted using the ECDSA and AES-GCM algorithms. At least six security measures (SM3, SM4, ECDH, public-private keys, ECDSA, and AES-GCM) are implemented to prevent the test log from being stolen in plain text, greatly improving the security of test log storage.

[0058] 5. Compress the test data using the gzip algorithm to obtain compressed data, map each character of the compressed data using mapping rules to obtain first-level ciphertext data, swap the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypt the second-level ciphertext data into encrypted test data using the AES algorithm, encapsulate the encrypted test data into a second UDP data packet using the UDP protocol and upload it in real time; if the corresponding data transformation rules or encryption algorithm are not known, the second UDP data packet cannot be cracked. At least four security measures (character mapping, character swapping, AES algorithm, and UDP protocol) are taken before and after, which greatly improves the security of test data upload.

[0059] 6. Further improve security by adopting different encryption schemes for test log storage and test data upload.

[0060] 7. Regularly clean up encrypted logs through the preset log storage cycle, which not only saves storage space but also reduces potential security risks. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0062] Figure 1 The present invention is a flow chart of a test equipment control method based on UDP protocol.

[0063] Figure 2 It is a structural diagram of a test equipment control system based on UDP protocol of the present invention. DETAILED DESCRIPTION

[0064] The technical solution in the embodiments of the present application has the following overall idea: the test process is flexibly adjusted through process templates, test parameters, etc. to adapt to different test scenarios; communication through the UDP protocol can effectively improve data transmission speed and reduce delays; identity authentication is performed through the user interface, timeliness verification and integrity verification are performed through the timestamp and checksum carried by the UDP data packet, legitimacy verification and timeliness verification are performed through the test equipment serial number carried by the test command and the command generation time, and the legitimacy of the test and the security of related data transmission and storage are guaranteed by encrypting the test log and test data; by automatically uploading a second UDP data packet after the test is completed, and automatically analyzing and generating a test report based on the second UDP data packet, the test status can be grasped in time, and the response time can be shortened, so as to improve the flexibility, real-time performance, security and automation of the test equipment test.

[0065] Please refer to Figures 1 to 2 As shown, a preferred embodiment of a test equipment control method based on UDP protocol of the present invention includes the following steps:

[0066] Step S1: After identity authentication through the user interface, select a process template from the template library, drag and drop or add or delete each test function module on the process template, and set the test parameters of each test function module to customize the test process;

[0067] Step S2: Generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device;

[0068] Step S3: The test device decapsulates and verifies the first UDP data packet through the UDP protocol to obtain the test command;

[0069] Step S4: The test device performs a test operation based on the test process carried by the test command, collects test data in real time, and records a test log;

[0070] Step S5: After the test is completed, the test device encapsulates the test data into a second UDP data packet through the UDP protocol and uploads it in real time;

[0071] Step S6: After decapsulating and verifying the received second UDP data packet using the UDP protocol, the test data is obtained, and the test data is automatically analyzed to generate a test report. Analyzing the test data determines whether the test values of the test data meet preset standards. The test report includes a test pass rate and a trend chart to help users better understand the test data and optimize the test process.

[0072] The step S1 is specifically as follows:

[0073] After obtaining the user's username and password for identity authentication through the user interface, a process template is selected from a preset template library through the user interface. Each test function module is dragged and dropped or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations. By customizing the test process, the relevant parameters of the test process will not be exposed to the test equipment manufacturer, further improving security. During specific implementation, corresponding permissions can be set for each user name.

[0074] Select a process template from the preset template library through the user interface, drag and drop or add or delete each test function module on the selected process template, and set the test parameters and logical relationships of each test function module to generate a customized test process for controlling the test equipment to perform test operations. That is, the test process is generated in an interactive manner of dragging and dropping based on the process template, which greatly improves the convenience of test process generation.

[0075] The step S2 is specifically as follows:

[0076] Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time;

[0077] The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

[0078] When the first UDP data packet is sent to the test device, a timer is started. If no confirmation feedback is received from the test device within the specified time, the first UDP data packet will be resent until the maximum number of retransmissions is reached.

[0079] During specific implementation, before communication, a handshake is performed with the test equipment to confirm the communication capabilities and communication parameters of both parties to ensure smooth subsequent data transmission.

[0080] For example, define the heartbeat bit (byte 1) and service ID identification bit (byte 0) for toggle byte communication: if the service ID is set to the corresponding number and feedback is given, the handshake is considered successful. In addition, the toggle bytes of the sender and receiver are incremented by 1 every 100ms and then sent to each other as a heartbeat instruction. Every 1s, check whether the toggle bytes have changed. If there is no change, the heartbeat is lost and the test stops.

[0081]

[0082] The step S3 is specifically as follows:

[0083] The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data;

[0084] Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

[0085] The step S4 is specifically as follows:

[0086] Based on the test start time and test duration carried in the test command, the test device automatically triggers the test process to execute the test operation, collects test data in real time, and records the test log. In specific implementation, the test log may include the operation steps, data transmission status, test results, related abnormal information, etc. of each test, which facilitates subsequent analysis and tracking.

[0087] The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log;

[0088] The test log is hashed using the SM3 algorithm to obtain a hash value. A key is generated using the SM4 algorithm. The test log and hash value are encrypted using the key to obtain encrypted data. A public and private key pair is generated using the ECDH algorithm. The public key is used to encrypt the key to obtain the encryption key. The encrypted data is signed using the private key to obtain the signature data. The private key and public key are encrypted into an encrypted public-private key using the ECDSA algorithm. The encrypted data, encryption key, signature data, and encrypted public-private keys are then encapsulated using the AES-GCM algorithm to obtain the encrypted log. The hash value can then be used for integrity verification. Data encrypted with the public key can only be decrypted by the private key, and data signed with the private key can only be verified by the public key. The public and private keys are doubly encrypted using the ECDSA and AES-GCM algorithms. At least six security measures (SM3, SM4, ECDH, public-private keys, ECDSA, and AES-GCM) are implemented to prevent the test log from being stolen in plaintext, greatly improving the security of test log storage.

[0089] The test device regularly clears the encrypted log based on a preset log storage period;

[0090] By setting a preset log storage period and regularly cleaning encrypted logs, you can not only save storage space but also reduce potential security risks.

[0091] The step S5 is specifically as follows:

[0092] After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time;

[0093] Data transmission is carried out through the UDP protocol, and the gzip algorithm is used to compress the test data to be transmitted, effectively reducing the amount of data to be transmitted, greatly improving the data transmission speed, and thus greatly improving the real-time performance of the test equipment test.

[0094] The test data is compressed using the gzip algorithm to obtain compressed data, and each character of the compressed data is mapped using mapping rules to obtain first-level ciphertext data. The number 0 and the letter O in the first-level ciphertext data are swapped to obtain second-level ciphertext data, and the second-level ciphertext data is encrypted into encrypted test data using the AES algorithm. The encrypted test data is encapsulated into a second UDP data packet using the UDP protocol and uploaded in real time. If the corresponding data transformation rules or encryption algorithm are not known, the second UDP data packet cannot be cracked. At least four security measures (character mapping, character swapping, AES algorithm, and UDP protocol) are taken before and after, which greatly improves the security of test data upload.

[0095] Security is further improved by adopting different encryption schemes for test log storage and test data upload.

[0096] The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

[0097] A preferred embodiment of a test equipment control system based on the UDP protocol of the present invention includes the following modules:

[0098] A test process definition module is used to select a process template from a template library after identity verification through a user interface, drag and drop or add or delete each test function module on the process template, and set test parameters for each test function module to customize the test process;

[0099] a test command issuing module, configured to generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device;

[0100] A test command acquisition module, configured to obtain the test command after the test device decapsulates and verifies the first UDP data packet through the UDP protocol;

[0101] A test operation execution module is used to test the device to execute the test operation based on the test process carried by the test command, collect test data in real time, and record the test log;

[0102] The test data uploading module is used to encapsulate the test data into a second UDP data packet through the UDP protocol and upload it in real time after the test is completed;

[0103] The test report generation module is configured to decapsulate and verify the received second UDP data packet via the UDP protocol to obtain the test data, automatically analyze the test data, and generate a test report. Analyzing the test data determines whether the test values of the test data meet preset standards. The test report includes a test pass rate and a trend chart to help users better understand the test data and optimize the test process.

[0104] The test process definition module is specifically used to:

[0105] After obtaining the user's username and password for identity authentication through the user interface, a process template is selected from a preset template library through the user interface. Each test function module is dragged and dropped or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations. By customizing the test process, the relevant parameters of the test process will not be exposed to the test equipment manufacturer, further improving security. During specific implementation, corresponding permissions can be set for each user name.

[0106] Select a process template from the preset template library through the user interface, drag and drop or add or delete each test function module on the selected process template, and set the test parameters and logical relationships of each test function module to generate a customized test process for controlling the test equipment to perform test operations. That is, the test process is generated in an interactive manner of dragging and dropping based on the process template, which greatly improves the convenience of test process generation.

[0107] The test command issuing module is specifically used for:

[0108] Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time;

[0109] The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

[0110] When the first UDP data packet is sent to the test device, a timer is started. If no confirmation feedback is received from the test device within the specified time, the first UDP data packet will be resent until the maximum number of retransmissions is reached.

[0111] During specific implementation, before communication, a handshake is performed with the test equipment to confirm the communication capabilities and communication parameters of both parties to ensure smooth subsequent data transmission.

[0112] For example, define the heartbeat bit (byte 1) and service ID identification bit (byte 0) for toggle byte communication: if the service ID is set to the corresponding number and feedback is given, the handshake is considered successful. In addition, the toggle bytes of the sender and receiver are incremented by 1 every 100ms and then sent to each other as a heartbeat instruction. Every 1s, check whether the toggle bytes have changed. If there is no change, the heartbeat is lost and the test stops.

[0113]

[0114] The test command acquisition module is specifically used for:

[0115] The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data;

[0116] Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

[0117] The test operation execution module is specifically used to:

[0118] Based on the test start time and test duration carried in the test command, the test device automatically triggers the test process to execute the test operation, collects test data in real time, and records the test log. In specific implementation, the test log may include the operation steps, data transmission status, test results, related abnormal information, etc. of each test, which facilitates subsequent analysis and tracking.

[0119] The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log;

[0120] The test log is hashed using the SM3 algorithm to obtain a hash value. A key is generated using the SM4 algorithm. The test log and hash value are encrypted using the key to obtain encrypted data. A public and private key pair is generated using the ECDH algorithm. The public key is used to encrypt the key to obtain the encryption key. The encrypted data is signed using the private key to obtain the signature data. The private key and public key are encrypted into an encrypted public-private key using the ECDSA algorithm. The encrypted data, encryption key, signature data, and encrypted public-private keys are then encapsulated using the AES-GCM algorithm to obtain the encrypted log. The hash value can then be used for integrity verification. Data encrypted with the public key can only be decrypted by the private key, and data signed with the private key can only be verified by the public key. The public and private keys are doubly encrypted using the ECDSA and AES-GCM algorithms. At least six security measures (SM3, SM4, ECDH, public-private keys, ECDSA, and AES-GCM) are implemented to prevent the test log from being stolen in plaintext, greatly improving the security of test log storage.

[0121] The test device regularly clears the encrypted log based on a preset log storage period;

[0122] By setting a preset log storage period and regularly cleaning encrypted logs, you can not only save storage space but also reduce potential security risks.

[0123] The test data upload module is specifically used to:

[0124] After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time;

[0125] Data transmission is carried out through the UDP protocol, and the gzip algorithm is used to compress the test data to be transmitted, effectively reducing the amount of data to be transmitted, greatly improving the data transmission speed, and thus greatly improving the real-time performance of the test equipment test.

[0126] The test data is compressed using the gzip algorithm to obtain compressed data, and each character of the compressed data is mapped using mapping rules to obtain first-level ciphertext data. The number 0 and the letter O in the first-level ciphertext data are swapped to obtain second-level ciphertext data, and the second-level ciphertext data is encrypted into encrypted test data using the AES algorithm. The encrypted test data is encapsulated into a second UDP data packet using the UDP protocol and uploaded in real time. If the corresponding data transformation rules or encryption algorithm are not known, the second UDP data packet cannot be cracked. At least four security measures (character mapping, character swapping, AES algorithm, and UDP protocol) are taken before and after, which greatly improves the security of test data upload.

[0127] Security is further improved by adopting different encryption schemes for test log storage and test data upload.

[0128] The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

[0129] In summary, the advantages of the present invention are:

[0130] 1. After authentication through the user interface, select a process template from the template library, drag and drop or add or delete each test function module on the process template, and customize the test parameters of each test function module to generate a test command based on the test process, and encapsulate the test command into a first UDP data packet through the UDP protocol and send it to the test device; then the test device decapsulates and verifies the first UDP data packet through the UDP protocol to obtain the test command, executes the test operation based on the test process carried by the test command, collects test data in real time and records the test log. After the test is completed, encapsulate the test data into a second UDP data packet through the UDP protocol and upload it in real time; finally, decapsulate and verify the second UDP data packet through the UDP protocol to obtain the test data, automatically analyze the test data and generate a test report; that is, users can use the process template The test process can be flexibly adjusted according to the board and test parameters to adapt to different test scenarios; communication through the UDP protocol can effectively improve the data transmission speed, reduce delays, and meet the needs of high-frequency data interaction; identity authentication is performed through the user interface, and the timeliness and integrity are verified through the timestamp and checksum carried by the UDP data packet. The legitimacy and timeliness are verified through the test equipment serial number carried by the test command and the command generation time. By encrypting the test log and test data and taking multiple security measures, the legitimacy of the test and the security of related data transmission are guaranteed; by automatically uploading the second UDP data packet after the test is completed, and automatically analyzing and generating a test report based on the second UDP data packet, the test status can be grasped in time, the response time can be shortened, and ultimately the flexibility, real-time performance, security and automation of the test equipment test are greatly improved.

[0131] 2. Data transmission is carried out through the UDP protocol, and the gzip algorithm is used to compress the test data to be transmitted, effectively reducing the amount of data to be transmitted, greatly improving the data transmission speed, and thus greatly improving the real-time performance of the test equipment test.

[0132] 3. Select a process template from the preset template library through the user interface, drag and drop or add or delete each test function module on the selected process template, and set the test parameters and logical relationships of each test function module to generate a customized test process for controlling the test equipment to perform test operations. That is, the test process is generated in an interactive manner based on the process template by dragging and dropping, which greatly improves the convenience of test process generation.

[0133] 4. The test log is hashed using the SM3 algorithm to obtain a hash value. A key is generated using the SM4 algorithm. The test log and hash value are encrypted using the key to obtain encrypted data. A public and private key pair is generated using the ECDH algorithm. The public key is used to encrypt the key to obtain the encryption key. The encrypted data is signed with the private key to obtain the signature data. The private key and public key are encrypted into an encrypted public-private key using the ECDSA algorithm. The encrypted data, encryption key, signature data, and encrypted public-private keys are then encapsulated using the AES-GCM algorithm to obtain the encrypted log. The hash value is then used for integrity verification. Data encrypted with the public key can only be decrypted by the private key, and data signed with the private key can only be verified by the public key. The public and private keys are doubly encrypted using the ECDSA and AES-GCM algorithms. At least six security measures (SM3, SM4, ECDH, public-private keys, ECDSA, and AES-GCM) are implemented to prevent the test log from being stolen in plain text, greatly improving the security of test log storage.

[0134] 5. Compress the test data using the gzip algorithm to obtain compressed data, map each character of the compressed data using mapping rules to obtain first-level ciphertext data, swap the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypt the second-level ciphertext data into encrypted test data using the AES algorithm, encapsulate the encrypted test data into a second UDP data packet using the UDP protocol and upload it in real time; if the corresponding data transformation rules or encryption algorithm are not known, the second UDP data packet cannot be cracked. At least four security measures (character mapping, character swapping, AES algorithm, and UDP protocol) are taken before and after, which greatly improves the security of test data upload.

[0135] 6. Further improve security by adopting different encryption schemes for test log storage and test data upload.

[0136] 7. Regularly clean up encrypted logs through the preset log storage cycle, which not only saves storage space but also reduces potential security risks.

[0137] Although the specific embodiments of the present invention are described above, those skilled in the art should understand that the specific embodiments described are merely illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included within the scope of protection of the claims of the present invention.

Claims

1. A test equipment control method based on UDP protocol, characterized in that: The steps include: Step S1: After identity authentication through the user interface, select a process template from the template library, drag and drop or add or delete each test function module on the process template, and set the test parameters of each test function module to customize the test process; Step S2: Generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device; Step S3: The test device decapsulates and verifies the first UDP data packet through the UDP protocol to obtain the test command; Step S4: The test device performs a test operation based on the test process carried by the test command, collects test data in real time, and records a test log; Step S5: After the test is completed, the test device encapsulates the test data into a second UDP data packet through the UDP protocol and uploads it in real time; Step S6: After decapsulating and verifying the second UDP data packet through the UDP protocol, the test data is obtained, and the test data is automatically analyzed and a test report is generated.

2. The test equipment control method based on UDP protocol according to claim 1, wherein: The step S1 is specifically as follows: After obtaining the user name and password entered by the user through the user interface for identity authentication, a process template is selected from the preset template library through the user interface, and each test function module is dragged or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations.

3. The test equipment control method based on UDP protocol according to claim 1, wherein: The step S2 is specifically as follows: Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time; The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

4. The test equipment control method based on UDP protocol according to claim 1, wherein: The step S3 is specifically as follows: The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data; Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

5. The test equipment control method based on UDP protocol according to claim 1, wherein: The step S4 is specifically as follows: The test device automatically triggers the test process to execute the test operation based on the test start time and test duration carried in the test command, collects test data in real time, and records the test log; The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log; The test device regularly clears the encrypted log based on a preset log storage period; The step S5 is specifically as follows: After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time; The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

6. A test equipment control system based on UDP protocol, characterized by: Includes the following modules: A test process definition module is used to select a process template from a template library after identity verification through the user interface, drag and drop or add or delete each test function module on the process template, and set the test parameters of each test function module to customize the test process; a test command issuing module, configured to generate a test command based on the test process, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device; A test command acquisition module, configured to obtain the test command after the test device decapsulates and verifies the first UDP data packet through the UDP protocol; A test operation execution module is used to test the device to execute the test operation based on the test process carried by the test command, collect test data in real time, and record the test log; The test data uploading module is used to encapsulate the test data into a second UDP data packet through the UDP protocol and upload it in real time after the test is completed; The test report generation module is used to decapsulate and verify the second UDP data packet through the UDP protocol to obtain the test data, automatically analyze the test data and generate a test report.

7. A test equipment control system based on UDP protocol as claimed in claim 6, characterized in that: The test process definition module is specifically used to: After obtaining the user name and password entered by the user through the user interface for identity authentication, a process template is selected from the preset template library through the user interface, and each test function module is dragged or added or deleted on the selected process template, and the test parameters and logical relationships of each test function module are set to generate a customized test process for controlling the test equipment to perform test operations.

8. A test equipment control system based on UDP protocol as claimed in claim 6, characterized in that: The test command issuing module is specifically used for: Generate a test command that carries the test process, test start time, test duration, test device serial number, and command generation time, encapsulate the test command into a first UDP data packet through the UDP protocol, and send the first UDP data packet to the test device in real time; The first UDP data packet carries header data and first payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and first payload data; the first payload data is a test command.

9. A test equipment control system based on UDP protocol as claimed in claim 6, characterized in that: The test command acquisition module is specifically used for: The test device decapsulates the first UDP data packet using the UDP protocol to obtain header data and first payload data, performs integrity verification on the source port, destination port, data length, maximum number of retransmissions, timestamp, and first payload data using a checksum carried in the header data, performs timeliness verification using the timestamp to complete verification of the first UDP data packet, and then obtains a test command based on the first payload data; Based on the test device serial number carried in the test command and the command generation time, the test command is respectively subjected to a validity check and an age check.

10. A test equipment control system based on UDP protocol as claimed in claim 6, characterized in that: The test operation execution module is specifically used to: The test device automatically triggers the test process to execute the test operation based on the test start time and test duration carried in the test command, collects test data in real time, and records the test log; The test device performs a hash calculation on the test log using the SM3 algorithm to obtain a hash value, generates a key based on the SM4 algorithm, encrypts the test log and the hash value using the key to obtain encrypted data, generates a pair of public and private keys based on the ECDH algorithm, encrypts the key using the public key to obtain an encryption key, signs the encrypted data using the private key to obtain signature data, encrypts the private key and public key into an encrypted public-private key using the ECDSA algorithm, encapsulates the encrypted data, encryption key, signature data, and encrypted public-private keys using the AES-GCM algorithm to obtain an encrypted log, and stores the encrypted log; The test device regularly clears the encrypted log based on a preset log storage period; The test data upload module is specifically used to: After the test is completed, the test device compresses the test data using the gzip algorithm to obtain compressed data, maps each character of the compressed data using a preset mapping rule to obtain first-level ciphertext data, swaps the number 0 and the letter O in the first-level ciphertext data to obtain second-level ciphertext data, encrypts the second-level ciphertext data into encrypted test data using the AES algorithm, and encapsulates the encrypted test data into a second UDP data packet using the UDP protocol and uploads it in real time; The second UDP data packet carries header data and second payload data; the header data includes at least source port, destination port, data length, maximum number of retransmissions, timestamp and checksum; the checksum is calculated based on the source port, destination port, data length, maximum number of retransmissions, timestamp and second payload data; the second payload data is encrypted test data.

Citation Information

Patent Citations

  • Remote dynamic testing methods for equipment or networks

    CN102291272A

  • Tool testing method and system

    CN112737886A

  • File transmission method and device, electronic equipment and computer readable storage medium

    CN114629891A

  • System, method and device for developing test case in zero-code dragging mode

    CN117407045A

  • Data transmission method, device, and storage medium

    WO2024113724A1