A packaging box information interaction method based on NFC multi-tag linkage

By setting multiple NFC tags inside the packaging box and generating dynamic verification factors using changes in coupling field strength, the problem of not being able to record the opening history in existing technologies is solved, achieving high-precision recording of opening frequency and duration, ensuring the security and low power consumption of information interaction.

CN122491324APending Publication Date: 2026-07-31ZHEJIANG XINYA PACKING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-29
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing technologies cannot effectively record and verify opening history in packaging boxes, and their reliance on mechanical contacts or power management has flaws, making it difficult to distinguish between opening behavior and transportation vibrations.

Method used

By setting multiple NFC tags inside the packaging box, the attenuation time-series curve is established by utilizing the change in coupling field strength caused by opening and closing the cover, generating a dynamic verification factor, and realizing the binding of information interaction permissions with opening and closing history, thus distinguishing between real opening and closing behavior and abnormal vibration interference.

Benefits of technology

It achieves high-precision recording of the frequency and duration of packaging box openings, preventing replay attacks, balancing low power consumption and high security, and dynamic verification factors ensure that information interaction permissions are bound to the packaging box operation history.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122491324A_ABST
    Figure CN122491324A_ABST
Patent Text Reader

Abstract

This invention discloses a packaging box information interaction method based on NFC multi-tag linkage, relating to the field of NFC information interaction technology. The method includes: establishing a decay time-series curve of the coupling field strength between tags in response to the continuous change in distance between a first NFC tag and a second NFC tag triggered by the opening and closing action of the packaging box lid; generating a statistical value of the opening frequency of the packaging box and a duration value corresponding to each opening based on the waveform matching degree between the decay time-series curve and a preset reference curve; encoding the opening frequency statistical value and the duration value into a dynamic verification factor, and sending a handshake request carrying the dynamic verification factor to an external reading device through the first NFC tag; and activating the information interaction channel of a third NFC tag inside the packaging box after the external reading device sends back a confirmation command calculated based on the dynamic verification factor through the second NFC tag.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of NFC information interaction technology, specifically to a method for information interaction in packaging boxes based on NFC multi-tag linkage. Background Technology

[0002] Built-in NFC tags in packaging boxes are commonly used for information storage and interaction, serving as a common method for product anti-counterfeiting, traceability, and IoT management. Current solutions typically encapsulate a single NFC tag within the box, allowing external reading devices to access pre-set static information, such as product serial numbers or web links, by simply bringing the tag close. However, this method doesn't link to the physical opening / closing status of the box, making it impossible to detect whether the box has been opened, the number of times it has been opened, or the duration of opening. The reading operation is disconnected from the box's usage history; anyone with a reading device can access the tag content, making it difficult to reliably record and verify the packaging's opening history. Some improvements attempt to add mechanical or electronic switches to the box to detect opening / closing status, but these solutions rely on additional physical contacts or sensors, resulting in complex structures and increased packaging costs. Contacts suffer from wear and tear and poor contact over time, while electronic sensors require built-in batteries, introducing power management burdens and leakage risks. While schemes based on magnetic field or capacitance change detection eliminate physical contacts, their sensing accuracy is easily affected by environmental electromagnetic interference. They also make it difficult to record and analyze the waveform of the entire opening and closing action in detail, and cannot effectively distinguish between normal opening and random vibrations or collisions during transportation.

[0003] The key problem to be solved is how to reuse the NFC tag resources inherent in the packaging box without adding mechanical contacts and independent power supply, to capture the continuous physical changes caused by the opening and closing action with high precision, and to establish a direct and dynamic binding between the opening and closing history data and the external device authentication process. Summary of the Invention

[0004] The purpose of this invention is to provide a packaging box information interaction method based on NFC multi-tag linkage. It utilizes the continuous change in coupling field strength between tags caused by opening and closing the packaging box to establish an attenuation time-series curve, and performs waveform matching with a preset benchmark curve to statistically analyze the effective opening frequency and duration. Simultaneously, the opening and closing history data is encoded as a dynamic verification factor to drive multi-tag collaborative verification. After information comparison is completed, the interaction channel of the internally stored tags is activated, realizing the dynamic binding of information interaction permissions with the physical operation history of the packaging box.

[0005] The objective of this invention can be achieved through the following technical solutions: This invention provides a packaging box information interaction method based on NFC multi-tag linkage, including the following: In response to the continuous change in distance between the first and second NFC tags triggered by the opening and closing of the packaging box lid, a decay time-series curve of the coupling field strength between the tags is established. Based on the waveform matching degree between the decay time-series curve and a preset reference curve, a statistical value of the opening frequency of the packaging box and a corresponding duration value for each opening are generated. The statistical value of the opening frequency and the duration value are encoded as a dynamic verification factor, and a handshake request carrying the dynamic verification factor is sent to an external reading device through the first NFC tag. After the external reading device sends back a confirmation command calculated based on the dynamic verification factor through the second NFC tag, the information interaction channel of the third NFC tag inside the packaging box is activated. Through the above linkage mechanism, it is possible to accurately distinguish between real opening and closing behavior and abnormal vibration interference. At the same time, the dynamic verification factor generated based on historical behavior data realizes one-time password for the interaction credential, effectively preventing replay attacks. The internal information tag is only awakened after the verification is successful, balancing low power consumption and high security.

[0006] As a technical solution of the present invention, the method for establishing the attenuation time-series curve of the coupling field strength between tags is as follows: a first NFC tag is encapsulated on the inner wall of the packaging box lid, and a second NFC tag is encapsulated on the bottom of the packaging box; the coupling field strength value between the first NFC tag and the second NFC tag is continuously collected, and the coupling field strength value is negatively correlated with the distance between the tags; the coupling field strength value when the packaging box is fully closed is used as the initial baseline value. The curve starts at the moment when the coupling field strength decreases during the opening of the box lid, and ends when the coupling field strength decreases to its lowest value when the lid reaches its maximum opening angle. The moment is taken as the end point of the curve; the coupling field strength value sequence between the start point and the end point of the curve is recorded according to a fixed sampling period. ,in Indicates the first The coupling field strength values ​​collected at each sampling point , The total number of sampling points; median filtering is applied to the coupled field strength value sequence to obtain the attenuation time series curve. , Indicates time The electric field strength variation curve is shown. Preferably, the sliding window length for median filtering is set to three times the number of sampling points corresponding to the fixed sampling period, so as to preserve the falling edge characteristics of the curve while suppressing impulse noise.

[0007] The steps for generating statistical values ​​based on the waveform matching degree between the attenuation timing curve and the preset reference curve include: pre-storing the standard attenuation curve corresponding to the normal opening and closing action of the packaging box. and the interference attenuation curve corresponding to abnormal vibration of the packaging box. ; Calculate the decay time-series curve Compared with the standard attenuation curve The first dynamic time-normalized distance between , Represents the dynamic time-warped distance operation function; calculates the decay time series curve. Interference attenuation curve The second dynamic time-warped distance between ;when When this action is deemed a valid activation action, it will be included in the activation frequency statistics. , To accumulate the number of effective activations; extract the coupling field strength value from the decay timing curve from the initial baseline value. Drop to the lowest value The duration of the descent phase is used as the start action duration value. Extract the coupling field strength value from the lowest value Rebound to the initial baseline value The duration of the recovery phase is used as the duration of the closing action. ,Will and The sum is used as the duration value corresponding to this activation. .when If the action is deemed invalid, the activation frequency statistics will not be updated. By using dynamic time-warped distance to identify the overall shape of the curve, it is possible to reliably distinguish between normal user opening actions and unintentional actions such as transportation vibrations, thereby ensuring the authenticity of opening and closing behavior statistics.

[0008] As a preferred embodiment of the present invention, the process of generating a dynamic verification factor and sending a handshake request is as follows: The frequency statistics value of the start-up process is... Convert to binary frequency sequence The duration value Convert to binary duration sequence ;Will and Interleaved merging generates the original merged sequence. ; For the original merged sequence Perform cyclic redundancy check (CRC) calculations to obtain the check code segment. The preferred algorithm is CRC-16. The checksum is two bytes long; the checksum segment... Appended to the original merged sequence At the end, a dynamic check factor is formed. , where the symbol This represents the concatenation of binary sequences; it also includes dynamic check factors. The request message, encapsulated in the NFC data exchange format, is sent by the first NFC tag to an external reading device in active communication mode. Because... The value of depends on the dynamic changes. and Each time a check factor is generated, it is different. External reading devices must rely on the correct historical behavior information to calculate the matching confirmation command, which greatly improves the security of the interaction process.

[0009] During the activation of the third NFC tag, the present invention employs the following technical means: After receiving the radio frequency field signal emitted by the external reading device, the second NFC tag enters a passive communication mode and listens for the confirmation command sent by the external reading device; the verification factor is parsed from the confirmation command. ,Will The dynamic check factor stored locally Perform a bit-by-bit comparison; when and When they are completely identical, the second NFC tag sends an enable voltage signal to the third NFC tag. The third NFC tag receives Then, it switches from deep sleep mode to working mode and establishes a wireless data link with an external reading device. Preferably, the second NFC tag will have a dynamic verification factor. The latch register is stored inside the device, and the output value of the latch register remains unchanged after receiving an acknowledgment command until the cover is fully opened again, ensuring that the device is bound to the same reading device for verification only during an opening and closing cycle.

[0010] For the activation and connection establishment of the third NFC tag, it further includes: the charge pump circuit integrated inside the third NFC tag receives an enable voltage signal. After startup, the received radio frequency field energy is boosted to the operating voltage threshold. ; upon reaching Afterwards, it initializes the internal non-volatile memory controller and encryption engine module upon power-up; and sends its tag identifier to the external reading device via load modulation. The system includes a list of supported command sets. In response to a selection command returned by an external reading device, the third NFC tag establishes a logical link connection with the external reading device and starts a session hold timer for that logical link connection. Under this mechanism, the third NFC tag is in a zero-power deep sleep state when idle, and is only awakened after the cover is effectively opened and the dynamic verification factor passes dual authentication. This significantly extends the tag's service life while achieving highly secure anti-counterfeiting information interaction.

[0011] The beneficial effects of this invention are: A decay time-series curve is established by collecting continuous changes in the coupling field strength between the first and second NFC tags caused by the opening and closing of the cover. This curve fully records the entire sequence of field strength changes from the initial baseline value when the cover is closed, through the opening action until the coupling field strength drops to its lowest value, and then through the closing action back to the initial baseline value. The decay time-series curve is compared with pre-stored standard decay curves and interference decay curves to calculate dynamic time warping distances, and waveform matching is used to determine whether the current action is a valid opening action. The dynamic time warping algorithm allows for non-linear offsets between the two curves on the time axis, solving the problem of time axis scaling caused by inconsistent opening and closing speeds among different users. The similarity of the global waveform shape is more reliable than a single threshold judgment, eliminating false identifications caused by short-term, non-continuous coupling field strength fluctuations such as transportation vibrations and slight shaking. The decay time-series curve also provides time dimension information, allowing direct extraction of the duration of the field strength decrease phase and the duration of the recovery phase, which are then combined to obtain the true duration of each opening. The joint statistics of opening frequency and single duration constitute a fine-grained record of the packaging usage history. The frequency and duration of opening operations are converted into binary sequences and interleaved bitwise. A checksum is calculated using cyclic redundancy check (CRC) and appended to the end of the original merged sequence to form a dynamic check factor. The value of the dynamic check factor changes with each valid opening and closing operation of the packaging box, and the checksum generated after each operation is different from the previous one. After obtaining the dynamic check factor through the first NFC tag, the external reading device must send back a confirmation command based on the dynamic check factor calculation through the second NFC tag. The second NFC tag stores the dynamic check factor in its internal latch register, performs bit-by-bit comparison, and outputs an enable voltage signal to the third NFC tag. The third NFC tag is in a deep sleep state and does not respond to direct polling from the external reading device. Only upon receiving the enable voltage signal does the charge pump circuit boost the RF field energy to complete power-on and initialization, and then establish a logical link connection with the external reading device. The core interactive information stored in the third NFC tag is only exposed after the packaging box undergoes a valid opening and closing operation and passes the dynamic check factor verification. This directly binds the control conditions for information interaction permissions to the packaging box's own operation history, rather than the reading device or a static password. Attached Figure Description

[0012] The invention will now be further described with reference to the accompanying drawings.

[0013] Figure 1 This is a flowchart of a packaging box information interaction method based on NFC multi-tag linkage; Figure 2 This is a flowchart of the packaging box lid opening detection process based on NFC coupling field strength changes; Figure 3 This is a flowchart of the dynamic check factor generation and transmission process; Figure 4 This is a flowchart of the second NFC tag verification factor comparison and the third NFC tag enable process. Detailed Implementation

[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] See Figure 1 This invention provides a packaging box information interaction method based on NFC multi-tag linkage. The method establishes an attenuation timing curve of the coupling field strength between the tags when the opening and closing action of the packaging box lid triggers a continuous change in the distance between the first and second NFC tags. Based on the waveform matching degree between the attenuation timing curve and a preset reference curve, it generates a statistical value of the packaging box opening frequency and a corresponding duration value for each opening. The opening frequency statistical value and duration value are encoded as a dynamic verification factor, and a handshake request carrying this dynamic verification factor is sent to an external reading device via the first NFC tag. After the external reading device sends back a confirmation command calculated based on the dynamic verification factor via the second NFC tag, the information interaction channel of the third NFC tag inside the packaging box is activated.

[0016] In specific implementation, please refer to Figure 2 A first NFC tag is encapsulated on the inner wall of the packaging box lid, and a second NFC tag is encapsulated on the bottom of the packaging box. Both the first and second NFC tags are made using flexible printed circuit technology and are fixed to the geometric center areas of the inner side of the lid and the bottom of the box, respectively, by pressure-sensitive adhesive layers. When the lid is fully closed, the antenna planes of the first and second NFC tags are essentially parallel, and the vertical distance between them is minimal, at which point the coupling field strength reaches its maximum. As the lid begins to open, the first NFC tag moves away from the second NFC tag, increasing the spatial distance between them and decreasing the coupling field strength.

[0017] The coupling field strength between the first and second NFC tags is continuously collected. A low-power microcontroller is integrated within the second NFC tag. The microcontroller reads the value from the received signal strength indicator register of the second NFC tag at a fixed sampling period via its internal integrated circuit bus interface. The value in the received signal strength indicator register directly reflects the coupling field strength between the first and second NFC tags. The fixed sampling period is set to 20 milliseconds.

[0018] The coupling field strength value when the packaging box is fully closed is used as the initial baseline value. After the packaging box is manufactured and assembled, an initialization calibration process is performed. After the microcontroller is powered on and reset, and the lid is confirmed to be fully closed, 100 coupling field strength value sampling points are continuously collected, the arithmetic mean of the 100 coupling field strength values ​​is calculated, and the arithmetic mean is written to the internal non-volatile memory as the initial baseline value.

[0019] The starting point of the curve is defined as the moment when the coupling field strength decreases during the opening of the packaging box lid. During the opening process, the microcontroller compares the coupling field strength value acquired at the current sampling moment with the initial baseline value in real time. The starting moment is determined when a first condition is met: the coupling field strength value at the current sampling moment is less than the difference between the initial baseline value and a preset bias threshold, and the coupling field strength values ​​at the next two consecutive sampling moments are each less than the coupling field strength value at their respective preceding sampling moments. The preset bias threshold is set to five percent of the initial baseline value.

[0020] The curve termination point is defined as the moment when the coupling field strength drops to its lowest value when the lid reaches its maximum opening angle. The hinge structure of the packaging box limits the maximum opening angle of the lid. At this maximum opening angle, the distance between the first and second NFC tags reaches its maximum, and the coupling field strength no longer decreases. The microcontroller determines the curve termination point by detecting the first local minimum point in the coupling field strength value sequence after the curve's starting point. The criteria for determining a local minimum point are: the coupling field strength value at the current sampling moment is less than the coupling field strength value at the previous sampling moment and less than or equal to the coupling field strength value at the next sampling moment.

[0021] Record the coupling field strength sequence from the start point to the end point of the curve according to a fixed sampling period. Record the sampling sequence number corresponding to the sampling time at the start point of the curve as 0, and the sampling sequence number corresponding to the sampling time at the end point of the curve as... The coupling field strength value sequence is based on It means that, among them For sampling sequence number, The range of values ​​is to integers, This represents the coupling field strength at the starting point of the curve. This represents the coupling field strength at the endpoint of the curve.

[0022] For the coupling field strength value sequence Median filtering is performed to obtain the decay time series curve. The sliding window length for median filtering is... Set to three times the number of sampling points corresponding to the fixed sampling period. The fixed sampling period is denoted as... , The value is 20 milliseconds, which is three times the duration of the fixed sampling period. Milliseconds. Within a 60-millisecond time interval, according to a fixed sampling period. The number of sampling points that can be collected during sampling is: Therefore, the length of the sliding window The value is 3.

[0023] Median filtering is performed according to the following formula: ; in, Indicates the sampling sequence number after median filtering. Output value at; This indicates that the median of the values ​​listed within the curly braces is taken. If any of the three values ​​within the braces are equal, the median is taken as the equal value. This indicates that the sampling sequence number in the coupled field strength value sequence is... The original sampled values; This indicates that the sampling sequence number in the coupled field strength value sequence is... The original sampled values; This indicates that the sampling sequence number in the coupled field strength value sequence is... The original sampled values; The value range is from 1 to An integer. For the sampling sequence number... and sampling number At the location, no median filtering is performed; the original sampled value is used directly. ,and .

[0024] After the above processing The sequence forms a decay time-series curve, in which The range of values ​​is to .

[0025] In some embodiments, the sliding window length The value of 3 is based on the fact that the decrease in coupling field strength caused by the opening action of the packaging box lid is a continuous monotonic change process lasting for tens of milliseconds or more. However, the abnormal sampling points caused by sudden external electromagnetic interference or instantaneous mechanical vibration usually only last for one fixed sampling period, i.e., 20 milliseconds. Setting the sliding window length to 3 sampling points covers 3 consecutive sampling time points. This can remove isolated abnormal peak data while preserving the details of the macro trend of the decrease in coupling field strength, thus avoiding the abnormal peak data affecting the accuracy of subsequent opening action recognition and duration extraction.

[0026] In practice, a standard attenuation curve corresponding to the normal opening and closing action of the packaging box is pre-stored. At the calibration station before the packaging box leaves the factory, a standard reference packaging box from the same batch is selected. The lid of this standard reference packaging box is driven by a servo motor to open from a fully closed position to its maximum opening angle at a constant angular velocity of 30 degrees per second, and then close back to the fully closed position at the same constant angular velocity, completing one standard opening and closing action. A microcontroller integrated into the second NFC tag inside the standard reference packaging box continuously collects the coupling field strength value sequence throughout the entire opening and closing process at a fixed sampling period of 20 milliseconds. This sampling is repeated 50 times. The microcontroller uses a dynamic time warping method to align the 50 coupling field strength value sequences on the time axis, calculates the arithmetic mean of the coupling field strength values ​​at each sampling point after alignment, and uses the obtained arithmetic mean sequence as the standard attenuation curve. This standard attenuation curve is then stored as read-only data in the flash memory of the microcontroller inside the packaging box to be shipped.

[0027] In practice, the interference attenuation curve corresponding to abnormal vibration of the packaging box is pre-stored. Another packaging box from the same batch is fixed on an electric vibration test bench, with the box lid fully closed and the hinge locked. The electric vibration test bench applies random vibration excitation with a frequency range of 5 Hz to 200 Hz and an acceleration root mean square value of 1g for 30 seconds. During this process, the microcontroller continuously collects the fluctuation sequence of the coupling field strength value between the first and second NFC tags caused by abnormal vibration. From the collected fluctuation sequence, a segment with the most drastic waveform changes and the highest density of local extrema is extracted, and after median filtering, it is used as the interference attenuation curve. The interference attenuation curve is then stored in the internal flash memory of the microcontroller.

[0028] During normal use of the packaging box, whenever the opening and closing of the lid triggers a change in the distance between the first NFC tag and the second NFC tag, the microcontroller obtains the attenuation timing curve established as described in Example 1. The microcontroller then calculates the first dynamic time-corrected distance between the attenuation timing curve and the standard attenuation curve, and the second dynamic time-corrected distance between the attenuation timing curve and the interference attenuation curve. Both the first and second dynamic time-corrected distances are obtained using the same dynamic time-corrected method, specifically calculated based on the following cumulative cost recursive formula: ; in, This represents the cumulative cost matrix corresponding to the reference sequence in the dynamically time-warped cumulative cost matrix. The sampling point and the first sampling point of the sequence to be matched Local cumulative cost at each sampling point; The sampling point number of the reference sequence, with values ​​ranging from 1 to... integers, This represents the total number of sampling points in the reference sequence. The sampling point number of the sequence to be matched, with values ​​ranging from 1 to... integers, This represents the total number of sampling points for the sequence to be matched, where the sequence to be matched is a decay time-series curve sequence. Indicates the reference sequence at the 1st Coupled field strength values ​​at each sampling point The sequence to be matched is in the th Coupled field strength values ​​at each sampling point The absolute value of the difference; This indicates taking the minimum value among the three locally accumulated costs listed within the curly braces; Represents the matrix in which the first... Line 1 The local cumulative cost of transferring a column to the current point; Represents the matrix in which the first... Line 1 The local cumulative cost of transferring a column to the current point; Represents the matrix in which the first... Line 1 The local cumulative cost of transferring a column to the current point.

[0029] When calculating the first dynamic time warping distance, the microcontroller sets the reference sequence as the standard decay curve and the sequence to be matched as the decay time series curve, and calculates the final cumulative cost according to the above recursive formula. The resulting value is the first dynamic time warping distance. When calculating the second dynamic time warping distance, the microcontroller sets the reference sequence as the interference attenuation curve, and the sequence to be matched is still the same attenuation timing curve. The second dynamic time warping distance is also calculated according to the above recursive formula.

[0030] The microcontroller compares the first dynamic time warping distance with the second dynamic time warping distance. When the first dynamic time warping distance is less than the second dynamic time warping distance, the microcontroller determines that the action is a valid activation action and increments the activation frequency count stored in the microcontroller's internal random access memory by 1. Simultaneously, the microcontroller extracts the duration value corresponding to this activation. After the last sampling point of the decay timing curve, the microcontroller continues to collect coupling field strength values ​​at a fixed sampling period and compares the collected coupling field strength values ​​with the initial baseline value in real time. When it detects that the coupling field strength values ​​of three consecutive sampling points are all greater than or equal to 99% of the initial baseline value, it determines that the coupling field strength value has returned to the initial baseline value, and records the sampling sequence number of the first sampling point that meets this condition. The activation duration is defined as the sampling sequence number of the termination point of the decay timing curve. With fixed sampling period The product of, with a fixed sampling period The value is 20 milliseconds, and the duration of the action is [value missing]. Milliseconds. The duration of the closing action is defined as the difference between the sampling sequence numbers. With fixed sampling period The product of the two, the duration of the closing action is 1. Milliseconds. The duration of the opening action is added to the duration of the closing action, and the result is used as the duration of this opening action.

[0031] When the first dynamic time warp distance is greater than or equal to the second dynamic time warp distance, the microcontroller determines that the action is invalid, does not change the activation frequency count value, and does not extract the duration value.

[0032] In specific implementation, please refer to Figure 3 The microcontroller reads the power-on frequency statistics and duration values ​​from its internal random access memory. The power-on frequency statistics are the current count value of an unsigned integer variable, and the duration value is an unsigned integer variable recorded in milliseconds. The conversion method for the power-on frequency statistics to a binary frequency sequence is as follows: the power-on frequency statistics are represented as a 16-bit unsigned binary number. If the number of significant bits after conversion is less than 16, zeros are padded to the high-order bits until all 16 bits are filled, forming a binary frequency sequence. The binary frequency sequence is arranged sequentially from the most significant bit to the least significant bit. The 16th bit of the binary frequency sequence is denoted as... The 15th bit is denoted as And so on, up to the first bit, denoted as ,in As the highest bit of the binary frequency sequence The least significant bit of the binary frequency sequence is used as the conversion method for converting the duration value into a binary duration sequence. The duration value is represented as a 16-bit unsigned binary number. If the number of significant bits after conversion is less than 16, zeros are padded to the high-order bits until all 16 bits are filled, forming a binary duration sequence. The binary duration sequence is arranged sequentially from the most significant bit to the least significant bit. The 16th bit of the binary duration sequence is denoted as... The 15th bit is denoted as And so on, up to the first bit, denoted as ,in As the highest bit of the binary duration sequence As the least significant bit of the binary duration sequence.

[0033] The microcontroller interleaves and merges the binary frequency sequence and the binary duration sequence bit-wise to generate the original merged sequence. The specific process of bit-wise interleaving and merging is as follows: the microcontroller allocates a 32-bit storage space in its internal buffer and, in order from the most significant bit to the least significant bit, sequentially... Write to bit 32 of the buffer. Write to bit 31 of the buffer. Write to the 30th bit of the buffer. Write to bit 29 of the buffer, and repeat the above operation of writing one bit of the binary frequency sequence and one bit of the binary duration sequence alternately until the buffer is empty. Write the second bit of the buffer, Write the first bit into the buffer, and the resulting 32-bit sequence is the original merged sequence.

[0034] Cyclic redundancy check (CRC) calculations are performed on the original merged sequence to obtain the check code segment. The CRC-16-CCITT algorithm is used for the CRC calculation, generating a polynomial. The expression is: ; In the above generating polynomial middle, For formal variables, Term represents variable The 16th power of a number has a coefficient of 1; Term represents variable The 12th power of a number has a coefficient of 1; Term represents variable The coefficient of the fifth power of the term is 1; the coefficient of the constant term 1 is 1; and the coefficients of the remaining un-appeared power terms are all 0. The microcontroller treats the original merged sequence as a polynomial over a binary field. The highest bit of the original merged sequence corresponds to a polynomial. The coefficient of the highest-order term, the polynomial corresponding to the least-order bit of the original merged sequence. The lowest order coefficient. Microcontroller calculation. For generator polynomials The remainder polynomial obtained by modulo 2 division Extracting the remainder polynomial The coefficient sequence is used as the check code segment. Remainder polynomial The number of times it is applied does not exceed 15, its coefficient sequence is a 16-bit binary sequence, and the length of the check code segment is two bytes.

[0035] In some embodiments, the microcontroller performs modulo-2 division iteratively. The iterative process includes appending 16 zero bits to the original merged sequence and using a generator polynomial. The corresponding 17-bit binary value 10001000000100001 is used to perform continuous modulo-2 subtraction on the sequence after adding zero bits, until all bits are traversed. The remaining 16 bits are the check code segment.

[0036] The microcontroller appends a check code segment to the end of the original merged sequence to generate a dynamic check factor. The dynamic check factor consists of 32 bits of the original merged sequence and 16 bits of the check code segment, for a total length of 48 bits.

[0037] The microcontroller encapsulates the dynamic check factor into an NFC data exchange format request message. The encapsulation process is as follows: The microcontroller constructs an NFC data exchange format record, setting the record type name format field to "application / vnd.package-dcf", representing a dedicated type for the dynamic check factor of the packaging box. The payload field is filled with 48 bits of dynamic check factor data. The message start and message end bits in the header flag byte are both set to 1, and the short record length is determined based on the actual payload length. After encapsulation, the complete request message is transmitted to the baseband processing unit of the first NFC tag. The first NFC tag sends the request message to an external reading device in active communication mode. In active communication mode, the radio frequency front-end of the first NFC tag generates a carrier signal, and the baseband processing unit performs Miller encoding on the request message and modulates it onto the carrier signal for outward radiation.

[0038] In specific implementation, please refer to Figure 4 The second NFC tag receives radio frequency field signals emitted by an external reading device. When the external reading device enters the effective communication range of the second NFC tag, the 13.56 MHz carrier signal emitted by the external reading device is coupled to the antenna coil of the second NFC tag. The radio frequency front-end of the second NFC tag extracts energy from the carrier wave and generates an internal power supply voltage, while simultaneously parsing the polling command sent by the external reading device from the carrier wave. The second NFC tag then enters passive communication mode. In passive communication mode, the second NFC tag does not actively generate a carrier wave, but instead transmits response data back to the external reading device through load modulation.

[0039] The second NFC tag listens for confirmation commands sent by an external reading device. Upon receiving a handshake request message from the first NFC tag, the external reading device extracts a dynamic verification factor from the message, performs a prescribed operation on it to generate a return verification factor. The generation of the return verification factor uses the same rules and polynomials as the dynamic verification factor generation process within the packaging box. The external reading device encapsulates the return verification factor into a confirmation command message. This message uses the same NFC data exchange format as the handshake request message, with the record type name format field set to "application / vnd.package-confirm" and the payload field containing 48 bits of the return verification factor. The external reading device then sends the confirmation command message to the second NFC tag. Upon receiving the confirmation command message, the second NFC tag's RF front-end demodulates and decodes it using the baseband processing unit, delivering the payload data to the microcontroller inside the second NFC tag.

[0040] The microcontroller parses the return check factor from the acknowledgment instruction. Based on the identifier field in the acknowledgment instruction header, the microcontroller locates the start byte of the payload field and sequentially reads 48 bits of data from the payload field as the return check factor. The return check factor is temporarily stored in a 48-bit variable in the microcontroller's internal random access memory. The bit order of the return check factor is consistent with its order when it was appended to the checksum segment during dynamic check factor generation; that is, the most significant bit of the return check factor corresponds to the first received bit of the acknowledgment instruction payload field, and the least significant bit corresponds to the last received bit.

[0041] The second NFC tag stores the dynamic check factor in its internal latch register. After the microcontroller generates the dynamic check factor, it outputs the 48 bits of the dynamic check factor data in order from the most significant bit to the least significant bit to the parallel data port connected to the latch register module. The latch register module contains 48 edge-triggered D-type flip-flops, each with its data input connected to a parallel data line of the microcontroller. The microcontroller then generates a positive pulse with a width of at least 100 nanoseconds on a general-purpose input / output pin as a latch enable signal, which is fed into the common clock input of the latch register module. On the rising edge of the latch enable signal pulse, the 48 D-type flip-flops capture the state of their respective data inputs and transmit it to their corresponding outputs, thus fully latching the dynamic check factor to the output of the latch register.

[0042] After the second NFC tag receives the confirmation command from the external reading device, the microcontroller fixes the latch enable pin level to low, and the output value of the latch register module enters a hold state, no longer changing with changes in the microcontroller's internal data bus. This hold state continues until the microcontroller detects the next full opening of the cover. The process of the microcontroller detecting the next full opening of the cover is as follows: the microcontroller continuously collects the coupling field strength value between the first and second NFC tags at a fixed sampling period of 20 milliseconds. When the coupling field strength value drops from the vicinity of the initial baseline value and meets the curve start point determination condition, the microcontroller confirms that the cover has entered the opening process from the fully closed state. At this time, the microcontroller restores the latch enable pin to the pulse output state, and sends a latch pulse again to update the contents of the latch register when regenerating the dynamic check factor.

[0043] The microcontroller compares the returned check factor bit by bit with the locally stored dynamic check factor. During the comparison, the microcontroller uses an XOR operation to calculate the comparison result value, which follows the formula: ; in: This represents the comparison result value, which is an integer between 0 and 48. The bit positions are numbered, increasing from 1 to 48, where Corresponding to the least significant bit, Corresponding to the highest bit; This indicates the dynamic check factor of local storage in the th... The logical value at a bit position can be either 0 or 1; Indicates the return check factor at the th The logical value at a bit position can be either 0 or 1; This represents the logical XOR operation. The result is 0 when the two input logical values ​​are the same, and 1 when they are different. This indicates that the summation is performed on the XOR operation results of all 48 bit positions.

[0044] When comparing the result value When the value equals 0, it indicates that the returned check factor and the locally stored dynamic check factor are identical at every bit position, and the microcontroller determines that the external reading device has passed authentication. When the comparison result value... When the value is greater than 0, the microcontroller determines that the authentication has failed, discards the current confirmation command, and does not trigger any operation related to the third NFC tag.

[0045] When the returned verification factor is exactly the same as the locally stored dynamic verification factor, the second NFC tag sends an enable voltage signal to the third NFC tag. The microcontroller of the second NFC tag configures a designated general-purpose input / output pin in push-pull output mode and toggles the pin's output level from low to high, with a high level amplitude of 3.3 volts. This pin is connected to the enable input pin of the third NFC tag via a dedicated copper foil trace on the printed circuit board. The high-level duration of the enable voltage signal is set to 10 milliseconds, controlled by an internal timer of the microcontroller. After 10 milliseconds, the high level remains until the cover is pulled low by the microcontroller the next time it is fully opened.

[0046] Upon receiving the enable voltage signal, the third NFC tag switches from deep sleep mode to operating mode. The integrated power management unit within the third NFC tag detects the change in voltage on the enable input pin from low to high and activates the on-chip low-dropout linear regulator. This regulator converts the RF energy coupled to the antenna or the voltage provided by the optional backup battery into a stable 1.8V digital power supply, which powers the digital logic circuitry of the third NFC tag. After a power-on reset sequence, the internal oscillator starts oscillating, the microprogram counter begins running, and the third NFC tag wakes up from sleep mode. After the reset is complete, the RF interface of the third NFC tag enters listening mode, begins responding to polling commands from external reading devices, and establishes a wireless data link with the external reading device according to the protocol procedures defined by the NFC Forum.

[0047] In practice, the charge pump circuit integrated within the third NFC tag activates upon receiving an enable voltage signal. The enable input pin of the third NFC tag is connected to the general-purpose input / output pin of the second NFC tag's microcontroller. When the second NFC tag confirms that the returned check factor is completely consistent with the locally stored dynamic check factor, the second NFC tag's microcontroller outputs a high-level signal to the enable input pin. The nominal voltage of this high-level signal is 3.3 volts, and its duration is no less than 10 milliseconds. The power management unit of the third NFC tag integrates an edge detection circuit. This edge detection circuit continuously monitors the voltage state of the enable input pin. When the voltage of the enable input pin rises from below 0.8 volts to above 2.0 volts, the edge detection circuit determines that a valid enable voltage signal has been received and then outputs an internal start pulse.

[0048] Upon receiving an internal startup pulse, the charge pump circuit transitions from a fully shutdown state in deep sleep mode to a boost operation state. The charge pump circuit employs a multi-stage Dickson charge pump topology, comprising four series-connected charge pump units. Each charge pump unit consists of two low-threshold metal-oxide-semiconductor field-effect transistor switches and two on-chip polysilicon-insulator-polysilicon capacitors. The input of the charge pump circuit is connected to the rectified output node across the third NFC tag antenna coil. The input voltage is the unregulated DC voltage obtained after coupling and rectification from the 13.56 MHz radio frequency field emitted by the external reader device. Under typical operating conditions, with a distance of 2 cm to 4 cm between the external reader antenna and the third NFC tag antenna, the rectified output DC voltage fluctuates between 1.2 V and 1.8 V.

[0049] The charge pump circuit boosts the received RF field energy to the operating voltage threshold. The operating voltage threshold is set to 1.8 volts. The reason for choosing 1.8 volts as the operating voltage threshold is that the digital logic core circuit of the third NFC tag is manufactured using a 180-nanometer complementary metal-oxide-semiconductor process. The standard cell library provided by the process manufacturer has a rated operating voltage of 1.8 volts. At this rated voltage, the gate propagation delay, setup time, and hold time of the standard cells all meet the timing convergence design specifications. At the same time, the read circuit of the non-volatile memory can provide a stable read current margin at this voltage.

[0050] The control logic for the voltage boosting process of the charge pump circuit is as follows: The charge pump circuit incorporates a voltage feedback control loop, which includes a resistor divider network, a bandgap reference voltage source, and a hysteresis comparator. The resistor divider network samples the output voltage from the charge pump circuit's output terminal and sends the sampled voltage to the non-inverting input of the hysteresis comparator. The bandgap reference voltage source generates a 1.2V reference voltage and sends it to the inverting input of the hysteresis comparator. When the sampled voltage is below 1.2V, the hysteresis comparator outputs a high level, enabling the clock oscillator of the charge pump circuit, and the charge pump circuit continues to boost the voltage. When the sampled voltage exceeds 1.26V, the hysteresis comparator outputs a low level, turning off the clock oscillator, and the charge pump circuit stops boosting the voltage. The voltage division ratio of the resistor divider network is set to 3:2, the stable value of the charge pump output voltage is 1.8V, and the hysteresis window corresponds to ±3.3% of the stable value.

[0051] After reaching the operating voltage threshold, the third NFC tag powers on and initializes its internal non-volatile memory controller and encryption engine module. Once the charge pump circuit output voltage reaches 1.8 volts and remains stable for 64 system clock cycles, the global reset generator inside the third NFC tag releases a reset signal, and the digital core begins the initialization process. The non-volatile memory controller initialization process is as follows: the digital core sends a reset command to the non-volatile memory controller, which executes its internal state machine reset sequence to pre-charge and calibrate the charge pump-type high-voltage generator. After calibration, the non-volatile memory controller reads 16 bytes consecutively from the starting address of the user data storage area and compares the read data with the hard-coded identifier data block. If the comparison matches, the non-volatile memory controller sets the ready flag.

[0052] The initialization process of the encryption engine module is as follows: The digital core reads the 128-bit root key stored in non-volatile memory and loads it into the key register of the encryption engine module. The encryption engine module is an Advanced Encryption Standard (AES) hardware accelerator, supporting both electronic keybook mode and cipher block chaining mode. Internally, the encryption engine module contains a 10-round pipeline structure, each round including a byte substitution unit, a row shifting unit, a column mixing unit, and a round key addition unit. The digital core writes a start vector to the control status register of the encryption engine module. This start vector is generated by a true random number generator inside the third NFC tag, which produces a 128-bit unpredictable value based on oscillator sampling jitter. After the control status register is written, the encryption engine module sets its ready state bit.

[0053] The third NFC tag sends its tag identifier and a list of supported command sets to the external reading device via load modulation. After the encryption engine module is ready, the third NFC tag's RF interface automatically enters the target device ready state. When the external reading device issues a Type A polling command, the third NFC tag generates a subcarrier using load modulation, encodes the tag identifier according to the return frame format, and transmits it back via the antenna. The tag identifier is a unique 7-byte serial number, programmed and stored in a one-time programmable block of the third NFC tag's non-volatile memory. The first three bytes are the manufacturer identification code assigned by the national coding authority, and the last four bytes are the unique serial number burned into the chip factory.

[0054] The supported command set list is organized using a data structure in type-length-value format. The payload contains three command identifiers: the first corresponds to a data read command, the second to an authentication write command, and the third to a security lock command. Each of the three command identifiers occupies one byte, and the total length of the command set list is 10 bytes. The third NFC tag sends the command set list as response data to the external reading device in the next frame after sending the tag identifier.

[0055] In response to a selection command returned by an external reader, the third NFC tag establishes a logical link connection with the external reader. The selection command is a standard Type A selection command sent by the external reader according to the NFC Forum technical specifications after receiving the tag identifier and command set list. The selection command contains the complete 7-byte tag identifier of the third NFC tag. The radio frequency interface of the third NFC tag receives and parses the selection command, comparing the tag identifier extracted from the selection command with its own stored tag identifier byte by byte. When all 7 bytes match, the radio frequency interface switches the state of the third NFC tag from the target device ready state to the selected state and returns a selection confirmation response to the external reader. The selection confirmation response contains a one-byte capability container byte, which encodes the maximum frame length and frame wait time parameters supported by the third NFC tag.

[0056] After the logical link connection is established, the link layer controller inside the third NFC tag starts the session hold timer for the logical link connection. The session hold timer is a 14-bit decrementing counter, which decrements based on a 62.5 kHz time base obtained by dividing the third NFC tag's 13.56 MHz system clock. The initial value of the session hold timer... The following formula is used for calculation: ; in: The initial count value of the timer is retained for the session, represented as a decimal integer; This represents the maximum link hold delay requested by the external reading device in the capability container byte of the selected instruction, in microseconds, ranging from 302 microseconds to 4949 microseconds, according to the NFC Forum digital protocol; the constant 10 represents a tenfold spread factor for the frame wait time; the constant 64 represents the division factor corresponding to the 62.5 kHz time base, i.e., the value obtained by dividing the 13.56 MHz system clock by 62.5 kHz; 13.56 represents the system clock frequency, in megahertz. This indicates the unit conversion factor, converting megahertz to kilohertz; This represents the floor operation, rounding down to the nearest integer value.

[0057] Session hold timer from The timer begins to decrement. When the count reaches zero, if the third NFC tag has not received any command frame from the external reader, the link layer controller forcibly backseats the third NFC tag's RF interface from the selected state to the sleep state, and waits for the polling command of the next polling cycle. If the third NFC tag successfully receives a valid command frame from the external reader before the session hold timer reaches zero, the link layer controller reloads the initial value of the session hold timer. The session hold timer restarts its decrementing count, and the logical link connection remains open.

[0058] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.

Claims

1. A packaging box information interaction method based on NFC multi-tag linkage, characterized in that, The method includes: In response to the continuous change in the distance between the first NFC tag and the second NFC tag triggered by the opening and closing action of the packaging box lid, a decay time series curve of the coupling field strength between the tags is established. Based on the waveform matching degree between the decay timing curve and the preset reference curve, the opening frequency statistics of the packaging box and the duration value corresponding to each opening are generated. The activation frequency statistics and the duration values ​​are encoded into a dynamic verification factor, and a handshake request carrying the dynamic verification factor is sent to an external reading device through the first NFC tag. After the external reading device sends back a confirmation command based on the dynamic verification factor calculation via the second NFC tag, the information interaction channel of the third NFC tag inside the packaging box is activated.

2. The packaging box information interaction method based on NFC multi-tag linkage according to claim 1, characterized in that, The process of establishing a decay time-series curve of the coupling field strength between the tags in response to the continuous change in distance between the first NFC tag and the second NFC tag triggered by the opening and closing of the packaging box lid includes: A first NFC tag is sealed on the inner wall of the box lid, and a second NFC tag is sealed on the bottom of the box. The coupling field strength value between the first NFC tag and the second NFC tag is continuously collected, and the coupling field strength value is negatively correlated with the distance between the tags; The initial baseline value is the coupling field strength when the packaging box is fully closed. The starting point of the curve is the moment when the coupling field strength decreases during the opening of the packaging box lid. The ending point of the curve is the moment when the coupling field strength decreases to the lowest value when the lid reaches the maximum opening angle. Record the coupling field strength value sequence from the start point to the end point of the curve according to a fixed sampling period, and perform median filtering on the coupling field strength value sequence to obtain the decay time series curve.

3. The packaging box information interaction method based on NFC multi-tag linkage according to claim 2, characterized in that, The sliding window length for the median filtering process is set to three times the number of sampling points corresponding to the fixed sampling period.

4. The packaging box information interaction method based on NFC multi-tag linkage according to claim 2, characterized in that, Based on the waveform matching degree between the attenuation timing curve and the preset reference curve, the statistical values ​​of the opening frequency of the packaging box and the duration value corresponding to each opening are generated, including: Pre-store the standard attenuation curve corresponding to the normal opening and closing action of the packaging box and the interference attenuation curve corresponding to the abnormal vibration of the packaging box; Calculate the first dynamic time warp distance between the decay time series curve and the standard decay curve; Calculate the second dynamic time warping distance between the attenuation timing curve and the interference attenuation curve; When the first dynamic time warp distance is less than the second dynamic time warp distance, the action is determined to be a valid activation action, and the activation action is included in the activation frequency statistics. The duration of the drop phase from the initial baseline value to the lowest value of the coupling field strength is extracted from the decay time series curve as the opening action duration value, and the duration of the rise phase from the lowest value to the initial baseline value of the coupling field strength is extracted as the closing action duration value. The sum of the opening action duration value and the closing action duration value is used as the duration value corresponding to each opening.

5. The packaging box information interaction method based on NFC multi-tag linkage according to claim 4, characterized in that, When the first dynamic time warp distance is greater than or equal to the second dynamic time warp distance, the action is determined to be invalid and the activation frequency statistics are not updated.

6. The packaging box information interaction method based on NFC multi-tag linkage according to claim 4, characterized in that, Encoding the activation frequency statistics and the duration value into a dynamic verification factor, and sending a handshake request carrying the dynamic verification factor to an external reading device via the first NFC tag includes: The activation frequency statistics are converted into a binary frequency sequence, and the duration value is converted into a binary duration sequence. The binary frequency sequence and the binary duration sequence are interleaved and merged bitwise to generate the original merged sequence; Cyclic redundancy check (CRC) calculation is performed on the original merged sequence to obtain a check code segment, which is then appended to the end of the original merged sequence to form the dynamic check factor. The dynamic verification factor is encapsulated in a request message in the NFC data exchange format, and the first NFC tag sends the request message to an external reading device in active communication mode.

7. The packaging box information interaction method based on NFC multi-tag linkage according to claim 6, characterized in that, The CRC-16 algorithm is used to perform cyclic redundancy check calculation on the original merged sequence, and the generated check code segment is two bytes long.

8. A method for information interaction in packaging boxes based on NFC multi-tag linkage according to claim 6, characterized in that, After the external reading device sends back a confirmation command based on the dynamic verification factor calculation via the second NFC tag, activating the information interaction channel of the third NFC tag inside the packaging box includes: After receiving the radio frequency field signal emitted by the external reading device, the second NFC tag enters passive communication mode and listens for the confirmation command sent by the external reading device. Parse the return verification factor from the confirmation instruction, and compare the return verification factor with the locally stored dynamic verification factor bit by bit. When the returned verification factor is completely consistent with the dynamic verification factor, the second NFC tag sends an enable voltage signal to the third NFC tag. Upon receiving the enable voltage signal, the third NFC tag switches from deep sleep mode to working mode and establishes a wireless data link with an external reading device.

9. A method for information interaction in packaging boxes based on NFC multi-tag linkage according to claim 8, characterized in that, The second NFC tag stores the dynamic verification factor in its internal latch register and keeps the output value of the latch register unchanged after receiving a confirmation command until the cover is fully opened again.

10. A method for information interaction in packaging boxes based on NFC multi-tag linkage according to claim 8, characterized in that, Upon receiving the enable voltage signal, the third NFC tag switches from deep sleep mode to working mode and establishes a wireless data link with the external reading device, including: The charge pump circuit integrated inside the third NFC tag starts after receiving the enable voltage signal, and boosts the received radio frequency field energy to the operating voltage threshold. After reaching the operating voltage threshold, the third NFC tag powers on and initializes its internal non-volatile memory controller and encryption engine module. The third NFC tag sends its tag identifier and a list of supported command sets to an external reading device via load modulation. In response to the selection command returned by the external reading device, the third NFC tag establishes a logical link connection with the external reading device and starts the session hold timer for the logical link connection.