A method, system and medium for drug safety management based on big data and artificial intelligence
By using big data and artificial intelligence technologies, a data string for RFID tag authentication is generated to generate drug traceability data, which solves the problem of easy tampering of RFID tag data and improves the security and reliability of the drug traceability system.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CHONGQING UNIV
- Filing Date
- 2026-03-05
- Publication Date
- 2026-06-12
AI Technical Summary
In existing technologies, RFID tag data is easily modified maliciously, affecting the authenticity and reliability of drug traceability and posing a threat to drug safety supervision.
By using big data and artificial intelligence-based methods, RFID tag readers are used to acquire drug data information and authorized data strings, generate drug erasure data strings, and perform bit alignment and encoding fusion to generate drug erasure data strings as security verification credentials, thereby realizing a personalized authentication mechanism and preventing unauthorized data writing.
It effectively prevents tampering with drug RFID tag data, enhances the security and reliability of the drug traceability system, and significantly improves the level of intelligence in drug management.
Smart Images

Figure CN122197925A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data security technology, and in particular to a drug safety management method, system, and medium based on big data and artificial intelligence. Background Technology
[0002] Drug safety is a core component of the public health system, spanning the entire lifecycle of drugs, from production and distribution to storage and use. Radio Frequency Identification (RFID) technology, as a non-contact automatic identification technology, is widely used in drug traceability due to its advantages such as large storage capacity, fast identification speed, and batch reading capability. By attaching RFID tags to drug packaging, rapid collection and tracking of drug information can be achieved. However, if the data within RFID tags is maliciously modified, it will directly affect the authenticity and reliability of drug traceability, posing a significant threat to drug safety supervision. Summary of the Invention
[0003] This invention aims to at least solve the technical problems existing in the prior art, and in particular, innovatively proposes a drug safety management method, system and medium based on big data and artificial intelligence.
[0004] To achieve the above-mentioned objectives of this invention, this invention provides a drug safety management method based on big data and artificial intelligence, comprising the following steps:
[0005] S1. Use an RFID tag reader / writer to obtain the drug data information stored in the drug RFID tag. After obtaining the drug data information stored in the drug RFID tag, proceed to the next step.
[0006] S2, Obtain the authorization data string from the drug safety management platform. After obtaining the authorization data string from the drug safety management platform, proceed to the next step.
[0007] S3, use the acquired drug data information and authorization data string to generate a drug erasure data string, and then proceed to the next step;
[0008] S4, determine whether the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string:
[0009] If the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string, then data can be written to the RFID tag;
[0010] If the drug erasure data string stored in the drug RFID tag is inconsistent with the generated drug erasure data string, the data writing will be rejected.
[0011] In a preferred embodiment of the present invention, the drug data information in step S1 includes an EAN-13 product digital barcode and a drug identification code.
[0012] In a preferred embodiment of the present invention, step S3 includes the following steps:
[0013] S31, Align the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information by bit position. After aligning the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information by bit position, proceed to the next step.
[0014] S32, Generate a 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table. After generating the 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table, proceed to the next step.
[0015] S33, Generate a 160-bit drug identification code encoding data string from the 20-bit drug identification code using a character encoding lookup table. After generating the 160-bit drug identification code encoding data string from the 20-bit drug identification code using a character encoding lookup table, proceed to the next step.
[0016] S34, Generate a 160-bit authorized data string from the 20-bit authorized data string using a character encoding lookup table. After generating the 160-bit authorized data string from the 20-bit authorized data string using a character encoding lookup table, proceed to the next step.
[0017] S35, generate a first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string. After generating the first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string, proceed to the next step.
[0018] S36, use the 160-bit authorization code data string and the first drug erasure data string to generate the second drug erasure data string. After generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string, proceed to the next step.
[0019] S37. Divide the second drug erasure data string into 40 groups from front to back, and convert the characters in each group into hexadecimal to obtain the drug erasure data string.
[0020] In a preferred embodiment of the present invention, the method for aligning the EAN-13 product digital barcode, the drug identification code, and the authorization data string in the drug data information in step S31 is as follows:
[0021] Since the EAN-13 product digital barcode is 13 digits and the authorization data string is a combination of no more than 20 digits and letters, while the drug identification code is a combination of 20 digits and / or letters, the number of digits in the EAN-13 product digital barcode and the authorization data string should not exceed the number of digits in the drug identification code. The alignment principle is to add 7 zeros before the EAN-13 product digital barcode and add W zeros before the authorization data string. The number of digits in the authorization data string after adding W zeros is equal to the number of digits in the drug identification code.
[0022] In a preferred embodiment of the present invention, the method for generating the first drug erasure data string in step S35 using a 160-bit commodity digital barcode encoded data string and a 160-bit drug identification code encoded data string is as follows:
[0023] ,
[0024] in, This indicates the first drug erase / write data string. Bit character;
[0025] This represents the first element in the product's digital barcode encoding data string. Bit character;
[0026] This indicates the first element in the drug identification code encoding data string. Bit character;
[0027] This indicates the first element in the drug identification code encoding data string. Bit character;
[0028] Indicates the value of the first interval;
[0029] ,
[0030] This represents the data string for erasing and writing the first drug.
[0031] This represents the first character in the first drug erasure data string;
[0032] This represents the second character in the first drug erasure data string;
[0033] This represents the third character in the first drug erasure data string;
[0034] This represents the 160th character in the first drug erasure data string;
[0035] ,
[0036] in, This represents the data string encoded by the product's digital barcode;
[0037] This represents the first character in the product's digital barcode encoding data string;
[0038] This represents the second character in the product's digital barcode encoding data string;
[0039] This represents the third character in the product's digital barcode encoding data string;
[0040] This represents the 160th character in the product's digital barcode encoding data string;
[0041] ,
[0042] in, This represents the encoded data string of the drug identification code;
[0043] This represents the first character in the drug identification code data string;
[0044] This represents the second character in the drug identification code data string;
[0045] This represents the third character in the drug identification code data string;
[0046] This represents the 160th character in the drug identification code data string.
[0047] In a preferred embodiment of the present invention, the method for generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string in step S36 is as follows:
[0048] ,
[0049] in, This indicates the first in the second drug erasure data string. Bit character;
[0050] This indicates the first drug erase / write data string. Bit character;
[0051] Indicates the first in the authorized encoded data string Bit character;
[0052] Indicates the value of the second interval;
[0053] Indicates the first in the authorized encoded data string Bit character;
[0054] ,
[0055] in, This represents the data string for erasing and rewriting the second drug.
[0056] This represents the first character in the erase / write data string for the second drug.
[0057] This represents the second character in the erase / write data string for the second drug.
[0058] This represents the third character in the erase / write data string for the second drug.
[0059] This represents the 160th character in the second drug erasure data string;
[0060] ,
[0061] in, This represents the data string for erasing and writing the first drug.
[0062] This represents the first character in the first drug erasure data string;
[0063] This represents the second character in the first drug erasure data string;
[0064] This represents the third character in the first drug erasure data string;
[0065] This represents the 160th character in the first drug erasure data string;
[0066] ,
[0067] in, This represents the authorized encoded data string;
[0068] This represents the first character in the authorized encoded data string;
[0069] This represents the second character in the authorized encoded data string;
[0070] This represents the 3rd character in the authorized encoded data string;
[0071] This represents the 160th character in the authorized encoded data string.
[0072] In a preferred embodiment of the present invention, the method for dividing the second drug erasure data string into 40 groups from front to back in step S37 is as follows:
[0073] ,
[0074] in, This represents the segmented data string for erasing and rewriting the drug.
[0075] This represents the first character in the erase / write data string for the second drug.
[0076] This represents the second character in the erase / write data string for the second drug.
[0077] This represents the third character in the erase / write data string for the second drug.
[0078] This represents the 4th character in the second drug erasure data string;
[0079] This represents the 5th character in the second drug erasure data string;
[0080] This represents the 6th character in the second drug erasure data string;
[0081] This represents the 7th character in the second drug erasure data string;
[0082] This represents the 8th character in the erase / write data string for the second drug.
[0083] This represents the 157th character in the second drug erasure data string;
[0084] This represents the 158th character in the second drug erasure data string;
[0085] This represents the 159th character in the second drug erasure data string;
[0086] This represents the 160th character in the second drug erasure data string;
[0087] This indicates that the first four characters of the second drug erasure data string are divided into the first group;
[0088] This indicates that the 5th to 8th characters in the second drug erasure data string will be divided into a second group;
[0089] This indicates that characters 157 to 160 in the second drug erasure data string will be divided into the 40th group.
[0090] The present invention also discloses a computer system, comprising:
[0091] processor;
[0092] Memory used to store processor-executable instructions;
[0093] The processor is configured to implement a drug safety management method based on big data and artificial intelligence when executing the executable instructions.
[0094] The present invention also discloses a computer-readable storage medium, comprising:
[0095] A memory on which computer programs are stored;
[0096] A processor for executing the program in the memory to implement a drug safety management method based on big data and artificial intelligence.
[0097] In summary, by adopting the above technical solutions, this invention can generate a drug erasure data string as a security verification credential for RFID tag writing by encoding and fusing the EAN-13 commodity digital barcode, drug identification code and authorized data string. This realizes a personalized authentication mechanism based on the inherent identity characteristics of drugs; effectively prevents illegal data writing and information tampering, and significantly improves the security, reliability and intelligent management level of the drug traceability system.
[0098] Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description
[0099] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0100] Figure 1 This is a schematic flowchart of the present invention. Detailed Implementation
[0101] Embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention.
[0102] This invention discloses a drug safety management method based on big data and artificial intelligence, such as... Figure 1 As shown, it includes the following steps:
[0103] S1. Use an RFID tag reader / writer to obtain the drug data information stored in the drug RFID tag. The drug data information includes the EAN-13 commodity digital barcode and drug identification code, and may also include the approval number, production batch number, and expiration date, etc.
[0104] After obtaining the drug data information stored in the drug RFID tag, proceed to the next step;
[0105] S2, Obtain the authorization data string from the drug safety management platform. After obtaining the authorization data string from the drug safety management platform, proceed to the next step.
[0106] S3, use the acquired drug data information and authorization data string to generate a drug erasure data string, and then proceed to the next step;
[0107] S4, determine whether the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string:
[0108] If the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string, then data can be written to the RFID tag;
[0109] If the drug erasure data string stored in the drug RFID tag is inconsistent with the generated drug erasure data string, the data writing will be rejected.
[0110] In a preferred embodiment of the present invention, step S3 includes the following steps:
[0111] S31. Align the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information by digits. The alignment method is as follows: Since the EAN-13 product digital barcode is 13 digits, the authorization data string is a combination of no more than 20 digits and letters, and the drug identification code is a combination of 20 digits and / or letters, the number of digits in the EAN-13 product digital barcode and the authorization data string is no more than the number of digits in the drug identification code. The alignment principle is to add 7 zeros before the EAN-13 product digital barcode and add W zeros before the authorization data string. The number of digits in the authorization data string after adding W zeros is equal to the number of digits in the drug identification code. Adding 0 zeros before the authorization data string is equivalent to not adding 0s before the authorization data string. In this case, the number of digits in the authorization data string is equal to the number of digits in the drug identification code.
[0112] After aligning the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information with their corresponding bits, proceed to the next step.
[0113] S32, Generate a 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using the character encoding lookup table shown in Table 1. After generating the 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using the character encoding lookup table, proceed to the next step.
[0114] Table 1 Character Encoding Comparison Table
[0115]
[0116] S33, Generate a 160-bit drug identification code encoding data string from the 20-bit drug identification code using the character encoding lookup table shown in Table 1. After generating the 160-bit drug identification code encoding data string from the 20-bit drug identification code using the character encoding lookup table, proceed to the next step.
[0117] S34, Generate a 160-bit authorized data string from the 20-bit authorized data string using the character encoding lookup table shown in Table 1. After generating the 160-bit authorized data string from the 20-bit authorized data string using the character encoding lookup table, proceed to the next step.
[0118] S35, generate a first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string. After generating the first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string, proceed to the next step.
[0119] S36, use the 160-bit authorization code data string and the first drug erasure data string to generate the second drug erasure data string. After generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string, proceed to the next step.
[0120] S37. Divide the second drug erasure data string into 40 groups from front to back, and convert the characters in each group into hexadecimal to obtain the drug erasure data string.
[0121] In a preferred embodiment of the present invention, the method for generating the first drug erasure data string in step S35 using a 160-bit commodity digital barcode encoded data string and a 160-bit drug identification code encoded data string is as follows:
[0122] ,
[0123] in, This indicates the first drug erase / write data string. Bit character;
[0124] This represents the first element in the product's digital barcode encoding data string. Bit character;
[0125] This indicates the first element in the drug identification code encoding data string. Bit character;
[0126] This indicates the first element in the drug identification code encoding data string. Bit character;
[0127] Indicates the value of the first interval; Preferred Take 80;
[0128] ,
[0129] This represents the data string for erasing and writing the first drug.
[0130] This represents the first character in the first drug erasure data string;
[0131] This represents the second character in the first drug erasure data string;
[0132] This represents the third character in the first drug erasure data string;
[0133] This represents the 160th character in the first drug erasure data string;
[0134] ,
[0135] in, This represents the data string encoded by the product's digital barcode;
[0136] This represents the first character in the product's digital barcode encoding data string;
[0137] This represents the second character in the product's digital barcode encoding data string;
[0138] This represents the third character in the product's digital barcode encoding data string;
[0139] This represents the 160th character in the product's digital barcode encoding data string;
[0140] ,
[0141] in, This represents the encoded data string of the drug identification code;
[0142] This represents the first character in the drug identification code data string;
[0143] This represents the second character in the drug identification code data string;
[0144] This represents the third character in the drug identification code data string;
[0145] This represents the 160th character in the drug identification code data string.
[0146] In a preferred embodiment of the present invention, the method for generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string in step S36 is as follows:
[0147] ,
[0148] in, This indicates the first in the second drug erasure data string. Bit character;
[0149] This indicates the first drug erase / write data string. Bit character;
[0150] Indicates the first in the authorized encoded data string Bit character;
[0151] Indicates the value of the second interval; Preferred Take 80;
[0152] Indicates the first in the authorized encoded data string Bit character;
[0153] ,
[0154] in, This represents the data string for erasing and rewriting the second drug.
[0155] This represents the first character in the erase / write data string for the second drug.
[0156] This represents the second character in the erase / write data string for the second drug.
[0157] This represents the third character in the second drug erasure data string;
[0158] This represents the 160th character in the second drug erasure data string;
[0159] ,
[0160] in, This represents the data string for erasing and writing the first drug.
[0161] This represents the first character in the first drug erasure data string;
[0162] This represents the second character in the first drug erasure data string;
[0163] This represents the third character in the first drug erasure data string;
[0164] This represents the 160th character in the first drug erasure data string;
[0165] ,
[0166] in, This represents the authorized encoded data string;
[0167] This represents the first character in the authorized encoded data string;
[0168] This represents the second character in the authorized encoded data string;
[0169] This represents the 3rd character in the authorized encoded data string;
[0170] This represents the 160th character in the authorized encoded data string.
[0171] In a preferred embodiment of the present invention, the method for dividing the second drug erasure data string into 40 groups from front to back in step S37 is as follows:
[0172] ,
[0173] in, This represents the segmented data string for erasing and rewriting the drug.
[0174] This represents the first character in the erase / write data string for the second drug.
[0175] This represents the second character in the erase / write data string for the second drug.
[0176] This represents the third character in the second drug erasure data string;
[0177] This represents the 4th character in the second drug erasure data string;
[0178] This represents the 5th character in the second drug erasure data string;
[0179] This represents the 6th character in the second drug erasure data string;
[0180] This represents the 7th character in the second drug erasure data string;
[0181] This represents the 8th character in the erase / write data string for the second drug.
[0182] This represents the 157th character in the second drug erasure data string;
[0183] This represents the 158th character in the second drug erasure data string;
[0184] This represents the 159th character in the second drug erasure data string;
[0185] This represents the 160th character in the second drug erasure data string;
[0186] This indicates that the first four characters of the second drug erasure data string are divided into the first group;
[0187] This indicates that the 5th to 8th characters in the second drug erasure data string will be divided into a second group;
[0188] This indicates that characters 157 to 160 in the second drug erasure data string will be divided into the 40th group.
[0189] For example, the EAN-13 product digital barcode and drug identification code stored in the drug RFID tag are 6938200750774 and 81150424519874671733, respectively, as well as the stored drug erasure data string 333313731393D315E8657DF0887C56F271708B7C.
[0190] The first step is to use an RFID tag reader to obtain the EAN-13 product digital barcode and drug identification code stored in the drug RFID tag. The obtained EAN-13 product digital barcode and drug identification code are 6938200750774 (Banlangen) and 81150424519874671733, respectively.
[0191] The second step is to obtain the authorization data string from the drug safety management platform. The authorization data string obtained from the drug safety management platform is 25an110quan0A.
[0192] The third step is to align the EAN-13 product digital barcode, the drug identification code, and the authorization data string in the drug data information with the following bit values: 00000006938200750774, 81150424519874671733, and 0000000025an110uan0A, respectively.
[0193] Step 4: Using the character encoding lookup table shown in Table 1, generate a 160-bit product digital barcode encoding data string for the 20-digit EAN-13 product digital barcode 00000006938200750774. The string is: 00110000001100000011000000110000001100000011000000110110001110010011001110000011001000001100000011000000110111001101010110011000000110111001101110011010100110111001101110011010100;
[0194] Step 5: Using the character encoding lookup table shown in Table 1, generate a 160-bit drug identification code data string for the 20-digit drug identification code 81150424519874671733: 00111000001100010011001001101010011000001101000011010000110100001101010001101010011001110010011100100111000001101110011010000110111001100110011001100110011;
[0195] Step 6: Using the character encoding lookup table shown in Table 1, generate a 160-bit authorized data string from the 20-bit authorized data string 0000000025an110uan0A.
[0196] Step 7: Use the 160-bit product barcode to encode the data string 001100000011000000110000001100000011000000110000001101100011100100110011100000110010000001100 The string 00001101110011010100110000001101110011011100110100 and the 160-bit drug identification code encoding data string 0011100000110001001100010011010100110000001101000011001000110100001 1010100110001001110010011100000110111001101000011011100110001001101110011001100110011001100110011 Generate the first drug erasure and write data string 111111001111111001101111001011 110011011100010111000001110011011010001001011010111100000000000001100000010000010100000111000000010000001000000110000001000000101;
[0197] Step 8: Utilize the 160-bit authorized code data string 0011000000110000001100000011000000110000001100000011001000110101011000010110111000110001100110001 001100000111010101100001011011100011000001000001 and the first drug erasure data string 111111001111110011011100101111001101110001011100000111001101101000100101 10101111000000000000011000000010000010100000111000000010000001000000110000001000000101 Generates the second drug erasure and writing data string 0011001100110011000100110111001 1000100111001001111010011000101011110100001100101011111011110000100010001111100010101101111001001110001011100001000101101111100;
[0198] Step 9: Divide the second drug erasure data string 001100110011000100110111001100010011100100111101001100010101111010000110010101111101111000010001000100001111100010101101111100100111000101110000101101111100 The sequence 0011 0001 01011110 1000 0110 0101 0111 1101 1111 0000 1000 1000 0111 1100 0101 0110 11110010 0111 0001 0111 0000 1000 1011 0111 1100, converting the characters in each group to hexadecimal according to Table 2, yields the drug erasure data string 333313731393D315E8657DF0887C56F271708B7C;
[0199] Table 2 Character Conversion Table
[0200]
[0201] Step 10: Since the drug erasure data string 333313731393D315E8657DF0887C56F271708B7C stored in the drug RFID tag is consistent with the generated drug erasure data string 333313731393D315E8657DF0887C56F271708B7C, data can be written to the RFID tag. The written data can be the medical insurance code, dosage form (tablets, capsules, granules), and brand name (generic name of the drug), etc.
[0202] This invention also discloses a drug safety management system based on big data and artificial intelligence, including a medicine box for placing medicines, with an RFID tag built into the medicine box, and the RFID tag storing drug data information; the drug data information includes an EAN-13 product digital barcode and a drug identification code;
[0203] This also includes a drug safety management platform. RFID readers can obtain authorized data strings from the drug safety management platform. The authorized data string is first obtained by querying the corresponding drug erasure data string through the EAN-13 product digital barcode and / or drug identification code, and then the authorized data string is calculated using the EAN-13 product digital barcode, drug identification code, and drug erasure data string. The steps are as follows:
[0204] S2-1, The platform obtains the EAN-13 product digital barcode and drug identification code from the RFID tag reader / writer. After obtaining the EAN-13 product digital barcode and drug identification code, the platform proceeds to the next step.
[0205] S2-2, Use the EAN-13 product digital barcode and / or drug identification code to query the drug erasure data string stored on the platform. After obtaining the drug erasure data string stored on the platform by querying the EAN-13 product digital barcode and / or drug identification code, proceed to the next step.
[0206] S2-3, the platform aligns the EAN-13 product digital barcode and the drug identification code in the drug data information by digits. After aligning the EAN-13 product digital barcode and the drug identification code in the drug data information by digits, it proceeds to the next step.
[0207] S2-4: Generate a 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table. After generating the 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table, proceed to the next step.
[0208] S2-5: Generate a 160-bit drug identification code data string from the 20-bit drug identification code using a character encoding lookup table. After generating the 160-bit drug identification code data string from the 20-bit drug identification code using a character encoding lookup table, proceed to the next step.
[0209] S2-6, Generate a converted drug erasure data string using a character conversion lookup table. After generating the converted drug erasure data string using the character conversion lookup table, proceed to the next step.
[0210] S2-7, If the number of bits in the converted drug erasure data string is not equal to 160 bits, add 0 before the converted drug erasure data string to make its number of bits equal to 160, and obtain a 160-bit drug erasure data string, then proceed to the next step.
[0211] S2-8, the first drug erasure data string is generated using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string. The method for generating the first drug erasure data string using the 160-bit product digital barcode encoding data string and the 160-bit drug identification code encoding data string is as follows:
[0212] ,
[0213] in, This indicates the first drug erase / write data string. Bit character;
[0214] This represents the first element in the product's digital barcode encoding data string. Bit character;
[0215] This indicates the first element in the drug identification code encoding data string. Bit character;
[0216] This indicates the first element in the drug identification code encoding data string. Bit character;
[0217] Indicates the value of the first interval; Preferred Take 80;
[0218] ,
[0219] This represents the data string for erasing and writing the first drug.
[0220] This represents the first character in the first drug erasure data string;
[0221] This represents the second character in the first drug erasure data string;
[0222] This represents the third character in the first drug erasure data string;
[0223] This represents the 160th character in the first drug erasure data string;
[0224] ,
[0225] in, This represents the data string encoded by the product's digital barcode;
[0226] This represents the first character in the product's digital barcode encoding data string;
[0227] This represents the second character in the product's digital barcode encoding data string;
[0228] This represents the third character in the product's digital barcode encoding data string;
[0229] This represents the 160th character in the product's digital barcode encoding data string;
[0230] ,
[0231] in, This represents the encoded data string of the drug identification code;
[0232] This represents the first character in the drug identification code data string;
[0233] This represents the second character in the drug identification code data string;
[0234] This represents the third character in the drug identification code data string;
[0235] This represents the 160th character in the drug identification code data string;
[0236] After generating the first drug erasure data string using the 160-bit product digital barcode encoding data string and the 160-bit drug identification code encoding data string, proceed to the next step;
[0237] S2-9, the first authorization data string is generated by combining the 160-bit drug erasure data string with the first drug erasure data string. The method for generating the first authorization data string by combining the 160-bit drug erasure data string with the first drug erasure data string is as follows:
[0238] ,
[0239] in, Indicates the first authorized data string. Bit character;
[0240] This indicates the first drug erase / write data string. Bit character;
[0241] This indicates the first element in the drug erasure data string. Bit character;
[0242] Indicates the value of the second interval; Preferred Take 80;
[0243] This indicates the first element in the drug erasure data string. Bit character;
[0244] ,
[0245] in, This represents the first authorized data string;
[0246] This represents the first character in the first authorized data string;
[0247] This represents the second character in the first authorized data string;
[0248] This represents the third character in the first authorized data string;
[0249] This represents the 160th character in the first authorized data string;
[0250] ,
[0251] in, This represents the data string for erasing and writing the first drug.
[0252] This represents the first character in the first drug erasure data string;
[0253] This represents the second character in the first drug erasure data string;
[0254] This represents the third character in the first drug erasure data string;
[0255] This represents the 160th character in the first drug erasure data string;
[0256] ,
[0257] in, This represents the data string for erasing and rewriting pharmaceuticals.
[0258] This represents the first character in the drug erasure data string;
[0259] This represents the second character in the drug erasure data string;
[0260] This represents the third character in the drug erasure data string;
[0261] This represents the 160th character in the drug erasure data string;
[0262] After generating the first authorization data string using the 160-bit drug erasure data string and the first drug erasure data string, proceed to the next step;
[0263] S2-10, Divide the first authorized data string into 20 groups from front to back, and obtain the authorized data string by matching the characters in each group according to the character encoding lookup table; the method for dividing the first authorized data string into 20 groups from front to back is as follows:
[0264] ,
[0265] in, This represents the first authorized data string after splitting;
[0266] This represents the first character in the first authorized data string;
[0267] This represents the second character in the first authorized data string;
[0268] This represents the third character in the first authorized data string;
[0269] This represents the 4th character in the first authorized data string;
[0270] This represents the 5th character in the first authorized data string;
[0271] This represents the 6th character in the first authorized data string;
[0272] This represents the 7th character in the first authorized data string;
[0273] This represents the 8th character in the first authorized data string;
[0274] This represents the 157th character in the first authorized data string;
[0275] This represents the 158th character in the first authorized data string;
[0276] This represents the 159th character in the first authorized data string;
[0277] This represents the 160th character in the first authorized data string;
[0278] This indicates that the first four characters of the first authorized data string are divided into the first group;
[0279] This indicates that the first four characters of the first authorized data string are divided into a second group;
[0280] This indicates that the first four characters of the first authorized data string are divided into the 20th group;
[0281] The authorized data string can be obtained by matching the characters in each group to the character encoding table. The leading zeros in the authorized data string can be removed.
[0282] The data string obtained by the RFID reader / writer is used to write data to the RFID tag of the medicine, ensuring the security of the written data.
[0283] The present invention also discloses a computer system, comprising:
[0284] processor;
[0285] Memory used to store processor-executable instructions;
[0286] The processor is configured to implement a drug safety management method based on big data and artificial intelligence when executing the executable instructions.
[0287] The present invention also discloses a computer-readable storage medium, comprising:
[0288] A memory on which computer programs are stored;
[0289] A processor for executing the program in the memory to implement a drug safety management method based on big data and artificial intelligence.
[0290] Although embodiments of the invention have been shown and described, those skilled in the art will understand that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.
Claims
1. A drug safety management method based on big data and artificial intelligence, characterized in that, Includes the following steps: S1. Use an RFID tag reader / writer to obtain the drug data information stored in the drug RFID tag. After obtaining the drug data information stored in the drug RFID tag, proceed to the next step. S2, Obtain the authorization data string from the drug safety management platform. After obtaining the authorization data string from the drug safety management platform, proceed to the next step. S3, use the acquired drug data information and authorization data string to generate a drug erasure data string, and then proceed to the next step; S4, determine whether the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string: If the drug erasure data string stored in the drug RFID tag is consistent with the generated drug erasure data string, then data can be written to the RFID tag; If the drug erasure data string stored in the drug RFID tag is inconsistent with the generated drug erasure data string, the data writing will be rejected.
2. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, In step S1, the drug data information includes the EAN-13 product digital barcode and the drug identification code.
3. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, Step S3 includes the following steps: S31, Align the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information by bit position. After aligning the EAN-13 product digital barcode, drug identification code, and authorization data string in the drug data information by bit position, proceed to the next step. S32, Generate a 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table. After generating the 160-bit product digital barcode encoding data string from the 20-bit EAN-13 product digital barcode using a character encoding lookup table, proceed to the next step. S33, Generate a 160-bit drug identification code encoding data string from the 20-bit drug identification code using a character encoding lookup table. After generating the 160-bit drug identification code encoding data string from the 20-bit drug identification code using a character encoding lookup table, proceed to the next step. S34, Generate a 160-bit authorized data string from the 20-bit authorized data string using a character encoding lookup table. After generating the 160-bit authorized data string from the 20-bit authorized data string using a character encoding lookup table, proceed to the next step. S35, generate a first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string. After generating the first drug erasure data string using a 160-bit product digital barcode encoding data string and a 160-bit drug identification code encoding data string, proceed to the next step. S36, use the 160-bit authorization code data string and the first drug erasure data string to generate the second drug erasure data string. After generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string, proceed to the next step. S37. Divide the second drug erasure data string into 40 groups from front to back, and convert the characters in each group into hexadecimal to obtain the drug erasure data string.
4. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, The method for aligning the EAN-13 product digital barcode, the drug identification code, and the authorization data string in step S31 is as follows: Since the EAN-13 product digital barcode is 13 digits and the authorization data string is a combination of no more than 20 digits and letters, while the drug identification code is a combination of 20 digits and / or letters, the number of digits in the EAN-13 product digital barcode and the authorization data string should not exceed the number of digits in the drug identification code. The alignment principle is to add 7 zeros before the EAN-13 product digital barcode and add W zeros before the authorization data string. The number of digits in the authorization data string after adding W zeros is equal to the number of digits in the drug identification code.
5. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, The method for generating the first drug erasure data string in step S35 using the 160-bit product digital barcode encoded data string and the 160-bit drug identification code encoded data string is as follows: , in, This indicates the first drug erase / write data string. Bit character; This represents the first element in the product's digital barcode encoding data string. Bit character; This indicates the first element in the drug identification code encoding data string. Bit character; This indicates the first element in the drug identification code encoding data string. Bit character; Indicates the value of the first interval; , This represents the data string for erasing and writing the first drug. This represents the first character in the first drug erasure data string; This represents the second character in the first drug erasure data string; This represents the third character in the first drug erasure data string; This represents the 160th character in the first drug erasure data string; , in, This represents the data string encoded by the product's digital barcode; This represents the first character in the product's digital barcode encoding data string; This represents the second character in the product's digital barcode encoding data string; This represents the third character in the product's digital barcode encoding data string; This represents the 160th character in the product's digital barcode encoding data string; , in, This represents the encoded data string of the drug identification code; This represents the first character in the drug identification code data string; This represents the second character in the drug identification code data string; This represents the third character in the drug identification code data string; This represents the 160th character in the drug identification code data string.
6. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, The method for generating the second drug erasure data string using the 160-bit authorization code data string and the first drug erasure data string in step S36 is as follows: , in, This indicates the first in the second drug erasure data string. Bit character; This indicates the first drug erase / write data string. Bit character; Indicates the first in the authorized encoded data string Bit character; Indicates the value of the second interval; Indicates the first in the authorized encoded data string Bit character; , in, This represents the data string for erasing and rewriting the second drug. This represents the first character in the erase / write data string for the second drug. This represents the second character in the erase / write data string for the second drug. This represents the third character in the second drug erasure data string; This represents the 160th character in the second drug erasure data string; , in, This represents the data string for erasing and writing the first drug. This represents the first character in the first drug erasure data string; This represents the second character in the first drug erasure data string; This represents the third character in the first drug erasure data string; This represents the 160th character in the first drug erasure data string; , in, This represents the authorized encoded data string; This represents the first character in the authorized encoded data string; This represents the second character in the authorized encoded data string; This represents the 3rd character in the authorized encoded data string; This represents the 160th character in the authorized encoded data string.
7. The drug safety management method based on big data and artificial intelligence according to claim 1, characterized in that, In step S37, the second drug erasure data string is divided into 40 groups from front to back as follows: , in, This represents the segmented data string for erasing and rewriting the drug. This represents the first character in the erase / write data string for the second drug. This represents the second character in the erase / write data string for the second drug. This represents the third character in the second drug erasure data string; This represents the 4th character in the second drug erasure data string; This represents the 5th character in the second drug erasure data string; This represents the 6th character in the second drug erasure data string; This represents the 7th character in the second drug erasure data string; This represents the 8th character in the erase / write data string for the second drug. This represents the 157th character in the second drug erasure data string; This represents the 158th character in the second drug erasure data string; This represents the 159th character in the second drug erasure data string; This represents the 160th character in the second drug erasure data string; This indicates that the first four characters of the second drug erasure data string are divided into the first group; This indicates that the 5th to 8th characters in the second drug erasure data string will be divided into a second group; This indicates that characters 157 to 160 in the second drug erasure data string will be divided into the 40th group.
8. A computer system, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the drug safety management method based on big data and artificial intelligence as described in any one of claims 1 to 7 when executing the executable instructions.
9. A computer-readable storage medium, characterized in that, include: A memory on which computer programs are stored; A processor for executing the program in the memory to implement the drug safety management method based on big data and artificial intelligence as described in any one of claims 1 to 7.