Working method and system for scanning traceability codes of stored medicines in batches through visual images

By using visual imaging technology to scan drug traceability codes in batches and perform binary mapping processing, the problem of low efficiency in drug traceability code information processing in existing technologies has been solved, and efficient drug code conversion and warehouse management have been achieved.

CN120931297APending Publication Date: 2025-11-11CHONGQING PUJIAN PHARMACEUTICAL CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510995956.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-18
Publication Date
2025-11-11

AI Technical Summary

Technical Problem

The lack of efficient methods for batch scanning of traceability codes for stored pharmaceuticals using visual images in existing technologies leads to low efficiency in processing traceability code information.

Method used

Visual imaging technology is used to scan the traceability codes on drug packaging boxes or cartons sequentially with a barcode scanner, convert them into binary strings, and then use a specific mapping table to convert them into drug codes, thus achieving batch scanning and information mapping.

Benefits of technology

It enables efficient batch scanning and information processing of drug traceability codes, improving the efficiency and accuracy of warehouse management.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120931297A_ABST
    Figure CN120931297A_ABST
Patent Text Reader

Abstract

The invention provides a working method for scanning traceability codes of stored medicines in batches through visual images, and the method comprises the following steps: S1, scanning the traceability codes on M medicine packaging boxes in sequence through a same scanning gun, M being a positive integer greater than or equal to 1, and obtaining a traceability character string 1 corresponding to the traceability codes; s2, performing drug information mapping processing on the traceability character string I to obtain a traceability character string III; the tracing character string 3 is a medicine code corresponding to the medicine bar code; or S1, the traceability codes on M packaging boxes are sequentially scanned through the same scanning gun, M is a positive integer larger than or equal to 1, and a second traceability character string corresponding to the traceability codes is obtained; and S2, performing drug information mapping processing on the tracing character string 2 to obtain a tracing character string 4. According to the invention, the traceability code of the corresponding decoding can be obtained by independently scanning the traceability code on the medicine packaging box or the packaging box.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method and system for batch scanning of traceability codes for warehoused medicines using visual images. Background Technology

[0002] A traceability code is a unique code assigned to each product, typically in a one-item-one-code format. "One item, one code" refers to a technology that uses a cloud platform to connect consumers, businesses, and distributors, thereby providing comprehensive O2O (Online to Offline) marketing, anti-counterfeiting traceability, warehousing, and logistics solutions. Summary of the Invention

[0003] This invention aims to at least solve the technical problems existing in the prior art, and in particular, it innovatively proposes a working method and system for batch scanning of traceability codes for warehoused medicines using visual images.

[0004] To achieve the above-mentioned objectives of the present invention, the present invention provides a method for batch scanning of traceability codes for warehoused pharmaceuticals using visual images, comprising the following steps:

[0005] S1, use the same barcode scanner to scan the traceability codes on M medicine packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string corresponding to the traceability code;

[0006] Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box;

[0007] The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code;

[0008] Scan the first traceability code on the first medicine packaging box with a barcode scanner to obtain the first traceability string corresponding to the first traceability code; scan the second traceability code on the second medicine packaging box with a barcode scanner to obtain the second traceability string corresponding to the second traceability code; scan the third traceability code on the third medicine packaging box with a barcode scanner to obtain the third traceability string corresponding to the third traceability code; ...; scan the Mth traceability code on the Mth medicine packaging box with a barcode scanner to obtain the Mth traceability string corresponding to the Mth traceability code;

[0009] S2, perform drug information mapping processing on traceability string one to obtain traceability string three; traceability string three is the drug code corresponding to the drug barcode;

[0010] Among them, the first traceability string is processed by drug information mapping to obtain the third traceability string;

[0011] The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 3;

[0012] The third traceability string is processed by drug information mapping to obtain the third traceability string.

[0013] The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 3;

[0014] or,

[0015] S1, use the same barcode scanner to scan the traceability codes on M packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string 2 corresponding to the traceability code;

[0016] Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box;

[0017] The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code;

[0018] Using a barcode scanner, scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code; use the barcode scanner to scan the second traceability code on the second medicine packaging box to obtain the second traceability string corresponding to the second traceability code; use the barcode scanner to scan the third traceability code on the third medicine packaging box to obtain the second traceability string corresponding to the third traceability code; ...; use the barcode scanner to scan the Mth traceability code on the Mth medicine packaging box to obtain the second traceability string corresponding to the Mth traceability code;

[0019] S2, perform drug information mapping processing on traceability string two to obtain traceability string four;

[0020] Among them, the first traceability string is processed by drug information mapping to obtain the fourth traceability string;

[0021] The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 4;

[0022] The third traceability string 1 is processed by drug information mapping to obtain the third traceability string 4;

[0023] The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 4.

[0024] In a preferred embodiment of the present invention, when M is 1:

[0025] S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the first traceability string corresponding to the first traceability code;

[0026] S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 3;

[0027] or,

[0028] S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code;

[0029] S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 4.

[0030] In a preferred embodiment of the present invention, the scanner in step S1 is a barcode / QR code dual-function scanner.

[0031] In a preferred embodiment of the present invention, in step S1, the traced string is a number string of one of 0 to 9, A to E, or any combination thereof.

[0032] In a preferred embodiment of the present invention, the method for performing drug information mapping processing on traceability string one in step S2 to obtain traceability string three includes the following steps:

[0033] S21, convert each character in the trace string to binary, the lookup table is as follows:

[0034]

[0035]

[0036] S22, obtain the mapping table;

[0037] S23, put each character in the binary trace string into the mapping table from left to right and from top to bottom in order from left to right;

[0038] S24. After executing step S23, retrieve characters from the mapping table in order from left to right and from top to bottom;

[0039] S25, divide the extracted characters into P groups according to Q characters per group;

[0040] S26. After performing step S25, convert the four-character string to a one-character string. The corresponding table is as follows:

[0041] Four characters One character 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9

[0042] That is, when the four-digit character is 0000, it is converted to a single-digit character 0; when the four-digit character is 0001, it is converted to a single-digit character 1; when the four-digit character is 0010, it is converted to a single-digit character 2; when the four-digit character is 0011, it is converted to a single-digit character 3; when the four-digit character is 0100, it is converted to a single-digit character 4; when the four-digit character is 0101, it is converted to a single-digit character 5; when the four-digit character is 0110, it is converted to a single-digit character 6; when the four-digit character is 0111, it is converted to a single-digit character 7; when the four-digit character is 1000, it is converted to a single-digit character 8; when the four-digit character is 1001, it is converted to a single-digit character 9.

[0043] In a preferred embodiment of the present invention, step S21 includes:

[0044]

[0045] Among them, C tracestring,2 To trace the number of bits in the binary string 1;

[0046] To trace the number of binary digits of the first character in string 1;

[0047] To trace the number of binary digits of the second character in string 1;

[0048] To trace the number of binary digits of the third character in string 1;

[0049] To trace the number of binary digits of the A-th character in string 1;

[0050] To trace the number of binary digits of the j-th character in string 1;

[0051] A represents the number of digits in the trace string one;

[0052]

[0053] B tracestring To trace string one;

[0054] To trace back to the first character in string one;

[0055] To trace back to the second character in string one;

[0056] To trace back to the 3rd character in string 1;

[0057] To trace back to the A-th character in string one;

[0058] To trace back to the w-th character in string 1; w = 1, 2, 3, ..., A;

[0059]

[0060] C 2,tracestring The binary representation of the trace string is the binary trace string one;

[0061] To trace the first character in the binary representation of the first character in string 1;

[0062] To trace the second character in the binary representation corresponding to the first character in string 1;

[0063] To trace the third character in the binary representation of the first character in string 1;

[0064] To trace the 4th character in binary corresponding to the 1st character in string 1;

[0065] To trace the first character in the binary representation of the second character in string 1;

[0066] To trace the second character in the binary representation of the second character in string 1;

[0067] To trace the third character in the binary representation of the second character in string 1;

[0068] To trace the 4th character in binary corresponding to the 2nd character in string 1;

[0069] To trace the first character in the binary representation of the third character in string 1;

[0070] To trace the second character in the binary representation of the third character in string 1;

[0071] To trace the third character in binary corresponding to the third character in string one;

[0072] To trace the 4th character in binary corresponding to the 3rd character in string 1;

[0073] To trace the first character in the binary representation of the Ath character in string 1;

[0074] To trace the second character in the binary representation corresponding to the Ath character in string 1;

[0075] To trace the 3rd character in binary corresponding to the Ath character in string 1;

[0076] To trace the 4th character in binary corresponding to the Ath character in string 1;

[0077] To trace the p-th character in string 1 to the q-th character in binary; p = 1, 2, 3, ..., A; q = 1, 2, 3, 4.

[0078] In a preferred embodiment of the present invention, step S25 includes:

[0079] P = W / Q,

[0080] P is the number of groups into which the extracted characters will be divided;

[0081] W represents the number of characters extracted;

[0082] Q represents the number of characters in each group.

[0083] In a preferred embodiment of the present invention, step S26 includes:

[0084] L ζ =8l ζ,1 +4l ζ,2 +2l ζ,3 +l ζ,4 ,

[0085] Among them, L ζ Let ζ be the character corresponding to the ζ-th group; ζ = 1, 2, 3, ..., P;

[0086] l ζ,1 This is the numerical value corresponding to the first character in the ζ-th group;

[0087] l ζ,2 This is the numerical value corresponding to the second character in group ζ;

[0088] l ζ,3 This is the numerical value corresponding to the 3rd character in group ζ;

[0089] l ζ,4 This is the numerical value corresponding to the 4th character in group ζ;

[0090] L = L1L2L3…L P ,

[0091] L is the string obtained after conversion, which is the traceback string three;

[0092] L1 is the character corresponding to the first group;

[0093] L2 is the character corresponding to the second group;

[0094] L3 is the character corresponding to the third group;

[0095] L P The character corresponding to group P.

[0096] In a preferred embodiment of the present invention, the method for performing drug information mapping processing on traceability string two in step S2 to obtain traceability string four includes the following steps:

[0097] S21, convert each character in the trace string 2 to binary, the lookup table is as follows:

[0098]

[0099]

[0100] S22, generate a QR code using the drug manufacturer's name; place 52 black boxes in the boxes from left to right and top to bottom, and determine if the number of white boxes before the 52nd black box is a multiple of 4:

[0101] If the number of white boxes placed before the 52nd black box is not a multiple of 4, then reduce the number of white boxes by ψ:

[0102]

[0103] Where ψ is the number of white boxes that are reduced;

[0104] T is the number of white boxes placed before the 52nd black box;

[0105] This is a floor function;

[0106] Change the first white box, the second white box, the third white box, ..., the ψth white box into empty boxes in the order from left to right and top to bottom; that is:

[0107] If ψ is 1, change the first white box to an empty box in the order from left to right and top to bottom;

[0108] If ψ is 2, change the first white box and the second white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0109] If ψ is 3, change the first white box, the second white box, and the third white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0110] If the number of white boxes before the 52nd black box is a multiple of 4, then the QR code is a mapping table;

[0111] S23, put each character in the binary trace string two into the mapping table from left to right and from top to bottom in order from left to right;

[0112] S24. After executing step S23, retrieve the characters from the black area of ​​the mapping table in the order from left to right and from top to bottom.

[0113] S25, divide the extracted characters into P groups according to Q characters per group;

[0114] S26. After performing step S25, convert the four-character string to a one-character string. The corresponding table is as follows:

[0115] Four characters One character 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9

[0116] That is, when the four-digit character is 0000, it is converted to a single-digit character 0; when the four-digit character is 0001, it is converted to a single-digit character 1; when the four-digit character is 0010, it is converted to a single-digit character 2; when the four-digit character is 0011, it is converted to a single-digit character 3; when the four-digit character is 0100, it is converted to a single-digit character 4; when the four-digit character is 0101, it is converted to a single-digit character 5; when the four-digit character is 0110, it is converted to a single-digit character 6; when the four-digit character is 0111, it is converted to a single-digit character 7; when the four-digit character is 1000, it is converted to a single-digit character 8; when the four-digit character is 1001, it is converted to a single-digit character 9.

[0117] In a preferred embodiment of the present invention, step S21 includes:

[0118]

[0119] Among them, C′ tracestring,2 To trace the number of bits in the binary string 2;

[0120] To trace the number of binary digits of the first character in string two;

[0121] To trace the number of binary digits of the second character in string two;

[0122] To trace the number of binary digits of the third character in string two;

[0123] To trace the number of binary digits of the A'th character in string two;

[0124] To trace the number of binary digits of the j-th character in string two;

[0125] A′ represents the number of digits in the second string; here, A′ is 13.

[0126]

[0127] B′ tracestring To trace string two;

[0128] To trace back to the first character in string two;

[0129] To trace back to the second character in string two;

[0130] To trace back to the 3rd character in string 2;

[0131] To trace back to the A'th character in string two;

[0132] To trace the w′-th character in string two; w′ = 1, 2, 3, ..., A′;

[0133]

[0134] C′ 2,tracestring The binary representation of the second traceable string is the binary traceable string.

[0135] To trace the first character in the binary representation of the first character in string two;

[0136] To trace the second character in the binary representation of the first character in string two;

[0137] To trace the third character in the binary representation corresponding to the first character in string two;

[0138] To trace the 4th character in the binary representation corresponding to the 1st character in string 2;

[0139] To trace the first character in the binary representation of the second character in string two;

[0140] To trace the second character in the binary representation of the second character in string two;

[0141] To trace the third character in the binary representation corresponding to the second character in string two;

[0142] To trace the 4th character in the binary representation corresponding to the 2nd character in string 2;

[0143] To trace the first character in the binary representation of the third character in string two;

[0144] To trace the second character in the binary representation of the third character in string two;

[0145] To trace the third character in the binary representation of the third character in string two;

[0146] To trace the 4th character in the binary representation corresponding to the 3rd character in string 2;

[0147] To trace the first character in the binary representation of the A'th character in string two;

[0148] To trace the second character in the binary representation corresponding to the A'th character in string two;

[0149] To trace the third character in binary corresponding to the A'th character in string two;

[0150] To trace the 4th character in binary corresponding to the A'th character in string two;

[0151] To trace the p′th character in string 2 to the q′th character in binary; p′ = 1, 2, 3, ..., A′; q′ = 1, 2, 3, 4.

[0152] In a preferred embodiment of the present invention, step S25 includes:

[0153] P′=W′ / Q′,

[0154] P′ is the number of groups into which the extracted characters will be divided;

[0155] W′ represents the number of characters extracted;

[0156] Q′ represents the number of characters in each group;

[0157] Here, Q′ is set to 4.

[0158] In a preferred embodiment of the present invention, step S26 includes:

[0159] L′ ζ′ =8l′ ζ′,1 +4l′ ζ′,2 +2l′ ζ′,3 +l′ ζ′,4 ,

[0160] Among them, L′ ζ′ Let ζ′ be the character corresponding to the ζ′ group; ζ′ = 1, 2, 3, ..., P′;

[0161] l′ ζ′,1 This is the numerical value corresponding to the first character in the ζ′ group;

[0162] l′ ζ′,2 This is the numerical value corresponding to the second character in group ζ′;

[0163] l′ ζ′,3 This is the numerical value corresponding to the 3rd character in group ζ′;

[0164] l′ ζ′,4 This is the numerical value corresponding to the 4th character in group ζ′;

[0165] L′=L′1L′2L′3…L′ P′ ,

[0166] L′ is the string obtained after conversion, which is the traceback string four;

[0167] L′1 is the character corresponding to the first group;

[0168] L′2 is the character corresponding to the second group;

[0169] L′3 is the character corresponding to the 3rd group;

[0170] L′ P′ The character corresponding to group P′.

[0171] The present invention also discloses a computer system, comprising:

[0172] processor;

[0173] Memory used to store processor-executable instructions;

[0174] The processor is configured to implement the method of batch scanning warehouse drug traceability codes using visual images when executing the executable instructions.

[0175] The present invention also discloses a computer-readable storage medium, comprising:

[0176] A memory on which computer programs are stored;

[0177] A processor is used to execute the program in the memory to implement the method of batch scanning of warehouse drug traceability codes using visual images.

[0178] In summary, by adopting the above technical solution, the present invention can obtain the corresponding decoded traceability code by scanning the traceability code on the drug packaging box or packaging box individually.

[0179] 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

[0180] 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:

[0181] Figure 1 This is a schematic flowchart of the present invention.

[0182] Figure 2 This is a schematic diagram of the QR code corresponding to the traceability string 2 of this invention.

[0183] Figure 3 This is a schematic diagram showing the position of the present invention within the QR code without placing it in a frame.

[0184] Figure 4 This is a schematic diagram illustrating how the binary traceability string is placed into the black area of ​​the mapping table in this invention.

[0185] Figure 5 This is a schematic diagram of how the invention places 0 in the white area of ​​the mapping table.

[0186] Figure 6 This is a schematic diagram of how the binary traceability string is placed into the mapping table in this invention. Detailed Implementation

[0187] 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.

[0188] This invention discloses a method for batch scanning of traceability codes for stored pharmaceuticals using visual images, such as... Figure 1 As shown, it includes the following steps:

[0189] S1, use the same barcode scanner to scan the traceability codes on M medicine packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string corresponding to the traceability code;

[0190] Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box;

[0191] The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code;

[0192] Scan the first traceability code on the first medicine packaging box with a barcode scanner to obtain the first traceability string corresponding to the first traceability code; scan the second traceability code on the second medicine packaging box with a barcode scanner to obtain the second traceability string corresponding to the second traceability code; scan the third traceability code on the third medicine packaging box with a barcode scanner to obtain the third traceability string corresponding to the third traceability code; ...; scan the Mth traceability code on the Mth medicine packaging box with a barcode scanner to obtain the Mth traceability string corresponding to the Mth traceability code;

[0193] S2, perform drug information mapping processing on traceability string one to obtain traceability string three; traceability string three is the drug code corresponding to the drug barcode;

[0194] Among them, the first traceability string is processed by drug information mapping to obtain the third traceability string;

[0195] The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 3;

[0196] The third traceability string is processed by drug information mapping to obtain the third traceability string.

[0197] The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 3;

[0198] or,

[0199] S1, use the same barcode scanner to scan the traceability codes on M packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string 2 corresponding to the traceability code;

[0200] Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box;

[0201] The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code;

[0202] Using a barcode scanner, scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code; use the barcode scanner to scan the second traceability code on the second medicine packaging box to obtain the second traceability string corresponding to the second traceability code; use the barcode scanner to scan the third traceability code on the third medicine packaging box to obtain the second traceability string corresponding to the third traceability code; ...; use the barcode scanner to scan the Mth traceability code on the Mth medicine packaging box to obtain the second traceability string corresponding to the Mth traceability code;

[0203] S2, perform drug information mapping processing on traceability string two to obtain traceability string four;

[0204] Among them, the first traceability string is processed by drug information mapping to obtain the fourth traceability string;

[0205] The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 4;

[0206] The third traceability string 1 is processed by drug information mapping to obtain the third traceability string 4;

[0207] The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 4.

[0208] In a preferred embodiment of the present invention, when M is 1:

[0209] S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the first traceability string corresponding to the first traceability code;

[0210] S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 3;

[0211] or,

[0212] S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code;

[0213] S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 4.

[0214] In a preferred embodiment of the present invention, the scanner in step S1 is a barcode / QR code dual-mode scanner.

[0215] In a preferred embodiment of the present invention, the second traceable string in step S1 can be one of 0 to 9, A to E, or any combination of numbers.

[0216] In a preferred embodiment of the present invention, the traceable string in step S2 can be a 13-digit string of numbers from 0 to 9 or any combination thereof.

[0217] In a preferred embodiment of the present invention, the method for performing drug information mapping processing on traceability string one in step S2 to obtain traceability string three includes the following steps:

[0218] S21, convert each character in the trace string to binary, the lookup table is as follows:

[0219]

[0220]

[0221] S22, generate a QR code using the drug manufacturer's name; place 52 black boxes in the boxes from left to right and top to bottom, and determine if the number of white boxes before the 52nd black box is a multiple of 4:

[0222] If the number of white boxes placed before the 52nd black box is not a multiple of 4, then reduce the number of white boxes by ψ:

[0223]

[0224] Where ψ is the number of white boxes that are reduced;

[0225] T is the number of white boxes placed before the 52nd black box;

[0226] This is a floor function;

[0227] Change the first white box, the second white box, the third white box, ..., the ψth white box into empty boxes in the order from left to right and top to bottom; that is:

[0228] If ψ is 1, change the first white box to an empty box in the order from left to right and top to bottom;

[0229] If ψ is 2, change the first white box and the second white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0230] If ψ is 3, change the first white box, the second white box, and the third white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0231] If the number of white boxes before the 52nd black box is a multiple of 4, then the QR code is a mapping table;

[0232] S23, put each character in the binary trace string into the mapping table from left to right and from top to bottom in order from left to right;

[0233] S24. After executing step S23, retrieve characters from the mapping table in order from left to right and from top to bottom;

[0234] S25, divide the extracted characters into P groups according to Q characters per group;

[0235] S26. After performing step S25, convert the four-character string to a one-character string. The corresponding table is as follows:

[0236] Four characters One character 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9

[0237] That is, when the four-digit character is 0000, it is converted to a single-digit character 0; when the four-digit character is 0001, it is converted to a single-digit character 1; when the four-digit character is 0010, it is converted to a single-digit character 2; when the four-digit character is 0011, it is converted to a single-digit character 3; when the four-digit character is 0100, it is converted to a single-digit character 4; when the four-digit character is 0101, it is converted to a single-digit character 5; when the four-digit character is 0110, it is converted to a single-digit character 6; when the four-digit character is 0111, it is converted to a single-digit character 7; when the four-digit character is 1000, it is converted to a single-digit character 8; when the four-digit character is 1001, it is converted to a single-digit character 9.

[0238] In a preferred embodiment of the present invention, step S21 includes:

[0239]

[0240] Among them, C tracestring,2 To trace the number of bits in the binary string 1;

[0241] To trace the number of binary digits of the first character in string 1;

[0242] To trace the number of binary digits of the second character in string 1;

[0243] To trace the number of binary digits of the third character in string 1;

[0244] To trace the number of binary digits of the A-th character in string 1;

[0245] To trace the number of binary digits of the j-th character in string 1;

[0246] A represents the number of digits in the trace string one;

[0247]

[0248] B tracestring To trace string one;

[0249] To trace back to the first character in string one;

[0250] To trace back to the second character in string one;

[0251] To trace back to the 3rd character in string 1;

[0252] To trace back to the A-th character in string one;

[0253] To trace back to the w-th character in string 1; w = 1, 2, 3, ..., A;

[0254]

[0255] C 2,tracestring The binary representation of the trace string is the binary trace string one;

[0256] To trace the first character in the binary representation of the first character in string 1;

[0257] To trace the second character in the binary representation corresponding to the first character in string 1;

[0258] To trace the third character in the binary representation of the first character in string 1;

[0259] To trace the 4th character in binary corresponding to the 1st character in string 1;

[0260] To trace the first character in the binary representation of the second character in string 1;

[0261] To trace the second character in the binary representation of the second character in string 1;

[0262] To trace the third character in the binary representation of the second character in string 1;

[0263] To trace the 4th character in binary corresponding to the 2nd character in string 1;

[0264] To trace the first character in the binary representation of the third character in string 1;

[0265] To trace the second character in the binary representation of the third character in string 1;

[0266] To trace the third character in binary corresponding to the third character in string one;

[0267] To trace the 4th character in binary corresponding to the 3rd character in string 1;

[0268] To trace the first character in the binary representation of the Ath character in string 1;

[0269] To trace the second character in the binary representation corresponding to the Ath character in string 1;

[0270] To trace the 3rd character in binary corresponding to the Ath character in string 1;

[0271] To trace the 4th character in binary corresponding to the Ath character in string 1;

[0272] To trace the p-th character in string 1 to the q-th character in binary; p = 1, 2, 3, ..., A; q = 1, 2, 3, 4.

[0273] In a preferred embodiment of the present invention, step S25 includes:

[0274] P = W / Q,

[0275] P is the number of groups into which the extracted characters will be divided;

[0276] W represents the number of characters extracted;

[0277] Q represents the number of characters in each group;

[0278] Here, Q is 4, P is 13, and W is 52;

[0279] Correspondingly, in step S24, if the number of characters retrieved from the mapping table is not equal to 52, it indicates that the mapping table is incorrect or the retrieval method is incorrect.

[0280] In a preferred embodiment of the present invention, step S26 includes:

[0281] L ζ =8l ζ,1 +4l ζ,2 +2l ζ,3 +l ζ,4 ,

[0282] Among them, L ζ Let ζ be the character corresponding to the ζ-th group; ζ = 1, 2, 3, ..., P;

[0283] l ζ,1 This is the numerical value corresponding to the first character in the ζ-th group;

[0284] l ζ,2 This is the numerical value corresponding to the second character in group ζ;

[0285] l ζ,3 This is the numerical value corresponding to the 3rd character in group ζ;

[0286] l ζ,4 This is the numerical value corresponding to the 4th character in group ζ;

[0287] L = L1L2L3…L P ,

[0288] L is the string obtained after conversion, which is the traceback string three;

[0289] L1 is the character corresponding to the first group;

[0290] L2 is the character corresponding to the second group;

[0291] L3 is the character corresponding to the third group;

[0292] L P The character corresponding to group P.

[0293] In a preferred embodiment of the present invention, step S24 is: after step S23 is completed, characters are first extracted from the white map table in the order from left to right and from top to bottom;

[0294] Next, check if all the extracted characters are 0:

[0295] If the retrieved characters are not all 0, it indicates that there is a problem with the mapping table, and step S1 should be executed again;

[0296] If all the extracted characters are 0, then extract the characters from the black area of ​​the mapping table in the order from left to right and from top to bottom.

[0297] In a preferred embodiment of the present invention, the method for performing drug information mapping processing on traceability string two in step S2 to obtain traceability string four includes the following steps:

[0298] S21, convert each character in the trace string 2 to binary, the lookup table is as follows:

[0299]

[0300]

[0301] S22, generate a QR code using the drug manufacturer's name; place 52 black boxes in the boxes from left to right and top to bottom, and determine if the number of white boxes before the 52nd black box is a multiple of 4:

[0302] If the number of white boxes placed before the 52nd black box is not a multiple of 4, then reduce the number of white boxes by ψ:

[0303]

[0304] Where ψ is the number of white boxes that are reduced;

[0305] T is the number of white boxes placed before the 52nd black box;

[0306] This is a floor function;

[0307] Change the first white box, the second white box, the third white box, ..., the ψth white box into empty boxes in the order from left to right and top to bottom; that is:

[0308] If ψ is 1, change the first white box to an empty box in the order from left to right and top to bottom;

[0309] If ψ is 2, change the first white box and the second white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0310] If ψ is 3, change the first white box, the second white box, and the third white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0311] If the number of white boxes before the 52nd black box is a multiple of 4, then the QR code is a mapping table;

[0312] S23, put each character in the binary trace string two into the mapping table from left to right and from top to bottom in order from left to right;

[0313] S24. After executing step S23, retrieve the characters from the black area of ​​the mapping table in the order from left to right and from top to bottom.

[0314] S25, divide the extracted characters into P groups according to Q characters per group;

[0315] S26. After performing step S25, convert the four-character string to a one-character string. The corresponding table is as follows:

[0316] Four characters One character 0000 0 0001 1 0010 2 0011 3 0100 4 0101 5 0110 6 0111 7 1000 8 1001 9

[0317] That is, when the four-digit character is 0000, it is converted to a single-digit character 0; when the four-digit character is 0001, it is converted to a single-digit character 1; when the four-digit character is 0010, it is converted to a single-digit character 2; when the four-digit character is 0011, it is converted to a single-digit character 3; when the four-digit character is 0100, it is converted to a single-digit character 4; when the four-digit character is 0101, it is converted to a single-digit character 5; when the four-digit character is 0110, it is converted to a single-digit character 6; when the four-digit character is 0111, it is converted to a single-digit character 7; when the four-digit character is 1000, it is converted to a single-digit character 8; when the four-digit character is 1001, it is converted to a single-digit character 9.

[0318] In a preferred embodiment of the present invention, step S21 includes:

[0319]

[0320] Among them, C′ tracestring,2 To trace the number of bits in the binary string 2;

[0321] To trace the number of binary digits of the first character in string two;

[0322] To trace the number of binary digits of the second character in string two;

[0323] To trace the number of binary digits of the third character in string two;

[0324] To trace the number of binary digits of the A'th character in string two;

[0325] To trace the number of binary digits of the j-th character in string two;

[0326] A′ represents the number of digits in the second string; here, A′ is 13.

[0327]

[0328] B′ tracestring To trace string two;

[0329] To trace back to the first character in string two;

[0330] To trace back to the second character in string two;

[0331] To trace back to the 3rd character in string 2;

[0332] To trace back to the A'th character in string two;

[0333] To trace the w′-th character in string two; w′ = 1, 2, 3, ..., A′;

[0334]

[0335] C′ 2,tracestring The binary representation of the second traceable string is the binary traceable string.

[0336] To trace the first character in the binary representation of the first character in string two;

[0337] To trace the second character in the binary representation of the first character in string two;

[0338] To trace the third character in the binary representation corresponding to the first character in string two;

[0339] To trace the 4th character in the binary representation corresponding to the 1st character in string 2;

[0340] To trace the first character in the binary representation of the second character in string two;

[0341] To trace the second character in the binary representation of the second character in string two;

[0342] To trace the third character in the binary representation of the second character in string two;

[0343] To trace the 4th character in the binary representation corresponding to the 2nd character in string 2;

[0344] To trace the first character in the binary representation of the third character in string two;

[0345] To trace the second character in the binary representation of the third character in string two;

[0346] To trace the third character in the binary representation of the third character in string two;

[0347] To trace the 4th character in the binary representation corresponding to the 3rd character in string 2;

[0348] To trace the first character in the binary representation of the A'th character in string two;

[0349] To trace the second character in the binary representation corresponding to the A'th character in string two;

[0350] To trace the third character in binary corresponding to the A'th character in string two;

[0351] To trace the 4th character in binary corresponding to the A'th character in string two;

[0352] To trace the p′th character in string 2 to the q′th character in binary; p′ = 1, 2, 3, ..., A′; q′ = 1, 2, 3, 4.

[0353] In a preferred embodiment of the present invention, step S25 includes:

[0354] P′=W′ / Q′,

[0355] P′ is the number of groups into which the extracted characters will be divided;

[0356] W′ represents the number of characters extracted;

[0357] Q′ represents the number of characters in each group;

[0358] Here, Q′ is set to 4.

[0359] In a preferred embodiment of the present invention, step S26 includes:

[0360] L′ ζ′ =8l′ ζ′,1 +4l′ ζ′,2 +2l′ ζ′,3 +l′ ζ′,4 ,

[0361] Among them, L′ ζ′ Let ζ′ be the character corresponding to the ζ′ group; ζ′ = 1, 2, 3, ..., P′;

[0362] l′ ζ′,1 This is the numerical value corresponding to the first character in the ζ′ group;

[0363] l′ ζ′,2 This is the numerical value corresponding to the second character in group ζ′;

[0364] l′ ζ′,3 This is the numerical value corresponding to the 3rd character in group ζ′;

[0365] l′ ζ′,4 This is the numerical value corresponding to the 4th character in group ζ′;

[0366] L′=L′1L′2L′3…L′ P′ ,

[0367] L′ is the string obtained after conversion, which is the traceback string four;

[0368] L′1 is the character corresponding to the first group;

[0369] L′2 is the character corresponding to the second group;

[0370] L′3 is the character corresponding to the 3rd group;

[0371] L′ P′ The character corresponding to group P′.

[0372] In a preferred embodiment of the present invention, the method for obtaining the traceability code in step S1 includes the following steps:

[0373] S10, obtain the traceability code to be printed on the packaging box, and scan the traceability code to be printed on the packaging box to obtain traceability string two;

[0374] S11 converts each character in the traced string 2 into binary, and the lookup table is as follows:

[0375] character binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001

[0376] S12, retrieve the mapping table;

[0377] S13, put each character in the binary trace string 2 into the black mapping table from left to right and top to bottom in order from left to right;

[0378] S14. After completing step S13, place 0 into the white area of ​​the mapping table in the order from left to right and from top to bottom until the 52nd black area is placed in the box; or, after completing step S13, place 1 into the white area of ​​the mapping table in the order from left to right and from top to bottom until the 52nd black area is placed in the box.

[0379] S15. After executing step S14, retrieve characters from the mapping table in the order from left to right and from top to bottom.

[0380] S16, divide the extracted characters into groups P' according to Q' groups;

[0381] S17. After performing step S16, convert the four-character string to a one-character string. The corresponding table is as follows:

[0382] character binary 0 0000 1 0001 2 0010 3 0011 4 0100 5 0101 6 0110 7 0111 8 1000 9 1001 A 1010 B 1011 C 1100 D 1101 E 1110 F 1111

[0383] That is, when the four-character string is 0000, it is converted to a single character 0; when the four-character string is 0001, it is converted to a single character 1; when the four-character string is 0010, it is converted to a single character 2; when the four-character string is 0011, it is converted to a single character 3; when the four-character string is 0100, it is converted to a single character 4; when the four-character string is 0101, it is converted to a single character 5; when the four-character string is 0110, it is converted to a single character 6; when the four-character string is 0111, it is converted to a single character 1. 7; When the four-character string is 1000, it is converted to a single character 8; when the four-character string is 1001, it is converted to a single character 9; when the four-character string is 1010, it is converted to a single character A; when the four-character string is 1011, it is converted to a single character B; when the four-character string is 1100, it is converted to a single character C; when the four-character string is 1101, it is converted to a single character D; when the four-character string is 1110, it is converted to a single character E; when the four-character string is 1111, it is converted to a single character F.

[0384] The traceability code corresponding to the converted string is printed on the medicine packaging box.

[0385] In a preferred embodiment of the present invention, step S11 includes:

[0386]

[0387] Among them, C′ tracestring,2 To trace the number of bits in the binary string 2;

[0388] To trace the number of binary digits of the first character in string two;

[0389] To trace the number of binary digits of the second character in string two;

[0390] To trace the number of binary digits of the third character in string two;

[0391] To trace the number of binary digits of the A'th character in string two;

[0392] To trace the number of binary digits of the j-th character in string two;

[0393] A′ represents the number of digits in the second string; here, A′ is 13.

[0394]

[0395] B′ tracestring To trace string two;

[0396] To trace back to the first character in string two;

[0397] To trace back to the second character in string two;

[0398] To trace back to the 3rd character in string 2;

[0399] To trace back to the A'th character in string two;

[0400] To trace the w′-th character in string two; w′ = 1, 2, 3, ..., A′;

[0401]

[0402] C′ 2,tracestring The binary representation of the second traceable string is the binary traceable string.

[0403] To trace the first character in the binary representation of the first character in string two;

[0404] To trace the second character in the binary representation of the first character in string two;

[0405] To trace the third character in the binary representation corresponding to the first character in string two;

[0406] To trace the 4th character in the binary representation corresponding to the 1st character in string 2;

[0407] To trace the first character in the binary representation of the second character in string two;

[0408] To trace the second character in the binary representation of the second character in string two;

[0409] To trace the third character in the binary representation corresponding to the second character in string two;

[0410] To trace the 4th character in the binary representation corresponding to the 2nd character in string 2;

[0411] To trace the first character in the binary representation of the third character in string two;

[0412] To trace the second character in the binary representation of the third character in string two;

[0413] To trace the third character in the binary representation of the third character in string two;

[0414] To trace the 4th character in the binary representation corresponding to the 3rd character in string 2;

[0415] To trace the first character in the binary representation of the A'th character in string two;

[0416] To trace the second character in the binary representation corresponding to the A'th character in string two;

[0417] To trace the third character in binary corresponding to the A'th character in string two;

[0418] To trace the 4th character in binary corresponding to the A'th character in string two;

[0419] To trace the p′th character in string 2 to the q′th character in binary; p′ = 1, 2, 3, ..., A′; q′ = 1, 2, 3, 4.

[0420] In a preferred embodiment of the present invention, step S16 includes:

[0421] P′=W′ / Q′,

[0422] P′ is the number of groups into which the extracted characters will be divided;

[0423] W′ represents the number of characters extracted;

[0424] Q′ represents the number of characters in each group;

[0425] Here, Q′ is set to 4.

[0426] In a preferred embodiment of the present invention, step S17 includes:

[0427] L′ ζ′ =8l′ ζ′,1 +4l′ ζ′,2 +2l′ ζ′,3 +l′ ζ′,4 ,

[0428] Among them, L′ ζ′ Let ζ′ be the character corresponding to the ζ′ group; ζ′ = 1, 2, 3, ..., P′;

[0429] l′ ζ′,1 This is the numerical value corresponding to the first character in the ζ′ group;

[0430] l′ ζ′,2 This is the numerical value corresponding to the second character in group ζ′;

[0431] l′ ζ′,3 This is the numerical value corresponding to the 3rd character in group ζ′;

[0432] l′ ζ′,4 This is the numerical value corresponding to the 4th character in group ζ′;

[0433] L′=L′1L′2L′3…L′ P′ ,

[0434] L′ is the string obtained after conversion, which is the traceback string one;

[0435] L′1 is the character corresponding to the first group;

[0436] L′2 is the character corresponding to the second group;

[0437] L′3 is the character corresponding to the 3rd group;

[0438] L′ P′ The character corresponding to group P′.

[0439] In a preferred embodiment of the present invention, the mapping table is generated in step S12 as follows:

[0440] Generate a QR code using the trace string 2; place 52 black bars into the boxes in a left-to-right, top-to-bottom order, and determine if the number of white bars placed before the 52nd black bar is a multiple of 4:

[0441] If the number of white boxes placed before the 52nd black box is not a multiple of 4, then reduce the number of white boxes by ψ′:

[0442]

[0443] Where ψ′ represents the number of white boxes that are reduced;

[0444] T′ is the number of white boxes placed before the 52nd black box;

[0445] This is a floor function;

[0446] Change the first white box, the second white box, the third white box, ..., the ψth white box into empty boxes in the order from left to right and top to bottom; that is:

[0447] If ψ′ is 1, change the first white box to an empty box in the order from left to right and top to bottom;

[0448] If ψ′ is 2, change the first white box and the second white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0449] If ψ′ is 3, change the first white box, the second white box, and the third white box into boxes that are not placed in the box, in the order from left to right and from top to bottom;

[0450] At this point, the mapping table is obtained;

[0451] If the number of white boxes placed before the 52nd black box is a multiple of 4, then the QR code is a mapping table.

[0452] Print traceability code:

[0453] Assume that the traceability string 2 corresponding to the traceability code (barcode) to be printed on the drug packaging box is 9999999999999;

[0454] The first step is to convert each character in the trace string 999999999999 into binary as 10011001100110011001100110011001100110011001100110011001100110011001100110011001;

[0455] The second step is to generate a QR code using the name of the drug manufacturer (Chongqing Pujian Pharmaceutical Co., Ltd.), for example, as follows: Figure 2 As shown;

[0456] Third, when placing 52 black balls into the box in order from left to right and top to bottom, the number of white balls placed into the box before the 52nd black ball is 33. Since 33 is not a multiple of 4, therefore:

[0457]

[0458] Fourth step, since ψ′ is 1, at this point, change the first white box (which could also be the second, third, fourth, or... or the 33rd white box) into an empty box (blue) in order from left to right, as shown below. Figure 3 As shown;

[0459] Step 5: Place each character of the binary trace string 1001100110011001100110011001100110011001100110011001 into the black part of the left-to-right, top-to-bottom mapping table, as follows: Figure 4 As shown;

[0460] Step 6: Place 0s into the white boxes of the mapping table in a left-to-right, top-to-bottom order until the 52nd black box is placed; for example... Figure 5 As shown;

[0461] Step 7: Retrieve the character 10011001100000011001100000000110001010000000011000000101000000011000011000011000011001100001;

[0462] Step 8: Divide the extracted characters 10011001100000011001100000000110001010000000011000000101000011000011000011001100001 into 21 groups of 4, as shown in the second column of Table 1.

[0463] Table 1 Grouping - Character Comparison

[0464]

[0465]

[0466] Step 9: Convert the four-character string into a single-character string, as shown in the third column of Table 1. This yields the first traceability string, 998198062806028618661. Convert the first traceability string, 998198062806028618661, into a traceability code (QR code) and print it on the medicine packaging box. Convert the second traceability string, 9999999999999, into a traceability code (barcode) and print it on the inner packaging box of the medicine packaging box.

[0467] Scan 1:

[0468] Assume the traceability code (QR code) printed on the medicine packaging box corresponds to the traceability string 998198062806028618661;

[0469] The first step is to use a barcode scanner to scan the traceability code printed on the medicine packaging box, and the traceability string is obtained as 998198062806028618661.

[0470] The second step is to convert each character in the trace string 998198062806028618661 into binary: 100110011000000110011000000001100010100000000110000001010000000110000011000011000011001100001;

[0471] The third step is to generate a QR code using the name of the drug manufacturer (Chongqing Pujian Pharmaceutical Co., Ltd.), for example, as follows: Figure 2 As shown;

[0472] In the fourth step, when placing 52 black balls into the box in order from left to right and top to bottom, the number of white balls placed into the box before the 52nd black ball is 33. Since 33 is not a multiple of 4, therefore:

[0473]

[0474] Step 5: Since ψ is 1, change the first white box (or the second, third, fourth, ... or the 33rd white box) to an empty box (blue) in order from left to right, as shown below. Figure 3 As shown;

[0475] Step 6: Place each character of the binary trace string 10011001100000011001100000000110001010000000011000000101000011000011000011001100001 into a mapping table from left to right and from top to bottom, as follows; Figure 6 As shown;

[0476] Step 7: Extract the character 0000000000000000000000000000000 from the white area of ​​the mapping table in order from left to right and from top to bottom;

[0477] Since all the extracted characters are 0, the mapping table is correct. Proceed to the next step.

[0478] Step 8: Extract the character 1001100110011001100110011001100110011001100110011001100110011001 from the black area of ​​the mapping table in order from left to right and from top to bottom.

[0479] Step 9: Divide the extracted characters 1001100110011001100110011001100110011001100110011001 into 13 groups of 4; as shown in the second column of Table 2.

[0480] Table 2 Grouping - Character Comparison

[0481] Serial Number Grouping character 1 1001 9 2 1001 9 3 1001 9 4 1001 9 5 1001 9 6 1001 9 7 1001 9 8 1001 9 9 1001 9 10 1001 9 11 1001 9 12 1001 9 13 1001 9

[0482] Step 10: Convert the four-digit character into a single-digit character, as shown in the third column of Table 2; at this point, the traceability string 9999999999999 is obtained; therefore, by scanning the traceability code (QR code) printed on the medicine packaging box, the thirteen-digit medicine code 9999999999999 is obtained.

[0483] Scan 2:

[0484] Assume that the traceability string corresponding to the barcode printed on the drug packaging box is 9999999999999;

[0485] The first step is to use a barcode scanner to scan the barcode printed on the medicine packaging box to obtain the traceability string 2999999999999;

[0486] The second step is to convert each character in the trace string 999999999999 into binary as 1001100110011001100110011001100110011001100110011001100110011001100110011001;

[0487] The third step is to generate a QR code using the name of the drug manufacturer (Chongqing Pujian Pharmaceutical Co., Ltd.), for example, as follows: Figure 2 As shown;

[0488] In the fourth step, when placing 52 black balls into the box in order from left to right and top to bottom, the number of white balls placed into the box before the 52nd black ball is 33. Since 33 is not a multiple of 4, therefore:

[0489]

[0490] Fifth step, since ψ′ is 1, at this point, change the first white box (which could also be the second, third, fourth, ... or 33rd white box) into an empty box (blue) in order from left to right, as shown below. Figure 3 As shown;

[0491] Step 6: Place each character of the binary trace string 1001100110011001100110011001100110011001100110011001 into the black part of the left-to-right, top-to-bottom mapping table, as follows: Figure 4 As shown;

[0492] Step 7: Place 0s into the white boxes of the mapping table in a left-to-right, top-to-bottom order until the 52nd black box is placed; for example... Figure 5 As shown;

[0493] Step 8: Retrieve the character 1001100110000001100110000000011000101000000001100000010100000011000011000011000011001100001;

[0494] Step 9: Divide the extracted characters 10011001100000011001100000000110001010000000011000000101000011000011000011001100001 into 21 groups of 4, as shown in the second column of Table 1.

[0495] Step 10: Convert the four-character string into a single-character string, as shown in the third column of Table 1; at this point, the traceability string 998198062806028618661 is obtained; therefore, the traceability code 998198062806028618661 is obtained by scanning the barcode printed on the medicine packaging box.

[0496] Two-way verification 2:

[0497] Assume the traceability string 2 corresponding to the barcode printed on the medicine packaging box is 9999999999999; assume the traceability string 1 corresponding to the traceability code (QR code) printed on the medicine packaging box is 998198062806028618661;

[0498] The first step is to use a barcode scanner to scan the barcode printed on the medicine packaging box to obtain the traceability string 2999999999999;

[0499] Then, use a barcode scanner to scan the traceability code printed on the medicine packaging box to obtain the traceability string 998198062806028618661;

[0500] The second step is to convert each character in the trace string 999999999999 into binary as 1001100110011001100110011001100110011001100110011001100110011001100110011001;

[0501] The third step is to generate a QR code using the name of the drug manufacturer (Chongqing Pujian Pharmaceutical Co., Ltd.), for example, as follows: Figure 2 As shown;

[0502] In the fourth step, when placing 52 black balls into the box in order from left to right and top to bottom, the number of white balls placed into the box before the 52nd black ball is 33. Since 33 is not a multiple of 4, therefore:

[0503]

[0504] Fifth step, since ψ′ is 1, at this point, change the first white box (which could also be the second, third, fourth, ... or 33rd white box) into an empty box (blue) in order from left to right, as shown below. Figure 3 As shown;

[0505] Step 6: Place each character of the binary trace string 1001100110011001100110011001100110011001100110011001 into the black part of the left-to-right, top-to-bottom mapping table, as follows: Figure 4 As shown;

[0506] Step 7: Place 0s into the white boxes of the mapping table in a left-to-right, top-to-bottom order until the 52nd black box is placed; for example... Figure 5 As shown;

[0507] Step 8: Retrieve the character 1001100110000001100110000000011000101000000001100000010100000011000011000011000011001100001;

[0508] Step 9: Divide the extracted characters 10011001100000011001100000000110001010000000011000000101000011000011000011001100001 into 21 groups of 4, as shown in the second column of Table 1.

[0509] Step 10: Convert the four-character string into a single-character string, as shown in the third column of Table 1; at this point, the traceability string 998198062806028618661 is obtained; therefore, the traceability code 998198062806028618661 is obtained by scanning the barcode printed on the medicine packaging box.

[0510] Step 11: Since the traceability code 998198062806028618661 obtained by scanning the barcode printed on the medicine packaging box is consistent with the traceability string 998198062806028618661 obtained by scanning the traceability code printed on the medicine packaging box, two-way scanning verification is achieved.

[0511] Two-way verification 2:

[0512] Assume the traceability string 2 corresponding to the barcode printed on the medicine packaging box is 9999999999999; assume the traceability string 1 corresponding to the traceability code (QR code) printed on the medicine packaging box is 998198062806028618661;

[0513] The first step is to use a barcode scanner to scan the traceability code printed on the medicine packaging box, and the traceability string is obtained as 998198062806028618661.

[0514] Then, use a barcode scanner to scan the barcode printed on the medicine packaging box to obtain the traceability string 2999999999999;

[0515] The second step is to convert each character in the trace string 998198062806028618661 into binary: 100110011000000110011000000001100010100000000110000001010000000110000011000011000011001100001;

[0516] The third step is to generate a QR code using the name of the drug manufacturer (Chongqing Pujian Pharmaceutical Co., Ltd.), for example, as follows: Figure 2 As shown;

[0517] In the fourth step, when placing 52 black balls into the box in order from left to right and top to bottom, the number of white balls placed into the box before the 52nd black ball is 33. Since 33 is not a multiple of 4, therefore:

[0518]

[0519] Step 5: Since ψ is 1, change the first white box (or the second, third, fourth, ... or the 33rd white box) to an empty box (blue) in order from left to right, as shown below. Figure 3 As shown;

[0520] Step 6: Place each character of the binary trace string 10011001100000011001100000000110001010000000011000000101000011000011000011001100001 into a mapping table from left to right and from top to bottom, as follows; Figure 6 As shown;

[0521] Step 7: Extract the character 0000000000000000000000000000000 from the white area of ​​the mapping table in order from left to right and from top to bottom;

[0522] Since all the extracted characters are 0, the mapping table is correct. Proceed to the next step.

[0523] Step 8: Extract the character 1001100110011001100110011001100110011001100110011001100110011001 from the black area of ​​the mapping table in order from left to right and from top to bottom.

[0524] Step 9: Divide the extracted characters 100110011001100110011001100110011001100110011001 into 13 groups of 4; as shown in the second column of Table 2.

[0525] Step 10: Convert the four-digit character into a single-digit character, as shown in the third column of Table 2; at this point, the traceability string 9999999999999 is obtained; therefore, by scanning the traceability code (QR code) printed on the medicine packaging box, the thirteen-digit medicine code 9999999999999 is obtained.

[0526] Step 11: Since the drug code 9999999999999 obtained by scanning the traceability code printed on the drug packaging box is consistent with the traceability string 9999999999999 obtained by scanning the barcode printed on the drug packaging box, two-way scanning verification is achieved.

[0527] The present invention also discloses a computer system, comprising:

[0528] processor;

[0529] Memory used to store processor-executable instructions;

[0530] The processor is configured to implement the method of batch scanning warehouse drug traceability codes using visual images when executing the executable instructions.

[0531] The present invention also discloses a computer-readable storage medium, comprising:

[0532] A memory on which computer programs are stored;

[0533] A processor is used to execute the program in the memory to implement the method of batch scanning of warehouse drug traceability codes using visual images.

[0534] 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 method for batch scanning traceability codes of stored pharmaceuticals using visual images, characterized in that, Includes the following steps: S1, use the same barcode scanner to scan the traceability codes on M medicine packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string corresponding to the traceability code; Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box; The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code; Scan the first traceability code on the first medicine packaging box with a barcode scanner to obtain the first traceability string corresponding to the first traceability code; scan the second traceability code on the second medicine packaging box with a barcode scanner to obtain the second traceability string corresponding to the second traceability code; scan the third traceability code on the third medicine packaging box with a barcode scanner to obtain the third traceability string corresponding to the third traceability code; ...; scan the Mth traceability code on the Mth medicine packaging box with a barcode scanner to obtain the Mth traceability string corresponding to the Mth traceability code; S2, perform drug information mapping processing on traceability string one to obtain traceability string three; traceability string three is the drug code corresponding to the drug barcode; Among them, the first traceability string is processed by drug information mapping to obtain the third traceability string; The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 3; The third traceability string is processed by drug information mapping to obtain the third traceability string. The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 3; or, S1, use the same barcode scanner to scan the traceability codes on M packaging boxes in sequence, where M is a positive integer greater than or equal to 1, to obtain the traceability string 2 corresponding to the traceability code; Among them, the M medicine packaging boxes are the first medicine packaging box, the second medicine packaging box, the third medicine packaging box, ..., the Mth medicine packaging box; The traceability code on the first medicine packaging box is the first traceability code, the traceability code on the second medicine packaging box is the second traceability code, the traceability code on the third medicine packaging box is the third traceability code, ..., the traceability code on the Mth medicine packaging box is the Mth traceability code; Using a barcode scanner, scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code; use the barcode scanner to scan the second traceability code on the second medicine packaging box to obtain the second traceability string corresponding to the second traceability code; use the barcode scanner to scan the third traceability code on the third medicine packaging box to obtain the second traceability string corresponding to the third traceability code; ...; use the barcode scanner to scan the Mth traceability code on the Mth medicine packaging box to obtain the second traceability string corresponding to the Mth traceability code; S2, perform drug information mapping processing on traceability string two to obtain traceability string four; Among them, the first traceability string is processed by drug information mapping to obtain the fourth traceability string; The second traceability string 1 is processed by drug information mapping to obtain the second traceability string 4; The third traceability string 1 is processed by drug information mapping to obtain the third traceability string 4; The Mth traceability string 1 is processed by drug information mapping to obtain the Mth traceability string 4.

2. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, When M is 1: S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the first traceability string corresponding to the first traceability code; S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 3; or, S1, use a barcode scanner to scan the first traceability code on the first medicine packaging box to obtain the second traceability string corresponding to the first traceability code; S2, perform drug information mapping processing on the first traceability string 1 to obtain the first traceability string 4.

3. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, In step S1, the scanner is a barcode / QR code dual-mode scanner.

4. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, In step S1, the string is traced back to a number string that is one of 0 to 9, A to E, or any combination thereof.

5. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, The method for performing drug information mapping processing on traceability string one in step S2 to obtain traceability string three includes the following steps: S21, convert each character in the trace string to binary, the lookup table is as follows: S22, generate a QR code using the drug manufacturer's name; place 52 black boxes in the boxes from left to right and top to bottom, and determine if the number of white boxes before the 52nd black box is a multiple of 4: If the number of white boxes placed before the 52nd black box is not a multiple of 4, then reduce the number of white boxes by ψ: Where ψ is the number of white boxes that are reduced; T is the number of white boxes placed before the 52nd black box; This is a floor function; Change the first white box, the second white box, the third white box, ..., the ψth white box into empty boxes in the order from left to right and top to bottom; that is: If ψ is 1, change the first white box to an empty box in the order from left to right and top to bottom; If ψ is 2, change the first white box and the second white box into boxes that are not placed in the box, in the order from left to right and from top to bottom; If ψ is 3, change the first white box, the second white box, and the third white box into boxes that are not placed in the box, in the order from left to right and from top to bottom; If the number of white boxes before the 52nd black box is a multiple of 4, then the QR code is a mapping table; S23, put each character in the binary trace string into the mapping table from left to right and from top to bottom in order from left to right; S24. After executing step S23, retrieve the characters from the black area of ​​the mapping table in the order from left to right and from top to bottom. S25, divide the extracted characters into P groups according to Q characters per group; S26. After performing step S25, convert the four-character string to a one-character string. The corresponding table is as follows: That is, when the four-digit character is 0000, it is converted to a single-digit character 0; when the four-digit character is 0001, it is converted to a single-digit character 1; when the four-digit character is 0010, it is converted to a single-digit character 2; when the four-digit character is 0011, it is converted to a single-digit character 3; when the four-digit character is 0100, it is converted to a single-digit character 4; when the four-digit character is 0101, it is converted to a single-digit character 5; when the four-digit character is 0110, it is converted to a single-digit character 6; when the four-digit character is 0111, it is converted to a single-digit character 7; when the four-digit character is 1000, it is converted to a single-digit character 8; when the four-digit character is 1001, it is converted to a single-digit character 9.

6. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, Step S21 includes: Among them, C tracestring,2 To trace the number of bits in the binary string 1; To trace the number of binary digits of the first character in string 1; To trace the number of binary digits of the second character in string 1; To trace the number of binary digits of the third character in string 1; To trace the number of binary digits of the A-th character in string 1; To trace the number of binary digits of the j-th character in string 1; A represents the number of digits in the trace string one; B tracestring To trace string one; To trace back to the first character in string one; To trace back to the second character in string one; To trace back to the 3rd character in string 1; To trace back to the A-th character in string one; To trace back to the w-th character in string 1; w = 1, 2, 3, ..., A; C 2,tracestring The binary representation of the trace string is the binary trace string one; To trace the first character in the binary representation of the first character in string 1; To trace the second character in the binary representation corresponding to the first character in string 1; To trace the third character in the binary representation of the first character in string 1; To trace the 4th character in binary corresponding to the 1st character in string 1; To trace the first character in the binary representation of the second character in string 1; To trace the second character in the binary representation of the second character in string 1; To trace the third character in the binary representation of the second character in string 1; To trace the 4th character in binary corresponding to the 2nd character in string 1; To trace the first character in the binary representation of the third character in string 1; To trace the second character in the binary representation of the third character in string 1; To trace the third character in binary corresponding to the third character in string one; To trace the 4th character in binary corresponding to the 3rd character in string 1; To trace the first character in the binary representation of the Ath character in string 1; To trace the second character in the binary representation corresponding to the Ath character in string 1; To trace the 3rd character in binary corresponding to the Ath character in string 1; To trace the 4th character in binary corresponding to the Ath character in string 1; To trace the p-th character in string 1 to the q-th character in binary; p = 1, 2, 3, ..., A; q = 1, 2, 3, 4.

7. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, Step S25 includes: P = W / Q, P is the number of groups into which the extracted characters will be divided; W represents the number of characters extracted; Q represents the number of characters in each group.

8. The method for batch scanning of warehouse drug traceability codes using visual images according to claim 1, characterized in that, Step S26 includes: L ζ =8l ζ,1 +4l ζ,2 +2l ζ,3 +l ζ,4 , Among them, L ζ Let ζ be the character corresponding to the ζ-th group; ζ = 1, 2, 3, ..., P; l ζ,1 This is the numerical value corresponding to the first character in the ζ-th group; l ζ,2 This is the numerical value corresponding to the second character in group ζ; l ζ,3 This is the numerical value corresponding to the 3rd character in group ζ; l ζ,4 This is the numerical value corresponding to the 4th character in group ζ; L=L1L2L3…L P , L is the string obtained after conversion, which is the traceback string three; L1 is the character corresponding to the first group; L2 is the character corresponding to the second group; L3 is the character corresponding to the third group; L P The character corresponding to group P.

9. A computer system, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method for batch scanning of warehouse drug traceability codes using visual images as described in any one of claims 1 to 8 when executing the executable instructions.

10. A computer-readable storage medium, characterized in that, include: A memory on which computer programs are stored; A processor is configured to execute the program in the memory to implement the method for batch scanning of warehouse drug traceability codes using visual images as described in any one of claims 1 to 8.