Terminal connection device, connection method, electronic device and readable storage medium
By detecting the voltage value of the terminal device's connection port and automatically switching to the target communication interface using the controller, the problem of low efficiency and high error rate of manual confirmation of multiplexed terminals in the power industry is solved, and fast and accurate interface identification and switching are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN CLOU ELECTRONICS
- Filing Date
- 2025-01-03
- Publication Date
- 2026-07-03
AI Technical Summary
In the power industry, when there are not enough external terminals for terminal equipment or the external communication interface is uncertain, manually confirming and setting up multiplexed terminals is inefficient and has a high error rate, making it difficult to quickly and accurately identify and intelligently switch interface types automatically.
The voltage value of the connection port is detected by the detection unit, the target communication interface is determined by the controller based on the voltage value, and the automatic switching between the port and the target interface is realized by the connection component, including the switching circuit and the communication conversion circuit to ensure the conversion of the communication mode.
It enables rapid and accurate identification of connection port types and automatic switching to the correct communication interface, improving the accuracy and intelligence of testing and reducing the risk of human error.
Smart Images

Figure CN122339949A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of electronic circuit technology, and more specifically, to a terminal connection device, a connection method, an electronic device, and a readable storage medium. Background Technology
[0002] In the field of embedded communication within the power industry, related technologies often utilize multiple communication interfaces in terminal devices, such as Controller Area Network (CAN) communication interfaces, RS485 communication interfaces, RS232 communication interfaces, and PROFIBUS process fieldbus interfaces. When the number of external terminals on the terminal device is insufficient or the external communication interface is uncertain, multiplexed terminals are used. Multiple communication interfaces need to be connected to the multiplexed terminals, but only one interface can be connected at a time. When the external communication type is uncertain, manual confirmation of the external communication interface used is required during installation, followed by parameter settings to configure the multiplexed terminals to the corresponding communication interface. However, manual setting is inefficient and prone to errors. Therefore, how to quickly and accurately identify the interface type on the multiplexed terminals and reliably and intelligently switch between them automatically has become a pressing technical problem. Summary of the Invention
[0003] The present invention aims to solve at least one of the technical problems existing in the prior art.
[0004] Therefore, a first aspect of the present invention provides a terminal connection device.
[0005] A second aspect of the present invention provides a connection method.
[0006] A third aspect of the present invention provides an electronic device.
[0007] A fourth aspect of the present invention provides a readable storage medium.
[0008] A first aspect of the present invention provides a terminal connection device for connecting a connection port to a communication interface of a terminal device. The terminal device includes multiple communication interfaces. The terminal connection device includes: a detection unit connected to the connection port for detecting the voltage value of the connection port; a connection component connected to the connection port; and a controller connected to the detection unit and the connection component, the controller being used to determine a target communication interface based on the voltage value of the connection port and to control the connection component to connect the connection port to the target communication interface.
[0009] The terminal connection device provided by this invention can be used to connect a connection port to the communication interface of a terminal device. The terminal device may include multiple communication interfaces, such as a Controller Area Network (CAN) communication interface, an RS485 communication interface, an RS232 communication interface, and a PROFIBUS process fieldbus interface. The terminal connection device can switch between the connection port and multiple communication interfaces of the terminal device.
[0010] Furthermore, the terminal connection device includes a detection unit connected to the connection port, which enables the detection of the voltage value of the connection port.
[0011] It is understandable that the voltages of different communication interfaces of terminal devices are not the same. For example, the idle voltage of the RS485 communication interface is 5V, and the idle voltage of the controller LAN communication interface is 2.5V. Therefore, by detecting the voltage value of the connection port through the detection unit, the communication interface that the current connection port needs to connect to can be determined.
[0012] Furthermore, the terminal connection device also includes a connection component and a controller. The connection component is connected to a connection port, thereby enabling switching between the connection port and different communication interfaces. The controller is connected to the detection unit and the connection component, allowing the controller to receive the voltage value of the connection port detected by the detection unit. Based on the received voltage value, the controller controls the operation of the connection component to connect the connection port to the communication interface corresponding to the voltage value received by the controller, thus completing the switching of the connection port's link mode.
[0013] Specifically, the controller first receives the voltage value of the connection port detected by the detection unit, and then determines the communication interface that the connection port needs to connect to based on the voltage value. In other words, it determines the target communication interface from multiple communication interfaces based on the voltage value of the connection port. Then, the controller can control the connection component to connect the connection port to the target communication interface.
[0014] The terminal connection device provided by this invention, by setting up a detection unit, can detect the voltage value of the connection port. Furthermore, the terminal connection device also includes a connection component and a controller. The controller can acquire the voltage value of the connection port detected by the detection unit and control the operation of the connection component to connect the connection port to the communication interface corresponding to the voltage value received by the controller, thereby completing the switching between the connection port and different communication interfaces. By controlling the connection component to connect the connection port and the communication port according to the voltage value of the connection port, the controller can quickly and accurately identify the type of connection port and switch the correct communication interface to the connection port, thereby improving the accuracy and intelligence of the test.
[0015] In addition, the terminal connection device according to the above-described technical solution provided by the present invention may also have the following additional technical features:
[0016] In some technical solutions, optionally, the connection component includes: multiple connection units, which are connected to the controller; the controller is also used to determine the target connection unit among the multiple connection units according to the target communication interface, and control the target connection unit to connect its connection port to the target communication interface.
[0017] In some technical solutions, the connection unit may optionally include: a switching circuit, disposed at the connection port, and connected to the controller; and a communication conversion circuit, disposed at the connection port and connected to the switching circuit; wherein the controller is used to control the switching circuit to connect the connection port to the target communication interface, and the communication conversion circuit is used to convert the communication mode of the connection port to the communication mode corresponding to the target communication interface when the connection port is connected to the target communication interface.
[0018] In some technical solutions, the connection unit may optionally include a protection circuit, which is disposed between the switching circuit and the communication conversion circuit, and is used to provide anti-interference protection for the communication conversion circuit.
[0019] In some technical solutions, the detection unit may optionally include: an isolation circuit, one end of which is connected to a connection port and the other end of which is connected to a controller, the isolation circuit being used to acquire the voltage value of the connection port.
[0020] In some technical solutions, the detection unit may optionally include: a level processing circuit, connected to the isolation circuit, for processing the level signal output by the isolation circuit; and a filtering circuit, connected to the isolation circuit, for filtering the electrical frequency signal output by the isolation circuit.
[0021] According to a second aspect of the present invention, a connection method is provided for a terminal connection device as described in any of the above technical solutions. The connection method includes: when a connection port is connected to a terminal device, obtaining a voltage value of the connection port; determining a target communication interface based on the voltage value of the connection port; and connecting the connection port to the target communication interface.
[0022] The connection method provided by this invention, through a detection unit, can detect the voltage value of the connection port. Furthermore, through a controller, it can acquire the voltage value detected by the detection unit and control the operation of the connection component to connect the connection port to the communication interface corresponding to the voltage value received by the controller, thereby completing the switching between the connection port and different communication interfaces. By controlling the connection component to connect the connection port and the communication port according to the voltage value of the connection port, the controller can quickly and accurately identify the type of connection port and switch the correct communication interface to the connection port, thus improving the accuracy and intelligence of the test.
[0023] In some technical solutions, optionally, connecting the connection port to the target communication interface includes: determining a target connection unit among multiple connection units of the connection component according to the target communication interface; and controlling the target connection unit to connect the connection port to the target communication interface.
[0024] In some technical solutions, the connection method may optionally include: when the voltage value of the connection port is not equal to the voltage value corresponding to the target communication interface, controlling the target connection unit to disconnect the connection port from the target communication interface.
[0025] According to a second aspect of the present invention, an electronic device is provided, comprising: a processor and a memory, the memory storing a program or instructions executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the connection method as described in any of the above-described technical solutions.
[0026] The electronic device provided in this application includes a memory and a processor, and also includes a program or instructions stored in the memory. When the program or instructions are executed by the processor, they can implement the steps of the connection method described in the first aspect. Therefore, the electronic device has all the beneficial effects of the connection method described above, which will not be repeated here.
[0027] According to a fourth aspect of this application, a readable storage medium is proposed, on which a program or instructions are stored, which, when executed by a processor, implement a linking method as described in any of the above technical solutions.
[0028] The readable storage medium provided in this application stores a program or instructions. When the program or instructions are executed by a processor, they can implement the linking method as described in any of the above technical solutions. Therefore, the storage medium has all the beneficial effects of the above linking methods, which will not be elaborated here.
[0029] Additional aspects and advantages of the invention will become apparent in the following description or may be learned by practice of the invention. Attached Figure Description
[0030] The above and / or additional aspects and advantages of the present invention will become apparent and readily understood from the description of the embodiments taken in conjunction with the following drawings, in which:
[0031] Figure 1 A structural block diagram of a terminal connection device according to an embodiment of the present invention is shown;
[0032] Figure 2 A flowchart illustrating the connection method according to an embodiment of the present invention is shown;
[0033] Figure 3 A structural block diagram of an electronic device according to an embodiment of the present invention is shown.
[0034] in, Figure 1 and Figure 3 The correspondence between the reference numerals and component names in the attached drawings is as follows:
[0035] 100 Terminal connection device, 102 Detection unit, 104 Connection component, 106 Connection unit, 108 Controller, 110 Switching circuit, 112 Communication conversion circuit, 114 Protection circuit, 116 Isolation circuit, 118 Level processing circuit, 120 Filtering circuit, 200 Connection port, 300 Terminal device, 302 Communication interface, 500 Electronic device, 502 Processor, 504 Memory. Detailed Implementation
[0036] To better understand the above-mentioned objectives, features, and advantages of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be noted that, unless otherwise specified, the embodiments and features described in these embodiments can be combined with each other.
[0037] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and therefore the scope of protection of the invention is not limited to the specific embodiments disclosed below.
[0038] The following reference Figure 1 and Figure 3This describes terminal connection devices, connection methods, electronic devices, and readable storage media provided according to some embodiments of the present invention.
[0039] This invention provides a terminal connection device 100, such as... Figure 1 As shown, a communication interface 302 is used to connect the connection port 200 to the terminal device 300. The terminal device 300 includes multiple communication interfaces 302. The terminal connection device 100 includes: a detection unit 102 connected to the connection port 200 for detecting the voltage value of the connection port 200; a connection component 104 connected to the connection port 200; and a controller 108 connected to the detection unit 102 and the connection component 104. The controller 108 is used to determine the target communication interface 302 based on the voltage value of the connection port 200 and control the connection component 104 to connect the connection port 200 to the target communication interface.
[0040] The terminal connection device 100 provided by this invention can be used to connect a connection port 200 to a communication interface 302 of a terminal device 300. The terminal device 300 may include multiple communication interfaces 302, such as a controller area network (CAN) communication interface, an RS485 communication interface, an RS232 communication interface, and a process fieldbus interface (PROFIBUS). The terminal connection device 100 can switch between the connection port 200 and the multiple communication interfaces 302 of the terminal device 300.
[0041] Furthermore, the terminal connection device 100 includes a detection unit 102, which is connected to the connection port 200. Through the detection unit 102, the voltage value of the connection port 200 can be detected.
[0042] It is understandable that the voltages of different communication interfaces 302 of the terminal device 300 are not the same. For example, the idle voltage of the RS485 communication interface is 5V, and the idle voltage of the local area network communication interface 302 of the controller 108 is 2.5V. Therefore, by detecting the voltage value of the connection port 200 through the detection unit 102, the communication interface 302 that the current connection port 200 needs to connect to can be determined.
[0043] Furthermore, the terminal connection device 100 also includes a connection component 104 and a controller 108. The connection component 104 is connected to the connection port 200, thereby enabling switching between the connection port and different communication interfaces 302. The controller 108 is connected to the detection unit 102 and the connection component 104, so that the controller 108 can receive the voltage value of the connection port 200 detected by the detection unit 102, and then control the connection component 104 to operate according to the received voltage value, thereby connecting the connection port 200 to the communication interface 302 corresponding to the voltage value received by the controller 108, and thus completing the switching of the connection mode of the connection port 200.
[0044] Specifically, the controller 108 first receives the voltage value of the connection port 200 detected by the detection unit 102, and then determines the communication interface 302 that the connection port 200 needs to connect to based on the voltage value of the connection port 200. That is, it determines the target communication interface among multiple communication interfaces 302 based on the voltage value of the connection port 200. Then, the controller 108 can control the connection component 104 to connect the connection port 200 to the target communication interface.
[0045] The terminal connection device 100 provided by this invention, by setting a detection unit 102, can detect the voltage value of the connection port 200. Further, the terminal connection device 100 also includes a connection component 104 and a controller 108. The controller 108 can acquire the voltage value of the connection port 200 detected by the detection unit 102 and control the operation of the connection component 104 to connect the connection port 200 to the communication interface 302 corresponding to the voltage value received by the controller 108, thereby completing the switching of connections between the connection port 200 and different communication interfaces 302. By controlling the connection component 104 to switch the connection mode of the connection port 200 according to the voltage value of the connection port 200, the controller 108 can quickly and accurately identify the type of the connection port 200 and switch the correct communication interface 302 to the connection port 200, thereby improving the accuracy and intelligence of the test.
[0046] In some embodiments, optionally, such as Figure 2 As shown, the connection component 104 includes: a plurality of connection units 106, which are connected to the controller 108; the controller 108 is further configured to determine the target connection unit 106 among the plurality of connection units 106 according to the target communication interface, and control the target connection unit 106 to connect the connection port 200 to the target communication interface.
[0047] In this embodiment, the connection component 104 may include a plurality of connection units 106, which may correspond to a plurality of different communication interfaces 302 of the terminal device 300. That is, each connection unit 106 is used to control the connection port 200 to connect to the corresponding communication interface 302, so as to realize the switching of connection between the connection port 200 and different communication interfaces 302 through the operation of the plurality of connection units 106.
[0048] Specifically, multiple connection units 106 are connected to the controller 108. After the controller 108 receives the voltage value of the connection port 200 detected by the detection unit 102, it determines the communication interface 302 that the connection port 200 needs to connect to based on the voltage value of the connection port 200. That is, it determines the target communication interface among multiple communication interfaces 302 based on the voltage value of the connection port 200. Further, the controller 108 determines the target connection unit 106 among the multiple connection units 106 based on the target communication interface. This target connection unit 106 is the connection unit 106 corresponding to the target communication interface. Finally, the controller 108 controls the connection unit 106 to connect the connection port 200 to the target communication interface, thus completing the connection between the connection port 200 and the target communication interface.
[0049] In some embodiments, optionally, the connection unit 106 includes: a switching circuit 110 disposed at the connection port 200 and connected to the controller 108; and a communication conversion circuit 112 disposed at the connection port 200 and connected to the switching circuit 110; wherein the controller 108 is used to control the switching circuit 110 to connect the connection port 200 to the target communication interface, and the communication conversion circuit 112 is used to convert the communication mode of the connection port 200 to a communication mode corresponding to the target communication interface when the connection port 200 is connected to the target communication interface.
[0050] In this embodiment, the connection unit 106 includes a switching circuit 110, which is disposed at the connection port 200 to control the connection port 200 to be connected to the corresponding communication interface 302, that is, to connect the connection port 200 to the corresponding communication interface 302 of the terminal device 300.
[0051] Furthermore, the connection unit 106 also includes a communication conversion circuit 112. The communication conversion circuit 112 is disposed on the communication interface 302 and is connected to the switching circuit 110. After the switching circuit 110 connects the connection port 200 to the communication interface 302 of the terminal device 300, the communication conversion circuit 112 can convert the communication mode of the connection port 200 to the communication mode corresponding to the communication interface 302, thereby ensuring that data can be transmitted normally through the connection port 200 during the testing of the communication interface 302.
[0052] Specifically, the switching circuit 110 is connected to the controller 108. The controller 108 receives the voltage value of the connection port 200 detected by the detection circuit and determines the target communication interface based on the voltage value of the connection port 200. The controller 108 then controls the corresponding switching circuit 110 to connect the connection port 200 to the target communication interface. After the connection port 200 is connected to the target communication interface, the communication conversion circuit 112 converts the communication mode of the connection port 200 to the communication mode corresponding to the target communication interface to ensure that the connection port 200 can transmit data normally.
[0053] In some embodiments, the connection unit 106 may optionally include a protection circuit 114 connected to the communication conversion circuit 112, the protection circuit 114 being used to provide anti-interference protection for the communication conversion circuit 112.
[0054] In this embodiment, the connection unit 106 may further include a protection circuit 114, and the protection circuit 114 can improve the anti-interference capability of the communication conversion circuit 112 during operation and ensure the stable operation of the communication conversion circuit 112 through the protection circuit 114 between the social self-healing switching circuit 110 and the communication conversion circuit 112.
[0055] For example, the switching circuit 110 may include a switch and a relay, wherein the control terminal of the switch is connected to the controller 108, thereby enabling the controller 108 to send different level signals to the control terminal of the switch to control the on / off state between the first and second terminals of the switch.
[0056] Furthermore, a relay is disposed at the connection port 200 and connected to the first end of the switch. That is, the relay can switch according to the level state of the first end of the switch, thereby connecting the connection port 200 to the first communication interface 302 or disconnecting the connection port 200 from the first communication interface 302.
[0057] Specifically, the first terminal of the switch is connected to a first power supply, which can provide a low-voltage power supply to the switch, for example, the voltage of the first power supply can be 5V. Further, the second terminal of the switch is grounded. That is, when the first and second terminals of the switch are connected, the first terminal of the switch is in a low-level state; when the first and second terminals of the switch are disconnected, the first terminal of the switch is in a high-level state. The relay can then switch the connection state between the connection port 200 and the first communication interface 302 according to the different level states of the first terminal of the switch.
[0058] The communication conversion circuit 112 may include a codec chip, which can control the communication mode of the connection port 200.
[0059] Specifically, the codec chip is connected to a first power supply, which provides low-voltage power to the codec chip. Further, the codec chip is connected to a relay. When the relay switches, connection port 200 connects to the target communication interface of terminal device 300. At this time, the codec chip encodes and decodes the transmitted data to ensure that the communication mode of connection port 200 is the same as the communication mode of the target communication interface of terminal device 300, thereby ensuring that connection port 200 can normally transmit data.
[0060] Furthermore, the protection circuit 114 may include a voltage divider resistor, which can be placed between the codec chip and the relay to achieve a voltage divider effect and prevent excessive voltage from damaging the codec chip. Furthermore, the protection circuit 114 may also include a bidirectional diode connected between the codec chip and ground.
[0061] In some embodiments, the detection unit 102 may optionally include an isolation circuit 116, one end of which is connected to the connection port 200 and the other end of which is connected to the controller 108. The isolation circuit 116 is used to acquire the voltage value of the connection port 200.
[0062] In this embodiment, the detection unit 102 may include an isolation circuit 116. Through the isolation circuit 116, on the one hand, the voltage value of the connection port 200 can be collected; on the other hand, the isolation circuit 116 can provide a high input impedance to reduce the influence of the detection unit 102 on the voltage of the connection port 200. At the same time, the isolation circuit 116 can also isolate the connection port 200 from the controller 108, thereby reducing the influence of the pins of the controller 108 on the voltage collection of the connection port 200.
[0063] Furthermore, the detection unit 102 also includes: a level processing circuit 118, connected to the isolation circuit 116, for processing the level signal output by the isolation circuit 116; and a filter circuit 120, connected to the isolation circuit 116, for filtering the electrical frequency signal output by the isolation circuit 116.
[0064] Specifically, the detection unit 102 may further include a level processing circuit 118 and a filtering circuit 120. The level processing circuit 118 processes the level signal output by the isolation circuit 116 to ensure that the controller 108 receives a suitable level signal, thereby ensuring that the controller 108 can control the operation of the connection component 104 according to the voltage value of the connection port 200. The filtering circuit 120 filters the level signal output by the isolation circuit 116, thereby removing high-frequency interference from the level signal and ensuring that the detection unit 102 can transmit accurate level signals.
[0065] For example, the detection circuit may include a first operational amplifier and a second operational amplifier, wherein a first input terminal of the first operational amplifier is connected to the connection port 200, and a second input terminal of the first operational amplifier is connected to the output terminal of the first operational amplifier. The first operational amplifier can be used to construct a voltage follower, which is then used to acquire the voltage at the connection port 200. It should be noted that if the voltage at the connection port 200 is acquired by voltage division, i.e., directly dividing the voltage at the connection port 200, the voltage divider resistor will affect the impedance of the connection port 200, impacting communication quality. A voltage follower can provide a high input impedance, reducing the impact of the detection circuit on the voltage at the connection port 200.
[0066] The first input terminal of the second operational amplifier is connected to the output terminal of the first operational amplifier, the second input terminal of the second operational amplifier is connected to the output terminal of the second operational amplifier, and the output terminal of the second operational amplifier is connected to the controller 108. The second operational amplifier can be used to form a voltage follower, thereby providing impedance isolation between the first operational amplifier and the controller 108, and reducing the impact of the controller 108 pins on the large voltages sampled by the first operational amplifier.
[0067] Furthermore, the level processing circuit 118 may include a first voltage divider resistor and a second voltage divider resistor. One end of the first voltage divider resistor is connected to the output terminal of the first operational amplifier, and one end of the second voltage divider resistor is connected to the other end of the first voltage divider resistor, with the other end grounded. By setting the first and second voltage divider resistors, the voltage at the acquired connection port 200 can be divided, allowing the controller 108 to acquire a suitable voltage. For example, if the voltage at the connection port 200 is 5V and the acquisition range of the controller 108 is 3.3V, the voltage at the connection port 200 is divided using the first and second voltage divider resistors to prevent the voltage acquired by the controller 108 from exceeding the acquisition range.
[0068] Furthermore, the filter circuit 120 may include a third resistor and a filter capacitor. The third resistor is positioned between the second operational amplifier and the controller 108, one end of the filter capacitor is connected between the third resistor and the controller 108, and the other end of the filter capacitor is grounded. By configuring the third resistor and the filter capacitor, high-frequency interference filtering can be achieved on the detection signal output to the controller 108, thereby improving the accuracy of the detection signal received by the controller 108.
[0069] In some embodiments of the present invention, such as Figure 2 As shown, a connection method is also proposed for connecting a terminal to the device 100 as described in any of the above embodiments. The connection method includes:
[0070] S402, when the connection port is connected to a terminal device, obtain the voltage value of the connection port;
[0071] S404 determines the target communication interface based on the voltage value of the connection port;
[0072] S406 connects the connection port to the target communication interface.
[0073] The connection method provided by this invention, through a detection unit, can detect the voltage value of the connection port. Furthermore, through a controller, it can acquire the voltage value detected by the detection unit and control the operation of the connection component to connect the connection port to the communication interface corresponding to the voltage value received by the controller, thereby completing the switching between the connection port and different communication interfaces. By controlling the connection component to connect the connection port and the communication port according to the voltage value of the connection port, the controller can quickly and accurately identify the type of connection port and switch the correct communication interface to the connection port, thus improving the accuracy and intelligence of the test.
[0074] In some embodiments, optionally, connecting the connection port to the target communication interface includes: determining a target connection unit among a plurality of connection units of the connection component according to the target communication interface; and controlling the target connection unit to connect the connection port to the target communication interface.
[0075] In this embodiment, the connection component may include multiple connection units, which may correspond to multiple different communication interfaces of the terminal device. That is, each connection unit is used to control the connection port to connect to the corresponding communication interface, so as to realize the switching of connection between the connection port and different communication interfaces through the operation of multiple connection units.
[0076] Specifically, multiple connection units are connected to the controller. After the controller receives the voltage value of the connection port detected by the detection unit, it determines the communication interface that the connection port needs to connect to based on the voltage value. That is, it determines the target communication interface among multiple communication interfaces based on the voltage value of the connection port. Further, based on the target communication interface, the controller determines the target connection unit among the multiple connection units. This target connection unit is the connection unit corresponding to the target communication interface. Finally, the controller controls the connection unit to connect the connection port to the target communication interface, thus completing the connection between the connection port and the target communication interface.
[0077] In some embodiments, the connection method may optionally further include: upon receiving a disconnection command sent by the terminal device, controlling the target connection unit to disconnect the connection port from the target communication interface.
[0078] In this embodiment, after the controller controls the connection component to connect the connection port to the target communication interface, the controller can receive a disconnection command sent by the terminal device in real time. The disconnection command is used to instruct the controller to control the connection component to disconnect the connection port from the communication interface of the terminal device.
[0079] In other words, when the connection port does not need to be connected to the communication interface of the terminal device, or when the connection port needs to be switched to connect to other communication interfaces, the terminal device can send a disconnect command to the controller. The disconnect command determines that the connection port needs to be disconnected from the currently connected communication interface. At this time, the controller can control the corresponding connection unit of the connection component to disconnect the connection port from the communication interface.
[0080] In some embodiments, such as Figure 3 As shown, an electronic device 500 is proposed, including a processor 502 and a memory 504. The memory 504 stores programs or instructions that can run on the processor 502. When the program or instructions are executed by the processor 502, they implement the steps of the connection method provided in the above embodiments.
[0081] The electronic device 500 provided in this application includes a memory 504 and a processor 502, and also includes a program or instructions stored in the memory 504. When the program or instructions are executed by the processor 502, they can implement the steps of the connection method in any of the above embodiments. Therefore, the electronic device 500 has all the beneficial effects of the above connection method, which will not be repeated here.
[0082] In some embodiments, a readable storage medium is provided on which a program or instructions are stored, which, when executed by a processor, implement the linking method as described in any of the above embodiments.
[0083] The readable storage medium provided in this application stores a program or instructions. When the program or instructions are executed by a processor, they can implement the linking method as described in any of the above embodiments. Therefore, the storage medium has all the beneficial effects of the above linking method, which will not be repeated here.
[0084] The connection methods can be implemented in various ways depending on specific characteristics and / or example applications. For example, these methods can be implemented through a combination of hardware, firmware, and / or software. For instance, in a hardware implementation, the processor can be implemented in one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, electronic devices, other device units for performing the above functions, and / or combinations thereof.
[0085] A readable storage medium can be a tangible device that holds and stores instructions for use by an instruction execution device. A readable storage medium can be an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing, but is not limited thereto. A non-exhaustive list of more specific examples of readable storage media includes: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable optical disc read-only memory (CD-ROM), digital universal disk (DVD), memory cards, floppy disks, encoding mechanical devices (e.g., punched cards or grooves with raised structures for recording instructions), and any suitable combination of the foregoing. The readable storage medium used herein should not be construed as the transmission of signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media, or electrical signals transmitted through wires.
[0086] In the description of this invention, the term "a plurality of" refers to two or more. Unless otherwise explicitly defined, the terms "upper," "lower," etc., indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, and are only for the convenience of describing the invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the invention. The terms "connection," "installation," "fixing," etc., should be interpreted broadly. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a direct connection or an indirect connection through an intermediate medium. For those skilled in the art, the specific meaning of the above terms in this invention can be understood according to the specific circumstances.
[0087] In the description of this specification, the terms "one embodiment," "some embodiments," "specific embodiment," etc., refer to a specific feature, structure, material, or characteristic described in connection with that embodiment or example, which is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0088] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A terminal connection device for connecting a connection port to the communication interface of a terminal device, characterized in that, The terminal device includes multiple communication interfaces, and the terminal connection device includes: A detection unit, connected to the connection port, is used to detect the voltage value of the connection port; A connection component is connected to the connection port; A controller, connected to the detection unit and the connection component, is used to determine the target communication interface based on the voltage value of the connection port and control the connection component to connect the connection port to the target communication interface.
2. The terminal connection device according to claim 1, characterized in that, The connection component includes: Multiple connection units, wherein the multiple connection units are connected to the controller; The controller is further configured to determine a target connection unit among the plurality of connection units based on the target communication interface, and control the target connection unit to connect the connection port to the target communication interface.
3. The terminal connection device according to claim 2, characterized in that, The connection unit includes: A switching circuit is provided at the connection port, and the switching circuit is connected to the controller; A communication conversion circuit is disposed at the connection port and connected to the switching circuit; The controller is used to control the switching circuit to connect the connection port to the target communication interface, and the communication conversion circuit is used to convert the communication mode of the connection port to the communication mode corresponding to the target communication interface when the connection port is connected to the target communication interface.
4. The terminal connection device according to claim 3, characterized in that, The connection unit further includes: A protection circuit is connected to the communication conversion circuit and is used to provide anti-interference protection for the communication conversion circuit.
5. The terminal connection device according to claim 1, characterized in that, The detection unit includes: An isolation circuit is provided, with one end connected to the connection port and the other end connected to the controller. The isolation circuit is used to acquire the voltage value of the connection port.
6. The terminal connection device according to claim 5, characterized in that, The detection unit further includes: A level processing circuit, connected to the isolation circuit, is used to process the level signal output by the isolation circuit; A filtering circuit, connected to the isolation circuit, is used to filter the electrical frequency signal output by the isolation circuit.
7. A connection method for a terminal connection device as described in any one of claims 1 to 6, characterized in that, The connection method includes: When the connection port is connected to the terminal device, the voltage value of the connection port is obtained; Determine the target communication interface based on the voltage value of the connection port; Connect the connection port to the target communication interface.
8. The connection method according to claim 7, characterized in that, Connecting the connection port to the target communication interface includes: Based on the target communication interface, a target connection unit is determined among the multiple connection units of the connection component; The target connection unit is controlled to connect the connection port to the target communication interface.
9. The connection method according to claim 8, characterized in that, The connection method further includes: Upon receiving a disconnect command from the terminal device, the target connection unit is controlled to disconnect the connection port from the target communication interface.
10. An electronic device, characterized in that, include: A processor and a memory, the memory storing a program or instructions executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the connection method as described in any one of claims 7 to 9.
11. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the linking method as described in any one of claims 7 to 9.