CN111193529A - Data transmission method and device - Google Patents

Data transmission method and device Download PDF

Info

Publication number
CN111193529A
CN111193529A CN201811359122.4A CN201811359122A CN111193529A CN 111193529 A CN111193529 A CN 111193529A CN 201811359122 A CN201811359122 A CN 201811359122A CN 111193529 A CN111193529 A CN 111193529A
Authority
CN
China
Prior art keywords
contact
data transmission
power
equipment
threshold
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201811359122.4A
Other languages
Chinese (zh)
Other versions
CN111193529B (en
Inventor
邱伟华
刘魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changzhou Paiteng Electronic Technology Co Ltd
Original Assignee
Changzhou Paiteng Electronic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changzhou Paiteng Electronic Technology Co Ltd filed Critical Changzhou Paiteng Electronic Technology Co Ltd
Priority to CN201811359122.4A priority Critical patent/CN111193529B/en
Publication of CN111193529A publication Critical patent/CN111193529A/en
Application granted granted Critical
Publication of CN111193529B publication Critical patent/CN111193529B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The invention discloses a data transmission method and device, and belongs to the technical field of computers. The method is applied to a first device, a first contact of the first device is electrically connected with a second contact of a second device, and the method comprises the following steps: when a data transmission confirmation signal is received, acquiring the magnitude relation between the electric quantity information of the second equipment and a first threshold value; if the electric quantity information of the second equipment is lower than a first threshold value, transmitting power to the second equipment through the first contact point, stopping transmitting power to the second equipment through the first contact point when the electric quantity information of the second equipment reaches the first threshold value, and performing data transmission with the second equipment through the first contact point; the first threshold is a preset numerical value, or the first threshold is a numerical value determined by the first equipment or the second equipment according to the data volume to be transmitted; the problem that the charging function provided by the equipment in the related technology does not meet the user data transmission requirement is solved; the effect of providing the function according with the user requirement is achieved.

Description

Data transmission method and device
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a data transmission method and apparatus.
Background
Currently, there are a variety of products on the market that use a single pair of wires or data lines for power transmission as well as data transmission.
To ensure single power transfer efficiency as well as single data transfer efficiency, the wires are typically used only for data transfer or only for power transfer at the same time. Generally, after a first device (e.g., a computer) is connected to a second device (e.g., an electronic cigarette), the first device determines whether to perform power transmission or data transmission according to the remaining power of the second device.
However, if the first device is low in power and the purpose of connecting the second device to the first device by the user is data transmission, the first device only performs the operation of charging the second device, and the data transmission is performed when the second device is fully charged, which is not suitable for the user.
Disclosure of Invention
In order to solve the problem that the functions provided by the device in the prior art do not meet the requirements of users, embodiments of the present invention provide a data transmission method and apparatus. The technical scheme is as follows:
in a first aspect, a data transmission method is provided, where the method is applied to a first device, a first contact of the first device is electrically connected with a second contact of a second device, the first device is capable of transmitting power to the second device through the first contact, and the first device is also capable of performing data transmission with the second device through the first contact, and the method includes:
when a data transmission confirmation signal is received, acquiring the magnitude relation between the electric quantity information of the second equipment and a first threshold value;
if the power information of the second device is lower than a first threshold value, transmitting power to the second device through the first contact point, and stopping transmitting power to the second device through the first contact point and performing data transmission with the second device through the first contact point when the power information of the second device reaches the first threshold value;
the first threshold is a preset numerical value, or the first threshold is a numerical value determined by the first device or the second device according to the data volume to be transmitted.
Optionally, the method further includes:
if the power transmission confirmation signal is received, transmitting power to the second device through the first contact at a first constant voltage after the power information of the second device reaches the first threshold; and/or the presence of a gas in the gas,
transmitting power to the second device through the first contact at a second constant voltage and transmitting data with the second device through the first contact when the power information of the second device reaches the first threshold if a simultaneous transmission confirmation signal is received; when data transmission between the second equipment and the first equipment is finished, power is transmitted to the second equipment through the first contact by using a first constant voltage, and the second constant voltage is smaller than the first constant voltage.
Optionally, after the data transmission is performed with the second device through the first contact, the method further includes:
after data transmission with the second device is finished, determining a magnitude relation between the electric quantity information of the second device and the first threshold value;
transmitting power to the second device through the first contact at a predetermined constant current if the power information of the second device is less than the first threshold;
and if the power information of the second equipment reaches the first threshold value, transmitting power to the second equipment through the first contact point at a first constant voltage.
Optionally, the method further includes:
acquiring electric quantity information of the first equipment;
and if the power information of the first device is lower than a second threshold value, stopping transmitting power to the second device through the first contact.
Optionally, the method further includes:
when the electric quantity information of the second equipment reaches the first threshold value, displaying prompt information for prompting selection of a function mode, wherein the function mode of the first equipment comprises a charging mode and a data transmission mode;
generating the power transmission confirmation signal upon detecting that the charging mode is selected;
and generating the data transmission confirmation signal when the data transmission mode is detected to be selected.
Optionally, the power transmission confirmation signal is a voltage signal at the first contact when the first circuit is turned on and the second circuit is turned off, and the data transmission confirmation signal is a voltage signal at the first contact when the first circuit is turned off and the second circuit is turned on;
wherein the first circuit is a circuit between the second in-device power transmission circuit and the second contact, and the second circuit is a circuit between the second in-device data transmission circuit and the second contact.
In a second aspect, a data transmission method is provided, where the method is applied to a second device, a first contact of a first device is electrically connected with a second contact of the second device through the first contact, the first device is capable of transmitting power to the second device through the first contact, and the first device is also capable of performing data transmission with the second device through the first contact, and the method includes:
after the second device is connected with the first device through the second contact, displaying prompt information for prompting selection of a function mode, wherein the function mode of the second device comprises a charging mode and a data transmission mode;
when the data transmission mode is detected to be selected, sending a data transmission confirmation signal to the first device, wherein the data transmission confirmation signal is used for triggering the first device to transmit power to the second device through the first contact when the power information of the second device is lower than a first threshold, and stopping transmitting power to the second device through the first contact and performing data transmission with the second device through the first contact when the power information of the second device reaches the first threshold;
the first threshold is a preset numerical value, or the first threshold is a numerical value determined by the first device or the second device according to the data volume to be transmitted.
Optionally, the functional modes further include a simultaneous transmission mode, and the method further includes:
transmitting a power transmission confirmation signal to the first device upon detecting that the charging mode is selected;
sending a simultaneous transmission acknowledgement signal to the first device upon detecting that the simultaneous transmission mode is selected;
wherein the simultaneous transmission confirmation signal is used to trigger the first device to transmit power to the second device and transmit data with the second device through the first contact at a second constant voltage when the power information of the second device reaches the first threshold, and to transmit power to the second device through the first contact at a first constant voltage when data transmission between the second device and the first device is finished, the second constant voltage being smaller than the first constant voltage.
In a third aspect, a computer-readable storage medium is provided, where one or more instructions are stored, and the one or more instructions, when executed by a processor in a first device, implement the data transmission method according to the first aspect and any optional implementation manner of the first aspect, or, when executed by a processor in a second device, implement the data transmission method according to the second aspect and any optional implementation manner of the second aspect.
In a fourth aspect, a data transmission apparatus is provided, the apparatus comprising:
a memory and a processor;
at least one program instruction is stored in the memory;
the processor is configured to load and execute the at least one program instruction to implement the data transmission method according to the first aspect, any optional implementation manner of the first aspect, the second aspect, or any optional implementation manner of the second aspect.
The technical scheme provided by the embodiment of the invention has the following beneficial effects:
the first device is electrically connected with the second contact of the second device through the first contact, the first device can transmit power to the second device through the first contact, and the first device can also perform data transmission with the second device through the first contact; the method comprises the steps that when a first device receives a data transmission confirmation signal, the magnitude relation between electric quantity information of a second device and a first threshold value is obtained; if the electric quantity information of the second equipment is lower than a first threshold value, transmitting power to the second equipment through the first contact point, stopping transmitting power to the second equipment through the first contact point when the electric quantity information of the second equipment reaches the first threshold value, and performing data transmission with the second equipment through the first contact point; the problem that the charging function provided by the equipment in the related technology does not meet the user data transmission requirement is solved; the effect of providing the function according with the user requirement is achieved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of a connection of a first device to a second device provided in one embodiment of the invention;
fig. 2 is a flowchart of a data transmission method according to an embodiment of the present invention;
FIG. 3 is a flow chart for controlling a first device to transfer power to a second device, according to an embodiment of the present invention;
fig. 4 is a flowchart for controlling power transmission and data transmission between a first device and a second device according to an embodiment of the present invention;
fig. 5 is a flowchart of a method of data transmission according to another embodiment of the present invention;
FIG. 6 is a schematic diagram of an in-line connection between a first device and a second device provided in an embodiment of the present invention;
FIG. 7 is a schematic diagram of a wired connection between a first device and a second device provided in another embodiment of the present invention;
fig. 8 is a schematic diagram of a circuit connection between a first device and a second device provided in yet another embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
Before describing the embodiments of the present invention in detail, some concepts involved in the embodiments of the present invention are first explained as follows:
1. the first device may be a device having a data transmission function and a power supply function, such as a desktop computer, a portable computer, a tablet computer, and the like.
2. The second device may be a device with data transfer functionality, power storage (e.g., a battery), such as an e-cigarette, a smartphone, an MP3 player, an MP4 player, a wearable device, or the like.
Wherein the first device is connectable to the second device. When the first device is connected to the second device, as shown in fig. 1, the first contact 110a of the first device 110 may be electrically connected to the second contact 120a of the second device 120 through the first contact 110 a. After the first contact 110a is electrically connected to the second contact 120a of the second device 120, the first device 110 may transmit power to the second device 120 through the first contact 110a, or may perform data transmission with the second device 120 through the first contact 110 a.
Optionally, when the first device 110 is connected to the second device 120, the connection may be directly performed without using other auxiliary connection devices, so that the first contact 110a is in direct contact connection with the second contact 120 a; alternatively, the first device 110 and the second device 120 may be connected to the second contact 120a through an auxiliary connection means (e.g., a transmission line, a data line, etc.).
Optionally, the third contact 110b of the first device 110 is electrically connected to the fourth contact 120b of the second device 120, and both the third contact 110b and the fourth contact 120b are grounded (not shown in the figure).
Optionally, in this application, when the first device is connected to the second device, the first device obtains a magnitude relationship between the electric quantity information of the second device and the first threshold; transmitting power to the second device through the first contact at a predetermined constant current if the power information of the second device is less than the first threshold; if the power information of the second device reaches the first threshold value, power is transmitted to the second device through the first contact at a first constant voltage.
The electric quantity information can be the percentage of the remaining electric quantity of the second equipment, and can also be the voltage of a battery in the second equipment; the first constant voltage is set by a system developer; the first threshold may be a preset value set by a system developer, or may be a value determined by the first device or the second device according to the amount of data to be transmitted.
Optionally, an expected transmission duration is determined according to the data volume to be transmitted and the expected transmission rate, an expected power consumption value is determined according to the expected transmission duration, and the first threshold is determined according to the power signal. For example, a ratio of the data volume to be transmitted to the expected transmission rate is calculated to obtain an expected transmission time length, an electric quantity consumption value corresponding to the expected transmission time length is determined according to a corresponding relationship between the transmission time length and the electric quantity consumption value, and the electric quantity signal is determined as a first threshold value.
Optionally, when the power information of the second device is the first threshold, the second device may transmit the predetermined amount of data or continuously transmit the data for a predetermined time by using the remaining power of the second device. The system developer can set a predetermined amount or a predetermined period of time as needed, and then set a first threshold value according to the amount of power consumed to transmit the predetermined amount of data, or set a first threshold value according to the amount of power consumed to continuously transmit data for a predetermined period of time.
Optionally, the obtaining, by the first device, the electric quantity information of the second device may be implemented in the following manners:
the method comprises the steps that first equipment and second equipment send electric quantity information to first equipment when the second equipment detects that the second equipment is connected with the first equipment; and the first equipment receives the electric quantity information sent by the second equipment.
Secondly, a voltage detection device for detecting the voltage between the first contact and the third contact is arranged in the first device; and acquiring the voltage detected by the voltage detection device as electric quantity information.
After the first device is connected with the second device, the first device may control data transmission between the first device and the second device through a data transmission method as shown in fig. 2. Referring to fig. 2, a flow chart of a data transmission method according to an embodiment of the present invention is shown, and the method may include the following steps.
Step 210, when the data transmission confirmation signal is received, obtaining a magnitude relation between the electric quantity information of the second device and the first threshold value.
The first device may acquire the data transmission acknowledgement signal in the following two ways:
the method comprises the following steps that firstly, after the first equipment detects that the first equipment is connected with second equipment, prompt information for prompting selection of a function mode is displayed, and the function mode of the second equipment comprises a charging mode and a data transmission mode; when detecting that the data transmission mode is selected, generating a data transmission confirmation signal, and executing several steps as shown in fig. 2; upon detecting that the charging mode is selected, a power transfer confirmation signal is generated, and several steps shown in fig. 3 are performed.
Optionally, the functional modes of the second device may further include a simultaneous transmission mode, and when it is detected that the simultaneous transmission mode is selected, a simultaneous transmission confirmation signal is generated, and several steps shown in fig. 4 are performed.
Secondly, when the second device detects that the second device is connected with the first device, the second device displays prompt information for prompting selection of a function mode, wherein the function mode of the second device comprises a charging mode and a data transmission mode; when detecting that the data transmission mode is selected, sending a data transmission confirmation signal to the first device to trigger the first device to perform several steps as shown in fig. 2; upon detecting that the charging mode is selected, a power transfer confirmation signal is sent to the first device to trigger the first device to perform several steps as shown in fig. 3.
And step 220, if the electric quantity information of the second device is lower than the first threshold, transmitting power to the second device through the first contact, and when the electric quantity information of the second device reaches the first threshold, stopping transmitting power to the second device through the first contact and performing data transmission with the second device through the first contact.
The specific implementation of this step may be: when the electric quantity information of the second equipment is smaller than a first threshold value, transmitting electric power to the second equipment through the first contact point by using a preset constant current so as to utilize the first equipment to quickly charge the second equipment to enable the electric quantity information of the second equipment to reach the first threshold value until the electric quantity information of the second equipment reaches the first threshold value; and stopping transmitting power to the second equipment through the first contact after the electric quantity information of the second equipment reaches a first threshold value, and performing data transmission with the second equipment through the first contact.
When the second device is an electronic cigarette, the data sent by the second device to the first device may be smoking data of the user, such as smoking frequency, smoking duration, nicotine concentration, and the like; the data transmitted by the first device to the second device may be a software program, a patch program, an update program, etc.
Optionally, when data transmission between the first device and the second device is completed before the first device and the second device, power consumption of the second device by the data transmission may cause the power of the second device to be lower than the first threshold, and therefore, the first device may further determine a magnitude relationship between the power information of the second device and the first threshold after the data transmission between the first device and the second device is completed; transmitting power to the second device through the first contact at a predetermined constant current if the power information of the second device is less than the first threshold; if the power information of the second device reaches the first threshold value, power is transmitted to the second device through the first contact at a first constant voltage.
In addition, when the first device charges the second device at a first constant voltage, the charging current of the first device is detected; when the charging current is less than the predetermined current value, the transmission of the electric power to the second device through the transmission line is stopped, and the charging is ended. Wherein the predetermined current value is set by a system developer.
In summary, in the method provided in the embodiment of the present invention, the first contact of the first device is electrically connected to the second contact of the second device, so that the first device can transmit power to the second device through the first contact, and the first device can also perform data transmission with the second device through the first contact; the method comprises the steps that when a first device receives a data transmission confirmation signal, the magnitude relation between electric quantity information of a second device and a first threshold value is obtained; if the electric quantity information of the second equipment is lower than a first threshold value, transmitting power to the second equipment through the first contact point, stopping transmitting power to the second equipment through the first contact point when the electric quantity information of the second equipment reaches the first threshold value, and performing data transmission with the second equipment through the first contact point; the problem that the charging function provided by the equipment in the related technology does not meet the user data transmission requirement is solved; the effect of providing the function according with the user requirement is achieved.
The first device, upon receiving the power transmission confirmation signal, may perform several steps as shown in fig. 3 to control the first device to transmit power to the second device. As shown in fig. 3, the controlling, by the first device, the first device to transmit power to the second device may include:
step 310, after receiving the power transmission confirmation signal, acquiring a magnitude relation between the power information of the second device and the first threshold.
Optionally, after receiving the power transmission confirmation signal, the magnitude relationship between the power information of the second device and the first threshold may be periodically or in real time, and any one of step 320 to step 330 may be executed.
If the power information of the second device is lower than the first threshold, power is transmitted to the second device through the first contact at a predetermined constant rate, step 320.
In step 330, if the power information of the second device reaches the first threshold, power is transmitted to the second device at a first constant voltage through the first contact.
In addition, when the first device charges the second device at a first constant voltage, the charging current of the first device is detected; when the charging current is less than the predetermined current value, indicating that the charging is completed at this time, the transmission of power to the second device through the transmission line is stopped to end the charging. Wherein the predetermined current value is set by a system developer.
Optionally, the functional modes of the second device further include a simultaneous transmission mode, and the second device sends a simultaneous transmission confirmation signal to the first device when detecting that the simultaneous transmission mode is selected, so as to trigger the first device to perform several steps as shown in fig. 4.
Optionally, when the first device receives the simultaneous transmission confirmation signal, several steps as shown in fig. 4 may be performed to control power transmission and data transmission between the first device and the second device. As shown in fig. 4, the controlling of the power transmission and the data transmission between the first device and the second device may include:
step 410, when the simultaneous transmission confirmation signal is received, acquiring a magnitude relation between the electric quantity information of the second device and the first threshold.
Optionally, after receiving the simultaneous transmission confirmation signal, the magnitude relationship between the power information of the second device and the first threshold may be periodically or in real time, and any one of step 420 to step 430 may be executed.
In step 420, if the power information of the second device is lower than the first threshold, power is transmitted to the second device through the first contact at a predetermined constant rate.
And 430, if the electric quantity information of the second device reaches the first threshold value, transmitting power to the second device through the first contact at a second constant voltage, and transmitting data with the second device through the first contact.
It should be noted that: the second constant voltage is set by the system developer, and is smaller than the first constant voltage, and in step 430, power transmission and data transmission are simultaneously performed, and the power transmission efficiency is lower than that when only power transmission is performed and the data transmission efficiency is lower than that when only data transmission is performed.
After performing step 430, the first device transfers power to the second device at a first constant voltage through the first contact when there is no data transfer between the first device and the second device. In addition, when the first device charges the second device at a first constant voltage, the charging current of the first device is detected; when the charging current is less than the predetermined current value, the transmission of the electric power to the second device through the transmission line is stopped, and the charging is ended. Wherein the predetermined current value is set by a system developer.
In an example of any of the above embodiments, the first device further obtains power information of the first device; if the power information of the first device is lower than the second threshold value, the power transmission to the second device through the first contact point is stopped, so that the power of the first device (for example, a mobile device) is saved, and the use of the first device is maintained. The second threshold is usually set by a system developer, and for example, the second threshold may be 20% of the remaining power.
In an example of any of the above embodiments, the first device further displays a prompt message for prompting that the electric quantity of the first device is lower when the electric quantity information of the first device is lower than the second threshold, so that the user can charge the first device in time according to the prompt message.
Referring to fig. 5, a flowchart of a data transmission method according to another embodiment of the invention is shown. The embodiment is exemplified by applying the method to the second device, and as shown in fig. 5, the data transmission method may include:
step 510, after the second device is connected to the first device through the second contact, the second device displays a prompt message for prompting selection of a function mode, where the function mode of the second device includes a charging mode and a data transmission mode.
And step 520, when the data transmission mode is detected to be selected, sending a data transmission confirmation signal to the first device, wherein the data transmission confirmation signal is used for triggering the first device to transmit power to the second device through the first contact when the electric quantity information of the second device is lower than a first threshold, and stopping transmitting power to the second device through the first contact and performing data transmission with the second device through the first contact when the electric quantity information of the second device reaches the first threshold.
Optionally, if the charging mode is selected, a power transfer confirmation signal is sent to the first device.
Optionally, the function modes of the second device further include a simultaneous transmission mode, when it is detected that the simultaneous transmission mode is selected, a simultaneous transmission confirmation signal is sent to the first device, where the simultaneous transmission confirmation signal is used to trigger the first device to transmit power to the second device and transmit data with the second device through the first contact at a second constant voltage when the power information of the second device reaches a first threshold, and when data transmission between the second device and the first device is finished, the first constant voltage is used to transmit power to the second device through the first contact, and the second constant voltage is smaller than the first constant voltage.
In summary, in the method provided in the embodiment of the present invention, after the second device is connected to the first device through the second contact, the prompt information for prompting to select the function mode is displayed, where the function mode of the second device includes a charging mode and a data transmission mode; when the data transmission mode is detected to be selected, sending a data transmission confirmation signal to the first equipment, wherein the data transmission confirmation signal is used for triggering the first equipment to transmit power to the second equipment through the first contact when the electric quantity information of the second equipment is lower than a first threshold value, and stopping transmitting the power to the second equipment through the first contact and performing data transmission with the second equipment through the first contact when the electric quantity information of the second equipment reaches the first threshold value; the problem that the charging function provided by the equipment in the related technology does not meet the user data transmission requirement is solved; the effect of providing the function according with the user requirement is achieved.
In one example, as shown in fig. 6, a first switch assembly 111 is disposed in the first device 110, the first contact 110a is connected to an input terminal of the first switch assembly 111, a first output terminal of the first switch assembly 111 is connected to the power transmission circuit 113 in the first device 110, and a second output terminal of the first switch assembly 111 is connected to the data transmission circuit 112 in the first device 110. The second contact 120a of the second device 120 is electrically connected to the data transmission circuit 121 and the power transmission circuit 122 in the second device 120, respectively.
When the first device 110 acquires the data transmission confirmation signal, controlling the first switch component 111 to conduct the first contact 110a and the data transmission circuit 112 in the first device 110; the first switch component 111 can conduct the first contact 110a with the first in-device power transmission circuit 113 after the first device finishes receiving data. To provide power to the second device.
After the first device 110 acquires the power transmission confirmation signal, controlling the first switch assembly 111 to conduct the first contact 110a with the power transmission circuit 113 in the first device 110, so as to provide power for the second device;
when acquiring the simultaneous transmission confirmation signal, the first device 110 controls the first switch component 111 to conduct the first contact 110a with the data transmission circuit 112 in the first device 110, and controls the first switch component 111 to conduct the first contact 110a with the power transmission circuit 113 in the first device 110. Optionally, after the data is received, only the first switch component 111 is controlled to conduct the first contact 110a with the power transmission circuit 113 in the first device 110, so as to provide power for the second device.
In practical implementation, when the first switch component 111 connects the first contact 110a to the data transmission circuit 112 in the first device 110, the first device 110 may send an upload request to the second device 120 through the first contact 110 a; the second device 120 may upload data to the first device 110 according to the upload request.
In another example, as shown in fig. 7, a first switching device 123 is disposed in the second device 120, and one end of the first switching device 123 is connected to the data transmission circuit 121 and the power transmission circuit 122 in the second device 120 respectively; the other end of the first switching device 123 is connected to the second contact 120 a. A first switch assembly 111 is arranged in the first device 110, the first contact 110a is connected to an input end of the first switch assembly 111, a first output end of the first switch assembly 111 is connected to a power transmission circuit 113 in the first device 110, and a second output end of the first switch assembly 111 is connected to a data transmission circuit 112 in the first device 110.
When the first device 110 needs to perform data transmission with the second device 120, the first switch component 111 is controlled to connect the first contact 110a with the data transmission circuit 112 in the first device 110; when the first device 110 needs to transmit power to the second device, the first switch assembly 111 is controlled to conduct the first contact 110a with the power transmission circuit 113 in the first device 110.
The first switching device 123 within the second device 120 detects the input voltage at the second contact 120 a; if the input voltage is lower than the predetermined voltage, indicating that the user selects data at the first device 110, the first switching device 123 turns on the data transmission circuit 121 with the second contact 120 a; if the input voltage reaches a predetermined voltage, indicating that the user selects charging at first device 110, first switching device 123 conducts power transmission circuit 122 with second contact 120a to receive power from the power transmission circuit within second device 120 when first device 110 transmits power to second device 120. The predetermined voltage is set by a system developer, and the system developer can set the predetermined voltage according to the voltage at the second contact when the first switching device 123 switches the second contact on the data transmission circuit, where the set predetermined voltage is smaller than the voltage at the second contact when the second contact switches on the data transmission circuit.
In still another example, as shown in fig. 8, a second switching device 114 is disposed in the first device 110, and one end of the second switching device 114 is connected to the data transmission circuit 112 and the power transmission circuit 113 in the first device 110, respectively; the other end of the second switching device 114 is connected to the first contact 110 a.
The second device 120 controls the second switch assembly 124 to conduct the second contact 120a with the power transmission circuit 122 when power needs to be received from the first device; when data transmission with the first device is required, the second switch component 124 is controlled to conduct the second contact 120a with the data transmission circuit 121.
The second switching device 114 detects the input voltage at the first contact 110 a; if the input voltage reaches a predetermined voltage, indicating that the user selects charging at the second device 120, the second switching device 114 conducts the first contact 110a with the power transmission circuit 113; if the input voltage is below the predetermined voltage, indicating that the user selects data transmission at the second device 120, the second switching device 114 conducts the first contact 110a with the data transmission circuit 112.
That is, the second device 120 sends a data transmission confirmation signal to the first device 110 when detecting that the charging mode is selected, where the data transmission confirmation signal is a voltage signal at the first contact 110a when the second circuit is turned off and the second circuit is turned on; the second device 120, upon detecting that the data transmission mode is selected, transmits a power transmission confirmation signal, which is a voltage signal at the first contact 110a when the first circuit is turned on and the second circuit is turned off, to the first device 110.
The first circuit is a circuit between the power transmission circuit in the second device 120 and the second contact 120a, and the second circuit is a circuit between the data transmission circuit in the second device 120 and the second contact 120 a.
The first switching device 123 and the second switching device 114 may be voltage comparators. Optionally, the first switching device 123 includes a control component, a voltage detection component for detecting an input voltage at the second contact 120a, and a switch component, one end of the switch component is connected to the second contact 120a, the other end of the switch component is respectively connected to the power transmission circuit and the data transmission circuit, and a control end of the switch component is connected to the control component.
Optionally, the second switching device 114 includes a control component, a voltage detection component for detecting the input voltage at the first contact 110a, and a switch component, one end of the switch component is connected to the first contact 110a, the other end of the switch component is respectively connected to the power transmission circuit and the data transmission circuit, and a control end of the switch component is connected to the control component.
An embodiment of the present invention further provides a computer-readable storage medium, in which one or more instructions are stored, and the one or more instructions, when executed by a processor in the first device or the second device, implement the data transmission method in any of the above embodiments.
An embodiment of the present invention further provides a data transmission apparatus, including: a memory and a processor; the memory has at least one program instruction stored therein; and the processor is used for realizing the data transmission method in any one of the above embodiments by loading and executing at least one program instruction.
The terms "first" and "second" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implying a number of the indicated technical features. Thus, a defined feature of "first", "second", may explicitly or implicitly include one or more of that feature. In the description of the present invention, "a plurality" means two or more unless otherwise specified.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, where the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.

Claims (10)

1. A data transmission method applied to a first device, a first contact of the first device being electrically connected to a second contact of a second device, the first device being capable of transmitting power to the second device through the first contact, the first device also being capable of data transmission with the second device through the first contact, the method comprising:
when a data transmission confirmation signal is received, acquiring the magnitude relation between the electric quantity information of the second equipment and a first threshold value;
if the power information of the second device is lower than a first threshold value, transmitting power to the second device through the first contact point, and stopping transmitting power to the second device through the first contact point and performing data transmission with the second device through the first contact point when the power information of the second device reaches the first threshold value;
the first threshold is a preset numerical value, or the first threshold is a numerical value determined by the first device or the second device according to the data volume to be transmitted.
2. The method of claim 1, further comprising:
if the power transmission confirmation signal is received, transmitting power to the second device through the first contact at a first constant voltage after the power information of the second device reaches the first threshold; and/or the presence of a gas in the gas,
transmitting power to the second device through the first contact at a second constant voltage and transmitting data with the second device through the first contact when the power information of the second device reaches the first threshold if a simultaneous transmission confirmation signal is received; when data transmission between the second equipment and the first equipment is finished, power is transmitted to the second equipment through the first contact by using a first constant voltage, and the second constant voltage is smaller than the first constant voltage.
3. The method of claim 1, wherein after the data transfer with the second device via the first contact, the method further comprises:
after data transmission with the second device is finished, determining a magnitude relation between the electric quantity information of the second device and the first threshold value;
transmitting power to the second device through the first contact at a predetermined constant current if the power information of the second device is less than the first threshold;
and if the power information of the second equipment reaches the first threshold value, transmitting power to the second equipment through the first contact point at a first constant voltage.
4. The method of claim 1, further comprising:
acquiring electric quantity information of the first equipment;
and if the power information of the first device is lower than a second threshold value, stopping transmitting power to the second device through the first contact.
5. The method of claim 1, further comprising:
when the electric quantity information of the second equipment reaches the first threshold value, displaying prompt information for prompting selection of a function mode, wherein the function mode of the first equipment comprises a charging mode and a data transmission mode;
and generating the data transmission confirmation signal when the data transmission mode is detected to be selected.
6. The method of claim 2, wherein the power transmission confirmation signal is a voltage signal at the first contact when the first circuit is on and the second circuit is off, and the data transmission confirmation signal is a voltage signal at the first contact when the first circuit is off and the second circuit is on;
wherein the first circuit is a circuit between the second in-device power transmission circuit and the second contact, and the second circuit is a circuit between the second in-device data transmission circuit and the second contact.
7. A data transmission method applied to a second device, a first contact of a first device being electrically connected with a second contact of the second device through a first contact, the first device being capable of transmitting power to the second device through the first contact, the first device also being capable of data transmission with the second device through the first contact, the method comprising:
after the second device is connected with the first device through the second contact, displaying prompt information for prompting selection of a function mode, wherein the function mode of the second device comprises a charging mode and a data transmission mode;
when the data transmission mode is detected to be selected, sending a data transmission confirmation signal to the first device, wherein the data transmission confirmation signal is used for triggering the first device to transmit power to the second device through the first contact when the power information of the second device is lower than a first threshold, and stopping transmitting power to the second device through the first contact and performing data transmission with the second device through the first contact when the power information of the second device reaches the first threshold;
the first threshold is a preset numerical value, or the first threshold is a numerical value determined by the first device or the second device according to the data volume to be transmitted.
8. The method of claim 7, wherein the functional modes further comprise a simultaneous transmission mode, the method further comprising:
transmitting a power transmission confirmation signal to the first device upon detecting that the charging mode is selected;
sending a simultaneous transmission acknowledgement signal to the first device upon detecting that the simultaneous transmission mode is selected;
wherein the simultaneous transmission confirmation signal is used to trigger the first device to transmit power to the second device and transmit data with the second device through the first contact at a second constant voltage when the power information of the second device reaches the first threshold, and to transmit power to the second device through the first contact at a first constant voltage when data transmission between the second device and the first device is finished, the second constant voltage being smaller than the first constant voltage.
9. A computer readable storage medium having one or more instructions stored therein, wherein the one or more instructions, when executed by a processor in a first device, implement the data transmission method of any one of claims 1 to 6, or wherein the one or more instructions, when executed by a processor in a second device, implement the data transmission method of claim 7 or 8.
10. A data transmission apparatus, characterized in that the apparatus comprises:
a memory and a processor;
at least one program instruction is stored in the memory;
the processor, by loading and executing the at least one program instruction, implements the data transmission method of any of claims 1 to 8.
CN201811359122.4A 2018-11-15 2018-11-15 Data transmission method and device Active CN111193529B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811359122.4A CN111193529B (en) 2018-11-15 2018-11-15 Data transmission method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811359122.4A CN111193529B (en) 2018-11-15 2018-11-15 Data transmission method and device

Publications (2)

Publication Number Publication Date
CN111193529A true CN111193529A (en) 2020-05-22
CN111193529B CN111193529B (en) 2022-04-12

Family

ID=70709304

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811359122.4A Active CN111193529B (en) 2018-11-15 2018-11-15 Data transmission method and device

Country Status (1)

Country Link
CN (1) CN111193529B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783427A (en) * 2010-01-19 2010-07-21 中兴通讯股份有限公司 Intelligent charging method and intelligent charging device of terminal
CN103247832A (en) * 2012-02-14 2013-08-14 联想(北京)有限公司 Charging method and electronic device
CN103918157A (en) * 2011-11-18 2014-07-09 索尼公司 Electronic apparatus, charge control method, charging system, and data transfer system
CN104467109A (en) * 2014-12-24 2015-03-25 广东欧珀移动通信有限公司 Method for supplying power to electronic equipment and electronic equipment
US9119158B2 (en) * 2010-12-22 2015-08-25 Electronics And Telecommunications Research Institute Apparatus and method for monitoring battery lifespan of machine type communication device
EP3091633A1 (en) * 2015-05-07 2016-11-09 Richtek Technology Corporation Adaptive power converter of mobile charger
CN106356925A (en) * 2016-09-12 2017-01-25 努比亚技术有限公司 Mobile terminal, and charge control device and method thereof
CN107635210A (en) * 2017-09-26 2018-01-26 深圳市舜宝科技有限公司 The method and system of electronic cigarette data transfer based on bluetooth
CN107834639A (en) * 2017-11-14 2018-03-23 常州市派腾电子技术服务有限公司 Method of supplying power to, electric supply installation, electronic cigarette and intelligent power

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101783427A (en) * 2010-01-19 2010-07-21 中兴通讯股份有限公司 Intelligent charging method and intelligent charging device of terminal
US9119158B2 (en) * 2010-12-22 2015-08-25 Electronics And Telecommunications Research Institute Apparatus and method for monitoring battery lifespan of machine type communication device
CN103918157A (en) * 2011-11-18 2014-07-09 索尼公司 Electronic apparatus, charge control method, charging system, and data transfer system
CN103247832A (en) * 2012-02-14 2013-08-14 联想(北京)有限公司 Charging method and electronic device
CN104467109A (en) * 2014-12-24 2015-03-25 广东欧珀移动通信有限公司 Method for supplying power to electronic equipment and electronic equipment
EP3091633A1 (en) * 2015-05-07 2016-11-09 Richtek Technology Corporation Adaptive power converter of mobile charger
CN106356925A (en) * 2016-09-12 2017-01-25 努比亚技术有限公司 Mobile terminal, and charge control device and method thereof
CN107635210A (en) * 2017-09-26 2018-01-26 深圳市舜宝科技有限公司 The method and system of electronic cigarette data transfer based on bluetooth
CN107834639A (en) * 2017-11-14 2018-03-23 常州市派腾电子技术服务有限公司 Method of supplying power to, electric supply installation, electronic cigarette and intelligent power

Also Published As

Publication number Publication date
CN111193529B (en) 2022-04-12

Similar Documents

Publication Publication Date Title
US11368039B2 (en) Battery charging method and electronic device
US9647475B2 (en) Charger, terminal, charging system, and charging control method
JP2016527853A (en) Wireless power transmission apparatus, system, and method
CN109768596B (en) Electric quantity display method, earphone charging device and earphone
CN105229888A (en) Wireless charger
CN113725951A (en) Charging management method and device, terminal device and storage medium
CN110768382A (en) Wireless charging method and device, storage medium and electronic equipment
CN107453425A (en) Wireless charging/discharging thereof and device
CN111193529B (en) Data transmission method and device
CN107277906B (en) Mode selecting method, device, terminal and computer readable storage medium
JP6674119B1 (en) Charge control device and charge control system
CN110970954B (en) Charging control method and device, storage medium and split type electronic equipment
CN107834639B (en) Power supply method, power supply device, electronic cigarette and intelligent power supply
US10439416B2 (en) Method for outputting charging current according to displayed media and power amplifier
CN106356913A (en) Electronic equipment charging control method and device
CN111030205A (en) Charging control method, charging control device, storage medium and electronic equipment
WO2018188469A1 (en) Atomization circuit, atomization device, and control method for atomization circuit
CN116022006A (en) BMS system control method and device, electronic equipment and storage medium
CN108964156A (en) Charge control method, device and computer readable storage medium
CN113991804A (en) Charging protocol handshaking circuit and electronic equipment
CN110970948A (en) Charging control method and device, storage medium and split type electronic equipment
CN105990874A (en) Charging method, charging device and charging control device
CN110970950B (en) Charging control method and device, storage medium and split type electronic equipment
CN111030227A (en) Information processing method, charging seat and electronic equipment
KR20140000832A (en) Terminal supporting apparatus and operating method thereof

Legal Events

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