Method for preventing goods exchange through electronic tag, electronic tag and goods management system

By integrating temperature sensors, pressure sensors, and security chips into electronic tags, and combining filtering calculations and temperature compensation algorithms, the problem of tampering and misjudgment of electronic tags during cargo sampling inspection is solved, thus ensuring the authenticity of cargo sampling inspection and the security of data transmission.

CN121997967APending Publication Date: 2026-05-08BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING SMARTCHIP MICROELECTRONICS TECHNOLOGY CO LTD
Filing Date
2026-01-07
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, electronic tags are easily tampered with and forged during the random inspection of goods, making it impossible to guarantee the authenticity of the inspected goods. Furthermore, the monitoring data from pressure sensors does not take into account interference factors such as environmental vibration and temperature changes, which may lead to misjudgments.

Method used

The electronic tag integrates temperature sensors, pressure sensors, and a security chip. By using filtering calculations and temperature compensation algorithms to reduce the impact of environmental interference factors, and combining two-way authentication and encryption mechanisms, the accuracy and security of alarm information are ensured.

Benefits of technology

It effectively prevents the unauthorized removal and replacement of electronic tags, ensures the authenticity of goods sampling inspections, reduces the false judgment rate, and improves the security and reliability of data transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121997967A_ABST
    Figure CN121997967A_ABST
Patent Text Reader

Abstract

The invention provides a method for preventing goods exchange through an electronic tag, the electronic tag and a goods management system, and belongs to the technical field of electronic tags. The method comprises the following steps: after the electronic tag is installed on a cargo, acquiring a voltage value output by a pressure sensor and a temperature value output by a temperature sensor; performing filtering calculation on the voltage value output by the pressure sensor to obtain a filtered voltage value; calculating a pressure value corresponding to the filtered voltage value, and performing compensation calculation on the pressure value based on a temperature value output by the temperature sensor to obtain a compensated pressure value; and calculating a difference value between the compensated pressure value and the reference pressure value, and when it is determined that the difference value between the compensated pressure value and the reference pressure value is greater than a pressure alarm threshold value, determining that the behavior of illegally disassembling the electronic tag occurs, and generating alarm information. According to the invention, the influence of interference factors such as environmental vibration and temperature change on monitoring data of the pressure sensor is reduced, misjudgment of dismounting of the electronic tag is avoided, and the accuracy of alarm information is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of electronic tag technology, and more specifically to a method for preventing product swapping using electronic tags, an electronic tag, and a goods management system. Background Technology

[0002] Currently, cargo sampling inspection primarily utilizes handheld terminals, RFID (Radio Frequency Identification) electronic tags, and quality control platforms. In the sealing stage, electronic tags are affixed to the goods, and then a handheld terminal is used to identify the unique identifier, blind sample number, and task information on the electronic tag for binding. In the sample delivery and receipt stages, the handheld terminal is used to identify the electronic tag to obtain the blind sample number and task information. Because cargo sampling inspection involves numerous personnel and stages, this traditional method is prone to tampering and falsification of sample information during the inspection process, or the removal of electronic tags and their affixing to other goods, posing risks such as sample information leakage, sample falsification, and sample replacement, thus failing to guarantee the authenticity of the inspected goods. The above application scenarios place high demands on the security of electronic tag usage, requiring real-time monitoring of the electronic tag status during use to prevent data falsification or unauthorized removal and replacement of electronic tag identifiers, which could lead to significant economic losses.

[0003] In existing technologies, there are two main methods for real-time tamper monitoring of electronic tags: The first method uses an tamper detection mechanism to squeeze the tamper pressure sensor and cut its spring to generate pressure. Changes in this pressure are monitored to determine if the electronic tag has been illegally removed, allowing back-end administrators to promptly detect unauthorized removal or cutting. The second method utilizes sensor technology, using accelerometers and pressure sensors to detect the movement of objects placed in specific locations, thus determining if the electronic tag has been illegally removed or moved. The status of the object is then sent to the management back-end using IoT technology. While these methods can detect unauthorized removal by monitoring changes in pressure sensor values, the pressure sensor data does not consider environmental vibrations, temperature changes, or other interference factors, potentially leading to false alarms (even when the electronic tag has not actually been removed or moved). Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a method for preventing product swapping using electronic tags, as well as an electronic tag and a goods management system.

[0005] The first aspect of this invention provides a method for preventing product swapping using an electronic tag, wherein the electronic tag integrates a temperature sensor, a pressure sensor, and a security chip, and the method includes: After the electronic tag is installed on the goods, the voltage value output by the pressure sensor and the temperature value output by the temperature sensor are collected. The voltage value output by the pressure sensor is filtered and calculated to obtain the filtered voltage value; Calculate the pressure value corresponding to the filtered voltage value; Based on the temperature value output by the temperature sensor, the pressure value corresponding to the filtered voltage value is calculated to obtain the compensated pressure value. The difference between the compensated pressure value and the reference pressure value is calculated. When the difference between the compensated pressure value and the reference pressure value is greater than the preset pressure alarm threshold, it is determined that an illegal removal of the electronic tag has occurred, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor under a stable preload after the electronic tag is installed on the goods. Alarm information is encrypted using a security chip and then sent to the monitoring platform.

[0006] In this embodiment of the invention, the algorithm for filtering and calculating the voltage value output by the pressure sensor is as follows: V_Raw = Filtering_Factor * V_Out + (1 - Filtering_Factor) * V_Raw_Prev; Where V_Raw represents the voltage value after this filtering, Filtering_Factor represents the filtering coefficient, V_Out represents the voltage value output by the pressure sensor, and V_Raw_Prev represents the voltage value after the previous filtering.

[0007] In this embodiment of the invention, temperature compensation calculation is performed on the pressure value corresponding to the filtered voltage value based on the temperature value output by the temperature sensor, including: Based on the temperature value output by the temperature sensor and the temperature compensation coefficient at different temperature points, temperature compensation calculation is performed on the pressure value corresponding to the filtered voltage value to obtain the compensated pressure value.

[0008] In this embodiment of the invention, the expression for temperature compensation calculation is: P_Current=k0+k1*P_Raw+k2*T+k3*P_Raw^2+k4*P_Raw*T+k5*T^2+k6*P_Raw^3+k7*P_Raw^2*T+k8*P_Raw*T^2+k9*T^3; Where P_Current represents the compensated pressure value, P_Raw represents the pressure value corresponding to the filtered voltage value, T is the temperature value output by the temperature sensor, and k0, k1, ..., k9 are the temperature compensation coefficients for different temperature points; P_Raw^2 represents P_Raw to the power of 2, P_Raw^3 represents P_Raw to the power of 3, T^2 represents T to the power of 2, and T^3 represents T to the power of 3.

[0009] In this embodiment of the invention, the temperature compensation coefficient for different temperature points is obtained as follows: Standard pressure is applied to pressure sensors in different temperature environments to obtain the raw output values ​​of the pressure sensors at multiple different temperature points and the raw output values ​​of the temperature sensors at the corresponding temperature points, forming a dataset corresponding to multiple temperature points. Substitute the datasets corresponding to all temperature points into the expression for the temperature compensation calculation to obtain the overdetermined equation set; Using the overdetermined equations, curve fitting is performed using the least squares method to obtain a set of temperature compensation coefficients [k0, k1, ..., k9], which minimizes the sum of squared errors between the calculated pressure and the actual standard pressure at all temperature points.

[0010] In this embodiment of the invention, the method for preventing product replacement via electronic tags further includes: After the electronic tag is installed on the goods, the current battery percentage is collected; The current battery percentage is compared with a preset battery alarm threshold. If the current battery percentage is less than the preset battery alarm threshold, a battery alarm message is generated.

[0011] In this embodiment of the invention, the method for preventing product replacement via electronic tags further includes: The electronic tag initiates a remote network connection request to the monitoring platform for two-way identity authentication; After successful two-way identity authentication, the electronic tag will be linked to the goods.

[0012] In this embodiment of the invention, the electronic tag initiates a remote network connection request to the monitoring platform for two-way identity authentication, including: The electronic tag generates a first random number and sends the first random number to the monitoring platform; After receiving the first random number, the monitoring platform generates a second random number, encrypts the first data block containing the first and second random numbers using a preset key to generate the first ciphertext, and sends the second random number and the first ciphertext to the electronic tag. After receiving the second random number and the first ciphertext, the electronic tag uses a preset key to encrypt the first data block containing the first random number and the second random number to generate the first temporary ciphertext. The received first ciphertext is compared with the first temporary ciphertext. If the first ciphertext and the first temporary ciphertext are consistent, the electronic tag successfully authenticates the monitoring platform. Then, the electronic tag uses the preset key to encrypt the second data block containing the first random number and the second random number to generate the second ciphertext and sends it to the monitoring platform. After receiving the second ciphertext, the monitoring platform uses a preset key to encrypt the second data block containing the first and second random numbers to generate a second temporary ciphertext. The received second ciphertext is then compared with the second temporary ciphertext. If the second ciphertext and the second temporary ciphertext match, the monitoring platform successfully authenticates the electronic tag.

[0013] A second aspect of the present invention provides an electronic tag, the electronic tag comprising: a microprocessor, a temperature sensor, a pressure sensor, a security chip, and a communication unit; The microprocessor is used for: After the electronic tag is installed on the goods, the voltage value output by the pressure sensor and the temperature value output by the temperature sensor are collected. The voltage value output by the pressure sensor is filtered and calculated to obtain the filtered voltage value; Calculate the pressure value corresponding to the filtered voltage value; Based on the temperature value output by the temperature sensor, the pressure value corresponding to the filtered voltage value is calculated to obtain the compensated pressure value. The difference between the compensated pressure value and the reference pressure value is calculated. When the difference between the compensated pressure value and the reference pressure value is greater than the preset pressure alarm threshold, it is determined that an illegal removal of the electronic tag has occurred, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor under a stable preload after the electronic tag is installed on the goods. The security chip is used to encrypt alarm information; The communication unit is used to send encrypted alarm information to the monitoring platform.

[0014] A third aspect of the present invention provides a cargo management system, the cargo management system comprising: the aforementioned electronic tags, operating terminals, and monitoring platforms; The operating terminal is used to scan the electronic tag, obtain the unique identification code of the electronic tag, and bind the electronic tag to the goods; The electronic tag is used to generate encrypted alarm information when it is determined that an unauthorized removal of the electronic tag has occurred, and to send the encrypted alarm information to the monitoring platform; The monitoring platform is used to receive encrypted alarm information sent by the electronic tag, decrypt the received encrypted alarm information to obtain plaintext alarm information, and send alarm confirmation information to the electronic tag. The electronic tag is also used to deactivate the alarm after receiving an alarm confirmation message.

[0015] This invention integrates a temperature sensor, a pressure sensor, and a safety chip into an electronic tag. Based on the temperature value collected by the temperature sensor, it performs temperature compensation and sensitivity calibration on the voltage value collected by the pressure sensor. This reduces the impact of environmental vibration, temperature changes, and other interference factors on the monitoring data (pressure value) of the pressure sensor, avoids misjudging that the electronic tag has been removed, and ensures the accuracy of alarm information.

[0016] Other features and advantages of the technical solution of the present invention will be described in detail in the following detailed embodiments section. Attached Figure Description

[0017] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and are used to explain the invention, but do not constitute an undue limitation of the invention. In the drawings: Figure 1 This is a schematic diagram of the structure of the electronic tag provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of the operating terminal provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the monitoring platform provided in an embodiment of the present invention; Figure 4 This is a flowchart of a method for preventing product replacement using electronic tags, provided in an embodiment of the present invention. Figure 5 This is a flowchart illustrating the binding of electronic tags to goods according to an embodiment of the present invention; Figure 6 This is a flowchart of an embodiment of the present invention for tamper alarm via electronic tags; Figure 7 This is an architecture diagram of the cargo management system provided in an embodiment of the present invention. Detailed Implementation

[0018] To make the technical solutions and advantages of the embodiments of the present invention clearer, the exemplary embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not an exhaustive list of all embodiments. It should be noted that, unless otherwise specified, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0019] In existing technologies, monitoring changes in pressure sensor values ​​can detect unauthorized removal of electronic tags. However, the monitoring data from pressure sensors does not take into account interference factors such as environmental vibration and temperature changes, which may lead to misjudgments (in reality, the electronic tag has not been removed or moved) and trigger alarm messages.

[0020] To overcome the shortcomings of existing technologies, this invention provides a method for preventing goods swapping using electronic tags. The electronic tag integrates a temperature sensor, a pressure sensor, and a security chip. Based on the temperature value collected by the temperature sensor, the voltage value collected by the pressure sensor is temperature-compensated and its sensitivity calibrated. This reduces the impact of environmental vibrations, temperature changes, and other interference factors on the pressure sensor's monitoring data (pressure value), preventing false alarms that the electronic tag has been removed and ensuring the accuracy of alarm information. Simultaneously, the security chip integrated into the electronic tag provides security protection for the collected data and alarm information, preventing the falsification or alteration of sample information or the unauthorized removal of electronic tags to replace goods during sampling inspections, thus ensuring the authenticity of the sampled goods.

[0021] This invention provides a method for preventing product swapping using electronic tags, which involves electronic tags, operating terminals, and monitoring platforms.

[0022] Figure 1 This is a schematic diagram of the structure of the electronic tag provided in an embodiment of the present invention. Figure 1 As shown, this embodiment provides an active tamper-evident electronic tag. The internal electronic components of this active tamper-evident electronic tag include an MCU (microprocessor), a system power supply, an RFID electronic tag module, an NB-IoT communication module, a storage unit, a security chip, a temperature sensor, and a pressure sensor. The MCU uses a 32-bit ultra-low-power processor. The system power supply uses an industrial-grade lithium-ion battery connected to an external 5V / 2A power supply. The RFID electronic tag module uses an active UHF RFID electronic tag with a national cryptographic security algorithm, and the RFID electronic tag body is encapsulated inside the active tamper-evident electronic tag. The storage unit is used to store the operating parameters and historical monitoring data of the active tamper-evident electronic tag, as well as the executed program. The NB-IoT communication module uses a low-power model. The security chip uses a security chip with the SM7 national cryptographic algorithm. The temperature sensor uses a thermistor or a digital sensor. The pressure sensor uses a thin-film pressure sensor / piezoresistive sensor.

[0023] The active tamper-evident tag's shell is made of PET (polyethylene terephthalate). The shell structure includes a main shell and a bottom cover, which are fixed together with screws. The shell structure can be disassembled to replace the battery. A charging port is located on the side of the main shell for charging the battery (lithium-ion battery). A rigid plunger with a spring extends from the bottom cover, its end pressing against the internal pressure sensor. When using the active tamper-evident tag, one side of the bottom cover is attached to the device surface, compressing the rigid plunger and applying a continuous and stable preload to the pressure sensor. If the active tamper-evident tag is forcibly removed, the pressure of the rigid plunger on the pressure sensor will instantly disappear or significantly decrease. Once the pressure signal is detected to be below the threshold or a sudden change occurs (meeting tampering characteristics), the MCU immediately triggers the tamper alarm.

[0024] Figure 2 This is a schematic diagram of the structure of the work terminal provided in an embodiment of the present invention. Figure 2 As shown, this embodiment provides an RFID handheld operating terminal. The hardware modules of this RFID handheld operating terminal include: an MCU unit, an RFID radio frequency module, a wireless communication module, a security chip (integrating national cryptographic algorithms SM3 and SM7), and a camera module. The software functional modules of the RFID handheld operating terminal include: a user login module, a sampling inspection task module, an active tamper-evident tag module, and a sample management module. The user login module is used to verify the identity of the logged-in user; the sampling inspection task module is used to query sampling inspection task information; the active tamper-evident tag module is used to query the active tamper-evident tags currently in use and their usage status; and the sample management module is used to bind active tamper-evident tags to samples and query sample information.

[0025] Figure 3 This is a schematic diagram of the monitoring platform provided in an embodiment of the present invention. Figure 3As shown, the monitoring platform provided in this embodiment includes: a message middleware, a cryptographic device, a database, and system functional modules. The system functional modules include: a sampling task management module, a sample management module, an inventory management module, a configuration management module, an active tamper-evident tag management module, and an encryption / decryption module. The message middleware is used for reliable message transmission between the monitoring platform and the RFID handheld terminal, as well as between the monitoring platform and the active tamper-evident tags, using TLS / SSL protocols to achieve two-way authentication, data encryption, and data integrity protection. The cryptographic device is used for data encryption / decryption and key management. The database is used to store business data and monitoring data. The sampling task management module is responsible for creating sampling tasks and querying sample information for sampling tasks. The active tamper-evident tag management module is used to monitor the usage status of active tamper-evident tags in real time. The sample management module is used to query sample information. The inventory management module is used to record inventory information for samples at each stage of the process. The configuration management module is used to set alarm thresholds and operating parameters for the active tamper-evident tags. The encryption / decryption module connects to the cryptographic device and is used for data encryption and decryption.

[0026] like Figure 4 As shown, the method for preventing product replacement using electronic tags provided in this embodiment of the invention includes the following steps: The first step is to collect the voltage value output by the pressure sensor and the temperature value output by the temperature sensor after the electronic tag is installed on the goods. The second step is to filter and calculate the voltage value output by the pressure sensor to obtain the filtered voltage value. The third step is to calculate the pressure value corresponding to the filtered voltage value based on the mathematical relationship between the voltage value and the pressure value. The fourth step is to perform temperature compensation calculations on the pressure value corresponding to the filtered voltage value based on the temperature value output by the temperature sensor, and obtain the compensated pressure value. The fifth step is to calculate the difference between the compensated pressure value and the reference pressure value. When the difference between the compensated pressure value and the reference pressure value is greater than the preset pressure alarm threshold, it is determined that an illegal removal of the electronic tag has occurred, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor under a stable preload after the electronic tag is installed on the goods. The sixth step is to encrypt the alarm information using a security chip and then send the encrypted alarm information to the monitoring platform.

[0027] In the second step above, the algorithm for filtering the voltage value output by the pressure sensor is as follows: V_Raw =Filtering_Factor * V_Out + (1 - Filtering_Factor) * V_Raw_Prev; where V_Raw represents the voltage value after filtering, Filtering_Factor represents the filtering coefficient, V_Out represents the voltage value output by the pressure sensor, and V_Raw_Prev represents the voltage value after filtering in the previous step.

[0028] In the third step above, the pressure value output by the pressure sensor is obtained through the mathematical relationship between the voltage value (V) and the actual pressure value (P). The accurate pressure value P can be calculated using a two-point sensitivity calibration algorithm: P = (V_Current - V_Initial) / Sensitivity; where V_Current represents the voltage value of the pressure sensor after temperature compensation, V_Initial represents the initial voltage value output by the pressure sensor when it is not under any pressure, and Sensitivity represents the sensitivity calculation scaling factor for periodic calibration of the pressure sensor, which can be obtained experimentally.

[0029] As temperature changes, the zero-point drift of the pressure sensor exhibits a linear change due to temperature variations. In step four above, based on the temperature value output by the temperature sensor and the temperature compensation coefficients at different temperature points, temperature compensation calculations are performed on the pressure value corresponding to the filtered voltage value to obtain the compensated pressure value. The expression for the temperature compensation calculation is: P_Current=k0+k1*P_Raw+k2*T+k3*P_Raw^2+k4*P_Raw*T+k5*T^2+k6*P_Raw^3+k7*P_Raw^2*T+k8*P_Raw*T^2+k9*T^3; Where P_Current represents the compensated pressure value, P_Raw represents the pressure value corresponding to the filtered voltage value, T is the temperature value output by the temperature sensor, and k0, k1, ..., k9 are the temperature compensation coefficients for different temperature points; P_Raw^2 represents P_Raw to the power of 2, P_Raw^3 represents P_Raw to the power of 3, T^2 represents T to the power of 2, and T^3 represents T to the power of 3.

[0030] The temperature compensation coefficients for different temperature points are obtained as follows: Standard pressure is applied to pressure sensors in different temperature environments to obtain the original output values ​​of the pressure sensors at multiple different temperature points and the original output values ​​of the temperature sensors at corresponding temperature points, forming datasets corresponding to multiple temperature points. Substituting all the datasets corresponding to all temperature points into the expression for temperature compensation calculation, an overdetermined set of equations is obtained. Using the overdetermined set of equations, curve fitting is performed using the least squares method to obtain a set of temperature compensation coefficients [k0, k1, ..., k9], which minimizes the sum of squared errors between the calculated pressure and the actual standard pressure at all temperature points.

[0031] In an optional embodiment, the method for preventing product replacement using electronic tags further includes the following steps: after the electronic tag is installed on the product, the current battery percentage B_Capacity is collected, and the current battery percentage B_Capacity is compared with a preset power alarm threshold B_Threshold. If the current battery percentage B_Capacity is less than the preset power alarm threshold B_Threshold, a power alarm message is generated.

[0032] In an optional embodiment, before collecting the current voltage value output by the pressure sensor and the current temperature value output by the temperature sensor, the electronic tag initiates a remote network connection request to the monitoring platform for two-way identity authentication. After successful two-way identity authentication, the electronic tag is bound to the goods.

[0033] The electronic tag initiates a remote network connection request to the monitoring platform for two-way authentication. The specific process is as follows: 1) The electronic tag generates a first random number Rnd1 and sends the first random number Rnd1 to the monitoring platform; 2) After receiving the first random number Rnd1, the monitoring platform generates a second random number Rnd2. It uses a preset key Key and the SM7 algorithm to encrypt the first data block Data_T1 containing the first random number Rnd1 and the second random number Rnd2 to generate the first ciphertext Token1. Then, it sends the second random number Rnd2 and the first ciphertext Token1 together to the electronic tag. 3) After receiving the second random number Rnd2 and the first ciphertext Token1, the electronic tag uses the preset key Key and the SM7 algorithm to encrypt the first data block Data_T1 containing the first random number Rnd1 and the second random number Rnd2, generating the first temporary ciphertext Token_Temp1. The received first ciphertext Token1 is compared with the first temporary ciphertext Token_Temp1. If the first ciphertext Token1 and the first temporary ciphertext Token_Temp1 match, the electronic tag successfully authenticates with the monitoring platform. The second data block Data_T2 containing the first random number Rnd1 and the second random number Rnd2 is then encrypted using the preset key Key and the SM7 algorithm to generate the second ciphertext Token2, which is sent to the monitoring platform. If the first ciphertext Token1 and the first temporary ciphertext Token_Temp1 do not match, authentication fails, and the session terminates. 4) After receiving the second ciphertext Token2, the monitoring platform uses the preset key Key and the SM7 algorithm to encrypt the second data block Data_T2, which contains the first random number Rnd1 and the second random number Rnd2, to generate the second temporary ciphertext Token_Temp2. ​​The received second ciphertext Token2 is compared with the second temporary ciphertext Token_Temp2. ​​If the second ciphertext Token2 and the second temporary ciphertext Token_Temp2 are consistent, the monitoring platform successfully authenticates the electronic tag, and the two-way identity authentication between the electronic tag and the monitoring platform is completed. If the second ciphertext Token2 and the second temporary ciphertext Token_Temp2 are inconsistent, the authentication fails, and the session is terminated.

[0034] After the electronic tag is registered and put online, the unique identification code of the electronic tag is obtained by scanning the electronic tag through the operation terminal, and the electronic tag is bound to the goods.

[0035] In the sixth step above, the security chip of the electronic tag uses the preset SM7 national cryptographic algorithm to encrypt the alarm information and sends the encrypted alarm information to the monitoring platform. The monitoring platform uses the corresponding key to decrypt the encrypted alarm information to obtain the alarm content.

[0036] In a specific example, the steps for preventing returns / exchanges using electronic tags are as follows: (1) Create a sampling task on the monitoring platform. The operator specifies the type and model of the goods to be sampled. The system automatically generates a task number and assigns sampling personnel.

[0037] (2) Active tamper-evident electronic tags are bound to the samples (i.e., the goods being inspected). For example... Figure 5As shown, according to the sampling requirements, samples are selected in the warehouse. Then, the power switch of an active tamper-evident tag is turned on to power it on. After power-on, the active tamper-evident tag automatically initiates a remote network connection request to the monitoring platform. Both parties use a triple mutual security authentication mechanism based on the SM7 national cryptographic algorithm for two-way identity authentication. If authentication is successful, the active tamper-evident tag is registered online on the monitoring platform. After the active tamper-evident tag is online, on-site operators log in to the RFID handheld terminal, scan the active tamper-evident tag to obtain its unique identifier, input the selected sample information, and bind the active tamper-evident tag to the selected sample. Then, a blind sample number is calculated and generated based on the task information, goods information, and the unique identifier of the RFID tag. The entire sampling process is documented using photos taken with the RFID handheld terminal. The RFID handheld terminal uses the SM3 national cryptographic algorithm to generate summary data of the photo, sample information, blind sample number, and operator information. Then, it uses the SM7 national cryptographic algorithm to encrypt the original data and summary data before uploading them to the monitoring platform.

[0038] (3) Real-time monitoring of the status of the active tamper-evident tag. After submitting the sampling information, use peelable double-sided tape to smoothly attach one side of the bottom cover of the active tamper-evident tag to the surface of the goods. After the active tamper-evident tag is installed, it begins to cyclically monitor the battery level, temperature, and pressure. When it detects abnormal monitoring data, it triggers the tamper alarm program to sound an alarm.

[0039] (4) In the process of sending, receiving and returning samples, use RFID handheld operation terminal to scan active tamper-evident electronic tags to inventory the samples and take photos as evidence, promptly discover potential violations, ensure that no abnormalities occur during the circulation of active tamper-evident electronic tags, and ensure the authenticity of the sampled samples.

[0040] (5) After the sample testing is completed, use a hot air gun to remove the active anti-tamper electronic tag affixed to the surface of the goods.

[0041] like Figure 6 As shown, the process for triggering an anti-tamper alarm via electronic tags is as follows: 1) After the network connection is established, obtain the power alarm threshold B_Threshold, temperature alarm threshold Temp_Threshold, and pressure alarm threshold Pressure_Threshold from the monitoring platform.

[0042] 2) Read the initial voltage value V_Initial when the pressure sensor is not under any pressure before the active tamper-evident electronic tag is installed; read the reference voltage value V_Normal when the pressure sensor is subjected to a stable preload after the active tamper-evident electronic tag is installed.

[0043] 3) Periodically read the battery percentage (B_Capacity), the temperature value (T_Current) output by the temperature sensor, and the voltage value (V_Current) output by the pressure sensor.

[0044] 4) Use a low-pass filter (first-order IIR) method to perform software filtering on the pressure sample value of the ADC (analog-to-digital converter) to reduce the influence of noise. Vibration filtering algorithm: V_Raw = Filtering_Factor * V_Out + (1 -Filtering_Factor) * V_Raw_Prev; where V_Raw represents the current filtered voltage value, Filtering_Factor represents the filtering coefficient, V_Out represents the voltage value output by the pressure sensor, and V_Raw_Prev represents the voltage value after the last filtering.

[0045] 5) Calculate the pressure value P_Raw corresponding to the filtered voltage value V_Raw by using the mathematical relationship between the voltage value (V) and the actual pressure value (P).

[0046] 6) Perform real-time temperature compensation on the pressure value P_Raw corresponding to the filtered voltage value to reduce the influence of temperature on the pressure sensor measurement results. A third-order polynomial temperature compensation algorithm can be used to calculate the compensated pressure value; its calculation expression is as follows: P_Current=k0+k1*P_Raw+k2*T+k3*P_Raw^2+k4*P_Raw*T+k5*T^2+k6*P_Raw^3+k7*P_Raw^2*T+k8*P_Raw*T^2+k9*T^3; Where P_Current is the compensated pressure value, P_Raw is the pressure value corresponding to the filtered voltage value, T is the temperature value output by the temperature sensor, and k0, k1, ..., k9 are temperature compensation coefficients; The compensation coefficients k0, k1, ..., k9 can be determined through periodic experimental calibration. The calibration process is as follows: Place the pressure sensor in a temperature chamber and set a series of temperature points T_i. At each temperature point T_i, apply a series of known and precise standard pressures P_j to the pressure sensor. Record the original output value P_out_ij of the pressure sensor and the original output value T_temp_ij of the temperature sensor for each (T_i, P_j) combination, and obtain a dataset (T_temp_ij, P_out_ij, P_j). Substitute the data sets (T_temp_ij, P_out_ij, P_j) corresponding to all temperature points into the expression of the third-order polynomial temperature compensation algorithm, and an equation can be obtained for each data point. When there are far more data points than the number of coefficients, that is, the number of equations > the number of unknowns (k0~k9), an overdetermined system of equations is formed. Use the overdetermined system of equations to perform curve fitting by the least squares method to obtain a set of coefficients [k0, k1,..., k9] such that the sum of the squares of the errors between the calculated pressure P_comp of all temperature points and the actual standard pressure P_j is minimized.

[0047] 7) Compare the current battery power percentage B_Capacity, temperature value T_Current, and pressure value P_Current with the preset power alarm threshold B_Threshold, temperature alarm threshold Temp_Threshold, and pressure alarm threshold Pressure_Threshold respectively. If B_Capacity < B_Threshold, trigger the power alarm program. If T_Current > Temp_Threshold or P_Current - P_Normal > Pressure_Threshold, collect sensor data again after a short time interval (such as 500 ms), judge and record the judgment result; if it exceeds the normal range continuously for multiple times (such as 4 times), it is judged that an illegal disassembly behavior has occurred, and the alarm program is triggered.

[0048] 8) If an alarm is triggered, the alarm program records the time and status information of the alarm occurrence in the storage unit. After encrypting with the security chip, the alarm program sends the alarm information to the remote monitoring platform through the NB-IoT communication module. The alarm record can only be deleted after receiving the alarm解除 instruction issued by the monitoring platform.

[0049] It should be noted that there is an unclear expression "报警解除指令" in the original text. I translated it as "alarm解除 instruction" according to the context. You may need to check and correct it according to the actual situation.This invention also provides an electronic tag, which includes a microprocessor, a temperature sensor, a pressure sensor, a security chip, and a communication unit. The microprocessor is used to collect the voltage value output by the pressure sensor and the temperature value output by the temperature sensor after the electronic tag is installed on the goods; to filter the voltage value output by the pressure sensor to obtain a filtered voltage value; to calculate the pressure value corresponding to the filtered voltage value; to perform temperature compensation calculation on the pressure value corresponding to the filtered voltage value based on the temperature value output by the temperature sensor to obtain a compensated pressure value; and to calculate the difference between the compensated pressure value and a reference pressure value. When the difference between the compensated pressure value and the reference pressure value is determined to be greater than a preset pressure alarm threshold, an illegal removal of the electronic tag is determined, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor under a stable preload after the electronic tag is installed on the goods. The security chip is used to encrypt the alarm message. The communication unit is used to send the encrypted alarm message to a monitoring platform.

[0050] In a specific embodiment, such as Figure 1 As shown, the electronic tag includes an MCU (microprocessor), system power supply, RFID electronic tag module, NB-IoT communication module, storage unit, security chip, temperature sensor, and pressure sensor. The MCU uses a 32-bit ultra-low power processor. The system power supply uses an industrial-grade lithium-ion battery. The RFID electronic tag module uses an active UHF RFID electronic tag with a national cryptographic security algorithm, and the RFID electronic tag body is encapsulated inside an active tamper-evident electronic tag. The storage unit is used to store the operating parameters and historical monitoring data of the active tamper-evident electronic tag, as well as the executed program. The NB-IoT communication module uses a low-power model. The security chip uses a security chip with the SM7 national cryptographic algorithm. The temperature sensor uses a thermistor or a digital sensor. The pressure sensor uses a thin-film pressure sensor / piezoresistive sensor.

[0051] The microprocessor calculates the temperature compensation based on the temperature value output by the temperature sensor and the temperature compensation coefficient for different temperature points, thereby obtaining the compensated pressure value. The expression for the temperature compensation calculation is as follows: P_Current=k0+k1*P_Raw+k2*T+k3*P_Raw^2+k4*P_Raw*T+k5*T^2+k6*P_Raw^3+k7*P_Raw^2*T+k8*P_Raw*T^2+k9*T^3; Where P_Current represents the compensated pressure value, P_Raw represents the pressure value corresponding to the filtered voltage value, T is the temperature value output by the temperature sensor, and k0, k1, ..., k9 are the temperature compensation coefficients for different temperature points; P_Raw^2 represents P_Raw to the power of 2, P_Raw^3 represents P_Raw to the power of 3, T^2 represents T to the power of 2, and T^3 represents T to the power of 3.

[0052] The temperature compensation coefficients for different temperature points are obtained as follows: Standard pressure is applied to pressure sensors in environments at different temperature points. The original output values ​​of the pressure sensors and temperature sensors are obtained for each temperature point and standard pressure combination, forming a dataset. The datasets corresponding to all temperature points are substituted into the expression for temperature compensation calculation to obtain an overdetermined set of equations. Using the overdetermined set of equations, curve fitting is performed using the least squares method to obtain a set of temperature compensation coefficients [k0, k1, ..., k9], which minimizes the sum of squared errors between the calculated pressure and the actual standard pressure at all temperature points.

[0053] Before collecting the current voltage value output by the pressure sensor and the current temperature value output by the temperature sensor, the electronic tag initiates a remote network connection request to the monitoring platform for two-way authentication. After successful two-way authentication, the electronic tag is bound to the goods.

[0054] The electronic tag initiates a remote network connection request to the monitoring platform for two-way authentication. The specific process is as follows: The electronic tag generates a first random number and sends the first random number to the monitoring platform; After receiving the first random number, the monitoring platform generates a second random number, encrypts the first data block containing the first and second random numbers using a preset key to generate the first ciphertext, and sends the second random number and the first ciphertext to the electronic tag. After receiving the second random number and the first ciphertext, the electronic tag uses a preset key to encrypt the first data block containing the first random number and the second random number to generate the first temporary ciphertext. The received first ciphertext is compared with the first temporary ciphertext. If the first ciphertext and the first temporary ciphertext are consistent, the electronic tag successfully authenticates the monitoring platform. Then, the electronic tag uses the preset key to encrypt the second data block containing the first random number and the second random number to generate the second ciphertext and sends it to the monitoring platform. After receiving the second ciphertext, the monitoring platform uses a preset key to encrypt the second data block containing the first and second random numbers to generate a second temporary ciphertext. The received second ciphertext is then compared with the second temporary ciphertext. If the second ciphertext and the second temporary ciphertext match, the monitoring platform successfully authenticates the electronic tag.

[0055] The specific details of the electronic tags in the embodiments of the present invention can be understood by referring to the specific technical content of the electronic tags in the method for preventing product replacement by electronic tags provided in the above embodiments, and will not be repeated here.

[0056] This invention also provides a cargo management system, which includes: the electronic tag, the operating terminal, and the monitoring platform provided in the above embodiments. The operating terminal is used to scan the electronic tag, obtain its unique identifier, and bind the electronic tag to the cargo. The electronic tag generates encrypted alarm information when unauthorized removal of the electronic tag is detected, and sends the encrypted alarm information to the monitoring platform. The monitoring platform receives the encrypted alarm information sent by the electronic tag, decrypts the received encrypted alarm information to obtain plaintext alarm information, and sends alarm confirmation information to the electronic tag. After receiving the alarm confirmation information, the electronic tag deactivates the alarm and deletes the alarm occurrence time and status information recorded in the storage unit.

[0057] In specific embodiments, such as Figure 7 As shown, the cargo management system includes: active tamper-evident electronic tags, RFID handheld terminals, and a monitoring platform. Data transmission between the active tamper-evident electronic tags, the monitoring platform, and the RFID handheld terminals is securely protected to ensure the identity security of both communicating parties, prevent information leakage, and guarantee data integrity.

[0058] This invention also provides a computer device, including: a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the above-described method for preventing product replacement via electronic tags.

[0059] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The solutions in the embodiments of the present invention can be implemented using various computer languages, such as the object-oriented programming language Java and the interpreted scripting language JavaScript.

[0060] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams.Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0061] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0062] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0063] The optional embodiments of the present invention have been described in detail above with reference to the accompanying drawings. However, the embodiments of the present invention are not limited to the specific details in the above embodiments. Within the scope of the technical concept of the embodiments of the present invention, various simple modifications can be made to the technical solutions of the embodiments of the present invention, and these simple modifications all fall within the protection scope of the embodiments of the present invention. Furthermore, it should be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. As long as such combination does not violate the spirit of the embodiments of the present invention, it should also be considered as the content disclosed in the embodiments of the present invention.

Claims

1. A method for preventing product exchanges using electronic tags, characterized in that, The electronic tag integrates a temperature sensor, a pressure sensor, and a security chip. The method includes: After the electronic tag is installed on the goods, the voltage value output by the pressure sensor and the temperature value output by the temperature sensor are collected. The voltage value output by the pressure sensor is filtered and calculated to obtain the filtered voltage value; Calculate the pressure value corresponding to the filtered voltage value; Based on the temperature value output by the temperature sensor, the pressure value corresponding to the filtered voltage value is calculated to obtain the compensated pressure value. The difference between the compensated pressure value and the reference pressure value is calculated. When the difference between the compensated pressure value and the reference pressure value is greater than the preset pressure alarm threshold, it is determined that an illegal removal of the electronic tag has occurred, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor after the electronic tag is installed on the goods and a stable preload is applied. Alarm information is encrypted using a security chip and then sent to the monitoring platform.

2. The method for preventing product exchange via electronic tags according to claim 1, characterized in that, The algorithm for filtering and calculating the voltage value output by the pressure sensor is as follows: V_Raw = Filtering_Factor * V_Out + (1 - Filtering_Factor) * V_Raw_Prev; Where V_Raw represents the voltage value after this filtering, Filtering_Factor represents the filtering coefficient, V_Out represents the voltage value output by the pressure sensor, and V_Raw_Prev represents the voltage value after the previous filtering.

3. The method for preventing product exchange via electronic tags according to claim 1, characterized in that, The temperature compensation calculation based on the pressure value corresponding to the filtered voltage value, derived from the temperature value output by the temperature sensor, includes: Based on the temperature value output by the temperature sensor and the temperature compensation coefficient at different temperature points, temperature compensation calculation is performed on the pressure value corresponding to the filtered voltage value to obtain the compensated pressure value.

4. The method for preventing product exchange via electronic tags according to claim 3, characterized in that, The expression for temperature compensation calculation is: P_Current=k0+k1*P_Raw+k2*T+k3*P_Raw^2+k4*P_Raw*T+k5*T^2+k6*P_Raw^3+k7*P_Raw^2*T+k8*P_Raw*T^2+k9*T^3; Where P_Current represents the compensated pressure value, P_Raw represents the pressure value corresponding to the filtered voltage value, T is the temperature value output by the temperature sensor, and k0, k1, ..., k9 are the temperature compensation coefficients for different temperature points; P_Raw^2 represents P_Raw to the power of 2, P_Raw^3 represents P_Raw to the power of 3, T^2 represents T to the power of 2, and T^3 represents T to the power of 3.

5. The method for preventing product exchange via electronic tags according to claim 4, characterized in that, The temperature compensation coefficients at different temperature points are obtained as follows: Standard pressure is applied to pressure sensors in different temperature environments to obtain the raw output values ​​of the pressure sensors at multiple different temperature points and the raw output values ​​of the temperature sensors at the corresponding temperature points, forming a dataset corresponding to multiple temperature points. Substitute the datasets corresponding to all temperature points into the expression for the temperature compensation calculation to obtain the overdetermined equation set; Using the overdetermined equations, curve fitting is performed using the least squares method to obtain a set of temperature compensation coefficients [k0, k1, ..., k9], which minimizes the sum of squared errors between the calculated pressure and the actual standard pressure at all temperature points.

6. The method for preventing product exchange via electronic tags according to claim 1, characterized in that, The method further includes: After the electronic tag is installed on the goods, the current battery percentage is collected; The current battery percentage is compared with a preset battery alarm threshold. If the current battery percentage is less than the preset battery alarm threshold, a battery alarm message is generated.

7. The method for preventing product exchange via electronic tags according to claim 1, characterized in that, The method further includes: The electronic tag initiates a remote network connection request to the monitoring platform for two-way identity authentication; After successful two-way identity authentication, the electronic tag will be linked to the goods.

8. The method for preventing product exchange via electronic tags according to claim 7, characterized in that, The electronic tag initiates a remote network connection request to the monitoring platform for two-way identity authentication, including: The electronic tag generates a first random number and sends the first random number to the monitoring platform; After receiving the first random number, the monitoring platform generates a second random number, encrypts the first data block containing the first and second random numbers using a preset key to generate the first ciphertext, and sends the second random number and the first ciphertext to the electronic tag. After receiving the second random number and the first ciphertext, the electronic tag uses a preset key to encrypt the first data block containing the first and second random numbers to generate the first temporary ciphertext. The received first ciphertext is compared with the first temporary ciphertext. If the first ciphertext and the first temporary ciphertext are consistent, the electronic tag successfully authenticates the monitoring platform. Then, the electronic tag uses the preset key to encrypt the second data block containing the first and second random numbers to generate the second ciphertext and sends it to the monitoring platform. After receiving the second ciphertext, the monitoring platform uses a preset key to encrypt the second data block containing the first and second random numbers to generate a second temporary ciphertext. The received second ciphertext is then compared with the second temporary ciphertext. If the second ciphertext and the second temporary ciphertext match, the monitoring platform successfully authenticates the electronic tag.

9. An electronic tag, characterized in that, The electronic tag includes: a microprocessor, a temperature sensor, a pressure sensor, a security chip, and a communication unit; The microprocessor is used for: After the electronic tag is installed on the goods, the voltage value output by the pressure sensor and the temperature value output by the temperature sensor are collected. The voltage value output by the pressure sensor is filtered and calculated to obtain the filtered voltage value; Calculate the pressure value corresponding to the filtered voltage value; Based on the temperature value output by the temperature sensor, the pressure value corresponding to the filtered voltage value is calculated to obtain the compensated pressure value. The difference between the compensated pressure value and the reference pressure value is calculated. When the difference between the compensated pressure value and the reference pressure value is greater than the preset pressure alarm threshold, it is determined that an illegal removal of the electronic tag has occurred, and an alarm message is generated. The reference pressure value is the pressure value corresponding to the reference voltage value, which is the voltage value output by the pressure sensor after the electronic tag is installed on the goods and a stable preload is applied. The security chip is used to encrypt alarm information; The communication unit is used to send encrypted alarm information to the monitoring platform.

10. A cargo management system, characterized in that, The cargo management system includes: the electronic tag, the operating terminal, and the monitoring platform as described in claim 9; The operating terminal is used to scan the electronic tag to obtain the unique identification code of the electronic tag and bind the electronic tag to the goods; The electronic tag is used to generate encrypted alarm information when it is determined that an unauthorized removal of the electronic tag has occurred, and to send the encrypted alarm information to the monitoring platform; The monitoring platform is used to receive encrypted alarm information sent by the electronic tag, decrypt the received encrypted alarm information to obtain plaintext alarm information, and send alarm confirmation information to the electronic tag. The electronic tag is also used to deactivate the alarm after receiving an alarm confirmation message.