[go: up one dir, main page]

CN107976167B - USB interface plug-in detection method, interface and terminal equipment - Google Patents

USB interface plug-in detection method, interface and terminal equipment Download PDF

Info

Publication number
CN107976167B
CN107976167B CN201711484089.3A CN201711484089A CN107976167B CN 107976167 B CN107976167 B CN 107976167B CN 201711484089 A CN201711484089 A CN 201711484089A CN 107976167 B CN107976167 B CN 107976167B
Authority
CN
China
Prior art keywords
usb
distance
plug
measuring sensor
slot
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
CN201711484089.3A
Other languages
Chinese (zh)
Other versions
CN107976167A (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.)
Shanghai Chuanying Information Technology Co Ltd
Original Assignee
Shanghai Chuanying Information 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 Shanghai Chuanying Information Technology Co Ltd filed Critical Shanghai Chuanying Information Technology Co Ltd
Priority to CN201711484089.3A priority Critical patent/CN107976167B/en
Publication of CN107976167A publication Critical patent/CN107976167A/en
Application granted granted Critical
Publication of CN107976167B publication Critical patent/CN107976167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B21/00Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant
    • G01B21/16Measuring arrangements or details thereof, where the measuring technique is not covered by the other groups of this subclass, unspecified or not relevant for measuring distance of clearance between spaced objects
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R24/00Two-part coupling devices, or either of their cooperating parts, characterised by their overall structure
    • H01R24/20Coupling parts carrying sockets, clips or analogous contacts and secured only to wire or cable

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)
  • Details Of Connecting Devices For Male And Female Coupling (AREA)

Abstract

The invention provides a USB interface plugging detection method, an interface and terminal equipment. The method comprises the following steps: the terminal equipment acquires the distance data measured by the distance measuring sensor, the measuring width range of the distance measuring sensor is at least larger than the length of the short side of the USB slot, and the distance data comprises: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug; the terminal equipment judges whether the number of the distance values in the distance data is the same as the number of preset distance values or not; and if the judgment result is negative, the terminal equipment reminds the user that the USB interface plugging mode is incorrect. The invention can remind the user in time when the USB plug is reversely plugged so as to adjust the direction of the USB plug to be correctly plugged, thereby protecting the tail plug and the plug and effectively prolonging the service life of the tail plug and the plug.

Description

USB interface plug-in detection method, interface and terminal equipment
Technical Field
The invention relates to the technical field of electronic products, in particular to a USB interface plugging detection method, an interface and terminal equipment.
Background
With the rapid development of electronic technology, mobile terminal devices have become indispensable common tools in people's daily life, work and entertainment, and people now use terminal devices more and more frequently and power consumption speed thereof is faster and faster, so that a charger is often connected for charging operation.
In the market of mobile terminals today, USB interfaces are commonly used for data transmission and charging of mobile terminals, and generally, the sizes of the upper end and the lower end of a USB interface tail plug are different (the shape is similar to a trapezoid), so that the front side and the back side need to be distinguished when the interfaces are plugged. Although a high-speed multifunctional interface similar to an apple and a latest Micro-USB 2.0C-type interface of android do not need to be switched between positive and negative when being plugged, most mobile terminals use the Micro-USB 2.0B-type interface for charging as long as apple equipment is expensive in price and the popularization rate of the C-type interface is low.
To sum up, the B-type interface of Micro-USB2.0 is still the interface that charges that android mobile terminal mainly used at present, but the port of this kind of tail plug is very little, and many old people often can discover the phenomenon of misplug because eyesight is not good to because the slot opening position die sinking of most of mobile terminal shells department is great, so the anti-inserting of plug also inserts very easily, if this in the past, can cause the tail to insert and the life greatly reduced of plug.
Disclosure of Invention
The invention provides a USB interface plugging detection method, an interface and terminal equipment, and aims to solve the problems of slot damage caused by reverse plugging of a USB plug and reduction of service life of a tail plug and the plug.
In a first aspect, the invention provides a method for detecting plugging of a USB interface, which is applied to a terminal device, wherein a USB tail plug is arranged on a main board of the terminal device, an opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug, and a side of the USB tail plug connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other; a USB slot is arranged on the terminal equipment shell, the tail plug is inserted into the USB slot, and a distance measuring sensor is arranged on the long side and/or the short side of the USB slot close to the opening of the USB slot; the detection method comprises the following steps:
the terminal equipment acquires the distance data measured by the distance measuring sensor, the measuring width range of the distance measuring sensor is at least larger than the length of the short side of the USB slot, and the distance data comprises: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug;
the terminal equipment judges whether the number of the distance values in the distance data is the same as the number of preset distance values or not;
and if the judgment result is negative, the terminal equipment reminds the user that the USB interface plugging mode is incorrect.
In a possible design, when the distance measuring sensor is arranged on the long side of the slot, close to the opening of the USB slot, the number of the preset distance values is one, wherein when the USB interface is inserted correctly, the distance data includes the distance value from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises the distance from the distance measuring sensor to the short side of the USB plug and the distance value from the distance measuring sensor to the long side of the USB plug.
In a possible design, when the USB slot is close to the short side of the slot of the USB slot opening, the number of the preset distance values is two, wherein when the USB interface is plugged correctly, the distance data includes the distance from the ranging sensor to the short side of the USB plug and the distance from the ranging sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises a distance value from the distance measuring sensor to the long edge of the USB plug.
In a possible design, the method for reminding a user of an incorrect plugging mode of the USB interface by the terminal device includes:
the terminal equipment indicates the vibration motor to work, and the vibration motor reminds a user of incorrect plugging mode of the USB interface through vibration.
In a second aspect, the present invention provides a terminal device, including:
an obtaining module, configured to obtain distance data measured by the distance measuring sensor, where a measurement width range of the distance measuring sensor is at least greater than a length of a short side of the USB slot, and the distance data includes: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug;
the judging module is used for judging whether the number of the distance values in the distance data is the same as the number of preset distance values or not;
and the reminding module is used for reminding the user that the USB interface plugging mode is incorrect when the number of the distance values in the distance data is different from the number of the preset distance values.
In a possible design, when the distance measuring sensor is arranged on the long side of the slot, close to the opening of the USB slot, the number of the preset distance values is one, wherein when the USB interface is inserted correctly, the distance data includes the distance value from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises the distance from the distance measuring sensor to the short side of the USB plug and the distance value from the distance measuring sensor to the long side of the USB plug.
In a possible design, when the USB slot is close to the short side of the slot of the USB slot opening, the number of the preset distance values is two, wherein when the USB interface is plugged correctly, the distance data includes the distance from the ranging sensor to the short side of the USB plug and the distance from the ranging sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises a distance value from the distance measuring sensor to the long edge of the USB plug.
In one possible design, the reminder module is specifically configured to:
and indicating the work of the vibration motor, and reminding a user of the incorrect plugging mode of the USB interface by the vibration motor through vibration.
In a third aspect, the present invention provides a USB interface, which is applied to a terminal device, and includes a USB tail plug disposed on a main board of the terminal device, wherein an opening of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug, and a side of the USB tail plug connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other; the terminal equipment shell is provided with a USB slot, the tail plug is inserted into the USB slot, and the distance measuring sensor is arranged on the long side and/or the short side of the USB slot close to the opening of the USB slot.
In a fourth aspect, the invention provides a terminal device comprising a USB interface as described in the third aspect.
The invention provides a USB interface plug-in detection method, which is characterized in that a distance between a distance measuring sensor and a USB plug is obtained by utilizing the distance measuring sensor arranged on one side of a USB slot, and the number of distance values in distance data obtained by the distance measuring sensor is different between a correct plug-in state and a reverse plug-in state due to the shape characteristic that the length of a long side of the USB plug is longer than the length of a short side of the USB plug, and then the number of the currently obtained distance values is compared with the number of preset distance values, if the number of the currently obtained distance values is different from the number of the preset distance values, terminal equipment can remind a user that the current USB interface plug-in mode is incorrect. After the user acquires the prompt signal, the direction of the USB plug can be adjusted in time to be correctly inserted, so that the tail plug and the plug are protected, and the service life of the tail plug and the plug can be effectively prolonged.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a flow chart illustrating a method for detecting plugging of a USB interface according to an embodiment of the present invention;
FIG. 2 is a schematic structural diagram of the method of FIG. 1 with a USB plug inserted;
FIG. 3 is a schematic structural diagram of the method of FIG. 1 in a reverse-plugged state of the USB plug;
FIG. 4 is a flow chart illustrating a method for detecting plugging of a USB interface according to another embodiment of the present invention;
FIG. 5 is a schematic structural diagram of the method of FIG. 4 in a state where the USB plug is plugged;
FIG. 6 is a schematic structural diagram of the method of FIG. 4 in a reverse-plugged state of the USB plug;
fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Description of the drawings:
1: a USB slot;
11: the short side of the USB slot;
12: the long side of the USB slot;
2: a USB plug;
21: a short side of the USB plug;
22: a long side of the USB plug;
3: and a distance measuring sensor.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, 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, but 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.
Fig. 1 is a flowchart illustrating a method for detecting USB interface plugging according to an embodiment of the present invention, and fig. 2 is a schematic structural diagram of the method illustrated in fig. 1 when a USB plug is plugged. As shown in fig. 1-2, the USB interface plugging detection method provided in this embodiment is applied to a terminal device, and a USB tail plug is disposed on a main board of the terminal device, wherein an opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug, and a side of the USB tail plug for connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other. In addition, be provided with the USB slot on the lateral wall of terminal equipment's shell, and USB tail plug 1 pegs graft in the USB slot, and USB slot 1 is close to and is provided with range sensor 3 on the long limit 12 of USB slot 1 open-ended USB slot, and this range sensor 3 can be the piece formula, also can be multipoint type, does not carry out specific injecing to this range sensor's kind and the mode that arranges in this embodiment, only needs to guarantee that this range sensor's measurement width scope is greater than the length of USB slot minor face can. The terminal device involved in this embodiment may be an electronic device such as a smart phone, a tablet computer, and an electronic book reader with a USB interface. With reference to fig. 1, the method for detecting the USB interface plugging provided in this embodiment includes:
step 101, the terminal device obtains distance data measured by the distance measuring sensor.
Specifically, referring to fig. 2, when the user inserts the USB plug 2 into the USB slot 1 on the terminal device case, one side of the USB plug 2 must enter the range of the range sensor 3. With continued reference to fig. 2, the distance measuring sensor 3 shown in fig. 2 is disposed on the long side 11 of the USB slot 1 close to the opening of the USB slot 1, and when the USB plug 2 is correctly inserted into the USB tail 1, the distance measuring sensor 3 will measure the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2. Because the length of the long side 22 of the USB plug is longer than the length of the short side 21 of the USB plug, after the USB plug 2 is correctly inserted into the USB slot 1, the long side 22 of the USB plug can shield the short side 21 of the USB plug, so that the distance sensor 3 can only measure the distance from the distance sensor 3 to the long side 22 of the USB plug on the USB plug 2, and the distance from the distance sensor 3 to the short side 21 of the USB plug on the USB plug 2 cannot be obtained. In the case that the USB plug 2 is correctly inserted into the USB slot 1, the terminal device obtains the distance data measured by the distance measuring sensor 3 only by the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2.
Fig. 3 is a schematic structural diagram of the USB plug in the reverse plug state in the method shown in fig. 1. As shown in fig. 3, when the USB plug 2 is inserted into the USB tail 1, the distance sensor 3 measures the distance between the distance sensor 3 and the long side 22 of the USB plug 2 and the distance between the distance sensor 3 and the short side 21 of the USB plug 2. Because the length of the short side 21 of the USB plug is shorter than the length of the long side 22 of the USB plug, after the USB plug 2 is inserted into the USB slot 1, the short side 21 of the USB plug does not shield the long side 22 of the USB plug, so that the distance measuring sensor 3 can not only obtain the distance from the distance measuring sensor 3 to the short side 21 of the USB plug on the USB plug 2, but also obtain the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2. Therefore, in the case where the USB plug 2 is inserted into the USB slot 1, the distance data measured by the distance measuring sensor 3 obtained by the terminal device includes both the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2.
And 102, the terminal equipment judges whether the number of the distance values in the distance data is the same as the number of the preset distance values, and if the judgment result is negative, the step 103 is executed.
Specifically, when the distance measuring sensor 3 is provided on the slot long side 11 of the USB slot 1 near the opening of the USB slot 1, the number of the preset distance values in the distance data in the terminal device is one. It can be seen that, under the condition that the USB plug 2 is correctly inserted into the USB slot 1, the distance data measured by the distance measuring sensor 3 obtained by the terminal device is only the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2, and the distance value in the distance data at this time is only one and is consistent with the number of the preset distance values in the distance data in the terminal device; on the other hand, when the USB plug 2 is inserted into the USB slot 1 in the opposite direction, the terminal device obtains the distance data measured by the distance measuring sensor 3, and the distance data includes the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2, and the distance data at this time includes two distance values.
Therefore, the terminal device can determine whether the current state in which the USB plug 2 is inserted into the USB slot 1 is the forward insertion state or the reverse insertion state by determining whether the number of distance values in the distance data is the same as the number of preset distance values.
And 103, the terminal equipment reminds the user that the USB interface plugging mode is incorrect.
Specifically, when the distance measuring sensor 3 is disposed on the long side 11 of the slot of the USB slot 1 close to the opening of the USB slot 1, if the distance data measured by the distance measuring sensor 3 obtained by the terminal device contains the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug on the USB plug 2, at this time, the USB plug 2 is in the reverse insertion state, and the terminal device reminds the user that the USB interface insertion mode is incorrect.
In this embodiment, the distance from the ranging sensor to the USB plug is obtained by using the ranging sensor arranged on one side of the USB slot, and because the length of the long side of the USB plug is longer than the shape characteristic of the length of the short side of the USB plug, the distance data obtained by the ranging sensor is different between the correct insertion state and the reverse insertion state of the USB plug, and then the number of the currently obtained distance values is compared with the number of the preset distance values, if the number of the currently obtained distance values is different from the number of the preset distance values, the terminal device will remind the user that the current USB interface insertion mode is incorrect. After the user acquires the prompt signal, the direction of the USB plug can be adjusted in time to be correctly inserted, so that the tail plug and the plug are protected, and the service life of the tail plug and the plug can be effectively prolonged.
Fig. 4 is a flowchart illustrating a method for detecting USB interface plugging according to another embodiment of the present invention, and fig. 5 is a schematic structural diagram illustrating a USB plug in the method illustrated in fig. 4 in a state of being plugged. As shown in fig. 4 to fig. 5, the USB interface plugging detection method provided in this embodiment is applied to a terminal device, and a USB tail plug is disposed on a main board of the terminal device, wherein an opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug, and a side of the USB tail plug for connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other. In addition, be provided with the USB slot on the lateral wall of terminal equipment's shell, and the USB tail is inserted and is pegged graft in USB slot 1, and USB slot 1 is close to USB slot 1 open-ended USB slot long limit and is provided with range sensor 3, and this range sensor 3 can be the piece formula, also can be multipoint type, does not carry out concrete injecing to this range sensor's kind and the mode of arranging thereof in this embodiment, only need to guarantee that this range sensor's measurement width scope is greater than the length of USB slot minor face can. The terminal device involved in this embodiment may be an electronic device such as a smart phone, a tablet computer, and an electronic book reader with a USB interface. With reference to fig. 1, the method for detecting the USB interface plugging provided in this embodiment includes:
step 201, the terminal device obtains distance data measured by the distance measuring sensor.
Specifically, referring to fig. 4, when the user inserts the USB plug 2 into the USB slot 1 on the terminal device case, one side of the USB plug 2 must enter the range of the range sensor 3. With continued reference to fig. 4, the distance measuring sensor 3 shown in fig. 4 is disposed on the short side 11 of the USB slot 1 close to the opening of the USB slot 1, and when the USB plug 2 is correctly inserted into the USB tail 1, the distance measuring sensor 3 will measure the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2. Because the length of the long side 22 of the USB plug is longer than the length of the short side 21 of the USB plug, after the USB plug 2 is correctly inserted into the USB slot 1, the short side 21 of the USB plug cannot block the long side 22 of the USB plug, so that the distance sensor 3 can measure the distance from the distance sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance sensor 3 to the short side 21 of the USB plug 2. Therefore, in the case where the USB plug 2 is correctly inserted into the USB slot 1, the terminal device acquires the distance data measured by the distance measuring sensor 3 and includes the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2.
Fig. 6 is a schematic structural diagram of the USB plug in the reverse plug state in the method shown in fig. 4. As shown in fig. 6, when the USB plug 2 is inserted into the USB tail 1, the length of the long side 22 of the USB plug is longer than the length of the short side 21 of the USB plug, so that after the USB plug 2 is inserted into the USB slot 1, the short side 21 of the USB plug is shielded by the long side 22 of the USB plug, and the distance measuring sensor 3 can only measure the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2, and cannot obtain the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2. In the case that the USB plug 2 is reversely inserted into the USB slot 1, the terminal device obtains the distance data measured by the distance measuring sensor 3 only by the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2.
Step 202, the terminal device determines whether the number of distance values in the distance data is the same as the number of preset distance values, and if the determination result is no, step 203 is executed.
Specifically, when the distance measuring sensor 3 is provided on the slot long side 11 of the USB slot 1 near the opening of the USB slot 1, the number of the preset distance values in the distance data in the terminal device is one. It can be seen that, under the condition that the USB plug 2 is correctly inserted into the USB slot 1, the distance data measured by the distance measuring sensor 3 obtained by the terminal device is only the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2, and the distance value in the distance data at this time is only one and is consistent with the number of the preset distance values in the distance data in the terminal device; on the other hand, when the USB plug 2 is inserted into the USB slot 1 in the opposite direction, the terminal device obtains the distance data measured by the distance measuring sensor 3, and the distance data includes the distance from the distance measuring sensor 3 to the long side 22 of the USB plug 2 and the distance from the distance measuring sensor 3 to the short side 21 of the USB plug 2, and the distance data at this time includes two distance values.
Therefore, the terminal device can determine whether the current state in which the USB plug 2 is inserted into the USB slot 1 is the forward insertion state or the reverse insertion state by determining whether the number of distance values in the distance data is the same as the number of preset distance values.
And step 203, the terminal equipment indicates the vibration motor to work.
Specifically, when the distance measuring sensor 3 is arranged on the short slot side 12 of the USB slot 1 close to the opening of the USB slot 1, if the distance data measured by the distance measuring sensor 3 obtained by the terminal device only contains the distance from the distance measuring sensor 3 to the long side 22 of the USB plug on the USB plug 2, at this time, the USB plug 2 is in the reverse insertion state, the terminal device indicates the vibration motor in the terminal device to work, and the vibration of the vibration motor reminds the user that the current USB interface insertion mode is incorrect. In addition, optionally, the user can be reminded by flashing the indicator light. It should be noted that, in this embodiment, the user prompting manner is not specifically limited, and only when the USB interface is incorrectly plugged, the terminal device can effectively prompt the user.
Fig. 7 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. As shown in fig. 7, the terminal device provided in this embodiment includes:
an obtaining module 301, configured to obtain distance data measured by the distance measuring sensor, where a measurement width range of the distance measuring sensor is at least greater than a length of a short side of the USB slot, and the distance data includes: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug;
a determining module 302, configured to determine whether the number of the distance values in the distance data is the same as a preset number of distance values;
and the reminding module 303 is configured to remind the user that the USB interface plugging mode is incorrect by the terminal device when the number of the distance values in the distance data is different from the number of the preset distance values.
In a possible design, when the distance measuring sensor is arranged on the long side of the slot, close to the opening of the USB slot, the number of the preset distance values is one, wherein when the USB interface is inserted correctly, the distance data includes the distance value from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises the distance from the distance measuring sensor to the short side of the USB plug and the distance value from the distance measuring sensor to the long side of the USB plug.
In a possible design, when the USB slot is close to the short side of the slot of the USB slot opening, the number of the preset distance values is two, wherein when the USB interface is plugged correctly, the distance data includes the distance from the ranging sensor to the short side of the USB plug and the distance from the ranging sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises a distance value from the distance measuring sensor to the long edge of the USB plug.
In a possible design, the reminding module 303 is specifically configured to:
and indicating the work of the vibration motor, and reminding a user of the incorrect plugging mode of the USB interface by the vibration motor through vibration.
It should be noted that the terminal device provided in the embodiment shown in fig. 7 may be used to execute the USB interface plugging detection methods provided in the embodiments shown in fig. 1 and fig. 4, and specific implementation manners and technical effects are similar and are not described herein again.
The invention provides a USB interface, which is applied to terminal equipment and comprises a USB tail plug arranged on a main board of the terminal equipment, wherein the opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug and a side edge of the USB tail plug connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other; the terminal equipment shell is provided with a USB slot, the tail plug is inserted into the USB slot, and the distance measuring sensor is arranged on the long side and/or the short side of the USB slot close to the opening of the USB slot.
In addition, the invention also provides a terminal device, which includes the USB interface according to the third aspect.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "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 specifically defined otherwise.
In the description of the present invention, it is to be understood that the terms "center", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "axial", "circumferential", and the like, indicate orientations and positional relationships based on those shown in the drawings, and are used merely for convenience of description and for simplicity of description, and do not indicate or imply that the device or element being referred to must have a particular orientation, be constructed and operated in a particular orientation, and thus, should not be considered as limiting the present invention. Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art. Unless expressly stated or limited otherwise, the first feature "on" or "under" the second feature may include the first and second features being in direct contact, or may include the first and second features not being in direct contact but being in contact with each other through another feature therebetween. Also, the first feature being "on," "above" and "over" the second feature includes the first feature being directly on and obliquely above the second feature, or merely indicating that the first feature is at a higher level than the second feature. A first feature being "under," "below," and "beneath" a second feature includes the first feature being directly under and obliquely below the second feature, or simply meaning that the first feature is at a lesser elevation than the second feature.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (10)

1. A USB interface plug-in detection method is characterized in that the method is applied to terminal equipment, a USB tail plug is arranged on a main board of the terminal equipment, the opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug and a side edge of the USB tail plug connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other; a USB slot is arranged on the terminal equipment shell, the USB tail plug is inserted into the USB slot, and a distance measuring sensor is arranged on the long side and/or the short side of the USB slot close to the opening of the USB slot; the detection method comprises the following steps:
the terminal equipment acquires the distance data measured by the distance measuring sensor, the measuring width range of the distance measuring sensor is at least larger than the length of the short side of the USB slot, and the distance data comprises: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug;
the terminal equipment judges whether the number of the distance values in the distance data is the same as the number of preset distance values or not;
and if the judgment result is negative, the terminal equipment reminds the user that the USB interface plugging mode is incorrect.
2. The detecting method according to claim 1, wherein when the distance measuring sensor is disposed on the USB slot near the USB slot long side of the USB slot opening, the number of the preset distance values is one, and when the USB interface is plugged correctly, the distance data includes the distance value from the distance measuring sensor to the USB plug long side; when the USB interface is incorrect in plugging mode, the distance data comprises the distance from the distance measuring sensor to the short side of the USB plug and the distance value from the distance measuring sensor to the long side of the USB plug.
3. The detecting method according to claim 1, wherein when the distance measuring sensor is disposed on the short side of the USB slot close to the opening of the USB slot, the number of the preset distance values is two, wherein when the USB interface is plugged correctly, the distance data includes a distance from the distance measuring sensor to the short side of the USB plug and a distance from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises a distance value from the distance measuring sensor to the long edge of the USB plug.
4. The detection method according to claim 1, wherein the terminal device reminds a user that the USB interface is incorrectly plugged, comprising:
the terminal equipment indicates the vibration motor to work, and the vibration motor reminds a user of incorrect plugging mode of the USB interface through vibration.
5. A terminal device, comprising:
the acquisition module is used for acquiring distance data measured by the distance measuring sensor, the measuring width range of the distance measuring sensor is at least greater than the length of the short side of the USB slot, and the distance data comprises: at least one distance value of the distance from the distance measuring sensor to the short side of the USB plug and the distance from the distance measuring sensor to the long side of the USB plug, wherein the USB plug is matched with the USB tail plug;
the judging module is used for judging whether the number of the distance values in the distance data is the same as the number of preset distance values or not;
and the reminding module is used for reminding the user that the USB interface plugging mode is incorrect when the number of the distance values in the distance data is different from the number of the preset distance values.
6. The terminal device according to claim 5, wherein when the distance measuring sensor is disposed on the long side of the slot, close to the opening of the USB slot, the number of the preset distance values is one, and when the USB interface is plugged correctly, the distance data includes the distance value from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises the distance from the distance measuring sensor to the short side of the USB plug and the distance value from the distance measuring sensor to the long side of the USB plug.
7. The terminal device according to claim 5, wherein when the USB slot is close to the short side of the slot opening of the USB slot, the number of the preset distance values is two, and when the USB interface is plugged correctly, the distance data includes a distance from the distance measuring sensor to the short side of the USB plug and a distance from the distance measuring sensor to the long side of the USB plug; when the USB interface is incorrect in plugging mode, the distance data comprises a distance value from the distance measuring sensor to the long edge of the USB plug.
8. The terminal device of claim 5, wherein the reminding module is specifically configured to:
and indicating the vibration motor to work, wherein the vibration motor reminds a user of incorrect plugging mode of the USB interface through vibration.
9. A USB interface is characterized by being applied to terminal equipment and comprising a USB tail plug arranged on a main board of the terminal equipment, wherein the opening shape of the USB tail plug is a closed shape formed by a short side of the USB tail plug, a long side of the USB tail plug and a side edge of the USB tail plug connecting the short side of the USB tail plug and the long side of the USB tail plug, and the short side of the USB tail plug and the long side of the USB tail plug are parallel to each other; a USB slot is arranged on the terminal equipment shell, the USB tail plug is inserted into the USB slot, and a distance measuring sensor is arranged on the long side and/or the short side of the USB slot close to the opening of the USB slot;
the range finding sensor is used for measuring distance data, the measuring width range of the range finding sensor is at least greater than the length of the short side of the USB slot, and the distance data comprises: at least one distance value in the distance of range finding sensor to USB plug minor face and the distance of range finding sensor to the long limit of USB plug, wherein, the USB plug with the adaptation is inserted to the USB tail.
10. A terminal device, characterized in that it comprises a USB interface according to claim 9.
CN201711484089.3A 2017-12-29 2017-12-29 USB interface plug-in detection method, interface and terminal equipment Active CN107976167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711484089.3A CN107976167B (en) 2017-12-29 2017-12-29 USB interface plug-in detection method, interface and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711484089.3A CN107976167B (en) 2017-12-29 2017-12-29 USB interface plug-in detection method, interface and terminal equipment

Publications (2)

Publication Number Publication Date
CN107976167A CN107976167A (en) 2018-05-01
CN107976167B true CN107976167B (en) 2020-03-13

Family

ID=62005339

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711484089.3A Active CN107976167B (en) 2017-12-29 2017-12-29 USB interface plug-in detection method, interface and terminal equipment

Country Status (1)

Country Link
CN (1) CN107976167B (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1122454A (en) * 1994-03-25 1996-05-15 欧姆龙株式会社 Optical sensor device
CN103098108A (en) * 2010-11-25 2013-05-08 松下电器产业株式会社 Communication device
CN204304124U (en) * 2014-11-20 2015-04-29 杨登宇 A kind of intelligent electric-shock protection socket
CN204333399U (en) * 2014-12-19 2015-05-13 刘红梅 Reversible power plug connector
CN105354904A (en) * 2015-11-20 2016-02-24 北京天诚盛业科技有限公司 Biological recognition entrance guard device, and working method thereof
CN205219269U (en) * 2015-12-03 2016-05-11 卓达新材料科技集团有限公司 Rim charge detection device of roller flat line panel
WO2016126786A1 (en) * 2015-02-03 2016-08-11 The Regents Of The University Of Michigan Last-mile navigation using smartphones
CN205805179U (en) * 2016-06-02 2016-12-14 杭州路宏电力科技有限公司 Safety door latch

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100351041C (en) * 2004-11-30 2007-11-28 比亚迪股份有限公司 Support device for processing complicated shape punched piece and its producing method

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1122454A (en) * 1994-03-25 1996-05-15 欧姆龙株式会社 Optical sensor device
CN103098108A (en) * 2010-11-25 2013-05-08 松下电器产业株式会社 Communication device
CN204304124U (en) * 2014-11-20 2015-04-29 杨登宇 A kind of intelligent electric-shock protection socket
CN204333399U (en) * 2014-12-19 2015-05-13 刘红梅 Reversible power plug connector
WO2016126786A1 (en) * 2015-02-03 2016-08-11 The Regents Of The University Of Michigan Last-mile navigation using smartphones
CN105354904A (en) * 2015-11-20 2016-02-24 北京天诚盛业科技有限公司 Biological recognition entrance guard device, and working method thereof
CN205219269U (en) * 2015-12-03 2016-05-11 卓达新材料科技集团有限公司 Rim charge detection device of roller flat line panel
CN205805179U (en) * 2016-06-02 2016-12-14 杭州路宏电力科技有限公司 Safety door latch

Also Published As

Publication number Publication date
CN107976167A (en) 2018-05-01

Similar Documents

Publication Publication Date Title
US20210345031A1 (en) Charging Case for Earbuds and Interchangeable, Rechargeable Batteries
US9627899B2 (en) Mobile terminal and interface method thereof
US20130335010A1 (en) Connector and control chip
CN104242365B (en) Portable electronic device and application method
CN109378877A (en) Charging circuit, charging method, electronic equipment and storage medium
CN107681727A (en) The control method and device of electronic equipment
CN107976167B (en) USB interface plug-in detection method, interface and terminal equipment
US20040161976A1 (en) Memory card socket with drawer-type cartridge seat
CN105429217B (en) A kind of method for identifying the system of charger and its identifying charger
CN106026232A (en) Detecting method and apparatus for USB port type
CN106961044B (en) Mobile terminal and the method for anti-OTG false triggering
CN211317538U (en) Portable temperature measuring instrument
EP2829888A1 (en) Apparatus and method for identifying batteries of different thicknesses, and electronic device
US9246271B2 (en) Connector mechanism with a guide pin structure, connector mechanism with a guide hole structure and related electronic device assembly
KR20120140558A (en) Gender for mobile communication terminal
CN206559341U (en) A kind of Kato component and electronic equipment
CN213403088U (en) Mobile communication terminal with detachable binocular 3D camera module
CN204481190U (en) A new type of SIM card socket connector
CN206673656U (en) Mobile charging device and electronic system
CN201946780U (en) A RJ45 socket
CN207518000U (en) A kind of MicroUSB data lines
CN203967391U (en) Electronic card coupler
CN206850482U (en) A kind of device with identification electronic equipment standard configuration charger
CN107402234B (en) Method for detecting impurities in card holder with SIM card installed in terminal and terminal
CN111405100A (en) Intelligent alarm mobile phone shell

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