Multi-device communication method, gateway, terminal and readable storage medium
By identifying and converting different protocol types signals sent by smart devices, the problem of low communication efficiency between cloud servers and multiple smart devices is solved, and efficient interconnection between multiple devices and servers is achieved.
Patent Information
- Application Number
- CN202411593674.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-03-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The prior art is difficult to achieve efficient communication between cloud servers and different smart devices, mainly because smart devices adopt different communication protocols, so the server cannot directly interconnect with multiple devices.
By obtaining the initial signal sent by the smart device, determining the corresponding protocol type based on the signal characteristics, and performing protocol type conversion, converting the initial signal into a target signal that can be recognized by the server, realizing communication between multiple devices and servers.
This method can simultaneously receive signals based on different protocols of different smart devices and perform corresponding signal conversion, improving the communication efficiency between the server and multiple devices, and ensuring interconnection between different devices.
Smart Images

Figure CN119603373A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of device communication technology, and in particular, to a multi-device communication method, a gateway, an electronic terminal, and a computer-readable storage medium. Background Art
[0002] With the improvement of intelligence, more and more smart devices have emerged, such as smart lamps, smart speakers, smart appliances, etc. Different smart devices have different functions, and smart devices generally have communication capabilities.
[0003] Currently, the server can only communicate directly with individual smart devices based on the same communication protocol, so that it can interact with the smart devices.
[0004] However, most smart devices often use different communication protocols and standards, which makes it impossible for cloud servers to directly interconnect with different devices, resulting in low communication efficiency. Summary of the invention
[0005] In view of the above problems, embodiments of the present application are proposed to provide a multi-device communication method, apparatus, gateway, electronic terminal and computer-readable storage medium that overcome the above problems or at least partially solve the above problems.
[0006] In a first aspect, an embodiment of the present application discloses a multi-device communication method, including:
[0007] Acquire initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols;
[0008] Based on the signal characteristics of each initial signal, determining the first protocol type corresponding to each initial signal, and determining the second protocol type of the server; the server is used to communicate with different smart devices respectively;
[0009] For each initial signal, performing a type conversion operation corresponding to the first protocol type and the second protocol type to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type;
[0010] The target signal is sent to a server to complete the communication between the plurality of smart devices and the server.
[0011] In a second aspect, an embodiment of the present application discloses a multi-device communication device, the device comprising:
[0012] A signal acquisition module, used to acquire initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols;
[0013] A protocol type module, used to determine the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal, and determine the second protocol type of the server; the server is used to communicate with different smart devices respectively;
[0014] a signal conversion module, configured to perform a type conversion operation corresponding to the first protocol type and the second protocol type on each initial signal, so as to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type;
[0015] The signal sending module is used to send the target signal to the server to complete the communication between the multiple smart devices and the server.
[0016] In a third aspect, an embodiment of the present application further discloses a gateway, including a network interface, a controller, and a signal conversion unit;
[0017] The controller is used to execute the steps of the multi-device communication method described in the first aspect.
[0018] The network interface is used to receive an initial signal sent by a smart device;
[0019] The signal conversion unit is used to output a corresponding target signal according to the input initial signal.
[0020] In a fourth aspect, an embodiment of the present application further discloses an electronic terminal, comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the multi-device communication method described in the first aspect are implemented.
[0021] In a fifth aspect, an embodiment of the present application further discloses a computer-readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the multi-device communication method described in the first aspect are implemented.
[0022] In the embodiment of the present application, by acquiring the initial signals respectively sent by multiple smart devices, based on the signal characteristics of each initial signal, the first protocol type corresponding to each initial signal is determined, and the second protocol type of the server is determined, and for each initial signal, a type conversion operation corresponding to the first protocol type and the second protocol type is performed to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type, and the target signal is sent to the server. It is possible to simultaneously receive signals based on different protocols from different smart devices, and for the protocol type of each initial signal and the protocol type of the server, signal conversion is performed to obtain signals that can be directly recognized by the server, thereby improving the communication efficiency between the server and multiple devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flowchart of a multi-device communication method provided by an embodiment of the present application;
[0024] Figure 2 It is a schematic diagram of a device communication scenario provided in an embodiment of the present application;
[0025] Figure 3 is a flowchart of another multi-device communication method provided by an embodiment of the present application;
[0026] Figure 4 It is a schematic diagram of the flow of signal reception, processing and transmission provided by an embodiment of the present application;
[0027] Figure 5 is a schematic diagram of a device communication architecture provided in an embodiment of the present application;
[0028] Figure 6 is a block diagram of a multi-device communication apparatus provided in an embodiment of the present application;
[0029] Figure 7 is a schematic diagram of a gateway structure provided in an embodiment of the present application;
[0030] Figure 8 is a block diagram of an electronic terminal provided in an embodiment of the present application;
[0031] Fig. 9 It is a block diagram of another electronic terminal provided in an embodiment of the present application. DETAILED DESCRIPTION
[0032] The exemplary embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the exemplary embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present application and to fully convey the scope of the present application to those skilled in the art.
[0033] refer to Figure 1 , which shows a flowchart of the steps of a multi-device communication method provided by an embodiment of the present application, the method comprising:
[0034] Step 101, obtaining initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols.
[0035] In the disclosed embodiment of the present invention, the steps of the multi-device communication method can be executed by a processor in the gateway, such as a microcontroller unit (MCU). The gateway can serve as a central node in the Internet of Things (IoT) environment to centrally connect various smart devices.
[0036] Smart devices can be smart air conditioners, smart refrigerators, smart lamps and other devices. Smart devices can have data collection and communication capabilities. Different smart devices can send signals to the gateway, that is, initial signals to be processed. The data carried by the initial signals can be environmental data, device status data and other data collected by the smart devices.
[0037] Different smart devices may send initial signals based on different communication protocols, such as Bluetooth Low Energy (BLE), Universal Asynchronous Receiver / Transmitter (UART), Controller Area Network (CAN), Wireless Fidelity (WIFI), Zigbee and other protocols, without limitation.
[0038] Step 102, based on the signal characteristics of each initial signal, determine the first protocol type corresponding to each initial signal, and determine the second protocol type of the server; the server is used to communicate with different smart devices respectively.
[0039] In the embodiments of the present disclosure, initial signals based on different communication protocols have different signal characteristics, and the signal characteristics may include frequency, modulation mode, etc. According to the signal characteristics of the initial signal, the protocol type corresponding to the initial signal may be determined.
[0040] For example, the initial signal based on Wi-Fi is in the 2.4 GHz or 5 GHz frequency band, and the modulation method is Orthogonal Frequency Division Multiplexing (OFDM); the initial signal based on the Zigbee protocol is in the 2.4 GHz frequency band, and the modulation method is Direct Sequence Spread Spectrum (DSSS).
[0041] The server is a device that communicates with different smart devices. The communication protocols based on different servers may be different. For example, the server may communicate based on the UART protocol.
[0042] Figure 2 is a schematic diagram of a device communication scenario provided by an embodiment of the present disclosure; Figure 2 It can represent a family scene. Figure 2 The scenario includes smart device 201, smart device 202, smart device 203, gateway 204 and server 205. Smart device 201 may be a smart TV, smart device 202 may be a smart air conditioner, and smart device 203 may be a smart refrigerator. Figure 2 The number of smart devices is only for illustration, and may be more or less in practice. Smart device 201, smart device 202, and smart device 203 may send initial signals to gateway 204 respectively, and gateway 204 forwards the signals to server 205 after processing. It is understandable that server 205 may also be other smart devices, terminals, etc.
[0043] Step 103: For each initial signal, perform a type conversion operation corresponding to the first protocol type and the second protocol type to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type.
[0044] In the disclosed embodiment, different initial signals correspond to different first protocol types. When converting the initial signal, it is necessary to determine the corresponding type conversion operation based on the first protocol type of the current initial signal and the second protocol type of the server. The type conversion operation can be completed by software. The software can parse the data packet or message of the first protocol type and then reconstruct the data packet or message according to the specification of the second protocol type to achieve conversion between protocols. The process can include conversion and mapping of data format, protocol header, address and function.
[0045] It should be noted that, although different initial signals are converted into target signals corresponding to the second protocol type, when the first protocol types corresponding to the initial signals are different, the specific type conversion operations performed are also different.
[0046] Step 104: Send the target signal to a server to complete the communication between the multiple smart devices and the server.
[0047] After converting the initial signals of the different smart devices into the target signals of the second protocol type, the target signals are sent to the server. It is understandable that the initial signals received within the preset time period can be converted and then sent to the server at the same time, or the initial signals received at different times can be converted in real time and sent to the server immediately.
[0048] In addition, the gateway can communicate with the server through a wireless module. Since the distance between the gateway and the server may affect the communication quality, the wireless module can have a power management unit. The power management unit can detect the communication distance between the gateway and the server and adjust the signal transmission power according to the communication distance and the amount of data carried by the initial signal.
[0049] In summary, in the embodiment of the present application, by acquiring the initial signals respectively sent by multiple smart devices, based on the signal characteristics of each initial signal, the first protocol type corresponding to each initial signal is determined, and the second protocol type of the server is determined. For each initial signal, a type conversion operation corresponding to the first protocol type and the second protocol type is performed to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type, and the target signal is sent to the server. It is possible to simultaneously receive signals based on different protocols from different smart devices, and for the protocol type of each initial signal and the protocol type of the server, signal conversion is performed to obtain signals that can be directly recognized by the server, thereby improving the communication efficiency between the server and multiple devices.
[0050] refer to Figure 3 , which shows a flowchart of another multi-device communication method provided by an embodiment of the present application, the method comprising:
[0051] Step 301, obtaining initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols;
[0052] Step 302, based on the signal characteristics of each initial signal, determining the first protocol type corresponding to each initial signal, and determining the second protocol type of the server; the server is used to communicate with different smart devices respectively;
[0053] Step 303: for each initial signal, perform a type conversion operation corresponding to the first protocol type and the second protocol type, so as to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type;
[0054] Step 304: Send the target signal to a server to complete the communication between the multiple smart devices and the server.
[0055] For details of steps 301-304, please refer to the Figure 1 The embodiments are not described in detail here.
[0056] Optionally, the step 301 of acquiring initial signals respectively sent by a plurality of smart devices includes:
[0057] Sub-step 3011, based on the wired interface connected to the smart device, acquiring an initial signal corresponding to the interface type of the wired interface;
[0058] Sub-step 3012, based on the wireless interface connected to the smart device, obtaining an initial signal corresponding to the interface type of the wireless interface; different types of wired interfaces and wireless interfaces are used to obtain initial signals based on different communication protocols.
[0059] In the disclosed embodiment, the gateway may be configured with a wired interface and a wireless interface. For example, the wired interface may include an interface based on the RS485 protocol, the CAN protocol, and the UART protocol, and the wireless interface may include an interface based on the WiFi protocol, the BLE protocol, the Narrow Band Internet of Things protocol (NB-IoT), and the fourth generation wireless cellular telephone communication protocol (LTE, Long Term Evolution). The type and number of interfaces are not specifically limited here. Different types of wired interfaces and wireless interfaces are used to obtain initial signals based on different communication protocols.
[0060] It is understandable that signal reception of different protocols can also be achieved through software defined radio (SDR). SDR is a radio broadcast communication technology based on software defined wireless communication protocols, which can be used to build multi-mode, multi-frequency and multi-functional wireless communication devices. Since the various functions of SDR are implemented by software, new communication services can be implemented by adding new software modules.
[0061] In addition, the number and type of antennas will also affect the signal reception of different protocols. Different communication protocols generally have different frequency bands, and different frequency bands have different wavelength characteristics. The higher the frequency band, the shorter the wavelength; the lower the frequency band, the longer the wavelength. The size of the antenna is usually related to the wavelength. For example, for a half-wave dipole antenna, its length is approximately half of the working wavelength. Therefore, for signal transmission in different frequency bands, the antenna size needs to be adjusted, and the antenna needs to be able to adapt to different frequency bands, or multiple dedicated antennas need to be used to adapt to different frequency bands.
[0062] Optionally, the step of determining the first protocol type corresponding to each initial signal based on the signal feature of each initial signal includes:
[0063] Obtaining the first packet data and the first data bit information carried in each initial signal;
[0064] According to the first data bit information, determining a first data bit in the first packet data; the first data bit is used to record a protocol type;
[0065] Obtain a first protocol type recorded by the first data bit.
[0066] In the embodiment of the present disclosure, the initial signal may include multiple data packets, and the first data packet, i.e., the first packet data, may carry information indicating the first protocol type. The first data bit information may be preset information, and may correspond to the same first data bit information for different initial signals.
[0067] The first data bit information is used to determine a specific data bit, namely the first data bit, in the first packet data. Different data bits record different information, such as the source port, the destination port, the sequence number, and other information. The first data bit is a data bit used to record the first protocol type. Therefore, the first protocol type recorded can be obtained in the first data bit, and the first data bit can directly indicate the first protocol type. For example, the first data bit can be 001 to indicate protocol A, and the first data bit can be 010 to indicate protocol B.
[0068] In implementing the embodiments of the present disclosure, through the first data packet of each initial signal, and the first data bit information, the first data bit is determined in the first packet data according to the first data bit information, and the first protocol type recorded in the first data bit is obtained. The first protocol type can be directly obtained at a specific data bit in the first data packet, thereby improving the efficiency of determining the first protocol type.
[0069] Optionally, the method further includes:
[0070] Acquire second data bit information; the second data bit information is used to indicate a second data bit recording a device type;
[0071] In the first packet of data, the device type recorded in the second data bit is obtained.
[0072] In the embodiment of the present disclosure, similarly, the second data bit information can be obtained, and the second data bit information can be preset information, and the same second data bit information can be used for different initial signals. The second data bit information is used to indicate the second data bit recording the device type. In the first packet data, the device type can be obtained based on the second data bit.
[0073] By implementing the embodiments of the present disclosure, by obtaining the second data bit information and obtaining the device type recorded in the second data bit in the first packet data, the signal content can be enriched, and when communicating between devices, the signal receiver can clearly identify the original source of the signal, thereby improving the richness and accuracy of device communication.
[0074] Optionally, the step of determining the first protocol type corresponding to each initial signal based on the signal feature of each initial signal includes:
[0075] Comparing the signal characteristics of each initial signal with a preset protocol database; the protocol database includes different protocol types and corresponding signal characteristics;
[0076] In the protocol database, a target protocol type corresponding to the signal feature is determined as a first protocol type.
[0077] In the disclosed embodiment, the signal characteristics of each initial signal may be characteristics such as frequency and modulation mode, which are not described in detail here. These signal characteristics cannot directly indicate the specific first protocol type, so the signal characteristics of each initial signal may be compared with a preset protocol database, wherein the protocol database includes different protocol types and corresponding signal characteristics.
[0078] When the signal feature of the current initial signal is consistent with the specific signal feature in the protocol database, the protocol type corresponding to the specific signal feature may be used as the first protocol type of the current initial signal.
[0079] The protocol database can be established through a large number of tests in the early stage. The protocol database can be updated in real time. The signals of the newly added protocols can be tested to determine the protocol type and signal characteristics of the newly added protocols.
[0080] In an embodiment of the present disclosure, by comparing the signal characteristics of each initial signal with a preset protocol database, the target protocol type corresponding to the signal characteristics is directly determined in the protocol database as the first protocol type, thereby improving the recognition speed and accuracy of the first protocol type.
[0081] Optionally, the signal characteristics include modulation characteristics;
[0082] Before the step of determining the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal, the method further includes:
[0083] Performing filtering and denoising processing on each initial signal, and obtaining transform domain characteristic parameters and time domain characteristic parameters of the initial signal;
[0084] The transform domain feature parameters and the time domain feature parameters are input into a pre-trained recognition model, and the modulation features of the initial signal output by the recognition model are obtained.
[0085] In the embodiment of the present disclosure, the signal feature may be a modulation feature, that is, a modulation mode. To obtain the modulation feature, the initial signal may be preprocessed, and the preprocessing may include filtering and denoising to improve the signal quality and the accuracy of the analysis.
[0086] Fast Fourier Transformation (FFT), Hilbert transform, in-phase quadrature (IQ) component method, zero-crossing detection method and other methods can be used to obtain transform domain characteristic parameters such as the signal's power spectrum, spectral correlation function, time-frequency distribution, and obtain time domain characteristic parameters such as amplitude, phase and frequency.
[0087] The transform domain feature parameters and the time domain feature parameters can be input into a pre-trained recognition model, and the recognition model is used to output corresponding modulation features based on the input transform domain feature parameters and the time domain feature parameters. Modulation features can also be identified by methods such as support vector machines and maximum likelihood hypothesis tests based on decision theory, which are not limited here.
[0088] By implementing the embodiments of the present disclosure, each initial signal is filtered and denoised, and the transform domain feature parameters and time domain feature parameters of the initial signal are obtained, the transform domain feature parameters and the time domain feature parameters are input into a pre-trained recognition model, and the modulation features of the initial signal output by the recognition model are obtained. The modulation features of the initial signal can be quickly and accurately extracted through preprocessing and model recognition, thereby improving the accuracy and efficiency of signal feature recognition, thereby improving communication efficiency.
[0089] For other signal characteristics such as frequency, the specific frequency of the initial signal can also be determined by corresponding methods. For example, the number of cycles of the output signal within a certain period of time can be counted, and then the frequency can be calculated based on the counting result and the counting time. For example, within 1 second, if 100 cycles are counted, the frequency of the signal is 100Hz. The frequency can also be calculated by measuring the time interval between two adjacent cycle peaks (or other characteristic points) of the signal waveform, and then based on the inverse relationship between the frequency and the period. The signal can also be converted from the time domain to the frequency domain by fast Fourier transform, so that the frequency component of the signal can be obtained. For periodic signals, the period of the signal can also be calculated by detecting the number of times the signal crosses the zero point (from positive to negative or from negative to positive) through a zero detection algorithm, thereby obtaining the frequency. The specific type of signal characteristics and the acquisition method are not specifically limited here.
[0090] Optionally, the step 303 of performing a type conversion operation corresponding to the first protocol type and the second protocol type for each initial signal includes:
[0091] Sub-step 3031, determining a corresponding target hardware conversion circuit among a plurality of hardware conversion circuits according to the first protocol type and the second protocol type; the target hardware conversion circuit is used for signal conversion between the first protocol type and the second protocol type;
[0092] Sub-step 3032: input the initial signal to the target hardware conversion circuit, and obtain the target signal output by the target hardware conversion circuit.
[0093] In the disclosed embodiment, a signal of a specific protocol may be converted by a hardware conversion circuit to obtain a signal based on other protocols. Each hardware conversion circuit may include: an input interface for receiving an input signal of a corresponding protocol; an output interface for outputting the converted signal; a controller for parsing the input signal, extracting information, implementing a protocol conversion algorithm, encapsulating, and other operations; a clock circuit for providing a stable clock signal for the entire hardware circuit, and different protocols may have different clock requirements; a buffer circuit for temporarily storing input and output data to solve the problem of data transmission rate mismatch between different protocols; and a storage circuit for storing some configuration information, conversion tables, etc. during the protocol conversion process.
[0094] Although the initial signals all need to be converted into target signals of the second protocol type, different initial signals have different first protocol types, so different first protocol types correspond to different hardware conversion circuits. Each hardware conversion circuit is used for signal conversion between a specific first protocol type and a second protocol type.
[0095] Therefore, the corresponding target hardware conversion circuit can be determined according to the first protocol type and the second protocol type of the current initial signal. The initial signal is input to the target hardware conversion circuit, thereby obtaining the target signal output by the target hardware conversion circuit.
[0096] In implementing the embodiments of the present disclosure, by determining the corresponding target hardware conversion circuit in multiple hardware conversion circuits according to the first protocol type and the second protocol type, inputting the initial signal into the target hardware conversion circuit, and obtaining the target signal output by the target hardware conversion circuit, the corresponding hardware conversion process can be performed for the initial signals of different first protocol types, thereby improving the accuracy of signal conversion.
[0097] Optionally, after the step of sending the target signal to the server, the method further includes:
[0098] receiving an initial signal sent by the server, and determining device information carried by the initial signal;
[0099] Determine, among the plurality of smart devices, a target smart device corresponding to the device information, and a target first protocol type corresponding to the target smart device;
[0100] For the initial signal, performing a type conversion operation corresponding to the target first protocol type and the second protocol type to convert the initial signal corresponding to the second protocol type into a control signal corresponding to the target first protocol type;
[0101] The control signal is sent to the target smart device to complete the communication between the server and the target smart device.
[0102] In the disclosed embodiment, the gateway converts the signal of the smart device and sends it to the server. For example, the environmental data (such as temperature and humidity) collected by the smart device can be sent to the server. The server can control the smart device based on this information. Therefore, the server can also send an initial signal to the gateway, and this initial signal also needs to be converted.
[0103] When the server needs to control a specific smart device, the device information can be carried in the signal sent, so the target smart device to be controlled can be determined based on the device information carried in the initial signal, that is, the object to which the converted signal needs to be sent. In addition, the target first protocol type corresponding to the target smart device needs to be determined.
[0104] Similarly, the initial signal of the second protocol type is converted into a control signal of the target first protocol type, and then the control signal is sent to the target smart device to complete the communication between the server and the target smart device.
[0105] The embodiment of the present disclosure is implemented by receiving the initial signal sent by the server after sending the target signal to the server, and determining the device information carried by the initial signal, confirming the target smart device and the target first protocol type among multiple smart devices, performing type conversion operation on the initial signal to obtain a control signal, and sending the control signal to the target smart device to complete the communication between the server and the target smart device. The server can control multiple smart devices, and improve the communication efficiency from the server to multiple devices.
[0106] Optionally, the method further includes:
[0107] If no initial signal is received from the smart device within a preset first time period, entering a standby mode;
[0108] If no initial signal sent by the smart device is received within a preset second time period, the sleep mode is entered; the preset second time period is greater than the preset second time period, and the power consumption corresponding to the standby mode is greater than the power consumption corresponding to the sleep mode.
[0109] In the disclosed embodiment, the gateway may be configured with different working modes, such as standby mode, sleep mode and other modes. Compared with the standby mode, the sleep mode may have less software and hardware in working state, so that the sleep mode consumes less power than the standby mode.
[0110] If the initial signal sent by any smart device is not received within the preset first time period, the gateway enters the standby mode, so that the power consumption of the gateway is lower than that of the normal working state. If the initial signal sent by any smart device is not received within the preset second time period, the gateway enters the sleep mode, so that the power consumption of the gateway is lower than that of the standby mode. The preset second time period is greater than the preset second time period.
[0111] In addition, it is understandable that the gateway can also be configured with a wake-up mechanism, and when a new initial signal is received again, each module in the gateway can be in normal working state. For smart devices, smart devices can also be configured to shut down or enter low power consumption mode when receiving messages from the gateway, messages from the user terminal, messages from the server or other messages. Low-power gateways running in different modes can reduce energy consumption through intelligent scheduling, selecting the best communication time and protocol, and shutting down unnecessary functions.
[0112] By implementing the embodiments of the present disclosure, when the initial signal sent by the smart device is not received within a preset first time period, the gateway enters the standby mode, and when the initial signal sent by the smart device is not received within a preset second time period, the gateway enters the sleep mode. The gateway working mode can be adjusted in real time according to the initial signal reception situation to reduce the power consumption of the gateway, and the effective working time of the gateway can be extended, so that the gateway can continue to play a role in device communication, thereby improving the reliability of device communication.
[0113] Figure 4 It is a flowchart of signal reception, processing and transmission provided by an embodiment of the present disclosure; the data receiver 401 may include an interface and protocol processing module, the data receiver 401 may receive UART, RS485 and BLE signals, and then the data receiver 401 sends the initial signal to the data processor 402; the data processor 402 may be an MCU, after converting and processing the initial signal, the obtained target signal is sent to the cloud 403.
[0114] Figure 5 is a schematic diagram of a device communication architecture provided by an embodiment of the present disclosure; Figure 5 The cloud and the gateway are included. The gateway includes an MCU main control unit 501 , a power management module 502 , a security module 503 , a protocol module 504 , and an interface 505 . The interface 505 includes a wired interface 5051 and a wireless interface 5052 .
[0115] The function of the MCU main control unit 501 is not repeated here; the power management module 502 can be used to manage batteries, solar energy, engineering power supplies and artificial intelligence (AI) energy-saving chips; the security module 503 can encrypt signals sent to the cloud; the protocol module 504 and the interface 505 are used to receive signals of specific protocols.
[0116] In summary, in the embodiment of the present application, by acquiring the initial signals respectively sent by multiple smart devices, based on the signal characteristics of each initial signal, the first protocol type corresponding to each initial signal is determined, and the second protocol type of the server is determined. For each initial signal, a type conversion operation corresponding to the first protocol type and the second protocol type is performed to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type, and the target signal is sent to the server. It is possible to simultaneously receive signals based on different protocols from different smart devices, and for the protocol type of each initial signal and the protocol type of the server, signal conversion is performed to obtain signals that can be directly recognized by the server, thereby improving the communication efficiency between the server and multiple devices.
[0117] Figure 6 A multi-device communication device 60 provided in an embodiment of the present application includes:
[0118] The signal acquisition module 601 is used to acquire initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols;
[0119] The protocol type module 602 is used to determine the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal, and determine the second protocol type of the server; the server is used to communicate with different smart devices respectively;
[0120] A signal conversion module 603, configured to perform a type conversion operation corresponding to the first protocol type and the second protocol type on each initial signal, so as to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type;
[0121] The signal sending module 604 is used to send the target signal to the server to complete the communication between the multiple smart devices and the server.
[0122] Optional, protocol type modules, including:
[0123] A first data bit information submodule, used to obtain the first packet data and the first data bit information carried in each initial signal;
[0124] A first data bit determination submodule, configured to determine a first data bit in the first packet of data according to the first data bit information; the first data bit is used to record a protocol type;
[0125] The first data bit reading submodule is used to obtain the first protocol type recorded in the first data bit.
[0126] Optional, protocol type modules, including:
[0127] A data comparison submodule, used to compare the signal characteristics of each initial signal with a preset protocol database; the protocol database includes different protocol types and corresponding signal characteristics;
[0128] The matching determination submodule is used to determine, in the protocol database, a target protocol type corresponding to the signal feature as a first protocol type.
[0129] Optionally, the signal characteristics include modulation characteristics;
[0130] The device also includes:
[0131] A feature processing module, used for filtering and denoising each initial signal, and obtaining transform domain feature parameters and time domain feature parameters of the initial signal;
[0132] The model recognition module is used to input the transform domain feature parameters and the time domain feature parameters into a pre-trained recognition model, and obtain the modulation features of the initial signal output by the recognition model.
[0133] Optional, signal conversion module, including:
[0134] A target circuit submodule, used to determine a corresponding target hardware conversion circuit among a plurality of hardware conversion circuits according to the first protocol type and the second protocol type; the target hardware conversion circuit is used for signal conversion between the first protocol type and the second protocol type;
[0135] The circuit conversion submodule is used to input the initial signal into the target hardware conversion circuit and obtain the target signal output by the target hardware conversion circuit.
[0136] Optionally, the device further comprises:
[0137] A device information module, used to receive the initial signal sent by the server and determine the device information carried by the initial signal;
[0138] A target device module, used to determine, among the plurality of smart devices, a target smart device corresponding to the device information and a target first protocol type corresponding to the target smart device;
[0139] a type conversion module, configured to perform a type conversion operation corresponding to the target first protocol type and the second protocol type on the initial signal, so as to convert the initial signal corresponding to the second protocol type into a control signal corresponding to the target first protocol type;
[0140] The signal transmission module is used to send the control signal to the target smart device to complete the communication between the server and the target smart device.
[0141] Optionally, the device further comprises:
[0142] A standby module, configured to enter a standby mode if no initial signal sent by the smart device is received within a preset first time period;
[0143] The sleep module is used to enter the sleep mode when the initial signal sent by the smart device is not received within a preset second time period; the preset second time period is greater than the preset second time period, and the power consumption corresponding to the standby mode is greater than the power consumption corresponding to the sleep mode.
[0144] Optionally, the signal acquisition module includes:
[0145] A wired module, configured to obtain an initial signal corresponding to an interface type of a wired interface connected to the smart device based on the wired interface;
[0146] The wireless module is used to obtain an initial signal corresponding to the interface type of the wireless interface based on the wireless interface connected to the smart device; different types of wired interfaces and wireless interfaces are used to obtain initial signals based on different communication protocols.
[0147] Optionally, the device further comprises:
[0148] A second data bit information module, used to obtain second data bit information; the second data bit information is used to indicate a second data bit recording a device type;
[0149] The second data bit reading module is used to obtain the device type recorded in the second data bit in the first packet of data.
[0150] In summary, in the embodiment of the present application, by acquiring the initial signals respectively sent by multiple smart devices, based on the signal characteristics of each initial signal, the first protocol type corresponding to each initial signal is determined, and the second protocol type of the server is determined. For each initial signal, a type conversion operation corresponding to the first protocol type and the second protocol type is performed to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type, and the target signal is sent to the server. It is possible to simultaneously receive signals based on different protocols from different smart devices, and for the protocol type of each initial signal and the protocol type of the server, signal conversion is performed to obtain signals that can be directly recognized by the server, thereby improving the communication efficiency between the server and multiple devices.
[0151] Figure 7 is a schematic diagram of a gateway structure provided by an embodiment of the present disclosure; Figure 7 The gateway 70 shown includes:
[0152] Network interface 701, controller 702, signal conversion unit 703;
[0153] The network interface 701 is used to receive an initial signal sent by a smart device;
[0154] The signal conversion unit 703 is used to output a corresponding target signal according to the input initial signal.
[0155] The controller 702 is used to obtain initial signals respectively sent by multiple smart devices; at least some of the smart devices correspond to different types of communication protocols;
[0156] Based on the signal characteristics of each initial signal, determining the first protocol type corresponding to each initial signal, and determining the second protocol type of the server; the server is used to communicate with different smart devices respectively;
[0157] For each initial signal, performing a type conversion operation corresponding to the first protocol type and the second protocol type to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type;
[0158] The target signal is sent to a server to complete the communication between the plurality of smart devices and the server.
[0159] Optionally, the controller 702 is used to obtain the first packet data and the first data bit information carried in each initial signal;
[0160] According to the first data bit information, determining a first data bit in the first packet data; the first data bit is used to record a protocol type;
[0161] Obtain a first protocol type recorded by the first data bit.
[0162] Optionally, the controller 702 is used to compare the signal characteristics of each initial signal with a preset protocol database; the protocol database includes different protocol types and corresponding signal characteristics;
[0163] In the protocol database, a target protocol type corresponding to the signal feature is determined as a first protocol type.
[0164] Optionally, the signal characteristics include modulation characteristics; the controller 702 is further configured to filter and denoise each initial signal before the step of determining the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal, and obtain transform domain characteristic parameters and time domain characteristic parameters of the initial signal;
[0165] The transform domain feature parameters and the time domain feature parameters are input into a pre-trained recognition model, and the modulation features of the initial signal output by the recognition model are obtained.
[0166] Optionally, the controller 702 is used to determine a corresponding target hardware conversion circuit among multiple hardware conversion circuits according to the first protocol type and the second protocol type; the target hardware conversion circuit is used for signal conversion between the first protocol type and the second protocol type;
[0167] The initial signal is input to the target hardware conversion circuit, and a target signal output by the target hardware conversion circuit is obtained.
[0168] Optionally, the controller 702 is further configured to, after the step of sending the target signal to the server, receive an initial signal sent by the server and determine device information carried by the initial signal;
[0169] Determine, among the plurality of smart devices, a target smart device corresponding to the device information, and a target first protocol type corresponding to the target smart device;
[0170] For the initial signal, performing a type conversion operation corresponding to the target first protocol type and the second protocol type to convert the initial signal corresponding to the second protocol type into a control signal corresponding to the target first protocol type;
[0171] The control signal is sent to the target smart device to complete the communication between the server and the target smart device.
[0172] Optionally, the controller 702 is also used to
[0173] If no initial signal is received from the smart device within a preset first time period, entering a standby mode;
[0174] If no initial signal sent by the smart device is received within a preset second time period, the sleep mode is entered; the preset second time period is greater than the preset second time period, and the power consumption corresponding to the standby mode is greater than the power consumption corresponding to the sleep mode.
[0175] Optionally, the controller 702 is configured to obtain, based on a wired interface connected to the smart device, an initial signal corresponding to an interface type of the wired interface;
[0176] Based on the wireless interface connected to the smart device, an initial signal corresponding to the interface type of the wireless interface is obtained; different types of wired interfaces and wireless interfaces are used to obtain initial signals based on different communication protocols.
[0177] Optionally, the controller 702 is further used to obtain second data bit information; the second data bit information is used to indicate a second data bit recording a device type;
[0178] In the first packet of data, the device type recorded in the second data bit is obtained.
[0179] In summary, in the embodiment of the present application, by acquiring the initial signals respectively sent by multiple smart devices, based on the signal characteristics of each initial signal, the first protocol type corresponding to each initial signal is determined, and the second protocol type of the server is determined. For each initial signal, a type conversion operation corresponding to the first protocol type and the second protocol type is performed to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type, and the target signal is sent to the server. It is possible to simultaneously receive signals based on different protocols from different smart devices, and for the protocol type of each initial signal and the protocol type of the server, signal conversion is performed to obtain signals that can be directly recognized by the server, thereby improving the communication efficiency between the server and multiple devices.
[0180] Figure 8 1 is a block diagram of an electronic terminal 1000 shown in an exemplary embodiment. For example, the electronic terminal 1000 may be a mobile phone, a computer, a digital broadcast terminal, a message transceiver terminal, a game console, a tablet terminal, a medical terminal, a fitness terminal, a personal digital assistant, etc.
[0181] Reference Figure 8The electronic terminal 1000 may include one or more of the following components: a processing component 1002 , a memory 1004 , a power component 1006 , a multimedia component 1008 , an audio component 1010 , an input / output (I / O) interface 1012 , a sensor component 1014 , and a communication component 1016 .
[0182] The processing component 1002 generally controls the overall operation of the electronic terminal 1000, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 1002 may include one or more processors 1020 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 1002 may include one or more modules to facilitate the interaction between the processing component 1002 and other components. For example, the processing component 1002 may include a multimedia module to facilitate the interaction between the multimedia component 1008 and the processing component 1002.
[0183] The memory 1004 is used to store various types of data to support the operation of the electronic terminal 1000. Examples of such data include instructions for any application or method operating on the electronic terminal 1000, contact data, phone book data, messages, pictures, multimedia, etc. The memory 1004 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0184] The power supply component 1006 provides power to various components of the electronic terminal 1000. The power supply component 1006 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic terminal 1000.
[0185] The multimedia component 1008 includes a screen that provides an output interface between the electronic terminal 1000 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 1008 includes a front camera and / or a rear camera. When the electronic terminal 1000 is in an operating mode, such as a shooting mode or a multimedia mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0186] The audio component 1010 is used to output and / or input audio signals. For example, the audio component 1010 includes a microphone (MIC), and when the electronic terminal 1000 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is used to receive an external audio signal. The received audio signal can be further stored in the memory 1004 or sent via the communication component 1016. In some embodiments, the audio component 1010 also includes a speaker for outputting audio signals.
[0187] I / O interface 1012 provides an interface between processing component 1002 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0188] The sensor assembly 1014 includes one or more sensors for providing various aspects of status assessment for the electronic terminal 1000. For example, the sensor assembly 1014 can detect the open / closed state of the electronic terminal 1000, the relative positioning of components, such as the display and keypad of the electronic terminal 1000, and the sensor assembly 1014 can also detect the position change of the electronic terminal 1000 or a component of the electronic terminal 1000, the presence or absence of contact between the user and the electronic terminal 1000, the orientation or acceleration / deceleration of the electronic terminal 1000, and the temperature change of the electronic terminal 1000. The sensor assembly 1014 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 1014 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 1014 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0189] The communication component 1016 is used to facilitate wired or wireless communication between the electronic terminal 1000 and other terminals. The electronic terminal 1000 can access a wireless network based on a communication standard, such as WiFi, an operator network (such as 2G, 3G, 4G or 5G), or a combination thereof. In an exemplary embodiment, the communication component 1016 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 1016 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0190] In an exemplary embodiment, the electronic terminal 1000 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing terminals (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to implement the multi-device communication method provided in the embodiments of the present application.
[0191] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 1004 including instructions, and the instructions can be executed by the processor 1020 of the electronic terminal 1000 to complete the above method. For example, the non-transitory storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage terminal, etc.
[0192] Fig. 9 1 is a block diagram of an electronic terminal 1100 shown in an exemplary embodiment. For example, the electronic terminal 1100 may be provided as a server. Fig. 9 The electronic terminal 1100 includes a processing component 1122, which further includes one or more processors, and a memory resource represented by a memory 1132 for storing instructions that can be executed by the processing component 1122, such as an application. The application stored in the memory 1132 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1122 is configured to execute instructions to perform a multi-device communication method provided in an embodiment of the present application.
[0193] The electronic terminal 1100 may also include a power supply component 1126 configured to perform power management of the electronic terminal 1000, a wired or wireless network interface 1150 configured to connect the electronic terminal 1100 to a network, and an input / output (I / O) interface 1158. The electronic terminal 1100 may operate based on an operating system stored in the memory 1132, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™ or the like.
[0194] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the application disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0195] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A multi-device communication method, characterized in that: The method comprises: Acquire initial signals respectively sent by a plurality of smart devices; at least some of the smart devices correspond to different types of communication protocols; Based on the signal characteristics of each initial signal, determining the first protocol type corresponding to each initial signal, and determining the second protocol type of the server; the server is used to communicate with different smart devices respectively; For each initial signal, performing a type conversion operation corresponding to the first protocol type and the second protocol type to convert the initial signal corresponding to the first protocol type into a target signal corresponding to the second protocol type; The target signal is sent to a server to complete the communication between the plurality of smart devices and the server.
2. The method according to claim 1, characterized in that The step of determining the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal comprises: Obtaining the first packet data and the first data bit information carried in each initial signal; According to the first data bit information, determining a first data bit in the first packet data; the first data bit is used to record a protocol type; Obtain a first protocol type recorded by the first data bit.
3. The method according to claim 1, characterized in that The step of determining the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal comprises: Comparing the signal characteristics of each initial signal with a preset protocol database; the protocol database includes different protocol types and corresponding signal characteristics; In the protocol database, a target protocol type corresponding to the signal feature is determined as a first protocol type.
4. The method according to claim 1, characterized in that The signal characteristics include modulation characteristics; Before the step of determining the first protocol type corresponding to each initial signal based on the signal characteristics of each initial signal, the method further includes: Performing filtering and denoising processing on each initial signal, and obtaining transform domain characteristic parameters and time domain characteristic parameters of the initial signal; The transform domain feature parameters and the time domain feature parameters are input into a pre-trained recognition model, and the modulation features of the initial signal output by the recognition model are obtained.
5. The method according to claim 1, characterized in that The step of performing a type conversion operation corresponding to the first protocol type and the second protocol type for each initial signal includes: Among a plurality of hardware conversion circuits, a corresponding target hardware conversion circuit is determined according to the first protocol type and the second protocol type; the target hardware conversion circuit is used for signal conversion between the first protocol type and the second protocol type; The initial signal is input to the target hardware conversion circuit, and a target signal output by the target hardware conversion circuit is obtained.
6. The method according to claim 1, characterized in that After the step of sending the target signal to the server, the method further includes: receiving an initial signal sent by the server, and determining device information carried by the initial signal; Determine, among the plurality of smart devices, a target smart device corresponding to the device information, and a target first protocol type corresponding to the target smart device; For the initial signal, performing a type conversion operation corresponding to the target first protocol type and the second protocol type to convert the initial signal corresponding to the second protocol type into a control signal corresponding to the target first protocol type; The control signal is sent to the target smart device to complete the communication between the server and the target smart device.
7. The method according to claim 1, characterized in that The method further comprises: If no initial signal is received from the smart device within a preset first time period, entering a standby mode; If no initial signal sent by the smart device is received within a preset second time period, the sleep mode is entered; the preset second time period is greater than the preset second time period, and the power consumption corresponding to the standby mode is greater than the power consumption corresponding to the sleep mode.
8. The method according to claim 1, characterized in that: The step of obtaining initial signals respectively sent by a plurality of smart devices comprises: Based on a wired interface connected to the smart device, acquiring an initial signal corresponding to an interface type of the wired interface; Based on the wireless interface connected to the smart device, an initial signal corresponding to the interface type of the wireless interface is obtained; different types of wired interfaces and wireless interfaces are used to obtain initial signals based on different communication protocols.
9. The method according to claim 2, characterized in that: The method further comprises: Acquire second data bit information; the second data bit information is used to indicate a second data bit recording a device type; In the first packet of data, the device type recorded in the second data bit is obtained.
10. A gateway, characterized in that: The gateway comprises: Network interface, controller, signal conversion unit; The controller is used to perform the method steps of any one of claims 1 to 9 above; The network interface is used to receive an initial signal sent by a smart device; The signal conversion unit is used to output a corresponding target signal according to the input initial signal.
11. An electronic terminal, characterized in that: include: A memory and a processor, wherein a computer program is stored in the memory, and when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is performed.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed, the terminal where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Gateway equipment, multi-protocol data transmission method and computer equipment
CN111163147A
Internet of Things intelligent gateway routing method and system
CN112039791A
Protocol conversion method and device, equipment and storage medium
CN116055577A
Family network system and operating method thereof
CN1507217A
Packet transfer apparatus
US20090016378A1