CN110045304B - Data line detection method, terminal device and computer readable storage medium - Google Patents

Data line detection method, terminal device and computer readable storage medium Download PDF

Info

Publication number
CN110045304B
CN110045304B CN201910304862.6A CN201910304862A CN110045304B CN 110045304 B CN110045304 B CN 110045304B CN 201910304862 A CN201910304862 A CN 201910304862A CN 110045304 B CN110045304 B CN 110045304B
Authority
CN
China
Prior art keywords
data line
magnetic flux
terminal device
charging
terminal equipment
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.)
Active
Application number
CN201910304862.6A
Other languages
Chinese (zh)
Other versions
CN110045304A (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.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication 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 Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910304862.6A priority Critical patent/CN110045304B/en
Publication of CN110045304A publication Critical patent/CN110045304A/en
Application granted granted Critical
Publication of CN110045304B publication Critical patent/CN110045304B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R33/00Arrangements or instruments for measuring magnetic variables
    • G01R33/12Measuring magnetic properties of articles or specimens of solids or fluids

Landscapes

  • Physics & Mathematics (AREA)
  • Condensed Matter Physics & Semiconductors (AREA)
  • General Physics & Mathematics (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Manufacturing Of Electrical Connectors (AREA)

Abstract

The embodiment of the invention discloses a data line detection method, terminal equipment and a computer readable storage medium. Wherein a first magnetic flux is acquired; if the first magnetic flux exceeds the first reference range, determining that the data line is a target data line; the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux acquired by the terminal equipment when the terminal equipment and the data line are in a connected state. The embodiment of the invention can solve the problem that the original data line is higher in cost in order to identify the non-original data line in the prior art.

Description

Data line detection method, terminal device and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of data line detection, in particular to a data line detection method, terminal equipment and a computer readable storage medium.
Background
Generally, when charging and data transmission are performed for a terminal device, the performance of charging and data transmission is affected by performance parameters of a data line in addition to the terminal device. Generally, if the data line is a non-original data line, the efficiency and stability of charging and data transmission are reduced.
The conventional method for detecting whether the data line is the original data line is to add a chip into the original data line, connect the data line with a wired data connection port of a terminal device, and then the terminal device can identify the chip, if the chip can be identified, the data line is determined to be the original data line, and if the chip cannot be identified, the data line is determined to be the non-original data line. Although this method can identify whether the data line is the original data line to some extent, it results in a high cost of the data line.
Disclosure of Invention
The embodiment of the invention provides a data line detection method, terminal equipment and a computer readable storage medium, which aim to solve the problem that in the prior art, in order to identify a non-original data line, the cost of the original data line is high.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides a data line detection method, which is applied to a terminal device, and the method includes:
acquiring a first magnetic flux;
if the first magnetic flux exceeds the first reference range, determining that the data line is a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux acquired by the terminal equipment when the terminal equipment and the data line are in a connected state.
In a second aspect, an embodiment of the present invention provides a terminal device, including:
a first magnetic flux sensor for acquiring a first magnetic flux;
the data line detection device is electrically connected with the first magnetic flux sensor, and if the first magnetic flux exceeds a first reference range, the data line connected with the terminal equipment is determined to be a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux of the terminal equipment in a connection state with the data line.
In a third aspect, an embodiment of the present invention provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and operable on the processor, where the computer program, when executed by the processor, implements the steps of the data line detection method described above.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of the data line detection method described above.
In the embodiment of the invention, because the data line is provided with the magnetic part, the terminal equipment can acquire the first magnetic flux of the data line in a state of being connected with the data line, if the first magnetic flux exceeds the first reference range, the data line is determined to be the target data line, which indicates that the data line is a non-original data line, and the data line does not pass the data line authentication, so that the non-original data line is rapidly judged, the influence of the non-original data line on the charging and data transmission performance is avoided, the charging and data transmission speed and stability and other performances are ensured, and the use experience of a user is improved. Meanwhile, the first magnetic flux of the terminal equipment in the connection state with the data line is detected, and only the magnetic part is required to be arranged at the data interface of the data line, so that the production cost of the original data line can be reduced.
Drawings
The present invention will be better understood from the following description of specific embodiments thereof taken in conjunction with the accompanying drawings, in which like or similar reference characters designate like or similar features.
Fig. 1 is a schematic flow chart of a data line detection method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of a data line detection method according to another embodiment of the present invention;
fig. 3 is a schematic flow chart of a charge detection method according to an embodiment of the present invention;
FIG. 4 is a flow chart illustrating a data line detection method according to another embodiment of the present invention;
FIG. 5 is a flow chart illustrating a data line detection method according to yet another embodiment of the present invention;
fig. 6 is a schematic flowchart of data line detection performed by a terminal device according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention;
FIG. 8 is a schematic view of a mounting structure of a magnetic flux sensor according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a terminal device according to another embodiment of the present invention;
fig. 10 is a schematic view of a mounting structure of a magnetic flux sensor according to another embodiment of the present invention;
fig. 11 is a schematic structural diagram of a data line detection apparatus according to an embodiment of the present invention;
fig. 12 is a schematic hardware structure diagram of a terminal device for implementing various embodiments of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
In order to solve the problems in the prior art, embodiments of the present invention provide a data line detection method, a terminal device, and a computer-readable storage medium. First, a data line detection method provided by an embodiment of the present invention is described below.
Fig. 1 is a schematic flow chart illustrating a data line detection method according to an embodiment of the present invention. As shown in fig. 1, the data line detection method applied to the terminal device includes:
s101, acquiring a first magnetic flux;
s102, if the first magnetic flux exceeds a first reference range, determining that the data line is a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux acquired by the terminal equipment when the terminal equipment and the data line are in a connected state.
In the embodiment of the present invention, the target data line is a non-original data line, that is, if it is determined that the data line is the target data line, it may be determined that the data line is a non-original data line.
Therefore, in the data line detection method according to the embodiment of the present invention, since the data line has the magnetic component, the terminal device can obtain the first magnetic flux of the data line in a state of being connected to the data line, and if the first magnetic flux exceeds the first reference range, it is determined that the data line is the target data line, which indicates that the data line is the non-genuine data line, and the data line does not pass the data line authentication, so that the fast determination of the non-genuine data line is achieved, the influence of the non-genuine data line on the charging and data transmission performance is avoided, the charging and data transmission speed and stability performance are ensured, and the user experience is improved. Meanwhile, the first magnetic flux of the terminal equipment in the connection state with the data line is detected, and only the magnetic part is required to be arranged at the data interface of the data line, so that the production cost of the original data line can be reduced.
In the embodiment of the invention, the magnetic part can be additionally arranged at the data interface of the data line, and the magnetic parts can be additionally arranged at the data interface of the data line and the wired data connection port of the terminal equipment at the same time, so long as the wired data connection port of the terminal equipment is in a magnetic field range under the condition that the terminal equipment is connected with the data line. Wherein, the magnetic part can be a permanent magnet, an electromagnet and the like.
In the embodiment of the invention, after the terminal equipment is connected with the data line, two working modes can be provided. Wherein, the first working mode is as follows: whether the data line is a non-original data line is judged first, and whether charging is carried out through the data line is confirmed according to the judgment result. The second working mode is as follows: the data line is directly charged through the data line, and whether the data line is a non-original data line or not is judged in the charging process. In the following, the two modes of operation will be described in detail:
first mode of operation
In the first operation mode, after the data interface of the data line is connected to the wired data connection port of the terminal device, the terminal device is in a state of being connected to the data line, and the magnetic field in the area near the wired data connection port of the terminal device changes.
At this time, whether the data line is the target data line or not can be quickly determined by judging whether the magnetic field intensity obtained by the terminal device is the same as the magnetic field intensity after the original data line is connected or not when the terminal device is in a state of being connected with the data line, so that quick data line authentication of the data line is realized.
From the hall effect it can be seen that when a current is perpendicular to an external magnetic field through the semiconductor, carriers in the semiconductor are deflected, an additional electric field is generated in the semiconductor in a direction perpendicular to the current and the magnetic field, so that a potential difference can be generated across the semiconductor, and by detecting the magnitude of this potential difference, the magnetic flux at the semiconductor can be determined, and thus the magnetic field strength at the semiconductor.
According to the corresponding relation between the magnetic field intensity and the magnetic flux, when the magnetic field intensity is increased, the magnetic flux passing through a fixed area of the terminal equipment at any position in the magnetic field range is increased; when the magnetic field strength decreases, the magnetic flux through the fixed area of the terminal device at any position within the range of the magnetic field also decreases.
Therefore, in the embodiment of the present invention, the principle of the hall effect may be utilized to detect the first magnetic flux to determine whether the terminal device is in a state of being connected to the data line, and whether the first magnetic flux acquired by the terminal device is the same as the first magnetic flux after the original data line is connected is determined, so as to quickly determine whether the data line is the target data line.
In step S101 of the embodiment of the present invention, a first sampling point for acquiring the first magnetic flux may be disposed near the wired data connection port of the terminal device, and a first magnetic flux sensor may be disposed at the first sampling point to acquire the first magnetic flux, so as to sense whether the first magnetic flux at the first sampling point meets a requirement when the terminal device is in a state of being connected to the data line.
In some embodiments of the invention, the first magnetic flux sensor may be a hall sensor. In other embodiments of the present invention, the first magnetic flux sensor may also be a geomagnetic sensor.
Taking the first magnetic flux sensor as an example, when the data interface of the data line is close to the wired data connector, the hall sensor can sense the magnetic flux change of the magnetic field caused by the approach of the magnetic part at the data interface, and after the data interface is connected with the wired data connector, the magnetic flux of the magnetic field sensed by the hall sensor is not changed any more, and at the moment, the magnetic flux detected by the hall sensor is the first magnetic flux of the terminal equipment in the state of being connected with the data line.
In step S101 of the embodiment of the present invention, the first magnetic flux may be an actual magnetic flux detected by the terminal device, and the first magnetic flux may also be a first difference value between the actual magnetic flux detected by the terminal device and a preset reference magnetic flux.
In step S102 of the embodiment of the present invention, when the first magnetic flux is an actual magnetic flux detected by the terminal device, if the actual magnetic flux is beyond the first reference range, it is determined that the data line is the target data line. When the first magnetic flux is a first difference value between an actual magnetic flux detected by the terminal device and a preset reference magnetic flux, if the first difference value exceeds a first reference range, the data line is determined to be the target data line.
Taking the first magnetic flux as an example of the actual magnetic flux detected by the terminal device, the fact that the actual magnetic flux exceeds the first reference range means that the actual magnetic flux is greater than the maximum value of the first reference range or less than the minimum value of the first reference range, at this time, it may be determined that the magnetic member on the data line is different from the magnetic member of the original data line, and therefore, it may be determined that the data line is the target data line, that is, the data line is the non-original data line.
Taking the first reference range as the reference range corresponding to the actual magnetic flux detected by the terminal device as an example, since the magnetic field intensity of the magnetic member on the original data line is fixed, the actual magnetic flux detected by the terminal device in the state that the terminal device is connected with the data line is also fixed, and before the terminal device leaves the factory, the actual magnetic flux detected by the terminal device in the state that the terminal device is connected with the original data line is calibrated to obtain the first reference range, and the first reference range is preset in the terminal device.
In the embodiment of the present invention, a calibration method of a reference range corresponding to a first difference between an actual magnetic flux detected by a terminal device and a preset reference magnetic flux is similar to a calibration method of a reference range corresponding to an actual magnetic flux detected by a terminal device, and is not described herein again.
In the embodiment of the present invention, after the first magnetic flux is acquired, if it is determined that the first magnetic flux is within the first reference range, it may be determined that the data line is not the target data line.
Specifically, when the first magnetic flux is an actual magnetic flux detected by the terminal device, if the actual magnetic flux is within the first reference range, it is determined that the data line is not the target data line. When the first magnetic flux is a first difference value between an actual magnetic flux detected by the terminal device and a preset reference magnetic flux, if the first difference value is within a first reference range, the data line is determined not to be the target data line.
Taking the first magnetic flux as an example of the actual magnetic flux detected by the terminal device, the fact that the actual magnetic flux is within the first reference range means that the actual magnetic flux is less than or equal to the maximum value of the first reference range and greater than or equal to the minimum value of the first reference range, at this time, it can be determined that the magnetic member on the data line is the same as the magnetic member of the original data line, and therefore, it can be determined that the data line is not the target data line, that is, the data line is the original data line.
Second mode of operation
In the second operation mode, it can be known from the hall effect that the charging current also has a certain influence on the magnetic field intensity when the terminal device is charged through the data line. As can be seen from the correspondence between the magnetic field intensity and the magnetic flux, the change in the magnetic field intensity of the magnetic field can be determined by the change in the magnetic flux, and the charging current of the data line can be obtained.
At this time, in step S101 of the embodiment of the present invention, the first magnetic flux is specifically a magnetic flux acquired by the terminal device when the terminal device is in a connected state with the data line and the terminal device is in a charging state. That is, the first magnetic flux refers to a magnetic flux influenced by the charging current. Specifically, the method for acquiring the first magnetic flux is similar to that in the first operating mode, and is not described herein again.
In step S102 of the embodiment of the present invention, there are various methods of determining whether the data line is the target data line according to the first magnetic flux. For example, whether the data line is a target data line is determined by determining whether the first magnetic flux is within a first reference range. For another example, it is determined whether the data line is the target data line by determining whether a first difference between the first magnetic flux and the magnetic flux generated by the first magnetic member is within a first preset difference range.
In the second working mode, the calibration method for the first reference range is similar to the calibration method in the first working mode, and since the magnetic field strength of the magnetic part on the original data line is fixed and the charging current of the original data line is fixed, the first magnetic flux of the terminal device connected with the data line and in the charging state of the terminal device is also fixed, before the terminal device leaves the factory, the calibration can be performed according to the magnetic flux of the terminal device connected with the data line and in the charging state of the terminal device, so as to obtain the first reference range, and the first reference range is preset in the terminal device, which is not described herein again.
In the second operation mode, the principles of various determination methods for determining whether the data line is the target data line according to the first magnetic flux are similar to those in the first operation mode, and are not described herein again.
In the embodiment of the invention, the data wire is preferably a magnetic data wire.
Magnetism is inhaled formula data line and terminal equipment's connected mode and is inhaled the formula and be connected for magnetism, and its specific principle is: the periphery of the wired data connector of the terminal equipment is provided with the magnetic part, the periphery of the data interface of the magnetic type data line is provided with the magnetic part matched with the position and the size of the magnetic part of the terminal equipment, and when the data interface of the magnetic type data line is close to and contacts with the wired data connector of the terminal equipment, the data interface and the wired data connector are tightly connected and keep the relative position fixed through the attraction force between the two magnetic parts. When the data interface and the wired data connecting port are close to each other, the magnetic field intensity can be increased due to the fact that the two magnetic fields in the same direction are close to each other, and the magnetic field intensity of the wired data connecting port is increased.
In order to reduce the cost, the precision of the manufacturing process of the non-original data line is generally low, and when the magnetic data line is the non-original data line, the adopted material and the size of the element of the magnetic data line are generally different from those of the original data line.
Taking the magnetic part arranged at the data interface as an example, in order to avoid the interference of a magnetic field to terminal equipment, the magnetic part on the original data line is manufactured more finely, and the size of the magnetic part on the original data line can be reduced as much as possible on the premise of ensuring the attraction force between the magnetic part and the magnetic part at the wired data interface. The non-original data line is low in precision of the manufacturing process, and in order to reduce interference of a magnetic field to terminal equipment, the situation that the size is too small may occur, so that the attraction force between the two magnetic parts is insufficient. In addition, the precision of the manufacturing process of the non-original data line is low, so that the situation of overlarge size can occur in order to ensure the attraction force between the non-original data line and the magnetic part at the wired data connection port, and the magnetic field intensity of the magnetic part on the original data line is overlarge.
Therefore, after the non-original data line is connected with the terminal equipment, the magnetic field intensity of the wired data connection port is different from that when the original data line is connected with the terminal equipment, and the magnetic data line can be rapidly detected by utilizing the principle to determine whether the magnetic data line is a target data line, namely whether the magnetic data line is the non-original data line.
When the data line is a magnetic data line, and the first magnetic flux is an actual magnetic flux detected by the terminal device, the actual magnetic flux is a magnetic flux corresponding to a magnetic field formed by superimposing the first magnetic member and the second magnetic member; when the first magnetic flux is a first difference value between an actual magnetic flux detected by the terminal device and a preset reference magnetic flux, the reference magnetic flux may be a magnetic flux corresponding to a magnetic field of the first magnetic member, and the first difference value is a difference value between a magnetic flux corresponding to a magnetic field formed by superimposing the first magnetic member and the second magnetic member and a magnetic flux corresponding to a magnetic field of the first magnetic member.
Because when the data line is for magnetic type data line, only utilize its self magnetism spare both can realize its quick detection, need not additionally to increase magnetism spare, consequently, can further reduce the manufacturing cost of the data line that has data line authentication function.
Further, when the data line is a magnetic-type data line, taking the first magnetic flux as an example of an actual magnetic flux detected by the terminal device, the method for calibrating the first reference range by using the original data line includes:
detecting whether the magnetic type data line connected with the wired data connector is normally connected;
and if the connection is normal, reading the current output value of the first magnetic flux sensor, and generating a first reference range according to the output value and a preset error range. If the connection is abnormal, the magnetic type data line is prompted to be adjusted to enable the magnetic type data line to be connected with normal prompt information.
For example, if the first magnetic flux sensor detects that the magnetic flux generated by the first magnetic member of the terminal device is 80Wb, the first magnetic flux sensor detects that the first magnetic flux of the terminal device in a state of being connected to the data line is 100Wb, and the set error range is ± 5Wb, at this time, the calibrated first reference range is 95-105 Wb.
In the embodiment of the invention, after the data line is determined to be the target data line, the terminal device can be controlled to generate the prompt message, so that the user can know that the data line adopted by the user is the non-original data line. The prompting information may prompt the user only once after the data line is determined to be the target data line, or may prompt the user multiple times after the data line is determined to be the target data line.
Fig. 2 is a schematic flow chart illustrating a data line detection method according to another embodiment of the present invention. As shown in fig. 2, after determining that the data line is the target data line, the data line detecting method further includes:
s103, detecting the charging current passing through the data line;
s104, if the charging current is larger than or equal to a preset current value, controlling the terminal equipment to charge through a data line;
and S105, if the charging current is smaller than the preset current value, controlling the terminal equipment to generate prompt information.
In step S103 of the embodiment of the present invention, in the first operation mode, after determining that the data line is the target data line, it is not directly rejected to perform charging through the data line, but it is determined whether the data line supports a charging protocol corresponding to the terminal device, for example, a fast charging protocol, and then it is determined whether to perform charging through the data line according to a determination result.
Taking a charging protocol corresponding to the terminal device as an example of a fast charging protocol, the charging current passing through the data line may be detected, if the charging current is greater than or equal to a preset current value corresponding to the fast charging protocol, it may be determined that the data line supports the fast charging protocol, and if the charging current is less than the preset current value, it may be determined that the data line does not support the fast charging protocol. The detected charging current may be an instantaneous current value, an average value of current values in a predetermined time period, or a maximum value of current in the predetermined time period, where the predetermined time period may be 1 s.
In step S104 of the embodiment of the present invention, if the charging current is greater than or equal to the preset current value, it may be determined that the data line supports the charging protocol corresponding to the terminal device, which indicates that the terminal device may be temporarily charged by using the charging protocol, so that the terminal device may be controlled to be charged through the data line, so as to meet the requirement of the user for charging the terminal device.
In step S105 of the embodiment of the present invention, if the charging current is less than the preset current value, it is determined that the data line does not support the charging protocol corresponding to the terminal device, which indicates that the terminal device cannot be temporarily charged by using the charging protocol, so that the terminal device is not controlled to be charged, and a prompt message for prompting a user to replace the data line can be generated, so that the user knows that the adopted data line is a non-original data line, and the data line does not have the charging protocol corresponding to the terminal device, and cannot charge the terminal device through the data line.
Therefore, in the embodiment of the present invention, although it is determined that the data line fails to pass the data line authentication according to the first magnetic flux and is the target data line, the terminal device can still be charged as long as the data line supports the charging protocol corresponding to the terminal device, so that it is ensured that the charging requirement of the user on the terminal device is met before the user replaces the original data line, so as to improve the user experience.
In the embodiment of the present invention, the preset current value is preset according to a current value corresponding to a charging protocol supported by the terminal device before the terminal device leaves a factory.
Although the non-genuine data line supports the charging protocol corresponding to the terminal device, since the material and size of the components thereof are different from those of the genuine data line, the charging effect cannot be guaranteed, and for example, a situation in which the charging current is unstable may occur, thereby causing a problem in that the charging speed is unstable or the charging is frequently interrupted.
Fig. 3 is a schematic flow chart illustrating a charge detection method according to an embodiment of the present invention. As shown in fig. 3, after the control terminal device is charged through the data line, the data line detection method further includes:
s201, acquiring charging current passing through a data line at intervals of first preset time;
s202, if the charging current is within a preset current range, continuing to charge;
and S203, if the charging current exceeds the preset current range, generating prompt information.
In step S201 of the embodiment of the present invention, the charging current passing through the magnetic data line may be acquired by the current detection element connected to the wired data connection port at first predetermined time intervals during the charging process (i.e., periodically during the charging process), so that whether the charging current is stable and whether the charging process is interrupted may be monitored in real time.
In step S202 of the embodiment of the present invention, if the charging current is always within the preset current range, it indicates that the charging current is stable, and the charging can be continued without performing other actions.
In step S203 of the embodiment of the present invention, if the charging current exceeds the preset current range, specifically, the charging current may be higher than the maximum value of the preset current range or lower than the minimum value of the preset current range, a prompt message is generated to notify the user that the charging current is not the original data line, and the charging effect is not good, so that the user can timely know and replace the original data line.
In the embodiment of the present invention, the preset current range may be determined based on a preset current value, for example, the preset current range may be determined according to the preset current value and an allowable current floating range.
It should be noted that, if the charging current exceeds the preset current range, the charging may be continued and the prompt message may be generated, and the charging may also be stopped and the prompt message may be generated, so as to prevent the terminal device from being damaged due to the unstable charging current.
Therefore, in the embodiment of the invention, the charging effect of the non-original data line can be detected by regularly detecting whether the charging current passing through the data line always accords with the preset current range corresponding to the charging protocol corresponding to the terminal equipment, so that a user can timely know and replace the original data line when the charging effect is poor, and the damage to the terminal equipment caused by the unstable charging current is avoided.
In the embodiment of the invention, although the data line is determined to be the target data line according to the first magnetic flux, in order to meet the data transmission requirement of the user, data transmission can still be performed through the data line, so as to improve the user experience. However, since the elements of the non-genuine data line are different in material and size from the genuine data line, the data transmission may not be effective, for example, the data transmission speed may not be stable, resulting in problems of long data transmission time, low data transmission efficiency, or frequent interruption of data transmission.
Fig. 4 is a schematic flow chart illustrating a data line detection method according to another embodiment of the present invention. As shown in fig. 4, after determining that the data line is the target data line, the data line detection method further includes:
s106, acquiring the transmission speed of data transmission at intervals of a second preset time interval in the process of data transmission of the terminal equipment through the data line;
s107, if the transmission speed is within the preset speed range, continuing data transmission;
and S108, if the transmission speed exceeds the preset speed range, generating prompt information.
In step S106 of the embodiment of the present invention, the transmission speed of data transmission may be obtained every second predetermined time interval during the data transmission (i.e. periodically during the data transmission), so as to monitor whether the data transmission is stable and whether the data transmission is interrupted in real time.
In step S107 in the embodiment of the present invention, if the transmission speed is always within the preset speed range, it indicates that the data transmission is stable, and the data transmission can be continued without performing other actions.
In step S108 of the embodiment of the present invention, if the transmission speed exceeds the preset speed range, specifically, the transmission speed may be higher than the maximum value of the preset speed range or lower than the minimum value of the preset speed range, a prompt message is generated to notify the user that the data line is not an original data line, and the data transmission efficiency is low, so that the user can timely know and replace the original data line.
In the embodiment of the present invention, the preset speed range may be determined based on the preset transfer speed, and for example, the preset speed range may be determined according to the preset transfer speed and the allowable current floating range. Wherein, the preset transmission speed is the transmission speed of the original data line.
It should be noted that, if the transmission speed exceeds the preset speed range, the data transmission may be continued and the prompt information may be generated, or the data transmission may be stopped and the prompt information may be generated.
In the embodiment of the invention, the preset speed range is obtained by utilizing the calibration of an original data line and is preset in the terminal equipment before the terminal equipment leaves a factory. Specifically, the calibration method of the preset speed range is similar to the first reference range, and is not described herein again.
Therefore, in the embodiment of the invention, the data transmission effect of the non-original data line can be detected by regularly detecting whether the transmission speed of the data transmission always accords with the preset speed range, and when the data transmission effect is not good, a user can timely know and replace the original data line, so that the user experience is improved.
Although, in the aforementioned first operation mode, the data line may be authenticated to some extent by using the first magnetic flux to determine whether the data line is the target data line, since the magnetic member of some non-genuine data lines may be the same as the magnetic member of the genuine data line, it may not be possible to accurately determine whether the data line is the genuine data line based on only the first magnetic flux.
Fig. 5 is a schematic flow chart illustrating a data line detection method according to still another embodiment of the present invention. As shown in fig. 5, after determining that the data line is not the target data line in step S109, the data line detecting method further includes:
s110, acquiring a second magnetic flux;
s111, if the second magnetic flux is in a second reference range, determining that the data line passes through load current verification;
and S112, if the second magnetic flux exceeds the second reference range, determining that the data line fails to pass the load current verification.
As can be seen from the above analysis, when the terminal device is charged, the charging current also affects the magnetic field in the vicinity of the wired data connection port. Therefore, the charging current of the data line can be determined by detecting the second magnetic flux by utilizing the principle of the hall effect, so that whether the data line passes the load current verification can be determined, and whether the data line is the original data line can be further judged.
In step S110 of the embodiment of the present invention, a second sampling point for collecting a second magnetic flux may be disposed near the wired data connection port of the terminal device, and a second magnetic flux sensor may be disposed at the second sampling point to collect the second magnetic flux, so as to determine whether the maximum load current of the data line meets a preset requirement. In order to improve the detection precision and accuracy, the second sampling point may be disposed at a position close to the charging wire of the data line.
In some embodiments of the invention, the second magnetic flux sensor may be a hall sensor. In other embodiments of the present invention, the second magnetic flux sensor may also be a geomagnetic sensor.
In step S110 of the embodiment of the present invention, the second magnetic flux may be an actual magnetic flux detected by the terminal device, and the second magnetic flux may also be a second difference value between the actual magnetic flux detected by the terminal device and a preset reference magnetic flux.
In step S111 of the embodiment of the present invention, when the second magnetic flux is an actual magnetic flux detected by the terminal device, the second magnetic flux is an actual magnetic flux detected by the terminal device in a charging state, and if the actual magnetic flux is within a second reference range, it is determined that the data line passes the load current verification. And when the second magnetic flux is a second difference value between the actual magnetic flux detected by the terminal equipment and a preset reference magnetic flux, the second magnetic flux is a difference value between the actual magnetic flux of the terminal equipment in a charging state detected by the terminal equipment and a calibration magnetic flux of the preset terminal equipment and the original data line in a connection state, and if the second difference value is within a second reference range, the data line is determined to pass load current verification. If the data line is confirmed to pass the load current verification, the data line can be further judged to be the original data line.
In step S112 of the embodiment of the present invention, when the second magnetic flux is the actual magnetic flux detected by the terminal device, the second magnetic flux is the actual magnetic flux detected by the terminal device in the charging state, and if the actual magnetic flux exceeds the second reference range, it is determined that the data line fails the load current verification. And when the second magnetic flux is a second difference value between the actual magnetic flux detected by the terminal equipment and a preset reference magnetic flux, the second magnetic flux is a difference value between the actual magnetic flux of the terminal equipment in a charging state detected by the terminal equipment and a calibration magnetic flux of the preset terminal equipment and the original data line in a connection state, and if the second difference value exceeds a second reference range, the data line is determined not to pass the load current verification. If the data line is determined to pass the load current verification, the data line can be further judged to be an unassembled data line. In this case, a prompt message may be generated to prompt the user that the data line is a non-original data line and needs to be replaced.
Specifically, taking the second magnetic flux as an actual magnetic flux detected by the terminal device as an example, the fact that the second magnetic flux exceeds the second reference range means that the second magnetic flux is greater than a maximum value of the second reference range or less than a minimum value of the second reference range; that the second magnetic flux is within the second reference range means that the second magnetic flux is less than or equal to the maximum value of the second reference range and greater than or equal to the minimum value of the second reference range
In the embodiment of the present invention, the second reference range is obtained by calibration using an original data line and is preset in the terminal device before the terminal device leaves a factory. Specifically, the calibration method of the second reference range is similar to that of the first reference range, and is not described herein again.
Fig. 6 is a schematic flow chart illustrating data line detection performed by a terminal device according to an embodiment of the present invention. As shown in fig. 6, the specific process of the terminal device performing data line detection includes:
s301, detecting whether the wired data connecting port is connected with a data line, if so, executing a step S302, and if not, continuing to wait;
s302, acquiring a first magnetic flux, judging whether the first magnetic flux is in a first reference range or not to judge whether the data line is a target data line or not, if the first magnetic flux is in the first reference range, determining that the data line is not the target data line, executing step S303, and if the first magnetic flux exceeds the first reference range, determining that the data line is the target data line, executing step S304;
s303, determining that the magnetic type data line is not a target data line, and directly carrying out quick charging or data transmission;
s304, detecting whether the external equipment connected with the data line is a charger, if so, executing a step S305, otherwise, executing a step S308;
s305, detecting whether the rapid charging protocol is normal, namely whether the charging current is greater than or equal to a preset current value, if so, executing a step S306, and if not, executing a step S311;
s306, carrying out quick charging and entering a polling waiting state;
s307, acquiring the charging current passing through the data line at intervals of first preset time, judging whether the charging current is in a preset current range, if so, continuing to charge quickly, and if the charging current exceeds the preset current range, executing the step S311;
s308, detecting a data transmission protocol of the external equipment;
s309, data transmission is carried out, and a polling waiting state is entered;
s310, acquiring the transmission speed of data transmission at intervals of a second preset time interval, judging whether the transmission speed is in a preset speed range, if so, continuing the data transmission, and if the transmission speed exceeds the preset speed range, executing the step S311;
and S311, prompting the user to use the original data line.
In summary, the data line detection method according to the embodiment of the present invention can achieve a quick determination of whether the data line is an original data line, so as to avoid an influence of a non-original data line on the charging and data transmission performance, ensure the charging and data transmission speed and stability, improve the user experience, and reduce the cost of the original data line. Therefore, the problems of quick charging and data transmission of the terminal equipment can be solved, whether the data line used by the user is different from the original data line or not can be reminded, when the difference between the data line and the original data line is detected, the user is guided to use the original data line, the consciousness of using the original data line by the user is improved, the complaint rate caused by the problem of the non-original data line is reduced, and the reduction of the satisfaction degree of the user is avoided.
Fig. 7 shows a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device includes:
a first magnetic flux sensor 401 for acquiring a first magnetic flux;
a data line detection means 402, the data line detection means 402 being electrically connected to the first magnetic flux sensor 401, and determining that the data line connected to the terminal device is a target data line if the first magnetic flux exceeds a first reference range; determining that the data line is not the target data line if the first magnetic flux is within the first reference range; the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux of the terminal equipment in a connection state with the data line.
According to the terminal equipment provided by the embodiment of the invention, the data line is provided with the magnetic part, so that the terminal equipment can acquire the first magnetic flux of the data line in a state of being connected with the data line, if the first magnetic flux exceeds the first reference range, the data line is determined to be the target data line, the data line is indicated to be a non-original data line, and the data line does not pass data line authentication, so that the non-original data line is rapidly judged, the influence of the non-original data line on the charging and data transmission performance is avoided, the charging and data transmission speed and stability and other performances are ensured, and the use experience of a user is improved. Meanwhile, the first magnetic flux of the terminal equipment in the connection state with the data line is detected, and only the magnetic part is required to be arranged at the data interface of the data line, so that the production cost of the original data line can be reduced.
In the embodiment of the present invention, the first sampling point is located in a first region of the terminal device, the first region is provided with a wired data connection port for connecting with a data line, and the first region is a magnetic field region corresponding to the wired data connection port and/or a data interface of the data line, and the first magnetic flux sensor 401 is located in the first region and is arranged on the first sampling point so that the first magnetic flux sensor 401 can detect the first magnetic flux. Specifically, the first magnetic flux sensor 401 may be disposed near the wired data connection port to more accurately detect the first magnetic flux, improving the accuracy of data line authentication.
In some embodiments of the present invention, the number of the first magnetic flux sensors 401 may be one. In other embodiments of the present invention, the number of the first magnetic flux sensors 401 may also be multiple, and in this case, the multiple first magnetic flux sensors are uniformly arranged along the circumference of the wired data connection port and are arranged at the same position of the magnetic field strength.
In one embodiment as shown in fig. 8, the number of the first magnetic flux sensors 401 is two, two first magnetic flux sensors 401 are respectively located in the first area 410, the wired data connection port 420 is arranged in the first area 410, and two first magnetic flux sensors 401 are respectively arranged on two sides of the wired data connection port along the length direction.
When the number of the first magnetic flux sensors 401 is plural, the detected first magnetic flux may be a sum of the detection values of the plural first magnetic flux sensors 401, or may be an average value of the detection values of the plural first magnetic flux sensors 401, so as to reduce the error of the first magnetic flux.
Fig. 9 is a schematic structural diagram of a terminal device according to another embodiment of the present invention. As shown in fig. 9, the terminal device further includes:
a second magnetic flux sensor 403 for acquiring a second magnetic flux; wherein the second magnetic flux is a magnetic flux of the terminal device in a charging state.
At this time, the data line detecting device 402 is also connected to the second magnetic flux sensor 403, and if the first magnetic flux is within the first reference range and the second magnetic flux is within the second reference range, it is determined that the data line passes the load current verification; if the first magnetic flux is within the first reference range and the second magnetic flux is beyond the second reference range, determining that the data line fails to pass the load current verification; wherein the second magnetic flux is a magnetic flux of the terminal device in a charging state.
In the embodiment of the present invention, the second sampling point is located on the terminal device near the charging conductor of the data line, and the second magnetic flux sensor 403 is disposed on the second sampling point, so that the second magnetic flux sensor 403 can be close to the charging conductor of the data line, thereby ensuring that the second magnetic flux sensor 403 can be used to detect the change of the magnetic field caused by the charging of the terminal device through the data line, and improving the accuracy of the maximum load current detection.
In some embodiments of the present invention, the number of the second magnetic flux sensors 403 may be one. In other embodiments of the present invention, the number of the second magnetic flux sensors 403 may also be multiple, and in this case, the multiple second magnetic flux sensors 403 may be uniformly arranged around the charging wire and arranged at the same position of the magnetic field strength.
In one embodiment as shown in fig. 10, the number of the first magnetic flux sensors 401 is two, two first magnetic flux sensors 401 are respectively located in a first area 410, a wired data connection port 420 is arranged in the first area 410, two first magnetic flux sensors 401 are respectively arranged at two sides of the wired data connection port, the number of the second magnetic flux sensors 403 is one, the second magnetic flux sensors 403 are located in a second area 430, the second area 430 is smaller than the first area 410, and a wired data connection port 420 is arranged in the second area 410 and arranged at one side of the wired data connection port in the width direction.
When the number of the second magnetic flux sensors 403 is plural, the detected second magnetic flux may be the sum of the detection values of the plural second magnetic flux sensors 403, or may be the average value of the detection values of the plural second magnetic flux sensors 403, so as to reduce the error of the second magnetic flux.
In an embodiment of the present invention, the first and second magnetic flux sensors may be hall sensors. In other embodiments of the present invention, the first magnetic flux sensor and the second magnetic flux sensor may also be geomagnetic sensors.
Fig. 11 is a schematic structural diagram illustrating a data line detection apparatus according to an embodiment of the present invention. As shown in fig. 11, the data line detecting apparatus includes:
a first acquisition module 501 configured to acquire a first magnetic flux;
an authentication processing module 502 configured to determine that the data line connected to the terminal device is a target data line if the first magnetic flux exceeds the first reference range; determining that the data line is not the target data line if the first magnetic flux is within the first reference range;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux of the terminal equipment in a connection state with the data line.
According to the embodiment of the invention, after the data line fails to pass the data line authentication, namely the target data line is determined, the terminal equipment can still be charged, so that the user requirements are met, and the user experience is improved. Specifically, the data line detection apparatus according to the embodiment of the present invention further includes a charging detection module configured to detect a charging current passing through the data line if it is determined that the data line is the target data line; if the charging current is larger than or equal to the preset current value, the terminal equipment is controlled to be charged through the data line; and if the charging current is smaller than the preset current value, controlling the terminal equipment to generate prompt information.
In the embodiment of the present invention, the charging detection module is further configured to acquire a charging current passing through the data line at intervals of a first predetermined time interval during the charging process; if the charging current is within the preset current range, continuing to charge; and if the charging current exceeds the preset current range, generating prompt information. Therefore, in the embodiment of the invention, the charging effect of the non-original data line can be detected by regularly detecting whether the charging current of the data line is always within the preset current range.
The embodiment of the invention can ensure that the terminal equipment can still transmit data after the data line fails to pass the data line authentication, namely the target data line, so as to meet the user requirements and improve the user experience. Specifically, the data line detection apparatus according to the embodiment of the present invention further includes a transmission detection module configured to, if it is determined that the data line is not the target data line, obtain a transmission speed of data transmission at intervals of a second predetermined time interval in a process of data transmission by the terminal device through the data line; if the transmission speed is within the preset speed range, continuing data transmission; and if the transmission speed exceeds the preset speed range, generating prompt information. Therefore, in the embodiment of the invention, the charging effect of the non-original data line can be detected by regularly detecting whether the transmission speed of data transmission is always within the preset speed range.
Since some of the magnetic members of the non-genuine data lines may be the same as those of the genuine data lines, the accuracy of determining whether the data lines are genuine data lines based on the first magnetic flux is not high. When charging is performed through the data line, the charging current also affects the magnetic field near the wired data connection port. Therefore, the data line detection apparatus of the embodiment of the present invention further includes a current detection module configured to acquire the second magnetic flux; determining that the data line passes the load current verification if the first magnetic flux is within a first reference range and the second magnetic flux is within a second reference range; if the first magnetic flux is within the first reference range and the second magnetic flux is beyond the second reference range, determining that the data line fails to pass the load current verification; wherein the second magnetic flux is a magnetic flux of the terminal device in a charging state.
Therefore, the embodiment of the invention can also determine whether the data line passes the load current verification by detecting the second magnetic flux so as to further judge whether the data line is a target data line, namely whether the data line is an original data line, and whether the charging effect of the data line is the best effect.
In summary, the terminal device provided in the embodiment of the present invention can implement each process implemented by the terminal device in the method embodiments of fig. 1 to fig. 5, and for avoiding repetition, details are not described here again.
Fig. 12 is a schematic diagram illustrating a hardware structure of a terminal device implementing various embodiments of the present invention. As shown in fig. 12, the terminal device 600 includes but is not limited to: a radio frequency unit 601, a network module 602, an audio output unit 603, an input unit 604, a sensor 605, a display unit 606, a user input unit 607, an interface unit 608, a memory 609, a processor 610, and a power supply 611. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 12 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
Wherein, the processor 610 is configured to execute:
acquiring a first magnetic flux;
if the first magnetic flux exceeds the first reference range, determining that the data line is a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux acquired by the terminal equipment when the terminal equipment and the data line are in a connected state.
Therefore, the terminal device can acquire the first magnetic flux of the data line in a state of being connected with the data line because the data line is provided with the magnetic part, and if the first magnetic flux exceeds the first reference range, the data line is determined to be the target data line, which indicates that the data line is the non-original data line, and the data line does not pass the data line authentication, so that the non-original data line is rapidly judged, the influence of the non-original data line on the charging and data transmission performance is avoided, the charging and data transmission speed and stability and other performances are ensured, and the use experience of a user is improved. Meanwhile, the first magnetic flux of the terminal equipment in the connection state with the data line is detected, and only the magnetic part is required to be arranged at the data interface of the data line, so that the production cost of the original data line can be reduced.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 610; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio frequency unit 601 may also communicate with a network and other devices through a wireless communication system.
The terminal device provides the user with wireless broadband internet access through the network module 602, such as helping the user send and receive e-mails, browse webpages, access streaming media, and the like.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 can also provide audio output related to a specific function performed by the terminal apparatus 600 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used to receive audio or video signals. The input Unit 604 may include a Graphics Processing Unit (GPU) 6041 and a microphone 6042, and the Graphics processor 6041 processes image data of a still picture or video obtained by an image capturing apparatus (such as a camera) in a video capture mode or an image capture mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphic processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. The microphone 6042 can receive sound, and can process such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 601 in case of the phone call mode.
The terminal device 600 further comprises at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the luminance of the display panel 6061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 6061 and/or the backlight when the terminal apparatus 600 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 605 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
In order to implement the data line detection method of the embodiment of the present invention, the sensor 605 further includes a magnetic flux sensor. The magnetic flux sensor includes a first magnetic flux sensor for detecting a first magnetic flux of the terminal device in a state of being connected to the data line and a second magnetic flux sensor for detecting a second magnetic flux of the terminal device in a state of being charged.
The display unit 606 is used to display information input by the user or information provided to the user. The Display unit 606 may include a Display panel 6061, and the Display panel 6061 may be configured by a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 6071 using a finger, stylus, or any suitable object or accessory). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 610, receives a command from the processor 610, and executes the command. In addition, the touch panel 6071 can be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, the other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 6071 can be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation on or near the touch panel 6071, the touch operation is transmitted to the processor 610 to determine the type of the touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although in fig. 12, the touch panel 6071 and the display panel 6061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the terminal device, and this is not limited here.
The interface unit 608 is an interface for connecting an external device to the terminal apparatus 600. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the terminal apparatus 600 or may be used to transmit data between the terminal apparatus 600 and an external device. The wired data connection port of the interface unit 608 is used for connection with a data interface (wired data port) of a data line.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 609 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 610 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by running or executing software programs and/or modules stored in the memory 609 and calling data stored in the memory 609, thereby performing overall monitoring of the terminal device. Processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The terminal device 600 may further include a power supply 611 (such as a battery) for supplying power to various components, and preferably, the power supply 611 may be logically connected to the processor 610 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 600 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides a terminal device, which includes a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program is executed by the processor 610 to implement each process of the above data line detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not described here again.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the data line detection method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (10)

1. A data line detection method is applied to terminal equipment and is characterized by comprising the following steps:
acquiring a first magnetic flux;
if the first magnetic flux exceeds a first reference range, determining that the data line is a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is obtained by the terminal equipment when the terminal equipment is in a connection state with the data line and the terminal equipment is in a charging state;
determining that the data line is not a target data line if the first magnetic flux is within the first reference range;
the method further comprises the following steps:
acquiring a second magnetic flux;
determining that the data line passes load current verification if the second magnetic flux is within a second reference range;
determining that the data line fails the load current verification if the second magnetic flux is outside the second reference range;
the second magnetic flux is the magnetic flux acquired by the terminal equipment when the terminal equipment is in a charging state.
2. The data line detection method of claim 1, wherein after determining that the data line is a target data line, further comprising:
detecting a charging current through the data line;
and if the charging current is greater than or equal to a preset current value, controlling the terminal equipment to charge through the data line.
3. The method according to claim 2, wherein after controlling the terminal device to charge through the data line, the method further comprises:
acquiring a charging current passing through the data line at intervals of a first predetermined time interval;
and if the charging current exceeds a preset current range, generating prompt information.
4. The method according to claim 1, wherein after determining that the data line is a target data line, the method further comprises:
acquiring the transmission speed of data transmission at intervals of a second preset time interval in the process of data transmission of the terminal equipment through the data line;
and if the transmission speed exceeds a preset speed range, generating prompt information.
5. The method of claim 1, wherein the data line is a magnetic data line.
6. A terminal device, comprising:
a first magnetic flux sensor for acquiring a first magnetic flux;
the data line detection device is electrically connected with the first magnetic flux sensor, and if the first magnetic flux exceeds a first reference range, the data line connected with the terminal equipment is determined to be a target data line;
the data line is provided with a magnetic part, and the first magnetic flux is the magnetic flux when the terminal equipment is in a connection state with the data line and the terminal equipment is in a charging state;
a second magnetic flux sensor for acquiring a second magnetic flux; wherein,
the data line detection device is also connected with the second magnetic flux sensor, and if the first magnetic flux is in a first reference range and the second magnetic flux is in a second reference range, the data line is determined to pass load current verification; determining that the data line fails the load current verification if the first magnetic flux is within a first reference range and the second magnetic flux is outside of a second reference range;
wherein the second magnetic flux is a magnetic flux of the terminal device in a charging state.
7. The terminal device according to claim 6, wherein the number of the first magnetic flux sensors is plural, and the plural first magnetic flux sensors are uniformly arranged along a circumferential direction of the wired data connection port of the terminal device.
8. The terminal device according to claim 6, wherein the second magnetic flux sensor is provided on the terminal device at a position close to a charging conductor of the data line.
9. A terminal device, characterized by comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the data line detection method according to any one of claims 1 to 5.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the data line detection method according to any one of claims 1 to 5.
CN201910304862.6A 2019-04-16 2019-04-16 Data line detection method, terminal device and computer readable storage medium Active CN110045304B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910304862.6A CN110045304B (en) 2019-04-16 2019-04-16 Data line detection method, terminal device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910304862.6A CN110045304B (en) 2019-04-16 2019-04-16 Data line detection method, terminal device and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN110045304A CN110045304A (en) 2019-07-23
CN110045304B true CN110045304B (en) 2021-09-28

Family

ID=67277443

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910304862.6A Active CN110045304B (en) 2019-04-16 2019-04-16 Data line detection method, terminal device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN110045304B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104330638A (en) * 2014-11-19 2015-02-04 惠州Tcl移动通信有限公司 Identifying method and system for original charging cable
CN204464655U (en) * 2015-03-25 2015-07-08 深圳市北美通科技有限公司 A kind of data wire, recognition device and charger
CN104882924A (en) * 2015-05-11 2015-09-02 深圳天珑无线科技有限公司 Charging identification device and identification method thereof
CN105554308A (en) * 2016-01-29 2016-05-04 广东欧珀移动通信有限公司 Selfie stick, method and apparatus for identifying selfie stick and mobile terminal
CN205484748U (en) * 2015-07-15 2016-08-17 北京宏强富瑞技术有限公司 Hand utensil intelligent recognition device
CN106849230A (en) * 2017-01-20 2017-06-13 吴钰淳 Protocol conversion system and method, chip and data wire are filled soon
CN106961059A (en) * 2016-01-12 2017-07-18 深圳市黑羽科技有限公司 Two-sided identification switching circuit and magnetic connector applied to magnetic connector
CN108511987A (en) * 2018-03-14 2018-09-07 平安科技(深圳)有限公司 Terminal shatter-resistant control method, terminal device and computer readable storage medium
CN108920399A (en) * 2018-07-26 2018-11-30 厦门美图移动科技有限公司 data line identification system and method
CN208368902U (en) * 2018-07-26 2019-01-11 厦门美图移动科技有限公司 Data line and data line identification system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003318998A (en) * 2002-04-24 2003-11-07 Fuji Electric Co Ltd Data communication apparatus and data communication method

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104330638A (en) * 2014-11-19 2015-02-04 惠州Tcl移动通信有限公司 Identifying method and system for original charging cable
CN204464655U (en) * 2015-03-25 2015-07-08 深圳市北美通科技有限公司 A kind of data wire, recognition device and charger
CN104882924A (en) * 2015-05-11 2015-09-02 深圳天珑无线科技有限公司 Charging identification device and identification method thereof
CN205484748U (en) * 2015-07-15 2016-08-17 北京宏强富瑞技术有限公司 Hand utensil intelligent recognition device
CN106961059A (en) * 2016-01-12 2017-07-18 深圳市黑羽科技有限公司 Two-sided identification switching circuit and magnetic connector applied to magnetic connector
CN105554308A (en) * 2016-01-29 2016-05-04 广东欧珀移动通信有限公司 Selfie stick, method and apparatus for identifying selfie stick and mobile terminal
CN106849230A (en) * 2017-01-20 2017-06-13 吴钰淳 Protocol conversion system and method, chip and data wire are filled soon
CN108511987A (en) * 2018-03-14 2018-09-07 平安科技(深圳)有限公司 Terminal shatter-resistant control method, terminal device and computer readable storage medium
CN108920399A (en) * 2018-07-26 2018-11-30 厦门美图移动科技有限公司 data line identification system and method
CN208368902U (en) * 2018-07-26 2019-01-11 厦门美图移动科技有限公司 Data line and data line identification system

Also Published As

Publication number Publication date
CN110045304A (en) 2019-07-23

Similar Documents

Publication Publication Date Title
CN109067418B (en) Antenna control method and mobile terminal
CN108494030B (en) Wireless charging method, terminal and transmitting terminal equipment
CN108289270B (en) Loudspeaker and mobile terminal
CN108988421B (en) Battery charging method, charging circuit and terminal
CN110474437B (en) Wireless charging method and related equipment
CN108631694B (en) Voice coil motor control method and mobile terminal
CN110139018B (en) Camera control module, camera movement control method and terminal
CN108681413B (en) Control method of display module and mobile terminal
CN108668328B (en) Network switching method and mobile terminal
CN108802835B (en) Wireless charging detection method and device, mobile terminal and wireless charging system
CN108848267B (en) Audio playing method and mobile terminal
CN111246061B (en) Mobile terminal, method for detecting shooting mode and storage medium
CN110571953B (en) Wireless charging method and related equipment
CN108429363B (en) Wireless charging method and wireless charging device
CN108388400B (en) Operation processing method and mobile terminal
CN108196663B (en) Face recognition method and mobile terminal
CN108170310B (en) Touch screen control method and mobile terminal
CN113391968A (en) Static detection method and device and computer readable storage medium
CN109124647B (en) Laser module, detection method of laser module and terminal
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN110209543B (en) Earphone socket detection method and terminal
CN112243259A (en) Network disconnection method, device, storage medium and mobile terminal
CN107995372B (en) False touch grounding identification processing method and circuit and mobile terminal
CN108845261B (en) Electric quantity prompting method and terminal equipment
CN108234745B (en) Signal receiving method, mobile terminal and computer readable storage medium

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