Data transmission method and apparatus, electronic device, and computer-readable storage medium

By slicing and graphic encoding the data to generate the target graphic code, the problems of insufficient convenience and reliability of data transmission are solved, and efficient data transmission without network services and transmission media is achieved.

CN122137831APending Publication Date: 2026-06-02GUANGZHOU XIBEISI INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
GUANGZHOU XIBEISI INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2024-12-02
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

While existing technologies ensure reliable data transmission, they lack convenience in data output, especially in the absence of network services and transmission media, where data leakage and interface failures are possible.

Method used

By slicing the target data to generate a target data sequence, and performing graphic encoding conversion based on metadata to generate target graphic encoding, the complete transmission of data between the two terminals is ensured. Data transmission using graphic encoding does not require network services or transmission media.

Benefits of technology

This approach ensures reliable data transmission while improving the convenience of data transmission, avoiding data leaks and interface failures, and reducing reliance on hardware and network services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122137831A_ABST
    Figure CN122137831A_ABST
Patent Text Reader

Abstract

This application relates to the field of data transmission technology and discloses a data transmission method, apparatus, electronic device, and computer-readable storage medium, comprising: in response to a data transmission operation, acquiring target transmission data of a first terminal; slicing the target transmission data to obtain a target data sequence, the target data sequence including at least two data slices; performing a graphical encoding conversion on the target data sequence based on metadata of the target data sequence to generate a target graphical encoding, the metadata including at least first metadata used to indicate the length of the target data sequence; and displaying the target graphical encoding for transmitting the target transmission data. This application improves the convenience of data output while ensuring reliable data transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data transmission technology, specifically to a data transmission method, apparatus, electronic device, and computer-readable storage medium. Background Technology

[0002] With the rapid development of electronic information technology, the production and flow of user data in scenarios such as work, study, and entertainment are increasingly involving electronic device terminals.

[0003] These terminals operate independently and are not directly connected to each other. They often need to rely on a medium or channel to communicate and exchange data. Transmitting images displayed or stored on one electronic device terminal to another is a common scenario for terminal data transmission.

[0004] How to improve the convenience of data output while ensuring reliable data transmission is an urgent problem to be solved. Summary of the Invention

[0005] This application provides a data transmission method, apparatus, electronic device, and computer-readable storage medium, which can improve the convenience of data transmission while ensuring reliable data transmission.

[0006] In a first aspect, embodiments of this application provide a data transmission method applied to a first terminal, comprising:

[0007] In response to a data transmission operation, acquire the target transmission data of the first terminal;

[0008] Transmit data slices to the target to obtain a target data sequence, which includes at least two data slices.

[0009] Based on the metadata of the target data sequence, the target data sequence is transformed into a graphical encoding to generate a target graphical encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0010] Display target graphic encoding, which is used to transmit target data.

[0011] Secondly, embodiments of this application provide a data transmission method applied to a second terminal, comprising:

[0012] Scan the QR code displayed on the first terminal. The QR code is a target graphic encoding QR code in the first terminal.

[0013] Obtain the first metadata carried by the target graphic encoding. The first metadata is used to indicate the length of the target data sequence corresponding to the target graphic encoding.

[0014] The target graphic encoding is verified based on the first metadata.

[0015] If the target graphic encoding verification passes, the target graphic encoding is parsed to obtain the target data sequence, which includes at least two data slices.

[0016] The data slices are spliced ​​together to obtain the target transmission data transmitted by the first terminal.

[0017] Thirdly, embodiments of this application provide a data transmission apparatus, including:

[0018] The acquisition module is used to acquire the target transmission data of the first terminal in response to the data transmission operation;

[0019] The slicing module is used to slice the target transmission data to obtain a target data sequence, which includes at least two data slices.

[0020] The conversion module is used to convert the target data sequence into a graphical encoding based on the metadata of the target data sequence, and generate the target graphical encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0021] The transmission module is used to display the target graphic encoding, and the target graphic encoding is used to transmit the target transmission data.

[0022] Furthermore, this application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the processor is used to run the computer program in the memory to implement the data transmission method provided in this application.

[0023] Furthermore, embodiments of this application also provide a computer-readable storage medium storing a computer program adapted for loading by a processor to execute any of the data transmission methods provided in embodiments of this application.

[0024] Furthermore, this application also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the data transmission methods provided in this application.

[0025] In this embodiment, in response to a data transmission operation, the target transmission data of the first terminal is acquired, and the target transmission data is sliced ​​to obtain a target data sequence, which includes at least two data slices. Because the amount of data that a single graphic code can carry is limited by factors such as the device environment, the target transmission data is not limited to text, images, or video data. Therefore, when using graphic codes to transmit large amounts of data, the amount of target transmission data transmitted by the first terminal will be greater than the amount of data that a single graphic code can carry. Therefore, by slicing the target transmission data to obtain a target data sequence including at least two data slices, the data in the target transmission data can be distributed. Since the target data sequence includes at least two data slices, if graphic encoding conversion is directly performed on the data slices in the target data sequence to generate corresponding graphic codes, the second terminal receiving the target transmission data cannot determine whether it has received the complete target transmission data based on the received graphic codes. Therefore, based on the first metadata corresponding to the target data sequence, graphic encoding conversion is performed on the target data sequence to generate a target graphic code. The first terminal transmits the target transmission data to the second terminal based on the target graphic code. The first metadata indicates the length of the target data sequence, enabling the second terminal to verify the integrity of the target data sequence based on the length indicated by the first metadata, ensuring the receipt of complete target transmission data. Therefore, by performing graphic encoding conversion on the target data sequence in the first terminal based on the first metadata, complete data transmission between the two terminals can be ensured. Thus, data transmission based on target graphic encoding eliminates the need for network services, preventing data leakage during transmission. Furthermore, it eliminates the need for a transmission medium, improving the convenience of data transmission while ensuring reliable data transmission. Attached Figure Description

[0026] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0027] Figure 1 This is a flowchart illustrating the data transmission method applied to a first terminal provided in this application;

[0028] Figure 2 This is a first schematic diagram of the target data sequence proposed in the embodiments of this application;

[0029] Figure 3 This is a schematic diagram of data transmission between a first terminal and a second terminal provided in an embodiment of this application;

[0030] Figure 4 This is a schematic diagram of the target data slice proposed in the embodiments of this application;

[0031] Figure 5 This is a second schematic diagram of the target graphic encoding proposed in the embodiments of this application;

[0032] Figure 6 This is a third schematic diagram of the target graphic encoding proposed in the embodiments of this application;

[0033] Figure 7 This is a schematic diagram illustrating the target graphic encoding in the first terminal provided in this application embodiment;

[0034] Figure 8 This is a schematic diagram of the image transmission process applied to the first terminal provided in an embodiment of this application;

[0035] Figure 9 This is a schematic flowchart of a data transmission method applied to a second terminal according to an embodiment of this application;

[0036] Figure 10 This is a schematic diagram of an image transmission process applied to a second terminal, provided in an embodiment of this application;

[0037] Figure 11 This is a schematic diagram of the structure of the first data transmission device provided in the embodiments of this application;

[0038] Figure 12 This is a schematic diagram of the structure of the second data transmission device provided in the embodiments of this application;

[0039] Figure 13 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

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

[0041] This application provides a data transmission method, apparatus, electronic device, and computer-readable storage medium. The data transmission apparatus can be integrated into an electronic device, which may be a server or a terminal, etc.

[0042] The server can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), as well as big data and artificial intelligence platforms.

[0043] The terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, etc., but is not limited to these. The terminal and the server can be connected directly or indirectly through wired or wireless communication, which is not limited herein.

[0044] Furthermore, in the embodiments of this application, "multiple" refers to two or more. The terms "first" and "second," etc., in the embodiments of this application are used for distinguishing descriptions and should not be construed as implying relative importance.

[0045] Currently, transmitting images displayed or stored on one electronic device to another is a common data transmission scenario.

[0046] For example, when saving meeting minutes from an electronic whiteboard in a public meeting room, it's necessary to distribute them to participants' electronic devices via media or communication channels for saving. Participants can use USB flash drives or external hard drives for data transfer. Alternatively, they can use short-range communication methods such as Bluetooth or Wi-Fi P2P, or local area network file servers, shared folders, internet file services, or cloud storage for data transfer.

[0047] Data transmission methods using transmission media or short-range communication channels rely on the hardware interface of the transmission media. For example, data transmission based on short-range communication channels requires the communication device terminal to be equipped with modules such as Bluetooth or Wi-Fi. The use of modules increases the hardware cost of the communication device terminal. Other wired connection channels, or relay transmission media such as USB flash drives, also have module cost issues. Furthermore, compared to data transmission methods based on communication channels, although this type of data transmission method is more reliable, it is less convenient and prone to interface failures or media loss.

[0048] Data transmission based on communication channels relies on the supporting services provided by those channels. For example, data transmission based on internet channels requires the communication device to be connected to the network and for internet file service providers to offer corresponding services. Network and internet service support requires users to pay fees and is typically only available in locations with well-developed network infrastructure. While data transmission based on communication channels offers relatively convenient data transmission services, it is susceptible to data leakage due to network interception, unauthorized copying, hacker attacks, or misappropriation by internet file service providers, leading to low reliability in data transmission.

[0049] Based on this, this application proposes a data transmission method applied to a first terminal. In response to a data transmission operation, the target transmission data of the first terminal is acquired. The target transmission data is then sliced ​​to obtain a target data sequence, which includes at least two data slices, thus distributing the data within the target transmission data. Based on the first metadata of the target data sequence, a graphical encoding conversion is performed on the target data sequence to generate a target graphical code. The first terminal displays the target graphical code. The first metadata indicates the length of the target data sequence. By performing graphical encoding conversion on the target data sequence based on the first metadata in the first terminal to generate the target graphical code, complete data transmission between the two terminals can be ensured. Therefore, by transmitting data through displaying the target graphical code, network services are not required, avoiding data leakage during transmission. Furthermore, no transmission medium is needed, achieving both reliable data transmission and improved data transmission convenience.

[0050] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the preferred order of the embodiments.

[0051] Please see Figure 1 , Figure 1 This is a flowchart illustrating a data transmission method applied to a first terminal according to an embodiment of this application. The data transmission method may include:

[0052] S101. In response to the data transmission operation, acquire the target transmission data of the first terminal.

[0053] The first terminal refers to the terminal used to send target transmission data. The first terminal is equipped with a display screen, which can display the target graphic code corresponding to the target transmission data.

[0054] In some embodiments, the target data to be transmitted is data that can be transmitted via graphic encoding.

[0055] The graphic encoding can be a QR code, barcode, or other, and this application does not specifically limit it.

[0056] S102. Transmit data slices to the target to obtain a target data sequence, the target data sequence including at least two data slices.

[0057] In this embodiment, graphic encoding is often limited by the device environment in which it is located. For example, whether it is a custom-formatted QR code or a publicly available QR code format, such as a Quick Response Code (QR Code) format, it will be limited by the environment, resulting in a limited data capacity.

[0058] Typically, the data capacity of a single QR code is within a few thousand bytes (kb). However, the amount of data to be transmitted is much larger than the capacity of a single QR code. For example, the data capacity of an image is several times, or even thousands of times, greater than the capacity of a single QR code.

[0059] Therefore, this embodiment slices the target transmission data to obtain a target data sequence comprising at least two data slices. This allows the target transmission data to be split into multiple graphic codes based on data slicing, and information can be displayed and transmitted based on these multiple graphic codes respectively.

[0060] S103. Based on the metadata of the target data sequence, perform a graphical encoding conversion on the target data sequence to generate a target graphical encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0061] The first metadata is used to indicate the length of the target data sequence. This first metadata enables the second terminal receiving the target transmitted data to determine whether it has received the complete target transmitted data based on the length of the target data sequence. Therefore, it can be understood that the first metadata includes at least the length information of the target data sequence.

[0062] In some embodiments, the data length of the target data sequence, or the number of data slices in the target data sequence, can be determined as the length information of the first metadata.

[0063] The target graphic encoding can include multiple graphic encodings. Performing graphic encoding conversion on data slices in the target data sequence based on the first metadata allows the resulting target graphic encoding to carry information from the first metadata. For example, performing QR code conversion on multiple data slices in the target data sequence based on the first metadata yields multiple QR codes, and these multiple QR codes constitute the target graphic encoding in this embodiment of the application.

[0064] In some implementations, the first metadata can be converted into a QR code to generate a first QR code. Converting data slices into QR codes can generate second QR codes. The first QR code corresponding to the first metadata and the second QR codes corresponding to multiple data slices together form the target graphic code.

[0065] For example, such as Figure 2 As shown, Figure 2 This is a first schematic diagram of the target data sequence proposed in an embodiment of this application. The target transmitted data is sliced ​​to obtain first metadata and multiple data slices. The first metadata is converted into a QR code to generate a first QR code. Data slices 1 to n are converted into QR codes to generate second QR codes 1 to n. The first QR code and the second QR codes 1 to n together form the target graphic encoding.

[0066] S104. Display the target graphic code, which is used to transmit the target data.

[0067] The second terminal refers to the terminal used to receive data transmitted from the target. The second terminal may be equipped with an image sensor. Based on the image sensor, the second terminal can scan and parse the target graphic encoding displayed by the first terminal.

[0068] In one embodiment, a first terminal may display a target graphic code on its display screen. A second terminal, in response to a triggered data reception event, scans and parses the target graphic code displayed by the first terminal to obtain the target transmission data. This data reception event may be triggered by a user based on a data reception operation performed by the second terminal, or it may be triggered automatically by the second terminal itself.

[0069] The second terminal can also be equipped with a display screen. The received target transmission data can be displayed on the display screen of the second terminal. If the second terminal is not equipped with a display screen, the received target transmission data can be stored.

[0070] like Figure 3 As shown, Figure 3 This is a schematic diagram of data transmission between a first terminal and a second terminal provided in an embodiment of this application. The first terminal A displays a target graphic code on its screen, and the second terminal B scans this target graphic code to obtain the target transmission data transmitted by the first terminal.

[0071] It should be noted that, Figure 3 The first and second terminals are merely illustrative and do not represent a limitation on the structure of the first and second terminals in this application.

[0072] The data transmission method proposed in this application is applied to a first terminal. In response to a data transmission operation, the target transmission data of the first terminal is acquired, and the target transmission data is sliced ​​to obtain a target data sequence, which includes at least two data slices. Because the amount of data that a single graphic code can carry is affected by factors such as the device environment, the amount of data that a single graphic code can carry is relatively small. However, the target transmission data is not limited to text, images, or video data. Therefore, when using graphic codes to transmit large amounts of data, the amount of target transmission data transmitted by the first terminal will be greater than the amount of data that a single graphic code can carry. Therefore, by slicing the target transmission data to obtain a target data sequence including at least two data slices, the data in the target transmission data can be distributed. Since the target data sequence includes at least two data slices, if graphic encoding conversion is directly performed on the data slices in the target data sequence to generate corresponding graphic codes, the second terminal receiving the target transmission data cannot determine whether it has received the complete target transmission data based on the received graphic codes. Therefore, based on the first metadata corresponding to the target data sequence, graphic encoding conversion is performed on the target data sequence to generate a target graphic code. The first terminal transmits the target transmission data to the second terminal based on the target graphic code. The first metadata indicates the length of the target data sequence, enabling the second terminal to verify the integrity of the target data sequence based on the length indicated by the first metadata, ensuring the receipt of complete target transmission data. Therefore, by performing graphic encoding conversion on the target data sequence in the first terminal based on the first metadata, complete data transmission between the two terminals can be ensured. Thus, data transmission based on target graphic encoding eliminates the need for network services, preventing data leakage during transmission. Furthermore, it eliminates the need for a transmission medium, improving the convenience of data transmission while ensuring reliable data transmission.

[0073] In some implementations, the process of obtaining the target transmission data of the first terminal may include: obtaining the target transmission object of the first terminal; encoding the target transmission object to generate the target transmission data.

[0074] Because image encoding requires data in a specific format, and some types of data, such as images, cannot be directly transmitted via image encoding, the target data is encoded to generate data suitable for image encoding transmission. For example, images cannot be directly transmitted via QR codes. Therefore, when the target data is an image, it is encoded to generate data suitable for QR code transmission, such as text data.

[0075] In this embodiment, the target transmission object corresponding to a data transmission event triggered by the first terminal can be obtained in response to such event. The data transmission event can be triggered by a user's data transmission operation on the target transmission object in the first terminal, such as a user clicking a share control, or it can be automatically triggered by the first terminal at regular intervals.

[0076] For example, when a user clicks the share control of an image on the first terminal, a data transmission event for that image is triggered. In response to this data transmission event, the first terminal encodes the image and generates the target transmission data corresponding to that image.

[0077] In some implementations, the target transmission object can be encoded using a preset encoding method to generate target transmission data. Different types of target transmission objects can use different encoding methods. For example, if the target transmission object is an image, it can be encoded using base64 to generate the corresponding target transmission data.

[0078] Base64 is an encoding method that can convert binary data into printable characters. Therefore, base64 can convert image data, which cannot be fully represented by a QR code, into text data that can be directly represented by a QR code. In addition, encoding methods such as base32 and base16 can also be used to obtain the target transmission data. This application does not limit this approach.

[0079] In some implementations, if the target transmission object is data that can be directly transmitted via graphic encoding, such as text data, then there is no need to encode the target transmission object. This target transmission object is the target transmission data in this application.

[0080] By acquiring and encoding the target transmission object, the encoded data can be used for graphic encoding transmission, improving the convenience of data transmission. Furthermore, data transmission via target graphic encoding can be performed without relying on network services, further enhancing both convenience and reliability.

[0081] In some implementations, the aforementioned metadata further includes second metadata for the data slices, which indicates the position of the data slices within the target data sequence. The process of converting the target data sequence into a graphical encoding based on its metadata, and generating the target graphical encoding, may include: converting the target data sequence into a graphical encoding based on the first and second metadata, to generate the target graphical encoding.

[0082] The second metadata indicates the position of the data slice within the target data sequence. This second metadata allows the second terminal receiving the target transmitted data to determine the position of the parsed data slice within the overall data. Furthermore, based on this position, the data slice can be correctly assembled, thereby achieving the correct reconstruction of the target transmitted data.

[0083] Therefore, it is understandable that the second metadata includes at least the location information of each data slice, and the second metadata corresponding to different data slices is different.

[0084] The first terminal can send the location information of the data slice in the target data sequence to the second terminal through the second metadata. This enables the second terminal, which does not have the ability to determine the location of the data slice, to correctly splice multiple data slices by parsing the second metadata sent by the first terminal and obtain the correct target transmission data.

[0085] In some implementations, the sequence number of the data slice in the target data sequence can be determined as the location information of the second metadata. Based on the first terminal, the data slices in the target data sequence are converted into graphic codes according to the first and second metadata, for example, by converting them into QR codes or barcodes. This allows the target graphic code to carry information from both the first and second metadata simultaneously, reducing the performance requirements of the second terminal and further improving the convenience of data transmission.

[0086] In some implementations, the process of converting the target data sequence into a graphic code based on the first metadata and the second metadata to generate the target graphic code may include: processing the first metadata to generate a first QR code; generating a second QR code based on the second metadata and the data slice; and generating the target graphic code based on the first QR code and the second QR code.

[0087] The first QR code refers to the QR code corresponding to the first metadata.

[0088] In this embodiment, the conversion of the target data sequence into a graphic encoding means converting the target data sequence into a QR code. Specifically, if one data slice is converted into one QR code, the target graphic encoding obtained from the conversion of the target data sequence is a QR code sequence comprising multiple QR codes.

[0089] Specifically, if the first metadata can be directly transmitted via a QR code, then the first metadata is converted into a QR code to generate a first QR code. If the first metadata cannot be directly transmitted via a QR code, then the first metadata is encoded to generate first metadata that can be used for QR code transmission. The encoding method of the first metadata can be the same as the encoding method of the target transmission object mentioned above, and will not be elaborated further here.

[0090] There are several ways to generate a second QR code based on the second metadata and the data slice corresponding to the data slice. In some implementations, the process of generating a second QR code based on the second metadata and the data slice corresponding to the data slice may include: concatenating the second metadata and the data slice corresponding to the data slice to obtain a target data slice; and processing the target data slice to generate a second QR code.

[0091] In this embodiment, the splicing method and structure of the second metadata and the data slice can be freely set, and can be preset in the first terminal and / or the second terminal. For example, the second metadata can be spliced ​​at the beginning, end, or middle of the data slice to obtain the target data slice.

[0092] For example, with Figure 4 Take the structure shown as an example. Figure 4 As shown, Figure 4 This is a schematic diagram of the target data slice proposed in an embodiment of this application. The second metadata, serving as the header of the data slice, is concatenated with the data slice to obtain the target data slice.

[0093] In other implementations, the process of generating a second QR code based on the second metadata corresponding to the data slice and the data slice may include: generating a first sub-QR code corresponding to the data slice and a second sub-QR code corresponding to the second metadata; and obtaining the second QR code based on the first sub-QR code and the second sub-QR code.

[0094] Similarly, it is understandable that if the second metadata is data that cannot be directly transmitted via QR code, then the second metadata is encoded to obtain second metadata that can be used for QR code transmission.

[0095] Since there are multiple data slices, there can also be multiple second QR codes generated based on the data slices. The target graphic code generated based on the first and second QR codes includes at least one first QR code and at least one second QR code. The first QR code can be inserted among multiple second QR codes, or it can be the first QR code in the target graphic code, placed in front of multiple second QR codes, or it can be the last QR code in the target graphic code, placed behind multiple second QR codes.

[0096] For example, with Figure 5 For example. Figure 5 As shown, Figure 5This is a second schematic diagram of the target graphic encoding proposed in this application embodiment. The target transmission data is sliced ​​to obtain n data slices. These n data slices are concatenated with their corresponding second metadata to obtain n target data slices. The n target data slices are then converted into QR codes to generate n second QR codes corresponding to the n target data slices. The number of target data slices is equal to the number of second QR codes.

[0097] In another implementation, multiple target data slices can generate a second QR code. For example, such as... Figure 6 As shown, Figure 6 This is a third schematic diagram of the target graphic encoding proposed in this application embodiment. The target transmission data is sliced ​​to obtain n data slices. These n data slices are concatenated with their corresponding second metadata to obtain n target data slices. The target data slices 1 to n are then converted into QR codes to generate second QR codes 1 to m. The number of target data slices is greater than the number of second QR codes.

[0098] The first QR code generated from the first metadata and the second QR code generated from the second metadata and data slices are used to generate a target graphic code. This allows the target graphic code to simultaneously contain information from the first and second metadata, enabling the second terminal to efficiently verify the integrity and correctness of the data based on the received target graphic code, thus ensuring the correctness and integrity of the data transmission.

[0099] In some implementations, the process of processing the target data slice to generate the second QR code may include: encrypting the target data slice according to the first metadata corresponding to the target data sequence to obtain an encrypted target data slice; and performing graphic encoding conversion on the encrypted target data slice to obtain the second QR code.

[0100] In this embodiment, the first metadata may carry encrypted information. The target data slice is encrypted using the encrypted information carried in the first metadata to obtain the encrypted target data slice. The encrypted information in the first metadata may include a key and a related encryption strategy. This encryption strategy can be a symmetric encryption algorithm or an asymmetric encryption algorithm. For example, the Data Encryption Standard (DES) and a number theory-based asymmetric encryption algorithm (Rivest-Shamir-Adleman, RSA).

[0101] In another embodiment, the data slice can be encrypted based on the encryption information carried in the second metadata to obtain an encrypted data slice. Then, a second QR code is generated based on the encrypted data slice and the second metadata.

[0102] This embodiment ensures the security of data output and prevents data leakage during transmission by encrypting the target data slice or data slice.

[0103] In some implementations, the process of slicing the target transmission data to obtain a target data sequence may include: obtaining a first data volume corresponding to a single graphic code; and slicing the target transmission data according to the first data volume to obtain a target data sequence.

[0104] Here, the first data volume refers to the data capacity that a single graphic code (such as a single QR code) can carry. Determining the data volume of a data slice by using the first data volume ensures that the graphic code converted from the data slice can completely carry the information of that data slice. Therefore, a preset data volume corresponding to the data slice is determined based on the first data volume. The target transmission data is sliced ​​according to the preset data volume to obtain the target data sequence.

[0105] In one embodiment, the first data volume is equal to the data volume of the data slice.

[0106] In another embodiment, the data slice can be concatenated with the second metadata to obtain a target data slice; the target data slice is then converted into a graphic encoding to obtain a single graphic encoding. For example, a second QR code is generated based on the second metadata and the data slice. Therefore, in this embodiment, the preset data volume of the data slice can be determined based on the first data volume corresponding to the graphic encoding and the second data volume corresponding to the second metadata.

[0107] Here, the second data volume refers to the target data volume of the second metadata. The actual data volume of the second metadata should be less than or equal to this second data volume. In some implementations, the first data volume can be subtracted from the second data volume to obtain the preset data volume of the data slice. The preset data volume of a single data slice should be less than or equal to the difference between the first data volume and the second data volume.

[0108] In some implementations, the second data volume can be determined by a preset or user-defined format of the second metadata. For example, the second metadata may include not only the location information of the data slice within the target data sequence but also encryption / decryption information. Therefore, the format of the second metadata can be a data format composed of location information and encryption / decryption information. The second data volume corresponding to this second metadata is then determined by the target data volume corresponding to the location information and the target data volume corresponding to the encryption / decryption information in the second metadata. If the second metadata may also include other information, the second data volume can be determined based on the target data volume corresponding to the location information, the target data volume corresponding to the encryption / decryption information, and the target data volume corresponding to other information.

[0109] Therefore, by determining the preset data volume through the first data volume corresponding to a single graphic code and the second data volume corresponding to the second metadata, it is possible to avoid the data volume of the generated target data slice being greater than the data volume that a single graphic code can carry, thereby ensuring the complete transmission of data.

[0110] In some implementations, the first data volume can be determined by obtaining the first performance parameters of the first terminal and the second performance parameters of the second terminal used to receive the target transmitted data; based on the first and second performance parameters.

[0111] The graphic encoding displayed on the first terminal's screen is often limited by the terminal's primary performance parameters. For example, when the graphic encoding is a QR code, the size of the QR code displayed on the screen is limited by the screen area, and the density of the black and white blocks in the QR code is limited by the screen resolution. For the second terminal, its ability to scan QR codes is limited by the hardware and software performance of the camera on the device, as well as environmental factors such as the distance from the first terminal when triggering the scanning operation, ambient light, and the degree of vibration.

[0112] Therefore, the first performance parameter of the first terminal includes at least one of the screen size and resolution of the first terminal. The second performance parameter of the second terminal includes at least one of the distance between the second terminal and the first terminal, relevant parameters of the environment in which the second terminal is located, and performance parameters of the image sensor of the second terminal.

[0113] Therefore, by using the first and second performance parameters mentioned above, the amount of data that the graphic encoding can carry can be accurately determined.

[0114] In some implementations, after slicing the target transmission data according to the first data volume to obtain the target data sequence, the number of slices can be determined according to the first data volume and the data size of the target transmission data; and the number of slices is recorded in the first metadata corresponding to the target data sequence.

[0115] In this embodiment, the size of the target data can be divided by the first data volume to obtain the number of data slices. The number of slices is recorded in the first metadata corresponding to the target data sequence, so that the length of the target data sequence can be determined by the number of slices recorded in the first metadata. When the second terminal parses and obtains the target data sequence, it can determine whether all data slices have been received based on the number of slices recorded in the first metadata, thereby ensuring that when all data slices are received, the complete target transmission data can be generated in a timely manner.

[0116] In some implementations, after slicing the target transmission data according to the first data volume to obtain the target data sequence, the slice number of the data slice in the target data sequence can be obtained; the slice number is encoded to generate the second metadata corresponding to the data slice.

[0117] The slice number indicates the position of each data slice in the target data sequence.

[0118] In this embodiment, since the slice sequence number may not be directly transmitted via QR code, the slice sequence number of each data slice in the target data sequence is determined according to the slice order. The slice sequence number is then encoded to generate the second metadata corresponding to each data slice. The encoding method for the slice sequence number can be the base64 encoding method described above.

[0119] In some implementations, the first metadata may further include at least one of first encryption / decryption information, encoding / decoding information, and file information corresponding to the target transmission data, and / or the second metadata may further include at least one of second encryption / decryption information and verification information.

[0120] The first encryption / decryption information refers to the encryption / decryption information contained in the first metadata, such as the key and encryption / decryption strategy. The second encryption / decryption information refers to the encryption / decryption information contained in the second metadata. The encryption / decryption strategy contained in the first encryption / decryption information can be the same as the encryption / decryption strategy contained in the second encryption / decryption information.

[0121] In some embodiments, the encryption information in the first encryption / decryption information can be used to encrypt multiple target data slices in the target data sequence to obtain an encrypted target data sequence. The encryption information in the second encryption / decryption information can be used to encrypt data slices to obtain encrypted data slices; based on the encrypted data slices and the second metadata, an encrypted target data slice can be further generated.

[0122] The first metadata may also include encoding / decoding information, which can be a preset encoding / decoding strategy, such as the encoding / decoding strategy corresponding to base64. When the encoding / decoding information is not specified, the encoding strategy corresponding to base64 can be used by default, and its reverse process is the decoding strategy.

[0123] The first metadata may also include file information corresponding to the target transmitted data. This file information may specifically include the name and creation time of the file to which the target transmitted data belongs.

[0124] The second metadata may also include verification information. This verification information can specifically include verification information for data slices. For example, verification information to check if a data slice contains errors.

[0125] In some implementations, the process of displaying the target graphic code may include: determining the display area of ​​the target graphic code on the first terminal; and scrolling the QR code in the target graphic code based on the display area.

[0126] In this embodiment, the target graphic encoding includes multiple QR codes. Therefore, the QR codes in the target graphic encoding can be scrolled and displayed in the display area of ​​the first terminal, so that the user can scan and parse the scrolling QR codes through the second terminal to obtain the target transmission data transmitted by the first terminal.

[0127] For example, such as Figure 7 As shown, Figure 7 This is a schematic diagram illustrating the target graphic encoding in the first terminal provided in this application embodiment. The target graphic encoding includes a first QR code and a sequence to be displayed consisting of second QR codes 1 to n. The first QR code is the first QR code displayed in the first terminal, and the second QR codes 1 to n are displayed sequentially after the first QR code.

[0128] In one embodiment, the QR codes in the target graphic code can be displayed cyclically at preset time intervals. Once one round of target graphic code playback is complete, the loop restarts. If it is necessary to stop the loop playback of the target graphic code, its display on the first terminal can be turned off in response to the user's cancel sharing operation.

[0129] The data transmission method applied to the first terminal in this application will be described below with reference to a specific implementation scenario. Figure 8 As shown, Figure 8 This is a schematic diagram of the image transmission process applied to the first terminal provided in an embodiment of this application.

[0130] In response to a user's image sharing action, the system determines the image selected by the user and triggers the image sharing function on the first terminal.

[0131] Optionally, the image can be compressed.

[0132] Based on the base64 algorithm pre-installed in the first terminal, or the method specified by the user, the compressed image is encoded to generate target transmission data that can be used for QR code transmission.

[0133] Based on the data capacity of a preset or user-specified QR code format, and combined with the data volume determined by the preset or user-defined second metadata format, the preset data volume for each data slice is determined. The number of slices is calculated based on the preset data volume of the data slices and the data size of the image to be shared. The number of slices is recorded in the first metadata.

[0134] Optionally, information such as encryption / decryption methods, image names, and error verification can be recorded in the first metadata.

[0135] Optionally, information such as the number of slices, encryption / decryption method, image name, and error verification can be encoded, and the encoded data can be recorded in the first metadata.

[0136] Based on the preset data volume of each data slice, the target transmission data is sliced ​​sequentially to generate data slices. Multiple data slices form the target data sequence corresponding to the target transmission data. The slice sequence number is determined according to the slicing order. The slice sequence number is recorded in the second metadata.

[0137] Optionally, the slice number is encoded and recorded in the second metadata.

[0138] Optionally, the encryption / decryption method and verification information corresponding to the data slice can be recorded in the second metadata.

[0139] Add second metadata to the header of each data slice to obtain the target data slice. Generate a second QR code corresponding to each target data slice, and generate a first QR code corresponding to the first metadata. Insert the first QR code in front of multiple second QR codes to obtain the target graphic code. The insertion position can be arbitrary and is not limited.

[0140] The target graphic encoding is sent to the QR code rotation display module of the first terminal. Based on the display size and area of ​​the QR code on the first terminal's screen, the QR code in the target graphic encoding is displayed in a cyclical manner at preset or user-set time intervals. When one cycle of playback is completed, the cyclic rotation restarts.

[0141] In response to the user canceling the image sharing action, the carousel loop is turned off.

[0142] It should be noted that the application scenarios of this application embodiment include, but are not limited to, annotation distribution of electronic whiteboards based on QR codes, sharing of pictures or files between devices, and sharing of courseware screenshots or study notes between devices.

[0143] Compared to data transmission based on media or channel interfaces, the data transmission method proposed in this application eliminates the need for devices with media or channel interfaces, reducing hardware costs. Furthermore, since the data transmission link no longer involves hardware modules, the failure rate is lower and reliability is greater. Simultaneously, because QR code-based data transmission can be performed without a network connection, the data transmission method proposed in this application can further reduce the cost of network modules and can be deployed in locations with no or poor network coverage, supporting offline use and unaffected by network transmission speed. Since data transmission does not pass through other devices or communication channels, data leakage during transmission is avoided, improving data transmission security.

[0144] Please see Figure 9 , Figure 9 This is a schematic flowchart illustrating a data transmission method applied to a second terminal according to an embodiment of this application. The data transmission method may include:

[0145] S201. Scan the QR code displayed on the first terminal. The QR code is a target graphic encoding QR code in the first terminal.

[0146] S202. Obtain the first metadata carried by the target graphic code. The first metadata is used to indicate the length of the target data sequence corresponding to the target graphic code.

[0147] S203. Verify the target graphic encoding based on the first metadata;

[0148] S204. If the target graphic code verification passes, the target graphic code is parsed to obtain the target data sequence, which includes at least two data slices.

[0149] S205. The data slices are spliced ​​together to obtain the target transmission data transmitted by the first terminal.

[0150] In this embodiment, the QR code in the target graphic encoding displayed on the first terminal can be continuously scanned in real time in response to the data receiving operation based on the second terminal.

[0151] In this embodiment, each time a target graphic code QR code displayed on the first terminal is scanned, the content of the QR code is analyzed to determine the specific information carried by the target graphic code. If it is determined that the information carried by the current target graphic code is first metadata, the first metadata is obtained, the length of the target data sequence is determined based on the first metadata, and the first metadata is stored in the second terminal.

[0152] If it is determined that the information carried by the current target graphic encoding is data slice information, then the QR code corresponding to the data slice is stored, and the number of data slices is determined. If this number is consistent with the length recorded in the first metadata, and there are no missing or abrupt changes in the sequence number of each data slice, then it is determined that the second terminal has received the complete target graphic encoding.

[0153] In some implementations, if the second terminal scans the QR codes in the target graphic encoding sequentially according to the display order of the QR codes in the target graphic encoding of the first terminal, then when the number of data slices matches the length recorded in the first metadata, it is determined that the second terminal has received the complete target graphic encoding. Each QR code in the target graphic encoding is parsed to obtain data slices. The parsed data slices are then concatenated according to the scanning order of the QR codes in the target graphic encoding to obtain the target transmission data.

[0154] The QR code can also carry secondary metadata information corresponding to the data slice.

[0155] Therefore, in one embodiment, when the number of data slices carried by the QR code matches the length recorded in the first metadata, the second metadata can be obtained. The sequence number of each data slice is then determined based on the second metadata to determine if there are any missing or abrupt changes. If the sequence number of each data slice is not missing or abrupt, it is determined that the second terminal has received the complete target graphic encoding. Each QR code in the target graphic encoding is parsed to obtain data slices. The parsed data slices are then concatenated according to the position information in the second metadata corresponding to each data slice to obtain the target transmission data.

[0156] Therefore, even if the second terminal does not scan the QR codes in the order they are displayed in the first terminal, or if the second terminal does not have the ability to determine the location of the data slices, it is possible to correctly splice multiple data slices by parsing the second metadata sent by the first terminal to obtain the correct target transmission data.

[0157] Furthermore, in some implementations, the correctness of the target data sequence can be verified based on the first metadata and / or the second metadata. If the verification passes, the parsed target data sequence is determined to be correct.

[0158] In some implementations, after obtaining the target transmission data, if the target transmission data and the target transmission object transmitted by the first terminal are in different formats, the target transmission data is decoded and restored to obtain the target transmission object. For example, if the parsed target transmission data is text data and the target transmission object transmitted by the first terminal is an image, the text data is decoded and restored to obtain the image transmitted by the first terminal.

[0159] The second terminal can store the parsed target transmission data and / or target transmission data. In some embodiments, the second terminal can also display the parsed target transmission data and / or target transmission data on its display interface.

[0160] It should be noted that the second terminal can also perform the reverse process of the above-described embodiment of the data transmission method applied to the first terminal, which will not be repeated here in this embodiment.

[0161] The following describes the data transmission method applied to the second terminal in this application, using a specific implementation scenario as an example. Figure 10 As shown, Figure 10 This is a schematic diagram of the image transmission process applied to a second terminal provided in an embodiment of this application.

[0162] In response to the image receiving operation, the image receiving function of the second terminal is triggered. The QR code scanning interface of the second terminal is opened and maintained, continuously scanning the QR code in the target graphic encoding and parsing it in real time. Each time the QR code is parsed, corresponding parsed content is generated until a reception completion marker appears. The parsed content is analyzed in real time. When the content is the content of the first metadata, it can be processed through optional decoding and / or decryption to obtain the length information carried in the first metadata. This length information is then stored.

[0163] When the content carried by the QR code is the content of a data slice, the sequence number corresponding to the data slice can be determined through optional decoding and / or decryption. The information of the data slice and / or the QR code corresponding to the data slice and / or the sequence number corresponding to the data slice are stored.

[0164] Determine whether the first metadata and all data slices in the target data sequence have been received. If the first metadata and all data slices in the target data sequence have been received, then reception is considered complete. The criterion for determining that all data slices in the target data sequence have been received is that the length indicated by the first metadata is consistent with the length of the received target data sequence, and there are no missing or abrupt changes in the sequence numbers of the data slices.

[0165] Optionally, the data slices can also be validated for correctness. If the data slice validation passes, reception is considered complete. The QR code scanning interface is then closed. Based on the sequence number of each data slice, the QR codes in the received target graphic encoding are parsed sequentially to obtain the data slices. The data slices are then sequentially concatenated to obtain the target transmission data transmitted by the first terminal.

[0166] Based on a preset or user-selected decoding strategy, the target transmitted data is decoded to generate the corresponding image data. The decoding process is the inverse of base64 encoding.

[0167] An image is generated based on the image data. This completes the transmission of the image between the first and second terminals.

[0168] To facilitate better implementation of the data transmission method provided in the embodiments of this application, the embodiments of this application also provide an apparatus based on the data transmission method applied to the first terminal described above. The meanings of the terms used are the same as in the data transmission method described above, and specific implementation details can be found in the descriptions in the method embodiments.

[0169] For example, such as Figure 11 As shown, the first data transmission device may include: an acquisition module 301, a slicing module 302, a conversion module 303, and a display module 304. Among them,

[0170] The acquisition module 301 is used to acquire the target transmission data of the first terminal in response to the data transmission operation;

[0171] The slicing module 302 is used to slice the target transmission data to obtain a target data sequence, the target data sequence including at least two data slices;

[0172] The conversion module 303 is used to convert the target data sequence into a graphic encoding based on the metadata of the target data sequence, and generate a target graphic encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0173] Display module 304 is used to display the target graphic code, which is used to transmit target data.

[0174] In one embodiment of this application, when the acquisition module 301 acquires the target transmission data of the first terminal, it specifically performs the following steps:

[0175] Obtain the target transmission object of the first terminal;

[0176] The target transmission object is encoded to generate the target transmission data.

[0177] In one embodiment of this application, the aforementioned metadata further includes second metadata of the data slice, which is used to indicate the position of the data slice in the target data sequence.

[0178] When the conversion module 303 performs graphic encoding conversion on the target data sequence based on the metadata of the target data sequence to generate the target graphic code, it specifically executes the following steps:

[0179] Based on the first and second metadata, the target data sequence is transformed into a graphical encoding to generate the target graphical encoding.

[0180] In one embodiment of this application, when the conversion module 303 performs graphic encoding conversion on the target data sequence based on the first metadata and the second metadata to generate the target graphic encoding, it specifically performs the following steps:

[0181] Process the first metadata to generate the first QR code;

[0182] A second QR code is generated based on the second metadata and data slices;

[0183] Generate the target graphic code based on the first and second QR codes.

[0184] In one embodiment of this application, when the conversion module 303 generates a second QR code based on the second metadata and the data slice, it specifically performs the following steps:

[0185] By concatenating the second metadata and the data slice corresponding to the data slice, the target data slice is obtained;

[0186] The target data slice is processed to generate a second QR code.

[0187] In one embodiment of this application, when the conversion module 303 processes the target data slice to generate the second QR code, it specifically performs the following steps:

[0188] The target data slice is encrypted based on the first metadata corresponding to the target data sequence to obtain the encrypted target data slice.

[0189] The encrypted target data slice is converted into a second QR code by performing graphic encoding.

[0190] In one embodiment of this application, when the slicing module 302 slices the target transmission data to obtain the target data sequence, it specifically performs the following steps:

[0191] Obtain the first data volume corresponding to a single graphic code;

[0192] The target transmitted data is sliced ​​based on the first data volume to obtain the target data sequence.

[0193] In one embodiment of this application, when the slicing module 302 obtains the first data volume corresponding to a single graphic code, it specifically performs the following steps:

[0194] Obtain the first performance parameters of the first terminal and the second performance parameters of the second terminal used to receive target transmission data;

[0195] The first data volume is determined based on the first performance parameter and the second performance parameter.

[0196] In one embodiment of this application, the slicing module 302 further performs the following steps:

[0197] The number of slices is determined based on the initial data volume and the target data size.

[0198] The number of slices is recorded in the first metadata corresponding to the target data sequence.

[0199] In one embodiment of this application, the slicing module 302 further performs the following steps:

[0200] Obtain the slice number of the data slice in the target data sequence;

[0201] Encode the slice number to generate the second metadata corresponding to the data slice.

[0202] In one embodiment of this application, the display module 304 performs the following steps when displaying the target graphic code:

[0203] Determine the display area of ​​the target graphic code on the first terminal;

[0204] The QR code in the target graphic encoding is displayed in a scrolling manner based on the display area.

[0205] To facilitate better implementation of the data transmission method provided in the embodiments of this application, this application also provides an apparatus based on the above-described data transmission method applied to a second terminal. The meanings of the terms used are the same as in the data transmission method described above, and specific implementation details can be found in the descriptions within the method embodiments.

[0206] For example, such as Figure 12 As shown, the second data transmission device may include: a scanning module 401, an acquisition module 402, a verification module 403, a parsing module 404, and a splicing module 405. Among them,

[0207] The scanning module 401 is used to scan the QR code displayed on the first terminal, where the QR code is a target graphic encoding QR code in the first terminal;

[0208] The acquisition module 402 is used to acquire the first metadata carried by the target graphic code, the first metadata being used to indicate the length of the target data sequence corresponding to the target graphic code;

[0209] Verification module 403 is used to verify the target graphic encoding based on the first metadata.

[0210] The parsing module 404 is used to parse the target graphic code if the target graphic code verification passes, and obtain the target data sequence, which includes at least two data slices.

[0211] The splicing module 405 is used to splice data slices to obtain the target transmission data transmitted by the first terminal.

[0212] In practice, each of the above modules can be implemented as an independent entity or can be combined arbitrarily to be implemented as the same or several entities. For the specific implementation methods and corresponding beneficial effects of each of the above modules, please refer to the previous method embodiments, which will not be repeated here.

[0213] This application also provides an electronic device, which may be a server or a terminal, etc. Figure 13 As shown, it illustrates a structural schematic diagram of the electronic device involved in the embodiments of this application, specifically:

[0214] The electronic device may include components such as a processor 601 with one or more processing cores, a memory 602 with one or more computer-readable storage media, a power supply 603, and an input unit 604. Those skilled in the art will understand that... Figure 13 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:

[0215] The processor 601 is the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes computer programs and / or modules stored in the memory 602, and calls data stored in the memory 602, to perform various functions and process data. Optionally, the processor 601 may include one or more processing cores; preferably, the processor 601 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 601.

[0216] The memory 602 can be used to store computer programs and modules. The processor 601 executes various functional applications and data processing by running the computer programs and modules stored in the memory 602. The memory 602 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, computer programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 602 may also include a memory controller to provide the processor 601 with access to the memory 602.

[0217] The electronic device also includes a power supply 603 that supplies power to the various components. Preferably, the power supply 603 can be logically connected to the processor 601 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 603 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0218] The electronic device may also include an input unit 604, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0219] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 601 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 602 according to the following instructions, and the processor 601 runs the computer programs stored in the memory 602 to realize various functions, such as:

[0220] In response to a data transmission operation, acquire the target transmission data of the first terminal;

[0221] Transmit data slices to the target to obtain a target data sequence, which includes at least two data slices.

[0222] Based on the metadata of the target data sequence, the target data sequence is transformed into a graphical encoding to generate a target graphical encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0223] Display target graphic encoding, which is used to transmit target data.

[0224] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the detailed description of the data transmission method above, which will not be repeated here.

[0225] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0226] Therefore, embodiments of this application provide a computer-readable storage medium storing a computer program that can be loaded by a processor to execute steps in any of the data transmission methods provided in embodiments of this application. For example, the computer program can execute the following steps:

[0227] In response to a data transmission operation, acquire the target transmission data of the first terminal;

[0228] Transmit data slices to the target to obtain a target data sequence, which includes at least two data slices.

[0229] Based on the metadata of the target data sequence, the target data sequence is transformed into a graphical encoding to generate a target graphical encoding. The metadata includes at least the first metadata, which is used to indicate the length of the target data sequence.

[0230] Display target graphic encoding, which is used to transmit target data.

[0231] For details on the specific implementation methods and corresponding beneficial effects of the above operations, please refer to the previous embodiments, which will not be repeated here.

[0232] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0233] Since the computer program stored in the computer-readable storage medium can execute the steps of any of the data transmission methods provided in the embodiments of this application, the beneficial effects that any of the data transmission methods provided in the embodiments of this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.

[0234] According to one aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the aforementioned data transmission method.

[0235] The foregoing has provided a detailed description of a data transmission method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A data transmission method, applied to a first terminal, characterized in that, include: In response to a data transmission operation, the target transmission data of the first terminal is acquired; The target data slices are transmitted to obtain a target data sequence, the target data sequence comprising at least two data slices; Based on the metadata of the target data sequence, the target data sequence is converted into a graphic encoding to generate a target graphic encoding. The metadata includes at least a first metadata, which is used to indicate the length of the target data sequence. The target graphic encoding is displayed and is used to transmit the target transmission data.

2. The data transmission method according to claim 1, characterized in that, The step of obtaining the target transmission data of the first terminal includes: Obtain the target transmission object of the first terminal; The target transmission object is encoded to generate the target transmission data.

3. The data transmission method according to claim 1 or 2, characterized in that, The metadata also includes second metadata for the data slice, which indicates the position of the data slice in the target data sequence; The step of converting the target data sequence into a graphic encoding based on the metadata of the target data sequence to generate a target graphic encoding includes: Based on the first metadata and the second metadata, the target data sequence is converted into a graphic encoding to generate the target graphic encoding.

4. The data transmission method according to claim 3, characterized in that, The step of converting the target data sequence into a graphic encoding based on the first metadata and the second metadata to generate the target graphic encoding includes: The first metadata is processed to generate the first QR code; A second QR code is generated based on the second metadata and the data slice; The target graphic code is generated based on the first QR code and the second QR code.

5. The data transmission method according to claim 4, characterized in that, The step of generating a second QR code based on the second metadata corresponding to the data slice and the data slice includes: By concatenating the second metadata corresponding to the data slice and the data slice, a target data slice is obtained; The target data slice is processed to generate the second QR code.

6. The data transmission method according to claim 5, characterized in that, The step of processing the target data slice to generate the second QR code includes: The target data slice is encrypted based on the first metadata corresponding to the target data sequence to obtain the encrypted target data slice. The encrypted target data slice is converted into a graphic encoding to obtain the second QR code.

7. The data transmission method according to claim 1, characterized in that, The step of transmitting data slices to the target to obtain a target data sequence includes: Obtain the first data volume corresponding to a single graphic code; The target transmission data is sliced ​​according to the first data volume to obtain the target data sequence.

8. The data transmission method according to claim 7, characterized in that, The step of obtaining the first data volume corresponding to a single graphic code includes: Obtain the first performance parameters of the first terminal and the second performance parameters of the second terminal used to receive the target transmitted data; The first data volume is determined based on the first performance parameter and the second performance parameter.

9. The data transmission method according to claim 7, characterized in that, After slicing the target transmission data according to the first data volume to obtain the target data sequence, the method further includes: The number of slices is determined based on the first data volume and the data size of the target transmitted data; The number of slices is recorded in the first metadata corresponding to the target data sequence.

10. The data transmission method according to claim 7, characterized in that, After slicing the target transmission data according to the first data volume to obtain the target data sequence, the method further includes: Obtain the slice number of the data slice in the target data sequence; The slice number is encoded to generate the second metadata corresponding to the data slice.

11. The data transmission method according to claim 1, characterized in that, The display of the target graphic encoding includes: Determine the display area of ​​the target graphic code in the first terminal; The QR code in the target graphic encoding is displayed in a scrolling manner based on the display area.

12. A data transmission method applied to a second terminal, characterized in that, include: Scan the QR code displayed on the first terminal, wherein the QR code is a target graphic encoding QR code in the first terminal; Obtain the first metadata carried by the target graphic code, wherein the first metadata is used to indicate the length of the target data sequence corresponding to the target graphic code; The target graphic encoding is verified based on the first metadata. If the target graphic encoding verification passes, the target graphic encoding is parsed to obtain a target data sequence, which includes at least two data slices; The data slices are spliced ​​together to obtain the target transmission data transmitted by the first terminal.

13. A data transmission device, characterized in that, include: The acquisition module is used to acquire the target transmission data of the first terminal in response to the data transmission operation; A slicing module is used to slice the target transmission data to obtain a target data sequence, wherein the target data sequence includes at least two data slices; A conversion module is used to convert the target data sequence into a graphic encoding based on the metadata of the target data sequence to generate a target graphic encoding. The metadata includes at least first metadata, which is used to indicate the length of the target data sequence. A transmission module is used to display the target graphic encoding, which is used to transmit the target transmission data.

14. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a computer program, and the processor running the computer program in the memory to perform the data transmission method according to any one of claims 1 to 12.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program adapted for loading by a processor to perform the data transmission method according to any one of claims 1 to 12.