A Chinese herbal medicine warehouse entry scanning and acceptance method based on AI identification of medicinal pieces
By using dedicated mobile terminals and AI recognition technology, combined with a blockchain traceability platform, the problems of low efficiency and difficulty in tracing the quality of Chinese herbal medicine pieces during warehousing and acceptance have been solved, realizing intelligent, differentiated, and traceable acceptance management of Chinese herbal medicine pieces.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- THE FIRST AFFILIATED HOSPITAL OF TIANJIN UNIV OF TRADITIONAL CHINESE MEDICINE
- Filing Date
- 2026-02-25
- Publication Date
- 2026-06-12
Smart Images

Figure CN122201666A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for scanning and accepting Chinese herbal medicines into a warehouse based on AI to identify the quality of medicinal slices, belonging to the field of quality control technology. Background Technology
[0002] In the process of digital transformation of the traditional Chinese medicine industry, the accuracy and reliability of the acceptance process for processed Chinese medicinal herbs, as the core material carrier for clinical medication, are the key cornerstones for ensuring drug quality and patient medication safety. Currently, hospital pharmacies generally face the management challenges of complex specifications, large batches, and high similarity in appearance of processed medicinal herbs. The traditional acceptance model relies heavily on the personal experience and subjective visual judgment of the acceptance personnel, combined with manual record-keeping. This method is not only inefficient, but also prone to quality misjudgment due to individual differences in judgment, which may lead to the risk of substandard or adulterated processed medicinal herbs entering the clinical setting. At the same time, with the gradual standardization and rigid requirements of the state for the management of the expiration date of processed Chinese medicinal herbs, the accurate identification and proactive control of drugs nearing their expiration date has become an urgent need for pharmacy management. However, existing technologies are insufficient to meet the needs of this refined management.
[0003] From a technical application perspective, while barcode-based traceability systems achieve information recording in the upstream of the supply chain, there are functional gaps at the critical node of hospital warehousing and acceptance. Existing barcode scanning devices often only have basic information reading functions and cannot simultaneously complete the closed-loop operation of quantity verification, quality assessment, and anomaly feedback at the moment of scanning. Especially in the core link of determining the authenticity and quality of medicinal slices, traditional methods lack objective quantitative tools, making it difficult to accurately identify key quality attributes such as the place of origin, growth years, and processing technology of medicinal slices. In addition, when dealing with multiple boxes of medicinal slices from the same batch, existing equipment needs to scan each box individually, which is cumbersome and has a significant efficiency bottleneck, seriously restricting the automation and intelligence level of large-scale warehousing operations.
[0004] A deeper problem lies in the lack of a systematic solution in the existing technological system. While general mobile terminals integrate photography and internet connectivity, they lack specialized AI recognition capabilities for the morphological characteristics of Chinese herbal medicine slices, making intelligent identification and grading based on indicators such as cross-sectional color and texture impossible. Furthermore, expiration date information is not effectively integrated into the dynamic acceptance logic, hindering real-time warnings and interception. Most importantly, key data such as the responsible parties, timelines, and quality judgment criteria throughout the acceptance process are not linked to the drug traceability chain in real-time and tamper-proofly. This results in a blurred chain of responsibility regarding who inspects, what is inspected, and the outcome, making it difficult to achieve the management goals of full-process traceability and accountability. Therefore, a comprehensive solution that deeply integrates intelligent identification, expiration date management, batch operations, and full-process traceability is urgently needed to systematically overcome the series of challenges in the current acceptance of herbal medicine slices, including difficulty in quality control, expiration date management, low efficiency, and incomplete traceability. Summary of the Invention
[0005] To achieve the above objectives, this application provides the following technical solution: A method for scanning and accepting Chinese herbal medicines into a warehouse based on AI to identify the quality of processed medicinal herbs is applied to the acceptance process of processed medicinal herbs in a hospital pharmacy. The method includes: S1, in response to the arrival and warehousing of Chinese herbal medicine pieces, the inspection personnel use a dedicated mobile terminal to scan the barcode information on the outer packaging of the herbal medicine pieces to be inspected, obtain the herbal medicine piece identification information, batch information and expiration date information embedded in the herbal medicine pieces, and automatically match the herbal medicine piece identification information with the warehousing task order to be inspected in the hospital information system, triggering the AI-assisted inspection process for the batch of herbal medicine pieces; S2, based on the herbal medicine identification information, the dedicated mobile terminal accesses and associates with the AI identification feature database in the background. The dedicated mobile terminal retrieves the corresponding standard identification feature from the AI identification feature database as the quality comparison benchmark for this acceptance based on the herbal medicine identification information and the target standard category. S3, the terminal camera captures images of the medicinal slices, and the integrated AI recognition model is called to perform real-time analysis of the captured images and extract the measured morphological features of the current medicinal slices; S4, compare the extracted measured morphological features with the quality comparison benchmark and calculate the compliance. According to the differentiated quality acceptance standards defined for different standard categories, classify the compliance calculation results and output the quality grade judgment result of the current batch of medicinal slices. S5, the dedicated mobile terminal calculates the expiration information with the current system time, and if it is close to the expiration date, it generates and displays a warning prompt of the corresponding level according to the preset close expiration date threshold. S6. Based on the quality level judgment result and the warning prompt fed back by the dedicated mobile terminal, the acceptance personnel confirm the final acceptance conclusion on the terminal, package and generate the acceptance transaction record, and upload it to the blockchain traceability platform for evidence storage, thus completing the information on-chain of the warehousing acceptance process.
[0006] Furthermore, S1 includes: When the medicinal slices to be inspected are multiple boxes from the same batch, the inspectors use the multi-box concurrent scanning mode of the dedicated mobile terminal to scan the medicinal slices on the outer packaging boxes of multiple medicinal slices side by side at the same time. The terminal identifies multiple independent barcode areas using image segmentation technology and decodes them to obtain the herbal medicine identification information, batch information, and expiration date information of all boxes at once. The system automatically verifies the batch consistency of information for multiple containers, and triggers the AI-assisted acceptance process only when all container information is consistent.
[0007] Furthermore, S2 includes: S21. In the management backend of the AI identification feature database, multiple dimensions of quality attributes are predefined for each type of Chinese herbal medicine slice. Based on the feature information of the slice's color, cross-section, and texture, corresponding quality acceptance strategies are set. S22, after the dedicated mobile terminal obtains the herbal medicine identification information and matches it with the task order to be inspected and put into storage, it parses out the target standard category. The dedicated mobile terminal sends a query request to the AI identification feature database. The query request carries the herbal medicine identification information and the target standard category code. The AI identification feature database locates the standard identification feature data of the herbal medicine based on the herbal medicine identification information. At the same time, based on the combination of the herbal medicine identification information and the target standard category code, it retrieves and returns the corresponding quality acceptance strategy. S23, the dedicated mobile terminal receives the standard identification feature data and the quality acceptance strategy and integrates them to generate the quality comparison benchmark.
[0008] Furthermore, S4 includes: S41, the dedicated mobile terminal calls its integrated AI recognition model to analyze the acquired images. For appearance images, the model identifies the overall color distribution, shape regularity, and surface texture features of the slices and quantifies them into a first set of feature vectors. For close-up images of specific parts, the model focuses on analyzing the color uniformity, texture clarity, vascular bundle arrangement, and presence of mold or insect damage on the cross-section or fracture surface of the slices and quantifies them into a second set of feature vectors. The AI recognition model compares the first set of feature vectors and the second set of feature vectors with the corresponding standard feature vectors in the retrieved quality comparison benchmark one by one and calculates the similarity score for each feature dimension. S42, the dedicated mobile terminal performs a weighted comprehensive evaluation of the calculated similarity scores of each dimension based on the key dimensions marked in the quality comparison benchmark. For features marked as key dimensions, the similarity score has a higher weight in the comprehensive evaluation or needs to meet an independent minimum threshold requirement. The comprehensive evaluation algorithm calculates the final comprehensive compliance score according to the rules set in the quality acceptance strategy. S43, the grading logic module built into the dedicated mobile terminal determines the quality level based on the comprehensive compliance score and with reference to the preset grading threshold in the quality acceptance strategy. If the comprehensive compliance score is higher than the threshold for meeting the requirements and all key dimensions meet their independent threshold requirements, it is determined to meet the requirements of the current standard category. If the comprehensive compliance score is between the thresholds for meeting and not meeting the requirements, or if any key dimension does not meet its independent threshold, it is determined to not meet the requirements of the current standard category. If, during the image analysis process, the AI recognition model detects serious discrepancies with the baseline features or the presence of typical inferior adulteration features, it directly triggers a quality anomaly judgment.
[0009] Furthermore, the method also includes S7: Enhancing the on-site acceptance assessment information by uploading it to the blockchain; When the acceptance personnel make on-site judgments based on the feedback information from the terminal, if they have no objection to the AI judgment result, they can directly confirm it. If the acceptance personnel find subtle quality issues that the AI has not captured, the dedicated mobile terminal provides an interactive entry point for adding on-site evaluation opinions. Through this entrance, the inspection personnel can record an audio description or take high-definition supplementary photos focusing on the suspicious areas, and add text annotations. When the acceptance personnel confirm the final acceptance conclusion, the dedicated mobile terminal packages the voice description, supplementary photos, and text annotations as attachments to the on-site manual evaluation, along with the key data, and includes the data feature summary in the acceptance transaction record, and uploads it to the blockchain traceability platform.
[0010] Furthermore, in S6, if the acceptance personnel, based on the quality grade determination result, determine that the product does not meet the current standard category requirements or has quality abnormalities, and make a decision to reject or conditionally accept the product, the method further includes: The dedicated mobile terminal pops up an anomaly handling form, requiring the acceptance personnel to select or fill in specific reasons from a preset list of anomaly reasons. The list of anomaly reasons includes multiple items such as quality not meeting the target medicinal slice requirements, suspected adulteration, obvious inferior characteristics, damaged or contaminated packaging, and expiration date being too close. After the acceptance personnel complete the form, the terminal marks the final conclusion of this acceptance as an abnormal acceptance and binds the selected reason for the abnormality and the handling decision to the acceptance transaction record. After being uploaded to the blockchain traceability platform, it triggers alert notifications to the hospital's internal pharmacy management system and external supplier management system; The status of this batch of medicinal slices on the traceability chain has been updated to "abnormal warehousing and acceptance," and the specific reasons for the abnormality and the handling results have been linked to restrict its entry into the subsequent normal inventory distribution process until a pharmaceutical management personnel with higher authority reviews and removes the status.
[0011] Furthermore, when further processing is required for medicinal slices marked as abnormal acceptance due to non-compliance with target quality requirements or suspected adulteration, if it is decided to allocate the batch of medicinal slices to other standard categories, a cross-category re-inspection process will be initiated: Authorized pharmaceutical management personnel can specify new target standard categories in the system; Based on the new target standard category, the quality acceptance standard corresponding to the new standard category is retrieved from the AI identification feature database, and the AI recognition model re-determines the quality level based on the new quality comparison benchmark. If the reassessment result is found to meet the current standard category requirements, a new re-inspection pass record will be generated after confirmation by the pharmaceutical management personnel, and a link will be formed on the blockchain with the original abnormal acceptance record. The new record specifies the re-inspection time, the re-inspection personnel, the adjusted target standard category, and the new judgment result; The status of this batch of medicinal slices on the traceability chain is updated based on the new records, allowing it to enter the inventory pool for the new standard category.
[0012] Furthermore, the specific tiered early warning logic of S5 is as follows: S51, in the dedicated mobile terminal or the server management backend connected thereto, configure multi-level early warning thresholds for the expiration date management of traditional Chinese medicine decoction pieces, including at least a first early warning threshold and a second early warning threshold. The first early warning threshold represents the expiration date that needs to be generally concerned, and the second early warning threshold represents the expiration date that needs to be highly concerned and may require emergency treatment. The remaining time represented by the second early warning threshold is shorter than the first early warning threshold. S52, the dedicated mobile terminal accurately parses the production date and expiration date of the batch of Chinese herbal medicine slices by scanning the expiration date text on the packaging or by OCR recognition, and calculates the number of days remaining from the current system date to the expiration date. S53, compare the remaining days with the preset first warning threshold and second warning threshold. If the remaining days are greater than the first warning threshold, the expiration date warning will not be triggered. If the remaining days are less than or equal to the first warning threshold and greater than the second warning threshold, a first-level expiration date warning will be triggered. The dedicated mobile terminal displays the expiration date information with gentle visual prompts on the display interface and marks the near expiration date. It also suggests prioritizing its use after it is put into storage. S54, if the remaining days are less than or equal to the second warning threshold, a level two expiration date warning is triggered. The dedicated mobile terminal provides a strong warning with prominent visual and auditory prompts on the interface, displays the expiration date in red, and automatically locks the acceptance conclusion. The acceptance personnel are required to contact the person in charge of the pharmacy for approval and record the approval result on the terminal to complete the final acceptance confirmation operation.
[0013] Furthermore, for Chinese herbal medicine slices that are rejected during the acceptance process due to quality or expiration date issues and need to be returned to the supplier, a reverse information chain binding is executed when the slices are actually returned from the warehouse: Warehouse management personnel use the dedicated mobile terminal to scan the rejected batch of medicinal herbs, triggering a return operation. The dedicated mobile terminal accesses the blockchain traceability platform to retrieve the acceptance transaction records corresponding to the abnormal acceptance of the batch of medicinal slices. Managers fill in the actual number of returned items, the reason for return, and the carrier information on the terminal, and take pictures of the returned medicinal slices being loaded or transported. The terminal generates a record of the return and outbound transaction of medicinal slices, which includes the outbound information and is strongly linked to the previous abnormal inbound acceptance record through a blockchain pointer. After the records of the returned medicinal slices are uploaded to the blockchain traceability platform, the platform adds a new node indicating that the slices have been returned to the supplier after the original abnormal entry and acceptance node in the traceability chain of that batch of medicinal slices. This forms a complete and tamper-proof closed-loop information chain of responsibility from entry and acceptance to abnormality discovery and physical return, which can be used for subsequent supply chain traceability and quality management audits.
[0014] Furthermore, after the medicinal slices have been inspected and put into storage, the method also supports a traceability-based clinical drug use quality feedback loop, specifically including: When a physician or pharmacist raises objections to the quality of Chinese herbal medicine slices that have been inspected, stored and distributed to clinical departments during clinical use, they can initiate a quality appeal in the clinical information system by entering the relevant batch information and a description of the specific problem. Based on the batch information, the acceptance transaction record corresponding to the batch of medicinal slices can be located by accessing the blockchain traceability platform; The hospital's pharmacy department quality management personnel reviewed the record to check the details of the AI judgment during the receiving and acceptance process, the summary of image features collected on-site, the information of the acceptance personnel, and whether there were any on-site manual assessment attachments. Based on the tamper-proof quality records stored on the blockchain, management personnel can review them to determine whether the quality problems originated from misjudgments during the warehousing and acceptance process, changes during storage, or other reasons. The review results and handling measures were recorded and linked to the blockchain traceability chain of that batch of medicinal slices, forming a new clinical quality feedback node.
[0015] This invention relates to a method for scanning and accepting Chinese herbal medicines into storage based on AI to identify the quality of processed medicinal herbs. Belonging to the field of quality control technology, the method involves scanning processed medicinal herbs using a dedicated mobile terminal, associating the storage task with the target standard category, and then retrieving differentiated quality acceptance standards corresponding to that standard category from an AI identification feature database. The terminal's integrated AI model intelligently analyzes the appearance and cross-sectional images of the processed herbs collected on-site, extracting measured morphological features and comparing them with standard features based on standard category compliance for grading. Simultaneously, the method automatically verifies the expiration date and triggers graded warnings. Complete acceptance data, including quality judgment results, expiration date status, and operation records, is packaged and uploaded to a blockchain platform for evidence storage, achieving intelligent, differentiated, and traceable management of the entire storage and acceptance process. This invention is particularly suitable for scenarios involving precise quality acceptance of a wide variety of Chinese herbal medicines with diverse characteristics. Attached Figure Description
[0016] Figure 1 A flowchart illustrating the workflow of a Chinese herbal medicine warehousing scanning and acceptance method based on AI for identifying the quality of medicinal slices, as claimed in an embodiment of the present invention. Figure 2 The second workflow diagram of a Chinese herbal medicine warehousing scanning and acceptance method based on AI to identify the quality of medicinal slices, as claimed in the embodiments of the present invention; Figure 3 The third workflow diagram of a Chinese herbal medicine warehousing scanning and acceptance method based on AI to identify the quality of medicinal slices, as claimed in the embodiments of the present invention; Figure 4 The fourth workflow diagram is shown for a Chinese herbal medicine warehousing scanning and acceptance method based on AI to identify the quality of medicinal slices, as claimed in the embodiments of the present invention. Detailed Implementation
[0017] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.
[0018] The terms "first," "second," and "third" in this application are for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined as "first," "second," or "third" may explicitly or implicitly include at least one of those features. In the description of this application, "multiple" means at least two, such as two, three, etc., unless otherwise explicitly specified. All directional indications in the embodiments of this application, such as up, down, left, right, front, back, etc., are only used to explain the relative positional relationships and movements between components in a specific orientation as shown in the accompanying drawings. If the specific orientation changes, the directional indications will change accordingly. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0019] References to embodiments herein mean that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a mutually exclusive, independent, or alternative embodiment. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0020] According to the first embodiment of the present invention, referring to Figure 1 This invention claims protection for a method for scanning and accepting Chinese herbal medicines into a warehouse based on AI to identify the quality of medicinal herbs. This method is applied to the acceptance process of Chinese herbal medicines in hospital pharmacies and includes: S1, in response to the arrival and warehousing of Chinese herbal medicine pieces, the inspection personnel use a dedicated mobile terminal to scan the barcode information on the outer packaging of the herbal medicine pieces to be inspected, obtain the herbal medicine piece identification information, batch information and expiration date information embedded in the herbal medicine pieces, and automatically match the herbal medicine piece identification information with the warehousing task order to be inspected in the hospital information system, triggering the AI-assisted inspection process for that batch of herbal medicine pieces; S2. Based on the herbal medicine slice identification information, the dedicated mobile terminal accesses and associates with the AI identification feature database in the background. The dedicated mobile terminal retrieves the corresponding standard identification features from the AI identification feature database based on the herbal medicine slice identification information and the target standard category as the quality comparison benchmark for this acceptance. S3 captures images of the medicinal slices through the terminal camera, calls the integrated AI recognition model to perform real-time analysis of the captured images, and extracts the measured morphological features of the current medicinal slices. S4. The extracted measured morphological features are compared with the quality comparison benchmark and the compliance is calculated. Based on the differentiated quality acceptance standards defined for different standard categories, the compliance calculation results are graded and the quality grade judgment result of the current batch of medicinal slices is output. S5, the dedicated mobile terminal calculates the expiration date information with the current system time, and if it is close to the expiration date, it generates and displays the corresponding level of warning prompt according to the preset close expiration date threshold. S6. Based on the quality level assessment results and warning prompts fed back by the dedicated mobile terminal, the acceptance personnel confirm the final acceptance conclusion on the terminal, package and generate the acceptance transaction record, and upload it to the blockchain traceability platform for evidence storage, thus completing the information on-chain of the warehousing acceptance process.
[0021] In this embodiment, in response to the arrival and warehousing of Chinese herbal medicine pieces, the receiving personnel use a dedicated mobile terminal device to launch its built-in acceptance application and enter the barcode scanning interface; they scan the barcode information of the Chinese herbal medicine pieces, which conforms to the national drug traceability system standards and is pre-affixed to the outer packaging of the pieces to be inspected; the dedicated mobile terminal captures the barcode image through its image sensor, and parses the barcode using a local decoding library to extract the generic name, specifications, production batch number, manufacturer code, and expiration date of the herbal medicine pieces, collectively referred to as herbal medicine piece identification information, batch information, and expiration date information; after parsing, the dedicated mobile terminal automatically establishes a data connection with the hospital's internal pharmacy management system via a wireless network, sending the generic name and production batch number of the herbal medicine pieces as key query fields to the system service. The system server searches its database of pending inbound tasks to see if any pending inbound task orders with the exact same generic name and production batch number exist. If found, the search is successful, and the system server sends the detailed information of the task order to a dedicated mobile terminal. The detailed information includes the planned inbound quantity, storage location information, and the target standard category code associated with the procurement of this batch of medicinal slices. If not found, the terminal displays a "no matching task" message and pauses the subsequent process. After a successful match, the acceptance application interface automatically redirects and pops up a prompt box, clearly displaying the associated medicinal slice information, batch, and target standard category. After the acceptance personnel confirm that everything is correct, they manually click the "Start AI Acceptance" button to officially trigger the AI-assisted acceptance process for this batch of medicinal slices.
[0022] After triggering the AI-assisted acceptance process, the dedicated mobile terminal first generates a structured data query request based on the common name of the herbal slices. This request is sent via a secure application programming interface to an AI identification feature database deployed on the hospital's intranet or a certified cloud server. The database is a specially constructed relational database, whose core data table pre-stores a massive number of standard feature entries for Chinese herbal medicines. Each entry is associated with a specific herbal slice, and further, sub-tables record the standard morphological feature data of the herbal slice under different origins, different growth years, and different processing techniques. These feature data are stored in the form of structured feature vectors and corresponding standard reference image feature summaries. At the same time, another associated data table stores a standard category-quality requirement mapping predefined by the hospital's pharmacy department. The rules are as follows: for the same type of medicinal slice, differentiated quality acceptance benchmark parameters are set for different standard categories commonly used in treatment; the dedicated mobile terminal carries the common name of the medicinal slice and the received target standard category code in the query request; after receiving the request, the AI identification feature database performs a joint query operation: first, it locates the main feature record of the medicinal slice based on the common name of the medicinal slice, and then finds the specific quality acceptance benchmark parameters bound to the medicinal slice and the standard category based on the target standard category code; the query result is encapsulated into a data packet and returned to the terminal. This data packet contains a standard feature vector set for comparison, key quality dimension weight indicators, and feature conformity grading thresholds for the standard category. These three together constitute the dynamic quality comparison benchmark used in this acceptance.
[0023] The dedicated mobile terminal's application interface enters a guided data acquisition mode. The interface first prompts the inspector to take a comprehensive photo of the entire box or bag of medicinal slices. The terminal's camera activates, and the application uses augmented reality technology to display a standard frame in the viewfinder, guiding the user to place the entire package or loose stack of medicinal slices within the frame. After ensuring even lighting, the image is automatically or manually taken to generate an overall appearance image. Subsequently, the interface prompts for detailed feature acquisition, instructing the inspector to randomly select a specified number of individual medicinal slices from the batch to be inspected, break them off or utilize existing cross-sections, and align the cross-section with the camera. The terminal application activates macro shooting mode and may automatically trigger a supplementary light to ensure clear cross-sectional details. The inspector takes one or more close-up images of specific areas. Simultaneously with image acquisition, the terminal application analyzes data from S1. The system directly reads the expiration date information. After image acquisition, the terminal calls its locally integrated or server-integrated dedicated AI recognition model, which has been pre-loaded with a feature extraction architecture compatible with the AI identification feature database. The model analyzes the overall appearance image, identifies the main color spectrum distribution of the main body of the medicinal slices, the overall regularity of the shape, and whether there are abnormal spots or impurities that are not the product on the surface, and outputs a quantitative overall feature descriptor. The model analyzes close-up images of specific parts, focusing on the cross-sectional area, identifying its color uniformity, the texture direction and clarity of the xylem and phloem, the arrangement density and morphology of the vessels or secretory tissues, and whether there are insect holes, mold hyphae or artificial staining traces, and outputs a quantitative detailed feature descriptor. These descriptors together constitute the set of measured morphological features of the current batch of medicinal slices.
[0024] The processing logic unit within the dedicated mobile terminal initiates a comparison program. It compares the obtained set of measured morphological features with the standard feature vector set in the acquired dynamic quality comparison benchmark item by item. The comparison process is not a simple equality check, but rather calculates the deviation between the measured value and the standard value for each feature dimension. Subsequently, based on the weighting indicators of the key quality dimensions in the dynamic quality comparison benchmark, the processing logic unit weights and synthesizes the deviations of each feature dimension to calculate an overall quality deviation index. Then, this overall quality deviation index is compared with the preset feature conformity grading threshold for that standard category in the dynamic quality comparison benchmark. The grading threshold typically includes a high-quality admission threshold and a minimum acceptance threshold. If the overall quality deviation index is superior... If the overall quality deviation index is within the high-quality admission threshold, the result is determined as meeting the current standard category requirements of high quality. If the overall quality deviation index is between the high-quality admission threshold and the minimum acceptance threshold, the result is determined as meeting the current standard category requirements of qualified. If the overall quality deviation index is worse than the minimum acceptance threshold, the result is determined as not meeting the current standard category requirements. In addition, during the comparison process, if the AI recognition model finds abnormal features in the measured features that highly match the typical adulteration or inferior features recorded in the standard feature library, such as detecting the spectral reflectance features of alum over-polishing or the abnormal color feature vector of excessive sulfur fumigation, the system will directly trigger and output the judgment result of quality abnormality, regardless of the overall deviation index, and indicate the type of abnormal feature in the result.
[0025] When parsing the expiration date information, the dedicated mobile terminal converts it into an internal date and time object. Simultaneously or subsequently, the terminal application calls a date calculation function, using the current system date and the expiration date to calculate the remaining days. The terminal has an internally pre-configured or synchronized expiration date warning strategy, which defines at least two warning levels and corresponding day thresholds. The terminal compares the calculated remaining days with these thresholds: if the remaining days are greater than the first-level warning threshold, the expiration status is marked as normal, with no special prompt; if the remaining days are less than or equal to the first-level warning threshold but greater than the second-level warning threshold, the expiration status is marked as nearing expiration, and the terminal displays the expiration information in prominent yellow text or an icon on the results interface, along with a text prompt suggesting priority use; if the remaining days are less than or equal to the second-level warning threshold, the expiration status is marked as nearing expiration, and the terminal displays a flashing red warning box, possibly emitting a sound prompt, and simultaneously generates a strong prompt requiring approval before acceptance. This expiration status and warning level are recorded.
[0026] The dedicated mobile terminal's application interface comprehensively displays the quality grade judgment results, expiration date status, and early warning information. The interface also provides an area for acceptance personnel to input or confirm the actual quantity of goods counted. After reviewing all information, the acceptance personnel select the final acceptance conclusion on the terminal interface. Conclusion options include "Accepted," "Conditional Acceptance (conditions to be filled in)," or "Rejected." Regardless of the chosen conclusion, once the acceptance personnel click the "Confirm Complete" button, the dedicated mobile terminal begins packaging the data. It creates a structured acceptance transaction record object containing the following fields: herbal medicine identification information and batch information, expiration date information and AI-extracted morphological feature summary (not the original image), quality grade judgment results and detailed comparison scores, expiration date status, the quantity of goods entered by the acceptance personnel and the selected final acceptance conclusion, the personnel ID performing the operation, and a timestamp accurate to the second. Subsequently, the terminal uses an encryption protocol to send the acceptance transaction record object to a blockchain node deployed in the hospital. This node assembles the recorded data into a new block transaction, verifies it through a consensus mechanism, and appends it to the blockchain dedicated to drug traceability, generating a unique, tamper-proof transaction hash as a digital credential for this warehousing and acceptance operation, completing the information upload to the blockchain.
[0027] Furthermore, referring to Figure 2 In S1, it includes: When the medicinal slices to be inspected are in multiple boxes from the same batch, the inspectors use a dedicated mobile terminal in multi-box concurrent scanning mode to scan the medicinal slices on the outer packaging boxes of multiple medicinal slices side by side at the same time. The terminal uses image segmentation technology to identify multiple independent barcode areas and decode them, obtaining all the herbal medicine identification information, batch information, and expiration date information of all boxes at once; The system automatically verifies the batch consistency of information for multiple containers, and triggers the AI-assisted acceptance process only when all container information is consistent.
[0028] In this embodiment, when multiple boxes of medicinal herbs are from the same batch, the inspector selects the batch scanning mode in the dedicated mobile terminal inspection application. In this mode, the terminal camera maintains continuous viewing and activates a multi-target detection algorithm. The inspector places the sides of multiple boxes of medicinal herbs from the same batch, with the sides labeled with the medicinal herbs, side by side within the camera's field of view. The terminal processes the video stream in real time, and its multi-target detection algorithm identifies all rectangular areas in the field of view that match the barcode shape, and independently locates and crops each area. Then, the terminal calls multiple barcode decoding threads in parallel, simultaneously processing these cropped barcode image areas and attempting to decode them. After successful decoding, the terminal collects all successfully decoded text information, namely the medicinal herb identification information, batch information, and expiration date information corresponding to each box. Next, the terminal internally executes a verification example. The process involves extracting the production batch number from the first successfully decoded barcode as the baseline batch number, and then comparing it with the production batch numbers in all subsequent barcode decoding information to ensure they are identical. Simultaneously, it verifies the consistency of the generic name and specifications of the medicinal slices in all barcodes. If the batch number, name, and specifications of all boxes are completely consistent, the terminal interface displays "Batch Verification Passed, X Boxes in Total," and automatically treats these boxes as a single acceptance batch, triggering only one subsequent AI-assisted acceptance process. The sample images collected and the resulting quality judgments in this process will represent and be applied to all boxes in this overall batch. If the verification finds inconsistencies in batch number or product name information, the terminal immediately issues a warning and lists the inconsistent box information, requiring acceptance personnel to handle them separately, thereby ensuring data consistency during batch scanning and the uniformity of acceptance conclusions.
[0029] Furthermore, referring to Figure 3 S2 includes: S21. In the management backend of the AI identification feature database, multiple dimensions of quality attributes are predefined for each type of Chinese herbal medicine slice. Based on the characteristic information of the slice's color, cross-section, and texture, corresponding quality acceptance strategies are set. S22, after the dedicated mobile terminal obtains the herbal medicine identification information and matches it with the task order to be inspected and put into storage, it parses out the target standard category. The dedicated mobile terminal sends a query request to the AI identification feature database. The query request carries the herbal medicine identification information and the target standard category code. The AI identification feature database locates the standard identification feature data of the herbal medicine based on the herbal medicine identification information. At the same time, based on the combination of the herbal medicine identification information and the target standard category code, it retrieves and returns the corresponding quality acceptance strategy. S23, the dedicated mobile terminal receives standard identification feature data and quality acceptance strategy, integrates them, and generates a quality comparison benchmark.
[0030] In this embodiment, on the dedicated management backend of the artificial intelligence identification feature database (hereinafter referred to as the database), the operator first predefines the basic data and rules for each type of Chinese herbal medicine slice that requires digital quality control. This definition process is specifically divided into two logical levels.
[0031] The first level defines the multi-dimensional quality attributes of the medicinal slices. These attributes are digital descriptions formed by the structured decomposition of the visual, physical, and even necessary simple chemical or olfactory characteristics of the medicinal slices, based on professional knowledge of traditional Chinese medicine identification. Specifically, the dimensions may include, but are not limited to: 1) Morphological dimension, such as the specific shape of the medicinal slices (slices, segments, blocks, shreds, etc.), size specifications (length, thickness, diameter), surface texture characteristics (smoothness, roughness, wrinkles, grooves, and edge morphology); 2) Color dimension, i.e., the standard color description of the surface and cross-section of the medicinal slices, and the color uniformity requirements under natural light or standard light sources; 3) Texture and odor dimension, such as the hardness, brittleness, toughness, and feel of the medicinal slices, and the specific odor characteristics that should be present through friction, breaking, or smelling. Under each dimension, one or more attribute parameters will be set that can be identified and recorded by image analysis, sensors, or manual input interfaces.
[0032] The second level involves setting differentiated quality acceptance strategies for different clinical applications of the herbal medicine slices. The specific logic is as follows: operators need to analyze at least two different standard categories commonly used in TCM clinical practice for the treatment of this herbal medicine slice. These standard categories can be divided according to different principles, such as: a) systemic classification based on the treated disease or syndrome, such as for respiratory diseases or digestive diseases; b) based on different classic formulas or prepared medicine requirements, such as applicable to formula A or formula B; c) based on different treatment emphases, such as emphasizing heat clearing or blood activating. For each defined standard category, an independent quality acceptance strategy is established. This strategy is a set of rules, the core of which is to clarify: under the specific treatment requirements corresponding to the current standard category, which of the aforementioned quality attributes are critical attributes that must be strictly met, and which are general attributes for reference; for critical attributes, how to set the acceptable parameter value fluctuation range and acceptance threshold; and the priority weight of different attributes in the comprehensive evaluation. For example, for the same medicinal slice, when used to treat lung-heat cough, a bright yellow color might be used as a key attribute with a strict range of color values; while when used to treat blood deficiency and chlorosis, more emphasis might be placed on morphological integrity and specific odor concentration, with a more relaxed acceptance threshold for color. These strategy rules, customized for each standard category, are stored in the database along with the medicinal slice identification information.
[0033] When a dedicated mobile terminal, such as an industrial tablet or smartphone equipped with a high-definition camera, near-field communication module, and dedicated application, begins operations at the warehouse acceptance site, it first obtains the identification information of the batch of Chinese herbal medicine pieces from the packaging or accompanying documents by scanning QR codes, recognizing barcodes, or reading RFID tags. This information typically includes a unique code for the herbal medicine variety, batch number, etc. Subsequently, the mobile terminal automatically compares and matches this identification information with the current acceptance task order. The task order specifies the intended production or clinical use for this acceptance. Upon successful matching, the mobile terminal parses the target standard category to be followed for this acceptance from the task order; this category is represented by a specific code.
[0034] Next, the mobile terminal initiates a structured query request to the AI identification feature database deployed remotely or locally. This query request is sent in the form of a data packet, which explicitly carries at least two core data items: one is the herbal medicine identification information obtained from the physical packaging; the other is the target standard category code parsed from the task order.
[0035] Upon receiving the query request, the server of the AI identification feature database triggers a parallel retrieval process. Retrieval Path 1: Based on the medicinal slice identification information, primarily the variety code, in the query request, a search is performed in the main table of medicinal slice features in the database to quickly locate and lock onto the complete set of standard identification feature data corresponding to that variety of medicinal slice. This data includes the standard quality attribute descriptions and their benchmark parameter values for all dimensions of the medicinal slice, as predefined in step S21, such as standard morphological image sets, standard color code ranges, and standard odor characteristic spectra. Retrieval Path 2: Simultaneously, based on the combination of the medicinal slice identification information and the target standard category code, a joint search is performed in the strategy rule association table of the database. This association table uses the medicinal slice identification information + standard category code as a composite index key to find and precisely match the detailed set of quality acceptance strategy rules specifically tailored for this variety of medicinal slice and applicable to the target application standard category.
[0036] Finally, the database encapsulates the results obtained from the two retrieval paths—namely, the standard identification feature data and the quality acceptance strategy that precisely corresponds to the acceptance target—and returns them to the dedicated mobile terminal that initiated the query.
[0037] After receiving the standard identification feature data and quality acceptance strategy data returned by the database, the dedicated mobile terminal does not present them independently, but instead initiates a local integration processing flow to generate a quality comparison benchmark that directly guides on-site acceptance operations.
[0038] The integration process follows a clear logical sequence: First, a baseline framework is established using standard identification feature data, which lists all quality attributes to be examined and their standard values. Then, the quality acceptance strategy is overridden onto this baseline framework as a rule mapping. Specifically, each attribute within the framework is marked and its parameters adjusted according to the rules in the strategy. For example, key attributes specified in the strategy are marked as highlighted or mandatory; upper and lower limits of permissible deviation are added to the standard attribute values based on the acceptance thresholds set by the strategy; and a reference weight coefficient is assigned to each attribute for subsequent comprehensive scoring or judgment based on the consideration priorities specified in the strategy.
[0039] After completing the mapping and assignment, the mobile application automatically generates a structured, user-friendly quality comparison benchmark interface. This benchmark may be presented as an interactive checklist, a standard image comparison view with annotations, or a parameter table. Each attribute to be inspected clearly displays its standard reference, allowable range, and importance level. This generated quality comparison benchmark provides on-site acceptance personnel with a dynamic, fully adapted digital standard operating procedure guide tailored to the specific variety of medicinal slices being inspected and its intended use, serving as the basis for subsequent actual sample characteristic collection and comparison.
[0040] Furthermore, referring to Figure 4 S4 includes: S41, the dedicated mobile terminal calls its integrated AI recognition model to analyze the captured images. For appearance images, the model identifies the overall color distribution, shape regularity, and surface texture features of the slices and quantifies them into the first set of feature vectors. For close-up images of specific parts, the model focuses on analyzing the color uniformity, texture clarity, vascular bundle arrangement, and presence of mold or insect damage on the cross-section or fracture surface of the slices and quantifies them into the second set of feature vectors. The AI recognition model compares the first and second set of feature vectors with the corresponding standard feature vectors in the retrieved quality comparison benchmark one by one and calculates the similarity score for each feature dimension. S42, the dedicated mobile terminal performs a weighted comprehensive evaluation of the calculated similarity scores of each dimension based on the key dimensions marked in the quality comparison benchmark. For features marked as key dimensions, the similarity score has a higher weight in the comprehensive evaluation or needs to meet an independent minimum threshold requirement. The comprehensive evaluation algorithm calculates the final comprehensive compliance score according to the rules set in the quality acceptance strategy. S43, the built-in hierarchical logic module of the dedicated mobile terminal determines the quality level based on the comprehensive compliance score and with reference to the preset hierarchical thresholds in the quality acceptance strategy. If the comprehensive compliance score is higher than the threshold for meeting the requirements and all key dimensions meet their independent threshold requirements, it is determined to meet the requirements of the current standard category. If the comprehensive compliance score is between the thresholds for meeting and not meeting the requirements, or if any key dimension does not meet its independent threshold, it is determined to not meet the requirements of the current standard category. If, during the image analysis process, the AI recognition model detects serious discrepancies with the baseline features or the presence of typical inferior adulteration features, it directly triggers a quality anomaly judgment.
[0041] In this embodiment, within the dedicated mobile terminal, after the AI recognition model of S3 completes analysis and outputs the measured morphological feature set, a dedicated feature comparison engine is activated. This engine first reads the basic standard feature vector from the dynamic object of the quality comparison benchmark. For each feature dimension to be compared, such as the overall color hue, the engine obtains the corresponding color vector in the measured feature set, such as the Lab color space value, and calculates the Euclidean distance between it and the pre-stored standard color center value of the herbal slice in the standard feature vector, obtaining a distance value D_color. Since the color may vary within a certain range, the engine maps this distance value D_color to a preset scoring scale of 0-100 points; the greater the distance, the higher the score. Smaller dimensions score higher, resulting in a similarity score S_color for that dimension. Similarly, for cross-sectional texture sharpness, which is a classification or ranking feature, the AI model might output a sharpness level such as 1-5. The comparison engine directly calculates the absolute difference between the measured level and the standard level, and then converts it into a similarity score S_texture. For diameter, the measured value is a specific numerical value. The comparison engine checks whether the value falls within the standard range. If it does, the score S_diameter is full; if it deviates, the score is deducted linearly according to the degree of deviation. This process is performed one by one on each dimension defined in the standard feature vector and existing in the measured feature set, generating a list containing the original similarity scores for each dimension.
[0042] The feature comparison engine then reads the key dimension indicators and weight coefficient table from the dynamic object of the quality comparison benchmark. It first performs a veto check on key dimensions: it iterates through all key dimensions marked as true, checking whether the calculated raw similarity score reaches the minimum threshold set for that dimension in the dimension threshold table. If the score of any key dimension is lower than its minimum threshold, regardless of the scores of other dimensions, the engine will directly set a flag and jump to S43 to trigger the non-compliance or quality anomaly judgment logic. If all key dimensions pass the minimum threshold check, the engine enters the weighted comprehensive calculation stage. It weights the raw similarity score of each dimension according to the weights defined in the weight coefficient table. The weights of key dimensions are usually significantly higher than those of non-key dimensions. The weighted scores of each dimension are summed and then divided by the total weight to obtain a weighted average comprehensive quality score Q, typically ranging from 0 to 100. This score Q reflects the overall quality compliance of the tested samples after considering the clinical importance weight.
[0043] The dedicated mobile terminal application has a pre-built judgment logic module. This module receives the output from S42, including a Boolean value indicating whether all key dimensions have passed, and the overall quality score Q if calculated. Simultaneously, the module also receives the preset grading thresholds for the current standard category from the dynamic object of the quality comparison benchmark, such as a high-quality threshold T_high = 85 points and a qualified threshold T_low = 70 points. The judgment logic is executed sequentially: First, it checks whether the AI model directly outputs strong abnormal signals such as detected suspected sulfur fumigation features or obvious dyeing features. If so, the module immediately determines it as a quality anomaly and attaches the anomaly type. Second, if no strong abnormal signals are found, it checks the key dimension veto flag. If the flag is true, indicating that a key dimension has not met the standard, it is directly determined as not meeting the current standard category requirements. If all key dimensions meet the standard and there are no strong abnormal signals, it enters the score comparison stage: if Q >= T_high, it is determined as meeting the current standard category requirements (high-quality); if T_low <= Q < T_high, it is determined as meeting the current standard category requirements (qualified); if Q < T_low, it is determined as not meeting the current standard category requirements. Ultimately, the judgment results, the overall quality score Q, the scores and compliance status of each key dimension, and the presence of any abnormal features or warnings are assembled into a structured judgment report. This report is visualized through a graphical user interface on a dedicated mobile terminal, clearly presented to the acceptance personnel using cards, progress bars, and highlighted green / yellow / red colors, serving as the core basis for their final acceptance decision.
[0044] Furthermore, the method also includes S7: Enhancing on-chain information from on-site acceptance assessments; When the acceptance personnel make on-site judgments based on the feedback information from the terminal, if they have no objection to the AI judgment result, they can directly confirm it. If the acceptance personnel find subtle quality issues that the AI has not captured, the dedicated mobile terminal provides an interactive entry point for adding on-site evaluation opinions. Through this entrance, the inspection personnel can record an audio description or take high-definition supplementary photos focusing on the suspicious areas, and add text annotations. When the acceptance personnel confirm the final acceptance conclusion, the dedicated mobile terminal will package the voice description, supplementary photos and text annotations as attachments to the on-site manual evaluation, along with the key data, and include the data feature summary in the acceptance transaction record and upload it to the blockchain traceability platform.
[0045] In this embodiment, after the judgment results and early warning are displayed on the terminal interface, the acceptance personnel need to make a final judgment based on this information. The application interface of the dedicated mobile terminal always displays a floating button or link for adding professional opinions near the judgment result area. If the acceptance personnel fully agree with the AI's judgment, they do not need to operate this button. If the acceptance personnel, based on their professional knowledge, have a different opinion on the AI's judgment or discover subtle problems that the AI may have overlooked—for example, feeling that the medicinal slices have a slightly stale smell, but the AI did not recognize it based on the image—they can click the button. After clicking, a field assessment attachment panel pops up on the interface, which provides three input methods: First, there's a voice description button. Clicking it starts recording, allowing the inspector to verbally describe any suspicious points or supplementary comments they observe. Second, there's a supplementary photo button, allowing inspectors to refocus and take one or more high-resolution photos of suspicious areas, such as specific mold spots or insect damage. Third, there's a text note input box for inspectors to enter short keywords or sentences. Inspectors can freely combine these methods. After adding attachments, these audio files, supplementary photos, and text are temporarily saved locally on the terminal. When the inspector clicks "Confirm Completion" on S6, the application checks for the existence of on-site evaluation attachments before packaging the acceptance transaction record. If they exist, these attachments are standardized: voice... The files may be transcoded to a common format, supplementary photos are compressed and feature summaries are extracted instead of uploading the original images to save space, and text annotations are directly embedded; the processed attachment data is added to the structure of the acceptance transaction record object as an independent expert_annotation field; subsequently, the entire record including the attachments is uploaded to the blockchain; on the blockchain, the transaction hash of the record contains a common summary of the original AI data and the human-added information, so that this acceptance file not only records the machine's judgment, but also integrates the real-time evaluation of on-site professionals, forming a more comprehensive and convincing chain of evidence for the quality of the data entering the database, and all attachments are bound to the main record for evidence storage and cannot be tampered with afterward.
[0046] Furthermore, in S6, if the acceptance personnel determine that the quality level does not meet the current standard category requirements or is abnormal, and make a decision to reject or conditionally accept the goods, the method also includes: A special mobile terminal pops up an anomaly handling form, requiring the acceptance personnel to select or fill in specific reasons from a pre-set list of anomaly reasons. The list of anomaly reasons includes multiple items such as quality not meeting the target medicinal slice requirements, suspected adulteration, obvious inferior characteristics, damaged or contaminated packaging, and expiration date being too close. After the acceptance personnel complete the form, the terminal marks the final conclusion of this acceptance as an abnormal acceptance and binds the selected reason for the abnormality and the handling decision to the acceptance transaction record; After being uploaded to the blockchain traceability platform, it triggers alert notifications to the hospital's internal pharmacy management system and external supplier management system; The status of this batch of medicinal slices on the traceability chain has been updated to "abnormal warehousing and acceptance," and the specific reasons for the abnormality and the handling results have been linked to restrict its entry into the subsequent normal inventory distribution process until a pharmaceutical management personnel with higher authority reviews and removes the status.
[0047] In this embodiment, when the acceptance personnel select "rejection" or "conditional acceptance" in the final conclusion options on the terminal interface, the application logic of the dedicated mobile terminal immediately intercepts the normal completion process and forcibly pops up a secondary dialog box, namely, an exception handling form. This form first requires the acceptance personnel to select the main reason for the exception from a predefined drop-down menu. Predefined options include: quality does not meet the target medicinal slice requirements, suspected adulteration with non-medicinal parts, obvious inferior characteristics such as mold or insect infestation, damaged or damp outer packaging, and the product is nearing / approaching its expiration date. If the "quality does not meet the target medicinal slice requirements" option is selected, the form may further display sub-options, such as "diameter" or "texture" failing to meet the key dimension, for more accurate recording. In addition to selection, the form also provides a text box for other reasons, allowing for the filling in of situations not covered. Secondly, the form requires the selection or completion of a handling decision: for rejection, "return to supplier" must be filled in; for conditional acceptance, the conditions must be specified, such as downgrading to ordinary medicinal slice inventory, use only for hospitalized patients, or requiring the supplier to provide a written quality commitment. After the acceptance personnel complete the form... Click the "Confirm Exception" button on the form. At this point, the terminal application sets the exception acceptance flag to true and adds the entered exception reason and handling decision text as new fields `exception_reason` and `exception_action` to the soon-to-be-generated acceptance transaction record object. After this record marked as exception is uploaded to the blockchain traceability platform, the blockchain node, in addition to storage, will also trigger an embedded smart contract or message notification rule. This rule will send an alert message to the monitoring backend of the hospital pharmacy management system and the supplier management system interface of the purchasing department. The message content includes the information of the medicinal slices, batch, exception type, and handling decision. At the same time, the status attribute of this batch of medicinal slices on the blockchain is updated to "inbound acceptance exception" and associated with the hash value of this acceptance transaction. After that, after synchronizing the blockchain status, the hospital's internal inventory management system will logically lock this batch of medicinal slices, prohibiting it from being retrieved and released by the regular prescription dispensing procedure, until an administrator with higher privileges performs exception review and release operations in the system, thereby preventing the problematic medicinal slices from entering the clinical process.
[0048] Furthermore, when further processing is required for medicinal slices marked as abnormal acceptance due to non-compliance with target quality requirements or suspected adulteration, if it is decided to allocate the batch of medicinal slices to other standard categories, a cross-category re-inspection process will be initiated: Authorized pharmaceutical management personnel can specify new target standard categories in the system; Based on the new target standard category, the quality acceptance standard corresponding to the new standard category is retrieved from the AI identification feature database, and the AI recognition model re-determines the quality level based on the new quality comparison benchmark. If the reassessment result is found to meet the current standard category requirements, a new re-inspection pass record will be generated after confirmation by the pharmaceutical management personnel, and a link will be formed on the blockchain with the original abnormal acceptance record. The new record specifies the re-inspection time, the re-inspection personnel, the adjusted target standard category, and the new judgment result; The status of this batch of medicinal slices on the traceability chain is updated based on the new records, allowing it to enter the inventory pool for the new standard category.
[0049] In this embodiment, a user with pharmacy manager or quality administrator privileges logs into the pharmacy management system via their workstation and finds the rejected or pending record in the abnormal inbound record list. The system interface provides a button for reassigning the use of the herbal medicine. After clicking, a new interface pops up, displaying the basic information of the herbal medicine and providing an optional standard category drop-down menu. The menu lists all other standard categories for which quality strategies have been configured in the AI identification feature database. Based on clinical inventory needs and the actual characteristics of the batch of herbal medicine, the administrator selects a new target standard category. For example, astragalus slices that were originally rejected for cardiovascular herbal medicine for qi deficiency syndrome due to insufficient diameter are reassigned for surgical sores. After the administrator confirms the selection, the system generates a special re-inspection instruction, which includes the original acceptance transaction hash, the new target standard category code, and the ID of the re-inspection operator, i.e., the administrator. The system pushes this instruction to a dedicated mobile terminal (which may be the same or another authorized terminal) via an interface. After receiving the instruction, the terminal restarts a process similar to S1, but this time it is not... Instead of scanning the new barcode, the system directly loads the original batch of medicinal slices information and the new standard category. Then, the terminal completely re-executes S2 to S4: that is, based on the new standard category code, it retrieves the quality comparison benchmark applicable to surgical sores from the AI database, and may guide the operator to re-capture images of the medicinal slices or use existing feature data, and the AI model re-determines the quality level based on the new benchmark. If the re-determination result meets the current standard category requirements for surgical sores, the operator, usually an administrator or designated pharmacist, confirms it on the terminal. After confirmation, the terminal generates a brand new, independent re-inspection and acceptance transaction record, which clearly indicates the re-inspection type and includes the refer_to field referencing the hash of the original abnormal acceptance record, the new target standard category, and the new judgment result. This new record is also uploaded to the blockchain. On the traceability chain, it serves as a branch node of the original abnormal record, clearly showing the complete decision path and new quality certification status of the batch of medicinal slices from rejection for the original intended use to acceptance for the new use, providing on-chain evidence for refined inventory management and compliant use.
[0050] Furthermore, the specific tiered early warning logic of S5 is as follows: S51, in the dedicated mobile terminal or the server management backend connected to it, configure multi-level early warning thresholds for the expiration date management of traditional Chinese medicine decoction pieces, including at least a first early warning threshold and a second early warning threshold. The first early warning threshold represents the expiration date that needs general attention, and the second early warning threshold represents the expiration date that needs high attention and may require emergency treatment. The remaining time represented by the second early warning threshold is shorter than that of the first early warning threshold. S52, a dedicated mobile terminal, accurately parses the production date and expiration date of a batch of Chinese herbal medicines by scanning the expiration date text on the packaging or by recognizing the expiration date text using OCR. The terminal calculates the number of days remaining from the current system date to the expiration date. S53. The remaining days are compared with the preset first warning threshold and second warning threshold. If the remaining days are greater than the first warning threshold, the expiration date warning is not triggered. If the remaining days are less than or equal to the first warning threshold and greater than the second warning threshold, the first-level expiration date warning is triggered. The dedicated mobile terminal displays the expiration date information with gentle visual prompts on the display interface and marks the near expiration date. It is also recommended to arrange its use first after it is put into storage. S54. If the remaining days are less than or equal to the second warning threshold, a level two expiration warning will be triggered. The dedicated mobile terminal will issue a strong warning with prominent visual and auditory prompts on the interface, displaying the expiration date in red. At the same time, the acceptance conclusion will be automatically locked, and the acceptance personnel will be required to contact the person in charge of the pharmacy for approval. After recording the approval result on the terminal, the final acceptance confirmation operation will be completed.
[0051] In this embodiment, the hospital's pharmacy management committee formulates a unified early warning strategy for the expiration dates of traditional Chinese medicine (TCM) decoction pieces through the backend management module of the pharmacy management system. In the expiration date management settings of the backend interface, the administrator can set a general threshold for all decoction pieces in the hospital, or set different thresholds according to the major categories of decoction pieces, such as minerals or insect-prone herbs. At least two levels of early warning thresholds are configured: the first level is the near-expiration warning threshold, for example, set to 180 days before the expiration date for most decoction pieces; the second level is the near-expiration warning threshold, set to 60 days before the expiration date. These thresholds are stored in the configuration file of the backend server in the form of days. Each time the dedicated mobile terminal starts the acceptance application or performs a periodic synchronization, it will obtain the currently effective early warning threshold configuration from the server through a secure interface and cache it locally to ensure the uniformity and timely updates of the hospital-wide strategy.
[0052] In S1 or S3, the dedicated mobile terminal has obtained a clear expiration date string, typically in the format YYYY-MM-DD. The terminal application calls the built-in date parsing function to convert this string into a standard date object D_expiry. Simultaneously, the terminal obtains the device's current system date and time, extracts the date portion, and generates a current date object D_now. Subsequently, the terminal performs a date difference calculation: calculating the number of days Delta_Days between D_expiry and D_now. This calculation takes into account calendar rules such as leap years and the number of days in a month to ensure accuracy. The resulting Delta_Days is the remaining valid days for this batch of medicinal slices.
[0053] The terminal application compares the calculated Delta_Days with the local cache threshold, with the following logic: If Delta_Days > 180 (assuming the first-level threshold), the expiration date is normal, and the interface only displays the expiration date in plain gray font without any additional prompts. If 60 < Delta_Days <= 180, a first-level warning is triggered; at this time, the terminal interface displays the expiration date, changes the background of that date to light yellow, and displays a yellow exclamation mark icon and the text label "Near Expiration" next to it; in addition, below the acceptance conclusion area, a system suggestion is automatically generated: This product is nearing its expiration date; it is recommended to prioritize its delivery to wards with fast turnover or prioritize its use after warehousing. If Delta_Days <= If the value reaches 60, a Level 2 warning is triggered. At this time, the background of the expiration date display area turns flashing red, accompanied by a short warning sound. If the terminal volume is turned up, a red "near-expiration date" label appears next to the date. More importantly, the application's logic control changes: the "Acceptance" option on the interface may be automatically hidden or disabled, replaced by a pop-up mandatory dialog box titled "Approval of Near-Expiration Product." The dialog box displays expiration details and indicates that the product is nearing its expiration date and must be approved by the pharmacy manager before acceptance. The receiving personnel must trigger an internal communication process, such as sending an instant message or generating an approval work order, via the embedded "Contact Approval" button in the dialog box. The approver manually enters their authorization code. Only after obtaining a valid approval document, such as entering the correct authorization code, or after the approval status is synchronized as approved, will the confirmation button become available, allowing the acceptance personnel to continue. The log of the approval operation, such as the approver ID and time, will also be recorded in the acceptance transaction record. Regardless of whether it is a level one or level two warning, the final expiration status (normal, near expiration, or close to expiration), the corresponding remaining days (Delta_Days), and whether the approval process has been triggered will all be written as explicit field values into the final acceptance transaction record and stored on the blockchain, providing an accurate data starting point for subsequent inventory expiration monitoring and first-in-first-out management.
[0054] Furthermore, for Chinese herbal medicine slices that are rejected during the acceptance process due to quality or expiration date issues and need to be returned to the supplier, a reverse information chain binding is implemented when the slices are actually returned from the warehouse: Warehouse management personnel used a dedicated mobile terminal to scan the rejected batch of Chinese herbal medicine slices, triggering a return operation. A dedicated mobile terminal accesses the blockchain traceability platform to retrieve the acceptance transaction records for the abnormal acceptance of the batch of medicinal slices. Managers fill in the actual number of returned items, the reason for return, and the carrier information on the terminal, and take pictures of the returned medicinal slices being loaded or transported. The terminal generates a record of the return and outbound transaction of medicinal slices, which includes the outbound information and is strongly linked to the previous abnormal inbound acceptance record through a blockchain pointer. After the records of the returned medicinal slices are uploaded to the blockchain traceability platform, the platform adds a new node indicating that the slices have been returned to the supplier after the original abnormal entry and acceptance node in the traceability chain of that batch of medicinal slices. This forms a complete and tamper-proof closed-loop information chain of responsibility from entry and acceptance to abnormality discovery and physical return, which can be used for subsequent supply chain traceability and quality management audits.
[0055] In this embodiment, when a supplier comes to retrieve rejected goods, the warehouse manager, in the return area of the pharmacy, uses a dedicated mobile terminal or another authorized dedicated device to activate the return and outbound function module in their application. The manager first scans the original Chinese medicinal herbs on the outer packaging of the rejected batch. After scanning, the application immediately attempts to find the most recent inbound acceptance record with an abnormal acceptance status by caching the barcode information (mainly the production batch number) locally or querying the blockchain traceability platform online. After finding the record and uniquely identifying it through its transaction hash, the application interface loads and displays detailed information about the batch and the initial reason for rejection. On the terminal interface, the manager, based on the actual return situation, enters or confirms that the actual returned quantity may be less than the original received quantity, for example, some items have been unpacked and inspected, and selects a standard return reason from the list. This reason usually corresponds to the abnormal reason at the time of acceptance, such as quality not conforming to the contract agreement. In addition, the manager also needs to fill in carrier information such as the logistics company name and waybill number. After the information is filled in, the application guides the administrator to retain images: requiring panoramic photos of the entire batch of returned goods to be loaded onto the truck, ensuring that the batch number labels on the packaging boxes are clearly visible, as visual evidence that the goods have been delivered; after the administrator confirms the photos, they click to generate a return order and upload it to the blockchain; at this time, the terminal application creates a new transaction record for the return of medicinal slices, which includes the following core fields: the transaction hash of the associated original abnormal acceptance record as a reverse pointer, the timestamp of this outbound operation, the operator ID, the actual returned quantity, the selected reason for return, the carrier information, and the feature digest hash value of the returned image; this new record is submitted to the blockchain traceability platform; after verification, the blockchain node uploads it to the chain as a new transaction; in the blockchain browsing logic, this new transaction, through its associated field of the original acceptance hash, forms a direct and traceable link with the previous abnormal acceptance record; thus, a complete sub-path is clearly displayed on the entire life cycle traceability chain of the medicinal slices: from arrival -> The process of receiving goods and accepting them for abnormalities or rejections -> returning the goods and issuing them creates a closed-loop information segment with clearly defined responsible parties, return operators, AI-based evidence of reasons, and photos of the returned goods. This not only improves internal management records but also provides irrefutable on-chain evidence for potential quality disputes or financial settlements in the future.
[0056] Furthermore, after the medicinal slices have been inspected and put into storage, the method also supports a traceability-based closed-loop feedback system for clinical drug use quality, specifically including: When a physician or pharmacist raises objections to the quality of Chinese herbal medicine slices that have been inspected, stored and distributed to clinical departments during clinical use, they can initiate a quality appeal in the clinical information system by entering the relevant batch information and a description of the specific problem. Based on the batch information, the corresponding acceptance transaction record for that batch of medicinal slices can be located by accessing the blockchain traceability platform; The hospital's pharmacy department quality management personnel reviewed the record to check the details of the AI judgment during the receiving and acceptance process, the summary of image features collected on-site, the information of the acceptance personnel, and whether there were any on-site manual assessment attachments. Based on the tamper-proof quality records stored on the blockchain, management personnel can review them to determine whether the quality problems originated from misjudgments during the warehousing and acceptance process, changes during storage, or other reasons. The review results and handling measures were recorded and linked to the blockchain traceability chain of that batch of medicinal slices, forming a new clinical quality feedback node.
[0057] In this embodiment, when physicians or pharmacists in clinical departments such as Traditional Chinese Medicine or Oncology discover differences in the appearance, odor, texture, or suspected efficacy of a batch of Chinese herbal medicine slices during decoction or use, raising quality concerns, they can initiate a complaint through the drug quality feedback module in the hospital's clinical information system. In this module interface, the complainant scans the hospital's internal barcode on the medicine bag or manually enters the patient's prescription number, allowing the system to link the batch information of the used herbal medicine slices. The complainant fills in a detailed description of the quality problem, such as abnormally dark color of the slices or a weak taste in the decoction after decoction, and can upload photos of the problematic slices taken on-site. This feedback order is automatically routed to the hospital's pharmacy department. The quality monitoring team and quality control personnel, upon receiving a work order, use the batch number and manufacturer information as query keys on a dedicated panel of the quality control system to directly call the application programming interface (API) connected to the blockchain traceability platform. Based on the batch information, the API retrieves and returns the transaction hash of the acceptance record generated during the warehousing acceptance of that batch of medicinal slices on the blockchain, along with all on-chain evidence data accessible through this hash, including AI judgment summaries, key feature compliance, acceptance image features, and whether there are on-site manual assessment attachments. Quality control personnel can simultaneously view real-time feedback from the clinical end and the original quality records from the warehousing end within a single interface, without needing to access multiple isolated systems. By comparing clinical data... The objective records at the time of warehousing allow quality control personnel to conduct professional analysis. For example, if the warehousing record shows that AI judges it to be of high quality and there are no obvious abnormalities in the imaging features, but clinical feedback indicates a musty smell, the problem may lie in the warehousing and storage process after warehousing. If the warehousing record itself shows a low score for a certain key dimension, it may mean that although the acceptance standard is met, there is a difference in clinical perception, or that the standard needs to be optimized. Quality control personnel will record the analysis conclusions and handling measures, such as sampling and testing, checking storage conditions, and communication with suppliers, in the feedback work order and update the work order status to "processed." The system can be configured to automatically use the key information of this clinical feedback record, such as the feedback content and the quality control conclusion summary, as a new... Clinical quality feedback nodes, through their association with the transaction hash of the original warehousing and acceptance records, are appended to the traceability information of that batch of medicinal herbs on the blockchain. In this way, the blockchain traceability chain of that batch of medicinal herbs not only includes upstream supply chain and warehousing information, but also extends to include clinical practice feedback from the end user, forming a longer data chain from acceptance to use. After anonymization and aggregation analysis, this accumulated clinical feedback data can provide valuable real-world evidence for the hospital pharmacy department to regularly review and optimize the standard category-quality requirement mapping rules in the AI identification feature database, thereby continuously improving the clinical fit of acceptance standards and the practicality of AI-assisted acceptance.
[0058] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between apparatuses or units, and may be electrical, mechanical, or other forms.
[0059] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated units described above can be implemented in hardware or as software functional units. The above are merely embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made based on the description and drawings of this application, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
[0060] The specific embodiments of the invention have been described in detail above, but they are only examples, and this application is not limited to the specific embodiments described above. For those skilled in the art, any equivalent modifications or substitutions to the invention are also within the scope of this application. Therefore, all equivalent changes, modifications, and improvements made without departing from the spirit and principles of this application should be covered within the scope of this application.
Claims
1. A method for scanning and accepting Chinese herbal medicines into a warehouse based on AI-based identification of the quality of medicinal slices, characterized in that, The method, applied to the receiving and acceptance process of traditional Chinese medicine decoction pieces in hospital pharmacies, includes: S1, in response to the arrival and warehousing of Chinese herbal medicine pieces, the inspection personnel use a dedicated mobile terminal to scan the barcode information on the outer packaging of the herbal medicine pieces to be inspected, obtain the herbal medicine piece identification information, batch information and expiration date information embedded in the herbal medicine pieces, and automatically match the herbal medicine piece identification information with the warehousing task order to be inspected in the hospital information system, triggering the AI-assisted inspection process for the batch of herbal medicine pieces; S2, based on the herbal medicine identification information, the dedicated mobile terminal accesses and associates with the AI identification feature database in the background. The dedicated mobile terminal retrieves the corresponding standard identification feature from the AI identification feature database as the quality comparison benchmark for this acceptance based on the herbal medicine identification information and the target standard category. S3, the terminal camera captures images of the medicinal slices, and the integrated AI recognition model is called to perform real-time analysis of the captured images and extract the measured morphological features of the current medicinal slices; S4, compare the extracted measured morphological features with the quality comparison benchmark and calculate the compliance. According to the differentiated quality acceptance standards defined for different standard categories, classify the compliance calculation results and output the quality grade judgment result of the current batch of medicinal slices. S5, the dedicated mobile terminal calculates the expiration information with the current system time, and if it is close to the expiration date, it generates and displays a warning prompt of the corresponding level according to the preset close expiration date threshold. S6. Based on the quality level judgment result and the warning prompt fed back by the dedicated mobile terminal, the acceptance personnel confirm the final acceptance conclusion on the terminal, package and generate the acceptance transaction record, and upload it to the blockchain traceability platform for evidence storage, thus completing the information on-chain of the warehousing acceptance process.
2. The method according to claim 1, characterized in that, S1 includes: When the medicinal slices to be inspected are multiple boxes from the same batch, the inspectors use the multi-box concurrent scanning mode of the dedicated mobile terminal to scan the barcode information on the outer packaging boxes of multiple medicinal slices side by side. The terminal identifies multiple independent barcode areas using image segmentation technology and decodes them to obtain the herbal medicine identification information, batch information, and expiration date information of all boxes at once. The system automatically verifies the batch consistency of information for multiple containers, and triggers the AI-assisted acceptance process only when all container information is consistent.
3. The method according to claim 1, characterized in that, S2 includes: S21. In the management backend of the AI identification feature database, multiple dimensions of quality attributes are predefined for each type of Chinese herbal medicine slice, and corresponding quality acceptance strategies are set for the feature information of color, cross-section, and texture of the slice. S22, after the dedicated mobile terminal obtains the herbal medicine identification information and matches it with the task order to be inspected and put into storage, it parses out the target standard category. The dedicated mobile terminal sends a query request to the AI identification feature database. The query request carries the herbal medicine identification information and the target standard category code. The AI identification feature database locates the standard identification feature data of the herbal medicine based on the herbal medicine identification information. At the same time, based on the combination of the herbal medicine identification information and the target standard category code, it retrieves and returns the corresponding quality acceptance strategy. S23, the dedicated mobile terminal receives the standard identification feature data and the quality acceptance strategy and integrates them to generate the quality comparison benchmark.
4. The method according to claim 1 or 3, characterized in that, S4 includes: S41, the dedicated mobile terminal calls its integrated AI recognition model to analyze the acquired images. For appearance images, the model identifies the overall color distribution, shape regularity, and surface texture features of the slices and quantifies them into a first set of feature vectors. For close-up images of specific parts, the model focuses on analyzing the color uniformity, texture clarity, vascular bundle arrangement, and presence of mold or insect damage on the cross-section or fracture surface of the slices and quantifies them into a second set of feature vectors. The AI recognition model compares the first set of feature vectors and the second set of feature vectors with the corresponding standard feature vectors in the retrieved quality comparison benchmark one by one and calculates the similarity score for each feature dimension. S42, the dedicated mobile terminal performs a weighted comprehensive evaluation of the calculated similarity scores of each dimension based on the key dimensions marked in the quality comparison benchmark. For features marked as key dimensions, the similarity score has a higher weight in the comprehensive evaluation or needs to meet an independent minimum threshold requirement. The comprehensive evaluation algorithm calculates the final comprehensive compliance score according to the rules set in the quality acceptance strategy. S43, the grading logic module built into the dedicated mobile terminal determines the quality level based on the comprehensive compliance score and with reference to the preset grading threshold in the quality acceptance strategy. If the comprehensive compliance score is higher than the threshold for meeting the requirements and all key dimensions meet their independent threshold requirements, it is determined to meet the requirements of the current standard category. If the comprehensive compliance score is between the thresholds for meeting and not meeting the requirements, or if any key dimension does not meet its independent threshold, it is determined to not meet the requirements of the current standard category. If, during the image analysis process, the AI recognition model detects serious discrepancies with the baseline features or the presence of typical inferior adulteration features, it directly triggers a quality anomaly judgment.
5. The method according to claim 1, characterized in that, The method also includes S7: Enhancing on-site acceptance assessment information by uploading it to the blockchain; When the acceptance personnel make on-site judgments based on the feedback information from the terminal, if they have no objection to the AI judgment result, they can directly confirm it. If the acceptance personnel find subtle quality issues that the AI has not captured, the dedicated mobile terminal provides an interactive entry point for adding on-site evaluation opinions. Through this entrance, the inspection personnel can record an audio description or take high-definition supplementary photos focusing on the suspicious areas, and add text annotations. When the acceptance personnel confirm the final acceptance conclusion, the dedicated mobile terminal packages the voice description, supplementary photos, and text annotations as attachments to the on-site manual evaluation, along with the key data, and includes the data feature summary in the acceptance transaction record, and uploads it to the blockchain traceability platform.
6. The method according to claim 1, characterized in that, In S6, if the acceptance personnel determine that the quality level assessment result does not meet the current standard category requirements or is abnormal, and make a decision to reject or conditionally accept the goods, the method further includes: The dedicated mobile terminal pops up an anomaly handling form, requiring the acceptance personnel to select or fill in specific reasons from a preset list of anomaly reasons. The list of anomaly reasons includes multiple items such as quality not meeting the target medicinal slice requirements, suspected adulteration, obvious inferior characteristics, damaged or contaminated packaging, and expiration date being too close. After the acceptance personnel complete the form, the terminal marks the final conclusion of this acceptance as an abnormal acceptance and binds the selected reason for the abnormality and the handling decision to the acceptance transaction record. After being uploaded to the blockchain traceability platform, it triggers alert notifications to the hospital's internal pharmacy management system and external supplier management system; The status of this batch of medicinal slices on the traceability chain has been updated to "abnormal warehousing and acceptance," and the specific reasons for the abnormality and the handling results have been linked to restrict its entry into the subsequent normal inventory distribution process until a pharmaceutical management personnel with higher authority reviews and removes the status.
7. The method according to claim 6, characterized in that, When further processing is required for medicinal slices marked as abnormal acceptance due to non-compliance with target quality requirements or suspected adulteration, if it is decided to allocate the batch of medicinal slices to other standard categories, a cross-category re-inspection process will be initiated: Authorized pharmaceutical management personnel can specify new target standard categories in the system; Based on the new target standard category, the quality acceptance standard corresponding to the new standard category is retrieved from the AI identification feature database, and the AI recognition model re-determines the quality level based on the new quality comparison benchmark. If the reassessment result is found to meet the current standard category requirements, a new re-inspection pass record will be generated after confirmation by the pharmaceutical management personnel, and a link will be formed on the blockchain with the original abnormal acceptance record. The new record specifies the re-inspection time, the re-inspection personnel, the adjusted target standard category, and the new judgment result; The status of this batch of medicinal slices on the traceability chain is updated based on the new records, allowing it to enter the inventory pool for the new standard category.
8. The method according to claim 1, characterized in that, The specific tiered early warning logic of S5 is as follows: S51, in the dedicated mobile terminal or the server management backend connected thereto, configure multi-level early warning thresholds for the expiration date management of traditional Chinese medicine decoction pieces, including at least a first early warning threshold and a second early warning threshold. The first early warning threshold represents the expiration date that needs to be generally concerned, and the second early warning threshold represents the expiration date that needs to be highly concerned and may require emergency treatment. The remaining time represented by the second early warning threshold is shorter than the first early warning threshold. S52, the dedicated mobile terminal accurately parses the production date and expiration date of the batch of Chinese herbal medicine slices by scanning the expiration date text on the packaging or by OCR recognition, and calculates the number of days remaining from the current system date to the expiration date. S53, compare the remaining days with the preset first warning threshold and second warning threshold. If the remaining days are greater than the first warning threshold, the expiration date warning will not be triggered. If the remaining days are less than or equal to the first warning threshold and greater than the second warning threshold, a first-level expiration date warning will be triggered. The dedicated mobile terminal displays the expiration date information with gentle visual prompts on the display interface and marks the near expiration date. It also suggests prioritizing its use after it is put into storage. S54, if the remaining days are less than or equal to the second warning threshold, a level two expiration date warning is triggered. The dedicated mobile terminal provides a strong warning with prominent visual and auditory prompts on the interface, displays the expiration date in red, and automatically locks the acceptance conclusion. The acceptance personnel are required to contact the person in charge of the pharmacy for approval and record the approval result on the terminal to complete the final acceptance confirmation operation.
9. The method according to claim 6, characterized in that, For Chinese herbal medicine slices that are rejected during the acceptance process due to quality or expiration date issues and need to be returned to the supplier, a reverse information chain binding is performed when the slices are actually returned from the warehouse: Warehouse management personnel use the dedicated mobile terminal to scan the rejected batch of medicinal herbs, triggering a return operation. The dedicated mobile terminal accesses the blockchain traceability platform to retrieve the acceptance transaction records corresponding to the abnormal acceptance of the batch of medicinal slices. Managers fill in the actual number of returned items, the reason for return, and the carrier information on the terminal, and take pictures of the returned medicinal slices being loaded or transported. The terminal generates a record of the return and outbound transaction of medicinal slices, which includes the outbound information and is strongly linked to the previous abnormal inbound acceptance record through a blockchain pointer. After the records of the returned medicinal slices are uploaded to the blockchain traceability platform, the platform adds a new node indicating that the slices have been returned to the supplier after the original abnormal entry and acceptance node in the traceability chain of that batch of medicinal slices. This forms a complete and tamper-proof closed-loop information chain of responsibility from entry and acceptance to abnormality discovery and physical return, which can be used for subsequent supply chain traceability and quality management audits.
10. The method according to claim 1, characterized in that, After the medicinal slices have been inspected and put into storage, the method also supports a traceability-based closed-loop feedback system for clinical drug quality, specifically including: When a physician or pharmacist raises objections to the quality of Chinese herbal medicine slices that have been inspected, stored and distributed to clinical departments during clinical use, they can initiate a quality appeal in the clinical information system by entering the relevant batch information and a description of the specific problem. Based on the batch information, the acceptance transaction record corresponding to the batch of medicinal slices can be located by accessing the blockchain traceability platform; The hospital's pharmacy department quality management personnel reviewed the record to check the details of the AI judgment during the receiving and acceptance process, the summary of image features collected on-site, the information of the acceptance personnel, and whether there were any on-site manual assessment attachments. Based on the tamper-proof quality records stored on the blockchain, management personnel can review them to determine whether the quality problems originated from misjudgments during the warehousing and acceptance process, changes during storage, or other reasons. The review results and handling measures were recorded and linked to the blockchain traceability chain of that batch of medicinal slices, forming a new clinical quality feedback node.