Safety guarantee method, device and equipment for medicine purchasing of user
By generating and encrypting QR code images and combining multiple risk assessments based on user tags and drug purchase frequency, the problems of cumbersome information entry and the risk of fraudulent card transactions in the medical insurance system are solved, achieving efficient and accurate drug purchase security.
Patent Information
- Application Number
- CN202510817529.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-18
- Publication Date
- 2025-09-26
AI Technical Summary
In the existing technology, the medical insurance system has problems such as cumbersome information entry, large manual comparison errors, and high risks of theft and cash withdrawal by criminals when users purchase medicines. In addition, the unstable printing quality of QR codes leads to complex scanning operations and high error rates, making it difficult to effectively identify abnormal medicine purchasing behavior.
By collecting user order and medical insurance information, generating and encrypting QR code images, automatically comparing and decoding, combining user tags and drug purchase frequency to make multiple risk judgments, and generating alarm signals to identify abnormal behavior.
It improves the accuracy and efficiency of information verification, reduces the probability of false positives and missed reports, and ensures the user's drug purchasing experience and the security of the medical insurance system.
Smart Images

Figure CN120708802A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of drug purchase safety, and in particular to a method, device and equipment for ensuring safety when users purchase drugs. Background Art
[0002] In the existing medical system, users purchasing medications through medical insurance often encounter issues such as cumbersome data entry and manual comparison errors. Consequently, data entry is typically performed using QR code scanning to reduce the risks and hassle of manual entry. Furthermore, due to the lack of effective risk control mechanisms, the medical insurance system is often exposed to the risk of fraudulent theft and cash withdrawal, impacting the normal use of other users.
[0003] However, in traditional QR code systems, the printing quality of the QR code is closely related to the working conditions of the printer. During the printing process, the QR code is easily affected by the printer and the pattern is easily missing or damaged, resulting in the loss or damage of information within the QR code, which increases the complexity and error rate of the code scanning operation. Although it reduces the trouble of manual entry, manual comparison is still required, resulting in low efficiency and accuracy. At the same time, in order to reduce the risk of theft and cash withdrawal by criminals, the existing technology mainly makes judgments through simple monitoring of the number of purchases or the amount. However, this method is prone to misjudgment when a user suddenly becomes ill and urgently needs to buy a large amount of medicine, affecting the user's normal medicine purchasing needs.
[0004] Therefore, there is an urgent need for a technical solution to improve the accuracy of information verification and the flexibility and accuracy of risk assessment.
[0005] The above information disclosed in this Background section is only for enhancement of understanding of the background of the present disclosure and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art. Summary of the Invention
[0006] The purpose of the present invention is to provide a method, device and equipment for ensuring the safety of users when purchasing medicines, so as to solve the problems raised in the above background technology.
[0007] To achieve the above object, the present invention provides the following technical solutions:
[0008] The safety guarantee method for users to purchase medicines includes the following specific steps:
[0009] S1: Collect the order information of the user when purchasing medicine, generate comprehensive information based on the order information and preset medicine information, encrypt the comprehensive information using an encryption algorithm, generate a QR code image, and print it;
[0010] S2: Scan and decode the QR code image to obtain corresponding decoded data, compare the decoded data with the comprehensive information, and generate a first alarm signal based on the comparison result;
[0011] S3: Collect personal information from the user's medical insurance information, create user tags based on the personal information, bind the comprehensive information to the user tags, and generate the user's drug purchase frequency and average purchase frequency based on the comprehensive information under different user tags;
[0012] S4: Perform a risk assessment based on the user's drug purchase frequency, perform a secondary risk assessment using the result of the primary risk assessment and the average drug purchase frequency, generate a second alarm signal and a risk label based on the result of the secondary risk assessment, and bind the risk label to the user label.
[0013] Preferably, the order information includes order number, order time, drug type, and purchase quantity; the drug information includes drug code, drug name, and medical insurance code; and the personal information includes user name and ID number.
[0014] Preferably, when the decoded data is the same as the comprehensive information, no first alarm signal is generated and the decoded data can be sent to the subsequent device; when the decoded data is different from the comprehensive information, a first alarm signal is generated and the decoded data cannot be sent to the subsequent device.
[0015] Preferably, the user tag includes the user's personal information and user ID, and the user's drug purchase frequency corresponds to the user tag. The logic for performing a risk assessment on the user's drug purchase frequency is as follows:
[0016] Taking the day as the minimum observation unit, we construct an N-day observation window and collect comprehensive information under each user tag within the observation window.
[0017] The observation window is divided into m groups of n-day sub-observation intervals. Based on the number of times a user buys medicine in each sub-observation interval, a user's purchase frequency corresponding to each sub-observation interval is generated, and a frequency change line graph is generated.
[0018] The fluctuation coefficient of the drug purchase frequency of two adjacent groups of users is calculated based on the frequency change line graph, and then the fluctuation coefficient of the user's drug purchase frequency is used to determine whether the user has the risk of frequent drug purchases.
[0019] Preferably, the method for calculating the user's drug purchase frequency is: f(i)=a(i) / n, where f(i) represents the user's drug purchase frequency in the i-th sub-observation interval, and a(i) represents the number of drug purchases in the i-th sub-observation interval;
[0020] The horizontal and vertical coordinates of the frequency change line graph are the interval number of the sub-observation interval and the user's drug purchase frequency, respectively. The change rate is calculated based on the drug purchase frequency of two adjacent groups of users. The calculation method is:
[0021]
[0022] The calculation method of the fluctuation coefficient is:
[0023]
[0024] In the formula τ(i), They represent the rate of change and fluctuation coefficient of the i-th sub-observation interval, τ(i) max , τ(i) min Respectively represent the maximum and minimum values of the fluctuation coefficient within the observation window;
[0025] The fluctuation coefficient is compared with the preset fluctuation threshold For comparison, when , the user is considered to have the risk of frequent drug purchases.
[0026] Preferably, the logic for secondary risk judgment is:
[0027] When a user is judged to have the risk of frequent drug purchases, the comprehensive information of the user in the i-th observation sub-interval is collected, and the number of different types of drugs purchased by the user in the i-th observation sub-interval, the number of purchases, and the single quantity of each purchase are counted;
[0028] The drugs ranked in the top k by purchase quantity are labeled as questionable drugs, and the average purchase frequency, average purchase quantity, and average purchase frequency and average purchase quantity of each questionable drug for the user and for all users are calculated.
[0029] Compare the user's average purchase frequency and average purchase quantity of each questionable drug with the average purchase frequency and average purchase quantity of all users. When the user's average purchase frequency and average purchase quantity are much greater than the average purchase frequency and average purchase quantity of all users, the user is considered to be at risk of credit card fraud.
[0030] Preferably, the types and number of the questionable drugs in Indicates that the whole number in the brackets is rounded up, and K represents the number of different types of medicines purchased by the user in the i-th sub-observation interval;
[0031] The calculation methods for the average purchase frequency and average purchase quantity of the questionable drugs for the user are:
[0032]
[0033] In the formula Respectively represent the average purchase frequency and average purchase quantity of the user in the i-th sub-observation interval, represents the number of purchases of suspicious drugs in the i-th sub-observation interval, represents the single quantity of each purchase of the suspected drug, where the subscript q represents the drug number, q = 1, 2, 3, ..., k, and the superscript p represents the user number, p = 1, 2, 3, ..., P, where P represents the total number of users;
[0034] The calculation methods for the average purchase frequency and average purchase quantity of the questionable drugs for all users are:
[0035]
[0036] In the formula They represent the average purchase frequency and average purchase quantity of all users in the i-th sub-observation interval respectively;
[0037] Compare the average purchase frequency and average purchase quantity of each suspected drug for that user with the average purchase frequency and average purchase quantity for all users, and generate a risk assessment index through weighted processing. The calculation method is:
[0038]
[0039] Where ω(i) represents the risk assessment index of the user in the i-th sub-observation interval, μ q Indicates the weight of each suspected drug.
[0040] Preferably, the weight of each questionable drug is calculated as follows:
[0041]
[0042] Where μ1+μ2+…+μ q =1.
[0043] A safety assurance device for users purchasing medicines, the safety assurance device being used to execute the above-mentioned safety assurance method, including:
[0044] An information collection module, which is used to collect the order information of users when purchasing medicines and the personal information in the user's medical insurance information;
[0045] A data processing module, the data processing module is used to generate comprehensive information based on order information and preset drug information, establish a user tag based on personal information, and bind the comprehensive information to the user tag;
[0046] An encryption module, which is used to encrypt the comprehensive information using a preset encryption algorithm to form a QR code image and print it;
[0047] A scanning module, configured to scan and decode a QR code image to generate decoded data;
[0048] a first judgment module, configured to compare the decoded data with the comprehensive information and generate a first alarm signal according to the comparison result;
[0049] A data analysis module, which is used to generate user drug purchase frequency and average purchase frequency based on comprehensive information under different user tags;
[0050] a second judgment module, the second judgment module including a first risk unit and a second risk unit, the first risk unit being configured to perform a primary risk judgment based on the user's drug purchase frequency, the second risk unit being configured to perform a secondary risk judgment based on the result of the primary risk judgment and the average drug purchase frequency, and then generating a second alarm signal and a risk label based on the result of the secondary risk judgment;
[0051] An alarm unit is used to issue an audible and visual alarm according to the first alarm signal or the second alarm signal, and to bind the risk tag with the user tag.
[0052] Safety equipment for users to purchase medicines, including:
[0053] Storage media for storing computer programs;
[0054] A processor is used to execute the computer program to implement the above-mentioned security assurance method.
[0055] Compared with the prior art, the present invention has the following beneficial effects:
[0056] The present invention automatically compares the decoded information obtained by scanning the QR code image with the comprehensive information preset in the ERP management system, thereby achieving automatic verification of the integrity of the QR code image, reducing the trouble of manual intervention and manual calibration, and improving the accuracy and efficiency of information verification. At the same time, by introducing a comprehensive analysis of user tags and drug purchase frequency, a risk assessment is performed based on the user's drug purchase frequency, and a second risk assessment is performed based on the judgment result of the first risk assessment and the average drug purchase frequency. This multiple risk assessment method can enhance the ability to identify abnormal drug purchase behavior, effectively reduce the probability of false positives and false negatives, and ensure the user's drug purchase experience and the security of the medical insurance system. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 Schematic diagram of the overall method of the present invention;
[0058] Figure 2 It is a schematic diagram of the module structure of the present invention. DETAILED DESCRIPTION
[0059] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to specific embodiments.
[0060] It should be noted that, unless otherwise defined, the technical or scientific terms used in the present invention should have the usual meanings understood by people with ordinary skills in the field to which the present invention belongs. The "first", "second" and similar words used in the present invention do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the object being described changes, the relative position relationship may also change accordingly.
[0061] Example:
[0062] See also Figure 1 , the present invention provides a technical solution:
[0063] The safety guarantee method for users to purchase medicines includes the following specific steps:
[0064] S1: Collect the order information of the user when purchasing medicine, generate comprehensive information based on the order information and preset medicine information, encrypt the comprehensive information using an encryption algorithm, generate a QR code image, and print it;
[0065] S2: Scan and decode the QR code image to obtain corresponding decoded data, compare the decoded data with the comprehensive information, and generate a first alarm signal based on the comparison result;
[0066] S3: Collect personal information from the user's medical insurance information, create user tags based on the personal information, bind the comprehensive information to the user tags, and generate the user's drug purchase frequency and average purchase frequency based on the comprehensive information under different user tags;
[0067] S4: Perform a risk assessment based on the user's drug purchase frequency, perform a secondary risk assessment using the result of the primary risk assessment and the average drug purchase frequency, generate a second alarm signal and a risk label based on the result of the secondary risk assessment, and bind the risk label to the user label.
[0068] Order information includes order number, order time, drug type, and purchase quantity; drug information includes drug code, drug name, and medical insurance code; personal information includes user name and ID number.
[0069] When the decoded data is the same as the comprehensive information, no first alarm signal is generated and the decoded data can be sent to the subsequent device; when the decoded data is different from the comprehensive information, a first alarm signal is generated and the decoded data cannot be sent to the subsequent device.
[0070] The user tag includes the user's personal information and user ID. The user's drug purchase frequency corresponds to the user tag. The logic for making a risk assessment based on the user's drug purchase frequency is as follows:
[0071] Taking the day as the minimum observation unit, we construct an N-day observation window and collect comprehensive information under each user tag within the observation window.
[0072] The observation window is divided into m groups of n-day sub-observation intervals. Based on the number of times a user buys medicine in each sub-observation interval, a user's purchase frequency corresponding to each sub-observation interval is generated, and a frequency change line graph is generated.
[0073] The fluctuation coefficient of the drug purchase frequency of two adjacent groups of users is calculated based on the frequency change line graph, and then the fluctuation coefficient of the user's drug purchase frequency is used to determine whether the user has the risk of frequent drug purchases.
[0074] The calculation method for the user's drug purchase frequency is: f(i) = a(i) / n, where f(i) represents the user's drug purchase frequency in the i-th sub-observation interval, and a(i) represents the number of drug purchases in the i-th sub-observation interval;
[0075] The horizontal and vertical coordinates of the frequency change line graph are the interval number of the sub-observation interval and the user's drug purchase frequency, respectively. The change rate is calculated based on the drug purchase frequency of two adjacent groups of users. The calculation method is:
[0076]
[0077] The calculation method of the coefficient of fluctuation is:
[0078]
[0079] In the formula τ(i), They represent the rate of change and fluctuation coefficient of the i-th sub-observation interval, τ(i) max , τ(i) min Respectively represent the maximum and minimum values of the fluctuation coefficient within the observation window;
[0080] The fluctuation coefficient is compared with the preset fluctuation threshold For comparison, when , the user is considered to have the risk of frequent drug purchases.
[0081] The logic for secondary risk judgment is:
[0082] When a user is judged to have the risk of frequent drug purchases, the comprehensive information of the user in the i-th observation sub-interval is collected, and the number of different types of drugs purchased by the user in the i-th observation sub-interval, the number of purchases, and the single quantity of each purchase are counted;
[0083] The drugs ranked in the top k by purchase quantity are labeled as questionable drugs, and the average purchase frequency, average purchase quantity, and average purchase frequency and average purchase quantity of each questionable drug for the user and for all users are calculated.
[0084] Compare the user's average purchase frequency and average purchase quantity of each questionable drug with the average purchase frequency and average purchase quantity of all users. When the user's average purchase frequency and average purchase quantity are much greater than the average purchase frequency and average purchase quantity of all users, the user is considered to be at risk of credit card fraud.
[0085] Types and number of suspected drugs in Indicates that the whole number in the brackets is rounded up, and K represents the number of different types of medicines purchased by the user in the i-th sub-observation interval;
[0086] The calculation methods for the user's average purchase frequency and average purchase quantity of questionable drugs are as follows:
[0087]
[0088]
[0089] In the formula Respectively represent the average purchase frequency and average purchase quantity of the user in the i-th sub-observation interval, represents the number of purchases of suspicious drugs in the i-th sub-observation interval, represents the single quantity of each purchase of the suspected drug, where the subscript q represents the drug number, q = 1, 2, 3, ..., k, and the superscript p represents the user number, p = 1, 2, 3, ..., P, where P represents the total number of users;
[0090] The calculation methods for the average purchase frequency and average purchase quantity of questionable drugs for all users are:
[0091]
[0092] In the formula They represent the average purchase frequency and average purchase quantity of all users in the i-th sub-observation interval respectively;
[0093] Compare the average purchase frequency and average purchase quantity of each suspected drug for that user with the average purchase frequency and average purchase quantity for all users, and generate a risk assessment index through weighted processing. The calculation method is:
[0094]
[0095] Where ω(i) represents the risk assessment index of the user in the i-th sub-observation interval, μ q Indicates the weight of each suspected drug.
[0096] The weight of each questionable drug is calculated as follows:
[0097]
[0098] Where μ1+μ2+…+μ q =1.
[0099] See also Figure 2 The present invention also provides a safety assurance device for users to purchase medicines, which is used to implement the above-mentioned safety assurance method, including:
[0100] Information collection module, which is used to collect the order information when users purchase medicines and the personal information in the user's medical insurance information;
[0101] The data processing module is used to generate comprehensive information based on order information and preset drug information, establish user tags based on personal information, and bind the comprehensive information to the user tags;
[0102] The encryption module is used to encrypt the comprehensive information using a preset encryption algorithm to form a QR code image and print it;
[0103] Scanning module, the scanning module is used to scan and decode the QR code image to generate decoding data;
[0104] a first judgment module, the first judgment module being used to compare the decoded data with the comprehensive information and generate a first alarm signal according to the comparison result;
[0105] Data analysis module, which is used to generate user drug purchase frequency and average purchase frequency based on comprehensive information under different user tags;
[0106] A second judgment module includes a first risk unit and a second risk unit. The first risk unit is used to perform a primary risk judgment based on the user's drug purchase frequency. The second risk unit is used to perform a secondary risk judgment based on the judgment result of the primary risk judgment and the average drug purchase frequency, and then generate a second alarm signal and a risk label based on the judgment result of the secondary risk judgment;
[0107] The alarm unit is used to issue an audible and visual alarm according to the first alarm signal or the second alarm signal, and bind the risk tag with the user tag.
[0108] Safety equipment for users to purchase medicines, including:
[0109] Storage media for storing computer programs;
[0110] A processor is used to execute a computer program to implement the above security assurance method.
[0111] The above formulas are all dimensionless and numerical calculations. The formulas are obtained by collecting a large amount of data and performing software simulation to obtain the most recent real situation. The preset parameters in the formulas are set by technicians in this field according to actual conditions.
[0112] The above embodiments can be implemented in whole or in part by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraints of the technical solution.
[0113] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, and may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment as needed.
[0114] The above is only a specific implementation method of the present application, but the scope of protection of the present application is not limited thereto. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the scope of protection of the present application.
Claims
1. A method for ensuring safety when users purchase medicines, characterized in that: The specific steps include: S1: Collect the order information of the user when purchasing medicine, generate comprehensive information based on the order information and preset medicine information, encrypt the comprehensive information using an encryption algorithm, generate a QR code image, and print it; S2: Scan and decode the QR code image to obtain corresponding decoded data, compare the decoded data with the comprehensive information, and generate a first alarm signal based on the comparison result; S3: Collect personal information from the user's medical insurance information, create user tags based on the personal information, bind the comprehensive information to the user tags, and generate the user's drug purchase frequency and average purchase frequency based on the comprehensive information under different user tags; S4: Perform a risk assessment based on the user's drug purchase frequency, perform a secondary risk assessment using the result of the primary risk assessment and the average drug purchase frequency, generate a second alarm signal and a risk label based on the result of the secondary risk assessment, and bind the risk label to the user label.
2. The method for ensuring safety when purchasing medicines according to claim 1, characterized in that: The order information includes the order number, order time, drug type, and purchase quantity; the drug information includes the drug code, drug name, and medical insurance code; and the personal information includes the user's name and ID number.
3. The method for ensuring safety when purchasing medicines according to claim 1, characterized in that: When the decoded data is the same as the comprehensive information, no first alarm signal is generated and the decoded data can be sent to the subsequent device; when the decoded data is different from the comprehensive information, a first alarm signal is generated and the decoded data cannot be sent to the subsequent device.
4. The method for ensuring safety when purchasing medicines according to claim 2, characterized in that: The user tag includes the user's personal information and user ID. The user's drug purchase frequency corresponds to the user tag. The logic for performing a risk assessment on the user's drug purchase frequency is as follows: Taking the day as the minimum observation unit, we construct an N-day observation window and collect comprehensive information under each user tag within the observation window. The observation window is divided into m groups of n-day sub-observation intervals. Based on the number of times a user buys medicine in each sub-observation interval, a user's purchase frequency corresponding to each sub-observation interval is generated, and a frequency change line graph is generated. The fluctuation coefficient of the drug purchase frequency of two adjacent groups of users is calculated based on the frequency change line graph, and then the fluctuation coefficient of the user's drug purchase frequency is used to determine whether the user has the risk of frequent drug purchases.
5. The method for ensuring safety when purchasing medicines according to claim 4, characterized in that: The method for calculating the user's drug purchase frequency is: f(i) = a(i) / n, where f(i) represents the user's drug purchase frequency in the i-th sub-observation interval, and a(i) represents the number of drug purchases in the i-th sub-observation interval; The horizontal and vertical coordinates of the frequency change line graph are the interval number of the sub-observation interval and the user's drug purchase frequency, respectively. The change rate is calculated based on the drug purchase frequency of two adjacent groups of users. The calculation method is: The calculation method of the fluctuation coefficient is: In the formula τ(i), They represent the rate of change and fluctuation coefficient of the i-th sub-observation interval, τ(i) max , τ(i) min Respectively represent the maximum and minimum values of the fluctuation coefficient within the observation window; The fluctuation coefficient is compared with the preset fluctuation threshold For comparison, when , the user is considered to have the risk of frequent drug purchases.
6. The method for ensuring safety when purchasing medicines according to claim 5, characterized in that: The logic for secondary risk judgment is: When a user is judged to have the risk of frequent drug purchases, the comprehensive information of the user in the i-th observation sub-interval is collected, and the number of different types of drugs purchased by the user in the i-th observation sub-interval, the number of purchases, and the single quantity of each purchase are counted; The drugs ranked in the top k by purchase quantity are labeled as questionable drugs, and the average purchase frequency, average purchase quantity, and average purchase frequency and average purchase quantity of each questionable drug for the user and for all users are calculated. Compare the user's average purchase frequency and average purchase quantity of each questionable drug with the average purchase frequency and average purchase quantity of all users. When the user's average purchase frequency and average purchase quantity are much greater than the average purchase frequency and average purchase quantity of all users, the user is considered to be at risk of credit card fraud.
7. The method for ensuring safety when purchasing medicines according to claim 6, characterized in that: The number of types of suspected drugs in Indicates that the whole number in the brackets is rounded up, and K represents the number of different types of medicines purchased by the user in the i-th sub-observation interval; The calculation methods for the average purchase frequency and average purchase quantity of the questionable drugs for the user are: In the formula Respectively represent the average purchase frequency and average purchase quantity of the user in the i-th sub-observation interval, represents the number of purchases of suspicious drugs in the i-th sub-observation interval, represents the single quantity of each purchase of the suspected drug, where the subscript q represents the drug number, q = 1, 2, 3, ..., k, and the superscript p represents the user number, p = 1, 2, 3, ..., P, where P represents the total number of users; The calculation methods for the average purchase frequency and average purchase quantity of the questionable drugs for all users are: In the formula They represent the average purchase frequency and average purchase quantity of all users in the i-th sub-observation interval respectively; Compare the average purchase frequency and average purchase quantity of each suspected drug for that user with the average purchase frequency and average purchase quantity for all users, and generate a risk assessment index through weighted processing. The calculation method is: Where ω(i) represents the risk assessment index of the user in the i-th sub-observation interval, μ q Indicates the weight of each suspected drug.
8. The method for ensuring safety when purchasing medicines according to claim 7, characterized in that: The weight of each questionable drug is calculated as follows: In the formula μ1+μ2+…+μ q =1.
9. A safety device for users to purchase medicines, characterized in that: The security assurance device is used to execute the security assurance method according to any one of claims 1 to 8, comprising: An information collection module, which is used to collect the order information of users when purchasing medicines and the personal information in the user's medical insurance information; A data processing module, the data processing module is used to generate comprehensive information based on order information and preset drug information, establish a user tag based on personal information, and bind the comprehensive information to the user tag; An encryption module, which is used to encrypt the comprehensive information using a preset encryption algorithm to form a QR code image and print it; A scanning module, configured to scan and decode a QR code image to generate decoded data; a first judgment module, configured to compare the decoded data with the comprehensive information and generate a first alarm signal according to the comparison result; A data analysis module, which is used to generate user drug purchase frequency and average purchase frequency based on comprehensive information under different user tags; a second judgment module, the second judgment module including a first risk unit and a second risk unit, the first risk unit being configured to perform a primary risk judgment based on the user's drug purchase frequency, the second risk unit being configured to perform a secondary risk judgment based on the result of the primary risk judgment and the average drug purchase frequency, and then generating a second alarm signal and a risk label based on the result of the secondary risk judgment; An alarm unit is used to issue an audible and visual alarm according to the first alarm signal or the second alarm signal, and to bind the risk tag with the user tag.
10. Safety equipment for users to purchase medicines, characterized by: The safety equipment includes: Storage media for storing computer programs; A processor, configured to execute the computer program to implement the security assurance method according to any one of claims 1 to 8.