Method and device for delayed reading of same bar code based on bar code motion trail

By analyzing the barcode's movement trajectory and determining whether the item has left or re-entered the barcode recognition platform window, the system solves the problem of multiple readings caused by the delayed reading function of the same barcode in the existing technology, thereby improving the shopping experience and recognition efficiency.

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

Patent Information

Application Number
CN202510698474.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-28
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

In the prior art, the delayed reading function of the same barcode based on recognition time constraints can easily cause the same product to be read multiple times, affecting consumers' shopping experience.

Method used

By collecting multiple frames of images and analyzing the movement trajectory of the barcode, it is determined whether the object leaves or re-enters the barcode recognition platform window. The barcode is only allowed to be read when the object re-enters after leaving, avoiding a serious dependence on reading time.

Benefits of technology

It effectively reduces the probability of continuous reading under the delayed reading function of the same barcode, improves the efficiency of item recognition, and improves the shopping experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120671697A_ABST
    Figure CN120671697A_ABST
Patent Text Reader

Abstract

The invention relates to a same bar code delayed reading method and device based on a bar code motion trail, and the method comprises the steps: collecting an ith frame image; wherein i is a positive integer greater than 1; performing bar code recognition on the ith frame of image, acquiring a time interval between a current decoding success moment and a last decoding success moment when the recognition is successful, and judging whether the time interval is greater than a preset time interval threshold value or not; wherein the same bar code is successfully decoded at the current decoding success moment and the last decoding success moment; and when the time interval is greater than the time interval threshold value, judging whether the bar code is allowed to read based on the bar code moving track to obtain a judgment result, and outputting a bar code recognition result when the judgment result is that the bar code is allowed to read. By adopting the technical scheme, the continuous reading probability of the bar code recognition platform under the same bar code delayed reading function can be effectively reduced, and the article recognition efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of barcode recognition, and in particular to a method and device for delayed reading of the same barcode based on the barcode motion trajectory. Background Art

[0002] Currently, product-based barcode recognition is widely used in supermarkets and other scenarios. In practical applications, when consumers purchase goods, they hope that the same item will be read only once to prevent repeated purchases. The delayed reading function of the same barcode is a common function of barcode recognition platforms.

[0003] In related technologies, the delayed reading function of the same barcode based on recognition time constraints is widely used, but this method is limited by the recognition capabilities of the barcode recognition platform. When the product barcode reading time exceeds the preset upper limit, it is very easy to cause the same barcode to be read multiple times, seriously affecting the consumer's shopping experience. Summary of the Invention

[0004] In order to solve the above technical problems or at least partially solve the above technical problems, at least one embodiment of the present disclosure provides a method and device for delayed reading of the same barcode based on the barcode motion trajectory.

[0005] In a first aspect, the present disclosure provides a method for delayed reading of the same barcode based on the barcode motion trajectory, the method comprising: acquiring the i-th frame image; wherein i is a positive integer greater than 1; performing barcode recognition on the i-th frame image, and obtaining the time interval between the current successful decoding moment and the last successful decoding moment when the recognition is successful, and judging whether the time interval is greater than a preset time interval threshold; wherein the current successful decoding moment and the last successful decoding moment both successfully decode the same barcode; when the time interval is greater than the time interval threshold, determining whether barcode reading is allowed based on the barcode motion trajectory, obtaining a determination result, and outputting the barcode recognition result when the determination result is that the barcode reading is allowed.

[0006] In one embodiment, the determining whether barcode reading is allowed based on the barcode running trajectory and obtaining a determination result include: obtaining a first geometric center coordinate sequence of the barcode successfully decoded from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and calculating a first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence; obtaining a second geometric center coordinate sequence of the barcode successfully decoded from the current successful decoding moment to the current successful decoding moment plus the backtracking time length, and calculating a second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence; calculating the directional angle between the first direction vector and the second direction vector, and when the directional angle is greater than a preset angle threshold, determining that the barcode reading is allowed as the determination result.

[0007] In one embodiment, the method further includes: obtaining the geometric center coordinates of the current barcode corresponding to the current successful decoding moment when the recognition is successful; when the direction angle is less than or equal to the angle threshold, obtaining the geometric center coordinates of the previous barcode at the last successful decoding moment; performing calculations based on the current barcode geometric center coordinates and the previous barcode geometric center coordinates to obtain the geometric center point spacing; when the geometric center point spacing is greater than or equal to a preset minimum moving distance, judging that barcode reading is allowed as the judgment result; when the geometric center point spacing is less than the minimum moving distance, judging that barcode reading is prohibited as the judgment result.

[0008] In one embodiment, the last successful decoding moment is less than the current successful decoding moment, and the current successful decoding moment minus the last successful decoding moment is equal to the time interval; the angle threshold is greater than or equal to forty-five degrees and less than one hundred and eighty degrees.

[0009] In one embodiment, there is at least one successfully identified identical barcode from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and there is at least one successfully identified identical barcode from the current successful decoding moment to the current successful decoding moment plus the backtracking time length.

[0010] In one embodiment, the calculation of the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence includes: traversing all the first geometric center coordinate points of the first geometric center coordinate sequence, obtaining the two first geometric center coordinate points with the farthest distance, and performing calculation based on the two first geometric center coordinate points to obtain the first direction vector; the calculation of the second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence includes: traversing all the second geometric center coordinate points of the second geometric center coordinate sequence, obtaining the two second geometric center coordinate points with the farthest distance, and performing calculation based on the two second geometric center coordinate points to obtain the second direction vector.

[0011] In one embodiment, the method further includes: when barcode recognition of the i-th frame image fails or the time interval is less than or equal to the time interval threshold, acquiring the (i+1)-th frame image for barcode recognition.

[0012] In a second aspect, the present disclosure provides a device for delayed reading of the same barcode based on the barcode motion trajectory, the device comprising: an acquisition module for acquiring the i-th frame image; wherein i is a positive integer greater than 1; an identification module for performing barcode identification on the i-th frame image; an acquisition module for obtaining the time interval between the current successful decoding moment and the last successful decoding moment when the identification is successful; wherein the current successful decoding moment and the last successful decoding moment both successfully decode the same barcode; a judgment module for judging whether the time interval is greater than a preset time interval threshold; a judgment module for judging whether barcode reading is allowed based on the barcode motion trajectory when the time interval is greater than the time interval threshold, and obtaining a judgment result; an output module for outputting the barcode recognition result when the judgment result is that the barcode reading is allowed.

[0013] In a third aspect, the present disclosure provides an electronic device, comprising: a processor and a memory;

[0014] The processor is configured to execute any of the barcode motion trajectory-based delayed reading methods provided in the embodiments of the present disclosure by calling the program or instruction stored in the memory.

[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium, which stores a program or instruction, and the program or instruction enables a computer to execute any of the barcode motion trajectory-based delayed reading methods provided in the embodiments of the present disclosure.

[0016] In a fifth aspect, the present disclosure provides a computer program product, which is used to execute any of the methods for delayed reading of the same barcode based on the barcode motion trajectory provided in the embodiments of the present disclosure.

[0017] The technical solution provided by the embodiments of the present disclosure has at least the following advantages compared with the prior art:

[0018] In the embodiment of the present disclosure, the i-th frame image is collected; wherein i is a positive integer greater than 1; barcode recognition is performed on the i-th frame image, and when the recognition is successful, the time interval between the current decoding success moment and the last decoding success moment is obtained, and it is determined whether the time interval is greater than a preset time interval threshold; wherein the current decoding success moment and the last decoding success moment both successfully decode the same barcode; when the time interval is greater than the time interval threshold, it is determined whether barcode reading is allowed based on the barcode running trajectory, and a determination result is obtained, and when the determination result is that the barcode reading is allowed, the barcode recognition result is output. By adopting the above technical solution, by determining the change in the moving direction of the object based on the running trajectory of the same historical barcode that has been successfully recognized, and then determining whether the object has entered the visual frame of the barcode recognition platform again, the heavy dependence of the same barcode delayed reading function on the length of the decoding time is greatly avoided, thereby effectively reducing the probability of continuous reading of the barcode recognition platform under the same barcode delayed reading function, improving the same barcode delayed reading performance, and thus improving the efficiency of object recognition. BRIEF DESCRIPTION OF THE DRAWINGS

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

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

[0021] Figure 1 A flowchart of a method for delayed reading of a barcode based on a barcode motion trajectory provided by an exemplary embodiment of the present disclosure;

[0022] Figure 2 A schematic flow chart of a method for delayed reading of a barcode based on a barcode motion trajectory provided by another exemplary embodiment of the present disclosure;

[0023] Figure 3 This is an example diagram of a method for delayed reading of a barcode based on a barcode motion trajectory provided by a specific embodiment of the present disclosure;

[0024] Figure 4 This is a schematic diagram of a barcode motion trajectory according to a specific embodiment of the present disclosure;

[0025] Figure 5 This is another schematic diagram of a barcode motion trajectory according to a specific embodiment of the present disclosure;

[0026] Figure 6 This is a schematic structural diagram of a barcode delayed reading device based on barcode motion trajectory provided by one embodiment of the present disclosure. DETAILED DESCRIPTION

[0027] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the present disclosure is further described in detail below with reference to the accompanying drawings and embodiments. It is understood that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. In the absence of conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of the present disclosure.

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

[0029] Specifically, the existing method sets a fixed time limit, and when the time interval between identifications of the same barcode is less than the time limit, the decoding result is prohibited from being output.

[0030] It can be understood that the present disclosure is directed to the process in which an item passes by the barcode recognition platform, and the barcode recognition platform can capture multiple frames of images containing barcodes; determine whether the item has left the barcode recognition platform window based on the movement trajectory of the barcode in the multiple frames of image; and only when the item leaves the barcode recognition platform window and re-enters the window can the barcode recognition platform respond to barcode reading. Specifically, the change in the direction of movement of the item is determined based on the movement trajectory of the geometric center coordinates of the same historical barcode that has been successfully recognized, and then determine whether the item has entered the barcode recognition platform's visual frame again, which greatly avoids the heavy reliance of the same barcode delayed reading function on the length of decoding time; thereby effectively reducing the probability of continuous reading of the barcode recognition platform under the same barcode delayed reading function, improving the same barcode delayed reading performance, and thus improving the efficiency of item recognition.

[0031] The specific implementation of the method and device for delayed reading of the same barcode based on the barcode motion trajectory disclosed in the present invention will be explained in detail below with reference to the accompanying drawings.

[0032] Figure 1A flow chart of a method for delayed reading of the same barcode based on the barcode motion trajectory provided for an exemplary embodiment of the present disclosure is provided. The method can be executed by a device for delayed reading of the same barcode based on the barcode motion trajectory provided for an embodiment of the present disclosure. The device for delayed reading of the same barcode based on the barcode motion trajectory can be implemented using software and / or hardware.

[0033] like Figure 1 As shown, the method for delayed reading of the same barcode based on the barcode motion trajectory may include the following steps:

[0034] Step 101: Capture the i-th frame image; wherein i is a positive integer greater than 1.

[0035] The barcode motion trajectory-based delayed reading method for the same barcode disclosed herein can be applied to a barcode recognition platform, which is equipped with a camera to capture the i-th frame image of an item including a barcode; wherein i is a positive integer greater than 1.

[0036] It is understandable that the camera device provided in the barcode recognition platform usually collects image frames in real time, or may collect images at a preset frequency according to actual application requirements.

[0037] It should be noted that when the i-th frame image is the first frame image, barcode recognition is performed on the first frame image. If the recognition is successful, the barcode recognition result is directly output. If the recognition fails, the second frame image is obtained to continue barcode recognition.

[0038] In the embodiment of the present disclosure, the i-th frame image refers to an image of an object including a barcode captured at a certain moment.

[0039] Step 102: perform barcode recognition on the i-th frame image, and when recognition is successful, obtain the time interval between the current decoding success moment and the last decoding success moment, and determine whether the time interval is greater than a preset time interval threshold; wherein, the current decoding success moment and the last decoding success moment both successfully decoded the same barcode.

[0040] Step 103 : when the time interval is greater than the time interval threshold, whether the barcode reading is allowed is determined based on the barcode running trajectory, and a determination result is obtained. When the determination result is that the barcode reading is allowed, the barcode recognition result is output.

[0041] Specifically, after capturing the i-th frame image, barcode recognition is performed on the i-th frame image. When the barcode recognition is successful, the last successful decoding time for the same barcode can be queried, that is, the last successful decoding time, and the time interval between the current successful decoding time and the last successful decoding time is calculated. Specifically, the current successful decoding time is subtracted from the last successful decoding time to obtain the time interval.

[0042] It should be noted that the current successful decoding time and the last successful decoding time both successfully decode the same barcode; the last successful decoding time is less than the current successful decoding time, and the current successful decoding time minus the last successful decoding time is equal to the time interval.

[0043] The time interval threshold is pre-set and can be set according to actual application. The time interval threshold can be initialized after each image acquisition to further ensure the accuracy of judgment.

[0044] Furthermore, it is determined whether the time interval is greater than a preset time interval threshold. When the time interval is greater than the time interval threshold, it is determined whether barcode reading is allowed according to the barcode running trajectory to obtain a determination result.

[0045] It can be understood that when the time interval is greater than the time interval threshold, it may be a scene with multiple quantities of the same item, or it may be a scene with the same item. Therefore, it is necessary to further judge whether barcode reading is allowed based on the barcode running trajectory; among them, the barcode running trajectory can be understood as the moving trajectory of the geometric center coordinates of the barcode; the geometric center coordinates can be obtained by obtaining the coordinates of the four vertices of the barcode for calculation.

[0046] In the embodiment of the present disclosure, whether barcode reading is allowed is determined based on the barcode running trajectory. There are many ways to obtain the determination result. The four vertex position coordinates corresponding to the barcode are obtained each time the decoding is successful. The geometric center coordinates of each successful decoding are calculated based on the four vertex position coordinates. The moving trajectory is determined according to the geometric center coordinates corresponding to multiple successful decodings as the barcode running trajectory to determine whether the barcode reading is allowed.

[0047] Specifically, obtain the first geometric center coordinate sequence of the barcode successfully decoded from the last successful decoding moment minus the preset backtracking time length to the last successful decoding moment, and calculate the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence, obtain the second geometric center coordinate sequence of the barcode successfully decoded from the current successful decoding moment to the current successful decoding moment plus the backtracking time length, and calculate the second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence, calculate the direction angle between the first direction vector and the second direction vector, and when the direction angle is greater than the preset angle threshold, determine that the barcode is allowed to be read as the judgment result. Among them, the backtracking time length and the angle threshold are preset, and the settings are selected according to the actual application scenario; as an example, the angle threshold is greater than or equal to forty-five degrees and less than one hundred and eighty degrees.

[0048] It should be noted that there is at least one successfully identified identical barcode from the last successful decoding moment minus the preset backtracking time length to the last successful decoding moment, and there is at least one successfully identified identical barcode from the current successful decoding moment to the current successful decoding moment plus the backtracking time length.

[0049] It should be noted that when the direction angle is less than or equal to the angle threshold, the geometric center coordinates of the previous barcode at the time of the last successful decoding are obtained. The geometric center point spacing is calculated based on the geometric center coordinates of the current barcode corresponding to the current successful decoding moment and the geometric center coordinates of the previous barcode. When the geometric center point spacing is greater than or equal to the preset minimum movement distance, the barcode reading is determined as a judgment result. When the geometric center point spacing is less than the minimum movement distance, the barcode reading is determined as a judgment result. Among them, the minimum movement distance is pre-set and is selected based on the actual application scenario.

[0050] Finally, when the determination result is that the barcode reading is allowed, the barcode recognition result is output; and when the determination result is that the barcode reading is prohibited, the barcode recognition result is not output.

[0051] It should be noted that when the barcode recognition of the i-th frame image fails or the time interval is less than or equal to the time interval threshold, the i+1-th frame image is obtained for barcode recognition.

[0052] The present invention discloses a method for delayed reading of the same barcode based on the barcode motion trajectory, which collects the i-th frame image; wherein i is a positive integer greater than 1; performs barcode recognition on the i-th frame image, and when recognition is successful, obtains the time interval between the current decoding success moment and the last decoding success moment, and determines whether the time interval is greater than a preset time interval threshold; wherein the current decoding success moment and the last decoding success moment both successfully decode the same barcode; when the time interval is greater than the time interval threshold, determines whether barcode reading is allowed based on the barcode motion trajectory, obtains a determination result, and outputs the barcode recognition result when the determination result is that the barcode reading is allowed. By adopting the above technical solution, by determining the change in the moving direction of the object based on the motion trajectory of the same historical barcode that has been successfully recognized, and then determining whether the object has re-entered the visual frame of the barcode recognition platform, the same barcode delayed reading function is greatly avoided from being heavily dependent on the length of the decoding time, thereby effectively reducing the probability of continuous reading of the barcode recognition platform under the same barcode delayed reading function, improving the same barcode delayed reading performance, and thereby improving the efficiency of object recognition.

[0053] Figure 2 This is a flow chart of a method for delayed reading of the same barcode based on the barcode motion trajectory provided by another exemplary embodiment of the present disclosure. Figure 2 As shown, the method for delayed reading of the same barcode based on the barcode motion trajectory may include the following steps:

[0054] Step 201 : Capture the i-th frame image, perform barcode recognition on the i-th frame image, and obtain the current barcode geometric center coordinates corresponding to the current decoding success moment when the recognition is successful.

[0055] Step 202: When the recognition is successful, the time interval between the current decoding success moment and the last decoding success moment is obtained, and it is determined whether the time interval is greater than a preset time interval threshold.

[0056] Step 203: Obtain a first geometric center coordinate sequence of the barcode successfully decoded within the time period from the last successful decoding time minus a preset backtracking time length to the last successful decoding time, and calculate a first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence.

[0057] Step 204 , obtaining a second geometric center coordinate sequence of the barcodes decoded successfully from the current decoding success moment to the current decoding success moment plus the backtracking time length, and calculating a second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence.

[0058] Step 205 , calculating the direction angle between the first direction vector and the second direction vector, and when the direction angle is greater than a preset angle threshold, determining that the barcode is allowed to be read is taken as a determination result.

[0059] Step 206, when the direction angle is less than or equal to the angle threshold, obtain the geometric center coordinates of the last barcode at the moment of the last successful decoding, calculate based on the geometric center coordinates of the current barcode and the geometric center coordinates of the previous barcode, and obtain the geometric center point spacing. When the geometric center point spacing is greater than or equal to the preset minimum moving distance, it is determined that the barcode is allowed to be read as a judgment result; when the geometric center point spacing is less than the minimum moving distance, it is determined that the barcode is prohibited from being read as a judgment result.

[0060] Step 207 : When barcode recognition fails for the i-th frame image or the time interval is less than or equal to the time interval threshold, the i+1-th frame image is obtained for barcode recognition.

[0061] In some embodiments, the last successful decoding time is less than the current successful decoding time, and the current successful decoding time minus the last successful decoding time is equal to the time interval; the angle threshold is greater than or equal to forty-five degrees and less than one hundred and eighty degrees.

[0062] In some embodiments, there is at least one successfully identified identical barcode from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and there is at least one successfully identified identical barcode from the current successful decoding moment to the current successful decoding moment plus the backtracking time length.

[0063] In some embodiments, calculating the first direction vector of the barcode running trajectory based on the first sequence of geometric center coordinates includes: traversing all the first geometric center coordinate points of the first sequence of geometric center coordinates, obtaining two first geometric center coordinate points with the farthest distance, and calculating based on the two first geometric center coordinate points to obtain the first direction vector.

[0064] In some embodiments, calculating the second direction vector of the barcode running trajectory based on the second sequence of geometric center coordinates includes: traversing all the second geometric center coordinate points of the second sequence of geometric center coordinates, obtaining two second geometric center coordinate points with the farthest distance, and calculating based on the two second geometric center coordinate points to obtain the second direction vector.

[0065] Exemplarily, as Figure 3 shown, step 3.1 initializes the time interval threshold gap_th; step 3.2 acquires the i-th frame image; step 3.3 performs barcode recognition; if the recognition is successful, it jumps to step 3.4, if the recognition fails, it jumps to step 3.8; step 3.4 calculates the geometric center coordinate P of the barcode i ; step 3.5 calculates the time interval gap from the last successful decoding to the current successful decoding; step 3.6 if gap is greater than gap_th, it jumps to step 3.7, otherwise, it jumps to step 3.8; step 3.7 determines whether to allow barcode reading based on the barcode running trajectory; step 3.8 acquires the (i + 1)-th frame image and jumps to step 3.2.

[0066] Specifically, the method for determining whether to read a barcode based on the barcode running trajectory includes: initializing the backtracking time length T and the minimum moving distance min_d of the barcode; obtaining the sequence Q0 of geometric center coordinates of the successfully decoded barcode within the time period [t0 - T, t0]; calculating the direction vector v0 of the barcode running trajectory based on the coordinate sequence Q0; obtaining the sequence Q1 of geometric center coordinates of the successfully decoded barcode within the time period [t1, t1 + T]; calculating the direction vector v1 of the barcode running trajectory based on the coordinate sequence Q1; calculating the included angle θ between the vectors v0 and v1, when θ is greater than the included angle threshold θ th , barcode reading is allowed, otherwise, continue; calculating the distance d between the geometric center points of the two successfully decoded barcodes at the moments t0 and t1, if d < min_dist, barcode reading of the current barcode is prohibited, otherwise, barcode reading is allowed.

[0067] Specifically, the moment t0 is less than the moment t1, and the time interval gap is equal to t1 - t0.

[0068] Further, there are n0 (n0 > 1) successfully recognized identical barcodes within the time period [t0 - T, t0], and there are n1 (n1 > 1) successfully recognized identical barcodes within the time period [t1, t1 + T].

[0069] Furthermore, the method of calculating v0 based on Q0 is to traverse all coordinate points in the sequence and obtain the two coordinate points A and B with the farthest distance, that is, to obtain Among them, t A <t B The calculation method based on v1 is the same as that based on v0.

[0070] Furthermore, both images at time t0 and t1 are decoded successfully; the angle threshold θ between vectors v0 and v1 is th The range is [θ min ,180), where θ is preferred min >45°.

[0071] As an example scenario, Figure 4 As shown, the barcode slides in from the left side of the barcode recognition platform, slides out from the right side, and then moves to the left until it slides out of the barcode recognition platform window; based on the successfully recognized barcodes 2, 3, and 4, the rightward barcode movement direction v0 can be obtained, and based on the successfully recognized barcodes 9, 10, and 11, the leftward barcode movement direction v1 can be obtained; because the angle between v0 and v1 is close to 180°, it can be seen that the barcode recognition platform prohibits the reading of barcode 9, but allows the reading of barcode 10 or barcode 11.

[0072] As another example, Figure 5 As shown, the barcode slides in from the left side of the barcode recognition platform and slides out from the right side. Then, the barcode returns to the left side of the barcode recognition platform and continues to slide in from the left side of the barcode recognition platform and slides out from the right side. According to the successfully recognized barcodes 2, 3, and 4, the rightward barcode movement direction v0 can be obtained. According to the successfully recognized barcodes 11, 12, and 13, the leftward barcode movement direction v1 can be obtained. The angle between v0 and v1 is close to 0°, but the distance between barcodes 4 and 11 is relatively far. Therefore, the barcode recognition platform allows barcode 11 to be read, but prohibits barcodes 12 and 13 from being read.

[0073] The delayed reading method of the same barcode based on the barcode motion trajectory of the embodiment of the present disclosure collects the i-th frame image, performs barcode recognition on the i-th frame image, and obtains the current barcode geometric center coordinates corresponding to the current decoding success moment when the recognition is successful, obtains the time interval between the current decoding success moment and the last decoding success moment when the recognition is successful, and judges whether the time interval is greater than a preset time interval threshold, obtains the first geometric center coordinate sequence of the barcode successfully decoded from the last decoding success moment minus the preset backtracking time length to the last decoding success moment, and calculates the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence, obtains the second geometric center coordinate sequence of the barcode successfully decoded from the current decoding success moment to the current decoding success moment plus the said backtracking time length, and calculates the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence, obtains the second geometric center coordinate sequence of the barcode successfully decoded from the current decoding success moment to the current decoding success moment plus the said backtracking time length, and calculates the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence, and calculates the second direction vector of the barcode successfully decoded from the current decoding success moment to the current decoding success moment The tag sequence calculates the second direction vector of the barcode's trajectory, calculates the direction angle between the first direction vector and the second direction vector, and when the direction angle is greater than a preset angle threshold, determines that the barcode is allowed to be read as a judgment result. When the direction angle is less than or equal to the angle threshold, obtains the geometric center coordinates of the previous barcode at the moment of the last successful decoding, calculates based on the geometric center coordinates of the current barcode and the geometric center coordinates of the previous barcode, and obtains the geometric center point spacing. When the geometric center point spacing is greater than or equal to the preset minimum moving distance, determines that the barcode is allowed to be read as a judgment result. When the geometric center point spacing is less than the minimum moving distance, determines that the barcode is prohibited from being read as a judgment result. When barcode recognition fails for the i-th frame image or the time interval is less than or equal to the time interval threshold, obtains the i+1-th frame image for barcode recognition. In this way, the probability of continuous reading of the barcode recognition platform under the same barcode delayed reading function can be effectively reduced, thereby improving the efficiency of product recognition.

[0074] In order to implement the above embodiments, the present disclosure further provides a device for delaying reading the same barcode based on the barcode motion trajectory. The device for delaying reading the same barcode based on the barcode motion trajectory can be implemented using software and / or hardware.

[0075] Figure 6 This is a schematic diagram of a structure of a barcode delayed reading device based on a barcode motion trajectory provided by an embodiment of the present disclosure, as shown in FIG. Figure 6 As shown, the delayed barcode reading device based on the barcode motion trajectory is applied to the memory monitoring system. The memory monitoring system includes a memory monitoring macro definition packaging layer, a memory management encapsulation function layer and a global memory block information storage structure. The device 60 includes: an acquisition module 601, an identification module 602, an acquisition module 603, a judgment module 604, a determination module 605 and an output module 606.

[0076] The acquisition module 601 is configured to acquire the i-th frame image, where i is a positive integer greater than 1.

[0077] The recognition module 602 is configured to perform barcode recognition on the i-th frame image.

[0078] The acquisition module 603 is used to acquire the time interval between the current decoding success moment and the last decoding success moment when the recognition is successful; wherein, the current decoding success moment and the last decoding success moment both successfully decode the same barcode.

[0079] The judgment module 604 is configured to judge whether the time interval is greater than a preset time interval threshold.

[0080] The determination module 605 is configured to determine whether barcode reading is allowed based on the barcode running trajectory when the time interval is greater than the time interval threshold, and obtain a determination result.

[0081] The output module 606 is configured to output the barcode recognition result when the determination result is that the barcode reading is allowed.

[0082] Optionally, the determination module 605 is specifically used to: obtain a first geometric center coordinate sequence of a barcode successfully decoded from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and calculate a first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence; obtain a second geometric center coordinate sequence of a barcode successfully decoded from the current successful decoding moment to the current successful decoding moment plus the backtracking time length, and calculate a second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence; calculate the direction angle between the first direction vector and the second direction vector, and when the direction angle is greater than a preset angle threshold, determine that the barcode is allowed to be read as the determination result.

[0083] In one embodiment, the judgment module 605 is further specifically used to: obtain the current barcode geometric center coordinates corresponding to the current decoding success moment when the recognition is successful; when the direction angle is less than or equal to the angle threshold, obtain the previous barcode geometric center coordinates at the previous decoding success moment; calculate based on the current barcode geometric center coordinates and the previous barcode geometric center coordinates to obtain the geometric center point spacing; when the geometric center point spacing is greater than or equal to the preset minimum moving distance, determine that the barcode is allowed to be read as the judgment result; when the geometric center point spacing is less than the minimum moving distance, determine that the barcode is prohibited from being read as the judgment result.

[0084] In one embodiment, the last successful decoding moment is less than the current successful decoding moment, and the current successful decoding moment minus the last successful decoding moment is equal to the time interval; the angle threshold is greater than or equal to forty-five degrees and less than one hundred and eighty degrees.

[0085] In one embodiment, there is at least one successfully identified identical barcode from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and there is at least one successfully identified identical barcode from the current successful decoding moment to the current successful decoding moment plus the backtracking time length.

[0086] In one embodiment, the determination module 605, when used to calculate the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence, includes: traversing all the first geometric center coordinate points of the first geometric center coordinate sequence, obtaining the two first geometric center coordinate points with the farthest distance, and performing calculation based on the two first geometric center coordinate points to obtain the first direction vector; the determination module 605, when used to calculate the first direction vector of the barcode running trajectory based on the second geometric center coordinate sequence, includes: traversing all the second geometric center coordinate points of the second geometric center coordinate sequence, obtaining the two second geometric center coordinate points with the farthest distance, and performing calculation based on the two second geometric center coordinate points to obtain the second direction vector.

[0087] In one embodiment, the acquisition module 601 is further configured to acquire the (i+1)th frame image for barcode recognition when barcode recognition on the i-th frame image fails or the time interval is less than or equal to the time interval threshold.

[0088] The apparatus for delayed barcode recognition based on barcode motion trajectory, applicable to a cloud server, provided in the embodiments of the present disclosure, can execute the method for delayed barcode recognition based on barcode motion trajectory, applicable to a cloud server, provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects. For matters not fully described in the embodiments of the apparatus of the present disclosure, reference can be made to the description of any method embodiment of the present disclosure.

[0089] An embodiment of the present disclosure also provides an electronic device including a processor and a memory; the processor calls a program or instruction stored in the memory to execute the steps of the aforementioned embodiments of the delayed barcode reading method based on the barcode motion trajectory. To avoid repeated description, they will not be repeated here.

[0090] The embodiments of the present disclosure also provide a computer-readable storage medium, which is non-transitory and stores programs or instructions. The programs or instructions enable a computer to execute the steps of the aforementioned embodiments of the delayed barcode reading method based on the barcode motion trajectory. To avoid repeated description, they will not be repeated here.

[0091] The embodiments of the present disclosure further provide a computer program product, which is used to execute the steps of the aforementioned embodiments of the method for delayed barcode reading based on barcode motion trajectory.

[0092] 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 comprising 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 comprising the element.

[0093] The foregoing description is intended only to provide 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 intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.

Claims

1. A method for delayed reading of the same barcode based on the barcode motion trajectory, characterized in that: The method comprises: Capture the i-th frame image; where i is a positive integer greater than 1; Performing barcode recognition on the i-th frame image, and when recognition is successful, obtaining a time interval between a current successful decoding moment and a previous successful decoding moment, and determining whether the time interval is greater than a preset time interval threshold; wherein the current successful decoding moment and the previous successful decoding moment both successfully decode the same barcode; When the time interval is greater than the time interval threshold, whether barcode reading is allowed is determined based on the barcode running trajectory, and a determination result is obtained. When the determination result is that the barcode reading is allowed, the barcode recognition result is output.

2. The method according to claim 1, characterized in that The determining whether barcode reading is allowed based on the barcode running trajectory and obtaining the determination result includes: Obtaining a first geometric center coordinate sequence of a barcode successfully decoded within the time period from the last successful decoding moment minus a preset backtracking time length to the last successful decoding moment, and calculating a first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence; Obtaining a second geometric center coordinate sequence of the barcodes successfully decoded from the current decoding success moment to the current decoding success moment plus the backtracking time length, and calculating a second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence; The direction angle between the first direction vector and the second direction vector is calculated, and when the direction angle is greater than a preset angle threshold, it is determined that the barcode reading is allowed as the determination result.

3. The method according to claim 2, characterized in that The method further comprises: When the recognition is successful, the geometric center coordinates of the current barcode corresponding to the current decoding success moment are obtained; When the direction angle is less than or equal to the angle threshold, obtaining the geometric center coordinates of the last barcode at the moment of the last successful decoding; Calculate based on the current barcode geometric center coordinates and the previous barcode geometric center coordinates to obtain the geometric center point distance; When the distance between the geometric center points is greater than or equal to a preset minimum movement distance, determining that the barcode is allowed to be read is used as the determination result; When the distance between the geometric center points is less than the minimum moving distance, it is determined that barcode reading is prohibited as the determination result.

4. The method according to claim 2, characterized in that The last successful decoding time is less than the current successful decoding time, and the current successful decoding time minus the last successful decoding time is equal to the time interval; The angle threshold is greater than or equal to forty-five degrees and less than one hundred and eighty degrees.

5. The method according to claim 2, characterized in that There is at least one identical barcode that has been successfully identified within the period from the last successful decoding moment minus the preset backtracking time length to the last successful decoding moment, and there is at least one identical barcode that has been successfully identified within the period from the current successful decoding moment to the current successful decoding moment plus the backtracking time length.

6. The method according to claim 2, characterized in that The calculating the first direction vector of the barcode running trajectory based on the first geometric center coordinate sequence includes: Traversing all first geometric center coordinate points in the first geometric center coordinate sequence, obtaining two first geometric center coordinate points that are farthest apart, and performing calculation based on the two first geometric center coordinate points to obtain the first direction vector; The calculating the second direction vector of the barcode running trajectory based on the second geometric center coordinate sequence includes: All second geometric center coordinate points in the second geometric center coordinate sequence are traversed to obtain two second geometric center coordinate points with the farthest distance, and calculation is performed based on the two second geometric center coordinate points to obtain the second direction vector.

7. The method according to claim 1, characterized in that The method further comprises: When barcode recognition fails on the i-th frame image or the time interval is less than or equal to the time interval threshold, the i+1-th frame image is obtained for barcode recognition.

8. A barcode delayed reading device based on barcode motion trajectory, characterized in that: The device comprises: An acquisition module, configured to acquire an i-th frame of image; wherein i is a positive integer greater than 1; A recognition module, configured to perform barcode recognition on the i-th frame image; An acquisition module, configured to acquire, when recognition is successful, a time interval between a current successful decoding moment and a previous successful decoding moment; wherein both the current successful decoding moment and the previous successful decoding moment successfully decode the same barcode; A judging module, configured to judge whether the time interval is greater than a preset time interval threshold; A determination module, configured to determine whether barcode reading is allowed based on the barcode running trajectory when the time interval is greater than the time interval threshold, and obtain a determination result; The output module is used to output the barcode recognition result when the determination result is that the barcode reading is allowed.

9. An electronic device, characterized in that: include: processor and memory; The processor is configured to execute the barcode delayed reading method based on barcode motion trajectory as described in any one of claims 1 to 7 by calling the program or instruction stored in the memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a program or instruction, and the program or instruction enables a computer to execute the same-barcode delayed reading method based on barcode motion trajectory as described in any one of claims 1 to 7.