CN107145456B - Method, device and system for identifying self-connection of equipment - Google Patents

Method, device and system for identifying self-connection of equipment Download PDF

Info

Publication number
CN107145456B
CN107145456B CN201710229868.2A CN201710229868A CN107145456B CN 107145456 B CN107145456 B CN 107145456B CN 201710229868 A CN201710229868 A CN 201710229868A CN 107145456 B CN107145456 B CN 107145456B
Authority
CN
China
Prior art keywords
identification code
equipment
interface
external
target
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
CN201710229868.2A
Other languages
Chinese (zh)
Other versions
CN107145456A (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.)
Analogix China Semiconductor Inc
Analogix International LLC
Original Assignee
Analogix China Semiconductor Inc
Analogix International LLC
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 Analogix China Semiconductor Inc, Analogix International LLC filed Critical Analogix China Semiconductor Inc
Priority to CN201710229868.2A priority Critical patent/CN107145456B/en
Publication of CN107145456A publication Critical patent/CN107145456A/en
Application granted granted Critical
Publication of CN107145456B publication Critical patent/CN107145456B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/42Bus transfer protocol, e.g. handshake; Synchronisation
    • G06F13/4282Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus

Abstract

The invention discloses a method, a device and a system for identifying self-connection of equipment. Wherein, the method comprises the following steps: the target equipment detects that the interface is connected with the external equipment, and generates a first identification code; requesting a second identification code from the external equipment, wherein the second identification code is an identification code generated when the external equipment detects that the external equipment is connected with the interface; comparing the first identification code with the second identification code under the condition of requesting to obtain the second identification code; and determining whether the target equipment and the external equipment are the same equipment or not according to the comparison result. The invention solves the technical problem that in the prior art, when a plurality of Type-C interfaces of the same equipment are connected, the equipment cannot be identified, so that the equipment is self-charged and even damaged.

Description

Method, device and system for identifying self-connection of equipment
Technical Field
The invention relates to the field of equipment identification, in particular to a method, a device and a system for identifying equipment self-connection.
Background
With the popularization of the Type-C standard, more and more electronic devices are currently supporting the Type-C interface, and devices supporting two or more Type-C interfaces are also more and more common, for example: macbook for apple and Chromebook for Google, etc. Although Type-C brings convenience to users (e.g., support for forward and reverse insertion, fast charging, etc.), there are some problems and even safety hazards.
As shown in FIG. 1, one notebook supports two Type-C interface outputs (Type-C interface 1 and Type-C interface 2). During normal application, each interface can be connected with a peripheral and supplies power to the peripheral, or is connected with a charger to charge the notebook. However, when the two interfaces are connected by a Type-C cable loop, because the two Type-C interfaces both support USB PD (Power Delivery), after the Type-C interface 1 is connected with the Type-C interface 2 through the cable, the two interfaces both detect the action of cable insertion, and then carry out negotiation of the USB PD; since both interfaces do not know that the other interface belongs to the same notebook computer, the result of the negotiation may be that interface 1 agrees to charge interface 2, or interface 2 agrees to charge interface 1, so that the prompt is seen from the notebook computer, and one Type-C interface among them is charging the other Type-C interface. That is to say, the notebook charges another Type-C interface through a Type-C interface, which can lead to the damage of the Type-C interface or the notebook computer.
To among the prior art, when a plurality of Type-C interfaces of same equipment link to each other, the unable discernment of equipment leads to the problem that equipment is from charging or even damages, has not proposed effectual solution at present.
Disclosure of Invention
The embodiment of the invention provides a method, a device and a system for identifying self-connection of equipment, which are used for at least solving the technical problem that the equipment cannot be identified to cause self-charging and even damage when a plurality of Type-C interfaces of the same equipment are connected in the prior art.
According to an aspect of an embodiment of the present invention, there is provided a method for identifying a device self-connection, including: the target equipment detects that the interface is connected with the external equipment, and generates a first identification code; requesting a second identification code from the external equipment, wherein the second identification code is an identification code generated when the external equipment detects that the external equipment is connected with the interface; comparing the first identification code with the second identification code under the condition of requesting to obtain the second identification code; and determining whether the target equipment and the external equipment are the same equipment or not according to the comparison result.
According to another aspect of the embodiments of the present invention, there is also provided a system for identifying a device self-connection, including: an interface; the first controller is communicated with the interface and the second controller and is used for generating a first identification code when the second controller detects that the interface is connected with the external equipment; and the second controller is communicated with the interface and used for receiving the first identification code generated by the first controller when the interface is detected to be connected with the external equipment, requesting the external equipment for the second identification code, comparing the first identification code with the second identification code under the condition that the second identification code is obtained through the request, and determining whether the target equipment to which the interface belongs and the external equipment are the same equipment or not according to the comparison result, wherein the second identification code is the identification code generated when the external equipment detects to be connected with the interface.
According to another aspect of the embodiments of the present invention, there is also provided an apparatus for identifying a device self-connection, including: the generation module is used for generating a first identification code when the target equipment detects that the interface is connected with the external equipment; the request module is used for requesting a second identification code to the external equipment, wherein the second identification code is the identification code generated when the external equipment detects that the external equipment is connected with the interface; the comparison module is used for comparing the first identification code with the second identification code under the condition of requesting to obtain the second identification code; and the determining module is used for determining whether the target equipment and the external equipment are the same equipment or not according to the comparison result.
According to another aspect of the embodiments of the present invention, there is also provided a storage medium, where the storage medium includes a stored program, and when the program runs, the apparatus on which the storage medium is located is controlled to execute the self-connection identification method of the apparatus.
According to another aspect of the embodiments of the present invention, there is also provided a processor, configured to execute a program, where the program executes the self-connection identification method of the above apparatus.
In the embodiment of the invention, the target device detects that the interface is connected with the external device, generates the first identification code, requests the external device for the second identification code, wherein the second identification code is the identification code generated when the external device detects that the interface is connected with the external device, compares the first identification code with the second identification code under the condition that the second identification code is obtained, and determines whether the target device and the external device are the same device according to the comparison result. When the target equipment and the external equipment are the same equipment, the random numbers received by the USB PD controllers corresponding to the two interfaces are the same as the random numbers received by the external equipment detected by the target equipment and the interfaces are the same equipment; when the target equipment and the external equipment are not the same equipment and the external equipment also has the function of generating random numbers when detecting that the interface is connected with other equipment, the first identification code is different from the second identification code; when the target device and the external device are not the same device and the external device does not have the function of generating the random number when detecting that the interface is connected with other devices, the target device cannot request the identification code, so that whether the target device and the external device are the same device can be determined by requesting the random number obtained by the USB PD controller to be the received random number generated by the embedded processor. Further, as long as any one of two connected devices has the function of implementing the steps, the self-connection identification of the device can be achieved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
FIG. 1 is a schematic diagram of two Type-C interfaces of one and the same device according to the prior art;
FIG. 2 is a flow diagram of a method of identifying device self-connection according to an embodiment of the invention;
fig. 3 is a schematic diagram of a self-connection structure of a device when a target device and an external device are the same device according to an embodiment of the present invention;
FIG. 4 is a flow diagram of an alternative method of identifying device self-connection in accordance with an embodiment of the present invention;
FIG. 5 is a schematic diagram of an alternative system for identifying device self-connection according to an embodiment of the present application; and
FIG. 6 is a schematic diagram of an alternative system for identifying device self-connection according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions of the present invention better understood, 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 only a part of the embodiments of the present invention, and not all of the embodiments. 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.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Terms appearing in the following examples are explained below:
Type-C: the Type-C is a connection interface of the USB interface, partial front and back sides can be inserted into the USB interface, the size is about 8.3mm by 2.5mm, and the USB interface supports the functions of charging, data transmission, display output and the like of the USB standard like other interfaces.
USB PD: USB Power Delivery Power transfer protocol.
Example 1
In accordance with an embodiment of the present invention, there is provided an embodiment of a method for identifying self-connection of a device, it being noted that the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer-executable instructions and that, although a logical order is illustrated in the flowchart, in some cases the steps illustrated or described may be performed in an order different than that described herein.
Fig. 2 is a flowchart of a method for identifying a device self-connection according to an embodiment of the present invention, as shown in fig. 2, the method including the steps of:
step S21, the target device detects that the interface is connected to the external device, and generates a first identification code.
Specifically, the first identification code may be a random number, and the interface may be a Type-C interface. In the above steps, the target device generates the first identification code after detecting that the interface is connected to the external device.
In an alternative embodiment, the target device includes an embedded processor that communicates with the USB PD controller via an I2C (Inter-Integrated Circuit, two-wire Serial) line, a Type-C interface, and a USB PD controller that controls the Type-C interface; the USB PD controller communicates with an externally connected Type-C interface through a CC bus. When the USB PD controller detects that the corresponding Type-C interface is connected with the external equipment, the embedded processor is informed, generates a first random number and transmits the first random number to the USB PD controller.
Step S23, requesting a second identification code from the external device, where the second identification code is an identification code generated when the external device detects connection with the interface.
In the above step, if the external device is the same as the target device, and the identification code is generated when the connection between the interface and the other device is detected, the identification code generated by the external device is the second identification code.
Step S25, comparing the first identification code with the second identification code when the second identification code is requested.
And step S27, determining whether the target device and the external device are the same device according to the comparison result.
In an optional embodiment, still taking the Type-C interface as an example, when the external device of the Type-C interface is the target device itself, that is, the external device of the Type-C interface and the Type-C target device are the same device, both the USB PD controllers of the target device detect that the corresponding interfaces are connected to the external device, and both request the random number received by the other USB PD controller from the embedded processor, and because the random numbers received by both the USB PD controllers are generated by the same embedded processing, the random number requested by both the USB PDs is the same as the random number received by itself, thereby determining that the target device, that is, the target device and the external device are the same device.
According to the method, the target device detects that the interface is connected with the external device, generates the first identification code, requests the external device for the second identification code, wherein the second identification code is the identification code generated when the external device detects that the interface is connected with the external device, compares the first identification code with the second identification code under the condition that the second identification code is obtained through the request, and determines whether the target device and the external device are the same device or not according to the comparison result. When the target equipment and the external equipment are the same equipment, the random numbers received by the USB PD controllers corresponding to the two interfaces are the same as the random numbers received by the external equipment detected by the target equipment and the interfaces are the same equipment; when the target equipment and the external equipment are not the same equipment and the external equipment also has the function of generating random numbers when detecting that the interface is connected with other equipment, the first identification code is different from the second identification code; when the target device and the external device are not the same device and the external device does not have the function of generating the random number when detecting that the interface is connected with other devices, the target device cannot request the identification code, so that whether the target device and the external device are the same device can be determined by requesting the random number obtained by the USB PD controller to be the received random number generated by the embedded processor. Further, as long as any one of two connected devices has the function of implementing the steps, the self-connection identification of the device can be achieved.
Optionally, according to the foregoing embodiment of the present application, determining whether the target device and the external device are the same device according to the comparison result includes:
step S271, determining that the target device and the external device are the same device under the condition that the first identification code and the second identification code are the same.
And if the first identification code is the same as the second identification code, determining that the identification codes received by the USB PD controllers corresponding to the two interfaces are generated by one embedded processor, thereby determining that the target equipment and the external equipment are the same equipment.
Step S272, determining that the target device and the external device are not the same device when the first identification code is different from the second identification code.
And if the first identification code is the same as the second identification code, determining that the identification codes received by the USB PD controllers corresponding to the two interfaces are generated by different embedded processors, thereby determining that the target equipment and the external equipment are not the same equipment.
Optionally, according to the embodiment of the present application, after determining whether the target device and the external device are the same device according to the comparison result, the method further includes:
and step S29, if the comparison result indicates that the target device and the external device are the same device, terminating the communication between the target device and the external device.
In the above step, if the target device and the external device are the same device, the connection occurs between the two interfaces of the target device, and in order to prevent the device itself from charging the device, which affects the service life of the device, or damages the device, the communication of the two interfaces needs to be notified immediately. The step of stopping interface communication may be performed by the USB PD controller corresponding to any one of the interfaces.
Optionally, according to the embodiment of the present application, after determining whether the target device and the external device are the same device according to the comparison result, the method further includes:
step S211, if the comparison result indicates that the target device and the external device are not the same device, continuing to maintain the communication between the interface and the external device.
In the above step, if the target device and the external device are not the same device, the connection is not the self-connection of the device, and a situation that one interface of the device charges the other interface of the device will not occur, so that the two interfaces can be kept communicating continuously for charging or data transmission.
Optionally, according to the foregoing embodiment of the present application, in a case where obtaining the second identification code is not requested, the communication between the target device and the external device is terminated.
In an optional embodiment, taking the target device as a smart phone as an example, when the smart phone is connected to the charger through the Type-C interface, the USB PD controller of the interface receives a random number generated by an embedded processor of the smart phone, and because the charger does not have a function of generating the random number after detecting the external device, the USB PD controller of the smart phone cannot request the random number generated by the charger, and the smart phone determines that the device connected to the interface is not the same as the smart phone itself under the condition that the random number is not requested.
Fig. 3 is a schematic diagram of a self-connection structure of a device when a target device and an external device are the same device according to an embodiment of the present invention. Fig. 4 is a flow chart of an alternative method of identifying device self-connection according to an embodiment of the present invention. A method of identifying a device self-connection is described below in conjunction with fig. 3 and 4.
First, as shown in fig. 3, the device has two Type-C interfaces (Type-C interface 1 and Type-C interface 2) which communicate with the USB PD controller 1 and the USB PD controller 2 through the CC bus, respectively, and an embedded processor (or application processor) communicates with the USB PD controller 1 and the USB PD controller 2 through the I2C bus, respectively.
In the foregoing operating environment, a method for identifying device self-connection as shown in fig. 4 is provided, which includes:
s41, whether the Type-C interface 1 detects the equipment access is judged. If the Type-C interface 1 detects the device access, the process proceeds to step S43.
S42, whether the Type-C interface 2 detects the equipment access is judged. If the Type-C interface 2 detects the device access, the process proceeds to step S44.
S43, the embedded processor sends the ID code to the USB PD controller 1.
Specifically, the ID code may be a random number generated by an embedded processor.
S44, the embedded processor sends the ID code to the USB PD controller 2.
Specifically, the ID code may be a random number generated by an embedded processor.
S45, the USB PD controller 1 requests the Type-C interface 2 for an ID identification code.
S46, the USB PD controller 2 requests the Type-C interface 1 for an ID identification code.
And S47, whether the identification code of the other party is received. The process proceeds to step S47 if the partner identification code is received, and otherwise, the process proceeds to step S410.
And if the identification code of the other party is not received, determining that the two devices are not the same device. If the identification code of the other party is received, the identification code of the other party and the identification code of the other party are judged.
And S48, whether the received identification code is the same as the original identification code or not. If the received identification code is the same as the original identification code, step S49 is entered, otherwise step S410 is entered.
And if the received identification code is the same as the original identification code of the two devices, determining that the two devices are the same device, otherwise, determining that the two devices are different devices.
S49, determining the interface of the opposite side and the interface are in the same device, terminating the negotiation of USB PD and reporting to the embedded processor.
If the two devices are the same device, the communication of the two devices is terminated.
And S410, continuing the USB PD protocol, and finally determining the charging/power supply state.
And if the two devices are not the same device, the communication states of the two devices are continuously maintained.
Example 2
According to the foregoing embodiment of the present application, there is further provided a system for identifying device self-connection, and fig. 5 is a schematic diagram of an alternative system for identifying device self-connection according to the embodiment of the present application, and as shown in fig. 5, the system includes:
an interface 50.
Specifically, the interface may be a Tepy-C interface.
The first controller 52, which is in communication with the interface and the second controller, is configured to generate the first identification code when the second controller detects that the interface is connected to the external device.
Specifically, the first controller may be a USB PD controller that communicates with the Tepy-C interface, and the first identifier may be a random number.
And the second controller 54 is in communication with the interface, and is configured to receive the first identification code generated by the first controller when it is detected that the interface is connected to the external device, request the external device for a second identification code, compare the first identification code with the second identification code when the second identification code is obtained, and determine whether a target device to which the interface belongs and the external device are the same device according to a comparison result, where the second identification code is an identification code generated when the external device detects that the external device is connected to the interface.
Specifically, the second controller may be an embedded processor or an application processor of the target device.
As can be seen from the above, the system for identifying device self-connection provided in this embodiment includes an interface, a first controller in communication with the interface and a second controller, the first controller being configured to generate a first identification code when the second controller detects that the interface is connected to an external device, the second controller being in communication with the interface, the second controller being configured to receive the first identification code generated by the first controller when the interface is detected to be connected to the external device, request the external device for a second identification code, compare the first identification code and the second identification code when the second identification code is obtained by the request, and determine whether a target device to which the interface belongs and the external device are the same device according to a comparison result, where the second identification code is an identification code generated when the external device detects that the interface is connected to the external device. When the target equipment and the external equipment are the same equipment, the random numbers received by the USB PD controllers corresponding to the two interfaces are the same as the random numbers received by the external equipment detected by the target equipment and the interfaces are the same equipment; when the target equipment and the external equipment are not the same equipment and the external equipment also has the function of generating random numbers when detecting that the interface is connected with other equipment, the first identification code is different from the second identification code; when the target device and the external device are not the same device and the external device does not have the function of generating the random number when detecting that the interface is connected with other devices, the target device cannot request the identification code, so that whether the target device and the external device are the same device can be determined by requesting the random number obtained by the USB PD controller to be the received random number generated by the embedded processor. Further, as long as any one of two connected devices has the function of implementing the steps, the self-connection identification of the device can be achieved.
Optionally, according to the above embodiment of the present application, the controller is further configured to determine that the target device and the external device are the same device under the condition that the first identification code is the same as the second identification code; and under the condition that the first identification code is different from the second identification code, determining that the target equipment is not the same as the external equipment.
Optionally, according to the foregoing embodiment of the present application, if the comparison result indicates that the target device and the external device are the same device, the communication between the target device and the external device is terminated.
Optionally, according to the foregoing embodiment of the present application, in a case where obtaining the second identification code is not requested, the communication between the target device and the external device is terminated.
Example 3
According to the foregoing embodiment of the present application, there is further provided a system for identifying device self-connection, and fig. 6 is a schematic diagram of an alternative system for identifying device self-connection according to the embodiment of the present application, and as shown in fig. 6, the system includes:
the generating module 60 is configured to generate a first identification code when the target device detects that the interface is connected to the external device.
Specifically, the first identification code may be a random number, and the interface may be a Type-C interface. In the above steps, the target device generates the first identification code after detecting that the interface is connected to the external device.
And a requesting module 62, configured to request the external device for a second identification code, where the second identification code is an identification code generated when the external device detects connection with the interface.
And a comparing module 64, configured to compare the first identification code with the second identification code when the second identification code is requested to be obtained.
And the determining module 66 is configured to determine whether the target device and the external device are the same device according to the comparison result.
According to the method, the interface connection external device is detected through the target device generation module, the first identification code is generated, the request module requests the external device for the second identification code, the second identification code is the identification code generated when the external device detects the interface connection, the first identification code and the second identification code are compared through the comparison module under the condition that the second identification code is obtained through the request, and whether the target device and the external device are the same device or not is determined through the determination module according to the comparison result. When the target equipment and the external equipment are the same equipment, the random numbers received by the USB PD controllers corresponding to the two interfaces are the same as the random numbers received by the external equipment detected by the target equipment and the interfaces are the same equipment; when the target equipment and the external equipment are not the same equipment and the external equipment also has the function of generating random numbers when detecting that the interface is connected with other equipment, the first identification code is different from the second identification code; when the target device and the external device are not the same device and the external device does not have the function of generating the random number when detecting that the interface is connected with other devices, the target device cannot request the identification code, so that whether the target device and the external device are the same device can be determined by requesting the random number obtained by the USB PD controller to be the received random number generated by the embedded processor. Further, as long as any one of two connected devices has the function of implementing the steps, the self-connection identification of the device can be achieved.
Optionally, according to the foregoing embodiment of the present application, the determining module includes:
and the first determining submodule is used for determining that the target equipment and the external equipment are the same equipment under the condition that the first identification code is the same as the second identification code.
And the second determining submodule is used for determining that the target equipment and the external equipment are not the same equipment under the condition that the first identification code is different from the second identification code.
Optionally, according to the above embodiment of the present application, the apparatus further includes:
and the termination module is used for terminating the communication between the target equipment and the external equipment if the comparison result indicates that the target equipment and the external equipment are the same equipment after determining whether the target equipment and the external equipment are the same equipment according to the comparison result.
Optionally, according to the above embodiment of the present application, the apparatus further includes:
and the maintaining module is used for continuing to maintain the communication between the interface and the external equipment if the comparison result indicates that the target equipment and the external equipment are not the same equipment after determining whether the target equipment and the external equipment are the same equipment according to the comparison result.
Optionally, according to the foregoing embodiment of the present application, in a case where obtaining the second identification code is not requested, the communication between the target device and the external device is terminated.
Example 4
According to the foregoing embodiments of the present application, there is also provided a storage medium including a stored program, wherein when the program runs, a device in which the storage medium is controlled to execute the self-connection identification method of the device in any one of embodiments 1.
Example 5
According to the foregoing embodiments of the present application, there is further provided a processor, wherein the processor is configured to execute a program, and the program executes the self-connection identification method of the device according to any one of embodiments 1.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present invention, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units may be a logical division, and in actual implementation, there may be another division, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, various modifications and decorations can be made without departing from the principle of the present invention, and these modifications and decorations should also be regarded as the protection scope of the present invention.

Claims (12)

1. A method of identifying device self-connection, comprising:
the target equipment detects that the interface is connected with the external equipment, and generates a first identification code;
requesting a second identification code from the external equipment, wherein the second identification code is an identification code generated when the external equipment detects that the external equipment is connected with the interface;
comparing the first identification code with the second identification code under the condition of requesting to obtain the second identification code;
and determining whether the target equipment and the external equipment are the same equipment or not according to the comparison result.
2. The method of claim 1, wherein determining whether the target device and the external device are the same device according to the comparison result comprises:
under the condition that the first identification code is the same as the second identification code, determining that the target equipment and the external equipment are the same equipment;
and under the condition that the first identification code is different from the second identification code, determining that the target equipment and the external equipment are not the same equipment.
3. The method according to claim 1 or 2, wherein after determining whether the target device and the external device are the same device according to the comparison result, the method further comprises:
and if the comparison result indicates that the target equipment and the external equipment are the same equipment, terminating the communication between the target equipment and the external equipment.
4. The method according to claim 1, wherein after determining whether the target device and the external device are the same device according to the comparison result, the method further comprises:
and if the comparison result indicates that the target equipment and the external equipment are not the same equipment, continuing to maintain the communication between the interface and the external equipment.
5. The method of claim 1, wherein the communication between the target device and the external device is terminated without requesting the second identification code.
6. A system for identifying device self-connection, comprising:
an interface;
the first controller is communicated with the interface and the second controller and is used for generating a first identification code when the second controller detects that the interface is connected with the external equipment;
the second controller is communicated with the interface and used for receiving the first identification code generated by the first controller when the interface is detected to be connected with an external device, requesting a second identification code from the external device, comparing the first identification code with the second identification code under the condition that the second identification code is obtained through the request, and determining whether the target device to which the interface belongs and the external device are the same device or not according to the comparison result, wherein the second identification code is the identification code generated when the external device detects to be connected with the interface.
7. The system of claim 6, wherein the second controller is further configured to determine that the target device and the external device are the same device if the first identification code and the second identification code are the same; and under the condition that the first identification code is different from the second identification code, determining that the target equipment and the external equipment are not the same equipment.
8. The system according to claim 6 or 7, wherein if the comparison result indicates that the target device and the external device are the same device, the communication between the target device and the external device is terminated.
9. The system of claim 6, wherein the target device terminates communication with the external device without requesting the second identification code.
10. An apparatus for identifying a device self-connection, comprising:
the generation module is used for generating a first identification code when the target equipment detects that the interface is connected with the external equipment;
the request module is used for requesting a second identification code to the external equipment, wherein the second identification code is an identification code generated when the external equipment detects that the external equipment is connected with the interface;
the comparison module is used for comparing the first identification code with the second identification code under the condition of requesting to obtain the second identification code;
and the determining module is used for determining whether the target equipment and the external equipment are the same equipment or not according to the comparison result.
11. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device where the storage medium is located is controlled to execute the self-connection identification method of the device according to any one of claims 1 to 5.
12. A processor, characterized in that the processor is configured to run a program, wherein the program is configured to execute the self-connection identification method of the device according to any one of claims 1 to 5 when running.
CN201710229868.2A 2017-04-10 2017-04-10 Method, device and system for identifying self-connection of equipment Active CN107145456B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710229868.2A CN107145456B (en) 2017-04-10 2017-04-10 Method, device and system for identifying self-connection of equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710229868.2A CN107145456B (en) 2017-04-10 2017-04-10 Method, device and system for identifying self-connection of equipment

Publications (2)

Publication Number Publication Date
CN107145456A CN107145456A (en) 2017-09-08
CN107145456B true CN107145456B (en) 2021-05-04

Family

ID=59774668

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710229868.2A Active CN107145456B (en) 2017-04-10 2017-04-10 Method, device and system for identifying self-connection of equipment

Country Status (1)

Country Link
CN (1) CN107145456B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI652579B (en) * 2017-08-30 2019-03-01 威盛電子股份有限公司 Self-connecting electronic device and control method thereof
CN108323234A (en) * 2017-12-27 2018-07-24 深圳达闼科技控股有限公司 A kind of detection method, detection device and server

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0381852A (en) * 1989-08-24 1991-04-08 Nec Corp Connection control system
CN101674366A (en) * 2009-09-19 2010-03-17 惠州Tcl移动通信有限公司 Mobile terminal USB, or charger inserting identification method and identification device thereof
CN103186483A (en) * 2011-12-27 2013-07-03 比亚迪股份有限公司 Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same
CN104881387A (en) * 2015-05-26 2015-09-02 青岛海信宽带多媒体技术有限公司 USB connection method and USB concentrator
CN105207867A (en) * 2015-10-30 2015-12-30 北京奇艺世纪科技有限公司 Equipment connecting method and equipment connecting device
CN105548790A (en) * 2015-12-09 2016-05-04 上海斐讯数据通信技术有限公司 USB3.1 Type-C cable automatic testing method and system
CN105591355A (en) * 2016-02-24 2016-05-18 硅谷数模半导体(北京)有限公司 USB-C control chip, USB-C control chip protection circuit, and USB-C system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0381852A (en) * 1989-08-24 1991-04-08 Nec Corp Connection control system
CN101674366A (en) * 2009-09-19 2010-03-17 惠州Tcl移动通信有限公司 Mobile terminal USB, or charger inserting identification method and identification device thereof
CN103186483A (en) * 2011-12-27 2013-07-03 比亚迪股份有限公司 Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same
CN104881387A (en) * 2015-05-26 2015-09-02 青岛海信宽带多媒体技术有限公司 USB connection method and USB concentrator
CN105207867A (en) * 2015-10-30 2015-12-30 北京奇艺世纪科技有限公司 Equipment connecting method and equipment connecting device
CN105548790A (en) * 2015-12-09 2016-05-04 上海斐讯数据通信技术有限公司 USB3.1 Type-C cable automatic testing method and system
CN105591355A (en) * 2016-02-24 2016-05-18 硅谷数模半导体(北京)有限公司 USB-C control chip, USB-C control chip protection circuit, and USB-C system

Also Published As

Publication number Publication date
CN107145456A (en) 2017-09-08

Similar Documents

Publication Publication Date Title
US10424954B2 (en) Power adaptor, terminal and charging system
US10910853B2 (en) Quick charging method, power adapter and mobile terminal
US11216549B2 (en) Security verification method and device
CN103078393B (en) USB hub and electric power supply method for the same
US10326291B2 (en) Quick charging method, power adapter and mobile terminal
EP3389295A1 (en) Multi-terminal mapping system and method for virtual sim card
KR102564363B1 (en) Electronic device for controlling a communication channel associated with wireless charging based on identification information received from external device and methd for the same
EP2942716A1 (en) Sim card hot-plug guard and sim card on-site shutdown swipe-card method, and terminal
CN110166994B (en) Data time-sharing transmission interoperability method, system, mobile terminal and storage medium
TW201715412A (en) Charging method, mobile terminal, and charging device
CN101493799A (en) Information processing apparatus
CN107145456B (en) Method, device and system for identifying self-connection of equipment
CN103477301A (en) Method and device for charging energy storage devices
KR20160009876A (en) Electronic device and method for controlling emergency call in electronic device
KR20210014356A (en) Electronic device for preventing damage of usb device and operating method thereof
CN106685018A (en) Reverse charging method and device as well as terminal
CN114553457A (en) Electronic device and control method thereof
US20180097315A1 (en) Power adapter, terminal device, charging system, and charging method
CN106972558B (en) Charging control method and electronic equipment
KR102540922B1 (en) Charging support apparatus and method in vehicle
CN107391157B (en) Mobile terminal and method for identifying mobile storage device
CN106488537B (en) Sending method, device and mobile terminal
CN112825401B (en) Charging line, charger, charging control method and charging device
CN107872495B (en) Information processing method and terminal equipment
CN112119566A (en) Power supply method, device, system and 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