Manufacturing method and device for reliably transmitting high-density two-dimensional code by using camera

By using FEC and QR encoding technologies in the SD-WAN field to correct and encapsulate QR code packets, high-density QR code videos are generated, which solves the problem of low QR code information density and videos in the initialization of basic configuration of CPE equipment. The problem of unstable transmission has achieved efficient basic configuration initialization and high redundancy error correction capabilities.

CN119402141AInactive Publication Date: 2025-02-07CBC TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411952897.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-02-07
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the field of SD-WAN, when the basic configuration of CPE equipment is initialized, the information density of ordinary QR codes is too low, resulting in the problem of frame blurring or information loss of video transmission QR codes.

Method used

By encapsulating the data to be transmitted, a raw data packet of equal length is generated, and error correction information is added using FEC encoding to generate a data packet containing error correction information. Then, each data packet is encapsulated using a QR encoder to generate a QR code frame, and finally multiple QR code frames are synthesized into a QR code video.

Benefits of technology

It realizes the initialization of basic configuration using QR codes on high-security CPE devices, has a highly redundant error correction mechanism, can tolerate partial frame loss without video playback, and improves the information density to standard QR codes. three times.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402141A_ABST
    Figure CN119402141A_ABST
Patent Text Reader

Abstract

The invention relates to a manufacturing method for reliably transmitting a high-density two-dimensional code by using a camera, and the method comprises the steps: packaging to-be-transmitted data, generating a series of isometric original data packets, adding error correction information to each original data packet according to an FEC code, obtaining a transmission data packet containing the error correction information, and transmitting the transmission data packet to the camera. And packaging each transmission data packet according to a QR encoder to obtain a corresponding two-dimensional code frame, and generating a to-be-transmitted two-dimensional code video from the plurality of two-dimensional code frames corresponding to the to-be-transmitted data. According to the invention, for CPE equipment with a high security level (without a USB), the two-dimensional code is used for basic configuration initialization; the two-dimensional code video stream with a high redundancy error correction mechanism can tolerate the loss of partial frames without video playback; the information density is improved to three times of that of a standard two-dimensional code, but an existing two-dimensional code decoding module does not need to be modified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer software technology, and in particular to a method and device for producing a high-density two-dimensional code that can be reliably transmitted using a camera. Background Art

[0002] In the SD-WAN field, for CPEs with a high security level, the USB interface is prohibited from use (keyboards, mice, and USB flash drives are prohibited), and all data can only be transmitted through the network in strict accordance with the protocol. When the basic configuration of the CPE (especially the network) is not initialized, the network cannot be used, and there is no suitable means of data transmission except returning it to the factory.

[0003] Later, there was a research direction that used the CPE built-in camera to read a specific QR code (the QR code referred to in this article specifically refers to the familiar QR code) as the basic configuration initialization process. Since the information density of ordinary QR codes is too low, this technology was subsequently developed into making multiple QR codes into videos for the CPE built-in camera to read.

[0004] The essence of video transmission of QR codes is to treat each QR code as one or more frames of video for continuous reading by the camera. There is the following problem: due to video compression technology, there is a certain probability that a specific frame will be blurred or even the information of an entire frame of the QR code will be completely lost. Summary of the invention

[0005] In view of this, the present application proposes a method for producing a high-density two-dimensional code by reliably transmitting it using a camera, so as to solve the problems reflected in the above-mentioned background technology.

[0006] The present application provides a method for producing a high-density two-dimensional code by reliably transmitting it using a camera, characterized by comprising: Encapsulate the data to be transmitted to generate a series of original data packets of equal length; Add error correction information to each of the original data packets according to FEC coding to obtain a transmission data packet containing the error correction information; Encapsulating each transmission data packet according to the QR encoder to obtain a corresponding two-dimensional code frame; The plurality of two-dimensional code frames corresponding to the data to be transmitted are used to generate a two-dimensional code video to be transmitted.

[0007] Optionally, the adding error correction information to each of the original data packets according to FEC coding further includes: The FEC encoding uses the Reed-Solomon algorithm, which is a block code encoding method for fixed-size blocks, which is consistent with the fixed-size method of the QR code and generates FEC error correction information; Adding the FEC error correction information to each original data packet through an FEC encoder to generate a data packet containing the error correction information; The generated data packets containing error correction information are larger in number than the original data packets, so as to avoid data packet loss and information loss.

[0008] Optionally, encapsulating each of the transmission data packets according to the QR encoder includes: The QR encoder implements error correction by adding a certain number of error correction codes during the encoding process to generate QR error correction information; The data packet containing the error correction information and the QR error correction information are encapsulated by a QR encoder to generate a two-dimensional code frame containing further redundant information.

[0009] Optionally, the method for producing a high-density two-dimensional code by reliably transmitting it using a camera is characterized in that: The two-dimensional code frames are all monochrome. For all the generated two-dimensional code frames, three two-dimensional code frames are rendered with red, green and blue pure colors respectively and superimposed to generate a two-dimensional code frame with eight colors; Encapsulate all color QR code frames into a QR code video.

[0010] Optionally, generating FEC error correction information includes: The FEC error correction information is inter-frame error correction information between different pictures, which corrects the situation where a whole frame is missed.

[0011] Optionally, the generated data packets containing error correction information are greater in number than the original data packets, further comprising: The FEC encoder re-encapsulates n original data packets into n+2 data packets containing error correction information. During the transmission process, any two of the n+2 data packets containing error correction information can be lost without losing information.

[0012] Optionally, generating QR error correction information includes: The QR error correction information is intra-frame error correction information within the same picture. When it is detected that some data or positioning patterns within the QR code are erroneous or damaged, the QR decoder can use the redundant information of the QR code to try to correct these errors.

[0013] The present application also provides a device for reliably transmitting high-density two-dimensional codes using a camera, characterized in that the device CPE includes a camera module and a two-dimensional code decoding module.

[0014] Optionally, the camera module is a built-in camera of the CPE, and the camera reads a specific QR code, and the QR code decoding module is used as a basic configuration initialization process.

[0015] The present application also provides an electronic device, characterized in that it includes: A computer device, characterized in that it comprises a memory and a processor, wherein a computer program is stored in the memory.

[0016] The beneficial effects of the present application are: for CPE devices with a high security level (without USB), a QR code can be used for basic configuration initialization; the QR code video stream has a highly redundant error correction mechanism, which can tolerate the loss of some frames without video replay; and the information density is increased to three times that of a standard QR code without modifying the existing QR code decoding module. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required in the embodiments or the description of the prior art. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0018] Figure 1 A flow chart of a method for producing a high-density two-dimensional code that is reliably transmitted using a camera disclosed in the present application is shown; Figure 2 A specific inter-frame error correction schematic diagram disclosed in the present application is shown; Figure 3 A specific monochrome two-dimensional code frame flow chart disclosed in the present application is shown; Figure 4 A specific two-dimensional code frame structure diagram disclosed in this application is shown; Figure 5 A schematic diagram showing a specific method disclosed in the present application of synthesizing three monochrome two-dimensional code frames into a color two-dimensional code frame; Figure 6 A specific color two-dimensional code frame flow chart disclosed in this application is shown. DETAILED DESCRIPTION

[0019] Various exemplary embodiments, features and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.

[0020] The terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0021] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.

[0022] In addition, in order to better illustrate the present application, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present application can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present application.

[0023] The SD-WAN (software-defined networking in a wide area network) field is a collection of technologies. The main concept is to apply software-defined networking (SDN) technology to the management of wide area networks (WANs). Software-defined networking technology uses virtualization technology to simplify the management and maintenance of data centers; extending this concept and applying related technologies to wide area networks can simplify the control of wide area networks by enterprise-level users.

[0024] CPE (Customer Premises Equipment) is a device located at the end user's premises, usually referring to wireless terminal access equipment. It can receive wireless signals from wireless routers, wireless APs or wireless base stations, obtain mobile networks through card insertion, directly act as a wired network interface or convert into Wi-Fi signals, and provide device connections in home or office scenarios. 5G industrial CPE uses public 3G / 4G / 5G networks to provide long-distance large data transmission capabilities, has high-performance industrial-grade communication processors and wireless modules, supports multiple interfaces and WiFi functions, and can achieve transparent data transmission and routing functions.

[0025] FEC (Forward Error Correction) is a technology used to control data transmission errors over unreliable or noisy communication channels. It is implemented by adding redundant data at the sending end, which can be used by the receiving end to detect and correct errors that may occur during transmission without requesting retransmission. This mechanism is very common in SD-WAN and other network fields. In this invention, FEC is used for error correction of QR code video images.

[0026] ‌QR (Quick Response) codes, which consist of black and white squares, can be scanned at any angle and can store more information. QR codes are widely used and are commonly seen in advertisements, coupons, product information, sports event tickets, and other scenarios. They are read by a laser scanner or camera on a mobile phone and then decoded using special software. The three corners of the QR code contain a lookup pattern, which is a series of nested black and white squares that are used to determine the orientation of the QR code. In addition, QR codes also have high fault tolerance and can recover data in the event of partial damage.

[0027] like Figure 1 As shown, a method for making a high-density two-dimensional code that is reliably transmitted using a camera in an embodiment of the present application includes the following contents: S100, this application encapsulates the data planned to be transmitted.

[0028] Specifically, the data content planned to be transmitted is encapsulated into a series of original data packets of equal length.

[0029] S200, the present application adds error correction information to the original data packet to obtain a data packet containing the error correction information.

[0030] Specifically, since the QR code itself has an intra-frame error correction function, FEC error correction does not need to be used in the same dimension as the QR code error correction, so FEC error correction is inter-frame error correction so that the data can be fully corrected when a whole frame is missed.

[0031] like Figure 2 As shown, a specific inter-frame error correction schematic diagram disclosed in the present application includes the following contents: FEC error correction is inter-frame error correction, which is located between different pictures and can avoid errors caused by missing a whole frame. QR error correction is intra-frame error correction, and the dimension is within the same picture. When errors or damages are detected in certain data or positioning patterns in the QR code, the QR decoder can use the redundant information of the QR code to try to correct these errors.

[0032] Among them, FEC error correction adopts the Reed-Solomon algorithm, which is a forward error correction channel coding technology, mainly used for error detection and correction in data transmission and storage. It adds redundant information to the data, so that even if an error occurs during data transmission or storage, the receiver can restore the original data through this redundant information; this coincides with the fixed size of the QR code. Taking QR code Version 12 as an example, the size of each QR code is 65*65, that is, a fixed 4225 bits (including fixed-length positioning information and error correction information).

[0033] Specifically, a series of original data packets encapsulated in S100 are re-encapsulated into data packets containing error correction information by adding redundant error correction information (inter-frame error correction) through the FEC encoder. And every n original data packets will be re-encapsulated into n+2 data packets containing error correction information by the FEC encoder. During the transmission process, 2 data packets containing error correction information can be lost at will without losing information.

[0034] Among them, the FEC encoder will re-encapsulate n original data packets to generate n+m data packets containing error correction information. Among them, m data packets containing error correction information are redundant. During the transmission process, m data packets containing error correction information can be lost at will without losing information. For example, every 7 original data packets will be re-encapsulated by the FEC encoder into 9 data packets containing error correction information. During the transmission process, 2 of these 9 data packets can be lost at will without losing information.

[0035] like Figure 3 As shown, a specific monochrome two-dimensional code frame flow chart disclosed in this application includes the following contents: Encapsulate the inter-frame error correction information of n original data packets through the FEC encoder to generate n+2 data packets containing error correction information; Then, n+2 data packets containing error correction information are encapsulated in the frame error correction information through the QR encoder one by one to generate n+2 two-dimensional code frames; Finally, all QR code frames are encapsulated to generate a video.

[0036] S300, the present application uses a QR encoder to subpackage each of the transmission data packets to obtain a corresponding two-dimensional code frame.

[0037] Specifically, each data packet containing error correction information will be encapsulated by the QR encoder into a QR code frame containing further redundant information (intra-frame error correction), and finally all the generated QR code frames will be uniformly encapsulated to generate a video.

[0038] like Figure 4 As shown, a specific two-dimensional code frame structure diagram disclosed in this application includes the following contents: The two-dimensional code frame is composed of an FEC data packet and two-dimensional code error correction information data. The FEC data packet is a data packet containing error correction information generated by the FEC encoder, and the two-dimensional code error correction information data is the intra-frame error correction redundant information generated by the QR encoder. The FEC data packet consists of an original data packet and FEC error correction information data. The original data packet is the data content planned to be transmitted, encapsulated into a series of data packets of equal length, and the FEC error correction information data is the inter-frame error correction redundant information generated by the FEC encoder.

[0039] Specifically, the above process has completed data redundancy (automatic error correction) in two dimensions: intra-frame and inter-frame. However, in terms of data density, since each frame only requires black and white colors, in fact, no mainstream video encoding technology is compatible with this solution. Therefore, for the existing mainstream video encoding technology, more information is added to each frame through different color channels.

[0040] The data density of the color QR code frame is higher than that of the standard black-and-white QR code. The color QR code increases the data density by increasing the number of colors. Assuming that the number of colors used is 2k, the number of bits that can be stored in each module is defined as BMP (Bits Per Module), and the calculation formula is BMP=log2(2k)=k, which means that the data density of the color QR code is K times that of the standard black-and-white QR code.

[0041] Specifically, it is customary for each pixel of each video frame to be represented by the three parameters R, G, and B to indicate red, green, and blue. Considering the recognizability, this application sets the color depth of each pixel to be only 1 bit (generally the picture is represented by 8 bits), that is, each pixel has 3 bits (8 states).

[0042] Among them, the RGB is a color standard in the industry. It is obtained by changing the three color channels of red (R), green (G), and blue (B) and superimposing them on each other to obtain various colors. RGB represents the colors of the three channels of red, green, and blue. This standard covers almost all colors that can be perceived by human vision and is one of the most widely used color systems. The color depth can also be called color bit depth, which is a unit that uses bits to represent the number of colors in digital images. Bit is a binary unit (or bit) for computer calculations, that is, the most basic data or information that can be processed in a computer.

[0043] Specifically, three two-color QR code frames are rendered with pure red, green and blue colors respectively and superimposed to generate a QR code frame with eight colors, which has the effect of increasing the transmission rate to three times that of the previous solution.

[0044] like Figure 5 As shown, a specific schematic diagram of synthesizing three monochrome two-dimensional code frames into a color two-dimensional code frame disclosed in the present application includes the following contents: The three monochrome QR code frames are placed in the R channel, G channel and B channel respectively, so that the original black parts are rendered as red, green and blue respectively, and then the three rendered QR code frames are superimposed, and the overlapping parts produce other colors due to color fusion.

[0045] S400, the present application generates a QR code video to be transmitted from multiple QR code frames.

[0046] Specifically, all generated color QR code frames are uniformly packaged to generate a QR code video.

[0047] The overall process of the above steps is as follows Figure 6 As shown, a specific schematic diagram of synthesizing three monochrome two-dimensional code frames into a color two-dimensional code frame disclosed in the present application includes the following contents: Encapsulate the inter-frame error correction information of n original data packets through the FEC encoder to generate n+2 data packets containing error correction information; Then, the n+2 data packets containing error correction information are encapsulated in the frame error correction information through the QR encoder one by one to generate n+2 monochrome two-dimensional code frames; Then, each of the three monochrome QR code frames is rendered with red, green and blue pure colors respectively, and the three rendered monochrome QR code frames are superimposed to generate a color QR code frame with eight colors; Finally, all the color QR code frames are encapsulated to generate a video.

[0048] The specific implementation process of this application is as follows: The present invention solves the problem step by step from the following aspects: 1. Introducing FEC error correction mechanism FEC (Forward Error Correction) is a technology used to control data transmission errors over unreliable or noisy communication channels. It is implemented by adding redundant data at the sending end, which can be used by the receiving end to detect and correct errors that may occur during transmission without requesting retransmission. This mechanism is very common in SD-WAN and other network fields. In this invention, FEC is used for error correction of QR code video images.

[0049] Since the QR code itself has its own error correction, FEC error correction does not need to be used in the same dimension as it, but is more suitable for use in the time dimension (between frames). If a whole frame is missed for some reason, FEC error correction can completely correct the data, such as Figure 2 shown.

[0050] The FEC error correction in the present invention uses the Reed-Solomon algorithm, that is, a block code encoding method of fixed-size blocks, which is exactly consistent with the fixed-size method of the QR code. Taking QR code Version 12 as an example, the size of each QR code is 65*65, that is, a fixed 4225 bits (including fixed-length positioning information and error correction information).

[0051] The encapsulation method is to first encapsulate the data to be transmitted into a series of original data packets of equal length, and then add redundant error correction information to the data packets through FEC encoding. Taking the following figure as an example, every 7 original data packets will be re-encapsulated by the FEC encoder into 9 data packets containing error correction information. During the transmission process, 2 of these 9 data packets can be lost at will without losing information. Subsequently, each data packet containing error correction information will be encapsulated by the QR encoder into a QR code frame containing further redundant information, and finally encapsulated into a video.

[0052] The data packet flow is as follows Figure 3 shown.

[0053] The structure of each QR code frame is as follows Figure 4 shown.

[0054] 2. Color channel overlay The above scheme has completed data redundancy (automatic error correction) in both intra-frame and inter-frame dimensions. However, in terms of data density, since each frame only requires black and white colors, in fact, no mainstream video encoding technology will be compatible with this scheme. Therefore, instead of writing a video playback APP with a special encoding mechanism, it is better to target the existing mainstream video encoding technology and add more information through different color channels in each frame.

[0055] Conventionally, each pixel of each video frame can be represented by three parameters R, G, and B to represent red, green, and blue. Taking recognition into consideration, the present invention sets the color depth of each pixel to only 1 bit (generally, the picture is represented by 8 bits), that is, each pixel has 3 bits (8 states).

[0056] The present invention renders and superimposes three two-dimensional code frames with red, green and blue pure colors respectively to generate a two-dimensional code frame with 8 colors, which has the effect of increasing the transmission rate to three times that of the previous solution.

[0057] Take a corner of a QR code as an example. Figure 5 The figure shows a schematic diagram of synthesizing three monochrome two-dimensional code frames into one color two-dimensional code frame.

[0058] The packet flow evolves as Figure 6 shown.

[0059] This can simultaneously improve information redundancy and data density.

[0060] 3. Decoding process The decoding process is also very simple. After the camera reads the image, it takes out three QR codes through the R, G, and B channels respectively, and then calls the QR code decoding module respectively to obtain multiple data packets containing FEC error correction information, and finally obtains the original data packet through FEC decoding.

[0061] The beneficial effects of the present application are that the QR code can be used for basic configuration initialization for CPE devices with a high security level (without USB); the QR code video stream has a highly redundant error correction mechanism that can tolerate the loss of some frames without video replay; and the information density is increased to three times that of a standard QR code without modifying the existing QR code decoding module.

[0062] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.

Claims

1. A method for producing a high-density two-dimensional code by reliably transmitting it using a camera, characterized in that: include: Encapsulate the data to be transmitted to generate a series of original data packets of equal length; Add error correction information to each of the original data packets according to FEC coding to obtain a transmission data packet containing the error correction information; Encapsulating each transmission data packet according to the QR encoder to obtain a corresponding two-dimensional code frame; The plurality of two-dimensional code frames corresponding to the data to be transmitted are used to generate a two-dimensional code video to be transmitted.

2. The method for producing a high-density two-dimensional code by reliably transmitting it using a camera as claimed in claim 1, characterized in that: The adding error correction information to each of the original data packets according to the FEC coding comprises: The FEC encoding uses the Reed-Solomon algorithm, which is a block code encoding method for fixed-size blocks, which is consistent with the fixed-size method of the QR code and generates FEC error correction information; Adding the FEC error correction information to each original data packet through an FEC encoder to generate a data packet containing the error correction information; The generated data packets containing error correction information are larger in number than the original data packets, thereby avoiding the loss of information due to data packet loss.

3. The method for producing a high-density two-dimensional code by reliably transmitting it using a camera as claimed in claim 1, characterized in that: The encapsulating each of the transmission data packets according to the QR encoder comprises: The QR encoder implements error correction by adding a certain number of error correction codes during the encoding process to generate QR error correction information; The data packet containing the error correction information and the QR error correction information are encapsulated by a QR encoder to generate a two-dimensional code frame containing further redundant information.

4. The method for producing a high-density two-dimensional code by reliably transmitting the high-density two-dimensional code by using a camera as claimed in claim 1, characterized in that: The multiple two-dimensional code frames corresponding to the data to be transmitted generate a two-dimensional code video to be transmitted, including: The two-dimensional code frames are all monochrome. For all the generated two-dimensional code frames, three two-dimensional code frames are rendered with red, green and blue pure colors respectively and superimposed to generate a color two-dimensional code frame with 8 colors; Encapsulate all color QR code frames into a QR code video.

5. The method for producing a high-density two-dimensional code by reliably transmitting it using a camera as claimed in claim 2, characterized in that: The generating of FEC error correction information comprises: The FEC error correction information is inter-frame error correction information between different pictures, which corrects the situation where a whole frame is missed.

6. The method for producing a high-density two-dimensional code by reliably transmitting it using a camera as claimed in claim 2, characterized in that: The generated data packets containing error correction information are larger than the number of original data packets, including: The FEC encoder re-encapsulates n original data packets into n+2 data packets containing error correction information. During the transmission process, any two of the n+2 data packets containing error correction information can be lost without losing information.

7. The method for producing a high-density two-dimensional code by reliably transmitting it using a camera as claimed in claim 3, characterized in that: The generating of QR error correction information comprises: The QR error correction information is intra-frame error correction information within the same picture. When it is detected that some data or positioning patterns within the QR code are erroneous or damaged, the QR decoder can use the redundant information of the QR code to try to correct these errors.

8. A device for reliably transmitting high-density two-dimensional codes using a camera, characterized in that: The device CPE includes a camera module and a two-dimensional code decoding module.

9. The device for reliably transmitting high-density two-dimensional codes using a camera according to claim 8, characterized in that: The camera module is a built-in camera of the CPE. The camera reads a specific QR code and uses the QR code decoding module as a basic configuration initialization process.

10. An electronic device, characterized in that: include: A computer device, characterized in that The system comprises a memory and a processor, wherein a computer program is stored in the memory.

Citation Information

Patent Citations

  • Data sending method and data receiving method

    CN108737547A

  • Data transmission device

    CN108881924A

  • Dynamic two-dimensional code error correction method based on differential coding

    CN114885171A

  • Coding method and decoding method of multi-frame matrix type two-dimensional code

    CN118761430A

  • Method and apparatus for transmitting packet-based image frame

    US20080232472A1