Identification code identification method and device, computer device and storage medium

CN120599376BActive Publication Date: 2026-09-18LONGGANG DISTRICT CENT HOSPITAL OF SHENZHEN +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510989999.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-17
Publication Date
2026-09-18
Estimated Expiration
2045-07-17

AI Technical Summary

Technical Problem

[0003]现有技术中,医疗器械的追溯管理方法还存在众多缺陷,一是医疗器械上的标识码种类繁多,有UDI (Unique Device Identification)码,还有PI码、DI码等,除了一维条形码外,还有二维码,这使得现有技术中的方法在识别标识码后会出现重复

Benefits of technology

[0016] This invention provides a method, apparatus, computer device, and storage medium for identifying identification codes. The method includes: identifying original identification codes from an original image; classifying the original identification codes; associating the original identification codes with each other based on their classification to obtain a filter set; and filtering out duplicate combination identification codes from the filter set to obtain a target set. Each combination identification code in the target set corresponds to a target object. This invention classifies the original identification codes, associates them with each other to obtain a filter set, and filters out duplicate combination identification codes from the filter set to obtain a target set. This allows for the acquisition of all identification codes in the original image, avoiding omissions. Simultaneously, by associating and deduplicating different identification codes, each resulting combination identification code corresponds to a target object, ensuring neither omissions nor duplications, thus facilitating the management and traceability of target objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120599376B_ABST
    Figure CN120599376B_ABST
Patent Text Reader

Abstract

The application relates to a kind of identification code identification method, device, computer equipment and storage medium, the method comprises: identifying original identification code from original image;The original identification code is classified;According to the classification of the original identification code, the original identification code is associated, and a screening set is obtained;From the screening set, filter out the repeated combination identification code to obtain a target set;Wherein, each combination identification code in the target set corresponds to a target object.The application obtains each combination identification code corresponding to a target object, neither missing nor repeated, facilitating the management and traceability of target objects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a method, apparatus, computer device, and storage medium for identifying identification codes. Background Technology

[0002] With the rapid development of the medical device industry, traceability management of medical devices has become increasingly important.

[0003] Current traceability management methods for medical devices have several shortcomings. First, there are many types of identification codes on medical devices, including UDI (Unique Device Identification) codes, PI codes, DI codes, and QR codes in addition to one-dimensional barcodes. This leads to duplicate identification codes in existing methods. Second, existing identification methods can only identify one barcode at a time, which is inefficient and cannot meet the processing needs of large-scale certificate entry and exit.

[0004] It is evident that existing identification code recognition methods are insufficient to meet the requirements. Summary of the Invention

[0005] In order to solve the above-mentioned technical problems, or at least partially solve the above-mentioned technical problems, the present invention provides an identification code recognition method, apparatus, computer equipment and storage medium.

[0006] In a first aspect, the present invention provides an identification code recognition method, the method comprising: Identify the original identifier from the original image; The original identification codes are classified; Based on the classification of the original identifier codes, the original identifier codes are associated with each other to obtain a filter set; Duplicate combined identifier codes are filtered out from the filter set to obtain the target set; Each of the combined identifier codes in the target set corresponds to a target object.

[0007] Optionally, classifying the original identifier includes: Categorize according to specific characters; and / or Categorize according to character length; and / or Categorize by dimension; The original identification code, after being categorized, includes: The first type of identifier, a one-dimensional code, uses a first specific character as the starting character, and the character length is less than a first length threshold. The third type of identifier, a one-dimensional code, uses a second specific character as the starting character. The fifth type of identification code, a one-dimensional code, uses the first specific character as the starting character, and the character length is greater than or equal to the first length threshold. Class 6 identification code, QR code, The second type of identifier code, excluding the first, third, fifth, and sixth types of identifier codes, has a character length greater than or equal to the second length threshold. The fourth type of identifier code is any identifier code other than the first, third, fifth, and sixth types of identifier codes, whose character length is less than the second length threshold.

[0008] Optionally, the step of associating the original identifiers with each other based on their classification to obtain a filter set includes: Associating the first type of identifier with the second type of identifier yields a first set; Associating the third type of identifier with the second type of identifier yields a second set; Associating the third type of identifier with the third type of identifier yields a third set; Associating the fourth type of identifier with the fifth type of identifier yields a fourth set; The first set, the second set, the third set, and the fourth set are merged to form the filter set.

[0009] Optionally, associating the first type of identifier with the second type of identifier to obtain a first set includes: Obtain the current first distance between the current first-type identifier and all second-type identifiers; Filter all current first distances using the qualification certificate threshold. If the current first distance is less than or equal to the certificate threshold, then the current first distance is retained. If the current first distance is greater than the certificate threshold, then the current first distance is discarded; The smallest of all the retained current first distances is taken as the first distance to be combined; Obtain the second type of identifier code corresponding to the first distance to be combined as the second type of identifier code to be combined; Obtain the current identifier code based on the current first type identifier code and the second type identifier code to be combined; Obtain the next first distance between the next first type identifier and all second type identifiers, obtain the next first combination identifier, and continue until all first type identifiers have been traversed; The set of all first combination identifiers is taken as the first set; Wherein, the value of the current first combined identifier code is the value obtained by concatenating the value of the current first type identifier code and the value of the second type identifier code to be combined, and the center of the current first combined identifier code is the center of the line connecting the center of the current first type identifier code and the center of the second type identifier code to be combined.

[0010] Optionally, before associating the original identifiers based on their classification to obtain a filter set, the method further includes: Obtain the feature distance for each of the original identifier codes; The maximum value among all the aforementioned feature distances is used as the qualification threshold; The step of obtaining the feature distance for each of the original identifier codes includes: Obtain the four corner points of the current original identifier. Obtain the second distance from each corner point to the other three corner points (excluding itself). The largest second distance is taken as the feature distance of the current original identifier code.

[0011] Optionally, filtering out duplicate combined identifier codes from the filter set to obtain the target set includes: Obtain the current third distance between the center of the current fifth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current first similarity between the current fifth type identifier code and each of the combined identifier codes in the filter set; Based on the current third distance and the current first similarity, determine whether to remove the current fifth type of identifier code; Obtain the next third distance and the next first similarity corresponding to the next fifth-class identifier, until all the fifth-class identifiers have been traversed; Obtain the current fourth distance between the center of the current sixth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current second similarity between the current sixth-class identifier and each of the combined identifiers in the filter set; Based on the current fourth distance and the current second similarity, determine whether to remove the current sixth type of identifier code; Obtain the next fourth distance and the next second similarity corresponding to the next sixth-class identifier, until all the sixth-class identifiers have been traversed; The retained fifth type of identifier, the retained sixth type of identifier, and the filtered set are combined, and the combined set is taken as the target set.

[0012] Optionally, obtaining the current first similarity between the current fifth-class identifier and each of the combined identifiers in the filter set includes: Obtain the longest common substring between the current fifth-class identifier and the current combined identifier in the filter set; The current first similarity is obtained based on the longest common substring, the length of the current fifth-class identifier, and the length of the current combined identifier.

[0013] Secondly, an identification code recognition device is provided, the device comprising: A recognition unit is used to identify the original identification code from the original image; A classification unit is used to classify the original identification code; The association unit is used to associate the original identifiers with each other based on the classification of the original identifiers to obtain a filter set; A filtering unit is used to filter out duplicate combined identifier codes from the filter set to obtain a target set; Each of the combined identifier codes in the target set corresponds to a target object.

[0014] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the method as described in any of the preceding claims.

[0015] Fourthly, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the method as described in any of the preceding claims.

[0016] This invention provides a method, apparatus, computer device, and storage medium for identifying identification codes. The method includes: identifying original identification codes from an original image; classifying the original identification codes; associating the original identification codes with each other based on their classification to obtain a filter set; and filtering out duplicate combination identification codes from the filter set to obtain a target set. Each combination identification code in the target set corresponds to a target object. This invention classifies the original identification codes, associates them with each other to obtain a filter set, and filters out duplicate combination identification codes from the filter set to obtain a target set. This allows for the acquisition of all identification codes in the original image, avoiding omissions. Simultaneously, by associating and deduplicating different identification codes, each resulting combination identification code corresponds to a target object, ensuring neither omissions nor duplications, thus facilitating the management and traceability of target objects. Attached Figure Description

[0017] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.

[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 The diagram shown illustrates the application environment of the identification code recognition method in this embodiment of the invention. Figure 2 The diagram shown is a flowchart of the identification code recognition method according to an embodiment of the present invention. Figure 3 The image shown is a schematic diagram of the original image and identification code of an embodiment of the present invention; Figure 4 The diagram shown is a structural block diagram of the identification code recognition device according to an embodiment of the present invention; Figure 5 The diagram shown is an internal structural diagram of a computer device in an embodiment of the present invention. Detailed Implementation

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

[0021] Figure 1 The diagram shows the application environment of the identification code recognition method in an embodiment of the present invention. (Refer to...) Figure 1 This identification code recognition method is applied to an identification code recognition system. The method includes a terminal 110 and / or a server 120. The terminal 110 and server 120 are connected via a network. The terminal 110 can be a desktop terminal or a mobile terminal; a mobile terminal can be at least one of a mobile phone, tablet computer, or laptop computer. The server 120 can be a standalone server or a server cluster consisting of multiple servers.

[0022] The identification code recognition method of the present invention is applied to terminal 110 and / or server 120.

[0023] Figure 2 The diagram shown is a flowchart of the identification code recognition process according to an embodiment of the present invention. Figure 2As shown, the method includes: Step 210: Identify the original identifier from the original image; Step 220: Classify the original identification codes; Step 230: Based on the classification of the original identifier codes, associate the original identifier codes with each other to obtain a filter set; Step 240: Filter out duplicate combined identifier codes from the filter set to obtain the target set; Each of the combined identifier codes in the target set corresponds to a target object.

[0024] In this embodiment of the invention, the target object can be a certificate of conformity / factory certificate / instruction manual / identification on a medical device. In this embodiment of the invention, there is only one certificate of conformity on a medical device, and this "one" certificate of conformity can be a complete sticker or can be composed of multiple stickers pieced together.

[0025] In this embodiment of the invention, the original image may be obtained by taking a picture of the certificate of conformity with a camera or other video recording device, or it may be an image extracted from a video.

[0026] In this embodiment of the invention, the original identification codes are classified, and based on the classification, the original identification codes are associated with each other to obtain a filter set. Duplicate combination identification codes are filtered out from the filter set to obtain the target set. This allows all identification codes in the original image to be obtained, avoiding omissions. At the same time, different identification codes are associated with each other and deduplicated. Finally, each combination identification code corresponds to a target object, ensuring that there are no omissions or duplicates, which facilitates the management and traceability of target objects.

[0027] In this embodiment of the invention, step 210, identifying the original identifier from the original image, includes: Obtain the current original identifier code from the original image of the current frame; Compare the current original identifier with the original identifier obtained from the previous frame of the original image; If no new original identifier is added, then obtain the next frame of the original image; If a new original identifier is added, the new original identifier is retained, and the next frame of the original image is obtained.

[0028] In step 210, if no new original identifier codes are added for several consecutive frames, it is considered that all original identifier codes in the current identification batch have been obtained, and the acquisition of the next frame of original image can be stopped.

[0029] The processing speed can be improved by setting a frame count threshold. For example, if the frame count threshold is set to 10, the acquisition of the next frame of the original image will stop if no new original identifier code is added for 10 consecutive frames.

[0030] By extracting the original identification code from multiple frames of original images, omissions can be avoided; it also avoids the situation where too many targets prevent all the original identification codes from being captured in the same frame; and it can correct errors in obtaining the original identification code caused by unclear original images. Extracting the original identification code from multiple frames of original images reduces manual operation, lowers costs, and improves efficiency.

[0031] In this embodiment of the invention, before classifying the original identifier code, the method further includes: The original identifier code set is preprocessed.

[0032] In this embodiment of the invention, the preprocessing of the original identifier code includes: Remove special characters from the original image; Remove spaces from the original image; Remove line breaks from the original image.

[0033] In this embodiment of the invention, step 220, classifying the original identifier code, includes: Categorize according to specific characters; and / or Categorize according to character length; and / or Categorize by dimension; The original identification code, after being categorized, includes: The first type of identifier, a one-dimensional code, uses a first specific character as the starting character, and the character length is less than a first length threshold. The third type of identifier, a one-dimensional code, uses a second specific character as the starting character. The fifth type of identification code, a one-dimensional code, uses the first specific character as the starting character, and the character length is greater than or equal to the first length threshold. Class 6 identification code, QR code, The second type of identifier code, excluding the first, third, fifth, and sixth types of identifier codes, has a character length greater than or equal to the second length threshold. The fourth type of identifier code is any identifier code other than the first, third, fifth, and sixth types of identifier codes, whose character length is less than the second length threshold.

[0034] In this embodiment of the invention, the first type of identification code can be a PI code, the second type of identification code can be a DI code, the third type of identification code can be a HIBC code, the fourth type of identification code can be a short DI code, the fifth type of identification code can be a one-dimensional UDI code, and the sixth type of identification code can be a two-dimensional UDI code.

[0035] UDI codes are usually unique identifiers that can be used for traceability. However, on some certificates of conformity, UDI codes are one-dimensional, on others they are two-dimensional, and on some certificates they are both one-dimensional and two-dimensional.

[0036] UDI codes are usually composed of PI codes and DI codes, but PI codes and DI codes may also appear alone.

[0037] Figure 3 The image shown is a schematic diagram of the original image and identification code according to an embodiment of the present invention. Figure 3 As shown, Figure 3 It includes multiple certificates of conformity and multiple identification codes. 310 is a two-dimensional UDI code, which is a Class 6 identification code.

[0038] 320 is a one-dimensional UDI code, which is a Class 5 identification code. 330 is a PI code, which is a Class 1 identification code; 340 is a DI code, which is a Class 2 identification code. Pages 330 and 340 are one-dimensional codes.

[0039] Figure 3 The document shows multiple identification codes, but only a portion of them are indicated.

[0040] In this embodiment of the invention, step 230, which involves associating the original identifiers based on their classification to obtain a filter set, includes: Associating the first type of identifier with the second type of identifier yields a first set; Associating the third type of identifier with the second type of identifier yields a second set; Associating the third type of identifier with the third type of identifier yields a third set; Associating the fourth type of identifier with the fifth type of identifier yields a fourth set; The first set, the second set, the third set, and the fourth set are merged to form the filter set.

[0041] In this embodiment of the invention, associating the third type of identification code with the third type of identification code means associating any third type of identification code with other third type of identification codes besides the third type of identification code itself; that is, any third type of identification code does not need to be associated with itself.

[0042] In this embodiment of the invention, associating the first type of identifier with the second type of identifier to obtain a first set includes: Obtain the current first distance between the current first-type identifier and all second-type identifiers; Filter all current first distances using the qualification certificate threshold. If the current first distance is less than or equal to the certificate threshold, then the current first distance is retained. If the current first distance is greater than the certificate threshold, then the current first distance is discarded; The smallest of all the retained current first distances is taken as the first distance to be combined; Obtain the second type of identifier code corresponding to the first distance to be combined as the second type of identifier code to be combined; Obtain the current identifier code based on the current first type identifier code and the second type identifier code to be combined; Obtain the next first distance between the next first type identifier and all second type identifiers, obtain the next first combination identifier, and continue until all first type identifiers have been traversed; The set of all first combination identifiers is taken as the first set; Wherein, the value of the current first combined identifier code is the value obtained by concatenating the value of the current first type identifier code and the value of the second type identifier code to be combined, and the center of the current first combined identifier code is the center of the line connecting the center of the current first type identifier code and the center of the second type identifier code to be combined.

[0043] In this embodiment of the invention, the method of associating the original identifiers based on their classification to obtain a filter set further includes: Obtain the feature distance for each of the original identifier codes; The maximum value among all the aforementioned feature distances is used as the qualification threshold; The step of obtaining the feature distance for each of the original identifier codes includes: Obtain the four corner points of the current original identifier. Obtain the second distance from each corner point to the other three corner points (excluding itself). The largest second distance is taken as the feature distance of the current original identifier code.

[0044] In this embodiment of the invention, obtaining the current first distance between the current first type of identifier and a second type of identifier can be the distance between the center of the current first type of identifier and the center of a second type of identifier.

[0045] The center of the identifier is calculated using its four corner points, whose coordinates are denoted as follows: , , and The center of this identifier can be , Get corner point To the corner The second distance between In the following manner: The second distance between other corner points is similar and will not be elaborated here.

[0046] In this embodiment of the invention, the value of the current first combined identifier code is the value obtained by concatenating the value of the current first type identifier code and the value of the second type identifier code to be combined. For example, if the first type identifier code is 0106943735104060, the second type identifier code is 172410071119100821A00088497A001, and the value of the first combined identifier code is 0106943735104060172410071119100821A00088497A001.

[0047] The methods for obtaining the second, third, and fourth collections are the same as those for obtaining the first collection, and will not be repeated here.

[0048] In this embodiment of the invention, the third type of identification code is associated with the third type of identification code because the third type of identification code may appear multiple times on some certificates of conformity.

[0049] In this embodiment of the invention, obtaining the first set, the second set, the third set, and the fourth set is actually establishing the association between different categories of identification codes, avoiding the use of different or multiple identification codes to point to the same certificate of conformity.

[0050] In this embodiment of the invention, filtering out duplicate combination identifiers from the filter set to obtain the target set includes: Obtain the current third distance between the center of the current fifth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current first similarity between the current fifth type identifier code and each of the combined identifier codes in the filter set; Based on the current third distance and the current first similarity, determine whether to remove the current fifth type of identifier code; Obtain the next third distance and the next first similarity corresponding to the next fifth-class identifier, until all the fifth-class identifiers have been traversed; Obtain the current fourth distance between the center of the current sixth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current second similarity between the current sixth-class identifier and each of the combined identifiers in the filter set; Based on the current fourth distance and the current second similarity, determine whether to remove the current sixth type of identifier code; Obtain the next fourth distance and the next second similarity corresponding to the next sixth-class identifier, until all the sixth-class identifiers have been traversed; The retained fifth type of identifier, the retained sixth type of identifier, and the filtered set are combined, and the combined set is taken as the target set.

[0051] In this embodiment of the invention, obtaining the current first similarity between the current fifth type of identifier and each of the combined identifiers in the filter set includes: Obtain the longest common substring between the current fifth-class identifier and the current combined identifier in the filter set; The current first similarity is obtained based on the longest common substring, the length of the current fifth-class identifier, and the length of the current combined identifier.

[0052] In this embodiment of the invention, the longest common substring refers to the maximum number of identical characters. For example, in the strings 01000112363 and 11111010112363, the identical character is "0112363", and the longest common substring is 7.

[0053] The current first similarity s is obtained based on the longest common substring (LCS), the length A of the current fifth-class identifier, and the length B of the current combined identifier, in the following manner: Based on the current third distance and the current first similarity, determine whether to remove the current fifth type of identifier, including: If the third distance is less than or equal to the certificate threshold, and the current first similarity is greater than or equal to the similarity threshold, then the current fifth category identifier code is retained; If the third distance is greater than the certificate threshold, or the current first similarity is less than the similarity threshold, then the current fifth type of identification code is removed.

[0054] The similarity threshold can be adjusted according to the actual situation, and it can usually be set to 0.7.

[0055] In the real-time implementation of this invention, by removing some of the fifth-class identifier codes and some of the sixth-class identifier codes using the above method, duplication can be avoided; at the same time, by merging the retained fifth-class identifier codes, the retained sixth-class identifier codes, and the filtered set, and using the merged set as the target set, omissions can be avoided.

[0056] In this embodiment of the invention, there are many certificates of conformity, and the identification code can be identified after continuously capturing multiple frames of original images. However, as mentioned above, it is possible that no new original identification code is added in multiple consecutive frames of original images, and the acquisition of the next frame of original image is stopped. It is also possible that a new original identification code will appear after stopping. In this embodiment of the invention, the certificates can be grouped according to the number of frames. After identification in each group, the results are compared with the results of the next group, thereby avoiding the omission of certificates of conformity.

[0057] In this embodiment of the invention, after filtering out duplicate identifiers from the filter set to obtain the target set, the method further includes: Obtain the differences between the target set in this group and the target set in the previous group corresponding to the original images in this group; If a combined identifier exists in the target set of the current frame but not in the target set of the previous frame, then the target set of the current frame is retained after removing the combined identifier that did not exist in the previous frame. If a combined identifier exists in the target set of the current frame and also exists in the target set of the previous frame, then the target set of the current frame is retained.

[0058] like Figure 4 As shown, the present invention also provides an identification code recognition device, the device comprising: The identification unit 410 is used to identify the original identification code from the original image; Classification unit 420 is used to classify the original identification code; The association unit 430 is used to associate the original identification codes with each other according to the classification of the original identification codes to obtain a filter set; Filtering unit 440 is used to filter out duplicate combined identifier codes from the filter set to obtain the target set; Each of the combined identifier codes in the target set corresponds to a target object.

[0059] In this embodiment of the invention, the classification unit 420 is further configured to: Categorize according to specific characters; and / or Categorize according to character length; and / or Categorize by dimension; The original identification code, after being categorized, includes: The first type of identifier, a one-dimensional code, uses a first specific character as the starting character, and the character length is less than a first length threshold. The third type of identifier, a one-dimensional code, uses a second specific character as the starting character. The fifth type of identification code, a one-dimensional code, uses the first specific character as the starting character, and the character length is greater than or equal to the first length threshold. Class 6 identification code, QR code, The second type of identifier code, excluding the first, third, fifth, and sixth types of identifier codes, has a character length greater than or equal to the second length threshold. The fourth type of identifier code is any identifier code other than the first, third, fifth, and sixth types of identifier codes, whose character length is less than the second length threshold.

[0060] In this embodiment of the invention, the association unit 430 is further configured to: Associating the first type of identifier with the second type of identifier yields a first set; Associating the third type of identifier with the second type of identifier yields a second set; Associating the third type of identifier with the third type of identifier yields a third set; Associating the fourth type of identifier with the fifth type of identifier yields a fourth set; The first set, the second set, the third set, and the fourth set are merged to form the filter set.

[0061] In this embodiment of the invention, the association unit 430 is further configured to: Obtain the current first distance between the current first-type identifier and all second-type identifiers; Filter all current first distances using the qualification certificate threshold. If the current first distance is less than or equal to the certificate threshold, then the current first distance is retained. If the current first distance is greater than the certificate threshold, then the current first distance is discarded; The smallest of all the retained current first distances is taken as the first distance to be combined; Obtain the second type of identifier code corresponding to the first distance to be combined as the second type of identifier code to be combined; Obtain the current identifier code based on the current first type identifier code and the second type identifier code to be combined; Obtain the next first distance between the next first type identifier and all second type identifiers, obtain the next first combination identifier, and continue until all first type identifiers have been traversed; The set of all first combination identifiers is taken as the first set; Wherein, the value of the current first combined identifier code is the value obtained by concatenating the value of the current first type identifier code and the value of the second type identifier code to be combined, and the center of the current first combined identifier code is the center of the line connecting the center of the current first type identifier code and the center of the second type identifier code to be combined.

[0062] In this embodiment of the invention, the association unit 430 is further configured to: Obtain the feature distance for each of the original identifier codes; The maximum value among all the aforementioned feature distances is used as the qualification threshold; The step of obtaining the feature distance for each of the original identifier codes includes: Obtain the four corner points of the current original identifier. Obtain the second distance from each corner point to the other three corner points (excluding itself). The largest second distance is taken as the feature distance of the current original identifier code.

[0063] In this embodiment of the invention, the filtering unit 440 is further configured to: Obtain the current third distance between the center of the current fifth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current first similarity between the current fifth type identifier code and each of the combined identifier codes in the filter set; Based on the current third distance and the current first similarity, determine whether to remove the current fifth type of identifier code; Obtain the next third distance and the next first similarity corresponding to the next fifth-class identifier, until all the fifth-class identifiers have been traversed; Obtain the current fourth distance between the center of the current sixth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current second similarity between the current sixth-class identifier and each of the combined identifiers in the filter set; Based on the current fourth distance and the current second similarity, determine whether to remove the current sixth type of identifier code; Obtain the next fourth distance and the next second similarity corresponding to the next sixth-class identifier, until all the sixth-class identifiers have been traversed; The retained fifth type of identifier, the retained sixth type of identifier, and the filtered set are combined, and the combined set is taken as the target set.

[0064] In this embodiment of the invention, the filtering unit 440 is further configured to: Obtain the longest common substring between the current fifth-class identifier and the current combined identifier in the filter set; The current first similarity is obtained based on the longest common substring, the length of the current fifth-class identifier, and the length of the current combined identifier.

[0065] In this embodiment of the invention, each combined identification code corresponds to a target object, ensuring that there are no omissions or repetitions, which facilitates the management and traceability of the target objects.

[0066] This invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the following method: identifying original identification codes from an original image; classifying the original identification codes; associating the original identification codes with each other based on the classification to obtain a filter set; filtering out duplicate combination identification codes from the filter set to obtain a target set; wherein each combination identification code in the target set corresponds to a target object.

[0067] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the following method: identifying original identification codes from an original image; classifying the original identification codes; associating the original identification codes with each other based on the classification of the original identification codes to obtain a filter set; filtering out duplicate combination identification codes from the filter set to obtain a target set; wherein each combination identification code in the target set corresponds to a target object.

[0068] The above-described identification code recognition method achieves the beneficial effect of solving the technical problems mentioned in the background art.

[0069] Figure 2 This is a flowchart illustrating an identifier recognition method in one embodiment. It should be understood that, although... Figure 2 The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figure 2 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.

[0070] Figure 5 An internal structural diagram of a computer device in one embodiment is shown. Specifically, this computer device may be... Figure 1 Server 120 in the middle. For example... Figure 5As shown, the computer device includes a processor, memory, network interface, input device, and display screen connected via a system bus. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores an operating system and may also store a computer program. When executed by the processor, this computer program enables the processor to implement an identification code recognition method. The internal memory may also store a computer program, which, when executed by the processor, enables the processor to perform the identification code recognition method. The display screen can be an LCD screen or an e-ink screen. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad mounted on the computer device's casing, or an external keyboard, touchpad, or mouse.

[0071] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device to which the present invention is applied. A specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0072] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0073] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0074] The above description is merely a specific embodiment of the present invention, enabling those skilled in the art to understand or implement the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the present invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for identifying identification codes, characterized in that, The method includes: Identify the original identification code from the original image; the original identification code includes a first type of identification code, a second type of identification code, a third type of identification code, a fourth type of identification code, a fifth type of identification code, and a sixth type of identification code; The original identification codes are classified; Based on the classification of the original identifier codes, the original identifier codes are associated with each other to obtain a filter set; Duplicate combined identifier codes are filtered out from the filter set to obtain the target set; Each of the combined identifier codes in the target set corresponds to a target object; The step of associating the original identifiers based on their classification to obtain a filter set includes: Associating the first type of identifier with the second type of identifier yields a first set; Associating the third type of identifier with the second type of identifier yields a second set; Associating the third type of identifier with the third type of identifier yields a third set; Associating the fourth type of identifier with the fifth type of identifier yields a fourth set; The first set, the second set, the third set, and the fourth set are merged to form the filter set; The step of associating the first type of identifier with the second type of identifier to obtain the first set includes: Obtain the current first distance between the current first-type identifier and all second-type identifiers; filter all the current first distances by a certificate threshold. If the current first distance is less than or equal to the certificate threshold, retain the current first distance; if the current first distance is greater than the certificate threshold, discard the current first distance; take the smallest of all retained current first distances as the first distance to be combined; obtain the second-type identifier corresponding to the first distance to be combined as the second-type identifier to be combined; obtain the current identifier based on the current first-type identifier and the second-type identifier to be combined; obtain the next first distance between the next first-type identifier and all second-type identifiers, obtain the next first combined identifier, and so on until all first-type identifiers are traversed; take the set of all first combined identifiers as the first set; wherein, the value of the current first combined identifier is the value obtained by concatenating the values ​​of the current first-type identifier and the second-type identifier to be combined, and the center of the current first combined identifier is the center of the line connecting the center of the current first-type identifier and the center of the second-type identifier to be combined.

2. The method according to claim 1, characterized in that, The classification of the original identifier includes: Categorize according to specific characters; and / or Categorize according to character length; and / or Categorize by dimension; The original identification code, after being categorized, includes: The first type of identifier, a one-dimensional code, uses a first specific character as the starting character, and the character length is less than a first length threshold. The third type of identifier, a one-dimensional code, uses a second specific character as the starting character. The fifth type of identification code, a one-dimensional code, uses the first specific character as the starting character, and the character length is greater than or equal to the first length threshold. Class 6 identification code, QR code, The second type of identifier code, excluding the first, third, fifth, and sixth types of identifier codes, has a character length greater than or equal to the second length threshold. The fourth type of identifier code is any identifier code other than the first, third, fifth, and sixth types of identifier codes, whose character length is less than the second length threshold.

3. The method according to claim 1, characterized in that, Before obtaining the filter set by associating the original identifiers according to their classification, the method further includes: Obtain the feature distance for each of the original identifier codes; The maximum value among all the aforementioned feature distances is used as the qualification threshold; The step of obtaining the feature distance for each of the original identifier codes includes: Obtain the four corner points of the current original identifier. Obtain the second distance from each corner point to the other three corner points (excluding itself). The largest second distance is taken as the feature distance of the current original identifier code.

4. The method according to claim 1, characterized in that, The step of filtering out duplicate combined identifiers from the filter set to obtain the target set includes: Obtain the current third distance between the center of the current fifth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current first similarity between the current fifth type identifier code and each of the combined identifier codes in the filter set; Based on the current third distance and the current first similarity, determine whether to remove the current fifth type of identifier code; Obtain the next third distance and the next first similarity corresponding to the next fifth-class identifier, until all the fifth-class identifiers have been traversed; Obtain the current fourth distance between the center of the current sixth-class identifier and the center of each of the combined identifiers in the filter set; Obtain the current second similarity between the current sixth-class identifier and each of the combined identifiers in the filter set; Based on the current fourth distance and the current second similarity, determine whether to remove the current sixth type of identifier code; Obtain the next fourth distance and the next second similarity corresponding to the next sixth-class identifier, until all the sixth-class identifiers have been traversed; The retained fifth type of identifier, the retained sixth type of identifier, and the filtered set are combined, and the combined set is taken as the target set.

5. The method according to claim 4, characterized in that, The step of obtaining the current first similarity between the current fifth-class identifier and each of the combined identifiers in the filter set includes: Obtain the longest common substring between the current fifth-class identifier and the current combined identifier in the filter set; The current first similarity is obtained based on the longest common substring, the length of the current fifth-class identifier, and the length of the current combined identifier.

6. A code identification device, characterized in that, The device includes: The identification unit is used to identify the original identification code from the original image; the original identification code includes a first type of identification code, a second type of identification code, a third type of identification code, a fourth type of identification code, a fifth type of identification code, and a sixth type of identification code; A classification unit is used to classify the original identification code; The association unit is used to associate the original identifiers with each other based on the classification of the original identifiers to obtain a filter set; A filtering unit is used to filter out duplicate combined identifier codes from the filter set to obtain a target set; Each of the combined identifier codes in the target set corresponds to a target object; The step of associating the original identifiers based on their classification to obtain a filter set includes: Associating the first type of identifier with the second type of identifier yields a first set; Associating the third type of identifier with the second type of identifier yields a second set; Associating the third type of identifier with the third type of identifier yields a third set; Associating the fourth type of identifier with the fifth type of identifier yields a fourth set; The first set, the second set, the third set, and the fourth set are merged to form the filter set; The step of associating the first type of identifier with the second type of identifier to obtain the first set includes: Obtain the current first distance between the current first-type identifier and all second-type identifiers; filter all the current first distances by a certificate threshold. If the current first distance is less than or equal to the certificate threshold, retain the current first distance; if the current first distance is greater than the certificate threshold, discard the current first distance; take the smallest of all retained current first distances as the first distance to be combined; obtain the second-type identifier corresponding to the first distance to be combined as the second-type identifier to be combined; obtain the current identifier based on the current first-type identifier and the second-type identifier to be combined; obtain the next first distance between the next first-type identifier and all second-type identifiers, obtain the next first combined identifier, and so on until all first-type identifiers are traversed; take the set of all first combined identifiers as the first set; wherein, the value of the current first combined identifier is the value obtained by concatenating the values ​​of the current first-type identifier and the second-type identifier to be combined, and the center of the current first combined identifier is the center of the line connecting the center of the current first-type identifier and the center of the second-type identifier to be combined.

7. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • One-dimensional code positioning method and device, computer equipment and storage medium

    CN115577728A