Barcode detection method and device, electronic equipment and storage medium
By segmenting images and dynamically adjusting parameters on embedded devices, the problem of barcode detection for images with hundreds of millions of pixels on resource-constrained devices is solved, achieving efficient and accurate barcode region positioning and recognition, and adapting to high-precision detection in complex scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHANGHAI SMARTMORE TECH CO LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-05-29
AI Technical Summary
On resource-constrained embedded devices, existing technologies struggle to effectively process ultra-large images with hundreds of millions of pixels, resulting in barcode detection tasks for high-resolution images failing to execute or experiencing severe delays, thus failing to meet the demands for real-time and accurate target detection and recognition.
A block-based processing method is adopted to decompose the image into multiple sub-blocks. Candidate barcode regions are filtered by area overlap rate and location index. Valid barcode regions are determined by combining prediction confidence and confidence threshold. The processing parameter combination is dynamically adjusted during the detection process to achieve accurate positioning and recognition of barcode regions.
It significantly reduces computational load and memory consumption, enabling efficient and accurate barcode detection on computing-limited devices, ensuring high recall and high precision, adapting to the complexity of different image content and barcode distribution, and meeting the stable detection requirements of multi-target barcodes in high-resolution images.
Smart Images

Figure CN122113960A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of barcode detection and image processing technology, and in particular to a barcode detection method, apparatus, electronic device and storage medium. Background Technology
[0002] With the rapid development of computer vision and image processing technologies, high-resolution, ultra-large pixel image sensors are becoming increasingly common. The massive amounts of data generated by these sensors in various fields such as industrial inspection, intelligent security, autonomous driving, and logistics sorting place higher demands on real-time and accurate target detection and recognition algorithms. Currently, deep learning-based target detection methods have become mainstream. Their typical process usually requires directly loading the entire input image into a neural network model for end-to-end inference to output the target's category and location information.
[0003] However, this paradigm poses a significant challenge to the memory capacity and instantaneous computing power of computing devices when dealing with ultra-large images with hundreds of millions of pixels. Especially in resource-constrained applications such as industrial embedded devices, mobile terminals, or edge computing nodes, processor and memory resources are often insufficient to handle the loading of the entire ultra-high-resolution image and the direct inference of the full-image model, leading to detection tasks failing or experiencing severe delays. Therefore, a prominent contradiction exists in existing technologies: on the one hand, high-resolution images provide richer details, which is beneficial for improving the detection accuracy of small or densely packed targets; on the other hand, limited by hardware resources, directly applying deep learning detection frameworks suitable for conventional resolution images to ultra-large pixel images encounters insurmountable computational and memory bottlenecks, severely restricting the implementation and application of related technologies in high-precision scenarios. Summary of the Invention
[0004] Therefore, it is necessary to provide a barcode detection method, device, electronic device, computer-readable storage medium, and computer program product to address the above-mentioned technical problems. This product can effectively process ultra-large images with hundreds of millions of pixels on embedded devices with limited memory and computing power, such as industrial barcode readers, and achieve accurate positioning and recognition of multiple barcodes.
[0005] Firstly, this application provides a barcode detection method, including: Obtain the target image to be processed in the current iteration and the combination of processing parameters used; wherein the combination of processing parameters includes at least: block size parameter, repetition rate threshold and confidence threshold; The target image is divided into blocks using block size parameters to obtain at least two image sub-blocks and the position index of each image sub-block; Determine the area overlap rate between each image sub-block and the barcode region, and determine candidate barcode regions in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index; Determine the prediction confidence of candidate barcode regions as barcode regions, and determine the valid barcode regions among the candidate barcode regions based on all prediction confidence and confidence thresholds; If the total number of valid barcode areas is less than the expected number of barcodes, the iteration continues and the combination of processing parameters to be used in the next iteration is determined.
[0006] Secondly, this application provides a barcode detection device, comprising: The acquisition module is used to acquire the target image to be processed in the current iteration and the combination of processing parameters used; wherein the combination of processing parameters includes at least: block size parameter, repetition rate threshold and confidence threshold; The segmentation module is used to segment the target image into blocks using segmentation size parameters, to obtain at least two image sub-blocks and the position index of each image sub-block; The first determining module is used to determine the area overlap rate between each image sub-block and the barcode region, and to determine the candidate barcode region in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index. The second determining module is used to determine the prediction confidence of the candidate barcode region as a barcode region, and to determine the valid barcode region in the candidate barcode region based on all prediction confidence and confidence threshold; The third determining module is used to continue the iteration and determine the combination of processing parameters to be used in the next iteration if the total number of valid barcode areas is less than the expected number of barcodes.
[0007] Thirdly, this application provides a computer device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps in the method described above.
[0008] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method.
[0009] Fifthly, this application provides a computer program product comprising a computer program that, when executed by a processor, implements the steps of the method described above.
[0010] As can be seen, in this embodiment, by using block size parameters to segment the target image, a large image is decomposed into multiple image sub-blocks, significantly reducing the computational load and memory consumption required for a single inference, thus enabling the processing of ultra-high pixel images on embedded devices with limited computing power. By determining the area overlap rate between each image sub-block and the barcode region, and filtering candidate barcode regions based on the repetition rate threshold and position index, continuous and refined initial localization of the barcode region is achieved, avoiding the loss of details that may be caused by coarse binarization screening. Furthermore, by determining the prediction confidence of the candidate barcode region and filtering the effective barcode region based on the confidence threshold, the accuracy of the final detection result is improved. Especially when the total number of effective barcode regions is less than the expected number of barcodes, by triggering iteration and determining the processing parameter combination for the next iteration, the detection process is dynamically optimized, effectively dealing with the complexity of different image content and barcode distribution, maintaining high precision while ensuring high recall, and ultimately achieving stable and efficient detection of multiple target barcodes in high-resolution images under limited resources. Attached Figure Description
[0011] Figure 1 An application environment diagram of a barcode detection method provided in this application embodiment; Figure 2 A schematic flowchart of a barcode detection method provided in an embodiment of this application; Figure 3 A flowchart illustrating yet another barcode detection method provided in this application embodiment; Figure 4 A structural block diagram of a barcode detection device provided in an embodiment of this application; Figure 5 An internal structural diagram of a computer device provided in an embodiment of this application; Figure 6 An internal structural diagram of another computer device provided in an embodiment of this application; Figure 7 This is an internal structural diagram of a computer-readable storage medium provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0013] The barcode detection method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, terminal 102 communicates with server 104 via a communication network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104 or located on the cloud or other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart vehicle devices, and industrial barcode readers, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. Server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0014] like Figure 2 As shown, this application provides a barcode detection method, which is applied to... Figure 1 The method will be illustrated using terminal 102 or server 104 as examples. It is understood that the computer device may include at least one of a terminal and a server. The method includes the following steps: S210. Obtain the target image to be processed in the current iteration and the combination of processing parameters used; wherein the combination of processing parameters includes at least: block size parameter, repetition rate threshold and confidence threshold.
[0015] S220. The target image is divided into blocks using the block size parameter to obtain at least two image sub-blocks and the position index corresponding to each image sub-block.
[0016] S230. Determine the area overlap rate between each image sub-block and the barcode region, and determine the candidate barcode region in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index.
[0017] S240. Determine the prediction confidence of the candidate barcode region as the barcode region, and determine the valid barcode region in the candidate barcode region based on all prediction confidence and confidence threshold.
[0018] S250. If the total number of valid barcode areas is less than the expected number of barcodes, continue the iteration and determine the combination of processing parameters to be used in the next iteration.
[0019] The target image refers to the input image to be detected in the current iteration loop. The pixel size of the target image exceeds the single-processing capacity limit of the embedded device. The single-processing capacity limit is determined by the available memory capacity and computing power of the embedded device. The pixel size of the target image can be represented by the product of the image height and the image width. In other words, the target image is an image that cannot be directly and completely loaded into the resource-constrained memory of the embedded device for overall processing.
[0020] Along with the target image, the expected number of barcodes corresponding to the target image is provided as a reference benchmark for detecting completeness. The barcode region refers to the continuous pixel area in the target image defined by the actual boundary of the barcode graphic. The barcode graphic can be a one-dimensional barcode or a two-dimensional barcode.
[0021] The processing parameter combination refers to a set of adjustable parameters that control a single detection process, including at least: block size parameter, repetition rate threshold, and confidence threshold. The processing parameter combination collectively determines the detection granularity and rigor of this iteration. Specifically, the block size parameter defines the width and height of each image sub-block when dividing the image into a grid; the repetition rate threshold is a preset threshold value used to initially identify potentially barcode regions based on the area overlap rate of local image regions; and the confidence threshold is a predicted confidence threshold value used in fine-tuning to determine whether a candidate barcode region is a genuine barcode. The initial values of each parameter in the processing parameter combination are not limited here and are determined based on actual business needs. For example, the block size parameter is determined based on the image size (M, N) of the target image and the maximum size (x, y) supported by the chip on the embedded device. For example, the block size parameter is represented as (m, n), where m = max(M / 100, ... x ), n = max(N / 100, y (); where M, x, and m represent image length, and N, y, and n represent image width. For example, both the repetition rate threshold and the confidence threshold can be set to 0.8. It should be noted that there is no necessary relative relationship between the values of the repetition rate threshold and the confidence threshold; the values mentioned above are for illustrative purposes only and do not impose any limitations on their values. Optionally, the processing parameter combination also includes a search distance parameter; for example, the initial value of the search distance parameter can be 100.
[0022] The complete target image is divided into several non-overlapping or partially overlapping rectangular image sub-blocks based on the block size parameters. Optionally, the target image is uniformly divided into blocks, each with a size of m×n. If the remaining size after segmentation is less than m or n, the remaining size is used. This transforms large-pixel images that cannot be processed as a whole in one go into a series of small units that are easy for computing devices to process, thereby significantly reducing the peak memory and computing power requirements of a single inference. The location index refers to the coordinate information used to identify the spatial position of each image sub-block in the original target image. Its function is to ensure that the sub-block-level analysis results can be accurately mapped back to the original image coordinate space in subsequent steps.
[0023] The area overlap rate between each image sub-block and the barcode region is obtained by calculating the ratio of the area of the intersection between each image sub-block and the barcode region to the total area of the image sub-block itself. The resulting area overlap rate is a continuous value between 0 and 1. The area overlap rate quantifies the probability that the image sub-block belongs to the barcode region. Optionally, a pre-trained barcode region detection model can be used to determine the area overlap rate of each image sub-block.
[0024] Optionally, after determining the area overlap rate of each image sub-block, an image sub-block with an area overlap rate greater than the repetition rate threshold is selected. Then, based on the position index of these image sub-blocks, adjacent or similar blocks in the original image are aggregated to form several connected candidate barcode regions that may contain barcodes. Optionally, whether two image sub-blocks are adjacent or similar in the original image is determined by judging that the difference between their position indices in both rows and columns does not exceed a preset value. The preset value is not limited here and is determined according to actual business needs. For example, the preset value can be 100. Optionally, a pre-trained barcode recognition model is used to determine the prediction confidence of the candidate barcode region as a barcode region. The prediction confidence is the probability score that the candidate barcode region is a real barcode. Each candidate barcode region is associated with a corresponding prediction confidence. Optionally, candidate barcode regions with prediction confidence higher than the confidence threshold are ultimately determined as valid barcode regions.
[0025] After the valid barcode regions are determined, they are counted to obtain the total number of valid barcode regions. This total number is compared to the expected number of barcodes to determine if the current iteration has detected all barcode regions included in the target image. If the total number of valid barcode regions is less than the expected number of barcodes, it indicates that some barcode regions in the target image have not been successfully detected in the current iteration, suggesting that the current processing parameter combination may not be suitable for the specific features of the image. In this case, iteration needs to continue, and the processing parameter combination to be used in the next iteration needs to be determined. For example, the block size may be adjusted to capture smaller targets, or the threshold may be lowered to improve recall. Optionally, the processing parameter combination may also include a search distance parameter; when determining the processing parameter combination for the next iteration, all parameter dimensions included in the processing parameter combination need to be considered. If the total number of valid barcode regions equals the expected number of barcodes, it means that all barcode regions in the target image have been successfully detected in the current iteration, and the iteration can end.
[0026] Optionally, the following supplementary rules can be used to determine whether to proceed with the next iteration or to stop the iteration. These supplementary rules can be set by the user, for example: if the total number of valid barcode areas does not change after multiple consecutive iterations, the iteration is stopped; if the total number of valid barcode areas shows an upward trend but does not reach the expected number of barcodes, the adjustment needs to continue; if the number of iterations exceeds the set number of iterations, the iteration is stopped.
[0027] As can be seen, in this embodiment, by using block size parameters to segment the target image, a large image is decomposed into multiple image sub-blocks, significantly reducing the computational load and memory consumption required for a single inference, thus enabling the processing of ultra-high pixel images on embedded devices with limited computing power. By determining the area overlap rate between each image sub-block and the barcode region, and filtering candidate barcode regions based on the repetition rate threshold and position index, continuous and refined initial localization of the barcode region is achieved, avoiding the loss of details that may be caused by coarse binarization screening. Furthermore, by determining the prediction confidence of the candidate barcode region and filtering the effective barcode region based on the confidence threshold, the accuracy of the final detection result is improved. Especially when the total number of effective barcode regions is less than the expected number of barcodes, by triggering iteration and determining the processing parameter combination for the next iteration, the detection process is dynamically optimized, effectively dealing with the complexity of different image content and barcode distribution, maintaining high precision while ensuring high recall, and ultimately achieving stable and efficient detection of multiple target barcodes in high-resolution images under limited resources.
[0028] In some embodiments, determining the area overlap rate between each image sub-block and the barcode region includes: Each image sub-block is input into the barcode detection model, and the barcode detection model outputs the area overlap rate between each image sub-block and the barcode area. Among them, the barcode area detection model is a regression model pre-trained using supervised learning. The training samples of the barcode area detection model are sample image sub-blocks obtained by dividing the sample image containing the barcode area into blocks using various preset sizes. The sample label corresponding to the training sample is the area overlap rate between the sample image sub-block and the barcode area in the sample image.
[0029] The barcode region detection model is a deep learning model specifically designed to evaluate the probability of barcode regions being contained within image sub-blocks. It is designed as a regression model because its task is to predict the area overlap rate, which is a continuous value between 0 and 1, rather than performing discrete classification. The barcode region detection model is pre-trained using supervised learning, having already learned the mapping relationship from image sub-block pixel features to area overlap rate values, thus possessing reliable area overlap rate prediction capabilities. The specific structure of the barcode region detection model is not limited here; it should be determined based on actual business needs.
[0030] Using area overlap rate instead of binary yes / no labels is intended to provide refined and measurable confidence information. This enables the code region detection model to distinguish between various cases such as complete coverage, partial coverage, and no coverage, laying the foundation for subsequent flexible filtering based on repetition rate thresholds and the generation of smooth overlap rate distribution maps. It avoids the loss of boundary information and simplistic subsequent processing issues that may result from binarization judgment.
[0031] Training samples refer to the data used to train the barcode detection model, specifically in the form of sample image patches. These sample image patches are obtained by dividing sample images containing barcode regions into blocks using multiple preset sizes. Using multiple preset sizes for block division not only ensures the barcode detection model has scale invariance to cope with changes in the physical size of barcodes in natural scenes, but also provides a forward-looking adaptation for the iterative optimization mechanism. In the iterative optimization mechanism, the combination of processing parameters may be adjusted in different iterations, potentially involving changes in the block size parameter. This means that the actual size of the image patches input to the barcode detection model may be different and not fixed in different iterations. By actively using multiple preset sizes to generate diverse training samples during the training phase, the barcode detection model can be forced to learn and adapt to this input size variation within the training cycle. This ensures that regardless of the specific value of the block size parameter used in the current iteration, the barcode detection model has encountered inputs of similar sizes in any actual detection iteration, thus maintaining stable and accurate area overlap prediction performance.
[0032] Here, the sample label refers to the ground truth area overlap rate corresponding to each training sample, i.e., a sub-block of the sample image. During training, the code region detection model calculates the error and adjusts its parameters by continuously comparing its predicted area overlap rate with this true sample label, ultimately learning to make accurate predictions.
[0033] As can be seen, in this embodiment, the barcode region detection model can output continuous area overlap rate values, providing a fine and accurate quantitative basis for subsequent screening based on repetition rate thresholds, thereby improving the accuracy of initial barcode region localization. Secondly, training the model using samples obtained from blocks of various preset sizes gives it excellent scale invariance, ensuring that the barcode region detection model maintains stable predictions regardless of changes in block size parameters during actual iterations, enhancing the adaptability and robustness of the barcode detection method. Finally, using the pre-trained barcode region detection model for sub-block-level evaluation transforms complex region analysis into efficient forward inference, significantly improving overall processing efficiency while maintaining high accuracy.
[0034] In some embodiments, determining the predicted confidence level of a candidate barcode region as a barcode region, and determining a valid barcode region among the candidate barcode regions based on all predicted confidence levels and a confidence threshold, includes: Input the candidate barcode region into the barcode recognition model, and output the prediction confidence that the candidate barcode region is a barcode region through the barcode recognition model; If the prediction confidence level is greater than the confidence level threshold, the candidate barcode region is determined as a valid barcode region. The barcode recognition model is a classification model pre-trained using supervised learning. The training samples for the barcode recognition model are barcode region images and background region images cropped from sample images containing barcode regions. The barcode region image contains a complete barcode region, and its corresponding sample label is a positive sample. The background region image does not contain a complete barcode region, and its corresponding sample label is a negative sample.
[0035] The barcode recognition model is designed as a classification model. Its task is to make an overall judgment on the input candidate barcode regions and output a prediction confidence score between 0 and 1 to quantify how credible the candidate barcode region is a genuine barcode. A confidence threshold, as a discrimination limit, is preset for making the final decision. A candidate barcode region will be ultimately determined as a valid barcode region only if its prediction confidence score is greater than this confidence threshold.
[0036] An independent barcode recognition model is introduced to refine the candidate barcode regions generated in the initial screening, forming a two-stage core architecture that combines initial screening localization with refined screening identification, aiming to balance high recall and high precision. This is because the initial screening process, in order to capture as many potential barcodes as possible, often introduces some background interference regions such as textures and text, i.e., false positives. The role of the barcode recognition model is specifically to solve this false positive problem. To train the barcode recognition model to have strong discrimination capabilities, its training samples are carefully constructed into a set containing two distinct categories of samples: barcode region images and background region images. The barcode region image is a partial image containing a complete barcode cropped from the sample image, and its sample label is positive; the background region image is a cropped area from the sample image that does not contain a complete barcode but may be misclassified, and its sample label is negative. By allowing the barcode recognition model to be exposed to and learn to distinguish between real barcode features and diverse background interference features during training, the barcode recognition model acquires refined discrimination capabilities. Therefore, in the inference stage, the barcode recognition model can effectively filter out false targets introduced in the initial screening, retaining only high-confidence valid barcode regions.
[0037] In actual implementation, considering that the size of the candidate barcode region may still be larger than the maximum size supported by the chip on the embedded device, and that when determining whether a candidate barcode region is a real barcode, even if the image is appropriately reduced, the high-density image features of the barcode can still be preserved without affecting the accuracy of the judgment, the following processing is performed: Orientation correction or rotation normalization is performed on each candidate barcode region; then the size is scaled to the input size (u, v) required by the barcode recognition model, where u is less than or equal to... x v is less than or equal to y; then, brightness and contrast are standardized.
[0038] As can be seen, in this embodiment, by introducing a pre-trained barcode recognition model to perform secondary fine-tuning of candidate barcode regions, background interference regions introduced in the initial screening stage to pursue high recall can be effectively filtered out. This significantly improves the accuracy of the final effective barcode regions while maintaining high recall. Secondly, the barcode recognition model is trained in a supervised manner using positive samples (barcode region images) and negative samples (background region images) extracted from sample images. This allows the barcode recognition model to directly learn discriminative features that distinguish real barcodes from various complex backgrounds, significantly enhancing the model's discrimination ability in real-world complex scenarios and the overall system's robustness. Finally, the pre-trained model is used for forward inference, transforming the complex identification task into an efficient single computation. This ensures high identification accuracy while meeting the stringent speed requirements of embedded or real-time processing scenarios.
[0039] In some embodiments, determining the combination of processing parameters to be used in the next iteration includes: Based on the location index corresponding to the valid barcode region, the position of the valid barcode region in the target image and the area overlap rate of the valid barcode region are determined. The combination of the location of the valid barcode region in the target image, the area overlap rate of the valid barcode region, the total number of valid barcodes, and the processing parameters used in the current iteration is input into the parameter prediction model. The parameter prediction model outputs the combination of processing parameters to be used in the next iteration; where the parameter prediction model is a sequence prediction model built based on a long short-term memory network.
[0040] The location index of a valid barcode region uniquely identifies its position in the original target image; it is typically the coordinates of a corner of the region's bounding rectangle or its index range within the image's tile grid. The area overlap rate of a valid barcode region is the aggregated value (e.g., the mean) of the predicted area overlap rates of all image sub-blocks covered by that region, quantifying the initial confidence level of that region as a barcode. The total number of valid barcodes refers to the number of valid barcode regions ultimately confirmed in the current iteration. The combination of processing parameters used in the current iteration includes the tile size parameter, repetition rate threshold, and confidence threshold actually used in this detection loop.
[0041] The parametric prediction model is a sequence prediction model built upon a Long Short-Term Memory (LSTM) network. LSM is a special type of recurrent neural network whose internal gating mechanism effectively captures and processes long-term dependencies in long sequences of data, making it suitable for learning the impact of historical state sequences on future decisions. The parametric prediction model is trained to predict the combination of processing parameters to be used in the next iteration based on the historical state sequence.
[0042] A historical state sequence refers to the sequence of state features from previous iterations. It's a time series containing state feature vectors from the most recent iterations, recording the dynamic process of parameter adjustment and result evolution. The state feature vectors characterize the quality of the result and the strategy used in a given iteration. They integrate the location of the valid barcode region in the target image, the area overlap rate of the valid barcode region, the total number of valid barcodes, and the combination of processing parameters used in the current iteration. The historical state sequence is used as input to the trained parameter prediction model. The model analyzes the state feature sequence from previous iterations and directly outputs a new set of predicted parameter values that optimize the next detection result—the combination of processing parameters to be used in the next iteration.
[0043] The location of the valid barcode area reflects the spatial distribution characteristics of the barcode, directly determining whether the block size parameter should be increased or decreased in the next iteration. The distribution of the area overlap rate corresponding to the valid barcode area, such as the average value or variance, reflects the strictness of the initial screening results. If it is generally low, it indicates that the repetition rate threshold may be set too high and needs to be lowered to capture more potential areas. The difference between the total number of valid barcodes and the expected number of barcodes is the most direct indicator for triggering iteration and measuring the effectiveness of the current parameter combination, and is the core signal driving parameter adjustment. Using the processing parameter combination used in the current iteration as input allows the parameter prediction model to clearly understand the reasons for the current results, thereby learning what detection state occurred under what parameter configuration, and how to adjust the parameters accordingly.
[0044] To ensure the practicality of the parameter prediction model, its training must be completed through supervised learning. Optionally, historical state sequences from multiple iterations are paired with processing parameter combinations that actually improve detection performance in subsequent iterations to form training samples. The parameter prediction model learns the mapping relationship from historical state sequences to corresponding optimal parameter combinations based on a long short-term memory network. The trained parameter prediction model can be deployed in an embedded device. After each iteration in the inference phase, the state feature vector generated in this iteration is input into the trained parameter prediction model. The parameter prediction model can output the recommended processing parameter combination for the next iteration through a single forward computation, thereby achieving closed-loop adaptive optimization.
[0045] As can be seen, in this embodiment, the parameter prediction model built on a long short-term memory network infers a better combination of processing parameters for the next iteration based on the position, area overlap rate, total number of valid barcodes, and current processing parameter combination of the valid barcode region in the current iteration. This allows for intelligent and dynamic adjustment of the processing parameter combination based on real-time detection feedback, overcoming the problem of poor adaptability of fixed parameter combinations to different image content. Through this closed-loop optimization, the scanning granularity and discrimination criteria can be autonomously improved in subsequent iterations, effectively enhancing the recall capability for missed barcodes and maintaining high detection accuracy. Ultimately, this achieves stable, robust, and adaptive barcode detection for ultra-high pixel images in diverse and complex scenarios without human intervention.
[0046] Figure 3 This is a flowchart illustrating another barcode detection method provided in this application. This embodiment further optimizes the above embodiments. The method includes: S310. Obtain the target image to be processed in the current iteration and the combination of processing parameters used; wherein the combination of processing parameters includes at least: block size parameter, repetition rate threshold and confidence threshold.
[0047] S320. The target image is divided into blocks using the block size parameter to obtain at least two image sub-blocks and the position index corresponding to each image sub-block.
[0048] S330. Determine the area overlap rate between each image sub-block and the barcode area, and generate an overlap rate distribution map corresponding to the target image based on the area overlap rate and position index of each image sub-block.
[0049] Optionally, a two-dimensional matrix is created based on the grid layout of all image sub-blocks. The area overlap rate value of each image sub-block is then filled into the corresponding position in the matrix according to its location index, thus forming a numerical matrix, which is the overlap rate distribution map. The overlap rate distribution map spatially structures the discrete, block-like evaluation results, restoring and preserving the relative positional relationships between image sub-blocks.
[0050] S340. Based on the area overlap rate and repetition rate threshold, determine the hotspot areas in the overlap rate distribution map.
[0051] Optionally, the area overlap rate (ACR) of each location in the overlap rate distribution map is compared with a repetition rate threshold. Locations with an ACR greater than the repetition rate threshold are marked as valid locations. Subsequently, a connected component analysis algorithm is applied to aggregate these spatially adjacent valid locations, with each connected set of locations forming a hotspot region. The repetition rate threshold here plays a role in controlling sensitivity, also known as recall: a lower repetition rate threshold means more low-confidence regions are included, resulting in a high recall rate but potentially introducing noise; a higher repetition rate threshold results in a cleaner region but may lead to breaks or omissions.
[0052] S350. Based on the location index corresponding to the hotspot area, determine the candidate barcode area in the target image.
[0053] For each hotspot region found in the overlap rate distribution map, obtain the position coordinates of all positions constituting the hotspot region in the overlap rate distribution map, i.e., the position index of the image sub-block. Based on these position indices and the known block size parameters, calculate the range of pixel coordinates covered by the hotspot region in the original target image. This region defined by the pixel coordinates of the original target image is the candidate barcode region.
[0054] S360. Determine the prediction confidence of the candidate barcode region as the barcode region, and determine the valid barcode region in the candidate barcode region based on all prediction confidence and confidence thresholds.
[0055] S370. If the total number of valid barcode areas is less than the expected number of barcodes, continue the iteration and determine the combination of processing parameters to be used in the next iteration.
[0056] As can be seen, in this embodiment, determining candidate barcode regions by generating an overlap rate distribution map, extracting hotspot regions, and mapping them back to the original target image yields significant benefits. First, an overlap rate distribution map is generated based on the area overlap rate and location index of each image sub-block, transforming discrete evaluation results into a continuous spatial probability distribution, providing a structured and complete intermediate representation for subsequent processing. Second, hotspot regions are determined in the overlap rate distribution map based on the area overlap rate and repetition rate threshold. Accurate and efficient extraction from probability density to hotspot regions is achieved through threshold segmentation and spatial aggregation. Finally, candidate barcode regions are located in the target image based on the location index of the hotspot regions, ensuring pixel-level positioning accuracy of the candidate barcode regions. This embodiment significantly improves the continuity, accuracy, and overall processing efficiency of barcode region extraction by introducing the overlap rate distribution map as a key data structure.
[0057] In some embodiments, determining candidate barcode regions in the target image based on the location index corresponding to the hotspot region includes: By using the search distance parameter in the processing parameter combination, the connected components corresponding to the hotspot regions are aggregated to obtain the hotspot aggregation result; Determine the minimum bounding rectangle of the hotspot aggregation result, and determine the candidate barcode region in the target image based on the position index covered by the minimum bounding rectangle.
[0058] In this context, hotspot areas refer to connected regions in the overlap rate distribution map where the area overlap rate exceeds the repetition rate threshold and the pixels are spatially connected; these represent the potential core parts of the barcode area. The search distance parameter is an adjustable variable in the combination of processing parameters, defining the maximum allowed pixel or sub-block spacing distance when aggregating connected components.
[0059] Considering that uneven lighting, occlusion, or threshold segmentation may cause a complete barcode to correspond to multiple discrete hotspot areas, direct use would result in missed detections or fragmented areas. By introducing a search distance parameter, spatially adjacent discrete responses are re-fused into a whole, effectively overcoming the over-segmentation problem and ensuring that each barcode corresponds to a complete aggregated area. This aggregation result is called the hotspot aggregation result.
[0060] The minimum bounding rectangle is the smallest rectangle whose edges are parallel to the image coordinate axes and can completely enclose all pixels in the hotspot aggregation result. For each hotspot aggregation result, the boundary of all its pixels in the target image coordinate system is calculated, defining a rectangular region, which is the minimum bounding rectangle of the hotspot aggregation result. Then, based on the position index covered by the minimum bounding rectangle, the pixel region covered by it is calculated in the original target image; this region is the final candidate barcode region. The minimum bounding rectangle provides a geometric description method for normalizing and standardizing irregular aggregation regions. On the one hand, it extracts the precise location and extent of the region; on the other hand, its regular rectangular shape greatly facilitates subsequent steps such as cropping candidate barcode regions from the target image for unified processing. Through the transformation from aggregation region to minimum bounding rectangle, the output is an accurately located and regularly shaped candidate barcode region, providing high-quality input for subsequent fine-grained recognition.
[0061] As can be seen, the core design of the search distance parameter used in this embodiment lies in dynamically balancing the need to ensure integrity and avoid erroneous merging of adjacent different barcodes when aggregating broken areas based on the actual size and distribution of the barcode region. By aggregating discrete hotspot regions, the problem of broken responses in the same barcode region caused by image noise, uneven illumination, or threshold segmentation is effectively overcome. Spatially adjacent discrete parts are fused into complete hotspot aggregation results, thereby significantly improving the recall rate of complete barcode regions. At the same time, the risk of erroneous merging is effectively controlled, reducing the number of false alarms caused by over-segmentation and erroneous merging. By calculating the minimum bounding rectangle of the hotspot aggregation results, potentially irregular aggregation regions are transformed into regular rectangular representations. This achieves accurate and compact positioning of candidate barcode regions, and the standardized rectangular shape greatly facilitates the unified processing of subsequent steps, improving the efficiency and stability of the entire process. The combination of these two operations ensures the integrity, accuracy, and practicality of candidate barcode region extraction, enhancing the robustness of the system in complex scenarios.
[0062] In some embodiments, the search distance parameter in the processing parameter combination is used to aggregate the connected components corresponding to the hotspot regions to obtain hotspot aggregation results, including: The connected components corresponding to the hotspot regions are taken as hotspot connected components, and the relative distance between any two hotspot connected components is determined. Hotspot connected components whose relative distance is less than or equal to the search distance parameter are aggregated to obtain hotspot aggregation results.
[0063] Here, a hotspot connected region refers to the connected region corresponding to a hotspot area. A hotspot connected region is an independent region found through connected region analysis in the overlap rate distribution map, consisting of adjacent pixels whose area overlap rate all exceeds the overlap rate threshold. Each hotspot connected region represents a local response fragment of the barcode. The search distance parameter defines the maximum allowed interval for determining whether two hotspot connected regions belong to the same target during the aggregation operation.
[0064] Relative distance refers to a spatial measure of the separation between any two hotspot connected components. Optionally, it can be calculated as the minimum Euclidean distance between the boundaries of two hotspot connected components, the Euclidean distance between the centroids of the two hotspot connected components, or the distance between the centers of their circumscribed rectangles. Relative distance is used to quantify the degree of spatial separation between two hotspot connected components. Aggregation here refers to the operation of merging multiple independent hotspot connected components into a single hotspot aggregation result. The hotspot aggregation result is a new connected region formed after the aggregation operation, containing all pixels of the original one or more hotspot connected components.
[0065] Based on the prior knowledge that response fragments belonging to the same physical target should be sufficiently close in space, a search distance parameter is introduced. This parameter is compared with the relative distance between all pairs of hotspot connected components. All connected components with a relative distance less than or equal to this parameter are merged. Spatially adjacent fragments are intelligently reorganized into complete object responses, resulting in hotspot aggregation.
[0066] As can be seen, in this embodiment, by introducing a search distance parameter to aggregate hotspot connected components based on relative distance, the over-segmentation problem in barcode detection is directly solved and the system adaptability is improved. First, by calculating the relative distance between any two hotspot connected components, a quantitative basis for judging spatial proximity is provided. Second, connected components with a relative distance less than or equal to the search distance parameter are aggregated to generate a complete hotspot aggregation result, effectively compensating for response breaks in the same barcode region caused by image interference, and significantly improving the completeness of region extraction. Crucially, the search distance parameter, as an adjustable variable, allows for flexible adjustment of the merging tolerance according to different scenarios. While ensuring correct merging of adjacent fragments, it avoids erroneous merging between different barcodes, thereby greatly enhancing the robustness and scenario adaptability of the method, laying a reliable foundation for subsequently generating accurate candidate barcode regions.
[0067] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps.
[0068] Based on the same inventive concept, this application also provides a barcode detection device. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more barcode detection device embodiments provided below can be found in the limitations of the barcode detection method above, and will not be repeated here.
[0069] like Figure 4 As shown, this application embodiment provides a barcode detection device 400, including: The acquisition module 410 is used to acquire the target image to be processed in the current iteration and the combination of processing parameters used; wherein the combination of processing parameters includes at least: block size parameter, repetition rate threshold and confidence threshold; Blocking module 420 is used to divide the target image into blocks using block size parameters to obtain at least two image sub-blocks and the position index of each image sub-block; The first determining module 430 is used to determine the area overlap rate between each image sub-block and the barcode region, and to determine the candidate barcode region in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block and the position index. The second determining module 440 is used to determine the prediction confidence of the candidate barcode region as a barcode region, and to determine the valid barcode region in the candidate barcode region based on all prediction confidence and confidence threshold; The third determining module 450 is used to continue the iteration and determine the combination of processing parameters to be used in the next iteration if the total number of valid barcode areas is less than the expected number of barcodes.
[0070] In some embodiments, the first determining module 430 includes: The distribution map generation submodule is used to generate an overlap rate distribution map corresponding to the target image based on the area overlap rate and position index of each image sub-block; The hotspot region determination submodule is used to determine hotspot regions in the overlap rate distribution map based on the area overlap rate and repetition rate threshold. The candidate barcode region determination submodule is used to determine candidate barcode regions in the target image based on the location index corresponding to the hotspot region.
[0071] In some embodiments, the candidate code region determination submodule includes: The hotspot region aggregation unit is used to aggregate the connected components corresponding to hotspot regions using the search distance parameter in the processing parameter combination to obtain the hotspot aggregation result; The candidate barcode region determination unit is used to determine the minimum bounding rectangle of the hotspot aggregation result and to determine the candidate barcode region in the target image based on the position index covered by the minimum bounding rectangle.
[0072] In some embodiments, in a process of aggregating connected components corresponding to hotspot regions using the search distance parameter in the processing parameter combination to obtain hotspot aggregation results, the hotspot region aggregation unit is specifically used for: The connected components corresponding to the hotspot regions are taken as hotspot connected components, and the relative distance between any two hotspot connected components is determined. Hotspot connected components whose relative distance is less than or equal to the search distance parameter are aggregated to obtain hotspot aggregation results.
[0073] In some embodiments, the first determining module 430 is specifically configured to: determine the area overlap rate between each image sub-block and the barcode region. Each image sub-block is input into the barcode detection model, and the barcode detection model outputs the area overlap rate between each image sub-block and the barcode area. Among them, the barcode area detection model is a regression model pre-trained using supervised learning. The training samples of the barcode area detection model are sample image sub-blocks obtained by dividing the sample image containing the barcode area into blocks using various preset sizes. The sample label corresponding to the training sample is the area overlap rate between the sample image sub-block and the barcode area in the sample image.
[0074] In some embodiments, the second determining module 440 is specifically configured to: determine the prediction confidence of a candidate barcode region as a barcode region, and determine a valid barcode region among the candidate barcode regions based on all prediction confidences and confidence thresholds; Input the candidate barcode region into the barcode recognition model, and output the prediction confidence that the candidate barcode region is a barcode region through the barcode recognition model; If the prediction confidence level is greater than the confidence level threshold, the candidate barcode region is determined as a valid barcode region. The barcode recognition model is a classification model pre-trained using supervised learning. The training samples for the barcode recognition model are barcode region images and background region images cropped from sample images containing barcode regions. The barcode region image contains a complete barcode region, and its corresponding sample label is a positive sample. The background region image does not contain a complete barcode region, and its corresponding sample label is a negative sample.
[0075] In some embodiments, the third determining module 450 is specifically configured to: determine the combination of processing parameters to be used in the next iteration. Based on the location index corresponding to the valid barcode region, the position of the valid barcode region in the target image and the area overlap rate of the valid barcode region are determined. The combination of the location of the valid barcode region in the target image, the area overlap rate of the valid barcode region, the total number of valid barcodes, and the processing parameters used in the current iteration is input into the parameter prediction model. The parameter prediction model outputs the combination of processing parameters to be used in the next iteration; where the parameter prediction model is a sequence prediction model built based on a long short-term memory network.
[0076] Each module in the aforementioned barcode detection device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device in hardware form, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0077] In some embodiments, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, this computer device includes a processor, memory, input / output interfaces (I / O), and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data related to the barcode detection method. The I / O interfaces are used for information exchange between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements the steps of the aforementioned barcode detection method.
[0078] In some embodiments, a computer device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown, the computer device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements the steps in the barcode detection method described above. The display unit is used to form a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen; the input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs or touchpads set on the casing of the computer device, or external keyboards, touchpads or mice, etc.
[0079] Those skilled in the art will understand that Figure 5 or Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0080] In some embodiments, a computer device is provided, the computer device including a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement the steps in the above method embodiments.
[0081] In some embodiments, such as Figure 7 The diagram shows the internal structure of a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the above-described method embodiments.
[0082] In some embodiments, a computer program product is provided, which includes a computer program that, when executed by a processor, implements the steps in the above method embodiments.
[0083] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0084] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0085] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0086] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A barcode detection method, characterized in that, include: Obtain the target image to be processed in the current iteration and the combination of processing parameters used; The combination of processing parameters includes at least: block size parameter, repetition rate threshold, and confidence threshold; The target image is divided into blocks using the block size parameters to obtain at least two image sub-blocks and the position index of each image sub-block; Determine the area overlap rate between each image sub-block and the barcode region, and determine the candidate barcode region in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index; Determine the predicted confidence level of the candidate barcode region as a barcode region, and determine the valid barcode region in the candidate barcode region based on all the predicted confidence levels and the confidence threshold; If the total number of valid barcode areas is less than the expected number of barcodes, the iteration continues and the combination of processing parameters to be used in the next iteration is determined.
2. The method according to claim 1, characterized in that, The step of determining candidate barcode regions in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index includes: Based on the area overlap rate and position index of each image sub-block, an overlap rate distribution map corresponding to the target image is generated. Based on the area overlap rate and the repetition rate threshold, hotspot areas are determined in the overlap rate distribution map; Based on the location index corresponding to the hotspot area, the candidate barcode area is determined in the target image.
3. The method according to claim 2, characterized in that, The step of determining the candidate barcode region in the target image based on the location index corresponding to the hotspot region includes: Using the search distance parameter in the processing parameter combination, the connected components corresponding to the hotspot region are aggregated to obtain the hotspot aggregation result; The minimum bounding rectangle of the hotspot aggregation result is determined, and the candidate barcode region is determined in the target image based on the position index covered by the minimum bounding rectangle.
4. The method according to claim 3, characterized in that, The step of aggregating the connected components corresponding to the hotspot regions using the search distance parameter in the processing parameter combination to obtain hotspot aggregation results includes: The connected components corresponding to the hotspot regions are taken as hotspot connected components, and the relative distance between any two hotspot connected components is determined. The hotspot connected components whose relative distance is less than or equal to the search distance parameter are aggregated to obtain the hotspot aggregation result.
5. The method according to claim 1, characterized in that, Determining the area overlap rate between each image sub-block and the barcode region includes: Each image sub-block is input into the barcode area detection model, and the area overlap rate between each image sub-block and the barcode area is output by the barcode area detection model. The code area detection model is a regression model pre-trained using supervised learning. The training samples of the code area detection model are sample image sub-blocks obtained by dividing a sample image containing a barcode area into blocks using multiple preset sizes. The sample label corresponding to the training sample is the area overlap rate between the sample image sub-block and the barcode area in the sample image.
6. The method according to claim 1, characterized in that, The step of determining the prediction confidence level of the candidate barcode region as a barcode region, and determining the valid barcode region in the candidate barcode region based on all the prediction confidence levels and the confidence threshold, includes: The candidate barcode region is input into the barcode recognition model, and the barcode recognition model outputs the prediction confidence that the candidate barcode region is a barcode region. If the prediction confidence level is greater than the confidence level threshold, then the candidate barcode region is determined as the valid barcode region; The barcode recognition model is a classification model pre-trained using supervised learning. The training samples for the barcode recognition model are barcode region images and background region images cropped from sample images containing barcode regions. The barcode region images contain complete barcode regions, and their corresponding sample labels are positive samples. The background region images do not contain complete barcode regions, and their corresponding sample labels are negative samples.
7. The method according to claim 1, characterized in that, The determination of the processing parameter combination to be used in the next iteration includes: Based on the location index corresponding to the valid barcode region, the position of the valid barcode region in the target image and the area overlap rate corresponding to the valid barcode region are determined. The position of the valid barcode region in the target image, the area overlap rate corresponding to the valid barcode region, the total number of valid barcodes, and the combination of processing parameters used in the current iteration are input into the parameter prediction model. The parameter prediction model outputs the combination of processing parameters to be used in the next iteration; wherein, the parameter prediction model is a sequence prediction model built based on a long short-term memory network.
8. A barcode detection device, characterized in that, include: The acquisition module is used to acquire the target image to be processed in the current iteration and the combination of processing parameters used. The combination of processing parameters includes at least: block size parameter, repetition rate threshold, and confidence threshold; The segmentation module is used to segment the target image into blocks using the segmentation size parameters to obtain at least two image sub-blocks and the position indexes corresponding to each image sub-block. The first determining module is used to determine the area overlap rate between each image sub-block and the barcode region, and to determine the candidate barcode region in the target image based on the repetition rate threshold, the area overlap rate corresponding to each image sub-block, and the position index. The second determining module is used to determine the predicted confidence level of the candidate barcode region as a barcode region, and to determine the valid barcode region in the candidate barcode region based on all the predicted confidence levels and the confidence threshold. The third determining module is used to continue the iteration and determine the combination of processing parameters to be used in the next iteration if the total number of valid barcode areas is less than the expected number of barcodes.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.