A method for sanitary napkin traceability, use reminding and data interaction based on NFC
Patent Information
- Application Number
- CN202611184139.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-06
- Publication Date
- 2026-10-13
AI Technical Summary
因此,现有技术仍有必要解决单片卫生巾包装开启状态难以验证、NFC读取请求易被重复处理、连续使用记录容易发生状态冲突以及产品批次异常信息不能直接作用于当前提醒任务的问题
通过在单片卫生巾独立包装上设置具有主通信天线和开封检测回路的NFC标签,使独立包装开启时开封检测回路发生不可逆状态变化,而主通信天线在开启后仍保持可读取,并将开封检测状态与标签唯一标识、单片发行令牌及递增的读取计数值共同作为使用状态判断依据,区别于仅依靠固定URL访问、普通扫码动作或者人工确认启动计时的处理方式,达到识别独立包装实际开启状态、排除未开封误扫及旧读取数据重复提交、提高单片卫生巾使用启动事件真实性和可追溯性的效果。
Smart Images

Figure CN122904925A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart hygiene products, specifically to a method for NFC-based traceability, usage reminders, and data interaction for sanitary napkins. Background Technology
[0002] Sanitary napkins are frequently used disposable hygiene products, and each pad is usually individually packaged for ease of carrying, storage, and maintaining hygiene. Current sanitary napkin packaging typically displays product information via text, barcodes, or QR codes, allowing users to scan to view product name, production batch, production date, and company information. Some products also include replacement reminders via apps or mini-programs, where users scan the identification code on the packaging or manually select the product type to start a timer, sending a reminder after a set duration. However, barcodes, QR codes, and ordinary NFC tags storing fixed access addresses typically only provide static access points. Servers struggle to determine whether a scan corresponds to the actual opening of an individual package, and it's difficult to distinguish between genuine reads, copied link access, and repeated submissions of historical data.
[0003] During reminder usage, a single tap on a mobile device may generate continuous NFC read callbacks. Network retransmissions, repeated page submissions, or simultaneous operations by multiple devices may also cause requests for the same tag to be processed repeatedly. Existing reminder methods typically re-establish the timing task after each scan, which can easily lead to duplicate activity usage records, delayed reminder start times, or multiple activity records corresponding to the same product. When a user finishes using a previous sanitary napkin by scanning a new one and starts a new reminder, if the completion of the previous record, the creation of the next record, and the status modification of the two reminder tasks are executed separately, issues may arise such as the previous record having already ended while the next record has not been successfully established, the old reminder task continuing to be effective, and the inability to continuously link the usage records of previous and subsequent sanitary napkins.
[0004] Furthermore, existing product traceability systems typically associate individual sanitary napkin identifiers with product batches, pushing recall information to purchasers or registered users when abnormal batches are detected. However, there is a lack of effective linkage between product batch information, usage reminder tasks, and the current status of the product in use. Servers struggle to accurately determine whether a user's current product belongs to an abnormal batch based on the individual product identifier, and they also find it difficult to promptly terminate existing reminder tasks, prevent other individual products in the abnormal batch from continuing to establish usage records when the batch status changes, and complete the transition between usage statuses after the user switches to a product from a normal batch. Therefore, existing technologies still need to address the challenges of verifying the opening status of individual sanitary napkin packaging, the tendency for NFC read requests to be repeatedly processed, the potential for state conflicts in continuous usage records, and the inability of abnormal product batch information to directly affect the current reminder task. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides an NFC-based method for sanitary napkin traceability, usage reminders, and data interaction, thereby resolving the technical problems existing in the prior art.
[0006] The above-mentioned technical objective of the present invention is achieved through the following technical solution: The NFC-based method for sanitary napkin traceability, usage reminders, and data interaction includes the following steps: S1: An NFC tag including an NFC chip, a main communication antenna, and an opening detection circuit is set on the individual packaging of a single sanitary napkin. The opening detection circuit passes through the opening path of the individual packaging and undergoes an irreversible state change when it is opened. The main communication antenna remains readable after the state change. S2: Establish a mapping relationship between the unique identifier of the NFC tag and the single-chip issuance token and the product batch, product type and reminder duration parameters, and store them on the server; S3: The mobile terminal reads the NFC tag and sends a read request containing the tag's unique identifier, a single-chip issuance token, a read count value, and an open detection status under the user login session; the server obtains the current user identifier from the user login session, and when the mapping relationship is established, the read count value is greater than the most recent valid read count value, and the open detection status indicates that the independent package has been opened, the server determines that the read request has passed the verification and generates a one-time scan credential. When the current user identifier corresponds to an activity usage record, the credential is bound to its activity version identifier; S4: For NFC tags that have passed verification, have not established exclusive activity associations with other user identifiers, and belong to a product batch in normal status, determine the initial activation event, repeat query event, or replacement activation event based on whether the current user identifier corresponds to an activity usage record and whether the NFC tag is the same as the NFC tag in the record; other read requests are determined as invalid read events. S5: For initial activation events, establish an exclusive activity association and create an activity usage record and reminder task; for repeated query events, return the remaining duration and keep the start time and trigger time unchanged; for change activation events, when the activity version identifier bound to the credential matches the activity version identifier stored on the server, end the previous activity usage record and invalidate its reminder task in the same transaction, establish the association between the previous and subsequent activity usage records, and create the next activity usage record and its reminder task; for invalid read events, keep the current activity usage record and its reminder task unchanged. S6: When a product batch changes to an abnormal batch status, the server disables the reminder task corresponding to the activity usage record of the sanitary napkins currently in use, creates an abnormal batch replacement task, and prohibits the creation of new activity usage records based on the NFC tag of that batch, until a replacement enable event corresponding to another NFC tag of a normal product batch is received.
[0007] Preferably, the NFC chip has a communication port connected to the main communication antenna and a status detection port connected to the unpacking detection circuit; The main communication antenna is located in the area of the independent packaging that remains intact during the opening process. The opening detection loop includes a detection segment that spans the opening path, with both ends of the detection segment connected to the status detection port. Before the individual packaging is opened, the opening detection circuit is in a conductive state; after the individual packaging is opened along the opening path, the detection section breaks, causing the opening detection circuit to switch to an open state and remain open. The NFC chip generates an open detection status based on the on or off status detected by the status detection port, and sends the tag's unique identifier, read count value, and open detection status through the main communication antenna.
[0008] Preferably, establishing a mapping relationship includes: The product batch and product type of a single sanitary napkin are obtained from the production database, a single-piece issuance token is generated for the single sanitary napkin, and the unique identifier of the NFC tag to be set on the individual packaging is read. The server access address and the single-chip issuance token are combined to form NFC data exchange format data and written into the static issuance data area of the NFC chip; Write the tag's unique identifier, single-chip issuance token, product batch, product type, and reminder duration parameter determined based on the product type into the same mapping record; Read back the static issuance data area, perform consistency verification between the single-chip issuance token obtained from the readback and the single-chip issuance token in the mapping record, and lock the static issuance data area after the verification is consistent. The initial read count value of the NFC chip is written as the most recently valid read count value into the mapping record. The area that stores or generates the read count value and the unpacking detection status does not stop updating when the static release data area is locked.
[0009] Preferably, the mobile terminal generates a scanning session identifier when it detects an NFC tag, and keeps the scanning session identifier unchanged in each reading request generated before the end of the current NFC reading session. The reading request also includes the scanning session identifier and the request timestamp. The server verifies read requests, including: The mapping record is queried based on the single-chip issuance token, and it is determined whether the unique tag identifier in the read request is consistent with the unique tag identifier in the mapping record; Determine if the read count value is greater than the most recently valid read count value stored in the mapping record; Determine whether the unsealing detection status indicates that the unsealing detection circuit is in an open state; Determine whether the difference between the request timestamp and the time when the server receives the read request does not exceed the valid time limit of the read request. The valid time limit of the read request is determined based on the network transmission latency from the mobile terminal to the server recorded by the server in the historical statistical period. When all the above judgments are true, the unique identifier of the label, the read count value, the opening detection status, the scanning session identifier, and the validity period of the voucher are combined to form voucher data. The voucher data is digitally signed to generate a one-time scanning voucher. The one-time scanning voucher is registered as pending processing status, and the most recently valid read count value is updated with the read count value of this time. When a user ID corresponds to an activity usage record, the activity version ID of that activity usage record is written into the credential data.
[0010] Preferably, for one-time scanned credentials that are in a pending state, have passed digital signature verification, and have not exceeded their validity period, the server determines the event type in the following order: Determine whether the current NFC tag belongs to a product batch in a normal state, and whether the current NFC tag has established an exclusive activity association with a user identifier other than the current user identifier. If either determination is not true, it is determined to be an invalid read event. When there is no corresponding activity usage record for the current user ID, it is determined as an initial activation event; If there is an activity usage record corresponding to the current user ID, and the tag unique identifier of the current NFC tag is the same as the tag unique identifier in the activity usage record, it is determined to be a duplicate query event; When there is an activity usage record corresponding to the current user ID, and the tag unique identifier of the current NFC tag is different from the tag unique identifier in the activity usage record, it is determined as a replacement enable event; An invalid read event is determined when the read request fails verification, the digital signature verification of the one-time scan credential fails, the credential expires, or the status has been registered as completed.
[0011] Preferably, for the initial enable event, an exclusive activity association is indicated by an activity occupancy identifier, and the following is executed: Using the unique identifier of the current NFC tag as the unique constraint, create an activity occupancy identifier corresponding to the current NFC tag, the current user identifier, and the activity usage record. Set the activity occupancy identifier to the occupancy status and write it to the mapping record corresponding to the current NFC tag. If the creation of the activity occupancy identifier fails, this read will be determined as an invalid read event; if the creation of the activity occupancy identifier is successful, an activity version identifier will be generated, and the server receiving time of the first valid submission of the one-time scan credential will be written into the activity usage record as the start time. Obtain the reminder duration parameter based on the product type corresponding to the current NFC tag, determine the trigger time of the reminder task based on the start time and reminder duration parameter, and set a task version identifier for the reminder task that is consistent with the activity version identifier; While the active occupancy identifier is in an occupied state, the creation of an active usage record based on the current NFC tag by a user identifier other than the current user identifier is prohibited.
[0012] Preferably, for repeated query events, the server determines the remaining duration based on the difference between the trigger time of the reminder task and the current server time; When the server receives at least two one-time scan credential submissions with the same unique tag identifier and scan session identifier within the deduplication time window, the first submission received is treated as a pending submission, and the remaining submissions reuse the processing results of the pending submission. The event type is not determined again or the activity usage record is changed based on the remaining submissions. The deduplication time window is determined based on the maximum test interval between adjacent read callbacks generated by the mobile terminal in a single NFC read session. After completing the event processing for the pending submission, the one-time scan voucher is registered as processed and completed. If the one-time scan voucher that has been registered as processed and completed is submitted again after the deduplication time window has expired, the submission is determined as an invalid read event.
[0013] Preferably, for a change enable event, the server executes within the same transaction: Lock the mapping record corresponding to the previous activity usage record and the current NFC tag, and compare the activity version identifier bound to the one-time scan credential with the activity version identifier saved in the previous activity usage record; When the two activity version identifiers are the same, update the usage record of the previous activity to the end status, write the current server time into the usage record of the previous activity as the end time, determine the usage duration of the previous single sanitary napkin based on the start time and end time, and update the reminder task corresponding to the usage record of the previous activity to the expired status. Update the activity occupancy flag corresponding to the previous activity usage record to the released state, create the next activity usage record, its activity occupancy flag and reminder task, write the record flag of the previous activity usage record into the next activity usage record, and write the record flag of the next activity usage record into the previous activity usage record. The activity version identifier of the previous activity record is incremented by a version order value, and the activity version identifier of the subsequent activity record and its reminder task are made to use the incremented version order value. If any process within the same transaction fails, the status modifications to the activity usage records, activity occupancy flags, and reminder tasks already executed within that transaction are undone. When the version identifiers of the two activities are inconsistent, the current submission will be determined as an invalid read event, the switching of the usage records of the previous and next activities will not be performed, and the usage records of the previous activity, the activity occupation identifier, and the reminder task will remain unchanged.
[0014] Preferably, the server sets a batch status identifier and a batch status version identifier for each product batch. The batch status identifier includes normal status and abnormal batch status. When the batch status identifier of the target product batch is updated from normal to abnormal, the batch status version identifier of the target product batch is updated, and the activity usage records that belong to the target product batch and are in an occupied state are retrieved according to the mapping relationship between the product batch and the unique identifier of the tag. For the retrieved activity usage records, when the task version identifier of the reminder task matches the activity version identifier, the reminder task will be updated to an invalid state, and an abnormal batch replacement task containing the updated batch status version identifier and the target product batch will be created, using the update time of the batch status identifier as the trigger time. When a verified read request is received from the current user identifier to read another NFC tag, the batch status identifier of the product batch to which the other NFC tag belongs is determined. If the batch status identifier is in a normal state, the read request is determined as a replacement enable event. If the batch status identifier is in an abnormal batch state, the read request is determined as an invalid read event, and the original activity usage record, activity occupancy identifier, and abnormal batch replacement task remain unchanged. For invalid read events, the server generates an invalid read type based on the verification or status conditions that caused the event, writes the invalid read type, unique tag identifier, read count value, and server receiving time into the invalid read record, does not terminate the current activity usage record, does not remove its activity occupancy identifier, and does not change its valid reminder task.
[0015] An NFC-based system for sanitary napkin traceability, usage reminders, and data interaction, including NFC tags, mobile terminals, and servers; The NFC tag is set on the individual packaging of each sanitary napkin and includes an NFC chip, a main communication antenna, and an opening detection circuit. The opening detection circuit passes through the opening path of the individual packaging and undergoes an irreversible state change when opened. The main communication antenna remains readable after the state change. The NFC chip stores the tag's unique identifier and the single-piece issuance token, and outputs the read count value and the opening detection status. The mobile terminal includes an NFC reading unit and a communication unit. The NFC reading unit reads NFC tags, and the communication unit sends a reading request to the server containing the tag's unique identifier, a single-chip issuance token, a reading count value, and an open detection status during a user login session. The server includes a processor and memory. The memory stores the mapping relationship between the tag's unique identifier and the single-chip issuance token and parameters such as product batch, product type, and reminder duration, as well as the program instructions executed by the processor. When the processor executes program instructions, it verifies the read request and generates a one-time scan credential. Based on the activity usage record corresponding to the current user identifier, the current NFC tag, and the exclusive activity association, it determines the initial activation event, repeated query event, change activation event, or invalid read event. Based on the determined events, it creates, queries, or switches activity usage records and reminder tasks. When the product batch changes to an abnormal batch status, it disables the reminder task corresponding to the activity usage record of the sanitary napkins currently using that product batch, creates an abnormal batch change task, and prevents the creation of new activity usage records based on the NFC tag of that product batch.
[0016] In summary, the present invention has the following main beneficial effects: By placing an NFC tag with a main communication antenna and an opening detection circuit on the individual packaging of each sanitary napkin, the opening detection circuit undergoes an irreversible state change when the individual packaging is opened, while the main communication antenna remains readable after opening. The opening detection status, along with the tag's unique identifier, the single-packet issuance token, and the incrementing read count value, are used as the basis for determining the usage status. This differs from processing methods that rely solely on fixed URL access, ordinary scanning actions, or manual confirmation to start the timer. It achieves the effects of identifying the actual opening status of the individual packaging, eliminating accidental scanning of unopened packages and duplicate submission of old read data, and improving the authenticity and traceability of single-packet sanitary napkin usage start events.
[0017] By combining the activity usage records corresponding to the current user identifier, the correspondence between the current NFC tag and the activity usage records, and the exclusive activity association, the server determines the initial activation event, repeated query event, change activation event, and invalid read event, respectively. It also uses the scanning session identifier, one-time scanning credential, activity version identifier, and database transactions to complete the deduplication of reads and the switching between previous and previous activity usage records. This ensures that repeated readings of the same tag only return the remaining reminder duration without recalculating the start time. When reading the NFC tag of the next sanitary napkin, the previous activity usage record is simultaneously ended, the previous activity is released from occupation, and the next activity usage record and reminder task are created. This achieves the effect of avoiding repeated callbacks, concurrent submissions, and repeated timing, reminder time delays, repeated occupation of the same tag, and breakage of previous and previous usage records caused by multiple terminal operations.
[0018] By establishing a mapping relationship between the single-piece issuance token, the unique identifier of the tag, and parameters such as product batch, product type, and reminder duration, and when the product batch changes from a normal state to an abnormal batch state, the activity usage record of the sanitary napkins currently in use is located based on the activity occupancy status. This causes the original reminder task to become invalid, creates an abnormal batch replacement task, and prohibits the creation of new activity usage records based on the abnormal batch NFC tag. The activity status switch is completed only after another NFC tag of the normal state product batch is read. This achieves the effect of directly using product traceability data for reminder task control of currently used single-piece products, shortening the processing link between abnormal batch information and actual usage status, and forming a closed-loop association between production batches, single-piece products, and continuous usage records. Attached Figure Description
[0019] Figure 1 This is a flowchart of the method of the present invention.
[0020] Figure 2 This is a schematic diagram of the NFC tag and the individually packaged sanitary napkin of the present invention.
[0021] Figure 3 This is a schematic diagram of the main communication antenna and the opening detection circuit in the NFC tag of the present invention. Detailed Implementation
[0022] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0023] Example 1 refer to Figure 1 The NFC-based method for sanitary napkin traceability, usage reminders, and data interaction includes the following steps: S1: An NFC tag including an NFC chip, a main communication antenna, and an opening detection circuit is set on the individual packaging of a single sanitary napkin. The opening detection circuit passes through the opening path of the individual packaging and undergoes an irreversible state change when it is opened. The main communication antenna remains readable after the state change. S2: Establish a mapping relationship between the unique identifier of the NFC tag and the single-chip issuance token and the product batch, product type and reminder duration parameters, and store them on the server; S3: The mobile terminal reads the NFC tag and sends a read request containing the tag's unique identifier, a single-chip issuance token, a read count value, and an open detection status under the user login session; the server obtains the current user identifier from the user login session, and when the mapping relationship is established, the read count value is greater than the most recent valid read count value, and the open detection status indicates that the independent package has been opened, the server determines that the read request has passed the verification and generates a one-time scan credential. When the current user identifier corresponds to an activity usage record, the credential is bound to its activity version identifier; S4: For NFC tags that have passed verification, have not established exclusive activity associations with other user identifiers, and belong to a product batch in normal status, determine the initial activation event, repeat query event, or replacement activation event based on whether the current user identifier corresponds to an activity usage record and whether the NFC tag is the same as the NFC tag in the record; other read requests are determined as invalid read events. S5: For initial activation events, establish an exclusive activity association and create an activity usage record and reminder task; for repeated query events, return the remaining duration and keep the start time and trigger time unchanged; for change activation events, when the activity version identifier bound to the credential matches the activity version identifier stored on the server, end the previous activity usage record and invalidate its reminder task in the same transaction, establish the association between the previous and subsequent activity usage records, and create the next activity usage record and its reminder task; for invalid read events, keep the current activity usage record and its reminder task unchanged. S6: When a product batch changes to an abnormal batch status, the server disables the reminder task corresponding to the activity usage record of the sanitary napkins currently in use, creates an abnormal batch replacement task, and prohibits the creation of new activity usage records based on the NFC tag of that batch, until a replacement enable event corresponding to another NFC tag of a normal product batch is received.
[0024] This application uses an NFC tag set on the individual packaging of a single sanitary napkin as the data acquisition terminal for the identification of the single product and the opening status of the packaging, a mobile terminal as the near-field reading and network interaction terminal, and a server as the processing terminal for reading request verification, activity usage record management, reminder task management and product batch status linkage.
[0025] In this embodiment, the current NFC tag refers to the NFC tag read by the mobile terminal this time; the current user identifier refers to the user identifier obtained by the server from the user login session of the mobile terminal; the activity usage record refers to the record corresponding to a sanitary napkin that is currently in use and for which no end time has been written; exclusive activity association means that the same NFC tag is only allowed to establish an occupancy relationship with one activity usage record corresponding to the current user identifier at the same time; the reminder task refers to a timed task maintained by the server, which includes the task trigger time, task version identifier, and task status; the abnormal batch replacement task refers to the task used to replace the ordinary reminder task after the product batch changes from a normal state to an abnormal batch state.
[0026] This application does not use NFC tags merely as carriers of fixed web page addresses, nor does it directly consider the act of opening an application or web page on a mobile terminal as the start of sanitary napkin use. Instead, it uses the irreversible opening detection status of the individual packaging, the unique identifier of the tag, the single-piece issuance token, and the read count value as reading evidence. Furthermore, it combines the activity usage records in the server, exclusive activity associations, activity version identifiers, and product batch status to determine whether this reading can change the current usage status.
[0027] This embodiment of a sanitary napkin traceability, usage reminder, and data interaction system based on NFC includes an NFC tag, a mobile terminal, and a server.
[0028] The NFC tag is attached to the individual packaging of each sanitary napkin, with one NFC tag corresponding to each napkin. The NFC tag includes an NFC chip, a main communication antenna, and an open detection circuit. The NFC chip has a non-volatile storage area, a unique tag identifier output function, a read counting function, and an open status detection function. The main communication antenna obtains operating energy from the near-field radio frequency field generated by the mobile terminal and transmits data between the NFC chip and the mobile terminal. The open detection circuit detects whether the individual packaging has been opened along the opening path.
[0029] The mobile terminal is a smart terminal with NFC reading and network communication capabilities. The mobile terminal runs applications, mini-programs, or web pages invoked by the NFC tag, used to establish user login sessions, read NFC tags, generate scanning session identifiers, send reading requests, and display traceability information returned by the server, current usage status, and remaining time reminders.
[0030] The server includes a processor, memory, a communication interface, and a database. The memory stores program instructions executed by the processor. When the processor executes the program instructions, it performs tag issuance management, read request verification, one-time scan certificate management, event type determination, activity usage record management, exclusive activity association management, reminder task management, product batch status management, and invalid read record management.
[0031] Mobile terminals do not establish final activity usage records based on the terminal's local time, nor do they use local countdowns as the sole basis for reminder tasks. The start time, end time, reminder task trigger time, and product batch status update time of the activity usage record all use the server time to avoid inconsistencies caused by modifications to the mobile terminal's system time, clock discrepancies between different mobile terminals, or application closure.
[0032] In this embodiment, the NFC tag adopts a flexible layered structure, including a flexible substrate layer, a main communication antenna and an opening detection circuit formed on the flexible substrate layer, an NFC chip connected to the main communication antenna and the opening detection circuit, a protective film layer covering the main communication antenna and the opening detection circuit, and an adhesive layer disposed on the back of the flexible substrate layer.
[0033] As one specific implementation, the NFC tag body is circular with a diameter of 23 mm and an overall thickness of less than 1 mm, and the main communication antenna has a circular coil structure. These dimensions are derived from the mounting space and flexibility requirements of existing individually packaged sanitary napkins and are only used to illustrate a practically applicable structure; they do not constitute a limitation on the shape and size of the NFC tag.
[0034] The main communication antenna is positioned in the area that remains intact when the individual package is opened. The opening detection loop includes a detection section, a first connecting section, and a second connecting section. The detection section spans the opening path of the individual package, and the first and second connecting sections respectively connect the two ends of the detection section to the status detection port of the NFC chip.
[0035] The NFC chip's status detection port is equipped with a continuity detection circuit. When the individual packaging is unopened, the opening detection loop is complete, and the status detection port detects the first logic state. When the user tears open the individual packaging along the opening path, the detection segment breaks along with the packaging material, and the status detection port switches to the second logic state. The NFC chip encodes the first logic state as an unopened state and the second logic state as an opened state, and outputs the encoding result as the opening detection status.
[0036] Once the opening detection circuit is disconnected, it cannot be restored to its original conductive state without repairing the detection section. Therefore, this state change is an irreversible state change caused by the physical opening of the packaging.
[0037] The main communication antenna does not pass through the opening path of the individual packaging. Even after the opening detection circuit is disconnected, the main communication antenna maintains electrical continuity, and the NFC chip can still obtain operating power from the mobile terminal's radio frequency field, outputting the tag's unique identifier, read count value, and opening detection status. Therefore, even after the individual packaging is opened, the user can still read the same NFC tag again to check the remaining usage time, and can also switch between previous and subsequent usage records by reading the NFC tag of the next sanitary napkin.
[0038] The unsealing detection circuit can be formed using printed conductive ink, etched metal foil, or flexible conductive film. The NFC chip selected should have unsealing status detection and read count output capabilities. If existing writable NFC tags can only store fixed access addresses and lack the above functions, an NFC chip with a status detection port and read count function should be used instead. The result of accessing a fixed access address cannot be directly used as the unsealing detection status or new read evidence.
[0039] The NFC chip has an internal read counter area that stores a monotonically increasing read count value. The NFC chip is configured to increment the read count value after the mobile terminal completes a valid read of a specified data area.
[0040] A valid read refers to the complete reading process in which the NFC chip has completed the main communication antenna power supply, read command reception, and specified data return. Lower-level additional reads generated by the operating system during the same proximity process can cause the read count to continue increasing. Therefore, the server does not require the current read count to be equal to the most recent valid read count plus one; it only determines whether the current read count is greater than the most recent valid read count.
[0041] By adopting the above judgment method, on the one hand, it can accommodate additional low-level readings caused by the mobile terminal operating system during the same reading process, and on the other hand, it can refuse to resubmit the reading request using previously saved old tag data.
[0042] When an NFC chip is read by a mobile terminal, it outputs at least the tag's unique identifier, a single-chip issuance token, a read count value, and an open-seal detection status. The single-chip issuance token is stored in the static issuance data area, the tag's unique identifier is output from the NFC chip's read-only identifier area, the read count value is output from the read count area, and the open-seal detection status is generated based on the current status of the status detection port.
[0043] Each sanitary napkin has a unique label mapping record created during the packaging and production process. The server retrieves the product batch and product type corresponding to that sanitary napkin from the production database.
[0044] Product batch is used to determine the production batch and batch status of the sanitary napkin. Product type is used to query the reminder duration parameter corresponding to the product. Product type can distinguish between day use, night use, or other types with different reminder duration parameters, but the specific product model and specifications are defined in the product configuration record.
[0045] The server uses a cryptographically secure random number generator to generate a unique issuance token for each sanitary napkin and sets a uniqueness constraint on the unique issuance token field in the database. If the generated unique issuance token is duplicated with an existing token in the database, the server discards the current generation result and regenerates it until the uniqueness constraint is successfully written.
[0046] The production equipment reads the unique identifier of the NFC tag to be attached to the individual packaging. This unique identifier is a read-only chip identifier written during the manufacturing of the NFC chip; it cannot be modified by ordinary NFC write operations.
[0047] The server combines the server access address and the single-chip issuance token into static issuance data according to the NFC data exchange format and writes it into the static issuance data area of the NFC chip. Simultaneously, the server writes the tag's unique identifier, single-chip issuance token, product batch, product type, reminder duration parameters, and reminder parameter version into the tag mapping record.
[0048] After the writing is complete, the production equipment rereads the static issuance data area. The server performs a consistency check between the single-chip issuance token read back and the single-chip issuance token in the tag mapping record. If they match, the NFC tag is marked as having passed the issuance check, and the static issuance data area is locked; if they do not match or the readback fails, the NFC tag is not used in subsequent mounting processes, and the coding is re-executed or the NFC tag is replaced.
[0049] The locking area is limited to the static issuance data area of the storage server access address and the single-chip issuance token, excluding the read count area and the open detection status output area. After the static issuance data area is locked, the read count value can still be automatically updated by the NFC chip, and the open detection status can still change with the state of the open detection circuit.
[0050] The server reads the current read count value of the NFC chip and writes it as the initial read count value into the tag mapping record. This initial read count value is used to subsequently determine whether the current read count value has increased; it is not required that the initial read count values of all NFC tags be zero.
[0051] The tag mapping record includes at least the tag unique identifier, single-chip issuance token, product batch, product type, reminder duration parameter, reminder parameter version, most recently valid read count value, batch status identifier, batch status version identifier, and activity occupancy status.
[0052] The reminder duration parameter is not entered by the user each time the NFC tag is read, but is instead queried by the server based on the product type and reminder parameter version from the product parameter configuration record.
[0053] The product parameter configuration record includes the product type, reminder duration parameter, reminder parameter version, effective time, and data source identifier. The reminder duration parameter is determined by the product parameter management system based on the confirmed product user manual, product specifications, and verification materials generated by the applicant for the corresponding product type.
[0054] When the reminder duration parameter is updated, the server generates a new reminder parameter version and records the effective time. Newly created activity usage records after the update takes effect will use the new reminder parameter version; activity usage records created before the update will continue to use the reminder parameter version saved at the time of creation, and the reminder task trigger time will not be retrospectively modified during use.
[0055] The specific reminder duration for daytime, nighttime, and other product types should be based on the values recorded in the applicant's actual product configuration records. Without supporting product verification data, arbitrary experience durations should not be used as fixed parameters applicable to all products.
[0056] Before a mobile terminal reads an NFC tag, it establishes a user login session with the server via an application, mini-program, or web page. The user login session stores a login token issued by the server, which the server can use to query the current user's identifier.
[0057] The NFC tag does not contain the user's name, phone number, or current user identifier. The current user identifier is obtained by the server from the user's login session.
[0058] After the mobile terminal detects the NFC tag, it establishes an NFC read session and generates a scan session identifier. The scan session identifier remains unchanged until the NFC read session ends. During the same proximity process where the mobile terminal is still with the NFC tag, even if the operating system generates more than two read callbacks, each read request still carries the same scan session identifier.
[0059] When a user moves the mobile device away from the NFC tag and then brings it close again, the mobile device establishes a new NFC reading session and generates a new scanning session identifier, thereby distinguishing repeated callbacks during the same proximity process from the user's subsequent re-reading behavior.
[0060] The mobile terminal obtains the tag's unique identifier, single-chip issuance token, read count value, and unpacking detection status from the NFC tag, and also obtains the request timestamp. It then sends the above data, the scanning session identifier, and the login token together to the server as a read request.
[0061] After verifying the validity of the login token, the server retrieves the current user identifier from the user's login session. If the login token is invalid or the user's login session has expired, the active usage record processing flow is not initiated, and the mobile terminal needs to re-establish the user login session.
[0062] The server determines whether the difference between the request timestamp and the server's receiving time exceeds the validity period of the read request. The validity period of the read request is not an arbitrarily set fixed value, but is determined based on network transmission latency samples in the target mobile network and the target server environment.
[0063] The server records the network transmission latency experienced by a successfully verified read request from the mobile terminal to the server during a continuous operating cycle, forming a latency sample set. When forming the sample set, invalid samples resulting from mobile terminal offline status, server failure, expired login sessions, and active retries are removed.
[0064] Based on the target normal request coverage rate, the server determines the latency value that covers the proportion of normal requests from the latency sample set, and adds a safety margin to the latency value to absorb mobile terminal clock errors, server queuing latency and network instantaneous fluctuations, thus obtaining the effective time limit for read requests.
[0065] When the system is deployed for the first time and sufficient historical samples have not yet been formed, the initial value is determined by the latency sample obtained from the pre-deployment test in the target mobile network and server deployment environment; after sufficient operating samples are formed, the value is updated based on the actual operating samples.
[0066] The server queries the tag mapping record based on the single-chip issuance token in the read request, and performs the following verifications in sequence.
[0067] First, it checks whether the tag's unique identifier in the read request matches the tag's unique identifier in the retrieved tag mapping record. If they do not match, it means that the current NFC tag and the single-chip issuance token do not have a corresponding relationship established during production and issuance, and the read request verification fails.
[0068] Secondly, it checks whether the current read count is greater than the most recently valid read count stored in the tag mapping record. If the current read count is not greater than the most recently valid read count, it means that the read request used previously processed data, and the read request verification fails.
[0069] Next, determine whether the "opened detection status" indicates that the individual packaging has been opened. When the "opened detection status" indicates that the individual packaging has not been opened, the server can return the product batch, product type, and production information, but will not generate a one-time scan voucher for creating an activity usage record.
[0070] Finally, determine whether the request timestamp is within the valid time limit for the read request.
[0071] If all the above conditions are met, the server uses a conditional update method to write the current read count value into the tag mapping record as the new most recently valid read count value. During the conditional update, it also checks whether the most recently valid read count value in the database is still equal to the original value read at the start of this verification.
[0072] If other concurrent requests have already updated the most recently valid read count, the current condition update will fail, and the current read request cannot generate a one-time scan credential to change the activity's usage status.
[0073] After the read request is verified, the server generates a one-time scan credential.
[0074] The server serializes the tag unique identifier, read count value, opening detection status, scan session identifier, voucher identifier, voucher validity period, and activity version identifier in a fixed field order. If the current user identifier does not yet correspond to an activity usage record, the activity version identifier field is empty; if the current user identifier already corresponds to an activity usage record, the voucher data is bound to the current activity version identifier of that activity usage record.
[0075] The server generates a digital signature on the serialized credential data. In practice, this can be achieved by signing with the server's private key and verifying with the server's public key. The digital signature covers all status fields in the credential; if any field is modified, the digital signature verification will fail.
[0076] The server creates a voucher record for each one-time scan voucher. Voucher status includes pending, processing, completed, and failed status.
[0077] After a one-time scan credential is generated, it is set to a pending status. When the server begins event processing, it changes the status to "processing" via a conditional update. Upon successful event processing, the credential status is updated to "processing completed." If event processing is rolled back due to database write failure or alert task creation failure, the credential status is updated to "processing failed."
[0078] One-time scan credentials in a failed processing state can be restored to a pending state and reprocessed if they have not expired and the read count value has not been replaced by a subsequent read request. One-time scan credentials in a completed processing state cannot have their active usage record changed again.
[0079] The validity period of the credential is determined based on a sample of the actual operation time elapsed from when the mobile terminal completes NFC reading to when the credential is submitted. For mobile terminals that automatically submit after reading, the application launch time and network submission time are recorded; for mobile terminals that require user confirmation, the user confirmation time is also recorded. The server determines the corresponding duration based on the target normal operation coverage, and adds terminal scheduling and network fluctuation margins as the validity period of the credential.
[0080] After the server obtains a one-time scanned credential that is in a pending state, has passed digital signature verification, and has not exceeded its validity period, it determines the event type in the following order.
[0081] First, check the batch status of the product batch to which the current NFC tag belongs. If the product batch is in an abnormal batch status, this submission is determined to be an invalid read event.
[0082] Secondly, check whether the current NFC tag has established an exclusive activity association with a user identifier other than the current user identifier. If such an exclusive activity association exists, this submission is determined to be an invalid read event.
[0083] Under the condition that the product batch is in normal condition and the current NFC tag is not occupied by other user identifiers, query the activity usage records corresponding to the current user identifier.
[0084] If the current user identifier does not have a corresponding activity usage record, this read is determined to be an initial activation event.
[0085] If the current user ID corresponds to an activity usage record, and the unique identifier of the current NFC tag is the same as the unique identifier of the tag in the activity usage record, this read is determined to be a duplicate query event.
[0086] If the current user ID corresponds to an activity usage record, and the unique identifier of the current NFC tag is different from the unique identifier of the tag in the activity usage record, this read is determined to be a replacement activation event.
[0087] If the read request fails verification, the credential signature verification fails, the credential expires, the credential is already in the processing completed state, the current NFC tag is occupied by another user's identifier, or the product batch is in an abnormal batch state, this read is determined to be an invalid read event.
[0088] The server sets up a current activity table. The current activity table must include at least the current user identifier, the activity usage record identifier, and the activity version identifier, and a unique constraint must be set on the current user identifier field.
[0089] At any given time, there can be at most one record for the same current user ID in the current activity table. Therefore, at most one activity usage record can be associated with the same user at any given time.
[0090] When processing the initial activation event, the server first attempts to write the current user ID to the current activity table. If the current user ID already exists, the server does not create a second activity usage record, but instead reads the existing activity usage record from the current activity table and redetermines the event type.
[0091] When processing a change activation event, the current user's identifier in the current activity table is not deleted. Instead, within the same transaction, the activity usage record identifier is updated from the previous activity usage record to the next activity usage record, and the activity version identifier is also updated.
[0092] When the server processes the initial activation event, it creates an activity occupancy record, an activity usage record, a current activity record, and a reminder task within the same transaction.
[0093] An activity usage record must include at least a unique tag identifier, the current user identifier, an activity usage record identifier, and the usage status. The server sets a unique constraint on the unique identifier of tags in the usage status.
[0094] The server first creates an active occupancy record using the unique identifier of the current NFC tag and sets it to an occupied state. If an active occupancy record already exists for that tag's unique identifier, the creation fails, and the read operation is determined to be an invalid read event.
[0095] After the activity usage record is successfully created, the server creates the activity usage record. The activity usage record includes at least the record identifier, current user identifier, unique tag identifier, product batch, product type, reminder duration parameter, reminder parameter version, start time, activity status, and activity version identifier.
[0096] The start time of the activity usage record is the time when the server receives the first valid submission of the one-time scan credential. The server generates an initial activity version identifier for this activity usage record and writes the current user identifier, activity usage record identifier, and activity version identifier into the current activity table.
[0097] The server obtains the reminder duration parameter based on the product type and reminder parameter version, and determines the reminder task trigger time: ; In the formula, Indicates the reminder task trigger time; Indicates the start time of the activity's usage records; Indicates product type The reminder duration parameter corresponding to the current reminder parameter version.
[0098] The task version identifier for the reminder task should be consistent with the activity version identifier in the activity usage record.
[0099] If the creation of any of the activity occupancy record, activity usage record, current activity table record, or reminder task fails, the server rolls back the transaction and does not retain the created activity occupancy status or incomplete activity usage record.
[0100] For repeated query events, the server does not modify the start time, activity version identifier, or reminder task trigger time of the activity usage record. Instead, it determines the remaining duration based on the difference between the reminder task trigger time and the current server time and sends the remaining duration to the mobile terminal.
[0101] To handle repeated read callbacks generated by the mobile terminal during the same NFC proximity process, the server sets up a scan session processing table. The scan session processing table includes at least the tag unique identifier, scan session identifier, processing status, and processing result, and sets a uniqueness constraint on the combined value of the tag unique identifier and the scan session identifier.
[0102] When two or more requests submit the same unique tag identifier and scan session identifier concurrently, only one request will successfully establish a scan session processing record and obtain the qualification for initial processing. The remaining requests will query the established scan session processing record and reuse its processing result after the initial request is processed, without re-determining the event type or changing the activity usage record again.
[0103] The deduplication time window is determined based on the adjacent read callback intervals generated by the target mobile terminal during the same proximity process. During the test, the adjacent callback intervals during the period when the mobile terminal is not removed from the NFC tag are recorded. The upper limit covering all normal callback intervals is taken, and the terminal thread scheduling and network submission fluctuation margin is added as the deduplication time window.
[0104] After the deduplication time window expires, when the user re-reads the same NFC tag, the mobile terminal generates a new scanning session identifier, and the NFC chip outputs a new read count value. The server identifies this read as a new duplicate query event, but does not reset the start time of the activity usage record or the reminder task trigger time.
[0105] The Change Activation event is used to end the activity usage record corresponding to the previous sanitary napkin and create the next activity usage record corresponding to the current NFC tag.
[0106] When the server starts to change the enabled transaction, it locks the record corresponding to the current user identifier in the current activity table, the previous activity usage record, the previous activity occupancy record, the tag mapping record of the current NFC tag, and the activity occupancy record of the current NFC tag.
[0107] The server compares the activity version identifier bound to the one-time scan credential, the activity version identifier in the current activity table, and the activity version identifier in the previous activity usage record. If all three match, it means that the activity usage status of the current user has not been changed by other requests since the one-time scan credential was generated.
[0108] Before creating the next activity usage record, the server queries the batch status and batch status version identifier of the product batch to which the current NFC tag belongs again. If the product batch has changed from a normal status to an abnormal batch status, the replacement activation transaction is terminated, and this read is determined to be an invalid read event.
[0109] When both the activity version identifier and the product batch status meet the conditions, the server performs the following processing within the same transaction: Update the previous activity's usage record to the "Ended" status, write the current server time to the "Ended" time, and determine the actual usage time of the previous sanitary napkin based on the start and end times. Update the reminder task corresponding to the previous activity's usage record to an expired status; Update the previous activity's occupation record to a released status; Create an active occupancy record for the current NFC tag, indicating that it is currently in use. Create a record of the next activity's usage and a reminder task for the next activity; Write the record identifier of the previous activity's record to the record of the next activity's record, and write the record identifier of the next activity's record to the record of the previous activity's record; Update the current activity table to point to the usage record of the next activity; Add an activity version identifier, and make the usage records of the next activity and the next reminder task use the added activity version identifier.
[0110] If any database write, activity occupancy creation, or alert task creation fails within a transaction, the server rolls back all state modifications. After the transaction rollback, the previous activity usage record, the previous activity occupancy record, the previous alert task, and the activity version identifier all retain their state before the transaction began.
[0111] If the activity version identifier bound to the one-time scan credential is inconsistent with the activity version identifier currently stored on the server, the switching of the previous and next activity usage records will not be performed, and this submission will be determined as an invalid read event.
[0112] The reminder task executor retrieves reminder tasks to be executed based on the task trigger time. Before executing a regular reminder task, the server re-queries the activity usage records, the current activity table, and the product batch status.
[0113] The server will only send a usage reminder to the mobile terminal when the activity usage record is still active, the task version identifier of the reminder task matches the activity version identifier of the activity usage record, the current activity table still points to the activity usage record, and the corresponding product batch is still in normal status.
[0114] If any condition is not met, the server updates the reminder task to an invalid state and no longer sends regular reminders. Therefore, even if a previous reminder task is retrieved again due to a task queue delay, a reminder for the previous sanitary napkin will not be sent to users who have already changed their sanitary napkins.
[0115] The server sets a batch status identifier and a batch status version identifier for each product batch. The batch status identifier includes normal status and abnormal batch status.
[0116] Product batch status is submitted by the quality management terminal with operating permissions based on the actual quality management results. After the server verifies the operating permissions and the target product batch, it changes the batch status through condition updates. The batch status version identifier increments for each valid change; the batch status version identifier does not increment if the status change transaction is not committed.
[0117] After the target product batch changes from a normal status to an abnormal batch status, the server retrieves the activity usage records that belong to the product batch and whose activity occupancy status is occupied, based on the mapping relationship between the product batch and the unique identifier of the tag.
[0118] For the retrieved activity usage records, the server compares the task version identifier of the regular reminder task with the activity version identifier of the activity usage record. If they match, the regular reminder task is updated to an invalid state, and an abnormal batch replacement task is created using the product batch status update time as the trigger time.
[0119] The abnormal batch replacement task saves the batch status version identifier at the time of creation. Before the task is executed, the server queries the current batch status and batch status version identifier again. If the current batch is still in an abnormal batch status and the version has not changed, the abnormal batch replacement task is executed; if the batch status or version has changed, the decision to continue execution is recalculated based on the latest batch status.
[0120] Once a target product batch enters an abnormal batch status, the server prohibits the creation of new activity usage records based on NFC tags from that batch. Even if a user reads another NFC tag from the same abnormal batch and the reading evidence is verified, a replacement activation event cannot be generated.
[0121] When a user reads another NFC tag belonging to a normal product batch, the server terminates the activity usage record corresponding to the abnormal batch according to the replacement activation event, and creates the next activity usage record corresponding to the NFC tag of the normal batch.
[0122] The server will determine the current read request or credential submission as an invalid read event if any of the following occurs: The mapping relationship between the unique tag identifier and the single-chip issuance token is invalid; The read count value is not greater than the most recent valid read count value; The "opened" status does not indicate that the individual packaging has been opened. The request timestamp has exceeded the validity period of the read request; One-time scanned credential digital signature verification failed; The scanned receipt has exceeded its validity period. The one-time scanned voucher has already been processed and does not belong to the result reuse request within the deduplication time window; The current NFC tag has established an exclusive activity association with a user identifier other than the current user identifier; The current batch of the NFC tag is in an abnormal batch status; When the replacement is enabled, the active version identifier bound to the one-time scan credential is inconsistent with the active version identifier currently stored on the server; Before the transaction commit was enabled, the batch status or batch status version of the product batch to which the current NFC tag belongs had changed.
[0123] The server generates an invalid read type based on specific judgment conditions and writes the invalid read type, tag unique identifier, read count value, scan session identifier, anonymization result of the current user identifier, and server reception time into the invalid read record.
[0124] For invalid read events, the server does not terminate the current activity's usage record, release the current activity's occupied state, modify the activity version identifier, recalculate the reminder task trigger time, or create a new ordinary reminder task.
[0125] After reading the NFC tag, the Android mobile terminal can automatically launch the application and, if there is already a valid user login session, automatically submit a reading request and a one-time scan credential.
[0126] For mobile devices requiring user confirmation, a confirmation page is displayed after reading the NFC tag. The user then confirms and submits a one-time scan credential. The server does not use the confirmation page opening time as the start time of the activity usage record; instead, it uses the server's receipt time of the first valid submission of the one-time scan credential as the start time.
[0127] When the mobile terminal's network is unavailable, no locally valid activity usage record is established, nor is a local countdown used to replace server reminders. The mobile terminal prompts the user to re-read the NFC tag after the network is restored to avoid conflicts between the local activity state formed during offline periods and the exclusive activity association in the server.
[0128] The flexible NFC tag used in this embodiment has a nominal reading distance of 0 to 5 centimeters. Before actual mass production, the NFC tag was affixed to the individual packaging of a real sanitary napkin for testing.
[0129] During testing, the NFC sensing area of the mobile terminal is oriented towards the main communication antenna, and the distance between them is gradually increased from the initial contact position. Readings are repeated at each test distance, and a successful read is determined by the mobile terminal obtaining the tag's unique identifier, read count value, and unpacking detection status, and the server being able to retrieve the correct tag mapping record.
[0130] The test conditions include at least the following states: unopened in individual packaging, opened in packaging, under normal bending conditions, and slightly damp surface conditions. The final stable reading distance was determined based on the test results of actual samples.
[0131] A reading success rate of over 90% is required. Only after the applicant obtains the corresponding sample quantity, number of tests, mobile terminal model, packaging status, and test result records can the data be recorded as implementation data. If there are no actual test records, only the test methods and design objectives are recorded, and the design objectives are not described as technical results that have been achieved.
[0132] Taking the first NFC tag, the second NFC tag, and the third NFC tag as examples, each corresponding to three sanitary napkins used consecutively.
[0133] When the individual packaging containing the first NFC tag is not opened, the mobile terminal reads the first NFC tag. The server obtains the opening detection status indicating that the opening detection circuit is active, and only returns the product batch and product type, without creating an activity usage record.
[0134] After the user opens the individual package along the opening path, the opening detection circuit is disconnected, but the main communication antenna remains readable. The mobile terminal re-reads the first NFC tag, and the NFC chip outputs an increased read count value and an indication that the opening detection has been activated. The server verifies the tag's unique identifier, the single-chip issuance token, the read count value, and the opening detection status, generating a one-time scanning credential.
[0135] The current user identifier has no corresponding activity usage record, and the first NFC tag is not occupied by other user identifiers. The server determines this read as the initial activation event and creates an activity occupancy record, a first activity usage record, a current activity record, and a first reminder task.
[0136] When the user reads the first NFC tag again, the server finds that the tag unique identifier in the current activity usage record is still the tag unique identifier of the first NFC tag. It then determines this read as a duplicate query event, returns the remaining duration of the first reminder task, and does not modify the start time of the first activity usage record or the trigger time of the first reminder task.
[0137] After the user opens a sanitary napkin, they read the second NFC tag. The server verifies that the product batch to which the second NFC tag belongs is in normal condition and that the second NFC tag is not occupied by other user tags, and then determines this read as a replacement activation event.
[0138] The server compares the activity version identifier bound to the one-time scan credential with the current activity version identifier of the first activity usage record. Within the same transaction, it terminates the first activity usage record, invalidates the first reminder task, releases the activity occupancy status of the first NFC tag, creates the second activity usage record and the second reminder task corresponding to the second NFC tag, and establishes the sequential association between the first activity usage record and the second activity usage record.
[0139] When the product batch to which the second NFC tag belongs changes from a normal batch status to an abnormal batch status, the server disables the second reminder task and creates an abnormal batch replacement task, while prohibiting other NFC tags in the abnormal batch from creating new activity usage records.
[0140] After the user reads the third NFC tag of a product batch that is in normal condition, the server terminates the second activity usage record according to the replacement activation event, releases the activity occupation status of the second NFC tag, and creates the third activity usage record and third reminder task corresponding to the third NFC tag.
[0141] In the above process, the unpacking detection status determines whether the physical conditions for establishing a usage status are met; the tag's unique identifier, single-chip issuance token, and read count value determine whether the read data originates from an issued and bound NFC tag that has not yet been processed; the exclusive activity association determines whether the same NFC tag can be repeatedly used by another user; the activity version identifier determines whether concurrent requests are still based on the current activity status; and the product batch status determines whether the current NFC tag allows the creation of new activity usage records and whether the current reminder task remains valid. These technical features are continuously involved in the creation, querying, switching, and abnormal batch processing of activity usage records, and are not simply a parallel function of tracing, timed reminders, and batch notifications.
[0142] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A method for traceability, usage reminders, and data interaction of sanitary napkins based on NFC, characterized in that, Includes the following steps: S1: An NFC tag including an NFC chip, a main communication antenna, and an opening detection circuit is set on the individual packaging of a single sanitary napkin. The opening detection circuit passes through the opening path of the individual packaging and undergoes an irreversible state change when it is opened. The main communication antenna remains readable after the state change. S2: Establish a mapping relationship between the unique identifier of the NFC tag and the single-chip issuance token and the product batch, product type and reminder duration parameters, and store them on the server; S3: The mobile terminal reads the NFC tag and sends a read request containing the tag's unique identifier, a single-chip issuance token, a read count value, and an open detection status under the user login session; the server obtains the current user identifier from the user login session, and when the mapping relationship is established, the read count value is greater than the most recent valid read count value, and the open detection status indicates that the independent package has been opened, the server determines that the read request has passed the verification and generates a one-time scan credential. When the current user identifier corresponds to an activity usage record, the credential is bound to its activity version identifier; S4: For NFC tags that have passed verification, have not established exclusive activity associations with other user identifiers, and belong to a product batch in normal status, determine the initial activation event, repeated query event, or replacement activation event based on whether the current user identifier corresponds to an activity usage record and whether the NFC tag is the same as the NFC tag in the record. The remaining read requests were determined to be invalid read events; S5: For initial activation events, establish an exclusive activity association and create an activity usage record and reminder task; for repeated query events, return the remaining duration and keep the start time and trigger time unchanged; for change activation events, when the activity version identifier bound to the credential matches the activity version identifier stored on the server, end the previous activity usage record and invalidate its reminder task in the same transaction, establish the association between the previous and subsequent activity usage records, and create the next activity usage record and its reminder task; for invalid read events, keep the current activity usage record and its reminder task unchanged. S6: When a product batch changes to an abnormal batch status, the server disables the reminder task corresponding to the activity usage record of the sanitary napkins currently in use, creates an abnormal batch replacement task, and prohibits the creation of new activity usage records based on the NFC tag of that batch, until a replacement enable event corresponding to another NFC tag of a normal product batch is received.
2. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 1, characterized in that, The NFC chip has a communication port connected to the main communication antenna and a status detection port connected to the unpacking detection circuit; The main communication antenna is located in the area of the independent packaging that remains intact during the opening process. The opening detection loop includes a detection segment that spans the opening path, with both ends of the detection segment connected to the status detection port. Before the individual packaging is opened, the opening detection circuit is in a conductive state; after the individual packaging is opened along the opening path, the detection section breaks, causing the opening detection circuit to switch to an open state and remain open. The NFC chip generates an open detection status based on the on or off status detected by the status detection port, and sends the tag's unique identifier, read count value, and open detection status through the main communication antenna.
3. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 2, characterized in that, Establishing a mapping relationship includes: The product batch and product type of a single sanitary napkin are obtained from the production database, a single-piece issuance token is generated for the single sanitary napkin, and the unique identifier of the NFC tag to be set on the individual packaging is read. The server access address and the single-chip issuance token are combined to form NFC data exchange format data and written into the static issuance data area of the NFC chip; Write the tag's unique identifier, single-chip issuance token, product batch, product type, and reminder duration parameter determined based on the product type into the same mapping record; Read back the static issuance data area, perform consistency verification between the single-chip issuance token obtained from the readback and the single-chip issuance token in the mapping record, and lock the static issuance data area after the verification is consistent. The initial read count value of the NFC chip is written as the most recently valid read count value into the mapping record. The area that stores or generates the read count value and the unpacking detection status does not stop updating when the static release data area is locked.
4. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 3, characterized in that, When the mobile terminal detects an NFC tag, it generates a scanning session identifier and keeps the scanning session identifier unchanged in each reading request generated before the end of the NFC reading session. The reading request also includes the scanning session identifier and the request timestamp. The server verifies read requests, including: The mapping record is queried based on the single-chip issuance token, and it is determined whether the unique tag identifier in the read request is consistent with the unique tag identifier in the mapping record; Determine if the read count value is greater than the most recently valid read count value stored in the mapping record; Determine whether the unsealing detection status indicates that the unsealing detection circuit is in an open state; Determine whether the difference between the request timestamp and the time when the server receives the read request does not exceed the valid time limit of the read request. The valid time limit of the read request is determined based on the network transmission latency from the mobile terminal to the server recorded by the server in the historical statistical period. When all the above judgments are true, the unique identifier of the label, the read count value, the opening detection status, the scanning session identifier, and the validity period of the voucher are combined to form voucher data. The voucher data is digitally signed to generate a one-time scanning voucher. The one-time scanning voucher is registered as pending processing status, and the most recently valid read count value is updated with the read count value of this time. When a user ID corresponds to an activity usage record, the activity version ID of that activity usage record is written into the credential data.
5. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 4, characterized in that, For one-time scanned credentials that are in a pending state, have passed digital signature verification, and have not exceeded their validity period, the server determines the event type in the following order: Determine whether the current NFC tag belongs to a product batch in a normal state, and whether the current NFC tag has established an exclusive activity association with a user identifier other than the current user identifier. If either determination is not true, it is determined to be an invalid read event. When there is no corresponding activity usage record for the current user ID, it is determined as an initial activation event; If there is an activity usage record corresponding to the current user ID, and the tag unique identifier of the current NFC tag is the same as the tag unique identifier in the activity usage record, it is determined to be a duplicate query event; When there is an activity usage record corresponding to the current user ID, and the tag unique identifier of the current NFC tag is different from the tag unique identifier in the activity usage record, it is determined as a replacement enable event; An invalid read event is determined when the read request fails verification, the digital signature verification of the one-time scan credential fails, the credential expires, or the status has been registered as completed.
6. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 5, characterized in that, For the initial enable event, an exclusive activity association is indicated by an activity occupancy identifier, and the following is executed: Using the unique identifier of the current NFC tag as the unique constraint, create an activity occupancy identifier corresponding to the current NFC tag, the current user identifier, and the activity usage record. Set the activity occupancy identifier to the occupancy status and write it to the mapping record corresponding to the current NFC tag. If the activity occupancy identifier creation fails, this read will be determined as an invalid read event; When the activity occupancy identifier is successfully created, an activity version identifier is generated, and the server receiving time of the first valid submission of the one-time scan credential is written as the start time into the activity usage record; Obtain the reminder duration parameter based on the product type corresponding to the current NFC tag, determine the trigger time of the reminder task based on the start time and reminder duration parameter, and set a task version identifier for the reminder task that is consistent with the activity version identifier; While the active occupancy identifier is in an occupied state, the creation of an active usage record based on the current NFC tag by a user identifier other than the current user identifier is prohibited.
7. The method for NFC-based sanitary napkin traceability, usage reminders, and data interaction according to claim 6, characterized in that, For repeated query events, the server determines the remaining duration based on the difference between the trigger time of the reminder task and the current server time; When the server receives at least two one-time scan credential submissions with the same unique tag identifier and scan session identifier within the deduplication time window, the first submission received is treated as a pending submission, and the remaining submissions reuse the processing results of the pending submission. The event type is not determined again or the activity usage record is changed based on the remaining submissions. The deduplication time window is determined based on the maximum test interval between adjacent read callbacks generated by the mobile terminal in a single NFC read session. After completing the event processing for the pending submission, the one-time scan voucher is registered as processed and completed. If the one-time scan voucher that has been registered as processed and completed is submitted again after the deduplication time window has expired, the submission is determined as an invalid read event.
8. The method for NFC-based traceability, usage reminders, and data interaction of sanitary napkins according to claim 7, characterized in that, For the change enable event, the server executes within the same transaction: Lock the mapping record corresponding to the previous activity usage record and the current NFC tag, and compare the activity version identifier bound to the one-time scan credential with the activity version identifier saved in the previous activity usage record; When the two activity version identifiers are the same, update the usage record of the previous activity to the end status, write the current server time into the usage record of the previous activity as the end time, determine the usage duration of the previous single sanitary napkin based on the start time and end time, and update the reminder task corresponding to the usage record of the previous activity to the expired status. Update the activity occupancy flag corresponding to the previous activity usage record to the released state, create the next activity usage record, its activity occupancy flag and reminder task, write the record flag of the previous activity usage record into the next activity usage record, and write the record flag of the next activity usage record into the previous activity usage record. The activity version identifier of the previous activity record is incremented by a version order value, and the activity version identifier of the subsequent activity record and its reminder task are made to use the incremented version order value. If any process within the same transaction fails, the status modifications to the activity usage records, activity occupancy flags, and reminder tasks already executed within that transaction are undone. When the version identifiers of the two activities are inconsistent, the current submission will be determined as an invalid read event, the switching of the usage records of the previous and next activities will not be performed, and the usage records of the previous activity, the activity occupation identifier, and the reminder task will remain unchanged.
9. A method for NFC-based traceability, usage reminders, and data interaction of sanitary napkins according to claim 8, characterized in that, The server sets batch status identifiers and batch status version identifiers for each product batch. The batch status identifiers include normal status and abnormal batch status. When the batch status identifier of the target product batch is updated from normal to abnormal, the batch status version identifier of the target product batch is updated, and the activity usage records that belong to the target product batch and are in an occupied state are retrieved according to the mapping relationship between the product batch and the unique identifier of the tag. For the retrieved activity usage records, when the task version identifier of the reminder task matches the activity version identifier, the reminder task will be updated to an invalid state, and an abnormal batch replacement task containing the updated batch status version identifier and the target product batch will be created, using the update time of the batch status identifier as the trigger time. When a verified read request is received from another NFC tag using the current user identifier, the batch status identifier of the product batch to which the other NFC tag belongs is determined; if the batch status identifier is in a normal state, the read request is determined as a replacement enable event; When the batch status is marked as an abnormal batch status, the read request is determined as an invalid read event, and the original activity usage record, activity occupation flag, and abnormal batch replacement task remain unchanged. For invalid read events, the server generates an invalid read type based on the verification or status conditions that caused the event, writes the invalid read type, unique tag identifier, read count value, and server receiving time into the invalid read record, does not terminate the current activity usage record, does not remove its activity occupancy identifier, and does not change its valid reminder task.
10. An NFC-based sanitary napkin traceability, usage reminder, and data interaction system, applicable to the NFC-based sanitary napkin traceability, usage reminder, and data interaction method described in any one of claims 1-9, characterized in that, Includes NFC tags, mobile terminals, and servers; The NFC tag is set on the individual packaging of each sanitary napkin and includes an NFC chip, a main communication antenna, and an opening detection circuit. The opening detection circuit passes through the opening path of the individual packaging and undergoes an irreversible state change when opened. The main communication antenna remains readable after the state change. The NFC chip stores the tag's unique identifier and the single-piece issuance token, and outputs the read count value and the opening detection status. The mobile terminal includes an NFC reading unit and a communication unit. The NFC reading unit reads NFC tags, and the communication unit sends a reading request to the server containing the tag's unique identifier, a single-chip issuance token, a reading count value, and an open detection status during a user login session. The server includes a processor and memory. The memory stores the mapping relationship between the tag's unique identifier and the single-chip issuance token and parameters such as product batch, product type, and reminder duration, as well as the program instructions executed by the processor. When the processor executes program instructions, it verifies the read request and generates a one-time scan credential. Based on the activity usage record corresponding to the current user identifier, the current NFC tag, and the exclusive activity association, it determines the initial activation event, repeated query event, change activation event, or invalid read event. Based on the determined events, it creates, queries, or switches activity usage records and reminder tasks. When the product batch changes to an abnormal batch status, it disables the reminder task corresponding to the activity usage record of the sanitary napkins currently using that product batch, creates an abnormal batch change task, and prevents the creation of new activity usage records based on the NFC tag of that product batch.