RFID protocol consistency testing method, device and electronic equipment

By designing scripted languages to standardize the RFID protocol consistency testing process, the problem of adaptation of a single communication protocol in the existing technology is solved, and the compatibility testing of multiple RFID communication protocols is realized, which reduces software maintenance costs and improves test scalability.

CN116886577BActive Publication Date: 2025-08-19BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310760496.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-26
Publication Date
2025-08-19
Estimated Expiration
2043-06-26

AI Technical Summary

Technical Problem

In the prior art, the host computer software used for testing can usually only support the consistency test of a certain communication protocol and cannot adapt to the RFID consistency test of a multiple communication protocol.

Method used

By designing a scripted language, it standardizes the instruction sequence number, instruction execution objects, test instructions and return results during the RFID protocol consistency testing process, and forms a test script to adapt to the consistency testing of most RFID communication protocols.

Benefits of technology

Compatibility testing for multiple RFID communication protocols is realized, reducing the software maintenance costs caused by changes in the test project, and improving test scalability and flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116886577B_ABST
    Figure CN116886577B_ABST
Patent Text Reader

Abstract

The present invention provides an RFID protocol consistency test method, device, and electronic device, belonging to the field of wireless radio frequency identification technology. The method includes: determining the instruction sequence number, instruction execution object, test instruction, and return result of a single step in the RFID protocol consistency test process in response to a test script configuration instruction; wherein the return result is formed after the instruction execution object executes the test instruction; based on the instruction sequence number, instruction execution object, test instruction, and return result, determining the script content of the single step; forming a test script based on the script content of all steps; and performing RFID protocol consistency testing based on the test script. The present invention performs RFID protocol consistency testing based on a script specification formed by the instruction sequence number, instruction execution object, test instruction, and return result, using a test script constructed in a scripting language. The present invention is not limited to a specific communication protocol and can be adapted to consistency testing of most RFID communication protocols.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of wireless radio frequency identification, and in particular to an RFID protocol consistency testing method, an RFID protocol consistency testing device and an electronic device. Background Art

[0002] RFID stands for Radio Frequency Identification (RFID), a technology that enables data communication between a reader and a tag over the air. As the technology continues to mature and improve, RFID tags have been applied in a variety of fields, including shopping, logistics, positioning, and security.

[0003] RFID tags can be categorized by the communication protocol used, including ISO18000-6C, ISO14443, and ISO15693. RFID tags using different protocols have different usage scenarios. Existing testing software typically only supports conformance testing for a specific communication protocol and is not adaptable to RFID conformance testing across multiple protocols. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide an RFID protocol consistency testing method, an RFID protocol consistency testing device, and an electronic device to address the defect in the prior art that the host computer software used for testing can generally only support consistency testing of a certain communication protocol and cannot adapt to RFID consistency testing of multiple communication protocols.

[0005] To achieve the above objectives, an embodiment of the present invention provides an RFID protocol consistency testing method, the method comprising:

[0006] In response to the test script configuration instruction, determining the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process; wherein the return result is formed after the instruction execution object executes the test instruction;

[0007] Determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the returned result;

[0008] Form a test script based on the script contents of all steps;

[0009] Perform RFID protocol conformance testing based on the test script.

[0010] Optionally, the instruction execution object includes a communication module for communicating with an RFID tag, and the test instruction includes a protocol instruction sent by the communication module;

[0011] The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes:

[0012] The script content of a single step is determined based on the instruction sequence number, the communication module, the protocol instruction, and the returned result.

[0013] Optionally, the instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes a protocol instruction sent by the communication module and a return result of a historical step;

[0014] The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes:

[0015] The script content of a single step is determined based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result.

[0016] Optionally, the instruction execution object includes a security calculation module for performing consistency testing on a security protocol in the RFID protocol, and the test instruction includes a security calculation instruction for a return result of a historical step;

[0017] The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes:

[0018] The script content of a single step is determined based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

[0019] Optionally, the instruction execution object includes a software calculation module, and the test instruction includes a logic calculation instruction for the return result of the protocol instruction and / or the historical step; the protocol instruction is sent by a communication module for communicating with the RFID tag;

[0020] The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes:

[0021] The script content of a single step is determined based on the instruction sequence number, the software calculation module, the logic calculation instruction, and the return result.

[0022] Optionally, the logic calculation instructions include: exclusive OR calculation instructions, data splicing calculation instructions, equality calculation instructions, and / or inequality calculation instructions.

[0023] Optionally, the method further includes:

[0024] If the return result of the historical step is incorrect, the test is stopped.

[0025] On the other hand, an embodiment of the present invention further provides an RFID protocol consistency testing device, comprising:

[0026] A configuration module is configured to determine, in response to a test script configuration instruction, an instruction sequence number, an instruction execution object, a test instruction, and a return result of a single step in the RFID protocol conformance test process; wherein the return result is formed after the instruction execution object executes the test instruction;

[0027] A script content determination module, configured to determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result;

[0028] A test script forming module, used for forming a test script based on the script contents of all steps;

[0029] The test module is used to perform RFID protocol consistency test based on the test script.

[0030] Optionally, the instruction execution object includes a communication module for communicating with an RFID tag, and the test instruction includes a protocol instruction sent by the communication module;

[0031] The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction and the return result.

[0032] Optionally, the instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes a protocol instruction sent by the communication module and a return result of a historical step;

[0033] The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result.

[0034] Optionally, the instruction execution object includes a security calculation module for performing consistency testing on a security protocol in the RFID protocol, and the test instruction includes a security calculation instruction for a return result of a historical step;

[0035] The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

[0036] Optionally, the instruction execution object includes a software calculation module, and the test instruction includes a logic calculation instruction for the return result of the protocol instruction and / or the historical step; the protocol instruction is sent by a communication module for communicating with the RFID tag;

[0037] The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the software calculation module, the logic calculation instruction and the return result.

[0038] Optionally, the RFID protocol conformance test device further includes:

[0039] The control module is used to stop the test when there is an error in the return result of the historical step.

[0040] On the other hand, the present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-described RFID protocol consistency testing methods is implemented.

[0041] On the other hand, the present invention further provides a machine-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned RFID protocol consistency testing methods when executed by a processor.

[0042] On the other hand, the present invention further provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any one of the above-mentioned RFID protocol consistency testing methods.

[0043] Through the above technical solution, compared to the prior art where the host computer software tested generally only supports consistency testing of a certain communication protocol, the present invention determines the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result, and then performs RFID protocol consistency testing based on a test script formed based on the script content of all steps. Thus, the present invention performs RFID protocol consistency testing based on a script specification formed by the instruction sequence number, the instruction execution object, the test instruction, and the return result, using a test script constructed in a scripting language. The present invention is not limited to a specific communication protocol and can adapt to consistency testing of most RFID communication protocols.

[0044] Other features and advantages of the embodiments of the present invention will be described in detail in the subsequent detailed description. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the embodiments of the present invention and constitute a part of the specification. Together with the following detailed description, they are used to explain the embodiments of the present invention, but do not constitute a limitation of the embodiments of the present invention. In the accompanying drawings:

[0046] Figure 1 This is one of the flow charts of the RFID protocol consistency test method provided by the present invention;

[0047] Figure 2 This is the second flow chart of the RFID protocol consistency test method provided by the present invention;

[0048] Figure 3 It is a structural diagram of the RFID protocol consistency test device provided by the present invention;

[0049] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0050] The following describes the specific implementation of the embodiment of the present invention in detail with reference to the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the embodiment of the present invention and is not used to limit the embodiment of the present invention.

[0051] Method Example

[0052] Please refer to Figure 1 , an embodiment of the present invention provides an RFID protocol consistency testing method, comprising:

[0053] Step 100: In response to the test script configuration instruction, determine the instruction sequence number, instruction execution object, test instruction, and return result of a single step in the RFID protocol consistency test process.

[0054] The present invention implements RFID protocol conformance testing in the form of a script. Therefore, the present invention provides a script structure. The script structure is the format specification of the test script in the present invention. For example, in one embodiment, the script structure is as follows:

[0055] Instruction number: Instruction execution object: Test instruction: Return result

[0056] The instruction sequence number indicates the execution order of the instructions, and the instruction execution object indicates the execution object of the test instruction in the current row. The return result is formed after the instruction execution object executes the test instruction. The return result can be the result or result format that the instruction execution object should return.

[0057] The user enters the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process at the corresponding position of the script structure of an electronic device (such as a computer, etc.). The electronic device responds to the test script configuration instruction and determines the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process.

[0058] For example, in one embodiment, the user enters in the electronic device:

[0059] 1:T0:10000000000000000:(0)

[16]

[0060] Where T0 represents the communication module used to communicate with the RFID tag, 10000000000000000 represents the inventory instruction, and (0)

[16] indicates that the communication module sends the inventory instruction. When the result is returned, 0 characters are skipped and 16 characters are extracted as the handle for subsequent communication with the RFID tag. Therefore, the user inputs the instruction sequence number 1, the instruction execution object is the communication module, the test instruction is the inventory instruction, and the return result is the content of skipping 0 characters and extracting 16 characters.

[0061] The present invention standardizes the writing format of the four parts of content in each step of the test process by specifying the script structure, and the electronic device can import the content of the test script according to the script structure.

[0062] Step 200: Determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result.

[0063] The electronic device determines the script content of a single step based on a preset script structure, such as a script structure of instruction number: instruction execution object: test instruction: return result, based on the instruction number, the instruction execution object, the test instruction and the return result.

[0064] Step 300: Generate a test script based on the script contents of all steps.

[0065] Since the RFID protocol conformance test cannot be completed by a single instruction, the electronic device needs the script content of all steps to form a test script.

[0066] Step 400: Perform RFID protocol consistency test based on the test script.

[0067] The electronic device performs RFID protocol conformance testing based on the execution order of the test commands specified in the test script, as well as the instruction execution objects, test instructions and return results in the test instructions.

[0068] By performing RFID protocol consistency testing in the form of the script proposed by the present invention, it is only necessary to write the test script parsing module and the test software once. For different test items, only the corresponding test scripts need to be written, and no further development is required at the software level.

[0069] In addition, the script specification proposed in the present invention writes the RFID protocol consistency test process into a script file in the form of a simple formatting language, rather than writing it into the test software in a hard-coded form. Anyone who understands the protocol can participate in the writing of the test script without having to learn a complex development language.

[0070] Existing technologies typically focus on building the hardware environment, including the reader, signal processing unit, and antenna. Test software typically uses development languages like LabView or MFC, making it difficult to expand test functionality after development. The present invention focuses on testing software, constructing test items in the form of scripts. This maximizes the separation between test content and test software, facilitating the expansion of test projects.

[0071] Compared to the prior art, where the host computer software tested typically only supports consistency testing for a specific communication protocol, the present invention determines the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result. The test script formed based on the script content of all steps performs RFID protocol consistency testing. Thus, the present invention performs RFID protocol consistency testing using a test script constructed in a scripting language based on a script specification formed by the instruction sequence number, the instruction execution object, the test instruction, and the return result. The present invention is not limited to a specific communication protocol and can adapt to consistency testing of most RFID communication protocols.

[0072] In other aspects of the embodiments of the present invention, the instruction execution object includes a communication module for communicating with an RFID tag, and the test instruction includes a protocol instruction sent by the communication module.

[0073] Specifically, the communication module may be an RFID device responsible for communicating with the RFID tag. The communication module sends the test command to the RFID tag and receives the return result. The protocol command may be a protocol command written in accordance with the RFID protocol and sent to the RFID tag.

[0074] Step 200, based on the instruction sequence number, the instruction execution object, the test instruction, and the return result, determines the script content of a single step, including:

[0075] The script content of a single step is determined based on the instruction sequence number, the communication module, the protocol instruction, and the returned result.

[0076] The electronic device determines the script content of a single step based on a preset script structure, instruction number: instruction execution object: test instruction: return result, through the instruction number, the communication module, the protocol instruction and the return result.

[0077] For example, in one embodiment, the script content of a single step is:

[0078] 1:T0:10000000000000000:(0)

[16]

[0079] Here, T0 represents the communication module, and 100000000000000000 represents the inventory command sent to the communication module. It should be noted that due to the complexity of the RFID communication protocol, the following scenarios are foreseeable: standard commands within the RFID protocol and commands specified in the protocol as customizable; commands requiring checksum calculation and commands not requiring checksum calculation. Therefore, the embodiments of the present invention provide a detailed classification of these scenarios by appending numbers after the English letters representing the communication modules. For example, T0 (same as T), T1, T2…. T0 represents a communication module that includes standard commands within the RFID protocol; T1 represents a communication module that includes commands specified in the protocol as customizable; T2 represents a communication module that includes commands requiring checksum calculation, and so on. Appending numbers after the communication module symbol allows for more flexible construction of test commands, while the communication module only transmits and receives data.

[0080] In a general RFID protocol consistency test system, communication is performed between an RFID device and an RFID tag. Therefore, the present invention writes the communication process between the RFID device and the RFID tag into a script, and performs RFID protocol consistency testing through a test script constructed by a scripting language. The present invention is not limited to a certain communication protocol and can be adapted to the consistency testing of most RFID communication protocols.

[0081] In other aspects of the embodiments of the present invention, the instruction execution object includes a communication module for communicating with an RFID tag, and the test instruction includes a protocol instruction sent by the communication module and a return result of a historical step.

[0082] The communication module may be an RFID device responsible for communicating with the tag. The communication module sends the test instruction to the RFID tag and receives the return result. The protocol instruction may be a protocol instruction written in accordance with the RFID protocol and sent to the RFID tag.

[0083] It should be noted that, due to the correlation between each line of data in the script during the protocol consistency test of the RFID tag, the subsequent test instructions often need to include the return result data of the previous instruction (i.e., the return result of the historical step). For example, according to the ISO18000-6C protocol, after the inventory instruction is executed, almost all subsequent instructions need to be accompanied by the handle returned by the tag inventory instruction. In addition, not all data in the return result after the execution of the previous instruction is required by the subsequent instruction. For example, when obtaining a random number from the RFID tag, the RFID tag will return both the random number and the handle, but the subsequent secure calculation instruction only requires the random number. Therefore, almost all test instructions and return results are dynamic and cannot be represented by a fixed value.

[0084] Therefore, the present invention introduces formatted expressions, which can extract important data from the return results of historical steps, or insert the return results of previously extracted historical steps into the current test instruction. Using formatted expressions, important data can be extracted from the results returned by the previous instruction and inserted into the subsequent send instruction, or even saved as a test record. Specifically, embodiments of the present invention can meet the need for data extraction in scripts by introducing expressions composed of square brackets, parentheses, quotation marks, and the @ symbol.

[0085] For example, the formatted expression [S1] means extracting the return result of the step with instruction number 1.

[0086] Step 200, based on the instruction sequence number, the instruction execution object, the test instruction, and the return result, determines the script content of a single step, including:

[0087] The script content of a single step is determined based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result.

[0088] The electronic device determines the script content of a single step based on a preset script structure, instruction number: instruction execution object: test instruction: return result, through the instruction number, the communication module, the protocol instruction, the return result of the historical step, and the return result.

[0089] For example, in one embodiment, the script content of a single step is:

[0090] 2:T0:11000001[S1]:(0)

[16]

[0091] Here, T0 represents the communication module, 11000001 indicates sending the Get RN16 instruction to the communication module, and [S1] represents the return result of step 1. The entire script content of this step means: Step 2 sends the Get RN16 instruction to the communication module. [S1] specifies that the handle in step 1 should be appended to the RN16 instruction. When the result is returned, 0 characters are skipped and 16 characters are extracted as RN16.

[0092] By formatting the returned results of historical steps extracted through expressions, important data can be extracted from the returned results, or previously extracted data can be inserted into the current test instructions. Thus, by writing the communication process between an RFID device and an RFID tag into a script, the present invention performs RFID protocol conformance testing using a test script constructed using a scripting language. The present invention is not limited to a specific communication protocol and is applicable to conformance testing of most RFID communication protocols.

[0093] In other aspects of the embodiments of the present invention, the instruction execution object includes a security calculation module for performing consistency testing on a security protocol in an RFID protocol, and the test instruction includes a security calculation instruction for returning results of historical steps.

[0094] To support the extended portion of the RFID protocol, in embodiments of the present invention, the instruction execution object also includes a secure computing module. This secure computing module is used to support the proprietary security protocols designed by various RFID manufacturers and provides cryptographic algorithm computing capabilities. Secure computing instructions are written in the grammatical format of the secure computing module. During protocol conformance testing of RFID tags for security, subsequent instructions utilize the random number or token value generated by the previous instruction (i.e., the return result of the previous step). Therefore, the test instructions include secure computing instructions for the return result of the previous step.

[0095] Step 200, based on the instruction sequence number, the instruction execution object, the test instruction, and the return result, determines the script content of a single step, including:

[0096] The script content of a single step is determined based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

[0097] The electronic device determines the script content of a single step based on a preset script structure, instruction number: instruction execution object: test instruction: return result, through the instruction number, the secure computing module, the secure computing instruction and the return result.

[0098] For example, in one embodiment, the script content of a single step is:

[0099] 4:E:0102030405[S2][S3]:(0)

[16]

[0100] Here, "E" indicates a command sent to the secure computing module, "0102030405" represents a secure computing instruction, "[S2]" represents the result returned from step 2, and "[S3]" represents the result returned from step 3. The entire script is as follows: Step 4: The secure computing module encrypts the results returned from steps 2 and 3, skipping zero characters in the result and taking 16 bits of data as the result returned by the current instruction.

[0101] Existing technologies only support testing of standard components of communication protocols, but fail to address the testing of proprietary security protocols designed by RFID tag manufacturers. This invention, through a scripting language and the inclusion of a secure computing module's instruction execution object in the test script, supports electronic devices' conformance testing of proprietary RFID tag protocols, particularly those related to security, thereby improving the scalability of RFID protocol conformance testing.

[0102] In other aspects of the embodiments of the present invention, the instruction execution object includes a software calculation module, and the test instruction includes a logical calculation instruction for the return result of the protocol instruction and / or historical steps; the protocol instruction is sent by a communication module for communicating with the RFID tag.

[0103] Among them, in the embodiment of the present invention, the instruction execution object also includes a software calculation module. The software calculation module is responsible for performing simple operations at the software level. For example, the implementation of the present invention comprehensively considers various situations in the protocol consistency test process, specifically. The logical calculation instructions of the embodiment of the present invention include: exclusive OR calculation instructions, data splicing calculation instructions, equality calculation instructions, and / or inequality calculation instructions. In one embodiment, the logical calculation instructions of the embodiment of the present invention include: exclusive OR calculation instructions, data splicing calculation instructions, equality calculation instructions, and inequality calculation instructions.

[0104] The embodiment of the present invention meets the requirements for data insertion and operation in the test script by introducing square brackets, parentheses, quotation marks and @ symbols to form an expression.

[0105] Specifically, in one embodiment, the XOR calculation instruction can be represented by ^{[]@[]} or ^{[]@""}. The XOR calculation instruction is used in scenarios where an XOR operation needs to be performed on data during RFID protocol conformance testing, such as performing an XOR operation on RN16 and a password in the ISO18000-6C protocol, or performing an XOR operation on RN16 and data when writing data.

[0106] In one embodiment, the data splicing calculation instruction can be represented by +{[]@[]} or +{""@[]}. The data splicing calculation instruction is used for data splicing during the RFID protocol consistency test.

[0107] In one embodiment, the equality calculation instruction can be represented by ={[]@[]} or ={[]@""}. The equality calculation instruction is used for equality comparison operations during RFID protocol consistency testing, such as performing equality comparison on status codes or expected data in the returned results.

[0108] In one embodiment, the inequality calculation instruction can be represented by !={[]@[]} or !={[]@""}. The inequality calculation instruction is used for inequality comparison during RFID protocol consistency testing.

[0109] Step 200, based on the instruction sequence number, the instruction execution object, the test instruction, and the return result, determines the script content of a single step, including:

[0110] The script content of a single step is determined based on the instruction sequence number, the software calculation module, the logic calculation instruction, and the return result.

[0111] The electronic device determines the script content of a single step based on a preset script structure, instruction number: instruction execution object: test instruction: return result, through the instruction number, the software calculation module, the logical calculation instruction and the return result.

[0112] For example, in one embodiment, the script content of a single step is:

[0113] 3:S:^{[S2]@"0001001000110100"}:

[0114] Here, S represents the software calculation module, [S2] represents the result returned from step 2, and ^{[S2]@"0001001000110100" indicates performing an XOR operation on the RN16 returned from step 2 and the upper 16 bits of the password (here, 1234). The script content of the entire step means: Step 3, perform an XOR operation at the software level, specifying [S2] to perform an XOR operation on the RN16 returned from step 2 and the upper 16 bits of the password (here, 1234). If no return result is specified, the entire calculation result is extracted.

[0115] The present invention writes the simple calculation process of the software calculation module into the form of a script, and performs RFID protocol consistency testing through a test script constructed by a scripting language. The present invention is not limited to a certain communication protocol and can be adapted to the consistency testing of most RFID communication protocols.

[0116] For other aspects of the present invention, please refer to Figure 2 , RFID protocol consistency test methods also include:

[0117] Step 500: If there is an error in the return result of the historical step, stop the test.

[0118] Because the present invention uses a formatted expression to add the return result of the historical step to the test instruction for data insertion or calculation. For example, in the above example: 2:T0:11000001[S1]:(0)

[16] , 4:E:0102030405[S2][S3]:(0)

[16] and 3:S:^{[S2]@"0001001000110100"}:. Therefore, when it is encountered that the return result of the historical step does not exist, is not long enough, or does not correspond to the characters in the return expression, it means that the current line instruction execution error can be stopped, and the test can be stopped, so that the present invention can realize the validity judgment of the test result. By writing the test script through the script specification of the embodiment of the present invention, the entire test process can be intuitively displayed, and the test process can be flexibly controlled.

[0119] The test script in the embodiment of the present invention is described below through a specific example.

[0120] Taking the password reading in ISO18000-6C protocol as an example, the test script is written as follows:

[0121] 1:T0:10000000000000000:(0)

[16]

[0122] 2:T0:11000001[S1]:(0)

[16]

[0123] 3:S:^{[S2]@"0001001000110100"}:

[0124] 4:T0:11000110[S3][S1]:(0)

[16]

[0125] 5:T0:11000001[S1]:(0)

[16]

[0126] 6:S:^{[S5]@"0101011001111000"}:

[0127] 7:T0:11000110[S6][S1]:(0)

[16]

[0128] 8:T0:11000010110000000000000100[S1]:0

[64]

[0129] The meaning of the above test script is:

[0130] Step 1: Send an inventory command to the communication module. When the result is returned, skip 0 characters and extract 16 characters as the handle for subsequent communication with the RFID tag.

[0131] Step 2: Send the Get RN16 instruction to the communication module. [S1] specifies that the handle in step 1 should be appended to the RN16 instruction. When the result is returned, skip 0 characters and extract 16 characters as RN16.

[0132] In step 3, an XOR operation is performed at the software level. [S2] specifies that the RN16 returned in step 2 is XORed with the high 16 bits of the password (here 1234). If no return result is specified, the entire calculation result is extracted.

[0133] Step 4: Use the secure calculation module to encrypt the results of steps 2 and 3, skipping 0 characters in the calculation result and extracting 16 bits of data as the return result of the current instruction. (Since the data extracted here is a handle like in step 1 and is not very useful, the return result can also be abbreviated to (0), but it should not be empty. If it is empty, it means that the current instruction should not have a return result.)

[0134] Steps 5-7 are the same as steps 2-4. RN16 is obtained and XORed with the lower 16 bits of the password (here 5678). The result is then sent to the RFID tag through the communication module.

[0135] Step 8: Send a read command to the communication module to read the 4 words in the user area of the RFID tag. The first character of the result return code should be the status code 0 indicating a successful read. Then, extract 64 characters as the data read from the RFID tag.

[0136] It should be noted that if security calculation is required in RFID protocol conformance testing, it can be described as shown in Table 1:

[0137] Table 1

[0138]

[0139] The meaning of the above test script is: Step 4, encrypt the results of Step 2 and Step 3 through the secure calculation module, skip 0 characters in the calculation result, and take 16-bit data as the return result of the current instruction.

[0140] In summary, on the one hand, the present invention specifies the instruction sequence number, instruction execution object, test instruction and return result in the RFID protocol consistency test process by designing a scripting language, which can be adapted to most RFID communication protocols; on the other hand, by writing the steps of the RFID protocol consistency test into the form of a script, the present invention not only enables developers to accurately control the test process, but also reduces the cost of software maintenance due to changes in test items; on the other hand, the present invention comprehensively considers the consistency testing of the standard part and the extended part (the manufacturer's security protocol in the private protocol) of the RFID protocol and the main modules involved in the test process, making the test more scalable.

[0141] Device embodiment

[0142] Please refer to Figure 3 The present invention provides an RFID protocol consistency test device, comprising:

[0143] Configuration module 301, configured to determine, in response to a test script configuration instruction, an instruction sequence number, an instruction execution object, a test instruction, and a return result of a single step in the RFID protocol conformance test process; wherein the return result is formed after the instruction execution object executes the test instruction;

[0144] A script content determination module 302 is configured to determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result;

[0145] A test script forming module 303 is used to form a test script based on the script contents of all steps;

[0146] The testing module 304 is configured to perform an RFID protocol consistency test based on the test script.

[0147] Optionally, the instruction execution object includes a communication module for communicating with an RFID tag, and the test instruction includes a protocol instruction sent by the communication module;

[0148] The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction and the return result.

[0149] Optionally, the instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes a protocol instruction sent by the communication module and a return result of a historical step;

[0150] The script content determination module 302 is used to determine the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result.

[0151] Optionally, the instruction execution object includes a security calculation module for performing consistency testing on a security protocol in the RFID protocol, and the test instruction includes a security calculation instruction for a return result of a historical step;

[0152] The script content determination module 302 is configured to determine the script content of a single step based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

[0153] Optionally, the instruction execution object includes a software calculation module, and the test instruction includes a logic calculation instruction for the return result of the protocol instruction and / or the historical step; the protocol instruction is sent by a communication module for communicating with the RFID tag;

[0154] The script content determination module 302 is used to determine the script content of a single step based on the instruction sequence number, the software calculation module, the logic calculation instruction and the return result.

[0155] Optionally, the RFID protocol conformance test device further includes:

[0156] The control module is used to stop the test when there is an error in the return result of the historical step.

[0157] The logic calculation instructions include: exclusive OR calculation instructions, data splicing calculation instructions, equality calculation instructions, and / or inequality calculation instructions.

[0158] The RFID protocol consistency testing device includes a processor and a memory. The above-mentioned configuration module 301, script content determination module 302, test script formation module 303 and test module 304 are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0159] The processor includes a kernel, which calls the corresponding program unit from the memory. There can be one or more kernels.

[0160] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.

[0161] Figure 4An example of a physical structure diagram of an electronic device is shown below. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430, and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other via the communication bus 440. The processor 410 may call logic instructions in the memory 430 to execute an RFID protocol conformance test method, which includes: determining, in response to a test script configuration instruction, an instruction sequence number, an instruction execution object, a test instruction, and a return result of a single step in the RFID protocol conformance test process; wherein the return result is formed after the instruction execution object executes the test instruction; determining the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result; forming a test script based on the script contents of all steps; and performing an RFID protocol conformance test based on the test script.

[0162] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0163] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a machine-readable storage medium. When the computer program is executed by a processor, the computer can execute the RFID protocol consistency test method provided by the above methods, the method including: determining the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process in response to a test script configuration instruction; wherein the return result is formed after the instruction execution object executes the test instruction; based on the instruction sequence number, the instruction execution object, the test instruction and the return result, determining the script content of the single step; forming a test script based on the script content of all steps; and performing RFID protocol consistency testing based on the test script.

[0164] On the other hand, the present invention also provides a machine-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the RFID protocol consistency test method provided by the above-mentioned methods, the method comprising: determining the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process in response to a test script configuration instruction; wherein the return result is formed after the instruction execution object executes the test instruction; based on the instruction sequence number, the instruction execution object, the test instruction and the return result, determining the script content of the single step; forming a test script based on the script content of all steps; and performing RFID protocol consistency testing based on the test script.

[0165] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0166] Through the description of the above embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a necessary general hardware platform, or of course, by hardware. Based on this understanding, the essence of the above technical solution or the part that contributes to the existing technology can be embodied in the form of a software product. The computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or certain parts of the embodiments.

[0167] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A RFID protocol consistency testing method, characterized in that: The method comprises: In response to the test script configuration instruction, determining the instruction sequence number, instruction execution object, test instruction and return result of a single step in the RFID protocol consistency test process; wherein the return result is formed after the instruction execution object executes the test instruction; Determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the returned result; Form a test script based on the script contents of all steps; Perform RFID protocol consistency testing based on the test script; The instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes the protocol instruction sent by the communication module and the return result of the historical step; The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes: Determining the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result; By formatting the return results of historical steps extracted by expressions, you can extract important data from the returned results or insert previously extracted data into the current test instructions. By introducing brackets, parentheses, quotation marks, and the @ symbol to form expressions, you can meet the data extraction requirements in the script.

2. The RFID protocol consistency testing method according to claim 1, wherein: The instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes a protocol instruction sent by the communication module; The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes: The script content of a single step is determined based on the instruction sequence number, the communication module, the protocol instruction, and the returned result.

3. The RFID protocol consistency testing method according to claim 1, wherein: The instruction execution object includes a security calculation module for performing consistency testing on the security protocol in the RFID protocol, and the test instruction includes a security calculation instruction for the return result of the historical step; The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes: The script content of a single step is determined based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

4. The RFID protocol consistency testing method according to claim 1, wherein: The instruction execution object includes a software calculation module, and the test instruction includes a logic calculation instruction for the return result of the protocol instruction and / or the historical step; the protocol instruction is sent by a communication module for communicating with the RFID tag; The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes: The script content of a single step is determined based on the instruction sequence number, the software calculation module, the logic calculation instruction, and the return result.

5. The RFID protocol consistency testing method according to claim 4, characterized in that: The logic calculation instructions include: exclusive OR calculation instructions, data splicing calculation instructions, equality calculation instructions, and / or inequality calculation instructions.

6. The RFID protocol consistency testing method according to any one of claims 3 to 5, characterized in that: The method further comprises: If the return result of the historical step is incorrect, the test is stopped.

7. An RFID protocol consistency test device, characterized in that: include: A configuration module, configured to determine the instruction sequence number, instruction execution object, test instruction, and return result of a single step in the RFID protocol consistency test process in response to the test script configuration instruction; The return result is formed after the instruction execution object executes the test instruction; A script content determination module, configured to determine the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result; A test script forming module, used for forming a test script based on the script contents of all steps; A test module, configured to perform RFID protocol consistency testing based on the test script; The instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes the protocol instruction sent by the communication module and the return result of the historical step; The determining of the script content of a single step based on the instruction sequence number, the instruction execution object, the test instruction, and the return result includes: Determining the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction, the return result of the historical step, and the return result; By formatting the return results of historical steps extracted by expressions, you can extract important data from the returned results or insert previously extracted data into the current test instructions. By introducing brackets, parentheses, quotation marks, and the @ symbol to form expressions, you can meet the data extraction requirements in the script.

8. The RFID protocol consistency test device according to claim 7, characterized in that: The instruction execution object includes a communication module for communicating with the RFID tag, and the test instruction includes a protocol instruction sent by the communication module; The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the communication module, the protocol instruction and the return result.

9. The RFID protocol consistency test device according to claim 7, characterized in that: The instruction execution object includes a security calculation module for performing consistency testing on the security protocol in the RFID protocol, and the test instruction includes a security calculation instruction for the return result of the historical step; The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the secure computing module, the secure computing instruction, and the returned result.

10. The RFID protocol consistency test device according to claim 7, characterized in that: The instruction execution object includes a software calculation module, and the test instruction includes a logic calculation instruction for the return result of the protocol instruction and / or the historical step; the protocol instruction is sent by a communication module for communicating with the RFID tag; The script content determination module is used to determine the script content of a single step based on the instruction sequence number, the software calculation module, the logic calculation instruction and the return result.

11. The RFID protocol consistency test device according to any one of claims 9 to 10, characterized in that: Also includes: The control module is used to stop the test when there is an error in the return result of the historical step.

12. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the RFID protocol consistency testing method according to any one of claims 1 to 6 is implemented.

13. A machine-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the RFID protocol consistency testing method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Test system and method for quantitatively evaluating protocol consistency of RFID tag

    CN108304743A

  • Network device automatic measuring method

    CN1529466A