Information interaction method, gateway, wireless communication device, electronic device and medium

By scanning wireless communication devices, establishing and disconnecting Bluetooth connections based on device information, and periodically updating the controllable information list, the problem of large and high cost of interaction between gateways and wireless communication devices is solved, and resource conservation and equipment connection efficiency are achieved.

CN119212119APending Publication Date: 2024-12-27GUANGDONG KETYOO INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411092710.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-09
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

When interacting with wireless communication devices, the gateway consumes a lot of resources and has high hardware costs. Especially when long-term Bluetooth connection is required, a single gateway carries multiple devices to connect to each other is seriously wasted resources.

Method used

By scanning the wireless communication device, obtaining device information and establishing a Bluetooth connection according to preset connection conditions, disconnecting immediately after the interaction is completed, and periodically updating the controllable information list to optimize resource usage.

Benefits of technology

Reduces power consumption between the gateway and wireless communication devices, reduces hardware resource consumption, allows a single Bluetooth chip to carry more device connections, and reduces production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119212119A_ABST
    Figure CN119212119A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides an information interaction method, a gateway, wireless communication equipment, electronic equipment and a medium, relates to the field of intelligent equipment, is applied to the gateway, and comprises the following steps: scanning each wireless communication equipment, and obtaining equipment information of each wireless communication equipment; for each wireless communication device, if it is determined that the wireless communication device satisfies a preset connection condition according to the device information of the wireless communication device, establishing a Bluetooth connection with the wireless communication device, so that the wireless communication device performs information interaction with a gateway through the Bluetooth connection; wherein the preset connection condition comprises that the equipment information of the wireless communication equipment comprises a first mark, and the first mark is used for representing that the wireless communication equipment has a requirement for information interaction; and after information interaction with the wireless communication equipment is carried out, the Bluetooth connection with the wireless communication equipment is disconnected. According to the invention, under the condition that stable interaction between the gateway and the equipment is ensured, the power consumption of the wireless communication equipment and the gateway is reduced, and the production cost of the gateway is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of smart devices. Specifically, the present application relates to an information interaction method, a gateway, a wireless communication device, an electronic device and a medium. Background Art

[0002] With the development of Internet of Things technology, more and more devices are connected to the network through gateways. The reason for choosing a gateway is that the gateway is a device that is always powered on, can be connected to the Internet for a long time, and can perform a long-term Bluetooth broadcast connection, thereby ensuring stable communication with the device; However, maintaining a long-term Bluetooth connection between the gateway and the device will consume a lot of hardware resources, and if a single gateway needs to carry the Bluetooth connections of multiple devices, at least two Bluetooth chips are required. Therefore, there are technical problems such as large resource consumption and high hardware cost in the interaction between the gateway and the wireless communication device. Summary of the invention

[0003] The embodiments of the present application provide an information interaction method, a gateway, a wireless communication device, an electronic device and a medium, which are used to solve the technical problem that the interaction between the gateway and the wireless communication device consumes a lot of resources and has high hardware costs.

[0004] According to a first aspect of an embodiment of the present application, there is provided an information interaction method, which is applied to a gateway, and the method includes: scanning each wireless communication device to obtain device information of each wireless communication device; For each wireless communication device, if it is determined according to the device information of the wireless communication device that the wireless communication device meets the preset connection condition, a Bluetooth connection with the wireless communication device is established, so that the wireless communication device exchanges information with the gateway through the Bluetooth connection; wherein the preset connection condition includes that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to exchange information; After exchanging information with the wireless communication device, disconnect the Bluetooth connection with the wireless communication device.

[0005] In a possible implementation, the device information includes a device identification of the wireless communication device; if the device information of the wireless communication device includes the first flag, acquiring the device identification of the wireless communication device; If the device identification is stored in the locally cached controllable information list, a Bluetooth connection of the wireless communication device is established; The controllable information list is used to record the device identifications of wireless communication devices to which the gateway can connect.

[0006] In another possible implementation, each wireless communication device is scanned periodically to obtain device information of each wireless communication device and send the device information to the cloud, so that the cloud obtains the controllable information list of the current period corresponding to the gateway according to the device information.

[0007] In yet another possible implementation, after sending the device information to the cloud, receiving a controllable information list sent by the cloud; For the first cycle, the controllable information list of the first cycle is cached locally; For a non-first cycle, the cached controllable information list is deleted from the local, and the controllable information list of the current cycle is cached locally.

[0008] In another possible implementation, for the first cycle, after receiving the controllable information list of the first cycle sent by the cloud, if an information downlink instruction sent by the cloud is received, the device information of each wireless communication device is scanned; the information downlink instruction includes the first device identifier and downlink information of the first wireless communication device, and the information downlink instruction is used to instruct the gateway to send downlink information to the first wireless communication device; Establishing a Bluetooth connection with the first wireless communication device according to the scanned device information and the first device identifier, and sending downlink information to the first wireless communication device; After sending the downlink information to the first wireless communication device, the Bluetooth connection with the first wireless communication device is disconnected.

[0009] According to a second aspect of an embodiment of the present application, there is provided an information interaction method, which is applied to a wireless communication device, and the method includes: If it is determined that there is a need for information interaction, broadcast device information including a first flag, where the first flag is used to indicate that the wireless communication device has a need for information interaction, so that after receiving the device information, if the gateway determines that the wireless communication device meets a preset connection condition according to the device information of the wireless communication device, then establish a Bluetooth connection with the wireless communication device; Determine to establish a Bluetooth connection with the gateway, and exchange information with the gateway through the Bluetooth connection; After interacting with the gateway information, disconnect the Bluetooth connection with the gateway.

[0010] According to a third aspect of an embodiment of the present application, a gateway is provided, the device comprising: A scanning module, used to scan each wireless communication device and obtain device information of each wireless communication device; A determination module, configured to establish a Bluetooth connection with each wireless communication device if it is determined according to the device information of the wireless communication device that the wireless communication device meets a preset connection condition, so that the wireless communication device exchanges information with the gateway through the Bluetooth connection; wherein the preset connection condition includes that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to exchange information; The disconnection module is used to disconnect the Bluetooth connection with the wireless communication device after exchanging information with the wireless communication device.

[0011] According to a fourth aspect of an embodiment of the present application, a wireless communication device is provided, the device comprising: a broadcast module, configured to broadcast device information including a first flag if it is determined that there is a need for information interaction, the first flag being used to indicate that the wireless communication device has a need for information interaction, so that after receiving the device information, the gateway establishes a Bluetooth connection with the wireless communication device if it is determined based on the device information of the wireless communication device that the wireless communication device meets a preset connection condition; An interaction module is used to determine to establish a Bluetooth connection with the gateway and to exchange information with the gateway through the Bluetooth connection; The processing module is used to disconnect the Bluetooth connection with the gateway after interacting with the gateway information.

[0012] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, which includes a memory, a processor, and a computer program stored in the memory, and when the processor executes the program, the steps of the method provided in the first aspect are implemented.

[0013] According to a sixth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in the first aspect are implemented.

[0014] According to the seventh aspect of the embodiment of the present application, a computer program product is provided, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. When a processor of a computer device reads the computer instructions from the computer-readable storage medium, the processor executes the computer instructions, so that the computer device executes the steps of implementing the method provided in the first aspect.

[0015] The beneficial effects of the technical solution provided by the embodiment of the present application are: The information interaction method applied to the gateway provided in the embodiment of the present application scans each wireless communication device to obtain the device information of each wireless communication device. When it is determined that the device information includes the first flag, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection with the wireless communication device is established, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection. After the gateway completes the information interaction with the wireless communication device, the gateway immediately disconnects the Bluetooth connection with the wireless communication device, thereby avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can stably exchange information, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in describing the embodiments of the present application.

[0017] Figure 1 A schematic diagram of a system architecture for implementing an information interaction method provided in an embodiment of the present application; Figure 2 A flowchart of an information interaction method applied to a gateway provided in an embodiment of the present application; Figure 3 A flowchart of an information interaction method applied to a wireless communication device provided in an embodiment of the present application; Figure 4 A schematic diagram of an interaction flow of an information interaction method provided in an embodiment of the present application; Figure 5 A schematic diagram of the structure of a gateway provided in an embodiment of the present application; Figure 6 A schematic diagram of the structure of a wireless communication device provided in an embodiment of the present application; Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The embodiments of the present application are described below in conjunction with the drawings in the present application. It should be understood that the implementation methods described below in conjunction with the drawings are exemplary descriptions for explaining the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0019] It will be understood by those skilled in the art that, unless specifically stated, the singular forms "one", "an" and "the" used herein may also include plural forms. It should be further understood that the terms "including" and "comprising" used in the embodiments of the present application refer to that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude the implementation as other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the technical field. It should be understood that when we call an element "connected" or "coupled" to another element, the one element can be directly connected or coupled to the other element, or it can refer to that the one element and the other element establish a connection relationship through an intermediate element. In addition, the "connection" or "coupling" used here may include wireless connection or wireless coupling. The term "and / or" used here indicates at least one of the items defined by the term, for example, "A and / or B" can be implemented as "A", or as "B", or as "A and B".

[0020] The following describes several exemplary embodiments to illustrate the technical solutions of the embodiments of the present application and the technical effects produced by the technical solutions of the present application. It should be noted that the following embodiments can refer to, draw on or combine with each other, and the same terms, similar features and similar implementation steps in different embodiments will not be described repeatedly.

[0021] Figure 1 A schematic diagram of a system architecture for implementing an information interaction method provided in an embodiment of the present application, wherein the system architecture includes: a wireless communication device 120, a cloud 140 and a gateway 160.

[0022] The wireless communication device 120 installs and runs an application program having an information interaction method, and the wireless communication device 120 is used to broadcast device information.

[0023] The gateway 160 is used to scan device information and exchange information with the wireless communication device 120 according to the device information and preset connection conditions.

[0024] The cloud 140 includes at least one of a server, multiple servers, a cloud computing platform, and a virtualization center. Schematically, the server 140 includes a processor 144 and a memory 142, and the memory 142 includes a display module 1421, a control module 1422, and a receiving module 1423. The server 140 is used to provide background services for the application of the information interaction method.

[0025] Optionally, the device types of the wireless communication device include: at least one of a smart phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a laptop computer and a desktop computer.

[0026] Those skilled in the art will appreciate that the number of the wireless communication devices may be more or less. For example, the number of the wireless communication devices may be only one, or the number of the wireless communication devices may be dozens or hundreds, or more. The embodiment of the present application does not limit the number and type of wireless communication devices.

[0027] The present application provides an information interaction method, which is applied to a gateway, such as Figure 2 As shown, the method includes: S101, scanning each wireless communication device to obtain device information of each wireless communication device.

[0028] In an embodiment of the present application, the gateway is used for interaction between the cloud and the wireless communication device, collecting data from the wireless communication device and sending it to the cloud, or receiving data sent by the cloud and then sending it to the corresponding wireless communication device.

[0029] In the embodiments of the present application, wireless communication devices refer to devices that can transmit and communicate data through wireless technology. These devices use radio waves or other wireless technologies to exchange information without being connected through a physical interface. Wireless communication devices can be low-power near-field communication devices such as Bluetooth, Zigbee, etc., such as smart door locks, smart lights, and smart clothes drying poles.

[0030] In the embodiment of the present application, the device information of the wireless communication device is information associated with the wireless device broadcasted by the wireless communication device, and the device information includes at least one of a device identification, a product key, and a device name of the wireless communication device; Among them, the device identification can refer to the Mac address of the wireless communication device, which is the unique identifier of the wireless communication device and is used to identify the wireless communication device in the Bluetooth network; the product key is the unique identifier of each product created on the IoT platform. It is usually a string used to distinguish devices of different types or models. Each device must belong to a specific product, and the product key is used to identify and distinguish different products; the device name is a unique identifier assigned to each device on the IoT platform. It is used to uniquely identify the identity of the device in a specific product. The device name is usually a string and can be the serial number of the device.

[0031] In an embodiment of the present application, the gateway scans each wireless communication device to obtain the device information broadcast by each wireless communication device via Bluetooth. By obtaining the device information of each wireless communication device, it is possible to know the current distance between each wireless communication device and the gateway and whether each wireless communication device currently has an information interaction requirement.

[0032] S102: For each wireless communication device, if it is determined according to the device information of the wireless communication device that the wireless communication device meets a preset connection condition, a Bluetooth connection with the wireless communication device is established.

[0033] In the embodiment of the present application, the preset connection condition may include that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to perform information interaction.

[0034] In the embodiment of the present application, since the first flag is used to characterize that the wireless communication device has a need for information interaction, whether the wireless communication device currently has a need for information interaction can be determined by whether the device information of the wireless communication device carries the first flag, that is, when the first flag is included in the device information, it indicates that the current wireless communication device needs to interact with the gateway for information; when the first flag is not included in the device information, it indicates that the current wireless communication device does not have a need for information interaction with the gateway.

[0035] In the embodiment of the present application, when the first flag is included in the device information, it indicates that the current wireless communication device meets the preset connection condition, so the gateway establishes a Bluetooth connection with the corresponding wireless communication device. For example, the format of the device information is as follows: product key + device name + Mac address + whether there is a first flag indicating that information interaction is required.

[0036] In the embodiment of the present application, a Bluetooth connection is established with wireless communication so that the wireless communication device can exchange information with the gateway through the Bluetooth connection.

[0037] In the embodiment of the present application, after the gateway establishes a Bluetooth connection with the wireless communication device, the wireless communication device can exchange information with the gateway through the established Bluetooth connection, thereby meeting the information interaction needs of the wireless communication device.

[0038] S103, after exchanging information with the wireless communication device, disconnecting the Bluetooth connection with the wireless communication device.

[0039] In an embodiment of the present application, after the gateway detects that the wireless communication device has completed information exchange, it will immediately disconnect the Bluetooth connection with the above-mentioned wireless communication device, so that the Bluetooth connection with the wireless communication device will be maintained only when there is information that needs to be transmitted between the gateway and the wireless communication device.

[0040] In the embodiment of the present application, the information interaction between the gateway and the wireless communication device includes: the gateway sends information to the wireless communication device and the wireless communication device uploads information to the gateway. In one example, when the gateway sends information to the wireless communication device through the Bluetooth connection between the gateway and the wireless communication device, the gateway detects that all the information to be sent has been sent, and then disconnects the Bluetooth connection between the gateway and the wireless communication device.

[0041] The above scheme obtains the device information of each wireless communication device by scanning each wireless communication device. When it is determined that the device information includes the first mark, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection between the wireless communication device and the wireless communication device will be established, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection. After the gateway completes the information exchange with the wireless communication device, the gateway immediately disconnects the Bluetooth connection with the wireless communication device, thereby avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can exchange information stably, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway.

[0042] Based on the above embodiments, as an optional embodiment, the device information includes a device identification of the wireless communication device; if the device information of the wireless communication device includes the first flag, the device identification of the wireless communication device is obtained; if the device identification is stored in the locally cached controllable information list, a Bluetooth connection of the wireless communication device is established; The controllable information list is used to record the device identifications of wireless communication devices to which the gateway can connect.

[0043] In an embodiment of the present application, the controllable information list records the device identification of the wireless communication device that the gateway can connect to, that is, the gateway can only establish a Bluetooth connection with the wireless communication device based on the locally cached controllable information list. The gateway cannot establish a Bluetooth connection with the wireless communication device corresponding to the device identification that is not recorded in the controllable information list.

[0044] In an embodiment of the present application, when it is determined that the device information of the wireless communication device includes the first flag, a further check is performed to determine whether the wireless communication device meets the preset connection condition, the device identification of the wireless communication device is obtained, and then it is determined whether the above device identification is stored in the locally cached controllable information list. If the corresponding device identification is already stored in the controllable information list, it means that the gateway can establish a connection with the wireless communication device, and therefore, a Bluetooth connection is established between the gateway and the wireless communication device. In other words, if a Bluetooth connection is established between the gateway and the wireless communication device, the wireless communication device needs to simultaneously meet the preset connection condition that the device information carries the first flag and the device identification has been recorded in the controllable information list of the gateway.

[0045] The above scheme determines that the current wireless communication device has the need for information interaction by carrying a first flag in the device information, and determines that the gateway can establish a Bluetooth connection with the wireless communication device by storing the device identification of the above wireless communication device in the locally cached controllable information list, so as to initiate a Bluetooth connection with the wireless communication device when the above preset connection conditions are met at the same time, thereby ensuring that the gateway is connected only to wireless communication devices that are allowed to connect and have interaction needs, thereby avoiding waste of gateway Bluetooth resources.

[0046] Based on the above embodiments, as an optional embodiment, each wireless communication device is periodically scanned to obtain device information of each wireless communication device and send the device information to the cloud, so that the cloud obtains the controllable information list of the current period corresponding to the gateway according to the device information.

[0047] In an embodiment of the present application, the gateway may determine the scanning period according to the application scenario. For application scenarios with higher real-time requirements, a shorter scanning interval is selected to scan the latest device information of each wireless communication device as quickly as possible.

[0048] In an embodiment of the present application, the gateway may also set the scanning period of the gateway according to the communication protocol. For example, protocols such as Zigbee and Z-Wave may recommend a longer scanning interval to reduce energy consumption and network congestion. The gateway may also set the scanning period according to the power management strategy. If the gateway needs to run for a long time without direct power access, a longer scanning interval may be selected to save energy.

[0049] In an embodiment of the present application, in each cycle, after the gateway obtains the device information of the wireless communication device, the obtained device information of each wireless communication device is sent to the cloud, so that after the cloud receives the device information of each wireless communication device sent by the gateway, it determines the wireless communication device that the gateway can currently connect to based on the device information, and records the device identification of each wireless communication device in the controllable information list of the current cycle, thereby obtaining the controllable information list of the current cycle corresponding to the gateway.

[0050] In the above scheme, by periodically scanning the latest device information of each wireless communication device and sending the device information to the cloud, the wireless communication device that the gateway can currently connect to can be determined based on the latest device information of each wireless communication device reported by the gateway, ensuring that the gateway can connect to the wireless communication device based on the latest controllable information list.

[0051] Based on the above embodiments, as an optional embodiment, after sending device information to the cloud, a controllable information list sent by the cloud is received; for the first cycle, the controllable information list of the first cycle is cached locally; for non-first cycles, the cached controllable information list is deleted from the local, and the controllable information list of the current cycle is cached locally.

[0052] In an embodiment of the present application, after the gateway sends device information, the cloud will receive a controllable information list generated by the gateway based on the device information. For the first scanning cycle, no controllable information list is cached in the gateway at this time. Therefore, the gateway can directly cache the controllable information list locally. For non-first scanning cycles, after the gateway receives the controllable information list of the current cycle sent by the cloud, it deletes the locally cached controllable information list, and then caches the controllable information list of the current cycle locally. Subsequently, it is determined whether the wireless communication device meets the preset connection conditions based on the newly cached controllable information list.

[0053] On the basis of the above embodiments, for non-first scanning cycle, if the controllable information of the current cycle is inconsistent with the controllable information list of the previous cycle, the gateway will receive the controllable information list of the current cycle sent by the cloud, and delete the cached controllable information list from the local, and cache the controllable information list of the current cycle locally; if the controllable information list of the current cycle is consistent with the controllable information list of the previous cycle, the cloud will not send the controllable information list to the gateway, that is, the gateway will not receive the new controllable information list, and continue to determine whether the wireless communication device meets the preset connection conditions according to the cached controllable information list.

[0054] Through the above scheme, whenever the gateway receives a controllable information list sent by the cloud, it caches the latest controllable information list, ensuring that the gateway connects to the wireless communication device according to the latest controllable information list, and realizes real-time adjustment of the gateway's connectable device judgment conditions according to the actual situation of the wireless communication device.

[0055] On the basis of the above embodiments, as an optional embodiment, for the first cycle, after receiving the controllable information list of the first cycle sent by the cloud, if an information downlink instruction sent by the cloud is received, the device information of each wireless communication device is scanned; the information downlink instruction includes the first device identification and downlink information of the first wireless communication device, and the information downlink instruction is used to instruct the gateway to send downlink information to the first wireless communication device; a Bluetooth connection with the first wireless communication device is established according to the scanned device information and the first device identification, and downlink information is sent to the first wireless communication device; after sending the downlink information to the first wireless communication device, the Bluetooth connection with the first wireless communication device is disconnected.

[0056] In an embodiment of the present application, in the first cycle, after the gateway receives the controllable information list sent by the cloud, the gateway can establish a Bluetooth connection with the wireless communication device corresponding to the device identifier recorded in the controllable information list to exchange information, wherein the information sent by the wireless communication device to the cloud through the gateway is called uplink information, and the information sent by the cloud to the corresponding wireless communication device through the gateway is called downlink information.

[0057] In an embodiment of the present application, if the cloud wants to send downlink information to the corresponding first wireless communication device, it is necessary to first determine the gateway that can be connected to the first wireless communication device based on the controllable information list. After determining the gateway, an information downlink instruction will be sent to the gateway. The information downlink instruction includes the downlink information and the device identifier of the wireless communication device that receives the downlink information.

[0058] In an embodiment of the present application, after the gateway receives the information downlink instruction sent from the cloud, it first scans the device information of each wireless communication device, establishes a Bluetooth connection with the corresponding first wireless communication device based on the device information and the first device identifier included in the information downlink instruction, and then sends the downlink information in the information downlink instruction sent by the cloud to the first wireless communication device via the Bluetooth connection, and immediately disconnects the Bluetooth connection with the first wireless communication device after completing the sending of the downlink information.

[0059] In the above scheme, the cloud needs to send a downlink message to the wireless communication device. The gateway searches and connects to the wireless communication device according to the downlink instructions of the received information, and immediately disconnects the Bluetooth connection with the wireless communication device after completing the transmission of the downlink information. That is, the Bluetooth connection between the gateway and the wireless communication device is established only when downlink information needs to be sent to the wireless communication device, which avoids the consumption of hardware resources and improves the utilization efficiency of hardware resources, allowing the gateway to carry more connections of wireless communication devices.

[0060] The present application provides an information interaction method, which is applied to a wireless communication device, such as Figure 3 As shown, the method includes: S201: If it is determined that there is a need for information interaction, broadcast device information including a first flag.

[0061] In an embodiment of the present application, the first flag is used to indicate that the wireless communication device has a need to interact with information, so that after receiving the device information, the gateway establishes a Bluetooth connection with the wireless communication device if it determines that the wireless communication device meets the preset connection conditions based on the device information of the wireless communication device.

[0062] In an embodiment of the present application, the device information broadcast by the wireless communication device is generally sent via a wireless communication protocol, and the device information can be received by all gateways supporting the same protocol within a preset range of the wireless communication device, that is, the device information broadcast by the wireless communication device can be scanned by multiple gateways.

[0063] In an embodiment of the present application, the first flag is used to characterize that the wireless communication device has a need to interact with the gateway for information. Therefore, when the wireless communication device broadcasts device information, if there is a need to interact with the gateway for information, the first flag is carried in the broadcast information. If there is no need to interact with the gateway, the first flag is not carried in the broadcast information.

[0064] In an embodiment of the present application, when a wireless communication device needs to interact with a gateway for information, it broadcasts broadcast information carrying a first flag. After the gateway that can scan the wireless communication device obtains the device information, it determines that the wireless communication device currently has an interaction requirement based on the first flag carried in the device information, and further determines whether the wireless communication device meets the preset connection conditions based on the device information, and establishes a Bluetooth connection with the wireless communication device if the connection conditions are met.

[0065] In an embodiment of the present application, a wireless communication device broadcasts device information periodically. For wireless communication devices that require real-time data transmission or frequent status updates, a shorter time period is selected to broadcast device information.

[0066] S202, determine to establish a Bluetooth connection with the gateway, and exchange information with the gateway through the Bluetooth connection.

[0067] In an embodiment of the present application, after determining to establish a Bluetooth connection with the gateway, information is interacted with the gateway via the Bluetooth connection. The interacted information may be information that the wireless communication device transmits to the cloud via the gateway, and the interacted information may also be information that the cloud transmits to the wireless communication device via the gateway.

[0068] S203, after interacting with the gateway information, disconnecting the Bluetooth connection with the gateway.

[0069] In the embodiment of the present application, after the wireless communication device and the gateway exchange information, the wireless communication device may disconnect the Bluetooth connection with the gateway, or the gateway may disconnect the Bluetooth connection with the wireless communication device.

[0070] In one example, when the wireless communication device uploads information to the gateway via the Bluetooth connection between the wireless communication device and the gateway, the wireless communication device detects that all the information to be uploaded has been uploaded, and then disconnects the Bluetooth connection between the wireless communication device and the gateway.

[0071] In the above scheme, when the wireless communication device has an interaction requirement, the device information carrying the first mark is broadcasted to inform the gateway that has obtained the device information that a Bluetooth connection needs to be established. The gateway then determines whether a Bluetooth connection can be established with the wireless communication device based on the device information. When the device information of the wireless communication device meets the preset connection conditions, the wireless communication device establishes a Bluetooth connection with the gateway and exchanges information through the Bluetooth connection. This ensures that the wireless communication device will only establish a Bluetooth connection with the gateway for information exchange when there is an interaction requirement. This improves the utilization efficiency of the gateway while eliminating the need to maintain a long-term Bluetooth connection between the wireless communication device and the gateway, thereby reducing the power consumption of the wireless communication device and lowering the threshold for information exchange between the wireless communication device and the gateway. Reference Figure 4 , which exemplarily shows a schematic diagram of an interaction process of an information interaction method, the specific contents are as follows: S301, the wireless communication device periodically broadcasts device information; S302, the gateway periodically scans each wireless communication device to obtain broadcast information of each wireless communication device; S303, the gateway periodically sends broadcast information of each wireless communication device to the cloud; S304, the cloud determines a controllable information list of the gateway in the current cycle according to the wireless communication device; S305, the cloud sends a list of controllable information of the current cycle to the gateway; S306. For the first cycle, the gateway caches the controllable information list of the first cycle locally; for a non-first cycle, the gateway deletes the cached controllable information list from the local, and caches the controllable information list of the current cycle locally; S307: In any cycle, if the scanned device information contains the first flag, obtain the device identification of the wireless communication device from the device information, and if the locally cached controllable information list stores the device identification, establish a Bluetooth connection with the wireless communication device; S308, the wireless communication device and the gateway exchange information via Bluetooth connection; S309: After exchanging information with the wireless communication device, the gateway disconnects the Bluetooth connection with the wireless communication device.

[0072] The information interaction method provided in the embodiment of the present application determines whether the wireless communication device needs to establish a Bluetooth connection by whether the device information includes a first flag. When it is determined that the device needs to establish an information interaction via a Bluetooth connection, a controllable information list is timely updated according to the latest device information to ensure that the gateway only establishes a Bluetooth connection with the wireless communication device that is allowed to connect, and the Bluetooth connection is promptly disconnected after the wireless communication device completes the information interaction, thereby avoiding the gateway and the wireless communication device from maintaining a long-term Bluetooth connection, consuming more hardware resources, and thus increasing the production cost of the gateway. At the same time, a Bluetooth connection is established with the wireless communication device only when there is an interaction demand. While reducing costs, the utilization efficiency of the gateway is greatly improved, so that a single Bluetooth module of the gateway can be connected to multiple wireless communication devices.

[0073] The present application embodiment provides a gateway, such as Figure 5 As shown, the gateway 50 may include: a scanning module 501, a determination module 502 and a disconnection module 503, wherein: The scanning module 501 is used to scan each wireless communication device and obtain device information of each wireless communication device; The determination module 502 is configured to establish a Bluetooth connection with each wireless communication device if it is determined according to the device information of the wireless communication device that the wireless communication device meets the preset connection condition, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection; wherein the preset connection condition includes that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to exchange information; The disconnection module 503 is used to disconnect the Bluetooth connection with the wireless communication device after exchanging information with the wireless communication device.

[0074] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0075] The gateway provided in the embodiment of the present application scans each wireless communication device to obtain the device information of each wireless communication device. When it is determined that the device information includes the first flag, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection between the wireless communication device and the gateway is established, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection. After the gateway completes the information exchange with the wireless communication device, the gateway immediately disconnects the Bluetooth connection with the wireless communication device, thereby avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can exchange information stably, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway.

[0076] Further, in a possible implementation, the device information includes a device identification of the wireless communication device; if the device information of the wireless communication device includes the first flag, the device identification of the wireless communication device is acquired; If the device identification is stored in the locally cached controllable information list, a Bluetooth connection of the wireless communication device is established; The controllable information list is used to record the device identifications of wireless communication devices to which the gateway can connect.

[0077] In another possible implementation, each wireless communication device is scanned periodically to obtain device information of each wireless communication device and send the device information to the cloud, so that the cloud obtains the controllable information list of the current period corresponding to the gateway according to the device information.

[0078] In yet another possible implementation, after sending the device information to the cloud, receiving a controllable information list sent by the cloud; For the first cycle, the controllable information list of the first cycle is cached locally; For a non-first cycle, the cached controllable information list is deleted from the local, and the controllable information list of the current cycle is cached locally.

[0079] In another possible implementation, for the first cycle, after receiving the controllable information list of the first cycle sent by the cloud, if an information downlink instruction sent by the cloud is received, the device information of each wireless communication device is scanned; the information downlink instruction includes the first device identifier and downlink information of the first wireless communication device, and the information downlink instruction is used to instruct the gateway to send downlink information to the first wireless communication device; Establishing a Bluetooth connection with the first wireless communication device according to the scanned device information and the first device identifier, and sending downlink information to the first wireless communication device; After sending the downlink information to the first wireless communication device, the Bluetooth connection with the first wireless communication device is disconnected.

[0080] The present application embodiment provides a wireless communication device, such as Figure 6 As shown, the wireless communication device 60 may include: a broadcast module 601, an interaction module 602 and a processing module 603, wherein: A broadcast module 601 is used to broadcast device information including a first flag if it is determined that there is a need for information interaction, where the first flag is used to indicate that the wireless communication device has a need for information interaction, so that after receiving the device information, the gateway establishes a Bluetooth connection with the wireless communication device if it is determined that the wireless communication device meets a preset connection condition according to the device information of the wireless communication device; An interaction module 602 is used to determine to establish a Bluetooth connection with a gateway and to perform information interaction with the gateway via the Bluetooth connection; The processing module 603 is used to disconnect the Bluetooth connection with the gateway after interacting with the gateway information.

[0081] The device of the embodiments of the present application can execute the method provided by the embodiments of the present application, and the implementation principles are similar. The actions performed by each module in the device of each embodiment of the present application correspond to the steps in the method of each embodiment of the present application. For the detailed functional description of each module of the device, please refer to the description in the corresponding method shown in the previous text, which will not be repeated here.

[0082] The wireless communication device provided in the embodiment of the present application, when there is a demand for interaction, broadcasts device information carrying a first flag to inform the gateway that has obtained the device information that a Bluetooth connection needs to be established currently. The gateway then determines whether a Bluetooth connection can be established with the above-mentioned wireless communication device based on the device information. When the device information of the wireless communication device meets the preset connection conditions, the wireless communication device establishes a Bluetooth connection with the gateway and exchanges information through the Bluetooth connection, thereby ensuring that the wireless communication device will establish a Bluetooth connection with the gateway for information exchange only when there is a demand for interaction. While improving the utilization efficiency of the gateway, there is no need to maintain a long-term Bluetooth connection between the wireless communication device and the gateway, thereby reducing the power consumption of the wireless communication device and lowering the threshold for information exchange between the wireless communication device and the gateway.

[0083] In an embodiment of the present application, an electronic device (computer device / equipment / system) is provided, including a memory, a processor and a computer program stored in the memory, and the processor executes the above-mentioned computer program to implement the steps of the information interaction method. Compared with the related art, it can be achieved: by scanning each wireless communication device, the device information of each wireless communication device is obtained, and when it is determined that the device information includes a first flag, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection between the wireless communication device and the wireless communication device will be established, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection. After the gateway completes the information interaction with the wireless communication device, the gateway immediately disconnects the Bluetooth connection between the wireless communication device, avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can stably exchange information, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway.

[0084] In an alternative embodiment, an electronic device is provided, such as Figure 7 As shown, Figure 7 The electronic device 4000 shown includes: a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, such as through a bus 4002. Optionally, the electronic device 4000 may also include a transceiver 4004, which may be used for data interaction between the electronic device and other electronic devices, such as data transmission and / or data reception. It should be noted that in actual applications, the transceiver 4004 is not limited to one, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of the present application.

[0085] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It may implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0086] The bus 4002 may include a path to transmit information between the above components. The bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus. The bus 4002 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0087] The memory 4003 may be a ROM (Read Only Memory) or other types of static storage devices that can store static information and instructions, a RAM (Random Access Memory) or other types of dynamic storage devices that can store information and instructions, or an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, optical disk storage (including compressed optical disk, laser disk, optical disk, digital versatile disk, Blu-ray disk, etc.), magnetic disk storage media, other magnetic storage devices, or any other medium that can be used to carry or store computer programs and can be read by a computer, without limitation herein.

[0088] The memory 4003 is used to store the computer program for executing the embodiment of the present application, and the execution is controlled by the processor 4001. The processor 4001 is used to execute the computer program stored in the memory 4003 to implement the steps shown in the above method embodiment.

[0089] Among them, the electronic equipment package may include but is not limited to mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 7 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0090] The embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps and corresponding contents of the aforementioned method embodiment can be implemented. Compared with the prior art, it can be implemented as follows: by scanning each wireless communication device, the device information of each wireless communication device is obtained, and when it is determined that the device information includes a first flag, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection between the wireless communication device and the wireless communication device will be established, so that the wireless communication device can interact with the gateway through the Bluetooth connection. After the gateway completes the information interaction with the wireless communication device, the gateway immediately disconnects the Bluetooth connection between the wireless communication device, avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can stably interact with each other, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway.

[0091] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer readable signal media may also be any computer readable medium other than computer readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.

[0092] The present application also provides a computer program product, including a computer program, which can implement the steps and corresponding contents of the above method embodiments when executed by a processor. Compared with the prior art, it can achieve: By scanning each wireless communication device and acquiring the device information of each wireless communication device, when it is determined that the device information includes the first mark, it can be determined that the wireless communication device has a need to interact with the gateway, and when the wireless communication device meets the preset connection conditions, a Bluetooth connection with the wireless communication device is established, so that the wireless communication device can exchange information with the gateway through the Bluetooth connection. After the gateway completes the information exchange with the wireless communication device, the gateway immediately disconnects the Bluetooth connection with the wireless communication device, thereby avoiding the gateway and the wireless communication device from maintaining the Bluetooth connection state for a long time, reducing the power consumption of the gateway and the wireless communication device, and while ensuring that the gateway and the wireless communication device can exchange information stably, saving the Bluetooth resource consumption of the gateway, so that the gateway can also carry more wireless communication device connections under a single Bluetooth chip, reducing the production cost of the gateway.

[0093] The terms "first", "second", "third", "fourth", "1", "2", etc. (if any) in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than that shown or described in the drawings.

[0094] It should be understood that, although each operation step is indicated by arrows in the flowchart of the embodiment of the present application, the implementation order of these steps is not limited to the order indicated by the arrows. Unless clearly stated herein, in some implementation scenarios of the embodiment of the present application, the implementation steps in each flowchart can be performed in other orders according to demand. In addition, some or all of the steps in each flowchart may include multiple sub-steps or multiple stages based on actual implementation scenarios. Some or all of these sub-steps or stages may be executed at the same time, and each sub-step or stage in these sub-steps or stages may also be executed at different times respectively. In different scenarios of execution time, the execution order of these sub-steps or stages may be flexibly configured according to demand, and the embodiment of the present application does not limit this.

[0095] The above are only optional implementation methods for some implementation scenarios of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the technical concept of the scheme of the present application, other similar implementation methods based on the technical ideas of the present application are also within the protection scope of the embodiments of the present application.

Claims

1. An information interaction method, characterized in that: Applied to a gateway, the method comprises: Scan each wireless communication device to obtain device information of each wireless communication device; For each wireless communication device, if it is determined according to the device information of the wireless communication device that the wireless communication device meets the preset connection condition, a Bluetooth connection with the wireless communication device is established, so that the wireless communication device exchanges information with the gateway through the Bluetooth connection; wherein the preset connection condition includes that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to exchange information; After exchanging information with the wireless communication device, disconnect the Bluetooth connection with the wireless communication device.

2. The method according to claim 1, characterized in that The device information includes a device identification of the wireless communication device; If it is determined according to the device information of the wireless communication device that the wireless communication device meets the preset connection condition, establishing a Bluetooth connection with the wireless communication device includes: If the device information of the wireless communication device includes a first flag, acquiring a device identification of the wireless communication device; If the device identifier is stored in the locally cached controllable information list, establishing a Bluetooth connection with the wireless communication device; The controllable information list is used to record device identifications of wireless communication devices to which the gateway can connect.

3. The method according to claim 2, characterized in that The scanning of each wireless communication device to obtain device information of each wireless communication device includes: Periodically scan each wireless communication device, obtain device information of each wireless communication device and send the device information to the cloud, so that the cloud obtains the controllable information list of the current period corresponding to the gateway according to the device information.

4. The method according to claim 3, characterized in that The sending of the device information to the cloud further includes: Receiving a controllable information list sent by the cloud; For the first cycle, the controllable information list of the first cycle is cached locally; For a non-first cycle, the cached controllable information list is deleted from the local, and the controllable information list of the current cycle is cached locally.

5. The method according to claim 4, characterized in that For the first cycle, the receiving of the controllable information list of the first cycle sent by the cloud further includes: If an information downlink instruction sent by the cloud is received, the device information of each wireless communication device is scanned; the information downlink instruction includes a first device identifier and downlink information of the first wireless communication device, and the information downlink instruction is used to instruct the gateway to send the downlink information to the first wireless communication device; Establishing a Bluetooth connection with the first wireless communication device according to the scanned device information and the first device identifier, and sending the downlink information to the first wireless communication device; After sending the downlink information to the first wireless communication device, disconnecting the Bluetooth connection with the first wireless communication device.

6. An information interaction method, characterized in that: Applied to a wireless communication device, the method comprises: If it is determined that there is a need for information interaction, broadcast device information including a first flag, where the first flag is used to indicate that the wireless communication device has a need for information interaction, so that after receiving the device information, if the gateway determines that the wireless communication device meets a preset connection condition according to the device information of the wireless communication device, then establish a Bluetooth connection with the wireless communication device; Determine to establish the Bluetooth connection with the gateway, and exchange information with the gateway through the Bluetooth connection; After interacting with the gateway information, disconnect the Bluetooth connection with the gateway.

7. A gateway, characterized in that: include: A scanning module, used to scan each wireless communication device and obtain device information of each wireless communication device; a determination module, configured to establish a Bluetooth connection with each wireless communication device if it is determined according to the device information of the wireless communication device that the wireless communication device meets a preset connection condition, so that the wireless communication device interacts with the gateway through the Bluetooth connection; wherein the preset connection condition includes that the device information of the wireless communication device includes a first flag, and the first flag is used to indicate that the wireless communication device has a need to interact with information; A disconnection module is used to disconnect the Bluetooth connection with the wireless communication device after exchanging information with the wireless communication device.

8. A wireless communication device, characterized in that: include: a broadcast module, configured to broadcast device information including a first flag if it is determined that there is a need for information interaction, wherein the first flag is used to indicate that the wireless communication device has a need for information interaction, so that after receiving the device information, the gateway establishes a Bluetooth connection with the wireless communication device if it is determined according to the device information of the wireless communication device that the wireless communication device meets a preset connection condition; An interaction module, used for determining to establish the Bluetooth connection with the gateway, and performing information interaction with the gateway through the Bluetooth connection; The processing module is used to disconnect the Bluetooth connection with the gateway after interacting with the gateway information.

9. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the steps of the method according to any one of claims 1 to 6.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.