Data transmission method, device and system and storage medium

By storing the pixel values ​​of multiple QR code images into bits of each pixel of the RGB image and generating a new RGB image, the problem of low transmission efficiency of existing QR code images is solved, and efficient multi-dimensional Group of QR code image transmission.

CN119402602AActive Publication Date: 2025-02-07HEFEI SMART ENERGY INNOVATION PLATFORM CO LTD
View PDF 13 Cites 0 Cited by

Patent Information

Application Number
CN202510014007.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-03
Publication Date
2025-02-07
Estimated Expiration
2045-01-03

AI Technical Summary

Technical Problem

The existing QR code image transmission methods have low transmission efficiency, especially when transmitting from VGA interfaces, the frame rate and resolution limit the amount of information transmission.

Method used

By storing the pixel values ​​of multiple QR code images into bits of each pixel of the RGB image, and generating a new RGB image using the three primary color pixel byte values ​​of the RGB image, simultaneous transmission of multiple groups of QR code images is achieved. .

Benefits of technology

It improves data transmission speed and transmission efficiency, solves the problem of low QR code image transmission efficiency, and realizes the transmission of multiple groups of QR code images at the same time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119402602A_ABST
    Figure CN119402602A_ABST
Patent Text Reader

Abstract

The invention discloses a data transmission method, device and system and a storage medium. The method comprises the following steps: a data sending device obtains first pixel values of a plurality of to-be-transmitted two-dimensional code images, and stores the first pixel values of the plurality of to-be-transmitted two-dimensional code images into an RGB storage area; determining a first pixel value group in each byte storage area, and generating each three-primary color pixel byte value in the RGB image by using the first pixel value group, the first pixel value group including first pixel values of a plurality of different two-dimensional code images to be transmitted; and generating an RGB image by using the three-primary color pixel byte value, and sending the RGB image. According to the technical scheme of the embodiment of the invention, the characteristic that each pixel in the RGB image has multiple bits is fully utilized, multiple groups of two-dimensional code images are transmitted at the same time, the transmission efficiency is improved, and the problem that the transmission efficiency of the two-dimensional code images is relatively low is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data transmission, and in particular to a data transmission method, device, system and storage medium. Background Art

[0002] The existing methods of transmitting images through interfaces mainly include a two-dimensional code method, in which a sending end converts data into a two-dimensional code image, and a receiving end parses the two-dimensional code image into data.

[0003] However, the transmission efficiency of the traditional QR code transmission method is low. If the frame rate of the VGA interface is 60Hz, that is, 60 QR code images can be transmitted per second, taking an image with a resolution of 1280*720 as an example, the maximum information contained in the QR code is about 3KB, that is, the maximum amount that can be transmitted in 1 second is about 180KB. Summary of the invention

[0004] The present invention provides a data transmission method, device, system and storage medium to solve the problem of low transmission efficiency of two-dimensional code images.

[0005] In a first aspect, the present invention provides a data transmission method, applied to a data sending device, comprising:

[0006] Acquire first pixel values ​​of multiple two-dimensional code images to be transmitted, and store the first pixel values ​​of the multiple two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area;

[0007] Determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of a plurality of different two-dimensional code images to be transmitted;

[0008] Generate an RGB image using the three primary color pixel byte values, and send the RGB image.

[0009] In a second aspect, the present invention provides a data transmission method, applied to a data receiving device, comprising:

[0010] Receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method described in the first aspect above;

[0011] A two-dimensional code image is obtained by parsing the RGB image.

[0012] In a third aspect, the present invention provides a data transmission device, applied to a data sending device, comprising:

[0013] A storage module, used for acquiring first pixel values ​​of a plurality of two-dimensional code images to be transmitted, and storing the first pixel values ​​of the plurality of two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area;

[0014] A pixel byte generation module, used to determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of multiple different two-dimensional code images to be transmitted;

[0015] The image generation module is used to generate an RGB image using the three primary color pixel byte values ​​and send the RGB image.

[0016] In a fourth aspect, the present invention provides a data transmission device, applied to a data receiving device, comprising:

[0017] A receiving module, used for receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method described in the first aspect above;

[0018] The image analysis module is used to obtain a two-dimensional code image by analyzing the RGB image.

[0019] In a fifth aspect, the present invention provides a data transmission system, wherein the data transmission system includes a data receiving device and a data sending device;

[0020] The data receiving device and the data sending device both include: at least one processor, and a memory communicatively connected to the at least one processor;

[0021] The memory of the data sending device stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the steps performed by the data sending device in the data transmission method described in the first aspect above;

[0022] The memory of the data receiving device stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the steps performed by the data receiving device in the data transmission method described in the second aspect above.

[0023] In a sixth aspect, the present invention provides a computer-readable storage medium storing computer instructions, which are used to enable a processor to implement the data transmission method of the first aspect and / or the data transmission method of the second aspect when executed.

[0024] The present invention provides a data transmission scheme applied to a data sending device and a data receiving device. The data sending device makes full use of the multi-bit feature of each pixel in an RGB image and stores the pixel values ​​in a plurality of two-dimensional code images into the bit of each pixel of the RGB image, so that the receiving device can regenerate a plurality of two-dimensional code images by reading the analog signal of the RGB image, thereby realizing the simultaneous transmission of a plurality of groups of two-dimensional code images, increasing the data transmission speed, improving the transmission efficiency, and solving the problem of low transmission efficiency of two-dimensional code images.

[0025] It should be understood that the content described in this section is not intended to identify the key or important features of the present invention, nor is it intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0027] Figure 1 is a flowchart of a data transmission method provided according to Embodiment 1 of the present invention;

[0028] Figure 2 is a schematic diagram of the structure of an RGB storage area provided according to Embodiment 1 of the present invention;

[0029] Figure 3 is a flowchart of a data transmission method provided according to Embodiment 2 of the present invention;

[0030] Figure 4 This is a schematic diagram of dividing a sequence number area according to Embodiment 2 of the present invention;

[0031] Figure 5 is a flowchart of a data transmission method provided according to Embodiment 3 of the present invention;

[0032] Figure 6 is a flowchart of a data transmission method provided according to Embodiment 4 of the present invention;

[0033] Figure 7 is a structural schematic diagram of a data transmission device provided according to Embodiment 5 of the present invention;

[0034] Figure 8 is a structural schematic diagram of a data transmission device provided according to Embodiment 6 of the present invention;

[0035] Fig. 9 It is a structural diagram of a data transmission system provided according to Embodiment 7 of the present invention. DETAILED DESCRIPTION

[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0037] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In the description of the present invention, unless otherwise specified, "multiple" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist, for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0038] VGA (Video Graphics Array) is a video transmission standard with the advantages of high resolution, fast display rate and rich colors. It transmits video analog signals, including red, green, blue analog signals and synchronization signals (horizontal and vertical signals). VGA display outputs RGB primary color signals. Currently, VGA interface can be used to transmit images.

[0039] Embodiment 1

[0040] Figure 1A flowchart of a data transmission method is provided for Embodiment 1 of the present invention. This embodiment is applicable to the case of transmitting a two-dimensional code image via a VGA interface. The method can be executed by a data transmission device. The data transmission device can be implemented in the form of hardware and / or software. The data transmission device can be configured in a data sending device. The data sending device can be composed of one or more physical entities.

[0041] like Figure 1 As shown, a data transmission method provided in the first embodiment of the present invention specifically includes the following steps:

[0042] S101. Acquire first pixel values ​​of multiple two-dimensional code images to be transmitted, and store the first pixel values ​​of the multiple two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area.

[0043] Specifically, after the application generates data, the data can be segmented first, and the offset value of the segment data in the total data is added before each segment data. Then the segmented data is used to generate a binary two-dimensional code, and the number of pixels of the two-dimensional code must not exceed the size of the two-dimensional code area of ​​the VGA interface resolution. The offset is added here so that after the data receiving device receives the segmented data, it can sort the segmented data and reassemble it into total data according to the offset. The two-dimensional code image is usually a binary (only black and white) image, and the pixel value of each pixel in the two-dimensional code image requires 1 bit (bit) to represent, which can be specifically represented as 0 or 1. In this embodiment, the (first) pixel values ​​of multiple two-dimensional code images to be transmitted can be stored in the RGB storage area, wherein the RGB storage area can include an R (red) byte storage area, a G (green) byte storage area, and a B (blue) byte storage area. Each byte storage area may include multiple bit storage areas, and each bit storage area can store the first pixel value of the two-dimensional code image to be transmitted, so each byte storage area can store multiple different first pixel values ​​of the two-dimensional code images to be transmitted. For example, each byte storage area may include 8 bit storage areas, and each bit storage area may store at least one first pixel value of a two-dimensional code image to be transmitted.

[0044] S102. Determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of multiple different two-dimensional code images to be transmitted.

[0045] In this embodiment, a first pixel value group may be determined first, such as 8 first pixel values ​​as one first pixel value group, and then the first pixel value group in the R byte storage area, the G byte storage area, and the B byte storage area may be used to generate the three primary color pixel byte values ​​in the RGB image. The three primary color pixel byte values ​​include pixel values ​​of the three color channels of red, blue, and green.

[0046] For example, taking an image in RGB888 format as an example, each pixel of the image can contain 3 bytes of data (i.e. 24 bits), which are the three primary color pixel byte values, with the R channel, G channel and B channel each occupying one byte (one byte 8 bits). Each three primary color pixel byte value contains the first pixel value stored in the R byte storage area, the G byte storage area and the B byte storage area. An RGB888 format image can store n*24 pixel values ​​of the QR code image to be transmitted.

[0047] S103: Generate an RGB image using the three primary color pixel byte values, and send the RGB image.

[0048] In this embodiment, the RGB image can be generated using the three primary color pixel byte values. When the RGB image is transmitted through the VGA interface, it can be first converted into a VGA analog signal through a DAC (digital-to-analog conversion chip) and then transmitted to the receiving device.

[0049] The technical solution of the embodiment of the present invention makes full use of the multi-bit characteristic of each pixel in the RGB image and stores the pixel values ​​in multiple two-dimensional code images into the bits in each pixel of the RGB image, so that the receiving device can regenerate multiple two-dimensional code images by reading the analog signal of the RGB image, thereby realizing the simultaneous transmission of multiple groups of two-dimensional code images, increasing the data transmission speed, improving the transmission efficiency, and solving the problem of low efficiency in transmitting two-dimensional code images via the VGA interface.

[0050] Optionally, the bit storage areas contained in the R byte storage area, the G byte storage area and the B byte storage area respectively include: a preset high bit storage area and a preset anti-interference bit storage area; the preset high bit storage area stores different first pixel values ​​of the two-dimensional code images to be transmitted, and the preset anti-interference bit storage area stores the same first pixel value of the two-dimensional code image to be transmitted.

[0051] Specifically, during the transmission process of analog signals, the signal may be deviated due to increased noise and interference, so that the pixel values ​​before and after transmission may be different, and the low bit is usually most affected. The voltage range of the RGB channel analog signal of the VGA standard is usually between 0 and 0.714V. The resolution of 8bit is 2.8mV. In order to improve reliability, a high-bit storage area and an anti-interference bit storage area can be preset. The first pixel values ​​of different two-dimensional code images to be transmitted are stored in the preset high-bit storage area, and the first pixel values ​​of the same two-dimensional code image to be transmitted are stored in the preset anti-interference bit storage area. Among them, the preset high-bit storage area stores the preset high-bit pixels in the byte of each pixel in the RGB image, and the preset anti-interference bit storage area stores the preset low-bit pixels in the byte of each pixel in the RGB image. This setting can solve the problem of low accuracy of low-bit data transmission caused by signal deviation caused by interference.

[0052] For example, Figure 2 FIG. 1 is a schematic diagram of the structure of an RGB storage area. Figure 2 As shown, if the R byte storage area, the G byte storage area and the B byte storage area each contain 8 bit storage areas, 3 consecutive bit storage areas (R1 to R3, G1 to G3 and B1 to B3) can be preset high bit storage areas, and 5 consecutive bit storage areas (R4 to R8, G4 to G8 and B4 to B8) can be preset anti-interference bit storage areas. Since the first pixel value of the two-dimensional code image to be transmitted is stored in the preset anti-interference bit storage area, the pixel value of each bit is the same in multiple preset anti-interference bit storage areas. For example, in the preset anti-interference bit storage area, the value on the first bit can be 1 or 0. At this time, the RGB storage area can be regarded as a storage area for 12 two-dimensional code images. Among them, in this example, the preset high bit storage area stores the data of the upper 3 bits of the RGB image, and the preset anti-interference bit storage area stores the data of the lower 5 bits of the RGB image.

[0053] Exemplarily, the data transmission device can store the first pixel values ​​of multiple two-dimensional code images to be transmitted in the 8-bit storage areas respectively included in the R byte storage area, the G byte storage area and the B byte storage area through the R channel, the G channel and the B channel. In the R byte storage area, the G byte storage area and the B byte storage area, the first pixel values ​​of different two-dimensional code images can be stored in three consecutive high-bit storage areas, and the first pixel value of the same two-dimensional code image can be stored in five consecutive low-bit storage areas.

[0054] Embodiment 2

[0055] Figure 3This is a flow chart of a data transmission method provided in the second embodiment of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and provides a specific method for transmitting data through the VGA interface.

[0056] Optionally, before the RGB image is generated by using the three primary color pixel byte values, it also includes: using the R byte storage area and the G byte storage area to store the pixel value of the serial number identifier of the two-dimensional code image to be transmitted, and using the B byte storage area to store the pixel value of the check value of the serial number identifier, wherein the R byte storage area, the G byte storage area and the B byte storage area each contain a plurality of bit storage areas, and the serial number identifier is used to identify whether there is an update to the first pixel value of the two-dimensional code image to be transmitted in the bit storage area corresponding to the serial number; wherein, the RGB image is generated by using the three primary color pixel byte values, including: using the red pixel byte value, the green pixel byte value and the blue pixel byte value in the three primary color pixel byte values ​​to generate a target area image in the RGB image; using the pixel value of the serial number identifier stored in the R byte storage area and the G byte storage area, and the pixel value of the check value in the B byte storage area, correspondingly generating a serial area image in the RGB image; generating the RGB image by merging the target area image and the serial area image. The advantage of this arrangement is that by marking out a certain area in the RGB image to indicate whether the two-dimensional code image is updated, the data receiving device can quickly determine whether the two-dimensional code image received each time is updated.

[0057] like Figure 3 As shown, a data transmission method provided in Embodiment 2 of the present invention specifically includes the following steps:

[0058] S201. Obtain first pixel values ​​of multiple two-dimensional code images to be transmitted, and store the first pixel values ​​of the multiple two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area, and the bit storage areas respectively contained in the R byte storage area, the G byte storage area, and the B byte storage area include: a preset high bit storage area and a preset anti-interference bit storage area; the preset high bit storage area stores different first pixel values ​​of two-dimensional code images to be transmitted, and the preset anti-interference bit storage area stores the same first pixel value of the two-dimensional code image to be transmitted.

[0059] S202. Determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image.

[0060] S203, using the R byte storage area and the G byte storage area to store the pixel value of the serial number identifier of the two-dimensional code image to be transmitted, and using the B byte storage area to store the pixel value of the check value of the serial number identifier, wherein the R byte storage area, the G byte storage area and the B byte storage area each contain multiple bit storage areas, and the serial number identifier is used to identify whether the first pixel value of the two-dimensional code image to be transmitted in the bit storage area corresponding to the serial number is updated.

[0061] Specifically, the field synchronization signal (VSYNC) in the VGA signal can usually solve the image synchronization problem between the transmitter and the receiver, ensuring that the receiver receives a complete frame of the two-dimensional code image each time, and preventing the crossover or head-to-tail connection problems between the images. However, the receiver also needs to determine the image change information. If it cannot be determined, the receiver can only parse the two-dimensional code image all the time, and then determine whether there is a change based on the parsing result. However, the algorithm for parsing the two-dimensional code has a certain complexity, and parsing the two-dimensional code image all the time will occupy a large part of the CPU resources. In order to solve the above problems, the R byte storage area and the G byte storage area can be used to store the pixel value of the serial number identification of the two-dimensional code image to be transmitted, and the B byte storage area can be used to store the pixel value of the check value of the serial number identification.

[0062] S204. Generate a target area image in the RGB image using the red pixel byte value, the green pixel byte value and the blue pixel byte value in the three primary color pixel byte values.

[0063] Specifically, the red pixel byte value, the green pixel byte value and the blue pixel byte value in the three primary color pixel byte values ​​can be used to generate pixel values ​​in the R channel, the G channel and the B channel in the RGB image respectively, so as to obtain the target area image.

[0064] S205. Generate a serial number area image in the RGB image correspondingly using the pixel values ​​of the serial number identifiers stored in the R byte storage area and the G byte storage area, and the pixel values ​​of the check values ​​in the B byte storage area.

[0065] Specifically, in order to avoid the problem of low accuracy of low-bit data transmission of the serial number identifier and the check value, the bit storage areas contained in the R-byte storage area and the G-byte storage area for storing the serial number identifier pixel value, and the B-byte storage area for storing the check value pixel value also include a preset high-bit storage area and a preset anti-interference bit storage area. Exemplarily, if the R-byte storage area, the G-byte storage area, and the B-byte storage area each contain 8 bit storage areas, 3 consecutive bit storage areas (R6 to R8, G6 to G8, and B6 to B8) can be preset high-bit storage areas, and 5 consecutive bit storage areas (R1 to R5, G1 to G5, and B1 to B5) can be preset anti-interference bit storage areas. The same count pixel value can be stored in the preset anti-interference bit storage area of ​​the R byte storage area and the G byte storage area, and the same check pixel value can be stored in the preset anti-interference bit storage area of ​​the B byte storage area. At this time, the R byte storage area and the G byte storage area can each be regarded as a bit storage area for storing 4 serial number identification pixel values, and the B byte storage area can be regarded as a bit storage area for storing 4 check value pixel values. That is, the R byte storage area can be used to store the corresponding pixel value of the high bit of the serial number count in the serial number identification, such as the pixel value corresponding to the high four bits, and the G byte storage area can be used to store the pixel value corresponding to the low bit of the serial number count in the serial number identification, such as the pixel value corresponding to the low four bits. Each time the two-dimensional code image to be transmitted is updated, the serial number count will change, such as adding 1. The B byte storage area can be used to store the pixel value corresponding to the four-bit check value. The data receiving device can use the check value to check the serial number count. Exemplarily, the same count pixel value in the preset anti-interference bit storage area of ​​the R byte storage area is the pixel value corresponding to the last bit of the serial number count in the high-bit serial number count. The same count pixel value in the preset anti-interference bit storage area of ​​the G byte storage area is the pixel value corresponding to the last bit of the low bit number count. The same check pixel value in the preset anti-interference bit storage area of ​​the B byte storage area is the pixel value corresponding to the last bit of the check value bit.

[0066] Figure 4 The figure is a schematic diagram of the serial number area division. The number of pixels in the horizontal direction of the RGB image is usually greater than that in the vertical direction, while the QR code image is generally square. Figure 4As shown, the excess image portion in the horizontal direction can be determined as a serial area image, and the area is divided into multiple blocks. For example, if the preset anti-interference bit storage area contained in the R byte storage area, the G byte storage area, and the B byte storage area respectively stores the pixel values ​​of the lower four bits of the pixel value of each byte in the RGB image, that is, the preset anti-interference bit storage area stores the first pixel values ​​of 4 identical two-dimensional code images to be transmitted, the serial area image can be divided into 12 blocks, each block representing the serial area of ​​a bit storage area in the RGB storage area. The image area containing the pixel values ​​of the two-dimensional code image is determined as the target area image (i.e. Figure 4 in the QR code area).

[0067] S206: Generate the RGB image by merging the target area image and the serial number area image.

[0068] The data transmission method provided by the embodiment of the present invention demarcates a certain area in the RGB image to indicate whether the two-dimensional code image is updated, so that the data receiving device can quickly determine whether the two-dimensional code image received each time is updated.

[0069] Embodiment 3

[0070] Figure 5 A flowchart of a data transmission method is provided for the third embodiment of the present invention. This embodiment is applicable to the case of transmitting a two-dimensional code image through a VGA interface. The method can be executed by a data transmission device. The data transmission device can be implemented in the form of hardware and / or software. The data transmission device can be configured in a data receiving device, and the data receiving device can be composed of one or more physical entities.

[0071] like Figure 5 As shown, a data transmission method provided in the third embodiment of the present invention specifically includes the following steps:

[0072] S301. Receive an RGB image, wherein the RGB image is sent by a data sending device using the data transmission method described in the above embodiment.

[0073] S302: Obtain a two-dimensional code image by parsing the RGB image.

[0074] In this embodiment, the data receiving device can receive the RGB image sent by the data sending device through the data transmission method described in the above embodiment, and convert the analog signal into multiple groups of RGB images through an ADC (analog-to-digital conversion chip). The data receiving device can obtain pixel values ​​in the R channel, the G channel, and the B channel by parsing the RGB image, thereby obtaining n*24 two-dimensional code images.

[0075] The technical solution of the embodiment of the present invention makes full use of the multi-bit characteristics of each pixel in the RGB image, regenerates multiple two-dimensional code images by reading the analog signal of the RGB image, realizes the simultaneous transmission of multiple groups of two-dimensional code images, increases the data transmission speed, improves the transmission efficiency, and solves the problem of low efficiency in transmitting two-dimensional code images through the VGA interface.

[0076] Embodiment 4

[0077] Figure 6 This is a flow chart of a data transmission method provided in Embodiment 4 of the present invention. The technical solution of the embodiment of the present invention is further optimized on the basis of the above-mentioned optional technical solutions, and provides a specific method for receiving data through a VGA interface.

[0078] Optionally, the RGB image contains anti-interference pixels; wherein, the obtaining of the two-dimensional code image by parsing the RGB image includes: parsing the anti-interference pixels to obtain anti-interference pixel values, wherein the anti-interference pixel values ​​are pixel values ​​stored in the preset anti-interference bit storage areas of the R byte storage area, the G byte storage area, and the B byte storage area in the data sending device; when the anti-interference pixel value is greater than or equal to the first preset value, the anti-interference pixel value is converted to a first target pixel value, and when the anti-interference pixel value is less than the first preset value, the anti-interference pixel value is converted to a second target pixel value; parsing the pixel values ​​in the RGB image except the anti-interference pixel value to obtain a third target pixel value; using the third target pixel value and the first target pixel value to generate multiple two-dimensional code images; or using the third target pixel value and the second target pixel value to generate multiple two-dimensional code images. The advantage of such a setting is that, by comparing the size relationship between the anti-interference pixel value and the preset value, the data receiving device can quickly determine the original pixel value sent by the data sending device, thereby ensuring the accuracy of the transmission of the two-dimensional code image.

[0079] Optionally, the RGB image includes a serial number area image; the obtaining of the two-dimensional code image by parsing the RGB image includes: using the blue pixel byte value in the serial number area image for verification, and after the verification is passed, determining the updated three-primary color pixel byte values ​​in the target area image of the RGB image by parsing the red pixel byte value and the green pixel byte value in the serial number area image; and obtaining the two-dimensional code image by parsing the pixel values ​​corresponding to the updated three-primary color pixel byte values. The advantage of such a setting is that the data receiving device can quickly determine whether the current two-dimensional code image is an updated two-dimensional code image by parsing the serial number identifier of the serial number area image, calculating a small amount of time and in a short time, thereby reducing the amount of parsing of the two-dimensional code image, reducing CPU usage, and improving transmission efficiency, and the verification of the verification value further ensures the reliability of transmission.

[0080] like Figure 6 As shown, a data transmission method provided by Embodiment 4 of the present invention specifically includes the following steps:

[0081] S401. Receive an RGB image, wherein the RGB image includes anti-interference pixels and a serial number region image.

[0082] S402, using the blue pixel byte value in the serial area image to perform verification, and after the verification passes, determining the updated three primary color pixel byte values ​​in the target area image of the RGB image by parsing the red pixel byte value and the green pixel byte value in the serial area image.

[0083] Specifically, the receiving device can use an XOR operation to verify the blue pixel byte value in the B channel of the serial area image, that is, the check value. After the verification is passed, the updated pixel values ​​in the R channel, G channel and B channel of the target area image of the RGB image are determined by parsing the red pixel byte value and the green pixel byte value in the serial area image, that is, the serial number identifier in the R channel and the G channel. If the test fails, the RGB image of the channel can be directly discarded. If there is no updated pixel value in the target area image in the R channel, the G channel or the B channel, the RGB image of the channel can be directly discarded without further analysis. Among them, the countable maximum value corresponding to the red pixel byte value and the green pixel byte value in the serial area image can be 255, and after reaching the maximum value, it can continue to count from 0. There can be multiple ways to verify the blue pixel byte value in the serial area image, such as each bit value in the blue pixel byte value is the XOR value of the corresponding bit of the red pixel byte value and the green pixel byte value.

[0084] Among them, the preset area of ​​the serial number area image may contain multiple identical pixel values ​​(i.e., serial number identifiers). The data receiving device can determine the serial number identifier actually sent by the data sending device by determining the mode or average of the pixel values ​​in the preset area, which effectively solves the problem of inaccurate serial number identifiers caused by the offset or jitter of the image pixel position during the transmission process.

[0085] S403: Obtain a two-dimensional code image by parsing the pixel values ​​corresponding to the updated three primary color pixel byte values.

[0086] Specifically, the data receiving device may parse the updated three primary color pixel byte values ​​in the RGB image to obtain an updated two-dimensional code image.

[0087] S404. Analyze the anti-interference pixel to obtain an anti-interference pixel value, wherein the anti-interference pixel value is a pixel value stored in a preset anti-interference bit storage area of ​​each of an R byte storage area, a G byte storage area, and a B byte storage area in a data sending device.

[0088] S405. When the anti-interference pixel value is greater than or equal to a first preset value, convert the anti-interference pixel value to a first target pixel value; when the anti-interference pixel value is less than the first preset value, convert the anti-interference pixel value to a second target pixel value.

[0089] Specifically, when there is no signal interference, the anti-interference pixel value in the RGB image should be a multi-bit value composed of the same value, such as 11111 or 00000. However, due to the existence of interference, the actual value may not be just 11111 or 00000.

[0090] A first preset value is selected as a comparison reference so that the data receiving device eliminates interference from the anti-interference pixel value during transmission, wherein the value of the first preset value is not limited and can be determined according to the number of bits of the anti-interference pixel value. Exemplarily, if the anti-interference pixel value is a 5-bit value, it can be judged in the following way: when the anti-interference pixel value is greater than or equal to 10000, the interference pixel value is converted to 11111, and when it is less than 10000, the interference pixel value is converted to 00000.

[0091] S406: Analyze the pixel values ​​in the RGB image except the anti-interference pixel value to obtain a third target pixel value.

[0092] Specifically, the pixel values ​​in the RGB image except the anti-interference pixel values ​​are the pixel values ​​stored in the preset high-bit storage areas of the R byte storage area, the G byte storage area, and the B byte storage area in the data sending device.

[0093] S407: Generate multiple two-dimensional code images using the third target pixel value and the first target pixel value; or generate multiple two-dimensional code images using the third target pixel value and the second target pixel value.

[0094] Specifically, when the anti-interference pixel value is greater than or equal to the first preset value, multiple two-dimensional code images can be generated by integrating the third target pixel value and the first target pixel value. When the anti-interference pixel value is less than the first preset value, multiple two-dimensional code images can be generated by integrating the third target pixel value and the second target pixel value.

[0095] The data transmission method provided by the embodiment of the present invention analyzes the serial number identifier of the serial number area image and quickly determines whether the current two-dimensional code image is an updated two-dimensional code image with a small and short calculation time, thereby reducing the amount of analysis of the two-dimensional code image, reducing CPU occupancy, and improving transmission efficiency. The verification of the verification value further ensures the reliability of the transmission, and by comparing the size relationship between the anti-interference pixel value and the preset value, the data receiving device can quickly determine the original pixel value sent by the data sending device, thereby ensuring the accuracy of the two-dimensional code image transmission.

[0096] Embodiment 5

[0097] Figure 7 This is a schematic diagram of the structure of a data transmission device provided in Embodiment 5 of the present invention. Figure 7 As shown, the device is applied to a data sending device, and the device includes a storage module 501, a pixel byte generation module 502 and an image generation module 503, wherein:

[0098] A storage module, used for acquiring first pixel values ​​of a plurality of two-dimensional code images to be transmitted, and storing the first pixel values ​​of the plurality of two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area;

[0099] A pixel byte generation module, used to determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of multiple different two-dimensional code images to be transmitted;

[0100] The image generation module is used to generate an RGB image using the three primary color pixel byte values ​​and send the RGB image.

[0101] The data transmission device provided in the embodiment of the present invention makes full use of the multi-bit characteristic of each pixel in the RGB image, and stores the pixel values ​​in multiple two-dimensional code images into the bits in each pixel of the RGB image, so that the receiving device can regenerate multiple two-dimensional code images by reading the analog signal of the RGB image, thereby realizing the simultaneous transmission of multiple groups of two-dimensional code images, increasing the data transmission speed, improving the transmission efficiency, and solving the problem of low efficiency in transmitting two-dimensional code images via the VGA interface.

[0102] Optionally, the bit storage areas contained in the R byte storage area, the G byte storage area and the B byte storage area respectively include: a preset high bit storage area and a preset anti-interference bit storage area; the preset high bit storage area stores different first pixel values ​​of the two-dimensional code images to be transmitted, and the preset anti-interference bit storage area stores the same first pixel value of the two-dimensional code image to be transmitted.

[0103] Optionally, the device further comprises:

[0104] An identification and check value storage module is used to use the R byte storage area and the G byte storage area to store the pixel value of the serial number identification of the two-dimensional code image to be transmitted, and use the B byte storage area to store the pixel value of the check value of the serial number identification before generating an RGB image using the three primary color pixel byte values, wherein the R byte storage area, the G byte storage area and the B byte storage area each include multiple bit storage areas, and the serial number identification is used to identify whether the first pixel value of the two-dimensional code image to be transmitted in the bit storage area corresponding to the serial number is updated.

[0105] Optionally, the image generation module includes:

[0106] A target area image generating unit, configured to generate a target area image in an RGB image by using a red pixel byte value, a green pixel byte value and a blue pixel byte value in the three primary color pixel byte values;

[0107] A serial number area image generating unit, used to generate a serial number area image in the RGB image correspondingly using the pixel values ​​of the serial number identifiers stored in the R byte storage area and the G byte storage area, and the pixel values ​​of the check values ​​in the B byte storage area;

[0108] The RGB image generating unit is used to generate the RGB image by merging the target area image and the serial number area image.

[0109] The data transmission device provided in the embodiment of the present invention can execute the data transmission method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0110] Embodiment 6

[0111] Figure 8 This is a schematic diagram of the structure of a data transmission device provided by Embodiment 6 of the present invention. Figure 8 As shown, the device is applied to a data receiving device, and the device includes a receiving module 601 and an image parsing module 602, wherein:

[0112] A receiving module, used for receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method described in the above embodiment;

[0113] The image analysis module is used to obtain a two-dimensional code image by analyzing the RGB image.

[0114] The data transmission device provided in the embodiment of the present invention makes full use of the multi-bit characteristic of each pixel in the RGB image, regenerates multiple two-dimensional code images by reading the analog signal of the RGB image, thereby realizing the simultaneous transmission of multiple groups of two-dimensional code images, increasing the data transmission speed, improving the transmission efficiency, and solving the problem of low efficiency in transmitting two-dimensional code images through the VGA interface.

[0115] Optionally, the RGB image contains anti-interference pixels;

[0116] Among them, the image analysis module includes:

[0117] A first parsing unit is used to parse the anti-interference pixel to obtain an anti-interference pixel value, wherein the anti-interference pixel value is a pixel value stored in a preset anti-interference bit storage area of ​​each of the R byte storage area, the G byte storage area, and the B byte storage area in the data sending device;

[0118] a judgment unit, configured to convert the anti-interference pixel value into a first target pixel value when the anti-interference pixel value is greater than or equal to a first preset value, and to convert the anti-interference pixel value into a second target pixel value when the anti-interference pixel value is less than the first preset value;

[0119] A second parsing unit, used for parsing pixel values ​​in the RGB image except the anti-interference pixel value, to obtain a third target pixel value;

[0120] The two-dimensional code image generating unit is used to generate multiple two-dimensional code images using the third target pixel value and the first target pixel value; or to generate multiple two-dimensional code images using the third target pixel value and the second target pixel value.

[0121] Optionally, the RGB image includes a serial number area image;

[0122] Among them, the image analysis module includes:

[0123] an update determination unit, configured to perform verification using the blue pixel byte value in the sequence area image, and after the verification passes, determine the updated three primary color pixel byte values ​​in the target area image of the RGB image by parsing the red pixel byte value and the green pixel byte value in the sequence area image;

[0124] The third parsing unit is used to obtain a two-dimensional code image by parsing the pixel values ​​corresponding to the updated three-primary color pixel byte values.

[0125] Embodiment 7

[0126] Fig. 9The structural diagram of the data transmission system that can be used to implement the embodiment of the present invention is shown. The components shown herein, their connections and relationships, and their functions are only for example, and are not intended to limit the implementation of the present invention described and / or claimed herein.

[0127] like Fig. 9 As shown, the data transmission system 70 may include a data receiving device 701 and a data sending device 702. The data receiving device 701 includes at least one processor 703 and a memory 704 that is communicatively connected to the at least one processor 703, and the data sending device 702 includes at least one processor 705 and a memory 706 that is communicatively connected to the at least one processor 705. The memory may be a read-only memory (ROM) and a random access memory (RAM), etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor may perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) or the computer program loaded from the storage unit to the random access memory (RAM).

[0128] The memory of the data sending device stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data transmission method applied to the data sending device as described above. The memory of the data receiving device stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the data transmission method applied to the data receiving device as described above.

[0129] In the RAM, various programs and data required for the operation of the data receiving device or the data sending device can also be stored. The processor, ROM, and RAM are connected to each other through a bus. The input / output (I / O) interface is also connected to the bus. Multiple components in the data receiving device or the data sending device are connected to the I / O interface, including: input units, such as keyboards, mice, etc.; output units, such as various types of displays, speakers, etc.; storage units, such as disks, optical disks, etc.; and communication units, such as network cards, modems, wireless communication transceivers, etc. The communication unit allows the data receiving device or the data sending device to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunication networks.

[0130] The processor may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processors include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor executes the various methods and processes described above, such as a data transmission method.

[0131] In some embodiments, the data transmission method may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit. In some embodiments, part or all of the computer program may be loaded and / or installed on a data receiving device or a data sending device via a ROM and / or a communication unit. When the computer program is loaded into the RAM and executed by the processor, one or more steps of the data transmission method described above may be performed. Alternatively, in other embodiments, the processor may be configured to perform the data transmission method in any other appropriate manner (e.g., by means of firmware).

[0132] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0133] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0134] The computer device provided above can be used to execute the data transmission method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0135] Embodiment 8

[0136] In the context of the present invention, a computer-readable storage medium may be a tangible medium, and the computer-executable instructions are used to execute a data transmission method applied to a data sending device and / or a data transmission method applied to a data receiving device when executed by a computer processor. The data transmission method applied to a data sending device includes:

[0137] Acquire first pixel values ​​of multiple two-dimensional code images to be transmitted, and store the first pixel values ​​of the multiple two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area;

[0138] Determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of a plurality of different two-dimensional code images to be transmitted;

[0139] Generate an RGB image using the three primary color pixel byte values, and send the RGB image.

[0140] A data transmission method applied to a data receiving device, comprising:

[0141] Receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method described in the above embodiment;

[0142] A two-dimensional code image is obtained by parsing the RGB image.

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

[0144] The computer device provided above can be used to execute the data transmission method provided in any of the above embodiments, and has corresponding functions and beneficial effects.

[0145] It is worth noting that in the embodiment of the above-mentioned data transmission device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.

[0146] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A data transmission method, applied to a data sending device, characterized in that: include: Acquire first pixel values ​​of multiple two-dimensional code images to be transmitted, and store the first pixel values ​​of the multiple two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area; Determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of a plurality of different two-dimensional code images to be transmitted; Generate an RGB image using the three primary color pixel byte values, and send the RGB image.

2. The method according to claim 1, characterized in that: The bit storage areas contained in the R byte storage area, the G byte storage area and the B byte storage area respectively include: a preset high bit storage area and a preset anti-interference bit storage area; the preset high bit storage area stores different first pixel values ​​of the two-dimensional code images to be transmitted, and the preset anti-interference bit storage area stores the same first pixel value of the two-dimensional code image to be transmitted.

3. The method according to claim 1, characterized in that Before generating the RGB image using the three primary color pixel byte values, the method further includes: The R byte storage area and the G byte storage area are used to store the pixel value of the serial number identification of the two-dimensional code image to be transmitted, and the B byte storage area is used to store the pixel value of the check value of the serial number identification, wherein the R byte storage area, the G byte storage area and the B byte storage area each include a plurality of bit storage areas, and the serial number identification is used to identify whether the first pixel value of the two-dimensional code image to be transmitted in the bit storage area corresponding to the serial number is updated; The step of generating an RGB image using the three primary color pixel byte values ​​includes: Generate a target area image in an RGB image using a red pixel byte value, a green pixel byte value, and a blue pixel byte value in the three primary color pixel byte values; Generate a serial number region image in the RGB image correspondingly using the pixel values ​​of the serial number identifiers stored in the R byte storage area and the G byte storage area, and the pixel value of the check value in the B byte storage area; The RGB image is generated by merging the target area image and the serial number area image.

4. A data transmission method, applied to a data receiving device, characterized in that: include: Receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method according to any one of claims 1 to 3; A two-dimensional code image is obtained by parsing the RGB image.

5. The method according to claim 4, characterized in that The RGB image contains anti-interference pixels; wherein obtaining a two-dimensional code image by parsing the RGB image includes: Parsing the anti-interference pixel to obtain an anti-interference pixel value, wherein the anti-interference pixel value is a pixel value stored in a preset anti-interference bit storage area of ​​each of an R byte storage area, a G byte storage area, and a B byte storage area in a data sending device; When the anti-interference pixel value is greater than or equal to a first preset value, the anti-interference pixel value is converted to a first target pixel value; when the anti-interference pixel value is less than the first preset value, the anti-interference pixel value is converted to a second target pixel value; Analyzing pixel values ​​in the RGB image except the anti-interference pixel value to obtain a third target pixel value; A plurality of two-dimensional code images are generated by using the third target pixel value and the first target pixel value; or a plurality of two-dimensional code images are generated by using the third target pixel value and the second target pixel value.

6. The method according to claim 4 or 5, characterized in that: The RGB image includes a serial number area image; and obtaining a two-dimensional code image by parsing the RGB image includes: Using the blue pixel byte value in the sequence number area image to perform verification, and after the verification passes, determining the updated three primary color pixel byte values ​​in the target area image of the RGB image by parsing the red pixel byte value and the green pixel byte value in the sequence number area image; The two-dimensional code image is obtained by parsing the pixel values ​​corresponding to the updated three primary color pixel byte values.

7. A data transmission device, applied to a data sending device, comprising: A storage module, used for acquiring first pixel values ​​of a plurality of two-dimensional code images to be transmitted, and storing the first pixel values ​​of the plurality of two-dimensional code images to be transmitted into an RGB storage area, wherein the RGB storage area includes an R byte storage area, a G byte storage area, and a B byte storage area; A pixel byte generation module, used to determine a first pixel value group in each byte storage area, and use the first pixel value group to generate each three-primary color pixel byte value in the RGB image, wherein the first pixel value group includes first pixel values ​​of multiple different two-dimensional code images to be transmitted; The image generation module is used to generate an RGB image using the three primary color pixel byte values ​​and send the RGB image.

8. A data transmission device, applied to a data receiving device, comprising: A receiving module, used for receiving an RGB image, wherein the RGB image is sent by a data sending device through the data transmission method according to any one of claims 1 to 3; The image analysis module is used to obtain a two-dimensional code image by analyzing the RGB image.

9. A data transmission system, characterized in that: The data transmission system includes a data receiving device and a data sending device; The data receiving device and the data sending device both include: at least one processor, and a memory communicatively connected to the at least one processor; The memory of the data sending device stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the steps performed by the data sending device in the data transmission method according to any one of claims 1 to 3; The memory of the data receiving device stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the steps performed by the data receiving device in the data transmission method described in any one of claims 4 to 6.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the data transmission method described in any one of claims 1-3 and / or the data transmission method described in any one of claims 4-6 when executed.

Citation Information

Patent Citations

  • Method for realizing color two-dimensional code

    CN106485305A

  • Digital asset transmission method and system, terminal and storage medium

    CN110650111A

  • Infrared image packaging transmission method and device, electronic equipment and storage medium

    CN115714850A

  • DMI image information acquisition and transmission method, system, equipment and medium

    CN117119145A

  • Two-dimensional code construction method and device, decoding method and device, equipment and storage medium

    CN117371475A