A method for dynamic compensation scanning of ultra-high frequency RFID
By defining parsing buffers and dynamic compensation scanning technology at the application layer, the problem of data frame breakage and loss in ultra-high frequency RFID tag reading is solved, and data integrity and scanning efficiency are improved.
Patent Information
- Application Number
- CN202111654645.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-30
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2041-12-30
AI Technical Summary
The reading of existing ultra-high frequency RFID tags has problems such as data frame breakage, data loss and incomplete reading, resulting in instability of data processing and waste of time.
Ensure data integrity by defining the parsing buffer at the application layer, merging and parsing the data frames returned by the reader, and performing dynamic compensation scans of the data frames according to the predefined protocol.
It effectively solves the problems of data frame breakage and loss, ensures data integrity and reliability, and dynamically compensated scanning also saves scanning time.
Smart Images

Figure CN114611536B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of Internet of Things technology applications and relates to a method for scanning RFID, in particular to a method for dynamically compensating scanning of ultra-high frequency RFID. Background Art
[0002] RFID radio frequency identification is a contactless automatic recognition technology that uses wireless radio frequency to conduct contactless two-way data communication and use wireless radio frequency to read and write electronic tags or radio frequency cards, thereby achieving the purpose of identifying targets and exchanging data.
[0003] The complete RFID system consists of three parts: reader, electronic tag and data management system. Its working principle is that the reader emits a radio wave energy of a specific frequency to drive the circuit to send out the internal data. At this time, the reader receives and interprets the data in sequence and sends it to the application for corresponding processing.
[0004] RFID radio frequency identification has the following advantages:
[0005] 1. RFID technology relies on electromagnetic waves and does not require physical contact between the two parties.
[0006] 2. The reading and writing speed of the RFID system is extremely fast. The high-frequency RFID reader can identify and read the contents of multiple tags at the same time.
[0007] 3. Each RFID tag is unique. Through the one-to-one correspondence between the RFID tag and the product, the subsequent circulation of each product can be clearly tracked.
[0008] 4. RFID tags have a simple structure, high recognition rate, and require simple reading equipment.
[0009] Based on the above characteristics, RFID radio frequency identification is widely used in logistics, transportation, information statistics and other fields.
[0010] For the reading of UHF RFID tags, the common application scenario is the reading of batch tags. When the application obtains the read data from the reader, it compares the obtained data with the data stored in the application database, and then tracks and compares the tags.
[0011] The existing acquisition of UHF tags has the following disadvantages:
[0012] 1. When the reader returns continuous data, the data frame will be broken due to the limited buffer space for one-time data reception. If data processing does not take this into account, data loss will occur.
[0013] 2. Reader performance, read and write frequency, and tag placement and method will all affect tag reading, and complete sample data often cannot be obtained, making the returned sample data unreliable.
[0014] 3. In case of possible loss, multiple scans are performed to merge the processing results, resulting in a fixed time and unnecessary waste of time. Summary of the invention
[0015] In view of the technical problems of the prior art, the present invention provides a method for dynamically compensating scanning of ultra-high frequency RFID:
[0016] This method defines a parsing buffer at the application layer. When receiving data returned by the reader, the parsing buffer and the received data are merged, and then the data frame is parsed according to the predefined protocol; at the same time, the parsed data frame is compared with the data stored in the application layer, and whether a compensation scan is needed is determined based on whether the compared data is complete.
[0017] The method provided by the present invention comprises the following steps:
[0018] S100: Creating a connection, including the following steps:
[0019] S101: creating a public buffer set to store data that was not parsed into a complete frame in the last data parsing;
[0020] S102: The application layer establishes a connection with the UHF RFID module, and the connection method includes TCP connection / serial port connection;
[0021] S103: Open the input stream and output stream of the connection channel through the API;
[0022] S104: Open an independent thread for the input stream and provide a data loop reading interface;
[0023] S105: Open an independent thread for the output stream and provide a data interaction interface;
[0024] S200: Setting initial values of parameters: including setting a scan threshold time, setting a data frame set, setting a sample data frame set, setting a scan number threshold, and setting the initial value of the scan number to 0;
[0025] S300: Scan UHF RFID;
[0026] S400: Analyze data and dynamically compensate;
[0027] S500: Compare data and determine whether to end scanning, if so, execute step S600, otherwise, execute step S300;
[0028] S600: Output the data frame set.
[0029] Preferably, step S300 includes the following steps:
[0030] S301: according to the protocol of the RFID radio frequency module, a scanning instruction is sent through the data interaction interface, the sending start time and the scanning flag are recorded, and the scanning flag and the parsing flag are set to false;
[0031] S302: Determine whether the number of scans is 0, if so, execute step S303, otherwise, execute step S304:
[0032] S303: the data frame set is set to empty;
[0033] S304: Get the current time, determine whether the current time minus the sending start time is greater than the scanning threshold time, if so, execute step S305, otherwise, sleep for 20ms, and execute step S304;
[0034] S305: Send a stop scanning instruction through the data interaction interface to end scanning the UHF RFID and set the scanning flag to true.
[0035] Preferably, step S400 includes the following steps:
[0036] S401: Determine whether the data loop reading interface receives the returned data, if so, execute step S402, otherwise, execute step S403;
[0037] S402: Record the returned data as first data and execute step S404;
[0038] S403: sleep for 10 milliseconds;
[0039] S404: Add the tail of the first data to the common buffer set;
[0040] S405: parsing the data frame of the public buffer set according to the protocol format;
[0041] S406: Determine whether the current scan flag is true, if so, execute step S407, otherwise, execute step S401;
[0042] S407: Set the parsing flag to true.
[0043] Preferably, step S405 includes the following steps:
[0044] S4051: Set the initial value of the offset address to 0, and obtain the byte length of the current public buffer set;
[0045] S4052: Determine whether the offset address + 1 is greater than the byte length of the current public buffer set, if so, execute step S406, otherwise, execute step S4053;
[0046] S4053: Obtain the byte content from the current offset address to the offset address + 1 as the comparison data frame header, and determine whether the comparison data frame header is equal to the data frame header. If so, execute step S405E, otherwise, execute step S4054;
[0047] S4054: Determine whether the offset address + 2 is greater than the byte length of the current public buffer set, if so, execute step S405E, otherwise, execute step S4055;
[0048] S4055: Obtain the byte content from the current offset address + 1 to the offset address + 2 as the byte length of the comparison data frame;
[0049] S4056: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4057;
[0050] S4057: Obtain the byte content from offset address + 2 to offset address + 2 + the byte length of the comparison data frame as the comparison data frame;
[0051] S4058: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame + 1 is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4059;
[0052] S4059: Obtain the byte content from the offset address + 2 + the byte length of the comparison data frame to the offset address + 2 + the byte length of the comparison data frame + 1 as the comparison data frame tail, and determine whether the comparison data frame tail is equal to the data frame tail. If so, execute step S405A, otherwise, execute step S405E;
[0053] S405A: Setting a first comparison data frame, wherein the frame header is the comparison data frame header, the byte length is the byte length of the comparison data frame, the data is the comparison data frame, and the frame tail is the comparison data frame tail;
[0054] S405B: Determine whether the data frame set includes the first comparison data frame, if so, execute step S405D, otherwise, execute step S405C;
[0055] S405C: adding the tail of the current first comparison data frame to the data frame set to achieve dynamic compensation;
[0056] S405D: assign the current offset address to the offset address + 3 + the byte length of the comparison data frame, and execute step S4052;
[0057] S405E: Assign the current offset address to the offset address + 1, and execute step S4052.
[0058] Preferably, step S405B includes the following steps:
[0059] S405B1: Set the initial value of the first comparison flag to false;
[0060] S405B2: traverse the data frame set and determine whether there is an element, if so, execute step S405B3, otherwise, execute step S405D;
[0061] S405B3: Get the frame header of the current element;
[0062] S405B4: Determine whether the frame header of the current element is equal to the frame header of the comparison data, if so, execute step S405B5, otherwise, execute step S405BA;
[0063] S405B5: Get the byte length of the current element;
[0064] S405B6: Determine whether the byte length of the current element is equal to the byte length of the comparison data frame, if so, execute step S405B7, otherwise, execute step S405BA;
[0065] S405B7: Get the data frame of the current element;
[0066] S405B8: Determine whether the data frame of the current element is equal to the comparison data frame, if so, execute step S405B9, otherwise, execute step S405BA;
[0067] S405B9: The frame header, byte length and data frame are the same, indicating that the same data frame is found, and the initial value of the first comparison flag is set to true;
[0068] S405BA: Determine whether the current first comparison flag is true, if so, execute step S405D, otherwise, execute step S405B2.
[0069] Preferably, the step S500 includes the following steps:
[0070] S501: Determine whether the parsing flag is true, if so, execute step S502, otherwise, execute step S501;
[0071] S502: setting the initial value of the second comparison flag to true, comparing the sample data frame set with the data frame set, and changing the value of the second comparison flag according to the comparison result;
[0072] S503: Determine whether the value of the second comparison flag is true, if so, execute step S504, otherwise, execute step S505;
[0073] S504: Scan times = scan times threshold, execute step S506;
[0074] S505: Scan times = scan times + 1;
[0075] S506: Determine whether the current scan number is equal to the scan number threshold, if so, execute step S507, otherwise, execute step S300;
[0076] S507: End the scan and output a data frame set.
[0077] Preferably, the step S502 includes the following steps:
[0078] S5021: traverse the sample data frame set and determine whether there is an element, if so, execute step S5022, otherwise, execute step S503;
[0079] S5022: Record the current element as a sample element;
[0080] S5023: Determine whether the data frame set contains a sample element, including the following steps:
[0081] S50231: Set the initial value of the third comparison flag to false;
[0082] S50232: traverse the data frame set and determine whether there is an element, if so, execute step S50233, otherwise, execute step S5023B;
[0083] S50233: record the current element as frame data and obtain the frame data header;
[0084] S50234: Determine whether the frame data header is equal to the comparison data frame header, if so, execute step S50235, otherwise, execute step S5023A;
[0085] S50235: Get the byte length of the frame data;
[0086] S50236: Determine whether the byte length of the frame data is equal to the byte length of the comparison data frame, if so, execute step S50237, otherwise, execute step S5023A;
[0087] S50237: Get data in the frame data;
[0088] S50238: Determine whether the data in the currently acquired frame data is equal to the comparison data frame, if so, execute step S50239, otherwise, execute step S5023A;
[0089] S50239: The frame header, byte length and data are the same, indicating that the same data frame is found, and the initial value of the third comparison flag is set to true;
[0090] S5023A: Determine whether the third comparison flag is true, if so, execute step S5021, otherwise, execute step S50232;
[0091] S5023B: The traversal is completed, but no data is matched yet, so the second comparison flag is set to false.
[0092] The present invention has the following beneficial effects:
[0093] 1. Deal with frame breakage to ensure data integrity.
[0094] 2. Compensation scanning ensures data integrity.
[0095] 3. Dynamically compensate the number of scans to save scanning time as much as possible. BRIEF DESCRIPTION OF THE DRAWINGS
[0096] Figure 1 The overall flow chart of the method provided by the present invention;
[0097] Figure 2 A specific flow chart of parsing a data frame of a common buffer set in the method provided by the present invention;
[0098] Figure 3 A specific flow chart of determining whether a data frame set includes a first comparison data frame in the method provided by the present invention;
[0099] Figure 4 This is a specific flow chart of comparing a sample data frame set with a data frame set in the method provided by the present invention. DETAILED DESCRIPTION
[0100] As we all know, the format of data frame is diverse, and the basic structure is composed of data frame header, data length, data, and data frame tail.
[0101] Figure 1 The overall flow chart of the method provided by the present invention is shown. Figure 1 As shown, the method of the present invention comprises the following steps:
[0102] S100: Creating a connection, including the following steps:
[0103] S101: creating a public buffer set to store data that was not parsed into a complete frame in the last data parsing;
[0104] S102: The application layer establishes a connection with the UHF RFID module, and the connection method includes TCP connection / serial port connection;
[0105] S103: Open the input stream and output stream of the connection channel through the API;
[0106] S104: Open an independent thread for the input stream and provide a data loop reading interface;
[0107] S105: Open an independent thread for the output stream and provide a data interaction interface;
[0108] S200: Setting initial values of parameters: including setting a scan threshold time, setting a data frame set, setting a sample data frame set, setting a scan number threshold, and setting the initial value of the scan number to 0;
[0109] S300: Scanning UHF RFID; Step S300 includes the following steps:
[0110] S301: according to the protocol of the RFID radio frequency module, a scanning instruction is sent through the data interaction interface, the sending start time and the scanning flag are recorded, and the scanning flag and the parsing flag are set to false;
[0111] S302: Determine whether the number of scans is 0, if so, execute step S303, otherwise, execute step S304:
[0112] S303: the data frame set is set to empty;
[0113] S304: Get the current time, determine whether the current time minus the sending start time is greater than the scanning threshold time, if so, execute step S305, otherwise, sleep for 20ms, and execute step S304;
[0114] S305: Send a stop scanning instruction through the data interaction interface to end scanning the UHF RFID and set the scanning flag to true.
[0115] S400: Analyze data and dynamically compensate; Step S400 includes the following steps:
[0116] S401: Determine whether the data loop reading interface receives the returned data, if so, execute step S402, otherwise, execute step S403;
[0117] S402: Record the returned data as the first data and execute step S404;
[0118] S403: sleep for 10 milliseconds;
[0119] S404: Add the tail of the first data to the common buffer set;
[0120] S405: parsing the data frame of the public buffer set according to the protocol format;
[0121] Figure 2 FIG. 4 shows a specific flow chart of parsing a data frame of a common buffer set in the method provided by the present invention. Figure 2 As shown, step S405 includes the following steps:
[0122] S4051: Set the initial value of the offset address to 0, and obtain the byte length of the current public buffer set;
[0123] S4052: Determine whether the offset address + 1 is greater than the byte length of the current public buffer set, if so, execute step S406, otherwise, execute step S4053;
[0124] S4053: Obtain the byte content from the current offset address to the offset address + 1 as the comparison data frame header, and determine whether the comparison data frame header is equal to the data frame header. If so, execute step S405E, otherwise, execute step S4054;
[0125] S4054: Determine whether the offset address + 2 is greater than the byte length of the current public buffer set, if so, execute step S405E, otherwise, execute step S4055;
[0126] S4055: Obtain the byte content from the current offset address + 1 to the offset address + 2 as the byte length of the comparison data frame;
[0127] S4056: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4057;
[0128] S4057: Obtain the byte content from offset address + 2 to offset address + 2 + the byte length of the comparison data frame as the comparison data frame;
[0129] S4058: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame + 1 is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4059;
[0130] S4059: Obtain the byte content from the offset address + 2 + the byte length of the comparison data frame to the offset address + 2 + the byte length of the comparison data frame + 1 as the comparison data frame tail, and determine whether the comparison data frame tail is equal to the data frame tail. If so, execute step S405A, otherwise, execute step S405E;
[0131] S405A: Setting a first comparison data frame, wherein the frame header is the comparison data frame header, the byte length is the byte length of the comparison data frame, the data is the comparison data frame, and the frame tail is the comparison data frame tail;
[0132] S405B: Determine whether the data frame set includes the first comparison data frame, if so, execute step S405D, otherwise, execute step S405C;
[0133] Figure 3 FIG. 2 shows a specific flow chart of determining whether a data frame set includes a first comparison data frame in the method provided by the present invention. Figure 3 As shown, step S405B includes the following steps:
[0134] S405B1: Set the initial value of the first comparison flag to false;
[0135] S405B2: traverse the data frame set and determine whether there is an element, if so, execute step S405B3, otherwise, execute step S405D;
[0136] S405B3: Get the frame header of the current element;
[0137] S405B4: Determine whether the frame header of the current element is equal to the frame header of the comparison data, if so, execute step S405B5, otherwise, execute step S405BA;
[0138] S405B5: Get the byte length of the current element;
[0139] S405B6: Determine whether the byte length of the current element is equal to the byte length of the comparison data frame, if so, execute step S405B7, otherwise, execute step S405BA;
[0140] S405B7: Get the data frame of the current element;
[0141] S405B8: Determine whether the data frame of the current element is equal to the comparison data frame, if so, execute step S405B9, otherwise, execute step S405BA;
[0142] S405B9: The frame header, byte length and data frame are the same, indicating that the same data frame is found, and the initial value of the first comparison flag is set to true;
[0143] S405BA: Determine whether the current first comparison flag is true, if so, execute step S405D, otherwise, execute step S405B2.
[0144] S405C: adding the tail of the current first comparison data frame to the data frame set to achieve dynamic compensation;
[0145] S405D: assign the current offset address to the offset address + 3 + the byte length of the comparison data frame, and execute step S4052;
[0146] S405E: Assign the current offset address to the offset address + 1, and execute step S4052.
[0147] S406: Determine whether the current scan flag is true, if so, execute step S407, otherwise, execute step S401;
[0148] S407: Set the parsing flag to true.
[0149] S500: Compare data and determine whether to end scanning. If yes, execute step S600; otherwise, execute step S300. Step S500 includes the following steps:
[0150] S501: Determine whether the parsing flag is true, if so, execute step S502, otherwise, execute step S501;
[0151] S502: setting the initial value of the second comparison flag to true, comparing the sample data frame set with the data frame set, and changing the value of the second comparison flag according to the comparison result;
[0152] Figure 4 FIG. 2 shows a specific flow chart of comparing a sample data frame set with a data frame set in the method provided by the present invention. Figure 4 As shown, step S502 includes the following steps:
[0153] S5021: traverse the sample data frame set and determine whether there is an element, if so, execute step S5022, otherwise, execute step S503;
[0154] S5022: Record the current element as a sample element;
[0155] S5023: Determine whether the data frame set contains a sample element, including the following steps:
[0156] S50231: Set the initial value of the third comparison flag to false;
[0157] S50232: traverse the data frame set and determine whether there is an element, if so, execute step S50233, otherwise, execute step S5023B;
[0158] S50233: record the current element as frame data and obtain the frame data header;
[0159] S50234: Determine whether the frame data header is equal to the comparison data frame header, if so, execute step S50235, otherwise, execute step S5023A;
[0160] S50235: Get the byte length of the frame data;
[0161] S50236: Determine whether the byte length of the frame data is equal to the byte length of the comparison data frame, if so, execute step S50237, otherwise, execute step S5023A;
[0162] S50237: Get data in the frame data;
[0163] S50238: Determine whether the data in the currently acquired frame data is equal to the comparison data frame, if so, execute step S50239, otherwise, execute step S5023A;
[0164] S50239: The frame header, byte length and data are the same, indicating that the same data frame is found, and the initial value of the third comparison flag is set to true;
[0165] S5023A: Determine whether the third comparison flag is true, if so, execute step S5021, otherwise, execute step S50232;
[0166] S5023B: The traversal is completed, but no data is matched yet, so the second comparison flag is set to false.
[0167] S503: Determine whether the value of the second comparison flag is true, if so, execute step S504, otherwise, execute step S505;
[0168] S504: Scan times = scan times threshold, execute step S506;
[0169] S505: Scan times = scan times + 1;
[0170] S506: Determine whether the current scan number is equal to the scan number threshold, if so, execute step S507, otherwise, execute step S300;
[0171] S507: End the scan and output a data frame set.
[0172] S600: Output a data frame set.
[0173] The method provided by the present invention solves the technical problem that there is no method for dynamic compensation scanning of ultra-high frequency RFID in the prior art.
[0174] It should be understood that the present invention is not limited to the above examples. For those skilled in the art, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for dynamic compensation scanning of ultra-high frequency RFID, characterized in that The following steps are involved: S100: Creating a connection, including the following steps: S101: creating a public buffer set to store data that was not parsed into a complete frame in the last data parsing; S102: The application layer establishes a connection with the UHF RFID module, and the connection method includes TCP connection / serial port connection; S103: Open the input stream and output stream of the connection channel through the API; S104: Open an independent thread for the input stream and provide a data loop reading interface; S105: Open an independent thread for the output stream and provide a data interaction interface; S200: Setting initial values of parameters: including setting a scan threshold time, setting a data frame set, setting a sample data frame set, setting a scan number threshold, and setting the initial value of the scan number to 0; S300: Scan UHF RFID; S400: Analyze data and dynamically compensate. Step S400 includes the following steps: S401: Determine whether the data loop reading interface receives the returned data, if so, execute step S402, otherwise, execute step S403; S402: Record the returned data as first data and execute step S404; S403: sleep for 10 milliseconds; S404: Add the tail of the first data to the common buffer set; S405: Parsing the data frame of the public buffer set according to the protocol format. Step S405 includes the following steps: S4051: Set the initial value of the offset address to 0, and obtain the byte length of the current public buffer set; S4052: Determine whether the offset address + 1 is greater than the byte length of the current public buffer set, if so, execute step S406, otherwise, execute step S4053; S4053: Obtain the byte content from the current offset address to the offset address + 1 as the comparison data frame header, and determine whether the comparison data frame header is equal to the data frame header. If so, execute step S405E, otherwise, execute step S4054; S4054: Determine whether the offset address + 2 is greater than the byte length of the current public buffer set, if so, execute step S405E, otherwise, execute step S4055; S4055: Obtain the byte content from the current offset address + 1 to the offset address + 2 as the byte length of the comparison data frame; S4056: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4057; S4057: Obtain the byte content from offset address + 2 to offset address + 2 + the byte length of the comparison data frame as the comparison data frame; S4058: Determine whether the sum of the offset address + 2 + the byte length of the comparison data frame + 1 is greater than the byte length of the current public buffer set. If so, execute step S405E; otherwise, execute step S4059; S4059: Obtain the byte content from the offset address + 2 + the byte length of the comparison data frame to the offset address + 2 + the byte length of the comparison data frame + 1 as the comparison data frame tail, and determine whether the comparison data frame tail is equal to the data frame tail. If so, execute step S405A, otherwise, execute step S405E; S405A: Setting a first comparison data frame, wherein the frame header is the comparison data frame header, the byte length is the byte length of the comparison data frame, the data is the comparison data frame, and the frame tail is the comparison data frame tail; S405B: Determine whether the data frame set includes the first comparison data frame, if so, execute step S405D, otherwise, execute step S405C; S405C: adding the tail of the current first comparison data frame to the data frame set to achieve dynamic compensation; S405D: assign the current offset address to the offset address + 3 + the byte length of the comparison data frame, and execute step S4052; S405E: assign the current offset address to the offset address + 1, and execute step S4052; S406: Determine whether the current scan flag is true, if so, execute step S407, otherwise, execute step S401; S407: Set the parsing flag to true; S500: Compare data and determine whether to end scanning, if so, execute step S600, otherwise, execute step S300; S600: Output the data frame set.
2. The method for dynamic compensation scanning of ultra-high frequency RFID according to claim 1, characterized in that: Step S300 includes the following steps: S301: according to the protocol of the RFID radio frequency module, a scanning instruction is sent through the data interaction interface, the sending start time and the scanning flag are recorded, and the scanning flag and the parsing flag are set to false; S302: Determine whether the number of scans is 0, if so, execute step S303, otherwise, execute step S304: S303: the data frame set is set to empty; S304: Get the current time, determine whether the current time minus the sending start time is greater than the scanning threshold time, if so, execute step S305, otherwise, sleep for 20ms, and execute step S304; S305: Send a stop scanning instruction through the data interaction interface to end scanning the UHF RFID and set the scanning flag to true.
3. The method for dynamic compensation scanning of ultra-high frequency RFID according to claim 1, characterized in that: Step S405B includes the following steps: S405B1: Set the initial value of the first comparison flag to false; S405B2: traverse the data frame set and determine whether there is an element, if so, execute step S405B3, otherwise, execute step S405D; S405B3: Get the frame header of the current element; S405B4: Determine whether the frame header of the current element is equal to the frame header of the comparison data, if so, execute step S405B5, otherwise, execute step S405BA; S405B5: Get the byte length of the current element; S405B6: Determine whether the byte length of the current element is equal to the byte length of the comparison data frame, if so, execute step S405B7, otherwise, execute step S405BA; S405B7: Get the data frame of the current element; S405B8: Determine whether the data frame of the current element is equal to the comparison data frame, if so, execute step S405B9, otherwise, execute step S405BA; S405B9: The frame header, byte length and data frame are the same, indicating that the same data frame is found, and the initial value of the first comparison flag is set to true; S405BA: Determine whether the current first comparison flag is true, if so, execute step S405D, otherwise, execute step S405B2.
4. The method for dynamic compensation scanning of ultra-high frequency RFID according to claim 1, characterized in that: The step S500 includes the following steps: S501: Determine whether the parsing flag is true, if so, execute step S502, otherwise, execute step S501; S502: setting the initial value of the second comparison flag to true, comparing the sample data frame set with the data frame set, and changing the value of the second comparison flag according to the comparison result; S503: Determine whether the value of the second comparison flag is true, if so, execute step S504, otherwise, execute step S505; S504: Scan times = scan times threshold, execute step S506; S505: Scan times = scan times + 1; S506: Determine whether the current scan number is equal to the scan number threshold, if so, execute step S507, otherwise, execute step S300; S507: End the scan and output a data frame set.
5. The method for dynamic compensation scanning of ultra-high frequency RFID according to claim 4, characterized in that: The step S502 includes the following steps: S5021: traverse the sample data frame set and determine whether there is an element, if so, execute step S5022, otherwise, execute step S503; S5022: Record the current element as a sample element; S5023: Determine whether the data frame set contains a sample element, including the following steps: S50231: Set the initial value of the third comparison flag to false; S50232: traverse the data frame set and determine whether there is an element, if so, execute step S50233, otherwise, execute step S5023B; S50233: record the current element as frame data and obtain the frame data header; S50234: Determine whether the frame data header is equal to the comparison data frame header, if so, execute step S50235, otherwise, execute step S5023A; S50235: Get the byte length of the frame data; S50236: Determine whether the byte length of the frame data is equal to the byte length of the comparison data frame, if so, execute step S50237, otherwise, execute step S5023A; S50237: Get data in the frame data; S50238: Determine whether the data in the currently acquired frame data is equal to the comparison data frame, if so, execute step S50239, otherwise, execute step S5023A; S50239: The frame header, byte length and data are the same, indicating that the same data frame is found, and the initial value of the third comparison flag is set to true; S5023A: Determine whether the third comparison flag is true, if so, execute step S5021, otherwise, execute step S50232; S5023B: The traversal is completed, but no data is matched yet, so the second comparison flag is set to false.
Citation Information
Patent Citations
RFID device, host, apparatus with RFID device mounted thereon, and method of controlling RFID device
CN102906765A
Automation book inventory method based on ultrahigh frequency RFID technology
CN107153854A