Gateway control method and apparatus, gateway, and storage medium

By sending communication protocol identification information when the gateway detects the device's access, the target unit circuit is automatically identified and matched, which solves the problem of design limitations of multi-mode gateway interfaces and realizes flexible access and efficient connection of devices.

CN119449915BActive Publication Date: 2025-11-18GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411617213.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-13
Publication Date
2025-11-18
Estimated Expiration
2044-11-13

AI Technical Summary

Technical Problem

The interface design of existing multimode gateways limits the flexibility of device access, making it difficult for users to connect the device correctly without being familiar with the communication protocols and interfaces, resulting in connection failures and user complaints.

Method used

When a gateway detects an access device, it sends identification information for multiple communication protocols. The device selects the target identification information, and the gateway controls the target unit circuit to conduct in order to achieve access. It supports automatic identification and matching of multiple protocols.

Benefits of technology

It enables seamless connectivity between devices using different protocols, improves user experience and device access success rate, saves energy and reduces connection complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119449915B_ABST
    Figure CN119449915B_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to a gateway control method and device, a gateway and a storage medium. The method comprises: when a first interface of the gateway accesses a device, sending identification information of a plurality of communication protocols included in the first interface to the device, so that the device determines target identification information from the plurality of identification information; receiving the target identification information returned by the device; determining a target unit circuit corresponding to the target identification information from a plurality of unit circuits corresponding to the first interface; and controlling the target unit circuit to be turned on, so that the device accesses the gateway through the target unit circuit. Thus, by detecting the access device, controlling each unit circuit of the gateway according to the identification information of the communication protocol supported by the device, devices of different protocols can be smoothly accessed to the gateway, automatic identification and matching of multiple protocols are realized, and users can connect the device to the gateway without being familiar with the communication protocol and the interface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of gateway technology, and in particular to a gateway control method, device, gateway, and storage medium. Background Technology

[0002] In IoT applications, while existing multi-mode gateways on the market support multiple communication protocols, they still face significant limitations in interface usage. Current multi-mode gateways typically use a single interface protocol to connect devices; for example, devices supporting the UART protocol can only connect to the gateway via the UART interface and cannot use other interfaces. This design restricts device access flexibility and increases complexity and confusion for users. Ordinary users often lack in-depth understanding of device communication protocols and cannot accurately determine the protocols supported by the gateway and their corresponding interface types. To ensure proper communication between the device and the gateway, users must match the correct protocol to the interface of both devices, which poses a significant obstacle for non-technical users. Due to this interface limitation, users may arbitrarily choose interfaces, leading to device connection failures and resulting in numerous user complaints and product feedback.

[0003] Therefore, how to enable users to connect devices to the gateway without being familiar with communication protocols and interfaces has become an urgent problem to be solved. Summary of the Invention

[0004] In view of this, in order to solve the above-mentioned technical problems or some of the technical problems, the present invention provides a gateway control method, device, gateway and storage medium.

[0005] In a first aspect, embodiments of the present invention provide a gateway control method, comprising:

[0006] When a device is detected to be connected to the first interface of the gateway, the gateway sends identification information of multiple communication protocols included in the first interface to the device, so that the device can determine the target identification information from the multiple identification information.

[0007] Receive the target identification information returned by the device;

[0008] From the multiple unit circuits corresponding to the first interface, determine the target unit circuit corresponding to the target identification information;

[0009] The target unit circuit is turned on so that the device can access the gateway through the target unit circuit.

[0010] In one possible implementation, when a gateway's first interface is detected to be connected to a device, sending identification information of multiple communication protocols included in the first interface to the device includes:

[0011] When the sensor detects that a device is connected to the first interface of the gateway, it controls the multiple unit circuits included in the first interface to be turned on.

[0012] Obtain the communication protocol corresponding to each unit circuit included in the first interface to obtain multiple communication protocols;

[0013] The identification information of the multiple communication protocols is sent to the device.

[0014] In one possible implementation, sending the identification information of the plurality of communication protocols to the device includes:

[0015] Each unit circuit of the first interface is controlled to send identification information of the communication protocol to the device, so that the device can obtain multiple first communication protocols supported by the first interface from the target field of each identification information, and obtain the second communication protocol supported by the device. When the second communication protocol is included among the multiple first communication protocols, the identification information corresponding to the second communication protocol is determined as the target identification information.

[0016] In one possible implementation, the method further includes:

[0017] When a device is detected connected to the first interface of the gateway, all unit circuits included in the non-first interfaces of the gateway are disconnected.

[0018] When the device is connected to the gateway through the target unit circuit, the non-target unit circuit in the first interface is disconnected.

[0019] In one possible implementation, the method further includes:

[0020] When the target identification information returned by the device is not received, a second interface is determined from the non-first interface. The second interface includes at least one third communication protocol, and the third communication protocol is different from the multiple communication protocols included in the first interface.

[0021] Control the conduction of all unit circuits included in the second interface;

[0022] Generate a reminder message to remind the device to switch to the second interface;

[0023] When the device detects that the second interface is connected, at least one identification information of the third communication protocol is sent to the device.

[0024] In one possible implementation, when the device returns multiple pieces of the identification information, the method further includes:

[0025] Obtain the current gateway attributes of the gateway and the data transmission attributes of the device. The gateway attributes include: network environment, and / or, security requirements. The data transmission attributes include: data transmission efficiency, and / or, data transmission type.

[0026] The target identification information is determined from a plurality of identification information based on the gateway attributes and the data transmission attributes.

[0027] In one possible implementation, after controlling the multiple unit circuits in the gateway according to the target identification information, the method further includes:

[0028] The gateway is controlled to communicate with the device via the target communication protocol corresponding to the target unit circuit and the target identification information.

[0029] When the communication requirements of the device change, the step of sending identification information of multiple communication protocols included in the first interface to the device is repeated so that the device can determine the target identification information from the multiple identification information.

[0030] In a second aspect, embodiments of the present invention provide a gateway control device, comprising:

[0031] The sending module is configured to send identification information of multiple communication protocols included in the first interface to the device when the first interface of the gateway is detected to be connected to the device, so that the device can determine the target identification information from the multiple identification information;

[0032] A receiving module is used to receive the target identification information returned by the device;

[0033] The determining module is used to determine the target unit circuit corresponding to the target identification information from multiple unit circuits corresponding to the first interface;

[0034] A control module is used to control the target unit circuit to be turned on, so that the device can access the gateway through the target unit circuit.

[0035] Thirdly, embodiments of the present invention provide a gateway, including: a processor and a memory, wherein the processor is configured to execute a gateway control program stored in the memory to implement the gateway control method described in any of the first aspects above.

[0036] Fourthly, embodiments of the present invention provide a storage medium storing one or more programs, which can be executed by one or more processors to implement the gateway control method described in any of the first aspects above.

[0037] The gateway control scheme provided in this invention, when a device is detected connected to the gateway's first interface, sends identification information of multiple communication protocols included in the first interface to the device, enabling the device to determine the target identification information from the multiple identification information; receives the target identification information returned by the device; determines the target unit circuit corresponding to the target identification information from multiple unit circuits corresponding to the first interface; and controls the target unit circuit to conduct, so that the device can connect to the gateway through the target unit circuit. Therefore, by detecting the connected device and controlling each unit circuit of the gateway according to the identification information of the communication protocols supported by the device, devices with different protocols can smoothly connect to the gateway, achieving automatic identification and matching of multiple protocols, allowing users to connect devices to the gateway even if they are unfamiliar with the communication protocols and interfaces. Attached Figure Description

[0038] Figure 1 A flowchart illustrating a gateway control method provided in an embodiment of the present invention;

[0039] Figure 2 A flowchart illustrating another gateway control method provided in an embodiment of the present invention;

[0040] Figure 3 This is a schematic diagram of the structure of a gateway control device provided in an embodiment of the present invention;

[0041] Figure 4 This is a schematic diagram of the structure of a gateway provided in an embodiment of the present invention;

[0042] Figure 5 This is a schematic diagram of another gateway structure provided in an embodiment of the present invention;

[0043] Figure 6 This is a flowchart illustrating another gateway control method provided in an embodiment of the present invention. Detailed Implementation

[0044] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0045] To facilitate understanding of the embodiments of the present invention, further explanations and descriptions will be provided below with reference to the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of the present invention.

[0046] Figure 1This is a flowchart illustrating a gateway control method provided in an embodiment of the present invention, as shown below. Figure 1 As shown, the method specifically includes:

[0047] S11. When the gateway detects that the first interface of the gateway is connected to the device, the gateway sends identification information of multiple communication protocols included in the first interface to the device so that the device can determine the target identification information from the multiple identification information.

[0048] The gateway control method provided in this invention is applied to a gateway, which may include a power interface, multiple communication interfaces, etc. Each communication interface is connected to the gateway's main control unit through multiple modularly designed unit circuits. Each unit circuit can support devices with different communication protocols. Devices with different communication protocols can access the gateway through the interface, and then the corresponding unit circuit of the device converts the protocol into a unified interface protocol for the main control unit to parse and report. Remote control is possible via wired network or WiFi modules connected to the gateway to the cloud. Specifically, by detecting the access devices, the method controls each unit circuit of the gateway according to the identification information of the communication protocols supported by the devices, enabling devices with different protocols to successfully access the gateway through the unit circuits.

[0049] In this embodiment, each unit circuit of each interface of the gateway corresponds to a connectable communication protocol, and each communication protocol corresponds to a unique identification information. Under the condition that the gateway and the device are powered on normally, the device connects to the gateway through any of the first interfaces of the gateway. After the gateway detects that the first interface is connected, it actively sends the identification information of multiple communication protocols corresponding to the unit circuits included in the first interface to the device.

[0050] Furthermore, after receiving multiple identification information, the device parses the identification information and determines the identification information corresponding to the communication protocol supported by the device as the target identification information.

[0051] S12, Receive target identification information returned by the receiving device.

[0052] In this embodiment, the identification information can be a protocol identifier, used to identify the type of communication protocol the device is using. Communication protocols can include, but are not limited to, MQTT (Message Queuing Telemetry Transport Protocol), HTTP (Hypertext Transfer Protocol), Modbus, UART, RS-485, etc. The gateway can select the appropriate protocol stack by reading the protocol identifier, ensuring compatibility with the device. Specifically, after determining the target identification information, the device sends it to the gateway's main controller. The main controller can determine the target communication protocol currently supported by the device based on the target identification information, and determine the target unit circuit corresponding to the target communication protocol in the first interface. The target unit circuit and the target communication protocol are used to enable the device to access the gateway and communicate.

[0053] S13. Determine the target unit circuit corresponding to the target identification information from the multiple unit circuits corresponding to the first interface; control the target unit circuit to be turned on so that the device can access the gateway through the target unit circuit.

[0054] In this embodiment, the main controller disconnects all interfaces other than the first interface and all unit circuits included in the other interfaces to save energy and reduce processing pressure. The target communication protocol and target unit circuit corresponding to the target identification information are determined. The target unit circuit in the first interface is turned on, while other unit circuits are turned off, enabling the device to connect to the target unit circuit via the target communication protocol. The target unit circuit can convert the target communication protocol into a unified communication protocol that can communicate with the gateway, thus enabling communication with the network gateway. When the gateway supports direct communication via the target communication protocol, the device can directly communicate and connect with the gateway via the target communication protocol.

[0055] The gateway control method provided in this embodiment of the invention, when a device is detected connected to the gateway's first interface, sends identification information of multiple communication protocols included in the first interface to the device, enabling the device to determine the target identification information from the multiple identification information; receives the target identification information returned by the device; determines the target unit circuit corresponding to the target identification information from multiple unit circuits corresponding to the first interface; and controls the target unit circuit to conduct, so that the device can connect to the gateway through the target unit circuit. Therefore, by detecting the access device status and controlling each unit circuit of the gateway according to the identification information of the communication protocols supported by the device, devices with different protocols can smoothly connect to the gateway, achieving automatic identification and matching of multiple protocols, allowing users to connect devices to the gateway even if they are unfamiliar with the communication protocols and interfaces.

[0056] Figure 2 This is a flowchart illustrating another gateway control method provided in an embodiment of the present invention, as shown below. Figure 2 As shown, the method specifically includes:

[0057] S21. When the first interface of the gateway is detected to be connected to the device by the sensing device, the multiple unit circuits included in the first interface are controlled to be turned on; the communication protocol corresponding to each unit circuit included in the first interface is obtained to obtain multiple communication protocols; and the identification information of the multiple communication protocols is sent to the device.

[0058] In this embodiment, when a device is detected to be connected to any interface of the gateway by a sensing device installed on the interface, the sensing device sends the connection information of the interface to the gateway. The gateway determines that the interface is the first interface and triggers the connection logic, controlling all the unit circuits included in the first interface to be turned on in order to wait for the device to connect. At the same time, the gateway is able to fully connect to and identify the communication protocol of the device.

[0059] Furthermore, the gateway pre-obtains the corresponding communication protocol type from each unit circuit of the first interface, forming a communication protocol list containing all protocol information supported by the first interface. The gateway uniformly sends the identification information of multiple communication protocols to the accessed device, enabling the device to identify the communication protocol options supported by the gateway through multiple identification information and select the most suitable communication protocol for communication connection.

[0060] As an example, such as Figure 5 The diagram shows another gateway structure provided in an embodiment of the present invention. The gateway may include a first interface (interface one), a second interface (interface two), and a third interface (interface three). Each interface is connected to the gateway's main control unit through a corresponding unit circuit (unit circuit one, unit circuit two, and unit circuit three). The gateway's main control unit can also be connected to a power interface through a power conversion unit circuit, to a wired network interface through a conversion unit circuit, to the cloud through a Wi-Fi module, and to other unit circuits. When a device is connected to the first interface, all unit circuits in the second and third interfaces are disconnected, and the unit circuits in the first interface are controlled to be turned on. Each unit circuit of the first interface is controlled to send communication protocol identification information to the device.

[0061] In one possible implementation, when the first interface of the gateway is detected to be connected to a device, all other non-first interfaces in the gateway and all their connected unit circuits are disconnected to ensure the uniqueness of the first interface connection and prevent interference from multiple interfaces, while saving energy.

[0062] S22, to enable the device to obtain multiple first communication protocols supported by the first interface from the target field of each identification information, and to obtain a second communication protocol supported by the device, and when the multiple first communication protocols include the second communication protocol, to determine the identification information corresponding to the second communication protocol as the target identification information.

[0063] In this embodiment, the device extracts all communication protocols supported by the first interface from the target field of multiple identification information sent by the gateway, obtaining multiple first communication protocols. Simultaneously, the device detects and lists the communication protocols it supports as second communication protocols. The device compares its own second communication protocol with each of the multiple first communication protocols of the first interface to find commonly supported communication protocols. When multiple first communication protocols contain a second communication protocol, the device determines the identification information corresponding to that communication protocol as the target identification information, thereby achieving communication protocol matching. This ensures that the device and the gateway can automatically select a matching communication protocol for connection, eliminating the need for manual configuration by the user. Through the selection of target identification information, the gateway and device can achieve seamless communication, improving the compatibility and ease of use of device access and reducing the possibility of connection failure.

[0064] As an example, suppose the device parses the target field data as 111, indicating that the three unit circuits of the gateway's first interface support the 485, CAN, and UART protocols (multiple first communication protocols) respectively, and the device supports the 485 protocol (second communication protocol). Then the device returns a 100 identification information to the gateway, indicating that the target communication protocol supported by the device is the 485 protocol.

[0065] S23. Receive the target identification information returned by the receiving device.

[0066] In this embodiment, the procedure is similar to step S12, and can be referred to in detail. Figure 1 For the sake of brevity, the relevant content will not be elaborated upon here.

[0067] S24. Determine the target unit circuit corresponding to the target identification information from the multiple unit circuits corresponding to the first interface; control the target unit circuit to be turned on so that the device can access the gateway through the target unit circuit; control the non-target unit circuits in the first interface to be turned off.

[0068] In this embodiment, after receiving the target identification information, the gateway determines the target unit circuit of the first interface represented by the target identification information, and controls only the target unit circuit in the first interface to be turned on so that the device can communicate with the gateway through the target unit circuit. At the same time, it controls the non-target unit circuits to be turned off to reduce communication interference and reduce energy consumption.

[0069] In one possible implementation, when no target identification information is received from the device, a second interface is determined from the non-first interface, and all unit circuits of the second interface in the control gateway are turned on. The second interface includes at least one third communication protocol, which is different from the multiple communication protocols included in the first interface. A reminder message is generated to remind the device to switch to the second interface. When the second interface is detected to be connected to the device, identification information of at least one third communication protocol is sent to the device.

[0070] Specifically, when no target identification information is received, it indicates that all communication protocols supported by the current first interface do not match the communication protocols supported by the device. Therefore, it is necessary to determine whether the communication protocols of the unit circuits included in other interfaces match the device. That is, to identify the communication protocols supported by all unit circuits included in the gateway's non-first interfaces. When any non-first interface contains at least one third communication protocol, it is determined that the interface is the second interface, where the third communication protocol is a communication protocol not supported by the unit circuits of the first interface. At the same time, all unit circuits of the second interface are controlled to be turned on, or all unit circuits corresponding to the third communication protocol are controlled to be turned on. A reminder message is generated based on the second interface and sent to the device for display, so that the device can connect to the second interface. After connecting to the second interface, the first interface and its included unit circuits can be disconnected. When the second interface is detected to be connected to the device, at least one identification message of the third communication protocol is sent to the device and the subsequent steps are re-executed. Alternatively, the gateway can store the communication protocols supported by the device, determine the target interface and the unit circuit of the target interface that support the communication protocol, generate a reminder message based on the target interface and the unit circuit of the target interface, so as to remind the device to directly connect to the target interface and communicate through the unit circuit of the target interface.

[0071] In one possible implementation, when the device returns multiple identification information, the method further includes:

[0072] Obtain the current gateway attributes and device data transmission attributes. Gateway attributes include: network environment, and / or, security requirements. Data transmission attributes include: data transmission efficiency, and / or, data transmission type. Determine the target identification information from multiple identification information based on the gateway attributes and data transmission attributes.

[0073] Specifically, when a device supports identification information included in multiple first interfaces, the target identification information can be selected based on the current gateway attributes and / or data attributes. When the gateway attributes include the network environment, some protocols may not be applicable in different network environments. Therefore, it is necessary to select the target identification information corresponding to the communication protocol supported by the current network environment. For example, in low-bandwidth or high-latency environments, lightweight protocols (such as CoAP or MQTT) are more suitable for IoT devices than HTTP. In this case, a suitable communication protocol can be selected from the communication protocols commonly supported by the device and the first interfaces.

[0074] When gateway attributes include security requirements, since devices have high security requirements for data transmission in certain application scenarios, it is necessary to select a communication protocol that can be encrypted. The target identification information corresponding to the communication protocol that supports encrypted transmission can be determined from multiple identification information to make data transmission more secure (e.g., HTTPS or MQTT over TLS).

[0075] When the data transmission attribute is data transmission efficiency, if the current scenario requires high transmission efficiency, the target identification information corresponding to the communication protocol with lower protocol overhead and higher data transmission efficiency can be selected. For example, low-power devices typically choose lightweight communication protocols (such as CoAP or LoRa) rather than the HTTP protocol with higher data overhead.

[0076] When the data transmission attribute is a data transmission type, different protocols support different data types. Therefore, it is necessary to determine the target identifier information corresponding to the communication protocol based on the data type that the current device needs to transmit. For example, high-real-time monitoring data may require UDP, while non-real-time data can use HTTP or other TCP protocols. The required communication protocol can be determined based on the changes in data type and real-time requirements.

[0077] S25. The control gateway communicates with the device through the target unit circuit and the target communication protocol corresponding to the target identification information; when the device's communication requirements change, the step of sending the identification information of multiple communication protocols included in the first interface to the device is repeated so that the device can determine the target identification information from the multiple identification information.

[0078] In this embodiment, after the device connects to the gateway via the target unit circuit, it can communicate with the gateway according to the target communication protocol. The target communication protocol is converted by the target unit circuit to achieve communication with the gateway. During communication, if the device's communication requirements change, there may be a need to switch the communication protocol, and consequently, switch the unit circuit. In this case, it is necessary to re-execute the step of sending the identification information of multiple communication protocols included in the first interface to the device, so that the device can determine the target identification information from multiple identification information. This allows the device and the gateway to re-determine the communication interface and unit circuit. For example, when the application scenario changes, the device's communication requirements will also change. When the device is upgraded from local monitoring to remote control, it may need to switch from a local area network protocol (such as Modbus) to a protocol that supports cloud communication (such as MQTT).

[0079] As an example, such as Figure 6The diagram shows a flowchart of another gateway control method provided by an embodiment of the present invention. 1. Under the condition that the gateway and the device are powered on normally, the device connects to the gateway through an interface. After the gateway detects that the interface has been connected, it actively sends identification information of multiple protocols to the device. 2. After receiving the identification information of multiple protocols, the device parses and compares the protocol matching. After confirming that the protocol matches, it returns the determined target identification information to the gateway. 3. After receiving the target identification information, the gateway further parses and confirms it. ① The gateway main control program develops each interface, unit circuit and its corresponding function separately in a modular way, and makes strict module distinctions. Among them, the interface signal is the mark for starting the unit circuit and the corresponding function; the determined target identification information is the mark for starting the correct function. ② When the main control detects that a certain interface is connected, it starts all the unit circuits under that interface, and at the same time starts the modular function corresponding to that interface, so that the main control can send identification information of multiple protocols. ③ When the main control receives the target identification information, it starts the function under the communication protocol corresponding to the target identification information. 4. Through the above parsing and confirmation, the communication protocol of the access device is finally confirmed, and the correct unit circuit is used to work, without the need for user identification, reducing the difficulty of user use. 5. The gateway shares one interface for every three unit circuits. Each interface is equipped with a sensor connected to the main controller to detect the interface's connection status. For interfaces not connected, the power supply to all corresponding unit circuits is disconnected to reduce power consumption. Once a connection is detected, the power supply to the unit circuits associated with that interface is restored. 6. The gateway has multiple interfaces, enabling simultaneous operation of devices using various protocols. 7. Once a gateway achieves normal communication on a particular interface, it disconnects the power supply to other unit circuits using incorrect protocols on that interface to reduce power consumption. 8. Each unit circuit of the gateway is independently connected to the main controller and does not interfere with others.

[0080] The gateway control method provided in this invention can detect the status of connected devices and control each unit circuit of the gateway according to the identification information of the communication protocols supported by the devices. This allows devices with different protocols to successfully connect to the gateway, achieving automatic identification and matching of multiple protocols. This enables users to connect devices to the gateway even if they are unfamiliar with the communication protocols and interfaces. Simultaneously, it can promptly disconnect unconnected interfaces and unused unit circuits to save energy. Furthermore, it can prompt devices to connect to other interfaces when no matching communication protocol exists for the current interface, improving the success rate of device connection to the gateway. When multiple communication protocols match the device for an interface, the most suitable communication protocol based on the current gateway attributes and data transmission attributes can be selected for communication connection, improving the accuracy and efficiency of communication between the device and the gateway.

[0081] Figure 3 This is a schematic diagram of the structure of a gateway control device provided in an embodiment of the present invention, as shown below. Figure 3 As shown, the device specifically includes:

[0082] The sending module 31 is used to send identification information of multiple communication protocols included in the first interface to the device when the first interface of the gateway is detected to be connected to the device, so that the device can determine the target identification information from the multiple identification information;

[0083] Receiving module 32 is used to receive the target identification information returned by the device;

[0084] The determining module 33 is used to determine the target unit circuit corresponding to the target identification information from the multiple unit circuits corresponding to the first interface;

[0085] The control module 34 is used to control the target unit circuit to be turned on, so that the device can access the gateway through the target unit circuit.

[0086] In one possible implementation, the sending module is specifically used to control the multiple unit circuits included in the first interface to be turned on when the first interface access device of the gateway is detected by the sensing device.

[0087] Obtain the communication protocol corresponding to each unit circuit included in the first interface to obtain multiple communication protocols;

[0088] The identification information of the multiple communication protocols is sent to the device.

[0089] In one possible implementation, the sending module is specifically configured to control each unit circuit of the first interface to send identification information of the communication protocol to the device, so that the device obtains multiple first communication protocols supported by the first interface from the target field of each identification information, and obtains a second communication protocol supported by the device. When the second communication protocol is included among the multiple first communication protocols, the identification information corresponding to the second communication protocol is determined as the target identification information.

[0090] In one possible implementation, the control module is further configured to disconnect all unit circuits included in the non-first interface of the gateway when the first interface of the gateway is detected to be connected to a device.

[0091] When the device is connected to the gateway through the target unit circuit, the non-target unit circuit in the first interface is disconnected.

[0092] In one possible implementation, the determining module is further configured to determine a second interface from the non-first interface when the target identification information returned by the device is not received, the second interface including at least one third communication protocol, the third communication protocol being different from the multiple communication protocols included in the first interface;

[0093] The control module is also used to control the conduction of all unit circuits included in the second interface;

[0094] The generation module 35 is used to generate reminder information to remind the device to switch to the second interface.

[0095] The sending module is further configured to send at least one identification information of the third communication protocol to the device when the second interface is detected to be connected to the device.

[0096] In one possible implementation, the acquisition module 36 is used to acquire the current gateway attributes of the gateway and the data transmission attributes of the device. The gateway attributes include: network environment, and / or, security requirements. The data transmission attributes include: data transmission efficiency, and / or, data transmission type.

[0097] The target identification information is determined from a plurality of identification information based on the gateway attributes and the data transmission attributes.

[0098] In one possible implementation, the control module is further configured to control the gateway to communicate with the device through the target communication protocol corresponding to the target unit circuit and the target identification information;

[0099] The sending module is further configured to repeatedly execute the step of sending identification information of multiple communication protocols included in the first interface to the device when the communication requirements of the device change, so that the device can determine the target identification information from the multiple identification information.

[0100] The device provided in this embodiment may be as follows: Figure 3 The apparatus shown can perform, as Figure 1-2 All steps of the control method of the gateway in the middle, thereby realizing Figure 1-2 For details on the technical effects of the gateway control method, please refer to [link / reference needed]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0101] Figure 4 This is a schematic diagram of a gateway structure provided in an embodiment of the present invention. Figure 4 The gateway 400 shown includes at least one processor 401, a memory 402, at least one network interface 404, and other user interfaces 403. The various components in the gateway 400 are coupled together via a bus system 405. It is understood that the bus system 405 is used to implement communication between these components. In addition to a data bus, the bus system 405 also includes a power bus, a control bus, and a status signal bus. However, for clarity, ... Figure 4 The general designated all buses as Bus System 405.

[0102] The user interface 403 may include a display, keyboard, or clicking device (e.g., mouse, trackball, touchpad, or touchscreen).

[0103] It is understood that the memory 402 in the embodiments of the present invention can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 402 described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0104] In some implementations, memory 402 stores elements, executable units or data structures, or subsets thereof, or extended sets thereof: operating system 4021 and application program 4022.

[0105] The operating system 4021 includes various system programs, such as the framework layer, core library layer, and driver layer, used to implement various basic business functions and handle hardware-based tasks. The application program 4022 includes various applications, such as a media player and a browser, used to implement various application functions. The program implementing the method of this embodiment can be included in the application program 4022.

[0106] In this embodiment of the invention, by calling the program or instructions stored in the memory 402, specifically the program or instructions stored in the application program 4022, the processor 401 executes the method steps provided in each method embodiment, including, for example:

[0107] When a device is detected to be connected to the first interface of the gateway, the gateway sends identification information of multiple communication protocols included in the first interface to the device, so that the device can determine the target identification information from the multiple identification information.

[0108] Receive the target identification information returned by the device;

[0109] From the multiple unit circuits corresponding to the first interface, determine the target unit circuit corresponding to the target identification information;

[0110] The target unit circuit is turned on so that the device can access the gateway through the target unit circuit.

[0111] In one possible implementation, when a device is detected to be connected to the first interface of the gateway by a sensing device, the multiple unit circuits included in the first interface are controlled to be turned on.

[0112] Obtain the communication protocol corresponding to each unit circuit included in the first interface to obtain multiple communication protocols;

[0113] The identification information of the multiple communication protocols is sent to the device.

[0114] In one possible implementation, each unit circuit of the first interface is controlled to send identification information of a communication protocol to the device, so that the device obtains multiple first communication protocols supported by the first interface from the target field of each identification information, and obtains a second communication protocol supported by the device. When the second communication protocol is included among the multiple first communication protocols, the identification information corresponding to the second communication protocol is determined as the target identification information.

[0115] In one possible implementation, when a device is detected to be connected to the first interface of the gateway, all unit circuits included in the non-first interface of the gateway are disconnected.

[0116] When the device is connected to the gateway through the target unit circuit, the non-target unit circuit in the first interface is disconnected.

[0117] In one possible implementation, when the target identification information returned by the device is not received, a second interface is determined from the non-first interface. The second interface includes at least one third communication protocol, which is different from the multiple communication protocols included in the first interface.

[0118] Control the conduction of all unit circuits included in the second interface;

[0119] Generate a reminder message to remind the device to switch to the second interface;

[0120] When the device detects that the second interface is connected, at least one identification information of the third communication protocol is sent to the device.

[0121] In one possible implementation, the current gateway attributes of the gateway and the data transmission attributes of the device are obtained. The gateway attributes include: network environment, and / or, security requirements. The data transmission attributes include: data transmission efficiency, and / or, data transmission type.

[0122] The target identification information is determined from a plurality of identification information based on the gateway attributes and the data transmission attributes.

[0123] In one possible implementation, the gateway is controlled to communicate with the device via the target communication protocol corresponding to the target unit circuit and the target identification information;

[0124] When the communication requirements of the device change, the step of sending identification information of multiple communication protocols included in the first interface to the device is repeated so that the device can determine the target identification information from the multiple identification information.

[0125] The methods disclosed in the above embodiments of the present invention can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of the present invention can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software units in the decoding processor. The software units may be located in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 402. Processor 401 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the above method.

[0126] It is understood that the embodiments described herein can be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit 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), general-purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described herein, or combinations thereof.

[0127] For software implementation, the techniques described herein can be implemented by units that perform the functions described herein. The software code can be stored in memory and executed by a processor. The memory can be implemented in the processor or external to the processor.

[0128] The gateway provided in this embodiment can be as follows: Figure 3 The gateway shown can perform actions such as Figure 1-2 All steps of the control method of the gateway in the middle, thereby realizing Figure 1-2 For details on the technical effects of the gateway control method, please refer to [link / reference needed]. Figure 1-2 The relevant descriptions are presented concisely and will not be elaborated upon here.

[0129] This invention also provides a storage medium (computer-readable storage medium). This storage medium stores one or more programs. The storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, hard disk, or solid-state drive; the memory may also include combinations of the above types of memory.

[0130] One or more programs in the storage medium can be executed by one or more processors to implement the gateway control method described above that is executed on the device side.

[0131] The processor is used to execute the gateway control program stored in the memory to implement the following steps of the gateway control method executed on the device side:

[0132] When a device is detected to be connected to the first interface of the gateway, the gateway sends identification information of multiple communication protocols included in the first interface to the device, so that the device can determine the target identification information from the multiple identification information.

[0133] Receive the target identification information returned by the device;

[0134] From the multiple unit circuits corresponding to the first interface, determine the target unit circuit corresponding to the target identification information;

[0135] The target unit circuit is turned on so that the device can access the gateway through the target unit circuit.

[0136] In one possible implementation, when a device is detected to be connected to the first interface of the gateway by a sensing device, the multiple unit circuits included in the first interface are controlled to be turned on.

[0137] Obtain the communication protocol corresponding to each unit circuit included in the first interface to obtain multiple communication protocols;

[0138] The identification information of the multiple communication protocols is sent to the device.

[0139] In one possible implementation, each unit circuit of the first interface is controlled to send identification information of a communication protocol to the device, so that the device obtains multiple first communication protocols supported by the first interface from the target field of each identification information, and obtains a second communication protocol supported by the device. When the second communication protocol is included among the multiple first communication protocols, the identification information corresponding to the second communication protocol is determined as the target identification information.

[0140] In one possible implementation, when a device is detected to be connected to the first interface of the gateway, all unit circuits included in the non-first interface of the gateway are disconnected.

[0141] When the device is connected to the gateway through the target unit circuit, the non-target unit circuit in the first interface is disconnected.

[0142] In one possible implementation, when the target identification information returned by the device is not received, a second interface is determined from the non-first interface. The second interface includes at least one third communication protocol, which is different from the multiple communication protocols included in the first interface.

[0143] Control the conduction of all unit circuits included in the second interface;

[0144] Generate a reminder message to remind the device to switch to the second interface;

[0145] When the device detects that the second interface is connected, at least one identification information of the third communication protocol is sent to the device.

[0146] In one possible implementation, the current gateway attributes of the gateway and the data transmission attributes of the device are obtained. The gateway attributes include: network environment, and / or, security requirements. The data transmission attributes include: data transmission efficiency, and / or, data transmission type.

[0147] The target identification information is determined from a plurality of identification information based on the gateway attributes and the data transmission attributes.

[0148] In one possible implementation, the gateway is controlled to communicate with the device via the target communication protocol corresponding to the target unit circuit and the target identification information;

[0149] When the communication requirements of the device change, the step of sending identification information of multiple communication protocols included in the first interface to the device is repeated so that the device can determine the target identification information from the multiple identification information.

[0150] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0151] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented in hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0152] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. 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 gateway control method, characterized in that, include: When a device is detected to be connected to the first interface of the gateway, the gateway sends identification information of multiple communication protocols included in the first interface to the device, so that the device can determine the target identification information from the multiple identification information. Receive the target identification information returned by the device; From the multiple unit circuits corresponding to the first interface, the target unit circuit corresponding to the target identification information is determined. Each unit circuit corresponding to the first interface corresponds to a connectable communication protocol, and each communication protocol corresponds to a unique identification information. The target unit circuit is turned on so that the device can access the gateway through the target unit circuit. When the device returns multiple identification information, obtain the current gateway attributes of the gateway and the data transmission attributes of the device; When the gateway attribute includes network environment, select the target identifier information corresponding to the communication protocol supported by the current network environment. When the gateway attribute includes security requirements, select the target identifier information corresponding to the communication protocol that can be encrypted for transmission. When the data transmission attribute includes data transmission efficiency, select the target identifier information corresponding to the communication protocol with the highest data transmission efficiency. When the data transmission attribute includes data transmission type, determine the target identifier information corresponding to the communication protocol based on the data type that the current device needs to transmit.

2. The method according to claim 1, characterized in that, When a device is detected to be connected to the first interface of the gateway, the step of sending identification information of multiple communication protocols included in the first interface to the device includes: When the sensor detects that a device is connected to the first interface of the gateway, it controls the multiple unit circuits included in the first interface to be turned on. Obtain the communication protocol corresponding to each unit circuit included in the first interface to obtain multiple communication protocols; The identification information of the multiple communication protocols is sent to the device.

3. The method according to claim 2, characterized in that, Sending the identification information of the multiple communication protocols to the device includes: Each unit circuit of the first interface is controlled to send identification information of the communication protocol to the device, so that the device can obtain multiple first communication protocols supported by the first interface from the target field of each identification information, and obtain the second communication protocol supported by the device. When the second communication protocol is included among the multiple first communication protocols, the identification information corresponding to the second communication protocol is determined as the target identification information.

4. The method according to claim 2, characterized in that, The method further includes: When a device is detected connected to the first interface of the gateway, all unit circuits included in the non-first interfaces of the gateway are disconnected. When the device is connected to the gateway through the target unit circuit, the non-target unit circuit in the first interface is disconnected.

5. The method according to claim 4, characterized in that, The method further includes: When the target identification information returned by the device is not received, a second interface is determined from the non-first interface. The second interface includes at least one third communication protocol, and the third communication protocol is different from the multiple communication protocols included in the first interface. Control the conduction of all unit circuits included in the second interface; Generate a reminder message to remind the device to switch to the second interface; When the device detects that the second interface is connected, at least one identification information of the third communication protocol is sent to the device.

6. The method according to claim 1, characterized in that, When the device returns multiple pieces of the identification information, the method further includes: Obtain the current gateway attributes of the gateway and the data transmission attributes of the device. The gateway attributes include: network environment, and / or, security requirements. The data transmission attributes include: data transmission efficiency, and / or, data transmission type. The target identification information is determined from a plurality of identification information based on the gateway attributes and the data transmission attributes.

7. The method according to any one of claims 1-6, characterized in that, After controlling multiple unit circuits in the gateway based on the target identification information, the method further includes: The gateway is controlled to communicate with the device via the target communication protocol corresponding to the target unit circuit and the target identification information. When the communication requirements of the device change, the step of sending identification information of multiple communication protocols included in the first interface to the device is repeated so that the device can determine the target identification information from the multiple identification information.

8. A control device for a gateway, characterized in that, include: The sending module is configured to send identification information of multiple communication protocols included in the first interface to the device when the first interface of the gateway is detected to be connected to the device, so that the device can determine the target identification information from the multiple identification information; A receiving module is used to receive the target identification information returned by the device; The determination module is used to determine the target unit circuit corresponding to the target identification information from multiple unit circuits corresponding to the first interface. Each unit circuit corresponding to the first interface corresponds to a connectable communication protocol, and each communication protocol corresponds to a unique identification information. The control module is used to control the target unit circuit to be turned on, so that the device can access the gateway through the target unit circuit; When the device returns multiple identification information, obtain the current gateway attributes of the gateway and the data transmission attributes of the device; When the gateway attribute includes network environment, select the target identifier information corresponding to the communication protocol supported by the current network environment. When the gateway attribute includes security requirements, select the target identifier information corresponding to the communication protocol that can be encrypted for transmission. When the data transmission attribute includes data transmission efficiency, select the target identifier information corresponding to the communication protocol with the highest data transmission efficiency. When the data transmission attribute includes data transmission type, determine the target identifier information corresponding to the communication protocol based on the data type that the current device needs to transmit.

9. A gateway, characterized in that, include: A processor and a memory, the processor being configured to execute a gateway control program stored in the memory to implement the gateway control method of any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium stores one or more programs, which can be executed by one or more processors to implement the gateway control method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Adaptive Internet of things intelligent gateway implementation method and intelligent gateway equipment

    CN106878459A