Data transmission method, communication device, storage medium and computer program product

By using a common interface for data transmission between communication devices and generating a level signal change scheme, it solves the problem that communication devices can only transmit data through specific physical interfaces, improves flexibility and compatibility, and reduces development costs.

CN118550863APending Publication Date: 2024-08-27TIANJIN YUGUANG TECHNOLOGY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410707096.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-08-27

AI Technical Summary

Technical Problem

In the existing technology, communication equipment can only complete data transmission through specific physical communication interfaces, resulting in low flexibility and compatibility and high development costs.

Method used

By using a universal interface between the sending device and the receiving device, the target information is obtained and converted, a level signal change scheme is generated, and the universal interface is controlled to generate the corresponding information flow to realize data transmission.

Benefits of technology

There is no need to configure additional physical communication interfaces, which improves the flexibility and compatibility of communication equipment and reduces development costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118550863A
    Figure CN118550863A
Patent Text Reader

Abstract

The invention discloses a data transmission method, a communication device, a storage medium and a computer program product, and relates to the technical field of data transmission, the data transmission method is applied to a sending device, the sending device is connected with a receiving device through a universal interface, and the method specifically comprises the steps of obtaining target information needing to be sent, performing conversion operation on the target information to obtain a corresponding target binary character; generating a level signal change scheme corresponding to the universal interface according to the target binary character, and controlling the universal interface according to the level signal change scheme so as to enable the universal interface to generate an information flow corresponding to the target binary character; and transmitting the information flow to the receiving equipment through the universal interface. By adopting the method and the device, the technical effect that the communication equipment can complete data transmission operation only by means of the universal interface carried by the communication equipment under the condition that a physical communication interface does not need to be additionally configured is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data transmission, and in particular to a data transmission method, communication equipment, storage medium and computer program product. Background Art

[0002] With the continuous development of electronic communication equipment, the demand for communication between different communication equipment is increasing day by day. In the related art, different communication equipment can only rely on specific physical communication interfaces such as serial ports to realize data transmission operations.

[0003] However, this method of relying on a specific physical communication interface to achieve data transmission operations often requires that both the sending device and the receiving device are configured with the same physical communication interface. In this way, when designing communication equipment, technicians need to plan the physical interface of the communication equipment in advance, which greatly limits the flexibility and compatibility of the communication equipment and increases the cost incurred during the development process of the communication equipment.

[0004] Therefore, how to enable communication equipment to complete data transmission operations by relying only on a universal interface without the need for additional configuration of a physical communication interface has become a technical problem that urgently needs to be solved in the industry. Summary of the invention

[0005] The main purpose of this application is to provide a data transmission method, communication equipment, storage medium and computer program product, aiming to solve the technical problem in the related technology that the communication equipment can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication equipment and high development cost.

[0006] To achieve the above object, the present application proposes a data transmission method, which is applied to a sending device, the sending device is connected to a receiving device via a universal interface, and the method includes:

[0007] Acquire target information to be sent, and perform conversion operation on the target information to obtain corresponding target binary characters;

[0008] Generating a level signal change scheme corresponding to the universal interface according to the target binary character, and controlling the universal interface according to the level signal change scheme so that the universal interface generates an information flow corresponding to the target binary character;

[0009] The information stream is delivered to the receiving device via the universal interface.

[0010] In one embodiment, the step of generating a level signal change scheme corresponding to the universal interface according to the target binary character includes:

[0011] Determining the number of high-bit signals and the number of low-bit signals to be generated according to the target binary character;

[0012] Determining a signal arrangement order according to the target binary character;

[0013] A level signal change scheme corresponding to the universal interface is generated based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

[0014] In one embodiment, after the step of determining the number of high-bit signals and the number of low-bit signals to be generated according to the target binary character, the method further includes:

[0015] Acquire a preset standard level duration and a preset high bit signal setting ratio, and obtain a high bit signal based on the preset standard level duration and the preset high bit signal setting ratio;

[0016] A preset low-bit signal setting ratio is acquired, and a low-bit signal is obtained based on the preset standard level duration and the preset low-bit signal setting ratio.

[0017] In one embodiment, before the step of obtaining the target information to be sent, the method further includes:

[0018] Acquire a preset wake-up level signal duration, and generate a wake-up signal setting scheme corresponding to the universal interface according to the preset wake-up level signal duration;

[0019] Controlling the universal interface according to the wake-up signal setting scheme so that the universal interface generates a wake-up signal corresponding to the wake-up signal setting scheme;

[0020] The wake-up signal is transmitted to the receiving device through the universal interface.

[0021] In one embodiment, after the step of transmitting the wake-up signal to the receiving device through the universal interface, the method further includes:

[0022] Generate a verification signal setting scheme based on the high bit signal and / or the low bit signal;

[0023] Controlling the universal interface according to the verification signal setting scheme so that the universal interface generates a verification signal corresponding to the verification signal setting scheme;

[0024] The verification signal is transmitted to the receiving device through the universal interface, so that the receiving device obtains a deviation verification result based on the verification signal.

[0025] In addition, to achieve the above purpose, the present application also proposes a data transmission method, which is applied to a receiving device, the receiving device is connected to a sending device through a universal interface, and the method includes:

[0026] Acquire the information flow through the universal interface, and determine the level signal change scheme corresponding to the information flow;

[0027] Analyze and obtain the target binary character according to the level signal change scheme;

[0028] A conversion operation is performed on the target binary character to obtain target information corresponding to the target binary character.

[0029] In one embodiment, the step of parsing and obtaining a target binary character according to the level signal change scheme includes:

[0030] Analyze and obtain the number of high-bit signals and the number of low-bit signals corresponding to the level signal change scheme, and determine the signal arrangement order corresponding to the level signal change scheme;

[0031] A target binary character is obtained based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

[0032] In one embodiment, before the step of acquiring the information flow through the universal interface, the method further includes:

[0033] Receiving a verification signal, and determining a preset standard level duration corresponding to the sending device according to the verification signal;

[0034] The preset standard level duration is compared with the preset timing cycle to obtain a deviation verification result.

[0035] In one embodiment, the step of comparing the preset standard level duration with the preset timing cycle to obtain a deviation check result includes:

[0036] Comparing the preset standard level duration with the preset timing cycle to determine whether the preset standard level duration is consistent with the timing cycle;

[0037] If it is determined that the preset standard level duration is consistent with the timing period, then determining that the deviation check result is that there is no deviation;

[0038] If it is determined that the preset standard level duration is inconsistent with the timing period, it is determined that the deviation check result is that a deviation exists.

[0039] In one embodiment, after the step of determining that the deviation check result is a deviation, the method further includes:

[0040] Determine the deviation duration between the preset standard level duration and the timing cycle;

[0041] The timing period is corrected based on the deviation duration, so that the corrected timing period is consistent with the preset standard level duration.

[0042] In addition, to achieve the above-mentioned purpose, the present application also proposes a communication device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transmission method described above.

[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0044] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the data transmission method described above are implemented.

[0045] The data transmission method, communication equipment, storage medium and computer program product proposed in the present application are applied to a sending device, which is connected to a receiving device via a universal interface, obtains target information to be sent, and converts the target information to obtain a corresponding target binary character; generates a level signal change scheme corresponding to the universal interface according to the target binary character, and controls the universal interface according to the level signal change scheme so that the universal interface generates an information stream corresponding to the target binary character; and transmits the information stream to the receiving device via the universal interface.

[0046] In this embodiment, when the sending device needs to send information to the receiving device connected to itself through the universal interface, the sending device first obtains the target information to be sent, and converts the target information to obtain the target binary character corresponding to the target information in binary. After that, the sending device generates a level signal change scheme for adjusting the level bit of the universal interface based on the target binary character, and adjusts the universal interface according to the level signal change scheme, so that the level bit of the universal interface is transformed according to the level signal change scheme, thereby generating an information stream that can represent the target binary character. Finally, the sending device transmits the information stream to the receiving terminal device through the universal interface.

[0047] In this way, the present application solves the technical problem in the related art that the communication equipment can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication equipment and high development cost. That is, the sending device can obtain binary characters by converting the target information, and adjust the universal interface between itself and the receiving device according to the binary characters, so that the level bits in the universal interface produce changes corresponding to the binary characters, so that the receiving device can infer the information sent by the sending device based on the changes in the level bits in the communication interface, thereby achieving the technical effect that the communication equipment can complete the data transmission operation by relying solely on the universal interface it carries without the need for additional configuration of a physical communication interface. This eliminates the need for technicians to plan additional physical communication interfaces in the communication equipment when designing the communication equipment, greatly increasing the flexibility and compatibility of the communication equipment and reducing the development cost of the communication equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0049] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0050] Figure 1 A flowchart of the first embodiment of the data transmission method of the present application is provided;

[0051] Figure 2 A flowchart of the fifth embodiment of the data transmission method of the present application is provided;

[0052] Figure 3 This is a schematic diagram of the device connection relationship involved in an embodiment of the data transmission method of the present application;

[0053] Figure 4 A brief flowchart of the data transmission method of this application;

[0054] Figure 5 A schematic diagram of the device structure of the hardware operating environment involved in the data transmission method in the embodiment of the present application;

[0055] Figure 6 This is a schematic diagram of the signal structure involved in an embodiment of the data transmission method of the present application.

[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0059] In this embodiment, for the convenience of description, the following description is based on a communication device with a GPIO (General-Purpose Input / Output) and a RC (Resistor-Capacitor) phase-shift oscillator configured internally. It is understood that please refer to Figure 3 , Figure 3 This is a schematic diagram of the device connection relationship involved in an embodiment of the data transmission method of the present application, such as Figure 3 As shown, different communication devices can be connected to each other through the GPIO interface.

[0060] Based on the above communication equipment, the overall concept of the data transmission method of the present application is proposed here.

[0061] With the continuous development of electronic communication equipment, the demand for communication between different communication devices is growing. In the relevant technology, different communication devices can only rely on specific physical communication interfaces such as serial ports to realize data transmission operations. However, this method of relying on specific physical communication interfaces to realize data transmission operations often requires that both the sending device and the receiving device are configured with the same physical communication interface. In this way, when designing communication equipment, technicians need to plan the physical interface of the communication equipment in advance, which greatly limits the flexibility and compatibility of the communication equipment and increases the cost of the communication equipment during the development process.

[0062] In response to the above phenomenon, the present application provides a data transmission method, which is applied to a sending device, and the sending device is connected to a receiving device through a universal interface. The method includes: obtaining target information to be sent, and converting the target information to obtain a corresponding target binary character; generating a level signal change scheme corresponding to the universal interface according to the target binary character, and controlling the universal interface according to the level signal change scheme so that the universal interface generates an information stream corresponding to the target binary character; and transmitting the information stream to the receiving device through the universal interface.

[0063] In this way, the present application solves the technical problem in the related art that the communication equipment can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication equipment and high development cost. That is, the sending device can obtain binary characters by converting the target information, and adjust the universal interface between itself and the receiving device according to the binary characters, so that the level bits in the universal interface produce changes corresponding to the binary characters, so that the receiving device can infer the information sent by the sending device based on the changes in the level bits in the communication interface, thereby achieving the technical effect that the communication equipment can complete the data transmission operation by relying solely on the universal interface it carries without the need for additional configuration of a physical communication interface. This eliminates the need for technicians to plan additional physical communication interfaces in the communication equipment when designing the communication equipment, greatly increasing the flexibility and compatibility of the communication equipment and reducing the development cost of the communication equipment.

[0064] Based on the overall concept of the data transmission method of the present application, the embodiment of the present application provides a data transmission method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the data transmission method of the present application.

[0065] In this embodiment, the data transmission method is applied to a sending device, the sending device is connected to a receiving device via a universal interface, and the data transmission method includes steps S10 to S30:

[0066] Step S10: acquiring target information to be sent, and performing a conversion operation on the target information to obtain corresponding target binary characters;

[0067] It should be noted that the target information is the information data that the sending device needs to send to the receiving device. The target information can be a hexadecimal character obtained after a certain information is encoded through an ASCII (American Standard Code for Information Interchange) encoding table. It can be understood that the target information can also be an octal or decimal character obtained by a technician after encoding a certain information based on other encoding tables. The present application does not limit the specific content and form of expression of the target information. In addition, the general interface is a GPIO interface. It can be understood that the communication device can control the pins of the GPIO interface through the CPU (Central Processing Unit) configured by itself, so that the voltage value in the pin changes. When the voltage value in the pin is 0, the corresponding level is a low level, and when the voltage value in the pin is the maximum voltage value corresponding to itself, the corresponding level is a high level. It should be noted that based on the characteristics of the GPIO interface itself, the internal voltage can only be 0 or the maximum voltage value that it can withstand (for example, when the maximum voltage that can be generated in the communication device is 3V, the voltage in the GPIO interface can only be 0V or 3V).

[0068] In this embodiment, when the sending device needs to send information to the receiving device, the sending device first obtains the hexadecimal character that needs to be sent to the receiving device, and performs a base conversion operation on the hexadecimal character to determine the target binary character corresponding to the hexadecimal character in binary.

[0069] Exemplarily, for example, when the sending device needs to send information to the receiving device, the sending device first obtains the hexadecimal string "0x07" to be sent. At this time, the sending device performs a base conversion operation on the hexadecimal string "0x07", thereby determining that the binary character corresponding to the hexadecimal string "0x07" in binary is "111". The sending device then obtains a preset string length preset value, and when determining that the string length preset value is 8, fills the binary string with "111", thereby obtaining a target binary string "00000111" with a length of 8 bits.

[0070] In this way, based on the characteristic of the GPIO interface itself that it can only adjust the high level bit or the low level bit, the sending device can convert any information into a binary character consisting of only 0 and 1, so that the high level bit and the low level bit in the GPIO interface can correspond to "0" and "1" respectively, thereby ensuring that the receiving device can infer the information sent by the sending device only through the level bit changes in the GPIO interface.

[0071] Step S20: generating a level signal change scheme corresponding to the universal interface according to the target binary character, and controlling the universal interface according to the level signal change scheme to make the universal interface generate an information flow corresponding to the target binary character;

[0072] In this embodiment, after determining the target binary character corresponding to the target information, the sending device determines the number of high-level bit signals and the number of low-level bit signals that need to be generated in the universal interface when adjusting the universal interface based on the number of first and second characters contained in the target binary character, and generates a level signal change scheme for controlling the universal interface based on the number of high-level bit signals and the number of low-level bit signals. The sending device then controls the universal interface according to the level signal change scheme, so that the voltage signal in the universal interface changes according to the level signal change scheme to generate corresponding high-level bit signals and low-level bit signals, and then the high-level bit signals and the low-level bit signals are used to form a plurality of high-bit signals and a plurality of low-bit signals, and the plurality of high-bit signals and the plurality of low-bit signals constitute an information stream that can represent the target binary character.

[0073] Exemplarily, for example, after determining that the target binary character corresponding to the target information "0x07" is "00000111", the sending device first determines that the character "0" in the target binary character "00000111" corresponds to a low bit signal, and determines that the low bit signal is composed of a low level bit signal with a length of 1T and a high level bit signal with a length of 1T. At the same time, the sending device determines that the character "1" in the target binary character "00000111" corresponds to a high bit signal, and determines that the high bit signal is composed of a low level bit signal with a length of 1T and a high level bit signal with a length of 3T. The sending device further determines that in the target binary character "00000111", 5 low bit level bits that can represent "0" and 3 high bit signals that can represent "1" are required. The information stream is composed of five low-bit signals and three high-bit signals, so that the receiving device can determine the target binary character according to the change state of the level signal. The sending device then generates a level signal change plan for controlling the GPIO interface pins based on the five low-bit signals and the three high-bit signals, and sends the level signal change plan to the CPU configured by itself. The CPU then adjusts the voltage value in the GPIO interface pin according to the level signal change plan, so that the voltage value is transformed in the manner of "low-bit signal-low-bit signal-low-bit signal-low-bit signal-low-bit signal-high-bit signal-high-bit signal", and generates corresponding low-level bit signals and high-level bit signals in sequence, thereby generating an information stream composed of five low-bit signals and three high-bit signals.

[0074] It should be noted that the high bit signal is a signal parameter that can reflect the binary character "1", and similarly, the low bit signal is a signal parameter that can reflect the binary character "0".

[0075] In this way, the sending device can determine how to control the voltage signal in the GPIO interface according to the target binary character, and then can control the change of the voltage signal of the GPIO interface and generate an information flow that can represent the binary character.

[0076] In a feasible implementation manner, the step of "generating a level signal change scheme corresponding to the universal interface according to the target binary character" in step S20 may specifically include steps S201 to S203:

[0077] Step S201: determining the number of high-bit signals and the number of low-bit signals to be generated according to the target binary character;

[0078] Step S202: determining the signal arrangement order according to the target binary character;

[0079] Step S203: generating a level signal change scheme corresponding to the universal interface based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

[0080] In this embodiment, after determining the target binary character, the sending device first reads the corresponding numbers of the first character and the second character contained in the target binary character, and determines the number of high-bit signals and the number of low-bit signals that need to be generated according to the corresponding numbers of the first character and the second character. Then, the sending device determines the character arrangement order composed of the first character and the second character in the target binary character string, and determines the signal arrangement order corresponding to each high-bit signal and each low-bit signal according to the character arrangement order. Finally, the sending device sorts each high-bit signal and each low-bit signal based on the signal arrangement order, the number of high-bit signals and the number of low-bit signals, thereby generating a level signal change scheme that can adjust the GPIO interface.

[0081] Exemplarily, for example, after determining that the target binary character is "00000111", the transmitting device first determines that the character "0" in the target binary character "00000111" corresponds to a low bit signal, and determines that the low bit signal is composed of a low level bit signal with a length of 1T and a high level bit signal with a length of 1T, and then determines that the number of low bit signals to be generated is 5. At the same time, the transmitting device determines that the character "1" in the target binary character "00000111" corresponds to a high bit signal, and determines that the high bit signal is composed of a low level bit signal with a length of 1T and a high level bit signal with a length of 3T, and then determines that the number of high bit signals to be generated is 3. , then, the sending device determines the arrangement order of "0" and "1" in the target binary string, and determines the arrangement order as the signal arrangement order used when sorting the high-bit signal and the low-bit signal. Finally, the sending device sorts the 5 low-bit signals and the 3 high-bit signals based on the signal arrangement order, thereby generating a level signal change scheme for controlling the GPIO interface as "low-bit signal-low-bit signal-low-bit signal-low-bit signal-low-bit signal-high-bit signal-high-bit signal-end bit", and sends the level signal change scheme to the CPU configured by itself.

[0082] In this way, the sending device can determine how to control the voltage signal in the GPIO interface according to the target binary character, and then can control the change of the voltage signal of the GPIO interface and generate an information flow that can represent the binary character.

[0083] Step S30: transmitting the information stream to the receiving device through the universal interface;

[0084] In this embodiment, after the sending device controls the universal interface to generate an information stream, the universal interface transmits the information stream to the receiving device, so that the receiving device can read the information stream and deduce the corresponding target information.

[0085] Exemplarily, for example, after the sending device adjusts the level bit in the GPIO interface pin to perform high-low conversion according to the level signal change scheme, so that the pin generates a corresponding information stream, the GPIO interface can send the information stream to the receiving device, so that the receiving device can infer that the information sent by the sending device is "0x07" based on the received information stream.

[0086] In this embodiment, when the sending device needs to send information to the receiving device, the sending device first obtains the hexadecimal character to be sent to the receiving device, and performs a base conversion operation on the hexadecimal character, thereby determining the target binary character corresponding to the hexadecimal character in the binary system. Afterwards, the sending device determines the number of high-level bit signals and the number of low-level bit signals that need to be generated in the universal interface when adjusting the universal interface based on the number of first characters and second characters respectively contained in the target binary character, and generates a level signal change scheme for controlling the universal interface based on the number of high-level bit signals and the number of low-level bit signals. The sending device then controls the universal interface according to the level signal change scheme, so that the voltage signal in the universal interface changes according to the level signal change scheme to generate corresponding high-level bit signals and low-level bit signals, and then the high-level bit signals and the low-level bit signals form a plurality of high-bit signals and a plurality of low-bit signals, and the plurality of high-bit signals and the plurality of low-bit signals form an information stream that can represent the target binary character. Finally, the universal interface transmits the information stream to the receiving device so that the receiving device reads the information stream and infers the corresponding target information.

[0087] In this way, the present application solves the technical problem in the related art that the communication equipment can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication equipment and high development cost. That is, the sending device can obtain binary characters by converting the target information, and adjust the universal interface between itself and the receiving device according to the binary characters, so that the level bits in the universal interface produce changes corresponding to the binary characters, so that the receiving device can infer the information sent by the sending device based on the changes in the level bits in the communication interface, thereby achieving the technical effect that the communication equipment can complete the data transmission operation by relying solely on the universal interface it carries without the need for additional configuration of a physical communication interface. This eliminates the need for technicians to plan additional physical communication interfaces in the communication equipment when designing the communication equipment, greatly increasing the flexibility and compatibility of the communication equipment and reducing the development cost of the communication equipment.

[0088] Based on the first embodiment of the present application, a second embodiment of the present application is proposed. In the second embodiment of the present application, the same or similar contents as those of the above-mentioned embodiment 1 can be referred to the above introduction and will not be repeated later. On this basis, after step S201, the data transmission method of the present application further includes steps A10 to A20:

[0089] Step A10: obtaining a preset standard level duration and a preset high bit signal setting ratio, and obtaining a high bit signal based on the preset standard level duration and the preset high bit signal setting ratio;

[0090] Step A20: Obtain a preset low-bit signal setting ratio, and obtain a low-bit signal based on the preset standard level duration and the preset low-bit signal setting ratio.

[0091] It should be noted that the preset standard level bit duration is the scalar time used by the sending device. It can be understood that the specific duration of the preset standard level bit duration T can be set according to the chip performance of the device, and this application does not limit this. In addition, the preset high-bit signal setting ratio is the ratio between the level signal durations corresponding to the high-level signal and the low-level signal in the high-bit signal. For example, when the preset high-bit signal setting ratio is 3, it indicates that the high-bit signal contains a low-level signal with a length of 1T and a high-level signal with a length of 3T; similarly, the preset low-bit signal setting ratio is the ratio between the level signal durations corresponding to the high-level signal and the low-level signal in the low-bit signal. For example, when the preset low-bit signal setting ratio is 1, it indicates that the low-bit signal contains a low-level signal with a length of 1T and a high-level signal with a length of 1T.

[0092] In this embodiment, when determining the number of high-bit signals and the number of low-bit signals, the sending device first obtains a preset standard level bit duration and a preset high-bit signal setting ratio, and generates a high-bit signal that can indicate the first character in the binary character according to the preset standard level bit duration and the preset high-bit signal setting ratio. Thereafter, the sending device obtains a preset low-bit signal setting ratio, and generates a low-bit signal that can indicate the second character in the binary character according to the preset standard level bit duration and the preset low-bit signal setting ratio.

[0093] For example, see Figure 6 , Figure 6 Schematic diagram of the signal structure involved in an embodiment of the data transmission method of the present application. After determining that the number of low-bit signals to be generated is 5 and the number of high-bit signals to be generated is 3, the sending device first obtains the preset standard level bit duration T, and determines that the length of T is 200us. At the same time, the sending device obtains the preset high-bit signal setting ratio as 3, thereby generating the following according to the preset high-bit signal setting ratio. Figure 6 As shown in ③, the high-bit signal consisting of a low-level signal with a length of 1T and a high-level signal with a length of 3T can represent "1". After that, the sending device obtains the preset low-bit signal setting ratio and determines that the preset low-bit signal setting ratio is 1. The sending device then generates the following according to the preset low-bit signal setting ratio: Figure 6 As shown in ② and ④, it is composed of a low-level signal with a length of 1T and a high-level signal with a length of 1T, and can represent a low-bit signal of "0".

[0094] In this way, the sending device can generate a low-bit signal that can represent "0" and a high-bit signal that can represent "1" based on the preset standard level bit duration.

[0095] Based on the first embodiment and / or the second embodiment of the present application, a third embodiment of the present application is proposed here. In the third embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above introduction and will not be repeated later. On this basis, before step S10, the data transmission method of the present application also includes steps B10 to B30:

[0096] Step B10: obtaining a preset wake-up level signal duration, and generating a wake-up signal setting scheme corresponding to the universal interface according to the preset wake-up level signal duration;

[0097] Step B20: controlling the universal interface according to the wake-up signal setting scheme, so that the universal interface generates a wake-up signal corresponding to the wake-up signal setting scheme;

[0098] Step B30: transmitting the wake-up signal to the receiving device through the universal interface.

[0099] It should be noted that the duration of the preset wake-up level signal is the instruction length corresponding to the generated wake-up instruction. In addition, the wake-up signal is an instruction signal that enables the receiving device to adjust its configured timer to a working state when receiving the signal.

[0100] In this embodiment, before sending the target information to the receiving device, the sending device may also first obtain the preset wake-up level signal duration, and generate a wake-up signal setting scheme for controlling the communication interface according to the preset wake-up level signal duration. After that, the sending device controls the universal interface according to the wake-up signal setting scheme, so that the universal interface continues to maintain a high level signal within the preset wake-up level signal duration, thereby generating a wake-up signal for waking up the receiving device. Finally, the universal interface sends the wake-up signal to the receiving device, so that the receiving device can adjust the timer configured by the receiving device itself to the working state when receiving the wake-up signal.

[0101] For example, before sending the target information "0x07" to the receiving device, the sending device can also obtain the preset wake-up level signal duration and determine that the preset wake-up level signal duration is 5T. The sending device then determines that it needs to control the GPIO interface to generate the following Figure 6The high-level signal with a length of 5T shown in ① is generated, and a corresponding wake-up signal setting scheme is generated. After that, the sending device controls the GPIO interface pin according to the wake-up signal setting scheme, so that the GPIO interface pin is kept in a high voltage state within 5T, thereby generating a high-level bit signal with a length of 5T in the GPIO pin, and using the high-level bit signal with a length of 5T as the wake-up signal. Finally, the GPIO interface sends the wake-up signal to the receiving device, so that the receiving device adjusts its configured counter to the working state when receiving the wake-up signal.

[0102] In this way, before sending information, the sending device can send a wake-up signal to the receiving device, thereby waking up the receiving device and putting it into working state.

[0103] Based on the various embodiments of the present application, a fourth embodiment of the present application is proposed here. In the fourth embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above description and will not be repeated later. On this basis, after step B30, the data transmission method of the present application further includes steps C10 to C40:

[0104] Step C10: generating a verification signal setting scheme based on the high-bit signal and / or the low-bit signal;

[0105] Step C20: controlling the universal interface according to the verification signal setting scheme, so that the universal interface generates a verification signal corresponding to the verification signal setting scheme;

[0106] Step C30: transmitting the verification signal to the receiving device through the universal interface, so that the receiving device can obtain a deviation verification result based on the verification signal.

[0107] In this embodiment, after sending a wake-up signal to the receiving device, the sending device may further generate a verification signal setting scheme based on the above-mentioned high-bit signal and / or low-bit signal. Thereafter, the sending device controls the universal interface according to the verification signal setting scheme, thereby generating high bits and / or low bits corresponding to the verification signal setting scheme in the universal interface, and using the generated high bits and / or low bits as verification signals. Finally, the universal interface sends the generated verification signal to the receiving device, and the receiving device determines whether the timing period adopted by itself is consistent with the above-mentioned preset standard level bit duration based on the verification signal, and generates a deviation verification result.

[0108] Exemplarily, for example, after sending a wake-up signal with a length of 5T to the receiving device, the sending device can also first determine that the low-bit signal can be used as a verification signal, and determine the level signal change scheme for generating the low-bit signal as the verification signal setting scheme. After that, the sending device sets the GPIO interface pin according to the verification signal setting scheme, so that a low-level signal with a length of 1T and a high-level signal with a length of 1T are generated in the pin, and then the low bit composed of the low-level signal and the high-level signal is used as the verification signal. Finally, the GPIO interface sends the verification signal to the receiving device, so that the receiving device performs a deviation check on the timing period T adopted by itself according to the received low-bit signal, thereby generating a deviation check result according to the timing period T adopted by itself and the preset standard level duration T adopted by the above-mentioned sending terminal.

[0109] In this way, before sending the target information to the receiving device, the sending device can first send a high-bit signal or a low-bit signal to the receiving terminal as a verification signal, so that the receiving terminal can verify the timing period T adopted by itself based on the verification signal, thereby enabling the receiving terminal to accurately identify whether there is a timing deviation between itself and the sending device, thereby avoiding the situation where the receiving device cannot accurately receive the information transmitted by the sending device due to the timing deviation between the receiving device and the sending device.

[0110] Based on the various embodiments of the present application, a fifth embodiment of the present application is proposed herein. In the fifth embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above introduction and will not be repeated later.

[0111] On this basis, the data transmission method is applied to a receiving device, and the receiving device is connected to a sending device via a universal interface. Figure 2 , Figure 2 The flowchart of the fifth embodiment of the data transmission method of the present application is provided as follows: Figure 2 As shown, the data transmission method of the present application also includes steps S40 to S60:

[0112] Step S40: acquiring an information flow through the universal interface, and determining a level signal change scheme corresponding to the information flow;

[0113] In this embodiment, when the receiving device is awakened, it first starts the timer configured by itself, and detects the information flow transmitted in the universal interface through the timer, so as to determine the level bit duration corresponding to the high level bit and the low level bit in the information flow. The receiving device then determines the level signal change scheme corresponding to the information flow according to its own corresponding timing cycle and level bit duration.

[0114] Exemplarily, for example, after the receiving device receives a wake-up signal of 5T length sent by the sending device through the GPIO interface, the receiving device first adjusts its own configured timer to enter the working state, and uses the timer to detect the GPIO interface pin according to a preset timing period T, thereby collecting the information flow generated in the GPIO pin. The receiving device then determines the high bit signal and low bi signal contained in the information flow, and determines the level signal change scheme corresponding to the information flow based on the high bit signal and the low bi signal.

[0115] In this way, the receiving device can identify the level change in the GPIO interface pin, and then deduce the level signal change scheme corresponding to the information flow according to the identification result.

[0116] Step S50: obtaining a target binary character by parsing according to the level signal change scheme;

[0117] In this embodiment, after determining the level signal change scheme, the sending device parses the level signal change scheme to determine the number of high-bit signals and the number of low-bit signals contained in the level signal change scheme, and sorts the high-bit signals and the low-bit signals contained in the level signal change scheme according to the number of high-bit signals and the number of low-bit signals to obtain the target binary character corresponding to the level signal change scheme.

[0118] Exemplarily, for example, after determining the level signal change scheme corresponding to the signal stream, the receiving device parses the level signal change scheme to determine that the bit signal contained in the level signal change scheme is "low bit signal-low bit signal-low bit signal-low bit signal-low bit signal-high bit signal-high bit signal-high bit signal", and the receiving device further determines the characters represented by each of the bit signals contained in the change scheme, and combines the characters to obtain the target binary character "00000111".

[0119] In this way, the receiving device can determine the voltage change in the GPIO interface according to the level signal change scheme, and determine the numbers represented by each bit signal in the information stream in binary according to the voltage change, and combine the numbers to obtain binary characters.

[0120] In a feasible implementation manner, step S50 may specifically include steps S501 to S502:

[0121] Step S501: Analyze and obtain the number of high-bit signals and the number of low-bit signals corresponding to the level signal change scheme, and determine the signal arrangement order corresponding to the level signal change scheme;

[0122] Step S502: Obtain a target binary character based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

[0123] In this embodiment, after determining the level signal change scheme, the receiving device first analyzes the level signal change scheme to determine the number of high-bit signals corresponding to the high-bit signals in the level signal change scheme, and the number of low-bit signals corresponding to the low-bit signals in the level signal change scheme. At the same time, the receiving device analyzes the changes of the high-level bits and low-level bits in the level signal change scheme, and calculates the signal arrangement order between each high-bit bit and each low-bit bit according to the changes of the high-level bits and the low-level bits. After that, the receiving device sorts each high-bit bit and each low-bit bit according to the signal arrangement order, the number of high-bit signals and the number of low-bit signals to generate the corresponding target binary character.

[0124] Exemplarily, for example, after determining the level signal change scheme, the receiving device first analyzes the level signal change scheme, thereby determining that the level signal change scheme is: 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 1T high level bit, 1T low level bit + 3T high level bit, 1T low level bit + 3T high level bit, and the receiving device then analyzes the level signal change scheme according to the level signal change scheme. It is inferred that the information stream contains 5 low-bit signals and 3 high-bit signals, and the signal arrangement order corresponding to the information stream is determined to be "low-bit signal-low-bit signal-low-bit signal-low-bit signal-low-bit signal-high-bit signal-high-bit signal". After that, the receiving device determines that the low-bit signal corresponds to "0" in binary, and determines that the high-bit signal corresponds to "1" in binary, so as to sort the 5 low-bit signals and 3 high-bit signals based on the signal arrangement order to generate the target binary character "00000111".

[0125] In this way, the receiving device can determine the voltage change in the GPIO interface according to the level signal change scheme, and determine the numbers represented by each bit signal in the information stream in binary according to the voltage change, and combine the numbers to obtain binary characters.

[0126] Step S60: performing a conversion operation on the target binary character to obtain target information corresponding to the target binary character.

[0127] In this embodiment, after obtaining the target binary character, the receiving device first removes the padding bits contained in the binary character to obtain the initial binary character. The receiving device then performs a base conversion operation on the initial binary character to obtain the hexadecimal character corresponding to the initial binary character, and determines the hexadecimal character as the target information sent by the sending device.

[0128] Exemplarily, for example, after obtaining the target binary character "00000111", the receiving device first removes the padding bit "00000" contained in the target binary character to obtain the binary character "111". The receiving device then performs a base conversion operation on the binary character "111" to obtain the hexadecimal character "7" corresponding to the binary character "111". The receiving device then pads the hexadecimal character "7" to obtain the information "0x07" sent by the sending device.

[0129] In this way, the receiving device can convert the inferred binary characters to determine the target information content sent by the sending device.

[0130] Based on the various embodiments of the present application, a sixth embodiment of the present application is proposed here. In the sixth embodiment of the present application, the same or similar contents as those of the above embodiments can be referred to the above introduction and will not be repeated later. On this basis, before step S40, the data transmission method of the present application also includes steps D10 to D30:

[0131] Step D10: receiving a verification signal, and determining a preset standard level duration corresponding to the sending device according to the verification signal;

[0132] Step D20: Compare the preset standard level duration with the preset timing cycle to obtain a deviation verification result.

[0133] It should be noted that the timing period is the time scalar T used in the receiving device. It can be understood that in order to ensure that the receiving device can identify the level signal sent by the sending device, the time scalar T it uses should be consistent with the preset standard level bit duration used by the sending device.

[0134] In this embodiment, after determining the level signal change scheme corresponding to the signal flow, the sending device first receives the verification signal sent by the sending device through the universal interface, and calls the timer configured by itself to determine the duration of the low level bit and the duration of the high level bit in the verification signal. The sending device then determines the ratio between the duration of the low level bit and the duration of the high level bit, and calculates the above-mentioned preset standard level bit duration used by the sending device when constructing the high-bit signal and the low-bit signal based on the ratio. After that, the sending device obtains the preset timing period corresponding to the timer, and compares the timing period with the preset standard level bit duration to obtain a deviation verification result, and then determines whether the timing period used by itself is consistent with the preset standard level bit duration used by the sending device based on the deviation verification result.

[0135] Exemplarily, for example, the receiving device first receives the verification signal sent by the sending device through the GPIO interface, and determines that the verification signal contains only one low-bit signal. At this time, the receiving device calls the timer to calculate the duration of the low-level bit contained in the low-bit signal to be 1T, and the duration of the high-level bit to be 1T. The receiving device then determines that the level duration ratio between the low-level bit signal and the high-level bit signal is 1. The receiving device then calculates that the specific value of the preset standard level duration T used by the sending device is 200us based on the total duration of the low-bit signal detected by the timer and the level duration ratio. After that, the receiving device compares the timing period T corresponding to its own timer with the preset standard level duration T, so as to determine whether the timing period is 200us, and then obtain the deviation verification result, and then determine whether the timing period used by itself is consistent with the preset standard level duration used by the sending device according to the deviation verification result.

[0136] In this way, the receiving device can determine the time scalar used by the sending device based on the verification signal, and judge whether the timing period used by itself is consistent with the time scalar, thereby avoiding the situation where the information transmitted by the sending device cannot be accurately received due to timing deviation.

[0137] In a feasible implementation manner, step D20 may specifically include steps D201 to D203:

[0138] Step D301: comparing the preset standard level duration with a preset timing cycle to determine whether the preset standard level duration is consistent with the timing cycle;

[0139] Step D302: if it is determined that the preset standard level duration is consistent with the timing period, then determining that the deviation check result is that there is no deviation;

[0140] Step D303: If it is determined that the preset standard level duration is inconsistent with the timing period, the deviation check result is determined to be a deviation.

[0141] In this embodiment, after obtaining the preset standard level position duration, the receiving device compares the preset standard level position duration with the timing cycle adopted by itself, so as to determine whether the preset standard level position duration and the timing cycle are consistent. Then, if the receiving device determines that the preset standard level position duration and the timing cycle are consistent, it determines that the deviation check result is that there is no deviation between itself and the sending device. If the receiving device determines that the preset standard level position duration and the timing cycle are inconsistent, it determines that the deviation check result is that there is a deviation between itself and the sending device.

[0142] Exemplarily, for example, after the receiving device determines that the preset standard level bit duration corresponding to the sending device is 200us, the receiving device first compares the preset standard level bit duration with the timing period corresponding to its own timer to determine whether the timing period is 200us. Afterwards, if the receiving device determines that the timing period corresponding to its own timer is equal to 200us, it determines that it can determine the accurate level bit duration corresponding to each low level bit and high level bit in the signal stream, and then determines that the deviation check result is that there is no deviation between itself and the sending device. If the receiving device determines that the timing period corresponding to its own timer is not equal to 200us, it determines that it cannot determine the accurate level bit duration corresponding to each low level bit and high level bit in the signal stream, and then determines that the deviation check result is that there is a deviation between itself and the sending device.

[0143] In this way, the receiving device can determine whether the timing cycle used by itself is consistent with the time scalar used by the sending device, thereby avoiding the situation where the information transmitted by the sending device cannot be accurately received due to timing deviation.

[0144] Based on the various embodiments of the present application, a seventh embodiment of the present application is proposed here. In the seventh embodiment of the present application, the same or similar contents as the above embodiments can be referred to the above introduction and will not be repeated later. After step D303, the data transmission method of the present application further includes steps E10 to E20:

[0145] Step E10: determining the deviation duration between the preset standard level duration and the timing cycle;

[0146] Step E20: Correcting the timing period based on the deviation duration, so that the corrected timing period is consistent with the preset standard level duration.

[0147] In this embodiment, when the receiving device determines that there is a deviation between itself and the sending device, the receiving device first calculates the deviation duration between the timing period and the preset standard level duration. Thereafter, the receiving device corrects the timing period according to the deviation duration and sends the corrected timing period to the timer, so that the timer detects the voltage signal contained in the universal interface according to the corrected timing period.

[0148] Exemplarily, for example, when the receiving device determines that there is a deviation between itself and the sending device, the receiving device first calculates the deviation duration between the timing period and the above-mentioned preset standard signal duration of 200us, and then the receiving device modifies the timing period of the timer to 200us according to the deviation duration, so that the timer can accurately detect the voltage changes in the GPIO interface pin based on 200us as a timing period.

[0149] In this way, when the sending device determines that there is a deviation between itself and the sending device, it can correct the timer according to the length of the deviation to synchronize the time scalars used by the receiving device and the sending device, thereby ensuring that the receiving device can accurately detect the high-level bits and low-level bits in the signal stream, and determine the high-bit signals and low-bit signals contained in the signal stream to infer the target information sent by the sending device.

[0150] For example, to help understand the implementation process of the data transmission method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A brief flow chart of a data transmission method is provided, specifically:

[0151] In this embodiment, when the sending device needs to send the hexadecimal character "0x07" to the receiving device, the sending device first obtains the preset wake-up level signal duration, and generates a wake-up signal setting scheme based on the preset wake-up level signal duration. The sending device then controls the GPIO interface configured by itself according to the wake-up signal setting scheme to generate a high-level signal with a length of 5T in the GPIO interface pin. When the receiving device detects a high-level signal with a length of 5T in the GPIO interface pin connected to itself, it switches the timer configured by itself to the working state and continuously detects the GPIO interface pin;

[0152] Afterwards, the sending device further generates a verification signal setting scheme, and controls the GPIO interface according to the verification signal setting scheme, so that a low-bit signal composed of a 1T low-level signal and a 1T high-level signal is generated in the GPIO interface pin, and the receiving device calculates the total signal length of the low-bit signal through a timer, and calculates the preset standard level duration T used by the sending device according to the total signal length and the ratio of the level duration in the low-bit signal, and the receiving device then compares its own timing cycle with the preset standard level duration T to obtain a deviation verification result. When the receiving device determines that its own timing cycle is consistent with the preset standard level duration T, it determines that there is no deviation between itself and the receiving device, and continues to detect the GPIO interface;

[0153] Afterwards, the sending device obtains the hexadecimal character "0x07" to be sent, and converts the hexadecimal character "0x07" to obtain the binary character "00000111" corresponding to the hexadecimal character "0x07" in binary. At this time, the sending device determines that it is necessary to generate 5 low-bit signals and 3 high-bit signals based on the binary character "00000111", and sorts the 5 low-bit signals and 3 high-bit signals according to the character arrangement order in the binary character "00000111" to generate a level signal change scheme for controlling the GPIO interface: "low-bit signal-low-bit signal-low-bit signal-low-bit signal-low-bit signal-high-bit signal-high-bit signal". Afterwards, the generating device controls the GPIO interface pin according to the level signal change scheme to make the voltage in the GPIO interface pin generate the symbol The GPIO interface forms an information flow and transmits it to the receiving device. Then, the receiving device detects the GPIO interface, and determines the level signal change scheme adopted by the sending device according to the level bit change in the GPIO interface: "low bit signal-low bit signal-low bit signal-low bit signal-low bit signal-low bit signal-high bit signal-high bit signal". The receiving device then analyzes the level signal change scheme and infers that the target binary character sent by the sending device is "00000111". The receiving device performs a base conversion on the target binary character "00000111", and determines that the target binary character "00000111" corresponds to the target information "0x07" in hexadecimal.

[0154] Finally, after sending the target information to the receiving device, the sending device generates an end signal setting scheme, and controls the GPIO interface pin to generate the following according to the end signal setting scheme: Figure 6 As shown in ⑤, the length of the low-level bit signal is 5T. At this time, when the receiving device detects that the low-level bit signal with a length of 5T is generated in the GPIO interface pin, it determines that the sending device has transmitted the end signal through the GPIO interface, thereby ending the data transmission process.

[0155] The present application provides a communication device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the data transmission method in the above-mentioned embodiment one.

[0156] Reference below Figure 5 , which shows a schematic diagram of the structure of a communication device suitable for implementing the embodiments of the present application. The communication device in the embodiments of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The communication device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0157] like Figure 5As shown, the communication device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the communication device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the communication device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a communication device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0158] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0159] The communication device provided by the present application adopts the data transmission method in the above embodiment, which can solve the technical problem in the related art that the communication device can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication device and high development cost. Compared with the prior art, the beneficial effects of the communication device provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and the other technical features in the communication device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0160] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0161] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0162] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, wherein the computer-readable program instructions are used to execute the data transmission method in the above-mentioned embodiment.

[0163] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0164] The computer-readable storage medium may be included in the communication device; or may exist independently without being installed in the communication device.

[0165] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the communication device, the communication device: obtains the target information to be sent, and converts the target information to obtain the corresponding target binary character; generates a level signal change scheme corresponding to the universal interface according to the target binary character, and controls the universal interface according to the level signal change scheme so that the universal interface generates an information stream corresponding to the target binary character; and transmits the information stream to the receiving device through the universal interface.

[0166] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0168] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0169] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned data transmission method, and can solve the technical problem in the related art that the communication device can only complete the data transmission operation through a specific physical communication interface, resulting in low flexibility and compatibility of the communication device and high development cost. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the data transmission method provided by the above-mentioned embodiment, which will not be repeated here.

[0170] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned data transmission method when executed by a processor.

[0171] The computer program product provided by the present application can solve the technical problem in the related art that the communication device can only complete the data transmission operation through a specific physical communication interface, which leads to low flexibility and compatibility of the communication device and high development cost. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the data transmission method provided by the above embodiment, and will not be repeated here.

[0172] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A data transmission method, characterized in that: The data transmission method is applied to a sending device, the sending device is connected to a receiving device via a universal interface, and the method includes: Acquire target information to be sent, and perform conversion operation on the target information to obtain corresponding target binary characters; Generating a level signal change scheme corresponding to the universal interface according to the target binary character, and controlling the universal interface according to the level signal change scheme so that the universal interface generates an information flow corresponding to the target binary character; The information stream is delivered to the receiving device via the universal interface.

2. The method according to claim 1, characterized in that The step of generating a level signal change scheme corresponding to the universal interface according to the target binary character comprises: Determining the number of high-bit signals and the number of low-bit signals to be generated according to the target binary character; Determining a signal arrangement order according to the target binary character; A level signal change scheme corresponding to the universal interface is generated based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

3. The method according to claim 2, characterized in that After the step of determining the number of high-bit signals and the number of low-bit signals to be generated according to the target binary character, the method further includes: Acquire a preset standard level duration and a preset high bit signal setting ratio, and obtain a high bit signal based on the preset standard level duration and the preset high bit signal setting ratio; A preset low-bit signal setting ratio is acquired, and a low-bit signal is obtained based on the preset standard level duration and the preset low-bit signal setting ratio.

4. The method according to claim 3, characterized in that Before the step of acquiring the target information to be sent, the method further includes: Acquire a preset wake-up level signal duration, and generate a wake-up signal setting scheme corresponding to the universal interface according to the preset wake-up level signal duration; Controlling the universal interface according to the wake-up signal setting scheme so that the universal interface generates a wake-up signal corresponding to the wake-up signal setting scheme; The wake-up signal is transmitted to the receiving device through the universal interface.

5. The method according to claim 4, characterized in that After the step of transmitting the wake-up signal to the receiving device through the universal interface, the method further includes: Generate a verification signal setting scheme based on the high bit signal and / or the low bit signal; Controlling the universal interface according to the verification signal setting scheme so that the universal interface generates a verification signal corresponding to the verification signal setting scheme; The verification signal is transmitted to the receiving device through the universal interface, so that the receiving device obtains a deviation verification result based on the verification signal.

6. A data transmission method, characterized in that: The data transmission method is applied to a receiving device, the receiving device is connected to a sending device via a universal interface, and the method includes: Acquire the information flow through the universal interface, and determine the level signal change scheme corresponding to the information flow; Analyze and obtain the target binary character according to the level signal change scheme; A conversion operation is performed on the target binary character to obtain target information corresponding to the target binary character.

7. The method according to claim 6, characterized in that The step of obtaining a target binary character by parsing according to the level signal change scheme comprises: Analyze and obtain the number of high-bit signals and the number of low-bit signals corresponding to the level signal change scheme, and determine the signal arrangement order corresponding to the level signal change scheme; A target binary character is obtained based on the number of high-bit signals, the number of low-bit signals and the signal arrangement sequence.

8. The method according to claim 6, characterized in that Before the step of acquiring the information flow through the universal interface, the method further includes: Receiving a verification signal, and determining a preset standard level duration corresponding to the sending device according to the verification signal; The preset standard level duration is compared with the preset timing cycle to obtain a deviation verification result.

9. The method according to claim 8, characterized in that The step of comparing the preset standard level duration with the preset timing cycle to obtain a deviation check result includes: Comparing the preset standard level duration with the preset timing cycle to determine whether the preset standard level duration is consistent with the timing cycle; If it is determined that the preset standard level duration is consistent with the timing period, then determining that the deviation check result is that there is no deviation; If it is determined that the preset standard level duration is inconsistent with the timing period, it is determined that the deviation check result is that a deviation exists.

10. The method according to claim 9, characterized in that After the step of determining that the deviation check result is a deviation, the method further includes: Determine the deviation duration between the preset standard level duration and the timing cycle; The timing period is corrected based on the deviation duration, so that the corrected timing period is consistent with the preset standard level duration.

11. A communication device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the data transmission method according to any one of claims 1 to 10.

12. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 10 are implemented.

13. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the data transmission method according to any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Multi-channel adaptive baud rate communication method and device, electronic equipment and storage medium

    CN120541014A