CN114039969A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN114039969A
CN114039969A CN202111308775.1A CN202111308775A CN114039969A CN 114039969 A CN114039969 A CN 114039969A CN 202111308775 A CN202111308775 A CN 202111308775A CN 114039969 A CN114039969 A CN 114039969A
Authority
CN
China
Prior art keywords
data
file
images
coded
image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111308775.1A
Other languages
Chinese (zh)
Inventor
邓建全
阴嘉伟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Everbright Technology Co ltd
Original Assignee
Everbright Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Everbright Technology Co ltd filed Critical Everbright Technology Co ltd
Priority to CN202111308775.1A priority Critical patent/CN114039969A/en
Publication of CN114039969A publication Critical patent/CN114039969A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N19/00Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
    • H04N19/42Methods or arrangements for coding, decoding, compressing or decompressing digital video signals characterised by implementation details or hardware specially adapted for video compression or decompression, e.g. dedicated software implementation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N5/00Details of television systems
    • H04N5/76Television signal recording

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

The invention provides a data transmission method and a data transmission device, wherein the method comprises the following steps: encoding target data of a restricted environment and generating a plurality of encoded images, wherein the restricted environment can only receive data and cannot transmit data outwards; transmitting the coded image to an external environment in a video recording mode or a screen capturing mode; the target data is obtained by decoding the plurality of coded images in the external environment, the problem that data transmission cannot be achieved in some specific limited environments in the related art can be solved, the data of the limited environments are coded to generate coded images, the coded images are transmitted to the external environment in a video recording or screen capturing mode, and then the images are decoded, so that the data are restored, and the target that the data are transmitted to the external environment from the limited environments is achieved.

Description

Data transmission method and device
Technical Field
The invention relates to the field of data processing, in particular to a data transmission method and device.
Background
At present, in the field of IT systems, common data transmission modes include modes of transmission through a TCP/IP network and hardware storage media, such as common FTP service, browsing web pages, and frequently used instant messaging tools can also be used for transmitting data, and one common point of the modes is that data transmission is performed on the basis of a network, that is, two communication parties are bidirectional, for example, a communication party a sends data to a communication party B through a network transmission protocol, and the communication party B also sends data to the communication party a through the network transmission protocol; the data file is moved from the computer A to the computer B by transferring the data through the hardware storage medium, for example, by accessing the USB removable memory to the computer A, copying the data file to the USB removable memory, then removing the USB removable memory from the computer A, accessing the USB removable memory to the computer B, and copying the data file of the USB removable memory to the computer B.
In some specific environments, limited by some policies, some restrictions may be imposed on network communication, for example, in some environment, only the communication party a is allowed to send data to the communication party B, but the communication party B cannot send data to the communication party a, and at this time, if the communication party B needs to transmit data to the communication party a, it can only be implemented by other means, such as a mobile storage medium, but in some environments, the mobile storage medium is not allowed to access the system environment.
No solution has been proposed to the problem in the related art that data transmission cannot be achieved in some specific limited environments.
Disclosure of Invention
The embodiment of the invention provides a data transmission method and a data transmission device, which are used for at least solving the problem that data transmission cannot be realized in some specific limited environments in the related art.
According to an embodiment of the present invention, there is provided a data transmission method including:
encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and cannot send the data outwards;
transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
and carrying out image decoding on the plurality of coded images in the external environment to obtain the target data.
Optionally, encoding the data of the restricted environment and generating the encoded image comprises:
if the target data is text data, acquiring the data length and the data content of the text data, generating a first coded image according to the data length, and then respectively generating different coded images in a segmented manner according to the data content to obtain a plurality of coded images;
if the target data is file data, acquiring a file name, a file length and file content of the file data, generating a first coded image by using the file name and the file length, and then respectively generating different coded images in a segmented manner aiming at the file content to obtain a plurality of coded images;
and displaying the plurality of coded images on a display screen according to a preset rule.
Optionally, image decoding the plurality of encoded images in the external environment to obtain the target data includes:
if the target data is text data, acquiring the file length of the text data by analyzing the first coded image, creating a local file, analyzing coded images except the first coded image in the plurality of coded images, and writing the text content obtained by analysis into the local file; after the plurality of coded images are analyzed, closing the local file;
if the target data is file data, acquiring a file name and a file length of the file data by analyzing the first coded image; creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the analyzed file content into the local file; and closing the local file after the plurality of coded images are analyzed.
Optionally, generating a first encoded image according to the data length, and then generating different encoded images by segmenting for the data content, respectively, to obtain the plurality of encoded images includes:
generating a first data structure content string according to the data length, and generating a first coded image by using the first data structure content string;
and segmenting the file content to generate a plurality of second data structure content strings, and generating different coded images by using the plurality of second data structure content strings respectively to obtain the plurality of coded images.
Optionally, generating a first encoded image by using the file name and the file length, and then generating different encoded images by segmenting the file content, respectively, to obtain the plurality of encoded images includes:
forming a third data structure content string by the file name and the file length, and generating a first coded image by using the third data structure content string;
and segmenting the file content to generate a plurality of fourth data structure content strings, and generating different coded images by using the plurality of fourth data structure content strings respectively to obtain the plurality of coded images.
Optionally, the transmitting the encoded image to the external environment by a video recording method or a screen capturing method includes:
recording the two-dimensional code displayed on the display screen to obtain a video file; or, screen capturing is carried out on the two-dimensional code displayed on the display screen to obtain a plurality of screen capturing images;
transmitting the video file or the screenshot image to an external environment.
Optionally, performing image decoding on the encoded image in the external environment to obtain the target data includes:
saving each frame of content of the video file into one image to obtain a plurality of video images; decoding the plurality of video images to obtain the target data; alternatively, the first and second electrodes may be,
and decoding the plurality of screen capture images to obtain the target data.
According to another embodiment of the present invention, there is also provided a data transmission apparatus including:
the encoding module is used for encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and cannot send the data outwards;
the transmission module is used for transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
and the decoding module is used for carrying out image decoding on the plurality of coded images in the external environment to obtain the target data.
Optionally, the encoding module comprises:
the first generation submodule is used for acquiring the data length and the data content of the text data if the target data is the text data, generating a first coded image according to the data length, and then respectively generating different coded images in a segmented mode according to the data content to obtain a plurality of coded images;
the second generation submodule is used for acquiring the file name, the file length and the file content of the file data if the target data is the file data, generating a first coded image by using the file name and the file length, and then respectively generating different coded images in a segmented manner aiming at the file content to obtain a plurality of coded images;
and the display sub-module is used for displaying the plurality of coded images on a display screen according to a preset rule.
Optionally, the decoding module comprises:
the first decoding submodule is used for acquiring the file length of the text data by analyzing the first coded image if the target data is the text data, creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the text content obtained by analysis into the local file; after the plurality of coded images are analyzed, closing the local file;
the second decoding submodule is used for obtaining the file name and the file length of the file data by analyzing the first coded image if the target data is the file data; creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the analyzed file content into the local file; and closing the local file after the plurality of coded images are analyzed.
Optionally, the first generation submodule is further configured to:
generating a first data structure content string according to the data length, and generating a first coded image by using the first data structure content string;
and segmenting the file content to generate a plurality of second data structure content strings, and generating different coded images by using the plurality of second data structure content strings respectively to obtain the plurality of coded images.
Optionally, the second generation submodule is further configured to:
forming a third data structure content string by the file name and the file length, and generating a first coded image by using the third data structure content string;
and segmenting the file content to generate a plurality of fourth data structure content strings, and generating different coded images by using the plurality of fourth data structure content strings respectively to obtain the plurality of coded images.
Optionally, the transmission module is further configured to:
recording the two-dimensional code displayed on the display screen to obtain a video file; or, screen capturing is carried out on the two-dimensional code displayed on the display screen to obtain a plurality of screen capturing images;
transmitting the video file or the screenshot image to an external environment.
Optionally, the decoding module is further configured to:
saving each frame of content of the video file into one image to obtain a plurality of video images; decoding the plurality of video images to obtain the target data; alternatively, the first and second electrodes may be,
and decoding the plurality of screen capture images to obtain the target data.
According to a further embodiment of the present invention, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above-described method embodiments when executed.
According to yet another embodiment of the present invention, there is also provided an electronic device, including a memory in which a computer program is stored and a processor configured to execute the computer program to perform the steps in any of the above method embodiments.
According to the invention, target data of a limited environment is coded, and a plurality of coded images are generated, wherein the limited environment can only receive data and cannot send the data outwards; transmitting the coded image to an external environment in a video recording mode or a screen capturing mode; the target data is obtained by decoding the plurality of coded images in the external environment, the problem that data transmission cannot be achieved in some specific limited environments in the related art can be solved, the data of the limited environments are coded to generate coded images, the coded images are transmitted to the external environment in a video recording or screen capturing mode, and then the images are decoded, so that the data are restored, and the target that the data are transmitted to the external environment from the limited environments is achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware configuration of a mobile terminal of a data transmission method of an embodiment of the present invention;
FIG. 2 is a flow chart of a method of data transmission according to an embodiment of the present invention;
fig. 3 is a flowchart of generating a two-dimensional code image according to an embodiment of the present invention;
fig. 4 is a flowchart of two-dimensional code image decoding according to an embodiment of the present invention;
fig. 5 is a block diagram of a data transmission apparatus according to an embodiment of the present invention.
Detailed Description
The invention will be described in detail hereinafter with reference to the accompanying drawings in conjunction with embodiments. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The method provided by the first embodiment of the present application may be executed in a mobile terminal, a computer terminal, or a similar computing device. Taking a mobile terminal as an example, fig. 1 is a hardware structure block diagram of a mobile terminal of a data transmission method according to an embodiment of the present invention, and as shown in fig. 1, the mobile terminal may include one or more processors 102 (only one is shown in fig. 1) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), and a memory 104 for storing data, and optionally, the mobile terminal may further include a transmission device 106 for a communication function and an input/output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is only an illustration, and does not limit the structure of the mobile terminal. For example, the mobile terminal may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store computer programs, for example, software programs and modules of application software, such as computer programs corresponding to the data transmission method in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in the memory 104, so as to implement the method described above. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to the mobile terminal over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used for receiving or transmitting data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a Network adapter (NIC), which can be connected to other Network devices through a base station so as to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used for communicating with the internet in a wireless manner.
In this embodiment, a data transmission method operating in the mobile terminal or the network architecture is provided, and fig. 2 is a flowchart of the data transmission method according to the embodiment of the present invention, as shown in fig. 2, the flowchart includes the following steps:
step S202, encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and cannot send the data outwards;
step S204, transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
in an embodiment of the present invention, the step S204 may specifically include: recording the two-dimensional code displayed on the display screen to obtain a video file; or, screen capturing is carried out on the two-dimensional code displayed on the display screen to obtain a plurality of screen capturing images; transmitting the video file or the screenshot image to an external environment.
Step S206, performing image decoding on the plurality of encoded images in the external environment to obtain the target data.
In an embodiment of the present invention, the step S206 may specifically include: saving each frame of content of the video file into one image to obtain a plurality of video images; decoding the plurality of video images to obtain the target data; or decoding the plurality of screen capture images to obtain the target data.
In an embodiment of the present invention, the step S202 may specifically include:
if the target data is text data, acquiring the data length and the data content of the text data, generating a first coded image according to the data length, and then generating different coded images in a segmentation mode aiming at the data content to obtain a plurality of coded images; segmenting the file content to generate a plurality of second data structure content strings, and generating different coded images by using the plurality of second data structure content strings respectively to obtain a plurality of coded images;
if the target data is file data, acquiring a file name, a file length and file content of the file data, generating a first coded image by using the file name and the file length, and then generating different coded images by segmenting aiming at the file content to obtain a plurality of coded images, specifically, forming a third data structure content string by using the file name and the file length, and generating the first coded image by using the third data structure content string; segmenting the file content to generate a plurality of fourth data structure content strings, and generating different coded images by using the plurality of fourth data structure content strings respectively to obtain a plurality of coded images;
and displaying the plurality of coded images on a display screen according to a preset rule.
In an embodiment of the present invention, the step S206 may specifically include:
if the target data is text data, acquiring the file length of the text data by analyzing the first coded image, creating a local file, analyzing coded images except the first coded image in the plurality of coded images, and writing the text content obtained by analysis into the local file; after the plurality of coded images are analyzed, closing the local file;
if the target data is file data, acquiring a file name and a file length of the file data by analyzing the first coded image; creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the analyzed file content into the local file; and closing the local file after the plurality of coded images are analyzed.
The acquisition end in the embodiment of the invention can be replaced by common screen recording software or a video recording tool of a common mobile phone, for example, when a remote desktop is used for accessing a cloud host, the screen recording software is deployed at the host end to acquire a two-dimensional code image displayed in the cloud desktop, or the video recording tool of the mobile phone is used to record the two-dimensional code content displayed by a display screen into a video file, and then the video file is sent to the decoding end to analyze a video frame and decode the two-dimensional code. The sending data is coded, so that binary contents such as common text information, common word documents, executable files and the like can be converted into two-dimensional code images after being coded, then the two-dimensional codes are decoded through a decoding end to obtain transmission content segments, and each two-dimensional code also comprises data position and length information, so that the original file contents can be assembled after all two-dimensional code pictures are obtained, and in the whole process, any storage device does not need to be connected to a data sending end and a receiving end.
One feature of the controlled environment is that data can be received, but not transmitted outside. Reading the characteristics and the content of the transmitted data, reading the file name, the file content length and the file content of the transmission file, then generating a two-dimensional code image by the file name and the file length, and simultaneously generating different two-dimensional code images in a segmenting mode according to the content of the file, wherein the two-dimensional code images are displayed on a display screen in turn. And recording or capturing the screen of the two-dimensional code displayed on the display screen after the coding. And decoding the acquired two-dimensional code image, analyzing the data position, storing the data position in the designated position of the target file, and closing the file after all the data are received.
After starting, according to a file selected by a user, obtaining a file name and a file length, and forming a content string similar to the following data structure:
Figure BDA0003341068750000091
the Type identifies the Type of the two-dimensional code data, the Name identifies the Name of a transmission file, and the Length identifies the Length of the file. After the information is acquired, a coded image is generated by using the information, for example, a two-dimensional code image is generated and displayed on a display screen, then, the file content starts to be read, the content with the specified length, for example, the content with the length of 1000 bytes, is read each time, and then the following data structure content string is generated:
Figure BDA0003341068750000101
the data field stores the read file content, and after the content string is generated, the encoded image is generated by using the information after the content string is acquired. Fig. 3 is a flowchart of generating a two-dimensional code image according to an embodiment of the present invention, as shown in fig. 3, including:
step S301, selecting a file to be transmitted;
step S302, reading file metadata;
step S303, generating a two-dimensional code image;
step S304, reading the file content;
and step S305, judging whether the reading is finished, returning to the step S303 under the condition that the judgment result is negative, and ending the step S303 if the judgment result is negative.
The acquisition module acquires contents displayed in the display screen regularly in a screen capturing or screen recording mode, and the acquisition frequency is required to be greater than the frequency of the two-dimensional code displayed by the sending module.
Analyzing the acquired data, if the acquisition module outputs a screen recording result, namely a video file, analyzing each frame of content of the video to be stored as a picture, then analyzing a two-dimensional code in each picture by a decoding module, acquiring file metadata to be transmitted by analyzing a first two-dimensional code picture, wherein the file metadata comprises a file name and a file length, creating a file locally, beginning to analyze the two-dimensional code picture, and acquiring a data structure similar to the following data structure after each two-dimensional code picture is decoded:
Figure BDA0003341068750000111
and writing the content of the data field into the region from the position of the start of the file from x to x + len according to the Pos and Length field contents, if the content exists in the region, ignoring the current data until all the content is received, and closing the file. Fig. 4 is a flowchart of decoding a two-dimensional code image according to an embodiment of the present invention, as shown in fig. 4, including:
step S401, decoding a first two-dimensional code image to obtain metadata;
step S402, creating a file according to the metadata;
step S403, decoding the two-dimensional code image;
step S404, judging whether all the two-dimensional code images are processed completely, if so, executing step S405, otherwise, executing step S406;
step S405, writing into the created file;
step S406, closing the file.
The pseudo-code flow is as follows:
Figure BDA0003341068750000112
Figure BDA0003341068750000121
according to another embodiment of the present invention, there is also provided a data transmission apparatus, and fig. 5 is a block diagram of the data transmission apparatus according to the embodiment of the present invention, as shown in fig. 5, including:
an encoding module 52, configured to encode target data of a restricted environment and generate a plurality of encoded images, wherein the restricted environment can only receive data and cannot send data to the outside;
a transmission module 54, configured to transmit the encoded image to an external environment in a video recording manner or a screen capturing manner;
a decoding module 56, configured to perform image decoding on the multiple encoded images in the external environment to obtain the target data.
Optionally, the encoding module 52 includes:
the first generation submodule is used for acquiring the data length and the data content of the text data if the target data is the text data, generating a first coded image according to the data length, and then respectively generating different coded images in a segmented mode according to the data content to obtain a plurality of coded images;
the second generation submodule is used for acquiring the file name, the file length and the file content of the file data if the target data is the file data, generating a first coded image by using the file name and the file length, and then respectively generating different coded images in a segmented manner aiming at the file content to obtain a plurality of coded images;
and the display sub-module is used for displaying the plurality of coded images on a display screen according to a preset rule.
Optionally, the decoding module 56 includes:
the first decoding submodule is used for acquiring the file length of the text data by analyzing the first coded image if the target data is the text data, creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the text content obtained by analysis into the local file; after the plurality of coded images are analyzed, closing the local file;
the second decoding submodule is used for obtaining the file name and the file length of the file data by analyzing the first coded image if the target data is the file data; creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the analyzed file content into the local file; and closing the local file after the plurality of coded images are analyzed.
Optionally, the first generation submodule is further configured to:
generating a first data structure content string according to the data length, and generating a first coded image by using the first data structure content string;
and segmenting the file content to generate a plurality of second data structure content strings, and generating different coded images by using the plurality of second data structure content strings respectively to obtain the plurality of coded images.
Optionally, the second generation submodule is further configured to:
forming a third data structure content string by the file name and the file length, and generating a first coded image by using the third data structure content string;
and segmenting the file content to generate a plurality of fourth data structure content strings, and generating different coded images by using the plurality of fourth data structure content strings respectively to obtain the plurality of coded images.
Optionally, the transmission module 54 is further configured to:
recording the two-dimensional code displayed on the display screen to obtain a video file; or, screen capturing is carried out on the two-dimensional code displayed on the display screen to obtain a plurality of screen capturing images;
transmitting the video file or the screenshot image to an external environment.
Optionally, the decoding module 56 is further configured to:
saving each frame of content of the video file into one image to obtain a plurality of video images; decoding the plurality of video images to obtain the target data; alternatively, the first and second electrodes may be,
and decoding the plurality of screen capture images to obtain the target data.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Embodiments of the present invention also provide a computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and can not send data outwards;
s2, transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
s3, performing image decoding on the plurality of encoded images in the external environment to obtain the target data.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic apparatus may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and can not send data outwards;
s2, transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
s3, performing image decoding on the plurality of encoded images in the external environment to obtain the target data.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
It will be apparent to those skilled in the art that the modules or steps of the present invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.
The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, or improvement made within the principle of the present invention should be included in the protection scope of the present invention.

Claims (10)

1. A method of data transmission, comprising:
encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and cannot send the data outwards;
transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
and carrying out image decoding on the plurality of coded images in the external environment to obtain the target data.
2. The method of claim 1, wherein encoding data of a restricted environment and generating an encoded image comprises:
if the target data is text data, acquiring the data length and the data content of the text data, generating a first coded image according to the data length, and then respectively generating different coded images in a segmented manner according to the data content to obtain a plurality of coded images;
if the target data is file data, acquiring a file name, a file length and file content of the file data, generating a first coded image by using the file name and the file length, and then respectively generating different coded images in a segmented manner aiming at the file content to obtain a plurality of coded images;
and displaying the plurality of coded images on a display screen according to a preset rule.
3. The method of claim 2, wherein image decoding the plurality of encoded images in the external environment to obtain the target data comprises:
if the target data is text data, acquiring the file length of the text data by analyzing the first coded image, creating a local file, analyzing coded images except the first coded image in the plurality of coded images, and writing the text content obtained by analysis into the local file; after the plurality of coded images are analyzed, closing the local file;
if the target data is file data, acquiring a file name and a file length of the file data by analyzing the first coded image; creating a local file, analyzing the coded images except the first coded image in the plurality of coded images, and writing the analyzed file content into the local file; and closing the local file after the plurality of coded images are analyzed.
4. The method of claim 2, wherein generating a first encoded image from the data length, and then generating different encoded images for each segment of the data content, and obtaining the plurality of encoded images comprises:
generating a first data structure content string according to the data length, and generating a first coded image by using the first data structure content string;
and segmenting the file content to generate a plurality of second data structure content strings, and generating different coded images by using the plurality of second data structure content strings respectively to obtain the plurality of coded images.
5. The method of claim 2, wherein generating a first encoded image by using the file name and the file length, and then generating different encoded images by segmenting the file content, respectively, to obtain the plurality of encoded images comprises:
forming a third data structure content string by the file name and the file length, and generating a first coded image by using the third data structure content string;
and segmenting the file content to generate a plurality of fourth data structure content strings, and generating different coded images by using the plurality of fourth data structure content strings respectively to obtain the plurality of coded images.
6. The method of any one of claims 1 to 5, wherein transmitting the encoded image to the external environment by video recording or screen capturing comprises:
recording the two-dimensional code displayed on the display screen to obtain a video file; or, screen capturing is carried out on the two-dimensional code displayed on the display screen to obtain a plurality of screen capturing images;
transmitting the video file or the screenshot image to an external environment.
7. The method of claim 6, wherein image decoding the encoded image in the external environment to obtain the target data comprises:
saving each frame of content of the video file into one image to obtain a plurality of video images; decoding the plurality of video images to obtain the target data; alternatively, the first and second electrodes may be,
and decoding the plurality of screen capture images to obtain the target data.
8. A data transmission apparatus, comprising:
the encoding module is used for encoding target data of a limited environment and generating a plurality of encoded images, wherein the limited environment can only receive data and cannot send the data outwards;
the transmission module is used for transmitting the coded image to an external environment in a video recording mode or a screen capturing mode;
and the decoding module is used for carrying out image decoding on the plurality of coded images in the external environment to obtain the target data.
9. A computer-readable storage medium, in which a computer program is stored, wherein the computer program is configured to carry out the method of any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, wherein the memory has stored therein a computer program, and wherein the processor is arranged to execute the computer program to perform the method of any of claims 1 to 7.
CN202111308775.1A 2021-11-05 2021-11-05 Data transmission method and device Pending CN114039969A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111308775.1A CN114039969A (en) 2021-11-05 2021-11-05 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111308775.1A CN114039969A (en) 2021-11-05 2021-11-05 Data transmission method and device

Publications (1)

Publication Number Publication Date
CN114039969A true CN114039969A (en) 2022-02-11

Family

ID=80143129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111308775.1A Pending CN114039969A (en) 2021-11-05 2021-11-05 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN114039969A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117201485A (en) * 2023-11-07 2023-12-08 北京飞轮数据科技有限公司 Text file transmission method, text file transmission device, electronic equipment and computer readable medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055116A (en) * 2017-10-25 2018-05-18 西南电子技术研究所(中国电子科技集团公司第十研究所) Quick Response Code duplex communication method
JP2018137771A (en) * 2018-03-22 2018-08-30 株式会社Jvcケンウッド Imaging apparatus and control method
CN109150393A (en) * 2018-06-29 2019-01-04 广东省信息工程有限公司 Two-dimensional barcode information transfer approach, terminal device and computer readable storage medium
CN109451006A (en) * 2018-10-30 2019-03-08 北京锐安科技有限公司 A kind of data transmission method, device, server and computer storage medium
CN111130958A (en) * 2019-12-18 2020-05-08 广东美的厨房电器制造有限公司 Data transmission method and device, electronic equipment and storage medium
CN111860730A (en) * 2020-08-27 2020-10-30 南京轩宁信息技术有限公司 Different network information transmission system based on image processing

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108055116A (en) * 2017-10-25 2018-05-18 西南电子技术研究所(中国电子科技集团公司第十研究所) Quick Response Code duplex communication method
JP2018137771A (en) * 2018-03-22 2018-08-30 株式会社Jvcケンウッド Imaging apparatus and control method
CN109150393A (en) * 2018-06-29 2019-01-04 广东省信息工程有限公司 Two-dimensional barcode information transfer approach, terminal device and computer readable storage medium
CN109451006A (en) * 2018-10-30 2019-03-08 北京锐安科技有限公司 A kind of data transmission method, device, server and computer storage medium
CN111130958A (en) * 2019-12-18 2020-05-08 广东美的厨房电器制造有限公司 Data transmission method and device, electronic equipment and storage medium
CN111860730A (en) * 2020-08-27 2020-10-30 南京轩宁信息技术有限公司 Different network information transmission system based on image processing

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117201485A (en) * 2023-11-07 2023-12-08 北京飞轮数据科技有限公司 Text file transmission method, text file transmission device, electronic equipment and computer readable medium
CN117201485B (en) * 2023-11-07 2024-02-06 北京飞轮数据科技有限公司 Text file transmission method, text file transmission device, electronic equipment and computer readable medium

Similar Documents

Publication Publication Date Title
CN102056099B (en) By using hand-written data to reproduce the apparatus and method of hand-written message
CN103475572B (en) Method, device and system for sending multiple pictures in instant messaging application
WO2017054597A1 (en) Processing method and device for emoji string
CN106453572B (en) Method and system based on Cloud Server synchronous images
CN104035565A (en) Input method, input device, auxiliary input method and auxiliary input system
CN101005485A (en) Method and system for compression coding information resource address
CN112559463B (en) Compressed file processing method and device
US20210110214A1 (en) Selective image compression of an image stored on a device based on user preferences
CN114039969A (en) Data transmission method and device
US9438858B1 (en) Techniques for sharing image data remotely
CN110298896A (en) Picture code-transferring method, device and electronic equipment
CN113709495A (en) Synchronous decoding method based on PCIE (peripheral component interface express) buffer mechanism
CN105704215B (en) Shared file system and corresponding document sending method and device
CN112488270A (en) Two-dimensional code generation method and device
CN110457264B (en) Conference file processing method, device, equipment and computer readable storage medium
CN112363791A (en) Screen recording method and device, storage medium and terminal equipment
CN104598782A (en) Data packaging and analysis method and device
CN113099270B (en) File storage method, decoding method, device, storage medium and electronic device
CN110740138A (en) Data transmission method and device
WO2023045430A1 (en) Two dimensional code-based data processing method, apparatus, and system
CN115190352A (en) Video data storage method and device, computer readable storage medium and electronic equipment
CN108769274B (en) Conversational file transmission method and device, and equipment/terminal/server
US9426173B2 (en) System and method for elimination of spam in a data stream according to information density
CN113422929A (en) Image data processing method, image data processing device, storage medium, and electronic device
CN111447490A (en) Streaming media file processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination