Commodity bar code identification method, apparatus and device, and storage medium

By calculating the similarity of product barcode image features, the problem of repeated reading of product barcodes is solved, and the recognition efficiency and user experience are improved.

CN120673092APending Publication Date: 2025-09-19BEIJING TSINGTENG MICROSYSTEM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510794364.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-13
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the prior art, product barcodes are easily read repeatedly during the recognition process due to limited recognition capabilities, which affects the user experience.

Method used

By calculating the similarity between the current frame image features and the previous frame image features, if the decoding is successful and the number of image frames with feature similarity less than the first threshold reaches a certain number, the product quantity value is increased to avoid repeated reading.

Benefits of technology

It effectively avoids repeated reading of product barcodes, improves user experience, and reduces delays in the identification process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673092A_ABST
    Figure CN120673092A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a commodity bar code identification method and device, equipment and a storage medium, and relates to the technical field of bar code identification. The method comprises the steps of obtaining a current frame image of a commodity, extracting a first image feature in the current frame image, then calculating feature similarity between the first image feature and a second image feature, and decoding a commodity bar code in the current frame image to obtain a decoding result; if the decoding result represents that the decoding is successful, determining a first image frame number of which the feature similarity is less than a first threshold value; and finally, according to a relationship between the first image frame number and a second threshold value, determining whether to add a preset numerical value to the number value of the commodities.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of barcode recognition technology, and in particular to a commodity barcode recognition method, apparatus, device, and storage medium. Background Art

[0002] Currently, product checkout relies on barcode recognition. To prevent repeated barcode recognition, a delayed barcode reading feature is typically used. However, this method is limited by the barcode recognition platform's capabilities. If the barcode reading time exceeds a preset upper limit, the same barcode will be read multiple times, seriously affecting the user's shopping experience.

[0003] Therefore, there is an urgent need for a product barcode recognition method that can avoid repeated recognition of product barcodes during the recognition process, thereby improving user experience. Summary of the Invention

[0004] In order to solve the above technical problems, the present disclosure provides a product barcode recognition method, device, equipment and storage medium.

[0005] A first aspect of the present disclosure provides a method for identifying a commodity barcode, the method comprising:

[0006] Acquire a current frame image of the product, and extract a first image feature from the current frame image;

[0007] Calculating feature similarity between the first image feature and the second image feature, and decoding the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent an image feature in a frame image previous to the current frame image;

[0008] If the decoding result indicates that the decoding is successful, determining the first number of image frames whose feature similarity is less than a first threshold;

[0009] Whether to increase the quantity of the commodity by a preset value is determined according to a relationship between the first image frame number and a second threshold.

[0010] In one example, determining whether to increase the quantity of the product by a preset value based on the relationship between the first image frame number and the second threshold includes:

[0011] If the first image frame number is greater than the second threshold, determining the number of consecutive image frames between the frame image corresponding to the last successful decoding and the current frame image; wherein the consecutive image frames are frame images whose feature similarity is greater than the third threshold;

[0012] If the number of consecutive image frames is greater than a fourth threshold, the quantity value of the product is increased by a preset value, and the next frame image of the product is obtained.

[0013] In one example, the method further includes:

[0014] If the number of consecutive image frames is not greater than a fourth threshold, the quantity value of the product is maintained, and the next frame image of the product is acquired.

[0015] In one example, the method further includes:

[0016] If the number of the first image frames is not greater than the second threshold, the quantity value of the product is maintained and the next frame image of the product is acquired.

[0017] In one example, the method further includes:

[0018] If the decoding result indicates a decoding failure, the next frame image of the product is obtained.

[0019] In one example, determining the first number of image frames whose feature similarity is less than a first threshold includes:

[0020] Determine the number of second image frames between the frame image corresponding to the last successful decoding and the current frame image;

[0021] The second image frame number whose feature similarity is less than a first threshold is determined as the first image frame number.

[0022] A second aspect of the present disclosure provides a commodity barcode recognition device, the device comprising:

[0023] a first acquisition module, configured to acquire a current frame image of the commodity and extract a first image feature from the current frame image;

[0024] a calculation module, configured to calculate a feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent an image feature in an image frame previous to the current frame image;

[0025] A first determining module is configured to determine a first number of image frames whose feature similarity is less than a first threshold if the decoding result indicates that the decoding is successful;

[0026] The second determining module is configured to determine whether to increase the quantity of the commodity by a preset value according to a relationship between the first image frame number and a second threshold.

[0027] A third aspect of an embodiment of the present disclosure provides an electronic device, comprising: a processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method of the first aspect above.

[0028] A fourth aspect of an embodiment of the present disclosure provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of the first aspect described above can be implemented.

[0029] A fifth aspect of the embodiments of the present disclosure provides a computer program product, characterized in that it includes a computer program, and when the computer program is executed by a processor, it implements the method described in the first aspect.

[0030] The embodiments of the present disclosure provide a product barcode recognition method, apparatus, device, and storage medium. The method includes obtaining a current frame image of a product and extracting a first image feature in the current frame image, then calculating a feature similarity between the first image feature and a second image feature, and decoding the product barcode in the current frame image to obtain a decoding result; if the decoding result indicates that the decoding is successful, determining the number of first image frames whose feature similarity is less than a first threshold; and finally, determining whether to increase the quantity value of the product by a preset value based on the relationship between the first image frame number and the second threshold. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0032] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0033] Figure 1a This is a flow chart of a commodity barcode recognition method provided by an embodiment of the present disclosure;

[0034] Figure 1b Schematic diagram of a method for constructing a gradient direction histogram provided in this embodiment;

[0035] Figure 2 This is a flow chart of a commodity barcode recognition method provided by an embodiment of the present disclosure;

[0036] Figure 3This is a schematic structural diagram of a commodity barcode recognition device provided by an embodiment of the present disclosure;

[0037] Figure 4 It is a structural diagram of an electronic device in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0038] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.

[0039] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.

[0040] Figure 1a The following is a flow chart of a method for identifying a product barcode provided by an embodiment of the present disclosure, which can be performed by an electronic device. The electronic device can be exemplarily understood as a device such as a mobile phone, tablet computer, laptop computer, desktop computer, smart TV, etc.

[0041] like Figure 1a As shown, the method provided in this embodiment includes the following steps:

[0042] S101: Acquire a current frame image of a product and extract a first image feature from the current frame image.

[0043] This embodiment can be executed by a barcode recognition platform, which has a camera that can obtain frame images of the product in real time.

[0044] In one example, the first image feature may be a vector feature. Specifically, the first image feature may be an image gradient direction histogram, a local binary pattern feature, or an ORB feature.

[0045] In an example, the current frame image of the product is the i-th frame image. After the current frame image of the product is acquired, the first image feature in the i-th frame image is extracted.

[0046] S102. Calculate the feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent the image feature in the frame image before the current frame image.

[0047] In one example, the second image feature is used to characterize the image feature in the previous frame of the current image. The previous frame of the current image is denoted as the (i-1)th frame of the image. Since the image feature has already been identified in the (i-1)th frame of the image, the feature similarity between the first image feature and the second image feature is calculated. The feature similarity can be calculated using methods such as Euclidean distance, cosine distance, and correlation coefficient.

[0048] Figure 1b A schematic diagram of a gradient direction histogram construction method provided by this embodiment is shown. An image is divided into four blocks, and a gradient direction histogram is constructed for each block. The gradient direction histograms of the four blocks are then merged into a total gradient direction histogram vector in the order shown in the figure. Each block constructs an eight-directional gradient direction histogram. Furthermore, the image can be divided into more sub-blocks as needed. The greater the number of sub-blocks into which the image is divided, the stronger the feature vector's ability to represent the image.

[0049] Furthermore, the gradient direction range of each pixel in the image is (-π, π]. When the gradient direction histogram is divided into eight directions, the direction spacing of the gradient direction histogram is π / 4, and the amplitude of each element in the gradient direction histogram is the sum of the gradient amplitudes of all the elements that meet the direction interval in the sub-block.

[0050] Furthermore, in order to improve the image representation capability of the gradient direction histogram, an interpolation operation of the gradient amplitude of each pixel in the spatial and angular dimensions can be added during the construction of the gradient direction histogram.

[0051] Furthermore, in order to improve the robustness of the gradient direction histogram, post-processing such as normalization and maximum value suppression can be performed on the gradient direction histogram.

[0052] In one example, a product barcode may exist in each frame of image, and the product barcode needs to be decoded to obtain a decoding result.

[0053] S103: If the decoding result indicates that the decoding is successful, determine the first number of image frames whose feature similarity is less than a first threshold.

[0054] In one example, the first threshold is a pre-configured value, such as 200. If the decoding result indicates successful decoding, it means that the product barcode in the current frame image can be recognized. At this time, the number of first image frames whose feature similarity is less than the first threshold is determined.

[0055] In this embodiment, if the feature similarity is less than the first threshold, it means that the current frame image and the previous frame image are not similar.

[0056] S104: Determine whether to increase the quantity of the product by a preset value based on the relationship between the first image frame number and the second threshold.

[0057] In one example, the second threshold is a preconfigured value, which may be 0. The relationship between the number of first image frames and 0 is calculated to determine whether there are dissimilar frame images, and then to determine whether to increase the quantity of the product by a preset value, which may be 1.

[0058] The disclosed embodiments provide a method for identifying a product barcode. Specifically, a current frame image of a product is obtained, and a first image feature in the current frame image is extracted. Then, a feature similarity between the first image feature and a second image feature is calculated, and the product barcode in the current frame image is decoded to obtain a decoding result. If the decoding result indicates that the decoding is successful, the number of first image frames whose feature similarity is less than a first threshold is determined. Finally, based on the relationship between the first image frame number and the second threshold, it is determined whether to increase the quantity value of the product by a preset value.

[0059] Figure 2 The flowchart of a commodity barcode recognition method provided by an embodiment of the present disclosure is shown. The embodiment of the present disclosure is optimized based on the above embodiment, and the embodiment of the present disclosure can be combined with various optional solutions in one or more of the above embodiments.

[0060] like Figure 2 As shown, the product barcode recognition method may include the following steps:

[0061] S201: Acquire a current frame image of a product and extract a first image feature from the current frame image.

[0062] In an example, this step can refer to the content of step S101 and will not be repeated here.

[0063] S202. Calculate the feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent the image feature in the frame image before the current frame image.

[0064] In an example, this step can refer to the content of step S102 and will not be repeated here.

[0065] S203: If the decoding result indicates that the decoding is successful, determine the first number of image frames whose feature similarity is less than a first threshold.

[0066] In one example, determining the number of first image frames whose feature similarity is less than a first threshold includes:

[0067] Determine the second image frame number between the frame image corresponding to the last successful decoding and the current frame image;

[0068] The second image frame number whose feature similarity is less than the first threshold is determined as the first image frame number.

[0069] In one example, the last successful decoding means that after completing steps S201 and S202, the decoding result indicates successful decoding, and then the corresponding frame image is obtained, for example, the i-10th frame image. The current frame image may be the i-th frame image, and the number of second image frames between the i-10th frame image and the i-th frame image is 10 frames. Then, among these 10 frames, the number of second image frames whose feature similarity is less than the first threshold is determined, and this second image frame number is then determined as the first image frame number.

[0070] In one example, the method further includes:

[0071] If the decoding result indicates a decoding failure, the next frame image of the product is obtained.

[0072] In one example, if the decoding result indicates a decoding failure, it means that the product barcode does not exist in the current frame image or the product barcode is incomplete.

[0073] S204: If the first image frame number is greater than the second threshold, determine the number of consecutive image frames between the frame image corresponding to the last successful decoding and the current frame image; wherein the consecutive image frames are frame images whose feature similarity is greater than the third threshold.

[0074] In one example, the second threshold may be 0. If the first image frame number is greater than 0, dissimilar image frames exist. The number of consecutive image frames between the (i-10)th image frame and the (i)th image frame whose feature similarity exceeds the third threshold is then determined. The first threshold is less than or equal to the third threshold. The first and third thresholds in this embodiment may vary depending on the method used to calculate feature similarity. For example, the number of consecutive image frames may be 7.

[0075] S205: If the number of consecutive image frames is greater than a fourth threshold, the quantity value of the product is increased by a preset value, and the next frame image of the product is obtained.

[0076] In one example, the fourth threshold is related to the motion tolerance capability supported by the barcode recognition platform. The fourth threshold represents the number of consecutive image frames captured by the barcode recognition platform of the background area. The fourth threshold may be 6 frames. If the number of consecutive image frames exceeds the fourth threshold, it indicates that the product is moving and that the product was moved to the barcode recognition platform from an external source. The product quantity value is then increased by a preset value, and the next image frame of the product is captured.

[0077] S206: If the number of consecutive image frames is not greater than a fourth threshold, the quantity value of the product is maintained, and the next image frame of the product is acquired.

[0078] In one example, if the number of consecutive image frames is not greater than the fourth threshold, it indicates that the product may be the same, and the quantity value of the product is maintained, and the next frame image of the product is obtained, that is, detection is continued.

[0079] S207: If the number of the first image frames is not greater than the second threshold, the quantity value of the product is maintained, and the next frame image of the product is acquired.

[0080] In one example, if the number of first image frames is not greater than the second threshold, it means that there are no dissimilar frame images, and the product is still the same at this time, so the quantity value of the product is maintained and the next frame image of the product is obtained.

[0081] The disclosed embodiments provide a method for identifying product barcodes. If the number of first image frames is greater than a second threshold, the number of consecutive image frames between the last successfully decoded frame and the current frame is determined. If the number of consecutive image frames is greater than a fourth threshold, the quantity of the products is increased by a preset value, and the next image frame of the products is acquired. If the number of consecutive image frames is not greater than the fourth threshold, the quantity of the products is retained, and the next image frame of the products is acquired. This technical solution avoids the heavy reliance of the delayed barcode recognition function on the decoding time.

[0082] Figure 3 : is a structural diagram of a commodity barcode recognition device provided by an embodiment of the present disclosure. The commodity barcode recognition device can be understood as the above-mentioned electronic device or a part of the functional modules in the above-mentioned electronic device. Figure 3 As shown, the commodity barcode recognition device 30 includes:

[0083] The first acquisition module 301 is used to acquire a current frame image of the commodity and extract a first image feature from the current frame image.

[0084] The calculation module 302 is used to calculate the feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent the image feature in the previous frame image of the current frame image.

[0085] The first determining module 303 is configured to determine the first number of image frames whose feature similarity is less than a first threshold if the decoding result indicates that the decoding is successful.

[0086] The second determining module 304 is configured to determine whether to increase the quantity of the product by a preset value according to a relationship between the first image frame number and the second threshold.

[0087] In one example, the second determining module 304 is specifically configured to:

[0088] If the first image frame number is greater than the second threshold, determining the number of consecutive image frames between the frame image corresponding to the last successful decoding and the current frame image; wherein the consecutive image frames are frame images whose feature similarity is greater than the third threshold;

[0089] If the number of consecutive image frames is greater than a fourth threshold, the quantity value of the product is increased by a preset value, and the next frame image of the product is obtained.

[0090] In one example, the apparatus 30 further includes:

[0091] The first holding module 305 is configured to hold the quantity of the product and obtain the next image frame of the product if the number of consecutive image frames is not greater than a fourth threshold.

[0092] In one example, the apparatus 30 further includes:

[0093] The second holding module 306 is configured to hold the quantity of the product and obtain the next image frame of the product if the number of the first image frames is not greater than the second threshold.

[0094] In one example, the apparatus 30 further includes:

[0095] The second acquisition module 307 is configured to acquire the next image frame of the product if the decoding result indicates a decoding failure.

[0096] In one example, the first determining module 303 is configured to:

[0097] Determine the second image frame number between the frame image corresponding to the last successful decoding and the current frame image;

[0098] The second image frame number whose feature similarity is less than the first threshold is determined as the first image frame number.

[0099] The device provided in this embodiment can execute the method of any of the above embodiments, and its execution method and beneficial effects are similar, which will not be repeated here.

[0100] An embodiment of the present disclosure further provides an electronic device, which includes: a memory storing a computer program; a processor for executing the computer program, and when the computer program is executed by the processor, the method of any of the above embodiments can be implemented.

[0101] For example, Figure 4 This is a schematic diagram of the structure of an electronic device in the embodiment of the present disclosure. Figure 4, which shows a schematic structural diagram of an electronic device 1000 suitable for implementing the embodiments of the present disclosure. The electronic device 1000 in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 4 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0102] like Figure 4 As shown, the electronic device 1000 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. Various programs and data required for the operation of the electronic device 1000 are also stored in the RAM 1003. The processing device 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.

[0103] Typically, the following devices may be connected to the I / O interface 1005: an input device 1006 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1007 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1008 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the electronic device 1000 to communicate with other devices wirelessly or by wire to exchange data. Figure 4 The electronic device 1000 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0104] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 1009, or installed from the storage device 1008, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0105] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0106] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0107] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0108] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device is caused to: obtain a current frame image of the product and extract a first image feature in the current frame image; calculate the feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to characterize the image feature in the frame image before the current frame image; if the decoding result indicates that the decoding is successful, determine the first image frame number whose feature similarity is less than a first threshold; and determine whether to increase the quantity value of the product by a preset value based on the relationship between the first image frame number and the second threshold.

[0109] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0110] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0111] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit does not necessarily limit the unit itself.

[0112] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0113] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0114] The embodiments of the present disclosure also provide a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method of any of the above embodiments can be implemented. The execution method and beneficial effects are similar and will not be repeated here.

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

[0116] The above are merely specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. 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 present disclosure. Therefore, the present disclosure is not limited to these embodiments, but is to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for identifying a commodity barcode, characterized in that: The method comprises: Acquire a current frame image of the product, and extract a first image feature from the current frame image; Calculating feature similarity between the first image feature and the second image feature, and decoding the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent an image feature in a frame image previous to the current frame image; If the decoding result indicates that the decoding is successful, determining the first number of image frames whose feature similarity is less than a first threshold; Whether to increase the quantity of the commodity by a preset value is determined according to a relationship between the first image frame number and a second threshold.

2. The method according to claim 1, characterized in that The determining whether to increase the quantity of the commodity by a preset value according to the relationship between the first image frame number and the second threshold value includes: If the first image frame number is greater than the second threshold, determining the number of consecutive image frames between the frame image corresponding to the last successful decoding and the current frame image; wherein the consecutive image frames are frame images whose feature similarity is greater than the third threshold; If the number of consecutive image frames is greater than a fourth threshold, the quantity value of the product is increased by a preset value, and the next frame image of the product is obtained.

3. The method according to claim 2, characterized in that The method further comprises: If the number of consecutive image frames is not greater than a fourth threshold, the quantity value of the product is maintained, and the next frame image of the product is acquired.

4. The method according to claim 2, characterized in that The method further comprises: If the number of the first image frames is not greater than the second threshold, the quantity value of the product is maintained and the next frame image of the product is acquired.

5. The method according to claim 1, wherein The method further comprises: If the decoding result indicates a decoding failure, the next frame image of the product is obtained.

6. The method according to claim 1, characterized in that Determining the first number of image frames whose feature similarity is less than a first threshold comprises: Determine the number of second image frames between the frame image corresponding to the last successful decoding and the current frame image; The second image frame number whose feature similarity is less than a first threshold is determined as the first image frame number.

7. A commodity barcode recognition device, characterized in that: The device comprises: a first acquisition module, configured to acquire a current frame image of the commodity and extract a first image feature from the current frame image; a calculation module, configured to calculate a feature similarity between the first image feature and the second image feature, and decode the product barcode in the current frame image to obtain a decoding result; wherein the second image feature is used to represent an image feature in an image frame previous to the current frame image; A first determining module is configured to determine a first number of image frames whose feature similarity is less than a first threshold if the decoding result indicates that the decoding is successful; The second determining module is configured to determine whether to increase the quantity of the commodity by a preset value according to a relationship between the first image frame number and a second threshold.

8. An electronic device, characterized in that: include: A processor and a memory, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 6 when the computer program is executed by a processor.