Universal interface device, operation method thereof and electronic equipment
By designing a general interface device, using the control module and multiple identical interface modules to connect to external devices, obtaining device identity information and mapping control data, the problems of errors and inaccurate control of external devices in the existing technology are solved, and flexibility is achieved Improvement of sexuality and fault tolerance.
Patent Information
- Application Number
- CN202310863013.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-13
- Publication Date
- 2025-01-14
AI Technical Summary
When existing large integrated equipment is connected to multiple external devices, it is prone to errors in plugging, which cannot achieve accurate control, and troubleshooting interface problems is time-consuming and labor-intensive.
Design a general interface device, including a control module and multiple identical interface modules, connect to external devices through the interface module, establish a communication link, obtain device identity information, and map preset control data to the corresponding interface module to realize Control of external equipment.
It eliminates error insertion, improves interface flexibility and fault tolerance, improves user experience, and realizes precise control of multiple external devices.
Smart Images

Figure CN119316248A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of communication technology, and in particular to a universal interface device and an operating method thereof, and an electronic device. Background Art
[0002] Large integrated equipment in medical, communications or other industrial industries often needs to communicate with multiple external devices, and there is a design to control the external device interface.
[0003] External devices are often independent entities with built-in communication and other control interfaces. When existing large-scale integrated devices are connected to multiple external devices of different communication categories, corresponding dedicated interfaces need to be designed for each external device. From the perspective of hardware design, this is not conducive to the control of external devices by the board; especially in the later use process, especially when the interface shapes are similar, wrong insertion may occur, and the corresponding control function cannot be realized. In addition, it takes a lot of time and energy to troubleshoot interface problems during use. Summary of the invention
[0004] The technical problem to be solved by the present disclosure is to overcome the defects in the prior art that external devices need to be connected through dedicated interfaces, and when the number of external devices is large, it is easy to make mistakes in insertion, blind insertion cannot be performed, and accurate control cannot be achieved. A universal interface device, an operating method thereof, and an electronic device are provided.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] In a first aspect, a universal interface device is provided, the universal interface device comprising a control module and a plurality of identical interface modules, the universal interface device being connected to an external device via the interface modules;
[0007] The interface module is used to establish a communication link corresponding to the device communication interface of the external device, obtain the device identity information of the external device, and send the interface information of the interface module and the device identity information to the host computer via the control module;
[0008] The control module is used to receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module corresponding to the interface information to realize control over the external device.
[0009] Preferably, the control module is used to receive the instruction packet sent by the host computer, and filter out the preset control data corresponding to the device identity information in the instruction packet;
[0010] The instruction packet includes the device identity information of all the external devices and the preset control data corresponding to each piece of device identity information.
[0011] Preferably, the interface module is integrated with several different communication protocol units;
[0012] The interface module is used to select different communication protocol units in turn to communicate with the external device, and establish the communication link based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
[0013] Preferably, the interface module includes a plurality of chip select signal pins;
[0014] The chip select signal pin is used to send a chip select signal to the interface module;
[0015] The interface module is used to determine the communication type of the device communication interface of the external device based on the chip select signal, and establish the communication link based on the communication protocol corresponding to the communication type;
[0016] Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
[0017] Preferably, the control module includes a communication logic unit and a data processing unit;
[0018] The communication logic unit is used to receive the device identity information of the external device sent by the interface module;
[0019] The data processing unit is used to map each control item in the preset control data to each device control pin of the external device based on the device identity information;
[0020] The preset control data includes the control items and the corresponding relationship between the control items and the device control pins.
[0021] Preferably, the interface control pin of the interface module is connected to the device control pin of the external device to send the control item to the corresponding device control pin.
[0022] Preferably, the number of the interface control pins is greater than or equal to a set value;
[0023] The set value is the maximum value of the number of device control pins corresponding to different external devices.
[0024] Preferably, the control module includes FPGA or MCU.
[0025] In a second aspect, a method for operating a universal interface device is also provided, and the method for operating the universal interface device is implemented based on the universal interface device described above;
[0026] The operation method comprises:
[0027] Establishing a communication link corresponding to the device communication interface of the external device, obtaining the device identity information of the external device, and sending the interface information of the interface module and the device identity information to the host computer;
[0028] Receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module corresponding to the interface information to achieve control over the external device.
[0029] Preferably, the step of establishing a communication link corresponding to the device communication interface of the external device includes:
[0030] Different communication protocol units in the interface module are selected in sequence to communicate with the external device, and the communication link is established based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
[0031] Preferably, the step of establishing a communication link corresponding to the device communication interface of the external device includes:
[0032] Sending a chip select signal to the interface module;
[0033] Determining a communication type of a device communication interface of the external device based on the chip select signal, and establishing the communication link based on a communication protocol corresponding to the communication type;
[0034] Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
[0035] Preferably, the step of mapping the preset control data to the interface module corresponding to the interface information includes:
[0036] Based on the device identity information, each control item in the preset control data is mapped to each device control pin of the external device;
[0037] The preset control data includes the control items and the corresponding relationship between the control items and the device control pins.
[0038] According to a third aspect, an electronic device is also provided, the electronic device comprising the universal interface device mentioned above.
[0039] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0040] The positive and progressive effects of this disclosure are:
[0041] The universal interface device, its operating method and electronic device disclosed in the present invention are designed to have a universal interface device with several identical interface modules. Different from the existing method of using a dedicated interface to connect to an external device, a communication link with the external device is established through the interface module in the universal interface device, and the device identity information of the external device is obtained, and the preset control data corresponding to the device identity information is mapped to the corresponding interface module to realize the control of the external device, and then the control of the external device connected to any interface module can be completed, and the wrong insertion situation that occurs when the number of external devices is large can be eliminated, thereby achieving blind insertion of the interface, improving the flexibility of the interface, improving the fault tolerance of the interface, and improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A first structural schematic diagram of a universal interface device provided in Embodiment 1 of the present disclosure;
[0043] Figure 2 A schematic diagram of the structure of an interface module in a universal interface device provided in Embodiment 1 of the present disclosure;
[0044] Figure 3 A second structural diagram of the universal interface device provided in Embodiment 1 of the present disclosure;
[0045] Figure 4 A first flow chart of the operation method of the universal interface device provided in Embodiment 2 of the present disclosure;
[0046] Figure 5 A second flow chart of the operation method of the universal interface device provided in Embodiment 2 of the present disclosure;
[0047] Figure 6 A third flow chart of the operating method of the universal interface device provided in Embodiment 2 of the present disclosure;
[0048] Figure 7 A fourth flow chart of the operating method of the universal interface device provided in Embodiment 2 of the present disclosure;
[0049] Figure 8 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present disclosure. DETAILED DESCRIPTION
[0050] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0051] Example 1
[0052] This embodiment provides a universal interface device, such as Figure 1 As shown, the universal interface device includes a control module 1 and a plurality of identical interface modules 2, and the universal interface device is connected to an external device via the interface module 2;
[0053] The interface module 2 is used to establish a communication link corresponding to the device communication interface of the external device, obtain the device identity information of the external device, and send the interface information and device identity information of the interface module to the host computer via the control module 1;
[0054] The control module 1 is used to receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module 2 corresponding to the interface information to realize the control of the external device.
[0055] When an external device is plugged into the interface module, the interface module will establish a communication link corresponding to the device communication interface of the external device and obtain the device identity information of the external device. Each external device has unique device identity information for easy identification. Each external device has corresponding preset control data, which includes specific control content corresponding to each control pin.
[0056] Specifically, a communication link can be established with an external device through a communication pin of the interface module, and a corresponding ground pin can also be set for the communication pin.
[0057] The universal interface device in this embodiment is designed to have a universal interface device with several identical interface modules. Different from the existing method of using a dedicated interface to connect to an external device, a communication link with the external device is established through the interface module in the universal interface device, and the device identity information of the external device is obtained, and the preset control data corresponding to the device identity information is mapped to the corresponding interface module to realize the control of the external device, and then the control of the external device connected to any interface module can be completed, eliminating the wrong insertion situation when the number of external devices is large, thereby achieving blind insertion of the interface, improving the interface flexibility, improving the interface fault tolerance, and improving the user experience.
[0058] In an optional implementation, the control module 1 is used to receive the instruction packet sent by the host computer, and filter out the preset control data corresponding to the device identity information in the instruction packet;
[0059] The instruction packet includes the device identity information of all external devices and the preset control data corresponding to each device identity information.
[0060] If the universal interface device includes N interface modules, then N external devices can be connected.
[0061] For example, the universal interface device includes 6 interface modules, which can connect 6 external devices, wherein the device identity information of the 6 external devices is external device A1, external device A2, external device A3, external device A4, external device A5 and external device A6; the interface information of the 6 interface modules is interface B1, interface B2, interface B3, interface B4, interface B5 and interface B6.
[0062] Each external device has its own corresponding preset control data. The preset control data of each external device are placed together to form an instruction package, that is, the instruction package includes the device identity information of all external devices and the preset control data corresponding to each device identity information; when it is detected that the external device A1 is inserted into the interface B2, the host computer sends the instruction package to the control module, and the control module selects the preset control data corresponding to the external device A1 in the instruction package, and sends the preset control data to the interface B2, thereby realizing the control of the external device A1.
[0063] Alternatively, when it is detected that the external device A1 is plugged into the interface B2, the host computer will directly send the preset control data corresponding to the external device A1 to the interface B2, thereby realizing the control of the external device A1.
[0064] The above description is merely an exemplary description and should not be construed as limiting the embodiments of the present disclosure.
[0065] The universal interface device in this embodiment can obtain the device identity information of the external device, filter out the preset control data corresponding to the device identity information in the instruction packet according to the device identity information, and map the preset control data corresponding to the external device to the corresponding interface module to realize the control of the external device, and then complete the control of the external device connected to any interface module, eliminate the wrong insertion situation when the number of external devices is large, and thus achieve blind insertion of the interface, improve the flexibility of the interface, improve the interface fault tolerance, and improve the user experience.
[0066] In an optional embodiment, if Figure 2 As shown, the interface module 2 is integrated with several different communication protocol units 21;
[0067] The interface module 2 is used to select different communication protocol units 21 in turn to communicate with the external device, and establish a communication link based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
[0068] The interface module integrates several different communication protocol units, such as network port unit, RS232 (a serial communication protocol) unit, RS485 (a serial communication protocol) unit, RS422 (a serial communication protocol) unit and USB (Universal Serial Bus) unit, etc. The external device has its own communication interaction and other device communication interfaces. After the external device is inserted into the interface module, the interface module needs to establish a communication link corresponding to the device communication interface of the external device.
[0069] For example, after the external device A1 is inserted into the interface B2, the interface B2 needs to adopt the communication protocol corresponding to the communication type of the device communication interface of the external device A1 to establish a corresponding communication link. At this time, the interface module needs to select different communication protocol units in turn to communicate with the external device, and establish a communication link based on the communication protocol corresponding to the target communication protocol unit with successful communication.
[0070] Specifically, after the external device A1 is inserted into the interface B2, the interface module uses the network port unit, RS232 unit and RS485 unit in turn to communicate with the external device A1. If the RS485 unit communicates successfully with the external device A1, it indicates that the communication type of the device communication interface of the external device A1 is RS485. The RS485 communication protocol corresponding to the RS485 unit is used to establish a communication link to communicate with the external device A1 for data transmission and control.
[0071] After the communication link is established, the external device can send device identity information to the interface module so that the interface module can accurately obtain the device identity information of the external device. For example, the interface B2 can now know that the external device A1 is connected.
[0072] The above description is merely an exemplary description and should not be construed as limiting the embodiments of the present disclosure.
[0073] The universal interface device in this embodiment successfully establishes a communication link between the interface module and the external device based on the communication protocol unit, can obtain the device identity information of different external devices, and map the preset control data corresponding to the external device to the corresponding interface module to achieve control of the external device, and further complete the control of the external device connected to any interface module.
[0074] In an optional implementation, the interface module 2 includes a plurality of chip selection signal pins;
[0075] The chip select signal pin is used to send a chip select signal to the interface module 2;
[0076] The interface module is used to determine the communication type of the device communication interface of the external device based on the chip selection signal, and establish a communication link based on the communication protocol corresponding to the communication type;
[0077] Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
[0078] The interface module includes several chip select signal pins, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface; for example, the chip select signal corresponding to the chip select signal pin P1 characterizes that the communication type of the device communication interface is a network port, the chip select signal corresponding to the chip select signal pin P2 characterizes that the communication type of the device communication interface is RS232, the chip select signal corresponding to the chip select signal pin P3 characterizes that the communication type of the device communication interface is RS485, the chip select signal corresponding to the chip select signal pin P4 characterizes that the communication type of the device communication interface is RS422, and the chip select signal corresponding to the chip select signal pin P5 characterizes that the communication type of the device communication interface is USB.
[0079] For example, after the external device A2 is inserted into the interface B3, the interface B3 needs to adopt the communication protocol corresponding to the communication type of the device communication interface of the external device A2 to establish a corresponding communication link; when the external device A2 is inserted into the interface B3, the chip select signal is triggered, for example, the chip select signal pin P4 sends the chip select signal to the interface module. Since the chip select signal corresponding to the signal pin P4 indicates that the communication type of the device communication interface is RS422, the interface module knows that the communication protocol corresponding to the communication type of the device communication interface of the external device A2 is RS422, and adopts the RS422 communication protocol to establish a communication link to communicate with the external device A2 to facilitate data transmission and control.
[0080] After the communication link is established, the external device can send device identity information to the interface module so that the interface module can accurately obtain the device identity information of the external device. For example, the interface B3 can now know that the external device A2 is connected.
[0081] The above description is merely an exemplary description and should not be construed as limiting the embodiments of the present disclosure.
[0082] The universal interface device in this embodiment can quickly and accurately establish a communication link between the interface module and the external device based on the chip select pin, so as to obtain the device identity information of different external devices and map the preset control data corresponding to the external device to the corresponding interface module to realize the control of the external device, thereby completing the control of the external device connected to any interface module.
[0083] In an optional embodiment, if Figure 3 As shown, the control module 1 includes a communication logic unit 11 and a data processing unit 12;
[0084] The communication logic unit 11 is used to receive the device identity information of the external device sent by the interface module;
[0085] The data processing unit 12 is used to map each control item in the preset control data to each interface control pin of the interface module based on the device identity information;
[0086] The preset control data includes control items and corresponding relationships between control items and interface control pins.
[0087] For example, when the external device A2 is plugged into the interface B3, the communication logic unit can know that the interface B3 is connected to the external device A2 by receiving the device identity information of the external device sent by the interface module.
[0088] Specifically, the preset control data includes control items and the corresponding relationship between the control items and the interface control pins. For example, the preset control data corresponding to the external device A2 includes several control items of the external device A2 and the corresponding relationship between each control item and the device control pin. If the type of the external device A2 is a glue dispenser, the device control pins are pins C1-C3, the control item of pin C1 in the preset control data is the glue discharge rate, the control item of pin C2 is the glue discharge temperature, and the control item of pin C3 is the opening or closing of the glue outlet; the data processing unit maps each control item in the preset control data of the external device A2 to each device control pin of the external device to achieve precise control of the external device A2.
[0089] The universal interface device of this embodiment can adaptively map each control item in the preset control data to each device control pin of the external device, thereby realizing precise control of each external device and completing the control of the external device connected to any interface module.
[0090] In an optional embodiment, if Figure 3 As shown, the interface control pin of the interface module is connected to the device control pin of the external device to send the control item to the corresponding device control pin.
[0091] For example, external device A2 is inserted into interface B3, interface control pin D1 of interface B3 is connected to device control pin C1 of external device A2, interface control pin D2 of interface B3 is connected to device control pin C2 of external device A2, and interface control pin D3 of interface B3 is connected to device control pin C3 of external device A2; then the data processing unit sends the control item corresponding to pin C3 in the preset control data of external device A2 to interface control pin D3 of interface B3, sends the control item corresponding to pin C2 in the preset control data to interface control pin D2 of interface B3, and sends the control item corresponding to pin C1 in the preset control data to interface control pin D1 of interface B3, thereby sending the corresponding control item to each device control pin of external device A2 via the interface control pin of interface B3, so as to realize precise control of external device A2 and adaptive forwarding of preset control data.
[0092] If during a certain use, the external device A2 is inserted into the interface B4, the data processing unit will send the control items corresponding to each pin in the preset control data of the external device A2 to the control pin corresponding to the interface B4. For example, if the interface control pin D3 inserted into the interface B4 is connected with the S device control pin C2 of the external device A2, the control item corresponding to the device control pin C2 will be sent to the interface control pin D3 of the interface B4 to achieve precise control of the external device A2.
[0093] In an optional implementation, the number of interface control pins is greater than or equal to a set value; the set value is the maximum value of the number of device control pins corresponding to different external devices.
[0094] For example, the universal interface device includes 6 interface modules, which can connect 6 external devices. The number of device control pins corresponding to external device A1 is 5, the number of device control pins corresponding to external device A2 is 3, the number of device control pins corresponding to external device A3 is 4, the number of device control pins corresponding to external device A4 is 6, the number of device control pins corresponding to external device A5 is 4, and the number of device control pins corresponding to external device A6 is 7. The maximum value of the corresponding number of device control pins in the external device is 7, that is, the set value is 7, then the number of interface control pins of the interface module in the universal interface device is greater than or equal to 7, so as to ensure that the interface is blindly plugged in, thereby improving the interface fault tolerance.
[0095] The interface module may also be provided with ground pins corresponding to the number of interface control pins.
[0096] In an optional implementation, the control module 1 includes but is not limited to FPGA or MCU.
[0097] FPGA (Field Programmable Gate Array) chips are mainly composed of programmable functional units and memory, including configurable logic modules, clock resources, block storage, input and output modules, and board-level interconnect modules. FPGA chips have strong digital signal processing capabilities, rich and diverse adapter interfaces, powerful algorithm customization units, and flexible reconfiguration and control capabilities.
[0098] MCU (Microcontroller Unit), also known as a single-chip microcomputer or single-chip microcomputer, is a chip-level computer that appropriately reduces the frequency and specifications of the central processing unit (CPU) and integrates peripheral interfaces such as memory and counters on a single chip to provide different combination controls for different application scenarios.
[0099] Example 2
[0100] This embodiment provides an operation method of a universal interface device, and the operation method is implemented based on the universal interface device in Embodiment 1; Figure 4 As shown, the operation method includes:
[0101] S101, establishing a communication link corresponding to the device communication interface of the external device, obtaining device identity information of the external device, and sending the interface information and device identity information of the interface module to the host computer.
[0102] S102: Receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module corresponding to the interface information to realize control of the external device.
[0103] The operating method of the universal interface device of this embodiment is implemented based on the universal interface device in Example 1. Specifically, step S101 can be implemented based on the interface module of the universal interface device in Example 1, and step S102 can be implemented based on the control module of the universal interface device in Example 1.
[0104] The operating method of the universal interface device in this embodiment is implemented based on the universal interface device in Example 1. The universal interface device has several identical interface modules. Different from the existing method of using a dedicated interface to connect to an external device, a communication link with the external device is established through the interface module in the universal interface device, and the device identity information of the external device is obtained, and the preset control data corresponding to the device identity information is mapped to the corresponding interface module to realize the control of the external device, and then the control of the external device connected to any interface module can be completed, and the wrong insertion situation that occurs when the number of external devices is large can be eliminated, thereby achieving blind insertion of the interface, improving the flexibility of the interface, improving the interface fault tolerance, and improving the user experience.
[0105] In an optional embodiment, if Figure 5 As shown, step S101 includes:
[0106] S1011. Select different communication protocol units in the interface module in turn to communicate with the external device, and establish a communication link based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
[0107] S1012: Obtain device identity information of the external device, and send the interface information and device identity information of the interface module to the host computer.
[0108] In this embodiment, based on the successful establishment of a communication link between the interface module and the external device by the communication protocol unit, the device identity information of the external device can be obtained, and the preset control data corresponding to the external device can be mapped to the corresponding interface module to achieve control of the external device, thereby completing the control of the external device connected to any interface module.
[0109] In an optional embodiment, if Figure 6 As shown, step S101 includes:
[0110] S1013. Send a chip select signal to the interface module.
[0111] S1014, determining the communication type of the device communication interface of the external device based on the chip select signal, and establishing a communication link based on the communication protocol corresponding to the communication type;
[0112] S1015. Obtain device identity information of the external device, and send the interface information and device identity information of the interface module to the host computer.
[0113] Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
[0114] In this embodiment, the communication link between the interface module and the external device is established quickly and accurately based on the chip select pin, which can realize the acquisition of device identity information of different external devices, and map the preset control data corresponding to the external device to the corresponding interface module to realize the control of the external device, and further complete the control of the external device connected to any interface module.
[0115] In an optional embodiment, if Figure 7 As shown, step S102 includes:
[0116] S1021. Receive preset control data corresponding to the device identity information sent by the host computer.
[0117] S1022: Based on the device identity information, map each control item in the preset control data to each interface control pin of the interface module.
[0118] The preset control data includes control items and corresponding relationships between control items and interface control pins.
[0119] In this embodiment, the universal interface device can adaptively map each control item in the preset control data to each device control pin of the external device, thereby achieving precise control of the external device and completing the control of the external device connected to any interface module.
[0120] The working principle of the operation method of the universal interface device in this embodiment is the same as the working principle of the universal interface device in Example 1, and will not be repeated here.
[0121] Example 3
[0122] This embodiment provides an electronic device, such as Figure 8 As shown, the electronic device includes the universal interface device in Example 1.
[0123] The electronic device of this embodiment may also include other components, such as the host computer in Embodiment 1. The electronic device of this embodiment may also be referred to as an integrated device.
[0124] The electronic device of this embodiment includes the universal interface device in Embodiment 1. The interface device has several identical interface modules. Different from the existing method of using a dedicated interface to connect to an external device, a communication link with the external device is established through the interface module in the universal interface device, and the device identity information of the external device is obtained, and the preset control data corresponding to the device identity information is mapped to the corresponding interface module to realize the control of the external device, and then the control of the external device connected to any interface module can be completed, and the wrong insertion situation that occurs when the number of external devices is large can be eliminated, thereby achieving blind insertion of the interface, improving the flexibility of the interface, improving the interface fault tolerance, and improving the user experience.
[0125] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A universal interface device, characterized in that: The universal interface device comprises a control module and a plurality of identical interface modules, and the universal interface device is connected to an external device via the interface modules; The interface module is used to establish a communication link corresponding to the device communication interface of the external device, obtain the device identity information of the external device, and send the interface information of the interface module and the device identity information to the host computer via the control module; The control module is used to receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module corresponding to the interface information to realize control over the external device.
2. The universal interface device according to claim 1, characterized in that: The control module is used to receive the instruction packet sent by the host computer, and filter out the preset control data corresponding to the device identity information in the instruction packet; The instruction packet includes the device identity information of all the external devices and the preset control data corresponding to each piece of device identity information.
3. The universal interface device according to claim 1, characterized in that: The interface module is integrated with several different communication protocol units; The interface module is used to select different communication protocol units in turn to communicate with the external device, and establish the communication link based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
4. The universal interface device according to claim 1, characterized in that: The interface module includes a number of chip selection signal pins; The chip select signal pin is used to send a chip select signal to the interface module; The interface module is used to determine the communication type of the device communication interface of the external device based on the chip select signal, and establish the communication link based on the communication protocol corresponding to the communication type; Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
5. The universal interface device according to claim 1, characterized in that: The control module includes a communication logic unit and a data processing unit; The communication logic unit is used to receive the device identity information of the external device sent by the interface module; The data processing unit is used to map each control item in the preset control data to each device control pin of the external device based on the device identity information; The preset control data includes the control items and the corresponding relationship between the control items and the device control pins.
6. The universal interface device according to claim 5, characterized in that: The interface control pin of the interface module is connected to the device control pin of the external device to send the control item to the corresponding device control pin.
7. The universal interface device according to claim 6, characterized in that: The number of the interface control pins is greater than or equal to a set value; The set value is the maximum value of the number of device control pins corresponding to different external devices.
8. The universal interface device according to any one of claims 1 to 7, characterized in that: The control module includes FPGA or MCU.
9. A method for operating a universal interface device, characterized in that: The operation method is implemented based on the universal interface device according to any one of claims 1 to 8; The operation method comprises: Establishing a communication link corresponding to the device communication interface of the external device, obtaining the device identity information of the external device, and sending the interface information of the interface module and the device identity information to the host computer; Receive preset control data corresponding to the device identity information sent by the host computer, and map the preset control data to the interface module corresponding to the interface information to achieve control over the external device.
10. The operating method according to claim 9, characterized in that: The step of establishing a communication link corresponding to the device communication interface of the external device includes: Different communication protocol units in the interface module are selected in sequence to communicate with the external device, and the communication link is established based on the communication protocol corresponding to the target communication protocol unit with which the communication is successful.
11. The operating method according to claim 9, characterized in that: The step of establishing a communication link corresponding to the device communication interface of the external device includes: Sending a chip select signal to the interface module; Determining a communication type of a device communication interface of the external device based on the chip select signal, and establishing the communication link based on a communication protocol corresponding to the communication type; Among them, different chip select signal pins correspond to different chip select signals, and the chip select signal is used to characterize the communication type of the device communication interface.
12. The operating method according to claim 9, characterized in that: The step of mapping the preset control data to the interface module corresponding to the interface information comprises: Based on the device identity information, each control item in the preset control data is mapped to each device control pin of the external device; The preset control data includes the control items and the corresponding relationship between the control items and the device control pins.
13. An electronic device, characterized in that: The electronic device comprises the universal interface device according to any one of claims 1-8.