Multi-mode medicine purchasing behavior data analysis system and method for smart pharmacy

By constructing a drug purchase reference database and combining it with user history analysis, the compliance of the drug purchase process is verified, which solves the problem of drug identification errors in smart pharmacies and improves the accuracy and efficiency of drug purchase.

CN121860665APending Publication Date: 2026-04-14JINIYOU PHARM TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-19
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Smart pharmacies may make identification errors when recognizing the medications a user needs, and may fail to detect anomalies in a timely manner, resulting in users receiving the wrong medications and wasting resources.

Method used

By collecting users' historical drug purchase records, grouping and sorting them by unique identifiers, and filtering and marking key records by combining the time interval between purchases and the expected time of administration, a complete drug purchase process is constructed. The drugs are clustered according to their main functions for the first purchase, and a drug purchase reference database is built with this function as the main index. The compliance of the process to be tested is verified. If it is qualified, the drug is released from the warehouse; otherwise, the reference process is retrieved for reverse comparison and manual verification.

Benefits of technology

Reduce drug identification errors, avoid repeated drug purchase processes, save resources, ensure drug purchase accuracy, and improve the reliability and security of smart pharmacy services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121860665A_ABST
    Figure CN121860665A_ABST
Patent Text Reader

Abstract

The invention discloses a multi-mode medicine purchasing behavior data analysis system and method oriented to a smart pharmacy, and relates to the technical field of big data analys.The method comprises the steps that historical medicine purchasing records of a user are collected, complete medicine purchasing processes are constructed, the complete medicine purchasing processes are clustered, and a medicine purchasing reference database is constructed with the major function as a main index; after a user provides a prescription, generating a to-be-detected medicine purchasing process; retrieving a reference database according to the major function of the medicine, comparing the medicine positions of the to-be-detected process and the reference process for compliance verification, and delivering the medicine out of storage if the medicine is qualified; when the verification is not qualified, reversely comparing and screening the flow with the highest similarity, extracting the medicine in the corresponding order as a correction result, and manually checking the correction result; the system comprises a medicine purchasing record processing module, a reference database construction module, a to-be-detected process generation module, a medicine purchasing process verification module and a process correction checking module. The method can reduce drug identification errors, effectively intercept drug purchase abnormity, and improve drug purchase accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of big data analytics, specifically a multimodal drug purchase behavior data analysis system and method for smart pharmacies. Background Technology

[0002] Smart pharmacies are the result of intelligent upgrades of traditional pharmacies under the trend of medical informatization and digitalization. They improve the efficiency of users' drug purchases, but errors may occur when identifying the drugs needed by users. Abnormalities may not be detected in time, resulting in users receiving the wrong drugs and having to repeat the above process, which wastes resources. Summary of the Invention

[0003] The purpose of this invention is to provide a multimodal drug purchase behavior data analysis system and method for smart pharmacies, in order to solve the problems raised in the prior art.

[0004] To achieve the above objectives, the present invention provides the following technical solution: a multimodal drug purchase behavior data analysis method for smart pharmacies, the drug purchase behavior data analysis method comprising the following steps: Step S1: Collect historical drug purchase records, categorize them, and construct a complete drug purchase process; Step S2: Extract all complete drug purchase processes, classify them according to the main functions of the drugs, and build a drug purchase reference database; Step S3: After the user provides the prescription, extract the user's historical drug purchase records, analyze them in conjunction with the time of this drug purchase, and construct the drug purchase process to be tested; Step S4: Based on the main function information of the drug corresponding to the prescription, search the corresponding category in the drug purchase reference database, extract the drug position in the drug purchase process to be tested, the position is the position of the drug in the drug purchase process, construct a temporary reference database using the drug purchase reference database, verify the drug purchase process to be tested, if the verification is qualified, the drug is released from the warehouse. Step S5: If the verification fails, retrieve the drug purchase process to be tested, search the drug purchase reference database, provide the correction result, and perform manual verification.

[0005] Furthermore, the specific steps of step S1 are as follows: Step S1-1: Collect all user historical drug purchase records stored in the smart pharmacy system. The historical drug purchase records include the user's unique identifier, purchase time, expected administration time, and the main function information of the drug. Step S1-2: Group the historical drug purchase records according to the user's unique identifier, sort them according to the order of purchase time within each group, calculate the time interval between the nth and (n-1)th drug purchase records, filter out the historical drug purchase records whose time interval is greater than the expected consumption time in the (n-1)th drug purchase record, and mark them. Steps S1-3: Segment the marked historical drug purchase records, mark each segment of the historical drug purchase record as a historical drug purchase record sequence, and attach a unique user identifier to form a complete drug purchase process.

[0006] Furthermore, the specific steps of step S2 are as follows: Extract all complete drug purchase processes, group them according to the main function information of the drugs in the first purchase record, cluster all complete drug purchase processes with the same main function, and construct a drug purchase reference database with the main function of the drugs as the main index.

[0007] Furthermore, the specific steps of step S3 are as follows: After a user provides a prescription, all of the user's historical medication purchase records are retrieved based on the user's unique identifier. These records are then sorted by purchase time. The time interval between the current purchase time and the previous purchase time is calculated. If the time interval is less than or equal to the expected dosage time, the process iterates backward and associates unmarked historical purchase records until a marked purchase record is found, which is then used as the medication purchase process to be tested.

[0008] Furthermore, the specific steps of step S4 are as follows: Step S4-1: Based on the main efficacy of the medicine in the medicine purchase process to be tested, call the main index structure of the medicine purchase reference database to search, extract all complete medicine purchase processes that completely match the main efficacy of the medicine, and record the position of the medicine in this medicine purchase record in the complete medicine purchase process; Step S4-2: Based on the position of the drug in the current purchase record in the drug purchase process to be tested, filter out complete drug purchase processes with the same position, extract the historical drug purchase records before that position in the complete drug purchase process, mark them as reference drug purchase processes, and construct a temporary drug comparison sequence. The temporary drug comparison sequence includes a first drug purchase set, a second drug purchase set, ..., and a m-th drug purchase set. The first drug purchase set includes the drug name of the first position in the reference drug purchase process, the second drug purchase set includes the drug name of the first position in the reference drug purchase process, ..., and the m-th drug purchase set includes the drug name of the first position in the reference drug purchase process. Step S4-3: Extract the drug name and its position in the drug purchase process to be tested. Verify the drug's position in the corresponding purchase set. If all drugs in all positions in all drug purchase processes to be tested exist in the corresponding positions in the reference drug purchase process, then it is considered a normal drug purchase and the drug is released from the warehouse.

[0009] Furthermore, in step S5, If the verification fails, retrieve the drug purchase process to be tested, obtain the drug ranking and drug name before this purchase, filter complete drug purchase processes with the same drug ranking and drug name in the drug purchase reference database, compare them in reverse order according to the drug purchase process to be tested, retain the complete drug purchase process with the most identical items, select the ranking of this purchase, extract the drug name corresponding to the ranking in the retained complete drug purchase process as the correction result, and perform manual verification.

[0010] Furthermore, the drug purchase behavior data analysis system includes a drug purchase record processing module, a reference database construction module, a process to be detected generation module, a drug purchase process verification module, and a process correction and verification module; The drug purchase record processing module is used to process historical drug purchase records to construct a complete drug purchase process; the reference database construction module is used to construct a drug purchase reference database based on the complete drug purchase process; the process to be tested generation module is used to construct a drug purchase process to be tested based on user prescriptions and historical drug purchase records; the drug purchase process verification module is used to retrieve the drug purchase reference database and verify the compliance of the drug purchase process to be tested; the process correction and verification module is used to generate correction results for the process to be tested that fails the verification and perform manual verification. The output of the drug purchase record processing module is electrically connected to the input of the reference database construction module; the output of the reference database construction module is electrically connected to the input of the process generation module to be tested; the output of the process generation module to be tested is electrically connected to the input of the drug purchase process verification module; and the output of the drug purchase process verification module is electrically connected to the input of the process correction and verification module.

[0011] Furthermore, the medication purchase record processing module includes a historical record collection unit and a complete process construction unit; the historical record collection unit is used to collect all users' historical medication purchase records in the smart pharmacy system, which include unique identifiers and medication purchase time information; the complete process construction unit is used to group and sort historical records by user identifiers, filter and mark key records, and associate them to form a complete medication purchase process.

[0012] Furthermore, the reference database construction module includes a process function classification unit and a reference database generation unit; The process function classification unit is used to extract the complete drug purchase process and group and cluster the drugs according to their main functions for the first purchase. The reference library generation unit is used to build a drug purchase reference database by integrating the clustered processes with the main functions of the drugs as the main index. The process generation module for testing includes a user record retrieval unit and a process construction unit for testing. The user record retrieval unit is used to retrieve all historical drug purchase records of a user based on the user's unique identifier; the process to be inspected construction unit is used to sort the historical drug purchase records and calculate the drug purchase time interval, and associate the records to form a drug purchase process to be inspected.

[0013] Furthermore, the drug purchase process verification module includes a reference library retrieval unit and a process compliance verification unit; The reference database retrieval unit is used to retrieve a complete drug purchase process from the reference database based on the main therapeutic effects of the drugs in the process to be tested; the process compliance verification unit is used to filter processes with the same position to construct a temporary sequence and verify the compliance of the drugs in the process to be tested. The process correction and verification module includes a correction result generation unit and a manual verification unit; The correction result generation unit is used to retrieve the unqualified test process, compare it with the reference database, and output the correction result of the corresponding drug. The manual verification unit is used to submit the generated correction result to a human for final verification and confirmation.

[0014] Compared with the prior art, the beneficial effects of the present invention are: 1. This invention collects users' historical drug purchase records, groups and sorts them by unique identifiers, and filters and marks key records by combining the time interval between purchases and the expected time of administration to construct a complete drug purchase process; then, it clusters the drugs according to their main functions in the first purchase and builds a drug purchase reference database with this function as the main index, providing accurate data support for drug purchase verification, reducing drug identification errors caused by lack of effective references, avoiding users from repeating the drug purchase process after taking the wrong medicine, and saving resources.

[0015] 2. This invention retrieves historical records based on the user's unique identifier after the user provides a prescription, calculates the interval based on the time of the current purchase, and constructs a purchase process to be tested by associating unmarked records; then, it searches a reference database by the main function of the drug, compares the drug's position with the reference process, verifies the compliance of the process to be tested, and releases the drug if it is qualified, effectively intercepting abnormal purchase behavior, ensuring the accuracy of users' drug purchases, and improving the efficiency of smart pharmacy drug purchases.

[0016] 3. When the verification fails, the present invention retrieves the process to be tested, filters the reference process based on the drug position and name before the current purchase, compares it in reverse and retains the process with the highest similarity, extracts the corresponding drug position as the correction result and manually verifies it. This not only makes up for the limitations of simple system judgment, but also quickly provides the direction of correction, further reduces the risk of wrong drugs, and enhances the reliability and security of smart pharmacy services. Attached Figure Description

[0017] Figure 1 This is a flowchart illustrating a multimodal drug purchase behavior data analysis method for smart pharmacies according to the present invention. Figure 2 This is a schematic diagram of the structure of a multimodal drug purchase behavior data analysis system for smart pharmacies according to the present invention. Detailed Implementation

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

[0019] Example 1: As Figure 1 As shown, this invention provides a technical solution: a multimodal drug purchase behavior data analysis method for smart pharmacies. The drug purchase behavior data analysis method includes the following steps: Step S1: Collect historical drug purchase records, categorize them, and construct a complete drug purchase process; The specific steps of step S1 are as follows: Step S1-1: Collect all user historical drug purchase records stored in the smart pharmacy system. The historical drug purchase records include the user's unique identifier, purchase time, expected administration time, and the main function information of the drug. Step S1-2: Group the historical drug purchase records according to the user's unique identifier, sort them according to the order of purchase time within each group, calculate the time interval between the nth and (n-1)th drug purchase records, filter out the historical drug purchase records whose time interval is greater than the expected consumption time in the (n-1)th drug purchase record, and mark them. Steps S1-3: Segment the marked historical drug purchase records, mark each segment of historical drug purchase records as a historical drug purchase record sequence, add a unique user identifier, and form a complete drug purchase process; Step S2: Extract all complete drug purchase processes, classify them according to the main functions of the drugs, and build a drug purchase reference database; The specific steps of step S2 are as follows: Extract all complete drug purchase processes, group them according to the main function information of the drugs in the first drug purchase record, cluster all complete drug purchase processes with the same main function, and build a drug purchase reference database with the main function of the drugs as the main index. Step S3: After the user provides the prescription, extract the user's historical drug purchase records, analyze them in conjunction with the time of this drug purchase, and construct the drug purchase process to be tested; The specific steps of step S3 are as follows: After a user provides a prescription, all of the user's historical medication purchase records are retrieved based on the user's unique identifier. The historical medication purchase records are sorted by purchase time, and the time interval between the current purchase time and the previous purchase time is calculated. If it is less than or equal to the expected time of administration, the process is iterated backward and associated with unmarked historical medication purchase records until a marked medication purchase record is found, which is then used as the medication purchase process to be tested. Step S4: Based on the main function information of the drug corresponding to the prescription, search the corresponding category in the drug purchase reference database, extract the drug position in the drug purchase process to be tested, the position is the position of the drug in the drug purchase process, construct a temporary reference database using the drug purchase reference database, verify the drug purchase process to be tested, if the verification is qualified, the drug is released from the warehouse. The specific steps of step S4 are as follows: Step S4-1: Based on the main efficacy of the medicine in the medicine purchase process to be tested, call the main index structure of the medicine purchase reference database to search, extract all complete medicine purchase processes that completely match the main efficacy of the medicine, and record the position of the medicine in this medicine purchase record in the complete medicine purchase process; Step S4-2: Based on the position of the drug in the current purchase record in the drug purchase process to be tested, filter out complete drug purchase processes with the same position, extract the historical drug purchase records before that position in the complete drug purchase process, mark them as reference drug purchase processes, and construct a temporary drug comparison sequence. The temporary drug comparison sequence includes a first drug purchase set, a second drug purchase set, ..., and a m-th drug purchase set. The first drug purchase set includes the drug name of the first position in the reference drug purchase process, the second drug purchase set includes the drug name of the first position in the reference drug purchase process, ..., and the m-th drug purchase set includes the drug name of the first position in the reference drug purchase process. Step S4-3: Extract the drug name and its position in the drug purchase process to be tested. Verify the drug's position in the corresponding purchase set. If all drugs in all positions in all drug purchase processes to be tested exist in the corresponding positions in the reference drug purchase process, then it is considered a normal drug purchase and the drug is released from the warehouse. Step S5: If the verification fails, retrieve the drug purchase process to be tested, search the drug purchase reference database, provide the correction result, and perform manual verification. In step S5, if the verification fails, the drug purchase process to be tested is retrieved to obtain the drug ranking and drug name before this purchase. Complete drug purchase processes with the same drug ranking and drug name are filtered in the drug purchase reference database. The process is compared in reverse order according to the drug purchase process to be tested. The complete drug purchase process with the most identical items is retained. The ranking of this purchase is selected, and the drug name corresponding to the ranking in the retained complete drug purchase process is extracted as the correction result. This result is then manually verified.

[0020] For example: Taking a smart pharmacy as an example, the method of this invention is needed to verify the compliance of drug purchase behavior. The specific implementation process is as follows: Step S1: Construct a complete drug purchase process S1-1. Collect historical medication purchase records: Collect all users' historical medication purchase records through the pharmacy system. Each record includes the user's unique identifier, purchase time, expected medication administration time, and the medication's main function, which includes fever reduction, pain relief, and relieving cold symptoms.

[0021] S1-2. Grouping, Sorting, and Marking: Group by user's unique identifier. Taking "ID0001" as an example, its historical medication purchase records, after sorting, are: 2024-01-05 (ibuprofen, expected to be taken for 3 days), 2024-01-08 (ibuprofen, expected to be taken for 3 days), 2024-02-10 (Cold Relief Granules, expected to be taken for 5 days). Calculate the interval: January 8th and January 5th are 3 days apart (equal to 3 days), February 10th and January 9th are 32 days apart (greater than 3 days), and mark the record from January 8th.

[0022] S1-3. Segmentation to form a complete process: After marking the record, segmentation is performed. The complete drug purchase process of "ID0001" is: (2024-01-05, ibuprofen, ID0001), (2024-01-08, ibuprofen, ID0001).

[0023] Step S2: Construct a drug purchase reference database Extract the complete medication purchase process of all users in the pharmacy and group them by "main function of the first medication purchase": group process 1, where the first medication purchase is "fever reduction and pain relief", into one category, and process where the first medication purchase is "relieving cold symptoms" into another category; use the main function such as "fever reduction and pain relief" and "relieving cold symptoms" as the main index, integrate similar processes, and build a medication purchase reference database.

[0024] Step S3: Construct the drug purchase process to be tested On March 15, 2024, user "ID0001" went to the store with a prescription to purchase medicine, which was "Cold Relief Granules".

[0025] Based on "ID0001", retrieve its historical drug purchase records, sorted by time as rank 1 (1.5), rank 2 (1.8), and rank 3 (2.10). The interval between the current purchase time (2.15) and the previous purchase time (2.10) is calculated to be 5 days, which is equal to the expected consumption time of the drug "Ganmaoling Granules" in process 3 (5 days). Traversing forward and associating the unmarked records, the marked record (1.8) is found. Therefore, the purchase process to be tested is: 2024-02-10 (Ganmaoling Granules), 2024-02-15 (Ganmaoling Granules, this purchase).

[0026] Step S4: Verification of the drug purchase process and drug release. S4-1. Search the reference database: Based on the main function of the drug "Ganmaoling Granules" in the process to be tested, which is "to relieve cold symptoms", call the main index of "to relieve cold symptoms" in the reference database, extract the complete drug purchase process, and record the position of the drug in this purchase (2.15) in the process to be tested as "position 2".

[0027] S4-2. Construct a temporary drug comparison sequence: Filter the processes in the reference database where "position 2" is a drug for relieving cold symptoms, extract the records before "position 2" of each process as reference drug purchase processes, and construct a temporary sequence: First drug purchase set (all drugs in position 1 of the reference process, such as Ganmaoling granules) and Second drug purchase set (all drugs in position 2 of the reference process, such as Ganmaoling granules).

[0028] S4-3, Compliance Verification: Extract the medicine and its position in the process to be tested: Position 1 (Ganmaoling Granules), Position 2 (Ganmaoling Granules). If "Ganmaoling Granules" is found in the first and second purchase sets of the temporary sequence, the verification is qualified, and the "Ganmaoling Granules" medicine is allowed to be released from the warehouse.

[0029] Step S5: Correction and manual verification when verification fails On March 20, 2024, user "ID0002" went to the store with a prescription to purchase medicine. The prescription medicine was "cephalosporin antibiotic (antibacterial and anti-inflammatory)". The process to be tested was constructed as follows: 2024-02-25 (Amoxicillin, antibacterial and anti-inflammatory, position 1) and 2024-03-20 (cephalosporin antibiotic, position 2).

[0030] Verification failed: The reference database's main index for "antibacterial and anti-inflammatory" shows that the drugs in "position 2" of the reference process are mostly "amoxicillin". The "cephalosporin antibiotics" in position 2 of the process to be tested did not appear in the second set of drugs purchased in the reference sequence, so the verification failed.

[0031] Generate correction results: Retrieve the process to be tested and obtain the "rank 1 (amoxicillin)" before this drug purchase. Filter the complete processes (180 in total) where "rank 1 is amoxicillin" in the reference database. Perform a reverse comparison (first compare rank 1, then look at rank 2). The rank 2 of the retrieved process is still "amoxicillin". Keep this type of process and extract the drug "amoxicillin" in rank 2 as the correction result.

[0032] Manual verification: Submit the revised result of "suggesting to replace with amoxicillin" to the pharmacy pharmacist, who will manually verify it and dispense the medication as appropriate.

[0033] Example 2, as Figure 2As shown, the present invention provides a multimodal drug purchase behavior data analysis system for smart pharmacies. The drug purchase behavior data analysis system includes a drug purchase record processing module, a reference database construction module, a process to be detected generation module, a drug purchase process verification module, and a process correction and verification module. The drug purchase record processing module is used to process historical drug purchase records to construct a complete drug purchase process; the reference database construction module is used to construct a drug purchase reference database based on the complete drug purchase process; the process to be tested generation module is used to construct a drug purchase process to be tested based on user prescriptions and historical drug purchase records; the drug purchase process verification module is used to retrieve the drug purchase reference database and verify the compliance of the drug purchase process to be tested; the process correction and verification module is used to generate correction results for the process to be tested that fails the verification and perform manual verification. The output of the drug purchase record processing module is electrically connected to the input of the reference database construction module; the output of the reference database construction module is electrically connected to the input of the process generation module to be tested; the output of the process generation module to be tested is electrically connected to the input of the drug purchase process verification module; and the output of the drug purchase process verification module is electrically connected to the input of the process correction and verification module.

[0034] The medication purchase record processing module includes a history record collection unit and a complete process construction unit. The history record collection unit is used to collect all users' historical medication purchase records in the smart pharmacy system, which include unique identifiers and medication purchase time information. The complete process construction unit is used to group and sort the historical records by user identifier, filter and mark key records, and associate them to form a complete medication purchase process.

[0035] The reference database construction module includes a process function classification unit and a reference database generation unit; The process function classification unit is used to extract the complete drug purchase process and group and cluster the drugs according to their main functions for the first purchase. The reference library generation unit is used to build a drug purchase reference database by integrating the clustered processes with the main functions of the drugs as the main index. The process generation module for testing includes a user record retrieval unit and a process construction unit for testing. The user record retrieval unit is used to retrieve all historical drug purchase records of a user based on the user's unique identifier; the process to be inspected construction unit is used to sort the historical drug purchase records and calculate the drug purchase time interval, and associate the records to form a drug purchase process to be inspected.

[0036] The drug purchase process verification module includes a reference library retrieval unit and a process compliance verification unit; The reference database retrieval unit is used to retrieve a complete drug purchase process from the reference database based on the main therapeutic effects of the drugs in the process to be tested; the process compliance verification unit is used to filter processes with the same position to construct a temporary sequence and verify the compliance of the drugs in the process to be tested. The process correction and verification module includes a correction result generation unit and a manual verification unit; The correction result generation unit is used to retrieve the unqualified test process, compare it with the reference database, and output the correction result of the corresponding drug. The manual verification unit is used to submit the generated correction result to a human for final verification and confirmation.

[0037] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

Claims

1. A method for analyzing multimodal drug purchasing behavior data in smart pharmacies, characterized in that: The method for analyzing drug purchase behavior data includes the following steps: Step S1: Collect historical drug purchase records, categorize them, and construct a complete drug purchase process; Step S2: Extract all complete drug purchase processes, classify them according to the main functions of the drugs, and build a drug purchase reference database; Step S3: After the user provides the prescription, extract the user's historical drug purchase records, analyze them in conjunction with the time of this drug purchase, and construct the drug purchase process to be tested; Step S4: Based on the main function information of the drug corresponding to the prescription, search the corresponding category in the drug purchase reference database, extract the drug position in the drug purchase process to be tested, the position is the position of the drug in the drug purchase process, construct a temporary reference database using the drug purchase reference database, verify the drug purchase process to be tested, if the verification is qualified, the drug is released from the warehouse. Step S5: If the verification fails, retrieve the drug purchase process to be tested, search the drug purchase reference database, provide the correction result, and perform manual verification.

2. The method for analyzing multimodal drug purchase behavior data in smart pharmacies according to claim 1, characterized in that: The specific steps of step S1 are as follows: Step S1-1: Collect all user historical drug purchase records stored in the smart pharmacy system. The historical drug purchase records include the user's unique identifier, purchase time, expected administration time, and the main function information of the drug. Step S1-2: Group the historical drug purchase records according to the user's unique identifier, sort them according to the order of purchase time within each group, calculate the time interval between the nth and (n-1)th drug purchase records, filter out the historical drug purchase records whose time interval is greater than the expected consumption time in the (n-1)th drug purchase record, and mark them. Steps S1-3: Segment the marked historical drug purchase records, mark each segment of the historical drug purchase record as a historical drug purchase record sequence, and attach a unique user identifier to form a complete drug purchase process.

3. The method for multimodal drug purchase behavior data analysis for smart pharmacies according to claim 2, characterized in that: The specific steps of step S2 are as follows: Extract all complete drug purchase processes, group them according to the main function information of the drugs in the first purchase record, cluster all complete drug purchase processes with the same main function, and construct a drug purchase reference database with the main function of the drugs as the main index.

4. The method for multimodal drug purchase behavior data analysis for smart pharmacies according to claim 3, characterized in that: The specific steps of step S3 are as follows: After a user provides a prescription, all of the user's historical medication purchase records are retrieved based on the user's unique identifier. These records are then sorted by purchase time. The time interval between the current purchase time and the previous purchase time is calculated. If the time interval is less than or equal to the expected dosage time, the process iterates backward and associates unmarked historical purchase records until a marked purchase record is found, which is then used as the medication purchase process to be tested.

5. The method for multimodal drug purchase behavior data analysis for smart pharmacies according to claim 4, characterized in that: The specific steps of step S4 are as follows: Step S4-1: Based on the main efficacy of the medicine in the medicine purchase process to be tested, call the main index structure of the medicine purchase reference database to search, extract all complete medicine purchase processes that completely match the main efficacy of the medicine, and record the position of the medicine in this medicine purchase record in the complete medicine purchase process; Step S4-2: Based on the position of the drug in the current purchase record in the drug purchase process to be tested, filter out complete drug purchase processes with the same position, extract the historical drug purchase records before that position in the complete drug purchase process, mark them as reference drug purchase processes, and construct a temporary drug comparison sequence. The temporary drug comparison sequence includes a first drug purchase set, a second drug purchase set, ..., and a m-th drug purchase set. The first drug purchase set includes the drug name of the first position in the reference drug purchase process, the second drug purchase set includes the drug name of the first position in the reference drug purchase process, ..., and the m-th drug purchase set includes the drug name of the first position in the reference drug purchase process. Step S4-3: Extract the drug name and its position in the drug purchase process to be tested. Verify the drug's position in the corresponding purchase set. If all drugs in all positions in all drug purchase processes to be tested exist in the corresponding positions in the reference drug purchase process, then it is considered a normal drug purchase and the drug is released from the warehouse.

6. The method for multimodal drug purchase behavior data analysis for smart pharmacies according to claim 5, characterized in that: In step S5, If the verification fails, retrieve the drug purchase process to be tested, obtain the drug ranking and drug name before this purchase, filter complete drug purchase processes with the same drug ranking and drug name in the drug purchase reference database, compare them in reverse order according to the drug purchase process to be tested, retain the complete drug purchase process with the most identical items, select the ranking of this purchase, extract the drug name corresponding to the ranking in the retained complete drug purchase process as the correction result, and perform manual verification.

7. A multimodal drug purchase behavior data analysis system for smart pharmacies, which is applied to the multimodal drug purchase behavior data analysis method for smart pharmacies as described in any one of claims 1-6, characterized in that: The drug purchase behavior data analysis system includes a drug purchase record processing module, a reference database construction module, a process to be tested generation module, a drug purchase process verification module, and a process correction and verification module. The drug purchase record processing module is used to process historical drug purchase records to construct a complete drug purchase process; The reference database construction module is used to construct a drug purchase reference database based on the complete drug purchase process; the process to be tested generation module is used to construct a drug purchase process to be tested based on user prescriptions and historical drug purchase records; the drug purchase process verification module is used to retrieve the drug purchase reference database and verify the compliance of the drug purchase process to be tested. The process correction and verification module is used to generate correction results for the unqualified process to be tested and to perform manual verification. The output of the drug purchase record processing module is electrically connected to the input of the reference database construction module; The output of the reference database construction module is electrically connected to the input of the process generation module to be tested; the output of the process generation module to be tested is electrically connected to the input of the drug purchase process verification module; and the output of the drug purchase process verification module is electrically connected to the input of the process correction and verification module.

8. A multimodal drug purchase behavior data analysis system for smart pharmacies according to claim 7, characterized in that: The medication purchase record processing module includes a history record collection unit and a complete process construction unit. The history record collection unit is used to collect all users' historical medication purchase records in the smart pharmacy system, which include unique identifiers and medication purchase time information. The complete process construction unit is used to group and sort the historical records by user identifier, filter and mark key records, and associate them to form a complete medication purchase process.

9. A multimodal drug purchase behavior data analysis system for smart pharmacies according to claim 7, characterized in that: The reference database construction module includes a process function classification unit and a reference database generation unit; The process function classification unit is used to extract the complete drug purchase process and group and cluster the drugs according to their main functions for the first purchase. The reference library generation unit is used to construct a drug purchase reference database by integrating clustered processes with the main index of drug indications. The process to be tested generation module includes a user record retrieval unit and a process to be tested construction unit; The user record retrieval unit is used to retrieve all historical drug purchase records of a user based on the user's unique identifier; the process to be inspected construction unit is used to sort the historical drug purchase records and calculate the drug purchase time interval, and associate the records to form a drug purchase process to be inspected.

10. A multimodal drug purchase behavior data analysis system for smart pharmacies according to claim 7, characterized in that: The drug purchase process verification module includes a reference library retrieval unit and a process compliance verification unit; The reference database retrieval unit is used to retrieve a complete drug purchase process from the reference database based on the main therapeutic effects of the drugs in the process to be tested; the process compliance verification unit is used to filter processes with the same position to construct a temporary sequence and verify the compliance of the drugs in the process to be tested. The process correction and verification module includes a correction result generation unit and a manual verification unit; The correction result generation unit is used to retrieve the unqualified test process, compare it with the reference database, and output the correction result of the corresponding drug position. The manual verification unit is used to submit the generated correction results to humans for final verification and confirmation.