A tea product transaction right and interest certificate circulation management method and system based on an NFC tag

By reading the unique identification information of the NFC tag on the terminal device side, sending a dynamic challenge request and receiving a one-time token, and establishing a secure communication channel using the DNSSEC protocol and OTP mechanism, the problems of online and offline status asynchrony and communication channel insecurity are solved, thereby realizing the synchronization of NFC tag status and improving the security of credential transfer.

CN123181129APending Publication Date: 2026-11-27SHENZHEN TONGXIN DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611381040.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-07
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing electronic rights certificate circulation management schemes, the online status is not synchronized with the offline status, which poses a technical risk of repeated use or misuse of certificates. Furthermore, the communication channel between terminal devices and servers is susceptible to man-in-the-middle attacks and DNS hijacking.

Method used

By reading the unique identification information of the NFC tag through the NFC module configured on the terminal device side, sending a dynamic challenge request and receiving a one-time dynamic token, obtaining the server's public key using the DNSSEC protocol to establish a secure communication channel, updating the physical state of the NFC tag, and introducing an OTP anti-replay mechanism and a state marking mechanism, the system ensures online and offline state synchronization and the reliability of the communication channel.

Benefits of technology

It achieves synchronization between the NFC tag status and the online status, prevents communication hijacking and replay attacks, improves the security and reliability of credential transfer, ensures that each transfer operation leaves an immutable state trace at the physical storage level of the NFC tag, supports fragmented and merged management of credentials, identifies cloned tags, and achieves secure transfer in an offline environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123181129A_ABST
    Figure CN123181129A_ABST
Patent Text Reader

Abstract

The application discloses a tea product transaction right and interest certificate circulation management method and system based on an NFC label, relates to the field of near field communication and information security technology, and aims at solving the problems of the asynchronous online state and offline state and / or the limited security of the certificate circulation process in the existing electronic right and interest certificate circulation management scheme. The method is executed by a terminal device and comprises the following steps: reading unique identification information in an NFC label bound with a tea product right and interest certificate; sending a dynamic challenge request and receiving a generated one-time dynamic token; initiating a recursive DNS query according to the unique identification information, obtaining a server public key in a DANE resource record, and establishing a secure communication channel based on the server public key; sending a circulation request carrying an operation type through the secure communication channel; receiving a write card instruction returned by the server after verifying that the token is valid and legal, and writing a state mark corresponding to the operation type into the NFC label according to the write card instruction, so as to update the physical state of the NFC label, and further improve the security and credibility of the certificate circulation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of near-field communication and information security technology, specifically relating to a method and system for managing the circulation of tea transaction rights certificates based on NFC tags. Background Technology

[0002] With the digital transformation of the tea trading market, electronic rights certificates (such as tea tickets) using NFC (Near Field Communication) tags as physical carriers are gradually being applied in the tea circulation field. These electronic rights certificates bind the unique identification information of the NFC tag to specific tea trading rights (such as the right to take delivery, the right to transfer, and the right to consign). Users can read the certificate information and perform corresponding circulation operations by bringing an NFC-enabled terminal device (such as a smartphone) close to the NFC tag.

[0003] In actual tea trading scenarios, the circulation of vouchers is a core business process. Common circulation operations include: transfer (i.e., the voucher holder gifts the voucher to another person), consignment (i.e., the voucher holder entrusts the platform to sell the voucher on their behalf), and pickup (i.e., the voucher holder picks up the corresponding physical tea product with the voucher). Taking the transfer operation as an example, after the voucher holder initiates the transfer, the server will update the ownership of the voucher in the database, transferring the voucher from the original holder's name to the recipient's name.

[0004] However, existing electronic rights certificate transfer management schemes have the following technical problems: after the transfer operation is confirmed on the server side and the database status is updated, the NFC tag bound to the certificate still retains the original data before the transfer. In other words, the online digital status on the server side has changed, but the offline physical status on the NFC tag side has not been updated synchronously. This asynchrony between online and offline status means that transferred or consigned certificates can still be used by the original holder to perform secondary operations by sensing the NFC tag, posing a technical risk of certificate reuse or misuse.

[0005] Furthermore, in the communication link between the terminal device and the server, existing solutions typically use traditional SSL (Secure Sockets Layer) or TLS (Transport Layer Security) encrypted channels. However, the certificate system on which this channel relies is potentially vulnerable to man-in-the-middle attacks or DNS (Domain Name System Hijacking), which could cause the terminal device to connect to a fake server, thereby leaking sensitive data such as the unique identification information of the NFC tag, further exacerbating the security risks in the credential transfer process.

[0006] Therefore, there is an urgent need for a technical solution that can synchronously update the physical status of NFC tags in real time after the voucher transfer operation is completed, and can ensure the reliability of the communication channel between the terminal device and the server, so as to solve the above-mentioned problems in the existing technology. Summary of the Invention

[0007] The purpose of this invention is to provide a method, system, terminal equipment, computer-readable storage medium, and computer program product for managing the circulation of tea transaction rights certificates based on NFC tags, in order to solve the problems of asynchronous online and offline status and / or limited security in the certificate circulation process in existing electronic rights certificate circulation management schemes.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for managing the circulation of tea transaction rights certificates based on NFC tags is provided, executed by a terminal device and including: In response to a user-initiated transfer operation of the target tea product transaction rights certificate, the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate is read through the near field communication (NFC) module configured on the terminal device side; The NFC module sends a dynamic challenge request to the NFC tag and receives a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor. The one-time dynamic token is automatically invalidated after a single use. Based on the unique identification information of the NFC tag, a corresponding DNS query domain name is generated, and a recursive DNS query based on the DNSSEC protocol is initiated to obtain the DANE resource record containing the server's public key information corresponding to the domain name. Then, the validity of the digital signature of the DANE resource record is verified using the DNSSEC chain trust anchor, and after the verification is successful, a secure communication channel is established with the server using the public key in the DANE resource record. A transfer request is sent to the server through the secure communication channel, wherein the transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation; The server receives a write instruction returned by the secure communication channel, wherein the write instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type. According to the write instruction, the near field communication (NFC) module writes a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag to update the physical state of the NFC tag.

[0009] Based on the above-mentioned invention, a new scheme for managing the circulation of tea transaction rights certificates is provided to achieve online and offline status synchronization and ensure the reliability of the communication channel between the terminal device and the server. This scheme is executed by the terminal device and includes: reading the unique identification information stored in the NFC tag bound to the target tea transaction rights certificate; sending a dynamic challenge request to the NFC tag via the NFC module and receiving a one-time dynamic token generated based on a one-time password algorithm; initiating a recursive DNS query based on the DNSSEC protocol according to the unique identification information, obtaining the server public key in the DANE resource record verified by the DNSSEC chain trust anchor, and establishing a secure communication channel accordingly; and sending a request to the server via the secure communication channel. The server sends a transfer request carrying the unique identifier information, the one-time dynamic token, and the operation type; it receives a write instruction returned by the server after verifying that the token is valid and has not been used, and that the transfer operation is legal; according to the write instruction, it writes a status flag corresponding to the operation type to the NFC tag to update the physical state of the NFC tag. In this way, by introducing DNSSEC trusted resolution, OTP anti-replay mechanism, and online and offline state atomic linkage, the technical problem of the physical tag state not being synchronized with the online state after the tea product rights certificate is transferred is solved. At the same time, it effectively prevents communication hijacking and replay attacks, improves the security and reliability of certificate transfer, and facilitates practical application and promotion.

[0010] In one possible design, the operation type is a transfer operation, consignment operation, pickup operation, or rebinding operation, and the status flag is a transfer invalidation flag corresponding to the transfer operation, an invalidation flag corresponding to the consignment operation, a pickup and verification flag corresponding to the pickup operation, or an unbinding flag corresponding to the rebinding operation.

[0011] In one possible design, when the operation type is a tag swapping operation, after updating the physical state of the NFC tag, the method further includes: The NFC module reads the unique identification information and status marker of another NFC tag. When the status flag of the other NFC tag indicates that no credentials are bound, another DNS query domain name is generated based on the unique identification information of the other NFC tag, and a recursive DNS query based on the DNSSEC protocol is initiated to obtain another DANE resource record corresponding to the other DNS query domain name. Then, the validity of the digital signature of the other DANE resource record is verified using the DNSSEC chain trust anchor, and after the verification is successful, another secure communication channel is established with the server using the public key in the other DANE resource record. The NFC module sends another dynamic challenge request to the other NFC tag and receives another one-time dynamic token generated by the other NFC tag based on the built-in one-time password algorithm and the current time factor. The other one-time dynamic token is also automatically invalidated after a single use. A binding request is sent to the server through the other secure communication channel, wherein the binding request carries the unique identification information of the target tea product transaction rights certificate, the unique identification information of the other NFC tag, and the other one-time dynamic token; The server receives a binding card writing instruction returned by the server through the other secure communication channel. The binding card writing instruction is automatically generated by the server after verifying that the other one-time dynamic token is valid and has not been used, confirming that the target tea transaction rights certificate is in an unbound state based on the unique identification information of the target tea transaction rights certificate, and confirming that the other NFC tag meets the binding conditions based on the unique identification information of the other NFC tag. According to the binding write instruction, the binding status mark and the information of the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag.

[0012] In one possible design, when the rebinding operation is specifically a one-to-many split rebinding operation, the binding request also carries a splitting scheme from the user, wherein the splitting scheme is used to instruct the target tea product transaction rights certificate to be split into multiple fragmented rights certificates, and to make each of the multiple fragmented rights certificates correspond to a partial ownership of the target tea product transaction rights certificate, and to make the sum of the ownership of the multiple fragmented rights certificates equal to the ownership of the target tea product transaction rights certificate; The binding card writing instruction is generated by the server after confirming that the splitting scheme conforms to the preset fragmentation rules, and includes unique identification information and ownership ratio information assigned to any fragmented rights certificate that is currently in an unbound state among the multiple fragmented rights certificates; The binding write instruction is used to write the binding status flag and the target tea product transaction rights certificate information to a designated storage area of ​​the other NFC tag, including: According to the binding write instruction, a binding status marker and unique identification information and ownership ratio information of any fragmented rights certificate representing the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag, so as to convert the other NFC tag into a physical carrier bound to the fragmented rights certificate.

[0013] In one possible design, when the rebinding operation is specifically a many-to-one merged rebinding operation, the binding request also carries a merging scheme from the user, wherein the merging scheme is used to indicate that at least two target tea product trading rights certificates are merged into a new tea product trading rights certificate, and that the total ownership of the at least two target tea product trading rights certificates corresponding to the new tea product trading rights certificate is... The binding card writing instruction is generated by the server after confirming that the merging scheme conforms to the preset merging rules, and includes unique identification information and ownership information assigned to the new tea product transaction rights certificate that is currently in an unbound state; The binding write instruction is used to write the binding status marker and the target tea product transaction rights certificate information to a designated storage area of ​​the other NFC tag, including: According to the binding write instruction, a binding status flag and unique identification information and ownership information of the new tea transaction rights certificate, which represent information of the at least two target tea transaction rights certificates, are written to the designated storage area of ​​the other NFC tag, so as to convert the other NFC tag into a physical carrier bound to the new tea transaction rights certificate.

[0014] In one possible design, the method further includes: When reading the unique identification information of the NFC tag, the original radio frequency signal feature data generated when the NFC tag is read is also collected, wherein the original radio frequency signal feature data includes at least one of signal amplitude, phase and frequency; Before sending a transfer request to the server, the original radio frequency signal feature data and the unique identification information are sent to the server through the secure communication channel. This allows the server to input the original radio frequency signal feature data into the physical layer anomaly scoring model corresponding to the unique identification information. If the physical layer anomaly score output by the model exceeds a preset scoring threshold, the server terminates the transfer operation and triggers a security alarm. The physical layer anomaly scoring model is an autoencoder trained using normal radio frequency signal feature data as training samples. The physical layer anomaly score is the reconstruction error calculated by the autoencoder from the original radio frequency signal feature data.

[0015] In one possible design, sending a transfer request to the server via the secure communication channel includes: first, using a homomorphic encryption public key negotiated with the server to homomorphically encrypt the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation to generate an encrypted transfer request; and then sending the encrypted transfer request to the server via the secure communication channel. Receiving the write instruction returned by the server through the secure communication channel includes: first receiving the encrypted write instruction returned by the server through the secure communication channel, and then decrypting it using the homomorphic encryption private key corresponding to the homomorphic encryption public key to obtain the write instruction. The encrypted write instruction is automatically generated by the server after verifying the validity and unused nature of the one-time dynamic token within the homomorphic encryption domain and verifying the legitimacy of the transfer operation based on the unique identifier information of the NFC tag and the operation type. During the process of verifying the legitimacy of the transfer operation within the homomorphic encryption domain, the server does not obtain the unique identifier information of the NFC tag and the plaintext data of the operation type, and the correctness of the verification result of the transfer operation's legitimacy is publicly verified through non-interactive zero-knowledge proof.

[0016] In one possible design, verifying the legitimacy of the transfer operation based on the unique identification information of the NFC tag includes: Based on the unique identification information of the NFC tag, the unique identification information of the target tea product transaction rights certificate bound to the unique identification information is obtained on the server side; The pre-stored digital signature information of the issuer is queried based on the unique identifier information of the target tea product transaction rights certificate. The digital signature information of the issuer is generated by the issuer signing the unique identifier information of the target tea product transaction rights certificate with the issuer's private key when the target tea product transaction rights certificate is first issued, and is stored in the server in association with the unique identifier information. The issuer's digital signature information is verified using the issuer's public key corresponding to the issuer's private key; If the verification fails, the write command will not be generated, and a source anomaly alarm will be returned to the terminal device through the secure communication channel.

[0017] In one possible design, when the terminal device is offline and the operation type is a transfer operation or a consignment operation, the method further includes: An offline transfer request is generated within the Trusted Execution Environment (TEE) on the terminal device side. The offline transfer request includes the unique identification information of the NFC tag, the one-time dynamic token, the operation type of the transfer operation, and an offline transaction signature generated by signing the unique identification information and the operation type based on the device private key stored in the TEE. The offline transfer request is transmitted to the receiving terminal via the near field communication (NFC) module in a point-to-point communication manner. The receiving terminal refers to another terminal device that acts as the recipient of the target tea product transaction rights certificate in the transfer operation or the consignment operation. The NFC module receives a receipt confirmation credential returned by the receiving terminal, wherein the receipt confirmation credential includes a receiving signature and a signature timestamp generated by signing the offline transfer request based on the receiving private key stored in the TEE on the receiving terminal side. After the terminal device restores its network connection, it uploads the offline transfer request and the receipt confirmation certificate to the server through the secure communication channel. This allows the server to verify the validity of the offline transaction signature and the recipient's signature, as well as to verify that the duration from the time indicated by the signature timestamp to the current time does not exceed a preset offline transaction validity period. After all verifications are successful, the server completes the final confirmation of the transfer operation and the delayed execution of the card writing instruction. The card writing instruction is used to trigger the physical state update of the NFC tag.

[0018] Secondly, an NFC tag-based tea transaction rights certificate circulation management system is provided, which is suitable for deployment in terminal devices and includes a circulation operation response unit, a dynamic token acquisition unit, a secure channel establishment unit, an external communication transceiver unit, and a card writing instruction execution unit. The circulation operation response unit is used to respond to the circulation operation initiated by the user for the target tea product transaction rights certificate, and reads the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate through the near field communication (NFC) module configured on the terminal device side. The dynamic token acquisition unit is communicatively connected to the flow operation response unit, and is used to send a dynamic challenge request to the NFC tag through the near field communication (NFC) module, and receive a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor, wherein the one-time dynamic token is automatically invalidated after a single use; The secure channel establishment unit is communicatively connected to the transfer operation response unit. It is used to generate a corresponding DNS query domain name based on the unique identification information of the NFC tag, and initiate a recursive DNS query based on the DNSSEC protocol to obtain the DANE resource record containing server public key information corresponding to the domain name. Then, it uses the DNSSEC chain trust anchor to verify the validity of the digital signature of the DANE resource record, and after the verification is successful, it uses the public key in the DANE resource record to establish a secure communication channel with the server. The external communication transceiver unit is communicatively connected to the transfer operation response unit, the dynamic token acquisition unit, and the secure channel establishment unit, respectively, and is used to send a transfer request to the server through the secure communication channel. The transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation. The external communication transceiver unit is also used to receive a write card instruction returned by the server through the secure communication channel, wherein the write card instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type; The write instruction execution unit is communicatively connected to the external communication transceiver unit and is used to write a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag through the near field communication (NFC) module according to the write instruction, so as to update the physical state of the NFC tag.

[0019] Thirdly, the present invention provides a terminal device comprising a storage module, a processing module, and a transceiver module connected in sequence for communication, wherein the storage module is used to store a computer program, the transceiver module is used to send and receive messages, and the processing module is used to read the computer program and execute the tea transaction rights certificate circulation management method as described in the first aspect or any possible design in the first aspect.

[0020] Fourthly, the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, perform the tea transaction rights certificate circulation management method as described in the first aspect or any possible design in the first aspect.

[0021] Fifthly, the present invention provides a computer program product, including a computer program or instructions, wherein when the computer program or instructions are executed by a computer, they implement the tea transaction rights certificate circulation management method as described in the first aspect or any possible design in the first aspect.

[0022] The beneficial effects of the above scheme are: (1) This invention creatively provides a new scheme for the management of tea transaction rights certificates, which realizes online and offline status synchronization and ensures the reliability of the communication channel between the terminal device and the server. The scheme is executed by the terminal device and includes: reading the unique identification information stored in the NFC tag bound to the target tea transaction rights certificate; sending a dynamic challenge request to the NFC tag via the NFC module and receiving a one-time dynamic token generated based on a one-time password algorithm; initiating a recursive DNS query based on the DNSSEC protocol according to the unique identification information, obtaining the server public key in the DANE resource record verified by the DNSSEC chain trust anchor, and establishing a secure communication channel accordingly; and using the secure... The communication channel sends a transfer request carrying the unique identification information, the one-time dynamic token, and the operation type to the server; it receives a write instruction returned by the server after verifying that the token is valid and has not been used and that the transfer operation is legal; according to the write instruction, it writes a status flag corresponding to the operation type to the NFC tag to update the physical state of the NFC tag. In this way, by introducing DNSSEC trusted resolution, OTP anti-replay mechanism, and online and offline state atomic linkage, the technical problem of the physical tag state being out of sync with the online state after the tea product rights certificate is transferred is solved, and communication hijacking and replay attacks are effectively prevented, thus improving the security and reliability of certificate transfer. (2) By organically integrating DNSSEC / DANE trusted resolution, OTP dynamic token anti-replay verification and NFC tag status marking writing mechanism, a full-link security closed loop of "challenge-response → trusted resolution → secure communication → online verification → offline card writing" is constructed. This not only solves the technical problem of asynchronous separation between online database status and offline NFC tag physical status after the transfer of tea transaction rights certificates, but also effectively prevents the security risk of communication link hijacking or replay attack, and realizes the atomic linkage of online and offline status. (3) By defining four mutually exclusive operation types, namely, transfer, consignment, pickup and rebinding, and mapping them to four status markers, namely, the transferred invalidation marker, the cancelled marker, the pickup and verification marker and the unbinding marker, the precise correspondence between different transfer operation types and the physical status of NFC tags is realized, ensuring that each transfer operation leaves an immutable status trace at the physical storage level of the NFC tag. (4) By introducing a replacement binding mechanism, the DNSSEC secure channel establishment and OTP dynamic token verification process are reused in the process of unbinding the old label and binding the new label. The server generates a binding card writing instruction after strictly confirming that the credential has been unbound and the new label meets the binding conditions, thus realizing the secure replacement of the physical carrier of the credential. (5) By integrating the ownership splitting scheme with the rebinding security framework, a single credential can be split into multiple fragmented rights credentials and bound to independent NFC tags respectively. At the same time, it supports merging multiple credentials into a new credential, realizing flexible adjustment of credential granularity and meeting the needs of fragmented credential distribution and aggregated management. (6) By synchronously collecting the original radio frequency signal feature data during the NFC tag reading stage and inputting the normalized feature vector into the autoencoder model bound to the tag's unique identification information, the reconstruction error is used as the physical layer anomaly score for real-time verification, thus realizing the accurate identification of the NFC tag's hardware fingerprint. This effectively identifies cloned tags whose digital data is copied but whose physical features are inconsistent, thus making up for the security blind spot of relying solely on digital signatures for anti-counterfeiting at the physical layer. (7) By introducing homomorphic encryption technology, the server can complete the legality verification of the transfer operation within the homomorphic encryption domain without obtaining the plaintext of sensitive data. At the same time, the correctness of the verification result is publicly verifiable by combining non-interactive zero-knowledge proof. Under the premise of ensuring the security of the transfer, the user's privacy data is made "usable but not visible" to the server. (8) By introducing the issuer's digital signature verification mechanism, the verification of the credibility of the certificate source is embedded in the legality verification process of the circulation operation, ensuring from a cryptographic perspective that the source of the certificate is traceable and the issuer is non-repudiable, providing a credible basis for the audit and traceability of the entire life cycle of the certificate; (9) By organically combining TEE hardware-level signature technology, NFC point-to-point communication mode and timestamp verification mechanism, the secure transfer and consignment operation under the condition of no network connection is realized. After the network is connected, the server verifies the validity of the offline transaction signature and the recipient's signature and the timeliness of the offline transaction, and delays the execution of the card writing instruction, ensuring the final consistency of the online and offline status, filling the gap in secure transfer under weak network or offline environment, and facilitating practical application and promotion. Attached Figure Description

[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 This is a flowchart illustrating the method for managing the circulation of tea transaction rights certificates based on NFC tags, as provided in this application embodiment.

[0025] Figure 2 This is a schematic diagram of the structure of the tea transaction rights certificate circulation management system based on NFC tags provided in the embodiments of this application.

[0026] Figure 3 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation

[0027] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other embodiments can be obtained based on these embodiments without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.

[0028] It should be understood that although the terms "first" and "second", etc., may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another. For example, the first object may be referred to as the second object, and similarly, the second object may be referred to as the first object, without departing from the scope of the exemplary embodiments of the invention.

[0029] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, or A and B exist simultaneously. Another example is A, B and / or C, which can mean that any one of A, B, and C or any combination thereof exists. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone or A and B exist simultaneously. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.

[0030] Example

[0031] like Figure 1As shown, the tea transaction rights certificate circulation management method based on NFC tags provided in the first aspect of this embodiment can be executed, but is not limited to, by a terminal device with certain computing resources and supporting near-field communication (NFC) functionality, such as a smartphone, tablet, smartwatch, or personal digital assistant. In this embodiment, the terminal device runs an application (APP) for implementing each step of this method. For example, in a tea ticket platform scenario, a user can complete the circulation management operation of tea transaction rights certificates by installing the APP on a smartphone. The terminal device, through its built-in Near Field Communication (NFC) module, can wirelessly communicate with the NFC tag, which also supports the NFC protocol, within a short distance (usually a few centimeters), thereby reading data stored in the NFC tag or writing data to a designated storage area of ​​the NFC tag. The NFC tag can be, for example, an NFC chip tag conforming to the ISO 14443 standard, which has a built-in memory for storing unique identification information and status markers, and a built-in one-time password algorithm logic for generating one-time dynamic tokens. The terminal device also has the ability to communicate with a mobile data network or wireless local area network connected to the Internet to establish a communication connection with a remote server for data interaction. The server (e.g., a back-end business server deployed in the cloud) manages the business logic of issuing, circulating, and changing the status of tea transaction rights certificates. It maintains a database to store the binding relationships of each NFC tag, the status information of each tea transaction rights certificate, and the digital signature information of the issuer. It should be noted that, in this embodiment, to fully implement all steps of the method (especially the lower-level operations involving NFC tag data writing and DNSSEC recursive DNS queries), it is preferably executed by a native application running on the terminal device's operating system to ensure functional integrity and compatibility. Figure 1 As shown, the method for managing the transfer of tea transaction rights certificates includes, but is not limited to, the following steps S1 to S6.

[0032] S1. In response to a user-initiated transfer operation of the target tea product transaction rights certificate, the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate is read through the near-field communication (NFC) module configured on the terminal device side.

[0033] In step S1, specifically, the transfer operation can be triggered by the user through an application running on the terminal device. Specifically, the application can provide operation entry points corresponding to various transfer operation types; for example, when the user needs to transfer a bound tea transaction rights certificate to another person, they can click the "Transfer to Friend" button on the "My Gifts" or tea ticket details page; when they need to entrust the platform to sell it on their behalf, they can click the "Apply for Consignment" button; when they need to pick up the physical tea, they can click the "Pick Up" button; when they need to change the physical carrier bound to the certificate, they can click the "Change Binding" button; and so on. In response to the user triggering any operation entry point, the terminal device can activate its built-in Near Field Communication (NFC) module, enter the NFC tag sensing ready state, and guide the user through a user interface (e.g., a screen pop-up or text prompt) to bring the NFC tag bound to the target tea transaction rights certificate close to the NFC sensing area of ​​the terminal device. When the Near Field Communication (NFC) module is working, it can emit radio frequency signals of a specific frequency. When the NFC tag enters the coverage area of ​​the radio frequency signal (usually a few centimeters), the antenna coil inside the NFC tag obtains energy through electromagnetic induction, thereby activating the chip circuit inside the tag. After activation, the NFC module establishes a communication connection with the NFC tag according to the NFC communication protocol (e.g., ISO 14443 protocol) and reads the unique identification information stored in the designated storage area of ​​the NFC tag.

[0034] In step S1, it should be noted that the unique identification information is written when the NFC tag is manufactured or initialized, and is used to uniquely identify the NFC tag in the server's database. For example, the unique identification information can be the NFC tag's UID (Unique Identifier) ​​or chip serial number. The server maintains a binding relationship table between the unique identification information of NFC tags and tea transaction rights certificates. By querying this binding relationship table, the server can determine the target tea transaction rights certificate bound to the NFC tag and its current status. Furthermore, for Apple mobile phones, their NFC reading function only supports full NFC data read and write capabilities in iOS 18.1 and above. Therefore, when implementing this method, it is preferable to use a terminal device running a compatible operating system to ensure the compatibility and success rate of the NFC tag reading operation in step S1.

[0035] S2. Send a dynamic challenge request to the NFC tag through the near-field communication (NFC) module, and receive a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor, wherein the one-time dynamic token is automatically invalidated after a single use.

[0036] In step S2, to address the shortcomings of existing technologies where the unique identification information of NFC tags is static data and easily copied or replayed, this embodiment introduces a one-time dynamic password verification based on a challenge-response mechanism during the transfer operation. Specifically, after successfully reading the unique identification information of the NFC tag, the terminal device sends a dynamic challenge request to the NFC tag through the near-field communication (NFC) module; this dynamic challenge request triggers the NFC tag to initiate its built-in OTP (One-Time Password) generation process. The NFC tag integrates a security chip, which is pre-loaded with an OTP algorithm (e.g., a HOTP algorithm based on HMAC-SHA1 or HMAC-SHA256, or a TOTP algorithm based on time synchronization) and a seed key shared with the server. When the NFC tag receives the dynamic challenge request, the security chip invokes the OTP algorithm to perform cryptographic operations based on the seed key and the current time factor, generating a one-time dynamic token valid for a preset time period (e.g., 30 or 60 seconds). The current time factor can be, for example, the current UTC (Coordinated Universal Time) timestamp, or a counter value maintained internally by the security chip. The NFC tag then returns this one-time dynamic token to the terminal device via NFC communication.

[0037] In step S2, it should be noted that the one-time dynamic token has the characteristic of automatically becoming invalid after a single use. Specifically, when the server verifies the token subsequently, it will mark it as used, or determine whether it is still valid based on the time window information in the token. Once the token is successfully verified or its valid time window expires, the token is automatically invalidated and cannot be verified again. This mechanism can effectively prevent attackers from replaying the transfer operation after intercepting NFC communication data—even if an attacker obtains a one-time dynamic token transmitted in a certain communication, the token will be unable to pass the server's verification again because it has been used or expired. The dynamic challenge request and the generation and transmission process of the one-time dynamic token are all completed in the local NFC channel between the terminal device and the NFC tag, without relying on a network connection. This means that the pre-step of the OTP verification can be completed smoothly even when the terminal device is offline, providing a technical basis for possible subsequent offline transfer operations. Furthermore, if the NFC tag fails to generate the one-time dynamic token due to chip failure or key mismatch, the NFC module will receive an error response or timeout. In this case, the terminal device can prompt the user "Chip verification failed, please try again or contact customer service" through the user interface and terminate the current transfer operation to avoid continuing to execute subsequent steps under insecure conditions.

[0038] S3. Generate a corresponding DNS query domain name based on the unique identification information of the NFC tag, and initiate a recursive DNS query based on the DNSSEC protocol to obtain the DANE resource record containing the server's public key information corresponding to the domain name. Then, use the DNSSEC chain trust anchor to verify the validity of the digital signature of the DANE resource record, and after successful verification, use the public key in the DANE resource record to establish a secure communication channel with the server.

[0039] In step S3, to address the potential risks of man-in-the-middle attacks or DNS hijacking in the certificate system upon which the communication channel between the terminal device and the server relies in the existing technology, this embodiment introduces a trusted resolution mechanism based on the DNSSEC (Domain Name System Security Extensions) and DANE (DNS-Based Authentication of Named Entities) protocols to establish an end-to-end secure communication channel, replacing the traditional SSL / TLS channel that relies solely on a third-party certificate authority. Specifically, after obtaining the unique identification information of the NFC tag, the terminal device generates the corresponding DNS query domain name according to the unique identification information and preset domain name generation rules. For example, the terminal device can calculate a hash value from the unique identification information (e.g., the UID of an NFC tag) using a hash algorithm (e.g., SHA-256), extract the first few characters of the hash value, and concatenate it with a preset platform domain name suffix (e.g., ".chapiao.com" or ".nfcverify.com") to generate a DNS query domain name with a uniform format (e.g., "a3f7b2c1.chapiao.com"). The aforementioned domain name generation rules can be pre-configured in the application and are consistent with the domain name deployment scheme on the server side.

[0040] In step S3, the terminal device subsequently initiates a recursive DNS query based on the DNSSEC protocol. The DNSSEC protocol, by attaching a digital signature to the DNS response message, ensures the integrity and authenticity of the DNS query results—that is, the returned DNS record has not been tampered with during transmission and indeed originates from an authoritative DNS server with the corresponding domain name management authority. The specific process of the recursive DNS query is as follows: the terminal device initiates a query request to the local DNS recursive resolver, which then queries upstream through the root DNS server, top-level domain DNS server, and authoritative DNS server until the final DNS response is obtained. When DNSSEC is enabled, each level of DNS server signs the response data using its private key. The terminal device can use a pre-configured DNSSEC chain of trust anchors (usually the public key of the root zone) to verify the validity of each level of signature, thereby constructing a complete trust chain from the root zone to the queried domain name. Through the aforementioned DNSSEC recursive query, the terminal device obtains the DANE resource record corresponding to the DNS queried domain name. The DANE resource record is a TLSA (Transport Layer Security Authentication) type resource record in the DNS system, containing server public key information (or the hash value of the public key) bound to a specific domain name and service port. Unlike the traditional CA (Certificate Authority) certificate system, the server public key information in the DANE resource record is directly published by the domain owner (i.e., the operator of the tea trading rights certificate circulation platform) through its DNS service provider, and the record itself is protected by a DNSSEC signature. Therefore, as long as the DNSSEC chain of trust anchors is trustworthy, the terminal device can be certain that the public key in the obtained DANE resource record truly belongs to a legitimate server, without relying on the credit endorsement of any third-party CA.

[0041] In step S3, after obtaining the DANE resource record, the terminal device verifies the validity of the digital signature of the DANE resource record using the DNSSEC chain trust anchor. If the signature verification passes, it indicates that the DANE resource record has not been tampered with during transmission and indeed originates from the authoritative DNS server of the domain name. At this point, the terminal device extracts the server's public key from the verified DANE resource record and uses this public key to establish a secure communication channel with the server. This secure communication channel can be, for example, an encrypted channel based on the TLS 1.3 protocol or a higher version, where server-side authentication no longer uses traditional CA certificates but directly uses the public key in the DANE resource record for verification. Thus, an end-to-end secure communication channel based on the DNSSEC trust system is established between the terminal device and the server, independent of a third-party CA. It should be noted that both DNSSEC and the DANE protocol are public standard protocols released by the Internet Engineering Task Force (IETF) (corresponding to RFC 4033-4035 and RFC 6698, respectively), and are widely supported by mainstream operating systems and DNS service providers. This step utilizes the aforementioned mature standard protocols to construct a trusted communication path from the terminal device to the server, effectively avoiding the risks of man-in-the-middle attacks and DNS hijacking faced by traditional CA certificate systems, and thus providing basic security for credential transfer operations at the communication link level.

[0042] In step S3, if the digital signature of the DANE resource record is found to be invalid during the DNSSEC verification process, or if the DNS query does not return a valid DANE resource record, it indicates that the current DNS resolution path may have been hijacked or the server's identity cannot be reliably verified. At this time, the terminal device can terminate subsequent transfer request sending steps and prompt the user through the user interface with "Unable to establish a secure connection, please try again later," to prevent sensitive data (such as the unique identification information of the NFC tag and the one-time dynamic token) from being stolen in an insecure communication environment.

[0043] S4. Send a transfer request to the server through the secure communication channel, wherein the transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation.

[0044] In step S4, specifically, the terminal device assembles the three key pieces of information obtained in the previous steps—the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation selected by the user—into a transfer request data packet, and sends it to the server through the secure communication channel established in step S3. Specifically, the operation type can be, but is not limited to, a gifting operation, a consignment operation, a pickup operation, or a rebinding operation; the aforementioned operation types correspond one-to-one with the following core operation functions: the gifting operation corresponds to the "instant gift" and "gift to a friend" functions, i.e., the certificate holder gifts the tea transaction rights certificate to another person; the consignment operation corresponds to the "apply for consignment" function, i.e., the certificate holder entrusts the platform to sell the tea on their behalf using either express consignment or ordinary consignment methods; the pickup operation corresponds to the "pickup" function of tea core identification, i.e., the certificate holder picks up the corresponding physical tea product with the certificate; the rebinding operation is the user's operation of changing the physical carrier of the NFC tag bound to the certificate, applicable to scenarios where the original NFC tag is physically damaged or the user wants to upgrade the physical carrier (such as upgrading from a regular card to a ceramic card). It should be noted that each transfer operation corresponds to only one operation type, and the four operation types are mutually exclusive. After receiving the transfer request, the server will execute the subsequent verification logic and status flag writing decision corresponding to the operation type carried in the request.

[0045] In step S4, to further enhance data privacy protection during transmission and prevent server internal maintenance personnel or malicious programs from obtaining sensitive plaintext data in the transfer request, a preferred embodiment of this invention introduces a homomorphic encryption mechanism in step S4. The homomorphic encryption mechanism is a special cryptographic primitive that allows direct computation on encrypted data, and the decrypted result is equivalent to performing the same computation on the plaintext data. Preferably, sending the transfer request to the server through the secure communication channel includes, but is not limited to: first, using a homomorphic encryption public key negotiated with the server to homomorphically encrypt the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation to generate an encrypted transfer request, and then sending the encrypted transfer request to the server through the secure communication channel. The homomorphic encryption public key is the public key portion of a public-private key pair generated by the server based on a homomorphic encryption algorithm (such as Paillier homomorphic encryption algorithm, BGV homomorphic encryption algorithm, or CKKS homomorphic encryption algorithm). This public key is pre-distributed to the terminal device and securely stored by the server through the secure communication channel or other secure means when the application on the terminal device is first registered or initialized. This homomorphic encryption public key is a different key pair from the public key obtained through the DANE resource record in step S3 for establishing the secure communication channel—the former is used for data content encryption at the application layer, achieving privacy protection where "the server can see the ciphertext but not the plaintext"; the latter is used for channel encryption at the transport layer, achieving link protection against eavesdropping and tampering. These two key systems are independent of each other and together constitute the two-layer security protection architecture of this embodiment. Furthermore, since the sensitive data (unique tag identification information, dynamic token, and operation type) in the encrypted transfer request (which is the transfer request) already exists in the form of homomorphic ciphertext, even if the secure communication channel is breached in extreme cases (e.g., the server-side TLS terminal is decrypted), the attacker will still be unable to recover the original plaintext data from the homomorphic ciphertext, thus providing a second layer of privacy protection for the user's credentials and operational behavior.

[0046] In step S4, this embodiment preferably employs the Paillier homomorphic encryption algorithm. The server generates a Paillier public-private key pair, where the public key is (n, g) and the private key is (λ, μ), with a preferred key length of 2048 bits. The terminal device uses the Paillier public key to encrypt the unique identification information of the NFC tag, the one-time dynamic token, and the operation type, respectively, generating corresponding ciphertext data to form the encrypted transfer request.

[0047] Following step S4, upon receiving the encrypted transfer request, the server does not decrypt it. Instead, it directly performs verification operations on the ciphertext within the homomorphic encryption domain—including verifying whether the one-time dynamic token is valid and unused, and verifying the legitimacy of the transfer operation based on the unique identifier of the NFC tag and the operation type. The mathematical properties of homomorphic encryption ensure that the verification result for the ciphertext is consistent with the verification result for the plaintext. Throughout the verification process within the homomorphic encryption domain, the server does not perform decryption, thus preventing the acquisition of the unique identifier of the NFC tag and the plaintext data of the operation type, thereby technically eliminating the risk of server-side data leakage. Furthermore, the server generates a publicly verifiable proof of the verification result using Non-Interactive Zero-Knowledge Proof (NIZK). Any third party, upon obtaining this proof, can independently verify the correctness of the transfer operation's legitimacy verification process without needing to know the original privacy data. The generation and verification algorithms for zero-knowledge proofs can employ mature solutions from existing technologies, such as zk-SNARK or zk-STARK, which will not be elaborated upon here. Furthermore, if the homomorphic encryption public key is not pre-configured in the terminal device, or if the homomorphic encryption module fails to function properly due to algorithm compatibility issues, the terminal device can revert to an unencrypted plaintext transmission mode (i.e., directly sending a transfer request containing plaintext sensitive information). In this case, data protection relies solely on the secure communication channel established in step S3. Although this downgraded mode reduces the strength of privacy protection, it ensures the compatibility and availability of this method on various terminal devices.

[0048] S5. Receive the card writing instruction returned by the server through the secure communication channel, wherein the card writing instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type.

[0049] In step S5, specifically, after sending the transfer request to the server in step S4, the terminal device waits for and receives the processing result returned by the server. Upon receiving the transfer request, the server performs a series of verification steps to confirm the legality and security of the transfer operation. Only after all verifications pass does the server automatically generate the card writing instruction and return it to the terminal device through the secure communication channel; if any verification step fails, the server refuses to generate the card writing instruction and returns a corresponding error message or alarm to the terminal device. Specifically, the verification work performed by the server includes the following levels.

[0050] (1) Verify the validity of the one-time dynamic token: The server maintains a key copy corresponding to the seed key of each NFC tag and a token usage status record; The server uses the seed key shared with the NFC tag and the same OTP algorithm to calculate a reference token value locally based on the current time window (or counter value), and compares the reference token value with the one-time dynamic token carried in the transfer request; If the two are consistent, it is confirmed that the token was generated by a legitimate NFC tag; At the same time, the server queries the token usage status record to confirm that the token has not been used before; If the token is invalid or has been used, the server rejects this transfer operation and returns a token verification failure prompt to the terminal device; Conversely, if the verification is successful, the server marks the token as used, so that it is automatically invalidated after a single use, thereby effectively preventing replay attacks.

[0051] (2) Verify the legality of the transfer operation based on the unique identification information of the NFC tag and the operation type: This verification step further includes verification of the credibility of the credential source and verification of the matching between the operation type and the credential status.

[0052] (2.1) Regarding the verification of the source of the credential, preferably, the legality of the transfer operation is verified based on the unique identification information of the NFC tag, including but not limited to the following steps S501 to S504.

[0053] S501. Based on the unique identification information of the NFC tag, obtain the unique identification information of the target tea product transaction rights certificate bound to the unique identification information on the server side.

[0054] In step S501, as described in the preceding steps, the server maintains a binding relationship table between NFC tags and tea transaction rights certificates, which can be used to complete the mapping query from physical tag identifier to business certificate identifier.

[0055] S502. Query the pre-stored issuer digital signature information based on the unique identifier information of the target tea product transaction rights certificate, wherein the issuer digital signature information is generated by the issuer signing the unique identifier information of the target tea product transaction rights certificate with the issuer's private key when the target tea product transaction rights certificate is first issued, and is stored in association with the unique identifier information on the server.

[0056] In step S502, the issuer's private key is, for example, but not limited to, an RSA-2048 or ECDSA private key. Furthermore, ECDSA (Elliptic Curve Digital Signature Algorithm) is preferred. The issuer's private key is generated based on the secp256r1 elliptic curve, and the issuer's public key is the public key corresponding to the private key on the curve. The detailed digital signature process is as follows: the issuer uses its private key to perform an ECDSA signature on the unique identifier information of the target tea product transaction rights certificate, generating a signature value (r,s), and stores this signature value along with the unique identifier information on the server.

[0057] S503. Verify the issuer's digital signature information using the issuer's public key corresponding to the issuer's private key.

[0058] In step S503, the process involves cryptographically verifying that the digital signature information of the issuer was indeed generated by the entity holding the legitimate issuer's private key, and that the signature object (the unique identifier of the target tea product transaction rights certificate) has not been tampered with after signing. If the signature verification passes, it indicates that the target tea product transaction rights certificate indeed originates from a legitimate issuer certified by the platform, and its source is reliable and not forged. If the signature verification fails, it indicates that the source of the certificate is questionable—it may be an illegally forged certificate, or the unique identifier of the certificate may have been maliciously tampered with after issuance. Specifically, the server uses the issuer's public key to perform ECDSA verification on the signature value (r,s), that is, to confirm through elliptic curve operations that the signature value was indeed generated by the entity holding the corresponding private key, and that the signature object has not been tampered with.

[0059] S504. If the verification fails, the card writing instruction is refused to be generated, and a source abnormality alarm is returned to the terminal device through the secure communication channel.

[0060] In step S504, by returning a source anomaly alarm to the terminal device, the user can be alerted that the target tea product transaction rights certificate may have security risks.

[0061] (2.2) Regarding the matching verification of the operation type and the certificate status (i.e., verifying whether the current status of the target tea product transaction rights certificate allows the execution of the transfer operation, which is the server's special verification logic for the operation type), the operation type is used as a key judgment parameter in this step. The server maintains a certificate state machine to record the current status of each tea transaction rights certificate (e.g., "transferable", "consigned", "picked up", and / or "unbound"). When the operation type is a transfer operation, the server confirms that the target tea transaction rights certificate is currently in a transferable state (i.e., the certificate is not frozen, not reported lost, and has not been picked up). When the operation type is a consignment operation, the server confirms that the certificate is in a consignmentable state (i.e., the certificate has not been picked up and is not in other consignment processes), and verifies whether the certificate is still within the consignment validity period according to business rules such as "tea tickets can be consigned within 12 months from the date of purchase, and must be picked up after 12 months". When the operation type is a pick-up operation, the server confirms that the certificate is in a pick-upable state and has not exceeded the pick-up validity period. When the operation type is a rebinding operation, the server confirms that the NFC tag currently bound to the certificate has not been marked as lost or invalid, and the certificate itself is in a state where rebinding is allowed. If the operation type does not match the current state of the credential, the server refuses to generate the write instruction and returns an operation not allowed message to the terminal device through the secure communication channel.

[0062] (3) In addition to the above verification, additional security checks can be performed in conjunction with the platform operation strategy, such as checking whether the user's account is in a normal state, whether the operation triggers risk control rules (such as the same voucher being consigned multiple times in a short period of time), etc., which will not be elaborated here.

[0063] The aforementioned multi-layered verification—dynamic token verification, credential source verification (including issuer signature verification), and operation type and credential status matching verification—constitutes the prerequisites for the server to generate the card writing instruction. After all verifications pass, the server first executes an online status update operation corresponding to the operation type in its database. For example, if the operation type is a transfer operation, the server updates the ownership of the target tea product transaction rights certificate from the original holder to the recipient; if the operation type is a consignment operation, the server marks the certificate as "consigned" and associates it with consignment order information; if the operation type is a pickup operation, the server marks the certificate as "picked up" and records the pickup time; if the operation type is a rebinding operation, the server unbinds the certificate from the original NFC tag and marks the certificate as an intermediate state of "pending rebinding." These online status update operations ensure that the server's database records are consistent with the results of this transfer operation, providing an accurate data foundation for subsequent credential status queries, transfer record tracing, and auditing. It should be noted that in existing technologies, the aforementioned online status update operation falls within the scope of conventional database transaction processing. However, this embodiment organically combines it with the subsequent NFC tag physical status writing operation. The server automatically generates the write command only after completing the online status update, enabling atomic linkage between changes in the online digital status and changes in the offline physical status: that is, the online status update and the generation of the offline write command are completed within the same transactional process, ensuring consistency between online and offline status. After completing the aforementioned online status update, the server automatically generates the write command; the write command contains the specific data content to be written to the designated storage area of ​​the NFC tag, such as the encoded value of the status marker corresponding to the operation type, the address of the storage area to be written, and optional data integrity verification codes (such as CRC check codes). After successfully receiving (and decrypting, if applicable) the write command, the terminal device proceeds to the subsequent step S6 to execute the NFC tag physical status update operation.

[0064] In step S5, the server performs verification operations on the ciphertext within the Paillier homomorphic encryption domain. For example, it compares the token values ​​for consistency using the homomorphic addition property of Paillier encryption, and verifies the matching of operation types using homomorphic addition and scalar multiplication. After verification, it generates an encrypted write card instruction. The terminal device decrypts the ciphertext using the Paillier private key corresponding to the homomorphic encryption public key.

[0065] In a preferred embodiment of this example, if homomorphic encryption is used to send the transfer request in step S4, then receiving the write instruction returned by the server in step S5 includes a homomorphic encryption return processing step. Specifically, receiving the write instruction returned by the server through the secure communication channel includes, but is not limited to: first receiving the encrypted write instruction returned by the server through the secure communication channel, and then decrypting it using the homomorphic encryption private key corresponding to the homomorphic encryption public key to obtain the write instruction. The encrypted write instruction is automatically generated by the server after verifying the validity and unused nature of the one-time dynamic token within the homomorphic encryption domain and verifying the legitimacy of the transfer operation based on the unique identifier information of the NFC tag and the operation type. During the process of verifying the legitimacy of the transfer operation within the homomorphic encryption domain, the server does not obtain the unique identifier information of the NFC tag and the plaintext data of the operation type, and the correctness of the verification result of the transfer operation's legitimacy is publicly verified through non-interactive zero-knowledge proof. The encrypted card writing instruction is automatically generated by the server after completing all the above verifications within the homomorphic encryption domain. Due to the mathematical properties of homomorphic encryption, when verifying the encrypted transfer request, the server directly performs calculations on the homomorphic ciphertext without decrypting it. Therefore, the server does not obtain the unique identification information of the NFC tag or the plaintext data of the operation type during the entire verification process, thus achieving privacy protection for user operation behavior at the technical level. After receiving the encrypted card writing instruction, the terminal device uses the homomorphic encryption private key corresponding to the homomorphic encryption public key to decrypt the encrypted card writing instruction, thereby obtaining the card writing instruction in plaintext form. If decryption fails, the terminal device can prompt the user "card writing instruction decryption failed" and terminate the current transfer operation. In addition, it should be noted that the aforementioned preferred implementation method of homomorphic encryption and the implementation method of issuer signature verification can be implemented separately or in combination. When the two are implemented in combination, the server completes all verification operations, including issuer signature verification, within the homomorphic encryption domain, achieving both cryptographic assurance of the credibility of the credential source and privacy protection for user operation behavior, thus constituting the most complete security protection system of this embodiment.

[0066] S6. Based on the write instruction, the near field communication (NFC) module writes a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag to update the physical state of the NFC tag.

[0067] In step S6, specifically, after successfully receiving (and decrypting to obtain when homomorphic encryption is applicable) the write instruction, the terminal device, through its built-in Near Field Communication (NFC) module, writes the status marker carried in the write instruction into the designated storage area of ​​the NFC tag, thereby completing the update of the NFC tag's physical state. This step is a key execution link in this embodiment for achieving "atomic linkage of online and offline states"—the server has already completed the online state update in its database in step S5, while this step synchronizes the state change to the physical storage level of the NFC tag, so that any subsequent read operation on the NFC tag can directly obtain its latest circulation status from the tag itself without relying on a network connection to query the server.

[0068] In step S6, specifically, the terminal device parses the write command to extract the address of the storage area to be written, the encoded value of the status marker, and an optional data integrity check code. The terminal device sends a write command to the NFC tag via the Near Field Communication (NFC) module according to the NFC communication protocol (e.g., ISO 14443 or ISO 15693). The write command specifies the address of the target storage area (e.g., a specific page or block address in the NFC tag's EEPROM memory) and the encoded value of the status marker to be written. After the NFC tag receives and successfully executes the write command, the original data in its specified storage area is overwritten by the status marker. To facilitate subsequent identification and verification, the status marker can adopt a preset encoding format, such as using binary values ​​of a specific length to represent different circulation states: for example, "0x00" indicates unbound or normal state, "0x01" indicates transferred and invalidated, "0x02" indicates invalidated, "0x03" indicates delivered and verified, and "0x04" indicates unbound. After completing the writing operation, the NFC tag can return a confirmation response to the terminal device to confirm that the writing was successful; upon receiving the confirmation response, the terminal device confirms that the NFC tag physical state update operation has been successfully completed.

[0069] In step S6, depending on the operation type of the transfer operation, the status markers are specifically: a transferred-out-of-transfer marker corresponding to the transfer operation, a cancelled marker corresponding to the consignment operation, a picked-up-and-verified marker corresponding to the pickup operation, or an unbound marker corresponding to the re-binding operation. The following explains the technical meaning and physical status update effect of each status marker in conjunction with actual business scenarios: (A) Transferred Invalidation Mark: When the operation type is a transfer operation, the terminal device writes the mark to the NFC tag; the mark indicates that the tea transaction rights certificate corresponding to the NFC tag has been transferred by the original holder to the recipient, and the original NFC tag has become invalid at the physical level; thereafter, when any user uses the terminal device to sense the NFC tag, the terminal device will read the mark and identify that the tag has become invalid due to the transfer, forming a technical closed-loop constraint with business restriction rules such as "tea tickets that have been picked up cannot be transferred" - after the transfer, the original tag becomes invalid, and the original holder cannot use the original tag to initiate a circulation operation again, thereby eliminating the risk of "one ticket being transferred multiple times" at the physical level; at the same time, the recipient will obtain a new NFC tag or electronic certificate, and the ownership of the certificate is transferred at both the legal and physical levels; (B) Invalidated Mark: When the operation type is consignment operation, the terminal device writes the mark to the NFC tag; the mark indicates that the tea transaction rights certificate corresponding to the NFC tag has been consigned by the holder to the platform for consignment (including express consignment or ordinary consignment), and the original physical NFC tag has been invalidated at the physical level; this mechanism is completely consistent with the "physical card marked as invalid" described in functions such as "express consignment"; before the consignment transaction is completed, the tag cannot be used for other operations such as picking up goods or transferring because it has been marked as invalid, ensuring the uniqueness and security of the certificate during the consignment period; if the consignment is not completed, the platform can rebind a new NFC tag for the user according to the business rules; (C) Pickup Verification Mark: When the operation type is a pickup operation, the terminal device writes this mark to the NFC tag; this mark indicates that the tea transaction rights certificate corresponding to the NFC tag has been picked up by the holder and the corresponding physical tea has been eliminated; thereafter, the NFC tag is permanently canceled at the physical level. When any user senses the tag, the terminal device will recognize the mark and prompt "the certificate has been picked up", thereby preventing the picked-up certificate from being used for secondary pickup or transfer; this is consistent with the business logic such as "picked-up tea tickets cannot be transferred" and the change of certificate status after the "pickup" function in tea core identification is completed; (D) Unbound Mark: When the operation type is a rebinding operation, the terminal device writes this mark to the NFC tag; the mark indicates that the binding relationship between the NFC tag and the target tea transaction rights certificate has been released, and the NFC tag is restored to an empty card state without any certificate; the writing of this mark is the physical execution step of the "unbinding old tag" step in the rebinding process; after writing this mark, the NFC tag can be reused to bind other tea transaction rights certificates, realizing the recycling of the physical carrier; at the same time, the information of the target tea transaction rights certificate will be written to the new NFC tag in subsequent steps, thereby completing the replacement of the physical carrier.

[0070] In step S6, if an anomaly occurs during the writing process (e.g., the NFC tag leaves the sensing area causing communication interruption, the NFC tag's storage area is damaged and cannot be written to, or the terminal device's NFC module malfunctions), the terminal device can prompt the user "Write failed, please keep the tag close to the phone and try again." The terminal device can report the write failure event to the server, which records the anomaly log and decides whether to roll back the online status of the credential according to business rules to ensure consistency between online and offline status. After successful write, the terminal device can display a success message to the user through the user interface, such as "Transfer successful," "Consignment application submitted," "Goods pickup successful," or "Rebinding successful," and can display the updated credential status information to improve user experience. Simultaneously, in accordance with the security management requirements of "platform information anonymization and permanent retention of all role operation records," the server can record the result of this write operation (including the type of status marker written, operation time, operation terminal information, etc.) in the operation log, providing an immutable data foundation for subsequent auditing and traceability.

[0071] Therefore, based on the tea transaction rights certificate circulation management method described in steps S1 to S6 above, a new scheme for tea transaction rights certificate circulation management is provided to achieve online and offline status synchronization and ensure the reliability of the communication channel between the terminal device and the server. This scheme is executed by the terminal device and includes: reading the unique identification information stored in the NFC tag bound to the target tea transaction rights certificate; sending a dynamic challenge request to the NFC tag via the NFC module and receiving a one-time dynamic token generated based on a one-time password algorithm; initiating a recursive DNS query based on the DNSSEC protocol according to the unique identification information, obtaining the server public key in the DANE resource record verified by the DNSSEC chain trust anchor, and establishing a secure communication channel accordingly. The system sends a transfer request carrying the unique identifier, the one-time dynamic token, and the operation type to the server through the secure communication channel; receives a write instruction from the server after verifying that the token is valid and has not been used, and that the transfer operation is legal; and writes a status flag corresponding to the operation type to the NFC tag according to the write instruction to update the physical state of the NFC tag. By introducing DNSSEC trusted resolution, OTP anti-replay mechanism, and online and offline state atomic linkage, the system solves the technical problem of the physical tag state being out of sync with the online state after the tea product rights certificate is transferred. At the same time, it effectively prevents communication hijacking and replay attacks, improves the security and reliability of certificate transfer, and facilitates practical application and promotion.

[0072] Based on the technical solution of the first aspect mentioned above, this embodiment also provides a possible design for how to securely replace the physical carrier of the credential. That is, when the operation type is a rebinding operation, after updating the physical state of the NFC tag, the method also includes, but is not limited to, the following steps S71 to S76.

[0073] S71. Read the unique identification information and status marker of another NFC tag through the near field communication (NFC) module.

[0074] In step S71, after the unbinding mark is written to the original NFC tag in step S6, the original tag is restored to an empty card state, and the target tea transaction rights certificate is in an intermediate state of being unbound but not yet bound to a new physical carrier. At this time, the user needs to prepare a new blank NFC tag as a replacement carrier. Similar to step S1, the terminal device senses the other NFC tag through its built-in near-field communication (NFC) module, reads its unique identification information and the status mark in its designated storage area. The status mark is used to determine whether the other NFC tag is currently in a state of not being bound to any certificate—if the status mark indicates that it is not bound (for example, the status mark code value is "0x00"), it indicates that the tag can be used as the target carrier for rebinding; if the status mark indicates that it is bound to other certificates, the terminal device prompts the user "This tag is already bound to other certificates, please use a blank tag" and terminates the rebinding process.

[0075] S72. When the status flag of the other NFC tag indicates that no credentials are bound, generate another DNS query domain name based on the unique identification information of the other NFC tag, and initiate a recursive DNS query based on the DNSSEC protocol to obtain another DANE resource record corresponding to the other DNS query domain name. Then, use the DNSSEC chain trust anchor to verify the validity of the digital signature of the other DANE resource record, and after the verification is successful, use the public key in the other DANE resource record to establish another secure communication channel with the server.

[0076] In step S72, since the other NFC tag is a completely new physical tag with different unique identification information than the original tag, it is necessary to re-execute the DNSSEC and DANE trusted resolution process based on this new unique identification information to establish a secure communication channel dedicated to the new tag. The specific execution process of this step is completely similar to that of step S3, and the specific details will not be repeated here. This other secure communication channel is independent of the secure communication channel established for the original NFC tag in step S3, ensuring that each NFC tag involved in the rebinding process establishes a trusted connection with the server through an independent DNSSEC verification link.

[0077] S73. Send another dynamic challenge request to the other NFC tag through the near field communication (NFC) module, and receive another one-time dynamic token generated by the other NFC tag based on the built-in one-time password algorithm and the current time factor, wherein the other one-time dynamic token is also automatically invalidated after a single use.

[0078] In step S73, to ensure that the binding operation of the other NFC tag also has the ability to prevent replay attacks, the terminal device performs a challenge-response process on the new tag that is exactly the same as in step S2; the specific details are not repeated here. Since the other NFC tag has an independent seed key, the one-time dynamic token it generates is cryptographically completely independent of the token generated by the original tag and does not interfere with each other.

[0079] S74. Send a binding request to the server through the other secure communication channel, wherein the binding request carries the unique identification information of the target tea product transaction rights certificate, the unique identification information of the other NFC tag, and the other one-time dynamic token.

[0080] In step S74, similar to the transfer request sending in step S4, the terminal device assembles the three key pieces of information required for binding into a binding request and sends it to the server through the other secure communication channel established in step S72. It should be noted that the unique identifier information of the target tea product transaction rights certificate carried in the binding request is used to indicate to the server the identity of the certificate that needs to be bound to the new tag; this information is either queried and returned to the terminal device by the server based on the unique identifier information of the original tag when reading the original NFC tag in step S1, or obtained from the application cache of the terminal device. Furthermore, the binding request may optionally employ the same encryption processing as the preferred homomorphic encryption implementation described in step S4 to protect privacy data during the binding process.

[0081] S75. Receive the binding card writing instruction returned by the server through the other secure communication channel, wherein the binding card writing instruction is automatically generated by the server after verifying that the other one-time dynamic token is valid and has not been used, confirming that the target tea transaction rights certificate is in an unbound state based on the unique identification information of the target tea transaction rights certificate, and confirming that the other NFC tag meets the binding conditions based on the unique identification information of the other NFC tag.

[0082] In step S75, the server's verification logic for the binding request is similar to that for the transfer request in step S5, but it has been specifically adjusted for the rebinding scenario. Specifically, the server performs the following verifications: (1) verifying the validity and freshness of the other one-time dynamic token, confirming that it was generated by the other NFC tag and has not been used; (2) querying the current status of the token based on the unique identifier information of the target tea transaction rights certificate, confirming that it is in the intermediate state of "unbound" - that is, the unbound mark has been successfully written to the original NFC tag in step S6 and the server has completed the online status update of unbinding; (3) confirming that the tag is currently in a state of not being bound to any token and has not been reported lost based on the unique identifier information of the other NFC tag. Only after all the above verifications are passed will the server establish a new binding relationship between the target tea transaction rights certificate and the other NFC tag in its database, and automatically generate the binding card writing instruction, which will be returned to the terminal device through the other secure communication channel.

[0083] S76. Write the binding status flag and the information of the target tea product transaction rights certificate to the designated storage area of ​​the other NFC tag according to the binding card writing instruction.

[0084] In step S76, similar to step S6, the terminal device parses the binding card writing command and writes a binding status flag (updating the status flag of the original empty card from "0x00" to a coded value indicating binding, such as "0x00") and the information of the target tea product transaction rights certificate (such as certificate unique identifier information, certificate type, binding time, etc.) to the designated storage area of ​​the other NFC tag via the near-field communication (NFC) module. After successful writing, the other NFC tag is converted from a blank tag into a new physical carrier bound to the target tea product transaction rights certificate, and the entire rebinding process is completed. The terminal device can display a "rebinding successful" prompt message to the user through the user interface.

[0085] Based on the above possible design one, by independently establishing a DNSSEC secure communication channel for the new NFC tag in the rebinding operation, independently executing OTP challenge-response verification, and having the server generate a binding and writing instruction after strictly confirming that the original credential has been unbound and the new tag meets the binding conditions, the secure replacement of the credential physical carrier is achieved. The entire rebinding process reuses the core security framework to ensure that the rebinding operation has the same security as the original circulation operation, eliminates the risk of credential impersonation or physical carrier cloning that may occur during the rebinding process, and realizes the recycling of the physical carrier.

[0086] Based on the aforementioned possible design one, this embodiment also provides a possible design two for supporting the fragmented distribution of rights certificates. Specifically, when the rebinding operation is a one-to-many split rebinding operation, the binding request also carries a splitting scheme from the user. This splitting scheme instructs the user to split the target tea product transaction rights certificate into multiple fragmented rights certificates, ensuring that each fragmented rights certificate corresponds to partial ownership of the target tea product transaction rights certificate, and that the sum of the ownership of the multiple fragmented rights certificates equals the ownership of the target tea product transaction rights certificate. The binding card writing instruction is further confirmed by the server after verifying that the splitting scheme conforms to... The data is generated after a preset fragmentation rule and includes unique identification information and ownership ratio information assigned to any fragmented rights certificate that is currently in an unbound state among the multiple fragmented rights certificates. According to the binding card writing instruction, the binding status mark and the information of the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag, including but not limited to: according to the binding card writing instruction, the binding status mark and the unique identification information and ownership ratio information of any fragmented rights certificate representing the information of the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag, so as to convert the other NFC tag into a physical carrier bound to any fragmented rights certificate.

[0087] In the second possible design described above, the splitting scheme can be set by the user in the application interface of the terminal device. For example, the user can specify the number of splits and the ownership ratio of each split (e.g., splitting into 4 splits with ratios of 30%, 30%, 20%, and 20% respectively). The application automatically verifies that the total ownership ratio equals 100%. The splitting scheme is carried in the binding request and sent to the server through the other secure communication channel. After receiving the binding request carrying the splitting scheme, before generating the binding card writing instruction, the server, in addition to performing the triple verification described in the first possible design, also confirms whether the splitting scheme conforms to preset fragmentation rules. The fragmentation rules may include, for example, that the number of splits does not exceed a preset upper limit (e.g., 10 splits), the ownership ratio of each split is not lower than a preset lower limit (e.g., 5%), and the total ownership ratio equals 100%. Only when the splitting scheme conforms to the fragmentation rules will the server assign unique identification information and corresponding ownership ratio information to each fragmented rights certificate and create an independent certificate record for each fragmented rights certificate in its database. Since the original certificate was marked as "unbound" when entering the rebinding process, each fragmented rights certificate first inherits the "unbound" status when it is created; thereafter, as the binding and writing instructions of each fragmented rights certificate are executed, the server updates the status of the successfully bound fragmented rights certificate to a bound and transferable status (e.g., transferable).

[0088] Additionally, it should be noted that for the one-to-many split-binding operation, the "other NFC tag" in steps S71-S76 refers to multiple blank NFC tags. The terminal device can guide the user to sequentially place each blank NFC tag close to the NFC sensing area, performing the binding and writing operation one by one. Each NFC tag is written with a binding status marker and the unique identifier and ownership ratio information of its corresponding fragmented rights certificate, thereby converting it into an independent physical carrier bound to that fragmented rights certificate. The server records in the database the binding relationship between each fragmented rights certificate and its respective NFC tag, the parent-child association relationship between each fragmented rights certificate and the original certificate, and the status information of each fragmented rights certificate.

[0089] Based on the above-mentioned possible design two, by organically integrating the certificate ownership splitting scheme with the rebinding security framework, while maintaining DNSSEC secure communication and OTP anti-replay security mechanisms, it realizes the secure splitting and independent physical binding of a single tea product transaction rights certificate into multiple fragmented rights certificates; each fragmented certificate can be used independently as an independent rights certificate in subsequent circulation operations, realizing the fine-grained splitting and distribution of high-value tea product rights certificates, reducing the investment threshold for tea products, and improving the market liquidity and application flexibility of the certificates.

[0090] Based on the aforementioned possible design one, this embodiment also provides a possible design three for supporting the merging and reorganization of multiple vouchers. Specifically, when the rebinding operation is a many-to-one merging rebinding operation, the binding request also carries a merging scheme from the user. This merging scheme indicates that at least two target tea product transaction rights vouchers will be merged into a new tea product transaction rights voucher, and that the ownership of the at least two target tea product transaction rights vouchers corresponding to the new tea product transaction rights voucher will be the sum of their respective ownership. The binding card writing instruction is generated by the server after confirming that the merging scheme conforms to preset merging rules, and includes... The process involves assigning unique identification and ownership information to the new tea product transaction rights certificate that is currently in an unbound state; writing a binding status marker and the information of the target tea product transaction rights certificate to a designated storage area of ​​the other NFC tag according to the binding card writing instruction, including: writing a binding status marker and the unique identification and ownership information of the new tea product transaction rights certificate, which represents the information of the at least two target tea product transaction rights certificates, to a designated storage area of ​​the other NFC tag according to the binding card writing instruction, so as to convert the other NFC tag into a physical carrier bound to the new tea product transaction rights certificate.

[0091] In the aforementioned possible design three, the merging scheme can be set by the user in the application interface of the terminal device. For example, the user can select multiple vouchers to be merged from a list of vouchers they already hold and that are in a mergeable state (e.g., selecting three vouchers, each with 100% ownership, 100%, and 100% ownership respectively). The application automatically summarizes the ownership information of each voucher and generates a merging scheme. The merging scheme is carried in the binding request and uploaded together with the unique identification information of each of the at least two target tea product transaction rights vouchers, and sent to the server through the other secure communication channel. It should be noted that the at least two target tea product transaction rights vouchers should be in a consistent state before participating in the merging—that is, both should be in the intermediate state of "unbound" (or in the same state that allows merging due to other business scenarios) to ensure the executability of the merging operation and the consistency of the state. If the state of any voucher is inconsistent with that of other vouchers (e.g., one voucher is in the "unbound" state while the other is in the "delivered" state), the server will reject the merging operation during the verification phase.

[0092] Upon receiving a binding request carrying a merging scheme and the unique identifiers of the at least two target tea product transaction rights certificates, the server, before generating the binding write instruction, in addition to performing the triple verification described in Possible Design 1, further confirms whether the merging scheme conforms to preset merging rules. These merging rules may include, for example, that the number of certificates to be merged is not less than two, that all certificates are currently in a consistent state allowing merging (e.g., all are in an "unbound" state), and that the ownership information of the new certificate after merging is equal to the sum of the ownership information of all the source certificates. Only when the merging scheme conforms to the merging rules does the server create a certificate record for the new tea product transaction rights certificate in its database, assign it unique identifier and ownership information, and mark each source certificate as "merged." The new tea product transaction rights certificate inherits the "unbound" state of the source certificates upon creation; subsequently, as the binding write instruction is executed, the server updates the status of the new certificate to a bound and transferable state (e.g., transferable). The server records in the database the parent-child relationship between the new credential and each merged source credential, the binding relationship between the new credential and the other NFC tag, and the status information of the new credential.

[0093] Additionally, it should be noted that the many-to-one merged binding operation differs from the card-by-card writing process in possible design two. Here, only one of the other NFC tags needs to be bound and written. The terminal device guides the user to place a blank NFC tag close to the NFC sensing area to perform the binding and writing operation. The NFC tag is written with a binding status marker, as well as the unique identification information and ownership information of the new tea product transaction rights certificate, thereby transforming it into an independent physical carrier bound to the new tea product transaction rights certificate.

[0094] Based on the above-mentioned possible design three, by organically integrating the multi-credential merging scheme with the rebinding security framework, while maintaining DNSSEC secure communication and OTP anti-replay security mechanisms, it realizes the secure merging and reorganization of multiple independent tea transaction rights credentials into a single aggregated new credential; the merged new credential is easy to manage and transfer in a unified manner, meets users' needs for integrating rights credentials of different granularities, and improves the flexibility and convenience of credential management.

[0095] Based on the technical solution of the first aspect mentioned above, this embodiment also provides a possible design for preventing cloning attacks based on radio frequency characteristics, that is, the method also includes, but is not limited to, the following steps S81 to S82.

[0096] S81. When reading the unique identification information of the NFC tag, the original radio frequency signal feature data generated when the NFC tag is read is also collected, wherein the original radio frequency signal feature data includes, but is not limited to, at least one of signal amplitude, phase and frequency.

[0097] In step S81, when the terminal device senses and reads the NFC tag through the NFC module, in addition to acquiring digital data such as the unique identification information, it also simultaneously collects the physical layer raw radio frequency signal characteristic data generated during the NFC communication process. Since each NFC tag inevitably has minor hardware differences during manufacturing (e.g., the winding precision of the antenna coil, the impedance characteristics of the internal circuitry of the chip, and the dielectric constant of the packaging material), these differences lead to subtle but detectable differences in the amplitude, phase, and frequency of the radio frequency response signals generated by different NFC tags under the same reading conditions, constituting the "hardware fingerprint" of each NFC tag. Even if an attacker copies the digital data (such as the unique identification information) stored in the NFC tag using cloning methods, they cannot accurately reproduce the hardware fingerprint of the original tag at the physical layer. Therefore, the raw radio frequency signal characteristic data can serve as an important physical layer basis for determining whether the NFC tag is a cloned tag. The terminal device can complete the acquisition of the raw radio frequency signal characteristic data during normal NFC communication through the radio frequency transceiver circuit inside its NFC module, without the need for additional hardware support.

[0098] S82. Before sending a transfer request to the server, the original radio frequency signal feature data and the unique identification information are sent to the server through the secure communication channel, so that the server inputs the original radio frequency signal feature data into the physical layer anomaly scoring model corresponding to the unique identification information, and terminates the transfer operation and triggers a security alarm when it finds that the physical layer anomaly score output by the model exceeds a preset scoring threshold. The physical layer anomaly scoring model is an autoencoder trained by reconstruction using normal radio frequency signal feature data as training samples, and the physical layer anomaly score is the reconstruction error calculated by the autoencoder on the original radio frequency signal feature data.

[0099] In step S82, the terminal device sends the raw radio frequency signal feature data collected in step S81 and the unique identification information of the NFC tag to the server through the secure communication channel established in step S3. The server side deploys a physical layer anomaly scoring model that corresponds one-to-one with the unique identification information of each NFC tag. This physical layer anomaly scoring model is an anomaly detection model built based on an autoencoder. The following provides a detailed description of the physical layer anomaly scoring model from three aspects: model construction, training process, and online scoring.

[0100] (I) Model Construction: The autoencoder is an unsupervised learning neural network model consisting of an encoder and a decoder. In this embodiment, the encoder contains three fully connected layers with 384, 128, and 64 nodes respectively. The activation function of the first two fully connected layers is ReLU (Rectified Linear Unit). The decoder has a mirror-symmetric structure with the encoder, containing three fully connected layers with 64, 128, and 384 nodes respectively. The activation function of the first two fully connected layers is also ReLU, and the activation function of the output layer is the Sigmoid function. The input of the encoder is a normalized 384-dimensional radio frequency signal feature vector, and the output of the decoder is a reconstructed vector with the same dimension as the input. It should be noted that the above network structure is only an example. Those skilled in the art can adjust the number of nodes or layers appropriately according to the actual accuracy and computational cost requirements, as long as the symmetrical bottleneck structure of the encoder-decoder is maintained.

[0101] (II) Training Process: The training of the autoencoder is completed by the server during the initial issuance or binding phase of the NFC tag. Specifically, the server guides the user to perform multiple normal sensing reads of the tag (e.g., 100 times). During each read, the terminal device collects the original radio frequency signal feature data of the NFC tag according to the method described in step S81. The method for collecting the original radio frequency signal feature data is as follows: During each NFC communication process, the NFC module of the terminal device collects 128 sampling points at a preset sampling rate (e.g., 1MHz) within the communication duration, and records the signal amplitude, phase, and frequency values ​​of each sampling point, thereby forming a 128×3=384-dimensional original feature vector. The terminal device uploads the 100 sets of collected original feature vectors to the server through the secure communication channel. The server normalizes these 100 sets of feature vectors (e.g., using the min-max normalization method to linearly map the value of each dimension to the [0, 1] interval), and uses the normalized feature vectors as normal behavior training samples. Then, the server uses the mean squared error as the loss function and employs the backpropagation algorithm to train the autoencoder until the loss function converges (e.g., the change in the loss value over 10 consecutive training rounds is less than 0.001). After training, the autoencoder learns the compressed representation and reconstruction mode of the normal radio frequency characteristics of the NFC tag, forming a physical layer anomaly scoring model bound to the unique identification information of the NFC tag.

[0102] (III) Online Scoring and Anomaly Detection: After the server receives the original radio frequency signal feature data corresponding to this transfer operation, it first performs the same normalization process as in the training phase. Then, the normalized feature vector is input into the physical layer anomaly scoring model (i.e., the trained autoencoder) corresponding to the unique identifier information. The autoencoder outputs a reconstruction vector with the same dimension as the input. The server calculates the Euclidean distance between the input vector and the reconstruction vector. This Euclidean distance is the physical layer anomaly score (i.e., reconstruction error). Since the autoencoder only uses normal radio frequency feature data as training samples, the reconstruction error is small when the input data is normal radio frequency features. When the input data comes from cloned tags, its radio frequency features deviate significantly from the normal feature distribution, and the reconstruction error will increase significantly. The preset scoring threshold can be determined based on the results of the training phase, for example, set to 1.5 times the maximum reconstruction error in the training set. If the reconstruction error exceeds the preset scoring threshold, it indicates that the radio frequency feature read this time deviates significantly from the normal radio frequency feature distribution recorded in the history of the tag, and the NFC tag is very likely to be a cloned tag. At this time, the server terminates the response to the transfer operation (that is, it no longer continues to execute the subsequent verification and card writing instruction generation process described in step S5) and triggers a security alarm, returning a cloning risk warning to the terminal device through the secure communication channel. If the reconstruction error does not exceed the threshold, the server continues to execute the subsequent verification process described in step S5.

[0103] Based on the above-mentioned possible design four, by synchronously collecting the original radio frequency signal feature data during the NFC tag reading stage, and inputting the normalized feature vector into the autoencoder model bound to the tag's unique identification information, the reconstruction error is used as the physical layer anomaly score for real-time verification, thus achieving accurate identification of the NFC tag's hardware fingerprint. This mechanism can effectively identify cloned tags whose digital data has been copied but whose physical characteristics are inconsistent, thus making up for the security blind spot of relying solely on digital signatures or encryption algorithms for anti-counterfeiting at the physical layer, and significantly improving the anti-counterfeiting capability and overall security of the management of tea transaction rights certificates.

[0104] Based on the technical solution of the first aspect mentioned above, this embodiment also provides a possible design five for how to achieve offline secure transfer, that is, when the terminal device is offline and the operation type is a transfer operation or a consignment operation, the method also includes, but is not limited to, the following steps S91 to S94.

[0105] S91. Generate an offline transfer request within the Trusted Execution Environment (TEE) on the terminal device side, wherein the offline transfer request includes the unique identification information of the NFC tag, the one-time dynamic token, the operation type of the transfer operation, and an offline transaction signature generated by signing the unique identification information and the operation type based on the device private key stored in the TEE.

[0106] In step S91, since the terminal device is currently offline and cannot establish a network connection with the server to execute the DNSSEC / DANE secure communication channel establishment process described in step S3, it needs to complete the generation and trusted signature of the transfer request locally to ensure that the security of offline operations is not reduced due to being disconnected from the server. Specifically, the terminal device calls its built-in Trusted Execution Environment (TEE) to assemble and sign the offline transfer request within the TEE. The TEE is a hardware-isolated area inside the terminal device's processor, isolated from the main operating system (such as Android or iOS). Even if the main operating system is compromised by malicious programs, the code and data within the TEE remain secure. The device private key is generated and stored in the TEE when the terminal device is first registered or initialized. This private key does not leave the TEE throughout the device's lifecycle, and no external process (including the main operating system and applications) can read it. The TEE uses the device private key to digitally sign the unique identification information of the NFC tag and the operation type to generate the offline transaction signature. Since the signature is generated in a hardware-isolated environment, attackers cannot forge it using software, ensuring the authenticity of the initiator's identity and the immutability of the operation content. Furthermore, the device private key is preferably generated using the ECDSA algorithm, specifically by generating a device public-private key pair based on the secp256r1 elliptic curve within the TEE. The device private key is stored and used only within the TEE. The TEE uses this device private key to perform an ECDSA signature on the unique identification information of the NFC tag and the operation type, generating an offline transaction signature (r,s).

[0107] S92. The offline transfer request is transmitted to the receiving terminal via the near-field communication (NFC) module in a point-to-point communication manner. The receiving terminal refers to another terminal device that acts as the recipient of the target tea product transaction rights certificate in the transfer operation or the consignment operation.

[0108] In step S92, the terminal device utilizes the peer-to-peer (P2P) communication mode of the NFC module to directly send the offline transfer request generated in step S91 to the receiving terminal via near-field communication. NFC P2P mode is a communication mode defined in the NFC standard, allowing two NFC-enabled devices to directly exchange data within a short distance (typically a few centimeters) without relying on a network connection. In a transfer scenario, the receiving terminal is the recipient's terminal device; in a consignment scenario, the receiving terminal can be a consignment acceptance terminal designated by the platform. The terminal device can guide the user through its user interface to bring the device and the receiving terminal back-to-back to establish an NFC P2P connection and complete data transmission.

[0109] S93. Receive a receipt confirmation credential returned by the receiving terminal through the near field communication (NFC) module, wherein the receipt confirmation credential includes a receiving signature and a signature timestamp generated by signing the offline transfer request based on the receiving private key stored in the TEE on the receiving terminal side.

[0110] In step S93, after receiving the offline transfer request via NFC P2P mode, the receiving terminal also signs and confirms the offline transfer request within its own TEE, generating a receipt confirmation certificate. This receipt confirmation certificate contains two key pieces of information: first, the receiving party's signature, generated by digitally signing the content of the offline transfer request using the receiving party's private key stored in the receiving terminal's TEE, proving that the receiving party indeed received and confirmed the transfer request, thus ensuring the non-repudiation of the receiving behavior; second, the signature timestamp, recording the specific time when the receiving party's signature was generated. This timestamp is provided by a trusted clock or secure timer within the TEE, ensuring the authenticity and tamper-proof nature of the time information, and is used by the server to verify whether the offline transaction was completed within the validity period. The receiving terminal returns the receipt confirmation certificate to the initiating terminal via NFC P2P mode. Furthermore, the receiving party's private key is also an ECDSA private key generated based on the secp256r1 elliptic curve, and the receiving party's signature is also an ECDSA signature.

[0111] S94. After the terminal device restores its network connection, the offline transfer request and the receipt confirmation certificate are uploaded to the server through the secure communication channel, so that the server verifies the validity of the offline transaction signature and the recipient's signature, and verifies that the duration from the time indicated by the signature timestamp to the current time does not exceed the preset offline transaction validity duration. After all verifications are passed, the server completes the final confirmation of the transfer operation and the delayed execution of the card writing instruction, wherein the card writing instruction is used to trigger the physical state update of the NFC tag.

[0112] In step S94, when the terminal device restores its network connection (e.g., the user returns to an area with Wi-Fi coverage or the mobile network signal is restored), it first establishes the secure communication channel with the server in the manner described in step S3, and then uploads the offline transfer request and the receipt confirmation certificate to the server through the secure communication channel. The server performs the following verifications: (1) verifying the validity of the offline transaction signature using a pre-registered device public key to confirm that the offline request was indeed generated by the legitimate initiator terminal in the TEE and that the content has not been tampered with; (2) verifying the validity of the receiver signature using a pre-registered receiver public key to confirm that the receiver has indeed received and confirmed the transfer operation; (3) verifying whether the time from the time indicated by the signature timestamp to the current time does not exceed the preset offline transaction validity period (e.g., 24 hours or 72 hours, which can be set by the platform operation strategy) to prevent expired offline transfer requests from being maliciously replayed after a long period of time. If all the above verifications pass, the server completes the online status update of the transfer operation as described in step S5 and generates the write instruction. This generation of the write instruction is the aforementioned "delayed execution"—compared to the immediate generation of the write instruction in step S5 during the normal online process, the generation of the write instruction here is delayed until after the network verification is completed. After receiving the write instruction, the terminal device completes the physical status update of the NFC tag as described in step S6.

[0113] Based on the above-mentioned possible design five, by organically combining TEE hardware-level signature technology, NFC peer-to-peer communication, and delayed card writing mechanism, secure credential transfer under conditions without network connection is achieved. TEE ensures the credibility and non-repudiation of offline operations, the timestamp verification mechanism effectively prevents replay attacks on offline credentials, and delayed card writing after network connection ensures the final consistency of online and offline status. This solution fills the gap in secure transfer in tea trading scenarios such as remote production areas and underground tea warehouses in weak network or offline environments, and significantly improves the full-scenario availability of credential transfer management.

[0114] like Figure 2As shown, the second aspect of this embodiment provides a virtual system for implementing the tea transaction rights certificate circulation management method described in the first aspect or any possible design in the first aspect. It is suitable for being deployed in a terminal device and includes a circulation operation response unit, a dynamic token acquisition unit, a secure channel establishment unit, an external communication transceiver unit, and a card writing instruction execution unit. The circulation operation response unit is used to respond to the circulation operation initiated by the user for the target tea product transaction rights certificate, and reads the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate through the near field communication (NFC) module configured on the terminal device side. The dynamic token acquisition unit is communicatively connected to the flow operation response unit, and is used to send a dynamic challenge request to the NFC tag through the near field communication (NFC) module, and receive a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor, wherein the one-time dynamic token is automatically invalidated after a single use; The secure channel establishment unit is communicatively connected to the transfer operation response unit. It is used to generate a corresponding DNS query domain name based on the unique identification information of the NFC tag, and initiate a recursive DNS query based on the DNSSEC protocol to obtain the DANE resource record containing server public key information corresponding to the domain name. Then, it uses the DNSSEC chain trust anchor to verify the validity of the digital signature of the DANE resource record, and after the verification is successful, it uses the public key in the DANE resource record to establish a secure communication channel with the server. The external communication transceiver unit is communicatively connected to the transfer operation response unit, the dynamic token acquisition unit, and the secure channel establishment unit, respectively, and is used to send a transfer request to the server through the secure communication channel. The transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation. The external communication transceiver unit is also used to receive the card writing instruction returned by the server through the secure communication channel, wherein the card writing instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type; The write instruction execution unit is communicatively connected to the external communication transceiver unit and is used to write a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag through the near field communication (NFC) module according to the write instruction, so as to update the physical state of the NFC tag.

[0115] It should be noted that, in specific implementations, the aforementioned units can be, but are not limited to, completed collaboratively by an application running on the terminal device and the hardware modules of the terminal device. For example, the function of the flow operation response unit can be implemented collaboratively by the user interface of the application and the NFC controller chip (such as the NXP PN532 chip) and its driver of the terminal device; the function of the dynamic token acquisition unit can be completed collaboratively by the application and the security chip built into the NFC tag (such as the NXP SmartMX series chip) through the NFC communication protocol; the function of the secure channel establishment unit can be implemented by the application calling the DNSSEC query interface (such as the getdns library) and TLS protocol stack (such as OpenSSL) provided by the terminal device's operating system; the function of the external communication transceiver unit can be completed collaboratively by the mobile data communication module (such as the 4G / 5G baseband chip) or wireless LAN communication module of the terminal device and the network interface of the application; the function of the card writing instruction execution unit can be completed collaboratively by the application and the write function interface of the NFC controller chip. Thus, the units are not simply functional divisions, but have a clear hardware and software implementation basis.

[0116] The working process, working details and technical effects of the aforementioned system provided in the second aspect of this embodiment can be found in the tea transaction rights certificate circulation management method described in the first aspect or any possible design in the first aspect, and will not be repeated here.

[0117] like Figure 3 As shown, the third aspect of this embodiment provides a terminal device for executing the tea transaction rights certificate circulation management method as described in the first aspect or any possible design of the first aspect. The device includes a storage module, a processing module, and a transceiver module connected in sequence. The storage module stores a computer program, the transceiver module sends and receives messages, and the processing module reads the computer program and executes the tea transaction rights certificate circulation management method as described in the first aspect or any possible design of the first aspect. Specifically, the storage module may include, but is not limited to, random-access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; the processing module may, but is not limited to, use a microprocessor of the STM32F105 series. Furthermore, the terminal device may also include, but is not limited to, a power module, a display screen, and other necessary components.

[0118] The working process, working details and technical effects of the aforementioned terminal device provided in the third aspect of this embodiment can be found in the tea transaction rights certificate circulation management method described in the first aspect or any possible design in the first aspect, and will not be repeated here.

[0119] This fourth aspect of the embodiment provides a computer-readable storage medium storing instructions comprising the tea transaction rights certificate circulation management method as described in the first aspect or any possible design of the first aspect. Specifically, the computer-readable storage medium stores instructions that, when executed on a computer, perform the tea transaction rights certificate circulation management method as described in the first aspect or any possible design of the first aspect. The computer-readable storage medium refers to a data storage medium, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or Memory Sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0120] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be found in the tea transaction rights certificate circulation management method described in the first aspect or any possible design in the first aspect, and will not be repeated here.

[0121] This fifth aspect of the embodiment provides a computer program product, including a computer program or instructions, which, when executed by a computer, implement the tea product transaction rights certificate circulation management method as described in the first aspect or any possible design in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0122] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A method for managing the circulation of tea transaction rights certificates based on NFC tags, characterized in that, Executed by the terminal device and including: In response to a user-initiated transfer operation of the target tea product transaction rights certificate, the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate is read through the near field communication (NFC) module configured on the terminal device side; The NFC module sends a dynamic challenge request to the NFC tag and receives a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor. The one-time dynamic token is automatically invalidated after a single use. Based on the unique identification information of the NFC tag, a corresponding DNS query domain name is generated, and a recursive DNS query based on the DNSSEC protocol is initiated to obtain the DANE resource record containing the server's public key information corresponding to the domain name. Then, the validity of the digital signature of the DANE resource record is verified using the DNSSEC chain trust anchor, and after the verification is successful, a secure communication channel is established with the server using the public key in the DANE resource record. A transfer request is sent to the server through the secure communication channel, wherein the transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation; The server receives a write instruction returned by the secure communication channel, wherein the write instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type. According to the write instruction, the near field communication (NFC) module writes a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag to update the physical state of the NFC tag.

2. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, The operation type is a transfer operation, consignment operation, pickup operation, or rebinding operation. The status marker is a transfer invalidation marker corresponding to the transfer operation, an invalidation marker corresponding to the consignment operation, a pickup and verification marker corresponding to the pickup operation, or an unbinding marker corresponding to the rebinding operation.

3. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, When the operation type is a re-binding operation, after updating the physical state of the NFC tag, the method further includes: The NFC module reads the unique identification information and status marker of another NFC tag. When the status flag of the other NFC tag indicates that no credentials are bound, another DNS query domain name is generated based on the unique identification information of the other NFC tag, and a recursive DNS query based on the DNSSEC protocol is initiated to obtain another DANE resource record corresponding to the other DNS query domain name. Then, the validity of the digital signature of the other DANE resource record is verified using the DNSSEC chain trust anchor, and after the verification is successful, another secure communication channel is established with the server using the public key in the other DANE resource record. The NFC module sends another dynamic challenge request to the other NFC tag and receives another one-time dynamic token generated by the other NFC tag based on the built-in one-time password algorithm and the current time factor. The other one-time dynamic token is also automatically invalidated after a single use. A binding request is sent to the server through the other secure communication channel, wherein the binding request carries the unique identification information of the target tea product transaction rights certificate, the unique identification information of the other NFC tag, and the other one-time dynamic token; The server receives a binding card writing instruction returned by the server through the other secure communication channel. The binding card writing instruction is automatically generated by the server after verifying that the other one-time dynamic token is valid and has not been used, confirming that the target tea transaction rights certificate is in an unbound state based on the unique identification information of the target tea transaction rights certificate, and confirming that the other NFC tag meets the binding conditions based on the unique identification information of the other NFC tag. According to the binding write instruction, the binding status mark and the information of the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag.

4. The method for managing the transfer of tea transaction rights certificates according to claim 3, characterized in that, When the rebinding operation is a one-to-many split rebinding operation, the binding request also carries a splitting scheme from the user, wherein the splitting scheme is used to instruct the target tea product transaction rights certificate to be split into multiple fragmented rights certificates, and to make each fragmented rights certificate in the multiple fragmented rights certificates correspond to a partial ownership of the target tea product transaction rights certificate, and to make the sum of the ownership of the multiple fragmented rights certificates equal to the ownership of the target tea product transaction rights certificate; The binding card writing instruction is generated by the server after confirming that the splitting scheme conforms to the preset fragmentation rules, and includes unique identification information and ownership ratio information assigned to any fragmented rights certificate that is currently in an unbound state among the multiple fragmented rights certificates; The binding write instruction is used to write the binding status marker and the target tea product transaction rights certificate information to a designated storage area of ​​the other NFC tag, including: According to the binding write instruction, a binding status marker and unique identification information and ownership ratio information of any fragmented rights certificate representing the target tea product transaction rights certificate are written to the designated storage area of ​​the other NFC tag, so as to convert the other NFC tag into a physical carrier bound to the fragmented rights certificate.

5. The method for managing the transfer of tea transaction rights certificates according to claim 3, characterized in that, When the rebinding operation is specifically a many-to-one merged rebinding operation, the binding request also carries a merging scheme from the user, wherein the merging scheme is used to indicate that at least two target tea product transaction rights certificates are merged into a new tea product transaction rights certificate, and that the total ownership of the at least two target tea product transaction rights certificates corresponding to the new tea product transaction rights certificate is increased. The binding card writing instruction is generated by the server after confirming that the merging scheme conforms to the preset merging rules, and includes unique identification information and ownership information assigned to the new tea product transaction rights certificate that is currently in an unbound state; The binding write instruction is used to write the binding status marker and the target tea product transaction rights certificate information to a designated storage area of ​​the other NFC tag, including: According to the binding write instruction, a binding status flag and unique identification information and ownership information of the new tea transaction rights certificate, which represent information of the at least two target tea transaction rights certificates, are written to the designated storage area of ​​the other NFC tag, so as to convert the other NFC tag into a physical carrier bound to the new tea transaction rights certificate.

6. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, The method further includes: When reading the unique identification information of the NFC tag, the original radio frequency signal feature data generated when the NFC tag is read is also collected, wherein the original radio frequency signal feature data includes at least one of signal amplitude, phase and frequency; Before sending a transfer request to the server, the original radio frequency signal feature data and the unique identification information are sent to the server through the secure communication channel. This allows the server to input the original radio frequency signal feature data into the physical layer anomaly scoring model corresponding to the unique identification information. If the physical layer anomaly score output by the model exceeds a preset scoring threshold, the server terminates the transfer operation and triggers a security alarm. The physical layer anomaly scoring model is an autoencoder trained using normal radio frequency signal feature data as training samples. The physical layer anomaly score is the reconstruction error calculated by the autoencoder from the original radio frequency signal feature data.

7. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, Sending a transfer request to the server through the secure communication channel includes: first, using a homomorphic encryption public key negotiated with the server to homomorphically encrypt the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation to generate an encrypted transfer request; and then sending the encrypted transfer request to the server through the secure communication channel. Receiving the write instruction returned by the server through the secure communication channel includes: first receiving the encrypted write instruction returned by the server through the secure communication channel, and then decrypting it using the homomorphic encryption private key corresponding to the homomorphic encryption public key to obtain the write instruction. The encrypted write instruction is automatically generated by the server after verifying the validity and unused nature of the one-time dynamic token within the homomorphic encryption domain and verifying the legitimacy of the transfer operation based on the unique identifier information of the NFC tag and the operation type. During the process of verifying the legitimacy of the transfer operation within the homomorphic encryption domain, the server does not obtain the unique identifier information of the NFC tag and the plaintext data of the operation type, and the correctness of the verification result of the transfer operation's legitimacy is publicly verified through non-interactive zero-knowledge proof.

8. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, Verifying the legitimacy of the transfer operation based on the unique identification information of the NFC tag includes: Based on the unique identification information of the NFC tag, the unique identification information of the target tea product transaction rights certificate bound to the unique identification information is obtained on the server side; The pre-stored digital signature information of the issuer is queried based on the unique identifier information of the target tea product transaction rights certificate. The digital signature information of the issuer is generated by the issuer signing the unique identifier information of the target tea product transaction rights certificate with the issuer's private key when the target tea product transaction rights certificate is first issued, and is stored in the server in association with the unique identifier information. The issuer's digital signature information is verified using the issuer's public key corresponding to the issuer's private key; If the verification fails, the write command will not be generated, and a source anomaly alarm will be returned to the terminal device through the secure communication channel.

9. The method for managing the transfer of tea transaction rights certificates according to claim 1, characterized in that, When the terminal device is offline and the operation type is a transfer operation or a consignment operation, the method further includes: An offline transfer request is generated within the Trusted Execution Environment (TEE) on the terminal device side. The offline transfer request includes the unique identification information of the NFC tag, the one-time dynamic token, the operation type of the transfer operation, and an offline transaction signature generated by signing the unique identification information and the operation type based on the device private key stored in the TEE. The offline transfer request is transmitted to the receiving terminal via the near field communication (NFC) module in a point-to-point communication manner. The receiving terminal refers to another terminal device that acts as the recipient of the target tea product transaction rights certificate in the transfer operation or the consignment operation. The NFC module receives a receipt confirmation credential returned by the receiving terminal, wherein the receipt confirmation credential includes a receiving signature and a signature timestamp generated by signing the offline transfer request based on the receiving private key stored in the TEE on the receiving terminal side. After the terminal device restores its network connection, it uploads the offline transfer request and the receipt confirmation certificate to the server through the secure communication channel. This allows the server to verify the validity of the offline transaction signature and the recipient's signature, as well as to verify that the duration from the time indicated by the signature timestamp to the current time does not exceed a preset offline transaction validity period. After all verifications are successful, the server completes the final confirmation of the transfer operation and the delayed execution of the card writing instruction. The card writing instruction is used to trigger the physical state update of the NFC tag.

10. A tea product transaction rights certificate circulation management system based on NFC tags, characterized in that, It is suitable for deployment in terminal equipment and includes a flow operation response unit, a dynamic token acquisition unit, a secure channel establishment unit, an external communication transceiver unit, and a card writing instruction execution unit; The circulation operation response unit is used to respond to the circulation operation initiated by the user for the target tea product transaction rights certificate, and reads the unique identification information stored in the NFC tag bound to the target tea product transaction rights certificate through the near field communication (NFC) module configured on the terminal device side. The dynamic token acquisition unit is communicatively connected to the flow operation response unit, and is used to send a dynamic challenge request to the NFC tag through the near field communication (NFC) module, and receive a one-time dynamic token generated by the NFC tag based on the built-in one-time password algorithm and the current time factor, wherein the one-time dynamic token is automatically invalidated after a single use; The secure channel establishment unit is communicatively connected to the transfer operation response unit. It is used to generate a corresponding DNS query domain name based on the unique identification information of the NFC tag, and initiate a recursive DNS query based on the DNSSEC protocol to obtain the DANE resource record containing server public key information corresponding to the domain name. Then, it uses the DNSSEC chain trust anchor to verify the validity of the digital signature of the DANE resource record, and after the verification is successful, it uses the public key in the DANE resource record to establish a secure communication channel with the server. The external communication transceiver unit is communicatively connected to the transfer operation response unit, the dynamic token acquisition unit, and the secure channel establishment unit, respectively, and is used to send a transfer request to the server through the secure communication channel. The transfer request carries the unique identification information of the NFC tag, the one-time dynamic token, and the operation type of the transfer operation. The external communication transceiver unit is also used to receive the card writing instruction returned by the server through the secure communication channel, wherein the card writing instruction is automatically generated by the server after verifying that the one-time dynamic token is valid and has not been used, and after verifying that the transfer operation is legal based on the unique identification information of the NFC tag and the operation type; The write instruction execution unit is communicatively connected to the external communication transceiver unit and is used to write a status flag corresponding to the operation type to a designated storage area of ​​the NFC tag through the near field communication (NFC) module according to the write instruction, so as to update the physical state of the NFC tag.