A PDA terminal-based encoding format detection method, device and electronic equipment

CN116562318BActive Publication Date: 2026-09-18XIAN FULIYE MICROELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310073532.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-01-29
Publication Date
2026-09-18
Estimated Expiration
2043-01-29

AI Technical Summary

Technical Problem

[0004]本发明实施例提供一种基于PDA 终端的编码格式检测方法、装置及电子设备,以解决由于条码图形部分存在破损、污损、弯曲等瑕疵,导致扫码头不能准确识别的问题

Benefits of technology

[0009] In this embodiment of the invention, the PDA terminal acquires a first target image containing a defective target barcode. It can then obtain the error level information, data encoding information, and error correction encoding information required for error correction from the corrected or modified target barcode. The terminal determines the number of error correction bits and performs reverse encoding bit by bit on the data encoding. The corrected result is then output as the scanning result of the first target image. Through this scheme, this application repairs the defective information of the target barcode by performing a preprocessing operation of correction or modification. This makes the subsequent acquisition of error level information, data encoding information, and error correction encoding information from the corrected (or modified) image more accurate and complete, thereby improving the accuracy of the subsequent reverse encoding process and further enhancing the recognition accuracy of damaged or soiled barcodes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116562318B_ABST
    Figure CN116562318B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on PDA terminal's encoding format detection method, device and electronic equipment, it is related to automatic identification technical field, to solve the problem that due to the existence of damage, pollution, bending and other defects of bar code pattern part, leading to the problem that code scanning head cannot be accurately identified.The method comprises the following steps: collecting a first target image, which contains a target barcode with recognition defects; obtaining encoding error correction level information, data encoding information and error correction encoding information from the preprocessed first target image; determining the number of error correction encoding bits according to the encoding error correction level information; according to the data encoding information, the number of error correction encoding bits and the error correction encoding information, error correction inverse encoding is performed on the data encoding bit by bit, and the code scanning result of the first target image is output. Wherein, the first target image is preprocessed to correct or modify the target barcode with recognition defects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of automatic identification technology, and in particular to a method, apparatus and electronic device for encoding format detection based on a PDA terminal. Background Technology

[0002] A barcode is a set of bars and spaces arranged according to certain encoding rules to represent information composed of specific characters, numbers, and symbols. A barcode system is an automatic identification system consisting of barcode symbol design, production, and scanning / reading. Barcodes include one-dimensional barcodes and two-dimensional barcodes. One-dimensional barcodes can only express information horizontally; their height is usually designed for easy reading by barcode devices, and their content can only contain letters and numbers. Their large size and low space utilization result in low information capacity. Two-dimensional barcodes can express information in both horizontal and vertical directions, offering a larger data capacity. Their content can include Chinese characters, symbols, letters, numbers, and other information, resulting in a higher information capacity.

[0003] However, in the actual use of barcodes, due to the complex environment, there are often defects such as damage, dirt, or bending in the barcode graphic, which makes it difficult for barcode scanners to accurately identify barcodes with such defects. Summary of the Invention

[0004] This invention provides a method, apparatus, and electronic device for detecting encoding formats based on a PDA terminal, in order to solve the problem that barcode scanning cannot accurately identify the barcode due to defects such as damage, dirt, or bending in the barcode graphic portion.

[0005] To solve the above-mentioned technical problems, the embodiments of the present invention are implemented as follows: In a first aspect, embodiments of the present invention provide a method for encoding format detection based on a PDA terminal. The method includes: acquiring a first target image, the first target image containing a target barcode with identification defects; obtaining encoding error correction level information, data encoding information, and error correction encoding information from the preprocessed first target image; determining the number of error correction encoding bits based on the encoding error correction level information; performing error correction inverse encoding bit by bit on the data encoding information, the number of error correction encoding bits, and the error correction encoding information; and outputting the scanning result of the first target image. The preprocessing of the first target image is used to correct or modify the target barcode with identification defects.

[0006] Secondly, embodiments of the present invention provide an encoding format detection device based on a PDA terminal. The device includes: a collection module, an acquisition module, a processing module, and an output module. The collection module includes a terminal scanning dock for collecting a first target image, the first target image containing a target barcode with identification defects. The acquisition module is used to acquire encoding error correction level information, data encoding information, and error correction encoding information from the first target image. The processing module is used to determine the number of error correction codes based on the encoding error correction level information. The processing module is further used to perform error correction inverse encoding on the data encoding bit by bit based on the data encoding information, the number of error correction codes, and the error correction encoding information, and outputs the scanning result of the first target image through the output module. The first target image is preprocessed to correct or modify the target barcode with identification defects.

[0007] Thirdly, embodiments of the present invention provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, to implement the steps of the encoding format detection method based on a PDA terminal provided in the first aspect.

[0008] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the encoding format detection method based on a PDA terminal provided in the first aspect.

[0009] In this embodiment of the invention, the PDA terminal acquires a first target image containing a defective target barcode. It can then obtain the error level information, data encoding information, and error correction encoding information required for error correction from the corrected or modified target barcode. The terminal determines the number of error correction bits and performs reverse encoding bit by bit on the data encoding. The corrected result is then output as the scanning result of the first target image. Through this scheme, this application repairs the defective information of the target barcode by performing a preprocessing operation of correction or modification. This makes the subsequent acquisition of error level information, data encoding information, and error correction encoding information from the corrected (or modified) image more accurate and complete, thereby improving the accuracy of the subsequent reverse encoding process and further enhancing the recognition accuracy of damaged or soiled barcodes. Attached Figure Description

[0010] Figure 1 This is one of the schematic diagrams of an encoding format detection method based on a PDA terminal; Figure 2 This is the second schematic diagram of an encoding format detection method based on a PDA terminal; Figure 3 This is the third schematic diagram of an encoding format detection method based on a PDA terminal; Figure 4 This is the fourth schematic diagram of an encoding format detection method based on a PDA terminal; Figure 5 This is a schematic diagram of an encoding format detection device based on a PDA terminal; Figure 6 This is a schematic diagram of the hardware structure of an electronic device. Detailed Implementation

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

[0012] In this article, the term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The symbol " / " indicates that the related objects are in an "or" relationship; for example, A / B means A or B.

[0013] The terms "first" and "second," etc., used in the specification and claims of this invention are used to distinguish different objects, not to describe a specific order of objects. For example, "first threshold" and "second threshold," etc., are used to distinguish different thresholds, not to describe a specific order of thresholds.

[0014] In embodiments of the present invention, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design described as "exemplary" or "for example" in embodiments of the present invention should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.

[0015] In the description of the embodiments of the present invention, unless otherwise stated, "multiple" means two or more, for example, multiple elements means two or more elements, etc.

[0016] It should be noted that to ensure correct barcode reading, barcodes generally have verification or error correction functions. One-dimensional barcodes typically have verification functions, preventing misreading through character verification. Two-dimensional barcodes, on the other hand, have error correction functions, which allow them to be correctly read even when partially damaged.

[0017] (1) Verification of 1D Barcodes: 1D barcodes can only express information horizontally. Their height is usually designed for easy reading by barcode devices. Their content can only consist of letters and numbers. The large size and low space utilization result in low information capacity. Error correction for 1D barcodes primarily uses check codes. There are many check code algorithms; for example, one method is to sum all even (odd) digits starting from the second position number to verify the correctness of the barcode. The purpose of verification is to ensure the correctness of the bar-to-space ratio.

[0018] (2) Error Correction of Two-Dimensional Barcodes: Two-dimensional barcodes can express information in both horizontal and vertical directions, with a large data capacity. Their content can include Chinese characters, symbols, letters, numbers, etc. The error correction rate of two-dimensional barcodes can be divided into four levels from low to high: L, M, Q, and H. The maximum error correction rates for each level are 7%, 15%, 25%, and 30%, respectively. Many algorithms exist for error correction of two-dimensional barcodes, such as the Solomon algorithm and the RS-encoded data recovery algorithm. Different two-dimensional barcodes may use different error correction algorithms. Error correction is necessary to ensure that even when a two-dimensional barcode has some local damage, the correct codeword information can be restored through substitution operations, thus guaranteeing the correct reading of the barcode.

[0019] The encoding format detection method, apparatus, and electronic device based on a PDA terminal provided in this invention are applicable to the following scenarios: Scenario 1: In scenarios where one-dimensional barcodes are partially damaged or soiled, making them difficult to accurately identify by scanning.

[0020] Scenario 2: In scenarios where the 1D barcode is curved, causing the scanner to fail to accurately recognize it.

[0021] Scenario 3: In scenarios where the 2D barcode is partially damaged or soiled, making it difficult for the scanner to accurately identify the barcode.

[0022] Scenario 4: In scenarios where the 2D barcode is curved, causing the scanner to fail to accurately recognize it.

[0023] Example 1

[0024] like Figure 1 As shown, this embodiment of the invention provides a method for detecting encoding formats based on a PDA terminal. This method is applied to PDA terminals, especially PDA terminals with external or integrated scanners (hereinafter referred to as electronic devices for ease of description). Specifically, this method can be implemented through the following steps 101 to 104. Step 101: The electronic device acquires a first target image, which contains a target barcode with identifiable defects. It should be noted that the target barcode can be either a one-dimensional barcode or a two-dimensional barcode; this embodiment does not specifically limit its use.

[0025] In addition, the aforementioned identification defects refer to defects such as partial damage, partial soiling, or bending of the target barcode that may prevent the barcode scanner from accurately identifying it.

[0026] Optionally, the aforementioned first target image is acquired by an electronic device through a scanning dock or a camera.

[0027] Specifically, users can trigger the button on the scanning electronic device to define the barcode image in the standard reading frame position in the captured image. Then, the captured image can be rotated through an algorithm and accurately placed into the reading frame to obtain the first target image.

[0028] It should be noted that the electronic device can capture multiple images (i.e., scan the dock or take multiple images with a camera). Then, the electronic device can use a comparison algorithm to select the image containing the most target barcode information as the first target image.

[0029] Step 102: The electronic device obtains the coding error correction level information, data coding information and error correction coding information from the preprocessed first target image.

[0030] It should be noted that the preprocessing of the first target image can be referred to the relevant descriptions in steps 105, 106, 107, and 108 in the following embodiments, which will not be repeated here.

[0031] It should be noted that the target barcode in the first target image is divided into multiple barcode areas. Different barcode areas are used to represent different barcode information. The electronic device can obtain the corresponding encoding error correction level information, data encoding information, and error correction encoding information from the encoding error correction level information area, data encoding information area, and error correction encoding information area of ​​the target barcode.

[0032] Error correction level refers to the level of error tolerance, which can be categorized from low to high as 7%, 15%, 25%, and 30%. Error tolerance is also called error correction rate. The error correction rate refers to the percentage of the maximum area of ​​the barcode that can be obscured while still being scanned normally.

[0033] Error-correcting coding, also known as channel coding, is one of the two aspects of information transmission, along with source coding. They are dual in nature. The presence or absence of errors can be determined by whether coding rules are met. When rules are not met, the location of the error is identified and corrected according to certain rules. The process of correcting errors and recovering the original codeword is called decoding. Error detection codes, used in conjunction with other methods, can correct errors. Currently, there are three main error control methods in data transmission: Automatic Repeat Request (ARQ), Forward Error Correction (FEC), and Hybrid Error Correction (HEC).

[0034] Data encoding refers to a technology that uses specific numbers to represent database information that needs to be processed. It involves converting data into codes or coded characters based on a certain data structure and the qualitative characteristics of the target data. These codes represent the data composition during data transmission and serve as a set of rules and conventions for transmission, reception, and processing. This application refers to a method of encoding information composed of characters, numbers, and symbols to obtain barcode information correspondence.

[0035] Step 103: The electronic device determines the number of bits for error correction coding based on the error correction level information.

[0036] It should be noted that there are various algorithms for determining the number of bits in the error correction code based on the error correction level information of the aforementioned electronic device, and this application embodiment does not specifically limit the algorithm. One implementation method is to determine the bit length based on the code distance, specifically based on the minimum code distance. The minimum code distance refers to the minimum number of distinct binary bits between any two legal codes.

[0037] The specific judgment method is as follows: if the minimum code distance is ≥ e+1, then e errors can be detected; if the minimum code distance is ≥ 2t+1, then t errors can be corrected; if the minimum code distance is ≥ e+t+1 and e>t, then t errors can be corrected and e errors can be detected. The error correction coding bits in this application are determined based on the t errors that can be corrected.

[0038] Furthermore, electronic devices can directly determine the number of error correction codes based on the correspondence between the error correction level information and the number of error correction codes. In practical use, the specific number of error correction codes can be determined after analysis based on the different barcodes and their encoding methods.

[0039] Step 104: The electronic device performs reverse encoding of the data encoding bit by bit according to the data encoding information, the number of error correction encoding bits, and the error correction encoding information, and outputs the scanning result of the first target image.

[0040] The first target image is preprocessed to correct or modify target barcodes with identification defects.

[0041] It should be noted that if the defect of the target barcode is partial damage or partial staining, the target barcode is corrected based on the existing information (refer to the correction steps in the following embodiments for details), and then the corrected image is used to perform the operations of steps 102 to 104 in sequence. If the defect of the target barcode is bending, the target barcode is corrected based on the existing information (i.e., the bent barcode is corrected to a normal barcode, refer to the correction steps in the following embodiments for details), and then the corrected image is used to perform the operations of steps 102 to 104 in sequence.

[0042] Optionally, the above-mentioned bit-by-bit data encoding error correction inverse encoding is limited by the number of bits of the error correction code. That is, when the number of bits for bit-by-bit error correction based on the data encoding information and the error correction code information reaches the number of bits of the error correction code, the electronic device completes the error correction and directly outputs the information after the error correction is completed as the scanning result of the first target image.

[0043] Optional, combined Figure 1 ,like Figure 2 As shown, step 104 can be implemented through steps 104a to 104c, wherein either step 104b or step 104c can be performed.

[0044] Step 104a: The electronic device queries the internal information pool of the tracker to see if there is information containing data encoding information and error correction encoding information, based on the data encoding information and error correction encoding information.

[0045] Step 104b: If it exists, the information containing data encoding information and error correction encoding information is transmitted to the tracker to participate in 5 rounds of polling verification, and then the original data is returned.

[0046] Step 104c: If it does not exist, create the first message in the message pool, send the first message to the tracker to participate in 5 rounds of polling verification, and then return the first message.

[0047] The first message mentioned above is a new message created based on the data encoding information and the error correction encoding information. The original data contains the data encoding information and the error correction encoding information.

[0048] Optionally, the electronic device reads the data where the target barcode is located outside the functional area in the first target image to obtain data encoding information and error correction encoding information. Then, based on the encoding error correction level information, it calculates the number of bits in the error correction code of the data encoding using a preset algorithm, and the tracker polls and verifies the data message. It checks if the message exists in the tracker's internal message pool. If it does, the tracker algorithm participates in 5 rounds of polling verification. If no new message instance (i.e., the first message) is created in the message pool, it is sent to the tracker algorithm for 5 rounds of polling verification. If the tracking verifies successfully 5 times, the original data is returned; otherwise, the verification fails, and the polling continues.

[0049] It should be noted that the above 5 rounds of polling verification are a preset value.

[0050] It should be noted that in step 104b or step 104c above, the number of bits of the error correction code is a constant determined by the target barcode. Before each polling verification by the tracker, the electronic device queries the data encoding information and error correction encoding information contained therein based on the bits of this constant. Each query corresponds to one polling verification.

[0051] Optionally, while the electronic device acquires the first target image, the internal tracker of the electronic device creates an electronic listener through a message pool when initializing the first tracker. This electronic listener corresponds one-to-one with the tracker. The purpose of using messages is to ensure that each tracker has a corresponding electronic listener, so that subsequent trackers can directly obtain the first tracker during initialization. The electronic listener maintains a message queue internally, and continuously polls the message queue to search for data messages by initiating a polling operation (i.e., continuously executing the operation in step 104a). When the electronic listener finds a data message, it encodes the data information and sends it back to the tracker. After the tracker successfully verifies the data through the above operations, it outputs and sends the data message in real time, obtaining the accurately verified reverse-encoded data (i.e., the internal mechanism specifically implemented in steps 104b and 104c above).

[0052] The encoding format detection method based on PDA terminal provided by this invention can greatly reduce the probability of reverse encoding disordered data caused by the encoding settings of existing reading technology. At the same time, it can improve the correctness of reverse encoded data of barcodes that are difficult to read due to graphic curvature or dirt, achieve the purpose of fast and accurate reading, and improve the efficiency of obtaining the original data from reverse encoding.

[0053] In this embodiment of the invention, the PDA terminal acquires a first target image containing a defective target barcode. It can then obtain the error level information, data encoding information, and error correction encoding information required for error correction from the corrected or modified target barcode. The terminal determines the number of error correction bits and performs reverse encoding bit by bit on the data encoding. The corrected result is then output as the scanning result of the first target image. Through this scheme, this application repairs the defective information of the target barcode by performing a preprocessing operation of correction or modification. This makes the subsequent acquisition of error level information, data encoding information, and error correction encoding information from the corrected (or modified) image more accurate and complete, thereby improving the accuracy of the subsequent reverse encoding process and further enhancing the accuracy of identifying damaged or soiled barcodes.

[0054] Optional, combined Figure 1 ,like Figure 3 As shown, the defects identified in the first target image are local damage or dirt. After step 102 and before step 103, steps 105 and 106 may also be included below. Correspondingly, step 102 can be specifically implemented through step 102a below.

[0055] Step 105: The electronic device filters and locates the barcode area of ​​the first target image, and fills in the blank information composed of barcodes with the local dirt to obtain the second target image.

[0056] It should be noted that the target barcode in the second image includes: the undamaged barcode, and the barcode with damaged portions but no empty information.

[0057] Step 106: The electronic device corrects the second image based on the width information between each group of barcodes in the first target image to obtain the third target image.

[0058] Optionally, since the width between each group of barcodes in the target barcode follows a certain pattern, the second image can be corrected according to this width pattern.

[0059] Specifically, if the target image is a one-dimensional barcode, the damaged barcode can be corrected based on the undamaged portion of the barcode and the width patterns between each group of barcodes to obtain a third target containing the complete barcode. If the target image is a two-dimensional barcode, it can be corrected based on the undamaged portion of the barcode and the horizontal and vertical width patterns of the barcodes adjacent to the damaged area, combined with the data encoding of the two-dimensional barcode, to obtain a third target containing more barcode information. Specifically, if the damaged area of ​​the two-dimensional barcode is small and the surrounding barcodes are clear, a better corrected third target can be obtained; if the damaged area of ​​the two-dimensional barcode is large, the corrected third target contains more information (compared to before correction).

[0060] Step 102a: The electronic device acquires coding error correction level information, data coding information and error correction coding information from the third target image.

[0061] At this point, the electronic device has obtained the corrected third target image, and when executing step 102, it directly obtains the coding error correction level information, data coding information and error correction coding information from the third target image.

[0062] For example, in practical applications, barcodes often suffer from localized contamination and damage. In PDA-based image recognition, when scanning barcodes and capturing images, factors such as glare from the supplementary lighting illuminating the damaged barcode can lead to incomplete barcode images, meaning the first target image is flawed and needs correction. A specific correction method can be as follows: In the PDA terminal-based smart tracker's method for detecting encoding formats, during the recognition of damaged barcodes, the captured damaged barcode image is preprocessed. Barcode regions are filtered and located. Using the barcode's spatial information along the barcode direction, the width between each component bar is calculated. Based on the width between the barcode components, a third target containing more information is obtained. This third target is then used to acquire data encoding for the tracker's reverse encoding process.

[0063] Understandably, before acquiring the coding error correction level information, data coding information, and error correction coding information, the electronic device corrects the local damage or contamination in the first target image and repairs the information in the contaminated area to obtain a third target image containing more information. In subsequent processes, the information obtained using the corrected third target is more accurate and complete, improving the accuracy of the subsequent reverse coding process and further enhancing the recognition accuracy of damaged and contaminated barcodes.

[0064] Optional, combined Figure 1 ,like Figure 3 As shown, the identification defect of the first target image is a bent barcode. After step 102 and before step 103, the following steps 107 and 108 may also be included. Correspondingly, step 102 can be implemented through step 102b.

[0065] Step 107: The electronic device performs edge detection and curved barcode localization on the first target image.

[0066] Step 108: The electronic device performs correction processing on the first target image based on the positioning result to obtain the fourth target image.

[0067] The barcode in the fourth target image is a non-bent barcode.

[0068] Step 102b: The electronic device acquires the coding error correction level information, data coding information and error correction coding information from the fourth target image.

[0069] It should be noted that in the above process of processing curved barcodes, a distortion image correction algorithm can be used. This distortion image correction algorithm includes, but is not limited to, any of the following: projection algorithm, Hough transform, nearest neighbor method, Radon transform, etc.

[0070] Furthermore, edge detection and curved barcode localization of the first target image can be performed using techniques such as rectangular block detection algorithms and optical character recognition (OCR).

[0071] For example, in applications such as the medical industry and medical supplies, barcodes are often used in a curved or irregular manner. In PDAs based on image recognition, images captured in curved barcode scenarios will be incomplete (i.e., the first target image contains barcode curvature defects). In reading curved barcodes on electronic devices, edge detection and rectangular block detection algorithms are used to locate and process the acquired curved barcode image. Then, different correction methods are applied to different curved barcode images to obtain a corrected fourth target image. The data encoding obtained from this fourth target image is then used for the tracker's reverse encoding process.

[0072] It is understandable that, before acquiring the coding error correction level information, data coding information, and error correction coding information, the electronic device performs correction processing on the curved barcode in the first target image to obtain a corrected, non-curved fourth target image. As a result, in subsequent processes, the information acquired using the corrected fourth target is more accurate and complete, improving the accuracy of the subsequent reverse coding process and further enhancing the accuracy of identifying damaged or soiled barcodes.

[0073] In this embodiment of the invention, the PDA terminal acquires a first target image containing a defective target barcode. It can then obtain the error level information, data encoding information, and error correction encoding information required for error correction from the corrected or modified target barcode. The terminal determines the number of error correction bits and performs reverse encoding bit by bit on the data encoding. The corrected result is then output as the scanning result of the first target image. Through this scheme, this application repairs the defective information of the target barcode by performing a preprocessing operation of correction or modification. This makes the subsequent acquisition of error level information, data encoding information, and error correction encoding information from the corrected (or modified) image more accurate and complete, thereby improving the accuracy of the subsequent reverse encoding process and further enhancing the recognition accuracy of damaged or soiled barcodes.

[0074] Example 2

[0075] like Figure 5 As shown, this application provides an encoding format detection device 500 based on a PDA terminal. The device 500 includes: a collection module 501, an acquisition module 502, a processing module 503, and an output module 504. The collection module 501 includes a terminal scanning dock for collecting a first target image, the first target image containing a target barcode with identifiable defects.

[0076] The acquisition module 502 is used to acquire encoding error correction level information, data encoding information, and error correction encoding information from the preprocessed first target image. The processing module 503 is used to determine the number of bits in the error correction encoding based on the encoding error correction level information. The processing module 503 is also used to perform error correction inverse encoding bit by bit on the data encoding information and the error correction encoding information, and output the scanning result of the first target image through the output module. The preprocessing of the first target image is used to correct or modify target barcodes with recognition defects.

[0077] Optionally, processing module 503 is specifically used to query the tracker's internal information pool to see if information containing data encoding information and error correction encoding information exists, based on the data encoding information and error correction encoding information. If it exists, the information containing data encoding information and error correction encoding information is transmitted to the tracker for five rounds of polling verification, and then the original data is returned; if it does not exist, a first message is created in the message pool, transmitted to the tracker for five rounds of polling verification, and then the first message is returned. The first message is a new message created based on the data encoding information and error correction encoding information, and the original data contains the data encoding information and error correction encoding information.

[0078] Optionally, the defects in the first target image are local damage or contamination. The processing module 503 is further configured to, before obtaining the coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image, filter and locate the barcode region of the first target image, and fill in the local contamination with empty information composed of barcodes to obtain the second target image; and correct the second image according to the width information between each group of barcodes in the first target image to obtain the third target image. The acquisition module 502 is specifically used to acquire the coding error correction level information, data coding information, and error correction coding information from the third target image.

[0079] Optionally, the identified defect in the first target image is a bent barcode. The processing module 503 is further configured to perform edge detection and bent barcode localization on the first target image before obtaining the coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image; and to perform correction processing on the first target image based on the localization results to obtain the fourth target image. The acquisition module 502 is specifically configured to obtain the coding error correction level information, data coding information, and error correction coding information from the fourth target image. This invention provides an encoding format detection device based on a PDA terminal. This device acquires a first target image containing a defective target barcode, and obtains the error level information, data encoding information, and error correction encoding information required for error correction from the corrected or modified target barcode. It then determines the number of error correction bits, performs reverse encoding of the data encoding bit by bit, and outputs the corrected result as the scanning result of the first target image. Through this scheme, this application repairs the defective information of the target barcode by performing a preprocessing operation of correction or modification, thereby making the subsequent acquisition of error level information, data encoding information, and error correction encoding information from the corrected (or modified) image more accurate and complete. This improves the accuracy of the subsequent reverse encoding process and further enhances the accuracy of identifying damaged or soiled barcodes.

[0080] The electronic device provided in this embodiment of the invention can implement the various processes implemented by the electronic device in the above method embodiment. To avoid repetition, these processes will not be described again here.

[0081] Figure 6 A schematic diagram of the hardware structure of an electronic device for implementing various embodiments of the present invention. For example... Figure 6 As shown, the electronic device 200 includes, but is not limited to, components such as: a radio frequency unit 201, a network module 202, an audio output unit 203, an input unit 204, a sensor 205, a display unit 206, a user input unit 207, an interface unit 208, a memory 209, a processor 210, and a power supply 211. Those skilled in the art will understand that... Figure 6 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0082] In embodiments of the present invention, electronic devices include, but are not limited to, mobile phones, tablet computers, laptops, handheld PDAs, PDAs, in-vehicle electronic devices, wearable devices, and pedometers.

[0083] The radio frequency (RF) unit 201 sends a wake-up signal and a detection signal to at least one sensor terminal within the area. The wake-up signal is used to wake up the sensor terminal, and the detection signal is used to trigger the sensor terminal to send a first signal back to the electronic device. The RF unit 201 can also receive the first signal from the sensor terminal. The first signal is the sensor terminal's response signal to the detection signal, indicating that the electronic device and the sensor terminal can establish data communication. The processor 210 is used to determine a channel access strategy based on the first signal. The channel access strategy is used to characterize the access method, access order, access time, and other information between the electronic device and the sensor terminal. The RF unit 201 is also used to initiate a collection cycle according to the channel access strategy, and access the sensor terminal frame by frame to collect data.

[0084] This invention provides an electronic device with a radio frequency (RF) unit that sends a wake-up signal and a detection signal to at least one sensor terminal within a region. The wake-up signal wakes up the sensor terminal, and the detection signal triggers the sensor terminal to send a first signal back to the electronic device. The RF unit receives the first signal from the sensor terminal; the first signal is the sensor terminal's response to the detection signal, indicating that the electronic device and the sensor terminal can establish data communication. A processing unit determines a channel access strategy based on the first signal; the channel access strategy characterizes the access method, access order, access time, and other information between the electronic device and the sensor terminal. The RF unit also initiates a collection cycle based on the channel access strategy, collecting data from the sensor terminal frame by frame. Through this electronic device, within a single data collection cycle, different types of terminal data can be accessed and collected through different types of data collection frames. Compared to traditional channel resource allocation methods based on equal-length data frames, this solution can allocate channel resources more flexibly and efficiently. Furthermore, through dynamic data link layer frame structure settings, it better adapts to changes in data frame length, effectively reducing channel resource waste and improving communication efficiency. This also effectively reduces the power consumption of the electronic device and the sensor terminal.

[0085] It should be understood that, in this embodiment of the invention, the radio frequency unit 201 can be used for receiving and transmitting signals during information transmission or calls. Specifically, it receives downlink data from the base station and processes it with the processor 210; additionally, it transmits uplink data to the base station. Typically, the radio frequency unit 201 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, etc. Furthermore, the radio frequency unit 201 can also communicate with networks and other devices via a wireless communication system.

[0086] The electronic device provides users with wireless broadband internet access through the network module 202, such as helping users send and receive emails, browse web pages, and access streaming media.

[0087] The audio output unit 203 can convert audio data received by the radio frequency unit 201 or the network module 202 or stored in the memory 209 into audio signals and output them as sound. Furthermore, the audio output unit 203 can also provide audio output related to specific functions performed by the electronic device 200 (e.g., call signal reception sound, message reception sound, etc.). The audio output unit 203 includes a speaker, a buzzer, and a receiver, etc.

[0088] Input unit 204 is used to receive audio or video signals. Input unit 204 may include a graphics processing unit (GPU) 2041, a microphone 2042, and a camera module 2043. The GPU 2041 processes image data of still images or videos acquired by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on display unit 206. The image frames processed by GPU 2041 can be stored in memory 209 (or other storage media) or transmitted via radio frequency unit 201 or network module 202. Microphone 2042 can receive sound and process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via radio frequency unit 201 in telephone call mode. Camera module 2043 captures images and transmits the captured images to GPU 2041.

[0089] The electronic device 200 also includes at least one sensor 205, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 2061 according to the ambient light level, and the proximity sensor can turn off the display panel 2061 and / or backlight when the electronic device 200 is moved to the ear. As a type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in various directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity and can be used to identify the posture of the electronic device (such as landscape / portrait switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc. The sensor 205 may also include a fingerprint sensor, pressure sensor, iris sensor, molecular sensor, gyroscope, barometer, hygrometer, thermometer, infrared sensor, etc., which will not be described in detail here.

[0090] The display unit 206 is used to display information input by the user or information provided to the user. The display unit 206 may include a display panel 2061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0091] User input unit 207 can be used to receive input numerical or character information, and generate key signal inputs related to user settings and function control of electronic devices. Specifically, user input unit 207 includes touch panel 2071 and other input devices 2072. Touch panel 2071, also known as a touch screen, can collect touch operations on or near the user (such as operations performed by the user using a finger, stylus, or any suitable object or accessory on or near touch panel 2071). Touch panel 2071 may include two parts: a touch detection device and a touch controller. The touch detection device detects the user's touch position and the signal generated by the touch operation, and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device, converts it into touch point coordinates, and sends it to processor 210, receiving and executing commands from processor 210. In addition, touch panel 2071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. Besides touch panel 2071, user input unit 207 may also include other input devices 2072. Specifically, other input devices 2072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0092] Furthermore, the touch panel 2071 can cover the display panel 2061. When the touch panel 2071 detects a touch operation on or near it, it transmits the information to the processor 210 to determine the type of touch event. Subsequently, the processor 210 provides corresponding visual output on the display panel 2061 based on the type of touch event. Although in Figure 6 In this embodiment, the touch panel 2071 and the display panel 2061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 2071 and the display panel 2061 can be integrated to realize the input and output functions of the electronic device. The specific implementation is not limited here.

[0093] Interface unit 208 serves as an interface for connecting external devices to electronic device 200. For example, external devices may include a wired or wireless headphone port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, and so on. Interface unit 208 can be used to receive input from external devices (e.g., data, power, etc.) and transmit the received input to one or more components within electronic device 200, or it can be used to transmit data between electronic device 200 and external devices.

[0094] The memory 209 can be used to store software programs and various data. The memory 209 may primarily include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, phonebook, etc.). Furthermore, the memory 209 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0095] Processor 210 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in memory 209, and by calling data stored in memory 209, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Processor 210 may include one or more processing units; optionally, processor 210 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into processor 210.

[0096] Electronic device 200 may also include a power supply 211 (such as a battery) for supplying power to various components. Optionally, the power supply 211 may be logically connected to the processor 210 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system.

[0097] In addition, the electronic device 200 includes some functional modules not shown, which will not be described in detail here.

[0098] Optionally, embodiments of the present invention also provide an electronic device, including as follows: Figure 6 The processor 210 and memory 209 shown are stored in the memory 209 and can run on the processor 210. When the computer program is executed by the processor 210, it implements the various processes of the above method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0099] This invention also provides a computer-readable storage medium storing a computer program. When executed by a processor, the computer program implements the various processes of the method in Embodiment 1 above and achieves the same technical effect. To avoid repetition, it will not be described again here. The computer-readable storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0100] The embodiments given above are preferred examples for implementing the present invention, and the present invention is not limited to the above embodiments. Any non-essential additions or substitutions made by those skilled in the art based on the technical features of the present invention are within the protection scope of the present invention.

Claims

1. A method for detecting an encoding format based on a PDA terminal, characterized by, The method includes: Acquire a first target image, the first target image containing a target barcode that identifies defects; Obtain coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image; The number of bits for error correction coding is determined based on the aforementioned error correction level information; Based on the data encoding information, the number of error correction encoding bits, and the error correction encoding information, the data encoding is reverse encoded bit by bit to output the scanning result of the first target image; Specifically, the first target image is preprocessed to correct or modify the target barcode with identification defects; while the electronic device acquires the first target image, when the internal tracker of the electronic device initializes the first tracker, it creates an electronic listener through a message pool. The electronic listener and the tracker are in one-to-one correspondence. The electronic listener maintains a message queue internally, and the electronic listener polls the message queue to find data messages by starting a polling operation.

2. The method of claim 1, wherein, The step of performing error-correcting inverse encoding bit by bit on the data encoding information and the error-correcting encoding information, and outputting the scanning result of the first target image, includes: Based on the data encoding information and the error correction encoding information, query whether there is a message containing the data encoding information and the error correction encoding information in the tracker's internal message pool; If it exists, the message containing the data encoding information and the error correction encoding information is transmitted to the tracker for 5 rounds of polling verification, and then the original data is returned. If it does not exist, a first message is created in the message pool, the first message is sent to the tracker to participate in 5 rounds of polling verification, and then the first message is returned; The first message is a new message created based on the data encoding information and the error correction encoding information, and the original data includes the data encoding information and the error correction encoding information.

3. The method of claim 1, wherein, The defects in the first target image are local damage or dirt. Before obtaining the coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image, the method further includes: The barcode area of ​​the first target image is filtered and located, and the local dirt is filled with empty information composed of barcodes to obtain the second target image; The second target image is corrected based on the width information between each group of barcodes in the first target image to obtain the third target image; The step of obtaining coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image includes: The coding error correction level information, the data coding information, and the error correction coding information are obtained from the third target image.

4. The method according to claim 1, characterized in that, The identification defect in the first target image is a bent barcode; Before obtaining the coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image, the method further includes: Edge detection and curved barcode localization are performed on the first target image; Based on the positioning result, the first target image is corrected to obtain the fourth target image; The step of obtaining coding error correction level information, data coding information, and error correction coding information from the preprocessed first target image includes: The coding error correction level information, the data coding information, and the error correction coding information are obtained from the fourth target image.

5. A PDA terminal-based encoding format detection device, characterized in that, The device includes: a data acquisition module, an acquisition module, a processing module, and an output module; The acquisition module includes a terminal scanning dock for acquiring a first target image, the first target image containing a target barcode with identifiable defects; The acquisition module is used to acquire coding error correction level information, data coding information and error correction coding information from the preprocessed first target image; The processing module is used to determine the number of bits for error correction coding based on the error correction level information. The processing module is further configured to perform error correction inverse encoding on the data encoding bit by bit according to the data encoding information, the number of error correction encoding bits and the error correction encoding information, and output the scanning result of the first target image through the output module; Specifically, the first target image is preprocessed to correct or modify the target barcode with identification defects; while the electronic device acquires the first target image, when the internal tracker of the electronic device initializes the first tracker, it creates an electronic listener through a message pool. The electronic listener and the tracker are in one-to-one correspondence. The electronic listener maintains a message queue internally, and the electronic listener polls the message queue to find data messages by starting a polling operation.

6. The detection device according to claim 5, characterized in that, The processing module is specifically used to query whether there is a message containing the data encoding information and the error correction encoding information in the internal message pool of the tracker, based on the data encoding information and the error correction encoding information. If it exists, the message containing the data encoding information and the error correction encoding information is transmitted to the tracker for 5 rounds of polling verification, and then the original data is returned. If it does not exist, a first message is created in the message pool, the first message is sent to the tracker to participate in 5 rounds of polling verification, and then the first message is returned; The first message is a new message created based on the data encoding information and the error correction encoding information, and the original data includes the data encoding information and the error correction encoding information.

7. The detection device according to claim 5, characterized in that, The defects in the first target image are local damage or dirt. The processing module is further configured to, before obtaining the coding error correction level information, data coding information and error correction coding information from the preprocessed first target image, filter and locate the barcode area of ​​the first target image, and fill in the empty information composed of barcodes with local dirt to obtain the second target image; and correct the second target image according to the width information between each group of barcodes in the first target image to obtain the third target image; The acquisition module is specifically used to acquire the error correction level information, the data encoding information, and the error correction encoding information encoded from the third target image.

8. The detection device according to claim 5, characterized in that, The identification defect in the first target image is a bent barcode; The processing module is further configured to perform edge detection and curved barcode localization on the first target image before obtaining the coding error correction level information, data coding information and error correction coding information from the preprocessed first target image; and to perform correction processing on the first target image according to the localization result to obtain the fourth target image; The acquisition module is specifically used to acquire the coding error correction level information, the data coding information, and the error correction coding information from the fourth target image.

9. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the encoding format detection method based on a PDA terminal as described in claims 1 to 4.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the steps of the encoding format detection method based on a PDA terminal as described in claims 1 to 4.

Citation Information

Patent Citations

  • Bar code recognition method and device, storage medium and computer equipment

    CN113312937A

  • Method for converting 2D bar code symbols to coded information

    CN1959704A