A contactless network-free data exchange method, system, device and storage medium thereof
Through the front camera of the smart terminal, data transmission between smart devices is realized in a network-free environment, solving the problem of data exchange difficulties in the absence of network in the existing technology, and providing flexible and efficient data transmission plan.
Patent Information
- Application Number
- CN202111455694.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-01
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2041-12-01
AI Technical Summary
Existing data transmission methods cannot easily realize data exchange between devices without networks and wireless cables. Especially after the widespread application of smart mobile devices and QR code technologies, they still need to rely on traditional networks and cables for data. transmission.
Using contactless networkless data exchange method, the front camera of the smart terminal collects and analyzes QR codes to realize two-way transmission of data, including generating QR codes containing communication data, analyzing feedback packets, judging the transmission completion, and Resend lost data if necessary.
Without relying on traditional networks and cables, two-way data transmission between smart devices is realized, providing a convenient data exchange solution in a network-free environment, improving the flexibility and efficiency of data transmission.
Smart Images

Figure CN114186648B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data transmission, and in particular to a contactless network-free data exchange method, a system and a device thereof, and a storage medium. Background Art
[0002] Currently, data transmission primarily utilizes network exchanges (LAN / WAN / Wi-Fi / mobile networks / Bluetooth, etc.) and wired data connections (point-to-point communication or bus-based data exchange, etc.). With the widespread adoption of smart mobile devices and QR code (QR) code technology, QR codes are used to represent data link addresses (short addresses). After receiving the link address, the receiving device still uses traditional networks to connect to the server to retrieve the data. This data transmission method is constrained by transmission media such as mobile networks, Wi-Fi, and cables. Consequently, in the absence of a network or wired connection, convenient data exchange between devices is difficult, other than exchanging storage media. Summary of the Invention
[0003] In view of this, the purpose of the embodiments of the present invention is to provide a contactless, network-free data exchange method, its system, device, and storage medium, which are aimed at smart handheld terminals (such as smart phones) equipped with a front camera and a display screen, and can still perform data transmission and exchange without traditional exchange media or when the communication network and interface are strictly restricted.
[0004] In a first aspect, an embodiment of the present invention provides a contactless, network-free data exchange method, comprising:
[0005] S1, the communication party generates a QR code containing the type and content of the communication data, and waits for the receiving party to receive it.
[0006] In step S2, the receiving party collects the QR code of the communicating party through the front camera, parses the data, generates a response packet for feedback to the communicating party, and prompts the communicating party to transmit through the QR code.
[0007] S3, determines whether the transmission is completed. If the feedback sent by the receiver shows that the transmission is incomplete, return to S1 and continue data transmission.
[0008] In combination with the first aspect, an embodiment of the present invention provides a first possible implementation of the first aspect, wherein, in S1, the communicating party generates a QR code including the type and data content of the communication data, and waits for the receiving party to receive it, including:
[0009] S11, the communication party generates a protocol header, which includes the data content type (Type), session number (SessionId), sequence number (Seq), total sequence number (Total) and length (Length).
[0010] S12, the communication party generates a protocol data unit including the file content to be transmitted.
[0011] S13, based on the size of the file to be transmitted, forms a single packet (SingleSend) or continuous packet (ContiSend) sending request, each sending request includes the protocol header generated by S11 and the protocol data unit generated by S12, wherein the single packet sending request is a request packet indicating the file size and the number of subsequent single packet transmissions, and the continuous sending request is a request packet indicating the file size and the total number of reports, both of which are displayed on their own screens through QR codes, waiting for the recipient to use a camera to collect and parse them.
[0012] In combination with the first aspect, an embodiment of the present invention provides a second possible implementation of the first aspect, wherein, in S2, the receiving party collects the QR code of the communicating party through the front camera, parses the data, generates a response packet for feedback to the communicating party, and prompts the communicating party to transmit through the QR code, including:
[0013] S21, the receiving party collects the QR code of the communicating party through the front camera and parses the data.
[0014] S22, if the sending request of the communication party is a continuous sending request, a corresponding response packet is generated and displayed on its own screen through a QR code, prompting the communication party to start transmission.
[0015] S23, if the sending request of the communication party is a single-packet sending request, determine whether the single-packet sending request is the first request. If it is the first request, generate a corresponding response packet and display it on its own screen through a QR code to prompt the communication party to start transmission. If it is a retransmitted single-packet sending request, take the retransmitted sequence number packet for transmission.
[0016] In combination with the first aspect, an embodiment of the present invention provides a third possible implementation of the first aspect, wherein, in S3, determining whether the transmission is completed, if the feedback sent by the receiver indicates that the transmission is incomplete, returning to S1 and continuing the data transmission includes:
[0017] S31, parsing the QR code of the receiver. The receiver generates a corresponding response packet for each received transmission packet. If the communication party times out and does not receive the corresponding response packet sent by the receiver, the transmission fails and the transmission is restarted.
[0018] S32: If the response packet received by the communication party is incomplete and some packets are lost, a QR code containing the type and data content of the communication data of the lost content is regenerated and sent packet by packet.
[0019] In a second aspect, an embodiment of the present invention further provides a contactless network-free data exchange system, comprising:
[0020] The transcoding module is used by the communication party to generate a QR code containing the type and content of the communication data, waiting for the receiving party to receive it.
[0021] The parsing module is used for the receiver to collect the QR code of the communication party through the front camera, parse the data, generate a response packet for feedback to the communication party, and prompt the communication party to transmit through the QR code.
[0022] The verification module is used to determine whether the transmission is complete. If the feedback sent by the receiver shows that the transmission is incomplete, the code is re-transcoded and the transmission of the lost data is continued.
[0023] In combination with the second aspect, an embodiment of the present invention provides a first possible implementation of the second aspect, wherein the transcoding module includes:
[0024] The protocol header generation unit is used by the communication party to generate a protocol header, which includes the type, session number, sequence number, total sequence number and length of the data content.
[0025] The protocol data unit generation unit is used by the communication party to generate a protocol data unit containing the file content to be transmitted.
[0026] The sending request unit is used to form a single packet or continuous packet sending request according to the size of the file to be transmitted. Each sending request includes a protocol header generated by S11 and a protocol data unit generated by S12. Among them, the single packet sending request is a request packet that describes the file size and the number of subsequent single packet transmissions, and the continuous sending request is a request packet that describes the file size and the total number of packets. Both are displayed on their own screens through QR codes, waiting for the recipient to use a camera to collect and parse them.
[0027] In conjunction with the second aspect, an embodiment of the present invention provides a second possible implementation of the second aspect, wherein the parsing module includes:
[0028] The collection unit is used for the receiver to collect the QR code of the communicating party through the front camera and parse the data.
[0029] The continuous request response unit is used to generate a corresponding response packet if the communication party's sending request is a continuous sending request, display it on its own screen through a QR code, and prompt the communication party to start transmission.
[0030] The single-packet request response unit is used to determine whether the communication party's sending request is a single-packet sending request. If it is the first request, it generates a corresponding response packet and displays it on its own screen through a QR code to prompt the communication party to start transmission. If it is a retransmitted single-packet sending request, the retransmitted sequence number packet is taken for transmission.
[0031] In combination with the second aspect, an embodiment of the present invention provides a third possible implementation of the second aspect, wherein the inspection module includes:
[0032] The restart unit is used to parse the QR code of the receiver. The receiver generates a corresponding response packet for each received packet. If the communication party does not receive the corresponding response packet sent by the receiver within the time limit, the transmission fails and the transmission is restarted.
[0033] The resending unit is used to regenerate a QR code containing the type and data content of the lost data and send it packet by packet if the response packet received by the communication party is incomplete and some packets are lost.
[0034] In a third aspect, an embodiment of the present invention further provides a computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the contactless and network-free data exchange method as described above is implemented.
[0035] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the contactless and network-free data exchange method as described above.
[0036] The beneficial effects of the embodiments of the present invention are:
[0037] The present invention utilizes a smart terminal equipped with basic hardware and software including a screen and a front camera, and adopts a QR code to realize two-way transmission of data between smart devices without relying on traditional networks and cables as media. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 Flowchart of the contactless and network-free data exchange method of the present invention;
[0040] Figure 2 This is a schematic structural diagram of the contactless network-free data exchange system of the present invention;
[0041] Figure 3 Schematic diagram of the complete process of the contactless and network-free data exchange method of the present invention;
[0042] Figure 4A schematic diagram of device communication relationships in the contactless, network-free data exchange method of the present invention;
[0043] Figure 5 Schematic diagram illustrating the communication protocol of the contactless and network-free data exchange method of the present invention. DETAILED DESCRIPTION
[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of 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. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0045] Please refer to Figure 1 A first embodiment of the present invention provides a contactless, network-free data exchange method, comprising:
[0046] S1, the communication party generates a QR code containing the type and content of the communication data, and waits for the receiving party to receive it.
[0047] In step S2, the receiving party collects the QR code of the communicating party through the front camera, parses the data, generates a response packet for feedback to the communicating party, and prompts the communicating party to transmit through the QR code.
[0048] S3, determines whether the transmission is completed. If the feedback sent by the receiver shows that the transmission is incomplete, return to S1 and continue data transmission.
[0049] In S1, the communication party generates a QR code containing the type and content of the communication data and waits for the receiving party to receive it, including:
[0050] S11, the communication party generates a protocol header, which includes the data content type (Type), session number (SessionId), sequence number (Seq), total sequence number (Total) and length (Length).
[0051] The type includes but is not limited to the following types:
[0052] SingleSend: Single packet sending request. When Total=0, PDU is the file name (can include the full path) and is encoded in UTF-8. When Total is not equal to 0, PDU is the file content. SingleAck: Single packet receiving response, a response to SingleSend.
[0053] RecvReq receives a request. The PDU is the file name (which can include the full path) and is encoded in UTF-8.
[0054] ContiSend sends requests continuously. The PDU is the file name (can include the full path) and is encoded in UTF-8. The first packet Total = 0, indicating the first packet. The subsequent content packets Total are not equal to 0.
[0055] ContiAck is a continuous data reception response, which is a response to ContiSend when the data is complete.
[0056] LossReq is a packet retransmission request. When ContiSend data is not completed, this packet is sent. Seq is used to represent the lost packet. If multiple packets are lost, LossReq is sent multiple times until all packets are completed and a ContiAck packet is sent.
[0057] The Session ID (SessionId) is a globally unique number generated for each communication session. The request and response correspond to the same Session ID. It is recommended to use the timestamp at the start of the session as the SessionId, which is generated by the communication initiator.
[0058] The sequence number (Seq) refers to the sequence number within a session. Sequence numbers start at 0 and will not be repeated unless there is packet loss. Communication uses a request / response format, and the Seq of the response packet should be the same as the Seq of the corresponding request packet. Because data transmission may be subject to packet loss and retransmission, sequence numbers can be repeated within a session.
[0059] The total sequence number (Total) is used to indicate the total sequence number that may appear in a session. For example, if data of ten QR codes need to be sent in one communication, Total = 10, and Seq ranges from 0 to 9.
[0060] The length (Length) indicates the length (unit: byte) of the data field (PDU) in the current QR code.
[0061] S12, the communication party generates a protocol data unit including the file content to be transmitted.
[0062] S13, based on the size of the file to be transmitted, forms a single packet (SingleSend) or continuous packet (ContiSend) sending request, each sending request includes the protocol header generated by S11 and the protocol data unit generated by S12, wherein the single packet sending request is a request packet indicating the file size and the number of subsequent single packet transmissions, and the continuous sending request is a request packet indicating the file size and the total number of packets, both of which are displayed on their own screens through QR codes, waiting for the recipient to use a camera to collect and parse them.
[0063] In S2, the receiving party collects the QR code of the communicating party through the front camera, parses the data, generates a response packet for feedback to the communicating party, and prompts the communicating party to transmit through the QR code, including:
[0064] S21, the receiving party collects the QR code of the communicating party through the front camera and parses the data.
[0065] S22, if the sending request of the communication party is a continuous sending request, a corresponding response packet is generated and displayed on its own screen through a QR code, prompting the communication party to start transmission.
[0066] S23, if the sending request of the communication party is a single-packet sending request, determine whether the single-packet sending request is the first request. If it is the first request, generate a corresponding response packet and display it on its own screen through a QR code to prompt the communication party to start transmission. If it is a retransmitted single-packet sending request, take the retransmitted sequence number packet for transmission.
[0067] In S3, the determination of whether the transmission is complete, if the feedback sent by the receiving party indicates that the transmission is incomplete, returns to S1 and continues the data transmission, including:
[0068] S31, parsing the QR code of the receiver. The receiver generates a corresponding response packet for each received transmission packet. If the communication party times out and does not receive the corresponding response packet sent by the receiver, the transmission fails and the transmission is restarted.
[0069] S32: If the response packet received by the communication party is incomplete and some packets are lost, a QR code containing the type and data content of the communication data is regenerated and sent packet by packet.
[0070] Please refer to Figures 3 to 5 In the second embodiment of the present invention, a contactless data exchange method without a network is explained by sending data between device A and device B. When the two devices need to communicate data, they need to be placed face to face, allowing the other party to use a camera to capture the QR code on the screen of the other party (such as Figure 4 As shown), the communication protocol followed by both parties is as follows Figure 5 The complete process of the contactless and network-free data exchange method includes:
[0071] 1. The communication initiator generates a SessionId to identify the session.
[0072] 2. If you want to receive a file, use the file name to be received as the PDU, generate a QR code and display it on your own screen, and wait for the other party to respond. If the timeout expires, the communication session will be exited and the transmission will fail. If a correct response is received, proceed to step 4.
[0073] 3. If the local end wants to send a file, it generates a single packet (SingleSend) or continuous packet (ContiSend) sending request based on the size of the file to be sent by the local end.
[0074] 4. If it is a continuous packet (ContiSend) sending request, then according to the protocol, a continuous QR code generated video file is generated and waits for the other end to use the camera to collect and analyze it.
[0075] 5. If it is a single-packet (SingleSend) request, send the corresponding packet according to the current packet sequence number requirement. If this step is entered from another retransmission request state, send the retransmission sequence number packet. If this step is the first time entering this step, send the first content packet. Each packet sent requires a response from the other party. If no response is received within the timeout, the transmission fails.
[0076] 6. For continuous transmission, first generate a request packet indicating the total number of reports and send it to the other party, prompting the other party to capture the video next. If no response is received within the time limit, the transmission fails and ends.
[0077] 7. After receiving the response packet of the continuous packet, start playing the QR code video on the screen, and then wait for the other party's parsing response. If the other party receives the response of reception completion, the transmission ends. If the response packet is not received before the timeout, the transmission fails.
[0078] 8. If the response packet sent by the other party says that the video acquisition is incomplete and some packets are lost, then go to step 5 and start sending the contents of the lost packets one by one.
[0079] 9. For the request to send a single packet, determine whether the transmission is completed based on the response. If there is still data to be transmitted, go to step 5 and continue to send the corresponding data packet. Otherwise, the transmission is completed.
[0080] A QR code (QR code), according to the international standard ISO / IEC 18004, version 40L, has a maximum structure of 177*177 code elements and can store 2953 bytes (ISO8859-1) of content in binary / byte mode. This invention uses a 177*177 code element QR code as the basic unit for transmitting data. Each basic unit consists of two parts: a header and a protocol data unit (PDU). The header is used to indicate the PDU type, sequence number, length, and other content, while the PDU is the data portion.
[0081] During data transmission, one party uses the front-facing camera to capture the other party's QR code, parses the data, and displays the feedback content as a QR code on the local screen. The other party then uses the front-facing camera to capture and parse the data, and then generates a QR code again. This process repeats, forming the most basic communication method. When one party needs to send data continuously and does not need each basic unit to wait for feedback from the other party, a video mode (i.e., a video formed by continuous QR code images) can be used. In theory, it can generate QR code content at 15 frames per second. The other party's acquisition camera uses a sampling rate of more than 30 frames per second for acquisition and parses the QR code in the background in parallel, which can form quasi-real-time data transmission and feedback.
[0082] Theoretically, the use of a 40L-level QR code can achieve a 7% error correction rate and a data transfer rate of 2953*30 / 1024=86KB / s. If a 16-color QR code is used as the basic unit, the transfer rate can reach 692KB / s, which is roughly equivalent to USB 1.1. A 10MB file can be transferred in 15 seconds.
[0083] Please refer to Figure 2 A third embodiment of the present invention provides a contactless, network-free data exchange system, comprising:
[0084] The transcoding module is used by the communication party to generate a QR code containing the type and content of the communication data, waiting for the receiving party to receive it.
[0085] The parsing module is used for the receiver to collect the QR code of the communication party through the front camera, parse the data, generate a response packet for feedback to the communication party, and prompt the communication party to transmit through the QR code.
[0086] The inspection module is used to determine whether the transmission is complete. If the feedback sent by the receiver shows that the transmission is incomplete, the data is re-transcoded and the data transmission continues.
[0087] Wherein, the transcoding module includes:
[0088] The protocol header generation unit is used by the communication party to generate a protocol header, which includes the type, session number, sequence number, total sequence number and length of the data content.
[0089] The protocol data unit generation unit is used by the communication party to generate a protocol data unit containing the file content to be transmitted.
[0090] The sending request unit is used to form a single packet or continuous packet sending request according to the size of the file to be transmitted. Each sending request includes a protocol header generated by S11 and a protocol data unit generated by S12. Among them, the single packet sending request is a request packet that indicates the file size and the number of subsequent single packet transmissions, and the continuous sending request is a request packet that indicates the total number of packets of the file size. Both are displayed on their own screens through QR codes, waiting for the recipient to use a camera to collect and parse them.
[0091] Wherein, the parsing module includes:
[0092] The collection unit is used for the receiver to collect the QR code of the communicating party through the front camera and parse the data.
[0093] The continuous request response unit is used to generate a corresponding response packet if the communication party's sending request is a continuous sending request, display it on its own screen through a QR code, and prompt the communication party to start transmission.
[0094] The single-packet request response unit is used to determine whether the communication party's sending request is a single-packet sending request. If it is the first request, it generates a corresponding response packet and displays it on its own screen through a QR code to prompt the communication party to start transmission. If it is a retransmitted single-packet sending request, the retransmitted sequence number packet is taken for transmission.
[0095] The inspection module includes:
[0096] The restart unit is used to parse the QR code of the receiver. The receiver generates a corresponding response packet for each received packet. If the communication party does not receive the corresponding response packet sent by the receiver within the time limit, the transmission fails and the transmission is restarted.
[0097] The resending unit is used to regenerate a QR code containing the type and data content of the communication data and send it packet by packet if the response packet received by the communication party is incomplete and some packets are lost.
[0098] A fourth embodiment of the present invention provides a computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the aforementioned contactless and network-free data exchange method when executing the computer program.
[0099] A fifth embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the contactless and network-free data exchange method as described above is implemented.
[0100] The embodiments of the present invention are intended to protect a contactless, network-free data exchange method, system, device, and storage medium thereof, and have the following effects:
[0101] The present invention utilizes a smart terminal equipped with basic hardware and software including a screen and a front camera, and adopts a QR code to realize two-way transmission of data between smart devices without relying on traditional networks and cables as media.
[0102] The computer program product of the contactless, network-free data exchange method and apparatus provided in the embodiments of the present invention includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the method in the previous method embodiment. For specific implementation, please refer to the method embodiment and will not be repeated here.
[0103] Specifically, the storage medium can be a general storage medium, such as a mobile disk, hard disk, etc. When the computer program on the storage medium is run, it can execute the above-mentioned contactless and network-free data exchange method, thereby realizing two-way transmission of data between smart devices without the help of traditional networks and cables as media.
[0104] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0105] Finally, it should be noted that the above-described embodiments are only specific implementations of the present invention, which are used to illustrate the technical solutions of the present invention, rather than to limit them. The scope of protection of the present invention is not limited thereto. Although the present invention has been described in detail with reference to the above-described embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-described embodiments within the technical scope disclosed by the present invention, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A contactless and non-network data exchange method, characterized in that: include: S1, the communication party generates a QR code, including the type and data content of the communication data, and waits for the receiving party to receive it, including: S11, the communication party generates a protocol header, including the type of data content, session number, sequence number, total sequence number and length; S12, the communication party generates a protocol data unit, including the file content to be transmitted; S13, according to the size of the file to be transmitted, a single packet or continuous packet sending request is formed, each sending request includes the protocol header generated by S11 and the protocol data unit generated by S12, wherein the single packet sending request is a request packet indicating the file size and the number of subsequent single packet transmissions, and the continuous sending request is a request packet indicating the file size and the total number of packets, both of which are displayed on their own screens through QR codes, waiting for the receiving party to collect and parse using a camera; wherein, the display on their own screens through QR codes is specifically a video formed by continuous QR code images, forming a QR code content of 15 frames per second; S2, the receiving party collects the QR code of the communicating party through the front camera, parses the data, generates a response packet for feedback to the communicating party, and prompts the communicating party to transmit through the QR code, including: S21, the receiving party uses the front camera to collect data at a sampling rate greater than 30 frames / second, and parses the QR code in the background in a parallel operation mode to form quasi-real-time data transmission and feedback; S22, if the sending request of the communicating party is a continuous sending request, a corresponding response packet is generated, displayed on its own screen through a QR code, and the communicating party is prompted to start transmission; S23, if the sending request of the communicating party is a single-packet sending request, it is determined whether the single-packet sending request is the first request. If it is the first request, a corresponding response packet is generated, displayed on its own screen through a QR code, and the communicating party is prompted to start transmission. If it is a retransmitted single-packet sending request, the retransmitted sequence number packet is taken for transmission; S3, judging whether the transmission is completed, if the feedback sent by the receiving party shows that the transmission is incomplete, then return to S1 and continue the data transmission; in S3, the judgment of whether the transmission is completed, if the feedback sent by the receiving party shows that the transmission is incomplete, then return to S1 and continue the data transmission, including: S31, parsing the QR code of the receiving party, the receiving party forms a corresponding response packet for each received transmission packet, if the communication party times out and does not receive the corresponding response packet sent by the receiving party, the transmission fails and the transmission is restarted; S32, if the response packet received by the communication party is incomplete and several packets are lost, then the QR code containing the type and data content of the communication data is regenerated and sent packet by packet.
2. A contactless network-free data exchange system, characterized in that: The contactless and network-free data exchange method according to claim 1 comprises: a transcoding module, which is used by the communication party to generate a two-dimensional code, which includes the type and data content of the communication data, and waits for the receiving party to receive it; a parsing module, which is used by the receiving party to collect the two-dimensional code of the communication party through the front camera, parse the data, generate a response packet for feedback to the communication party, and prompt the communication party to transmit through the two-dimensional code; a checking module, which is used to determine whether the transmission is completed. If the feedback sent by the receiving party shows that the transmission is incomplete, re-transcoding is performed to continue the data transmission; The transcoding module includes: a protocol header generation unit, which is used by the communication party to generate a protocol header, including the type, session number, sequence number, total sequence number and length of the data content; a protocol data unit generation unit, which is used by the communication party to generate a protocol data unit, including the file content to be transmitted; a sending request unit, which is used to form a single-packet or continuous-packet sending request according to the size of the file to be transmitted, each sending request includes a protocol header generated by S11 and a protocol data unit generated by S12, wherein the single-packet sending request is a request packet indicating the file size and the number of subsequent single-packet transmissions, and the continuous sending request is a request packet indicating the file size and the total number of packets, both of which are displayed on their own screens through QR codes, waiting for the receiving party to collect and parse using a camera; The parsing module includes: a collection unit, which is used for the receiving party to collect the QR code of the communication party through the front camera and parse the data; a continuous request response unit, which is used to generate a corresponding response packet if the communication party's sending request is a continuous sending request, display it on its own screen through a QR code, and prompt the communication party to start transmission; a single packet request response unit, which is used to determine whether the single packet sending request is the first request if the communication party's sending request is a single packet sending request, and if it is the first request, generate a corresponding response packet, display it on its own screen through a QR code, and prompt the communication party to start transmission, and if it is a retransmitted single packet sending request, take the retransmitted sequence number packet for transmission; The inspection module includes: a restart unit, which is used to parse the QR code of the receiver. The receiver generates a corresponding response packet for each received transmission packet. If the communication party fails to receive the corresponding response packet sent by the receiver within the time limit, the transmission fails and the transmission is restarted; a retransmission unit, which is used to regenerate the QR code containing the type and data content of the communication data and send it packet by packet if the response packet received by the communication party is incomplete and several packets are lost.
3. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the contactless and network-free data exchange method according to claim 1 is implemented.
4. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the contactless and network-free data exchange method according to claim 1 is implemented.
