Gateway information reporting method and device and electronic device

By using the device shadow module in the gateway to filter the device attribute information and remove redundant reporting, the gateway's message backlog is solved due to busy business, the gateway's real-time response ability to control instructions is improved, and the CPU load is reduced and control is improved. Sexual effect.

CN119094259APending Publication Date: 2024-12-06QINGDAO HAIER TECH +2

Patent Information

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

AI Technical Summary

Technical Problem

When existing gateways for performing edge scenario services are processed by a large number of device controls, the service messages are backlogged due to busy services and cannot respond to control instructions in real time, affecting the reliability of the gateway and the real-time control.

Method used

The device shadow module obtains historical reports and records of device attribute information, filters out the device attribute information that needs to be reported, removes redundant information, and reports only when the attribute value changes or the time interval is long, reducing the load on the gateway central processor.

Benefits of technology

It effectively solves the problem of message backlog caused by busy services of the gateway, improves the real-time response ability of gateway devices to control instructions, reduces CPU load, and improves the control reliability and real-time nature of edge scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119094259A_ABST
    Figure CN119094259A_ABST
Patent Text Reader

Abstract

The invention discloses a gateway information reporting method and device and an electronic device, and relates to the technical field of smart home, and the gateway information reporting method comprises the steps: if obtaining equipment attribute information from preset equipment, determining equipment state information according to the equipment attribute information and the obtaining time of the equipment attribute information; and determining to-be-reported information according to the equipment state information and a historical reporting record thereof, and reporting the to-be-reported information to preset network equipment. According to the technical scheme, the equipment attribute information needing to be reported is screened to determine the to-be-reported information through the historical reporting record of the equipment attribute information, redundant reporting information is removed, the load of a gateway CPU is reduced, and the real-time performance of the gateway equipment responding to the control instruction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of smart home technology, and more specifically, to a gateway information reporting method, device and electronic device. Background Art

[0002] An edge scenario is a scenario that can be run on edge devices and has been applied in smart homes. The gateway, as a control device for running edge scenarios, is used to control the execution of the scenario, the switching of loads (such as lights and curtains), etc.

[0003] Existing gateways used to execute edge scenario services, when controlling a large number of devices, need to process the status of the controlled devices in the gateway, which may cause business congestion and backlog of business messages and make it impossible to respond to the next control instructions in real time.

[0004] This type of situation is not conducive to the reliability of gateway products and the real-time control. It is urgent to improve the real-time response of gateway devices to control instructions in order to efficiently control the execution of edge scenarios. Summary of the invention

[0005] The embodiments of the present application provide a gateway information reporting method, device and electronic device, the purpose of which is to reduce the load of the gateway central processing unit (CPU) and improve the real-time response of the gateway device.

[0006] An embodiment of the present application provides a gateway information reporting method, including:

[0007] If device attribute information is obtained from a preset device, the device status information is determined according to the device attribute information and the time when the device attribute information is obtained;

[0008] Determine the information to be reported based on the device status information and its historical reporting records;

[0009] Report the information to be reported to a preset network device.

[0010] In an implementable manner, determining the information to be reported according to the device status information and its historical reporting records includes:

[0011] Obtain the historical reporting record corresponding to the device attribute information through the device shadow module; wherein the historical reporting record includes the historical attribute value, the historical attribute storage time and the number of historical attribute reports;

[0012] The information to be reported is determined based on at least one of whether the attribute value of the device attribute information has changed relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports. In an implementable manner, the information to be reported is determined based on at least one of whether the attribute value of the device attribute information has changed relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, including:

[0013] Determining a time difference between the acquisition time and the historical attribute storage time;

[0014] If the time difference is greater than the preset reporting time, determining the device attribute information as the information to be reported;

[0015] The number of times the historical attribute is reported is cleared.

[0016] In an implementable manner, determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes:

[0017] If the time difference is less than or equal to the preset reporting time, determining whether the attribute value of the device attribute information is the same as the corresponding historical attribute value;

[0018] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a first preset number,

[0019] If the number of historical attribute reporting times is less than or equal to the first preset number, the device attribute information is determined as the information to be reported, and the number of historical attribute reporting times is accumulated; or

[0020] If the attribute value of the device attribute information is different from the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a second preset number,

[0021] If the number of historical attribute reporting times is less than or equal to the second preset number, determining the device attribute information as the information to be reported, and accumulating the number of historical attribute reporting times;

[0022] Wherein, the first preset number of times is less than the second preset number of times.

[0023] In an implementable manner, determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes:

[0024] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, and the number of historical attribute reports is greater than the first preset number, the device attribute information is not the information to be reported;

[0025] If the attribute value of the device attribute information is different from the corresponding historical attribute value, and the number of historical attribute reports is greater than the second preset number, the device attribute information is not the information to be reported.

[0026] In an implementable manner, before determining the information to be reported according to the device status information and its historical reporting records, the method further includes:

[0027] Determine, by a device shadow module, whether to enable a function of filtering the information to be reported in the device attribute information;

[0028] If the filtering function is enabled, the information to be reported is determined based on the device status information and its historical reporting records.

[0029] In one possible implementation, the gateway information reporting method further includes:

[0030] If the filtering function is not enabled, the step of determining the information to be reported based on the device status information and its historical reporting records will not be performed.

[0031] In an implementable manner, before the device attribute information is acquired from the preset device and the device status information is determined according to the device attribute information and the acquisition time of the device attribute information, the method further includes:

[0032] Subscribe to the message of the preset device, wherein the subscribed message includes the device attribute information.

[0033] In one possible implementation, the gateway information reporting method further includes:

[0034] The device attribute information and its corresponding acquisition time are stored in the device shadow module.

[0035] In an implementable manner, reporting the information to be reported to a preset network device includes:

[0036] The information to be reported is reported to a preset gateway device in the local area network, and / or the information to be reported is reported to a preset server in the cloud.

[0037] Another aspect of the present application provides a gateway information reporting device, including:

[0038] A device status information determination module, configured to determine the device status information according to the device attribute information and the acquisition time of the device attribute information if the device attribute information is acquired from a preset device;

[0039] A module for determining information to be reported, used to determine the information to be reported based on the device status information and its historical reporting records;

[0040] The information reporting module is used to report the information to be reported to a preset network device.

[0041] On the other hand, an embodiment of the present application further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the gateway information reporting method provided by any embodiment of the present application through the computer program.

[0042] The embodiments of the present application provide a gateway information reporting method, device and electronic device, which screen the device attribute information that needs to be reported through the historical reporting records of the device attribute information, remove redundant reporting information, and solve the problem that the gateway cannot respond to the next control instruction in real time due to a backlog of business messages caused by busy business, thereby reducing the load on the gateway CPU and improving the real-time performance of the gateway device in responding to control instructions. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0044] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0045] Figure 1 It is a hardware environment diagram of a gateway information reporting method according to an embodiment of the present application;

[0046] Figure 2 This is a schematic diagram of a structure for message interaction between gateways according to an embodiment of the present application;

[0047] Figure 3 is a flow chart of a gateway information reporting method according to an embodiment of the present application;

[0048] Figure 4is a flow chart of a gateway information reporting method according to an embodiment of the present application;

[0049] Figure 5 It is a structural diagram of a gateway information reporting device according to an embodiment of the present application. DETAILED DESCRIPTION

[0050] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0051] It should be noted that the terms "first", "second", etc. in the specification and claims of the present 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 data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0052] According to one aspect of an embodiment of the present application, a gateway information reporting method is provided. Gateways are widely used in smart home (Smart Home), smart home, smart home device ecology, smart residential (Intelligence House) ecology and other whole-house intelligent digital control application scenarios, and the gateway information reporting method is applied to the whole-house intelligent digital control application scenario. Optionally, in this embodiment, the above-mentioned gateway information reporting method can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0053] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Zigbee, Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing equipment, a smart dishwasher, a smart projection equipment, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air equipment, a smart kitchen and bathroom equipment, a smart bathroom equipment, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification equipment, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0054] In one possible implementation, combining Figure 2 The schematic diagram of the structure of message exchange between gateways is shown in FIG. Figure 2 In the example, gateway A and gateway B have the same composition structure, and gateway A and gateway B each have a corresponding user service channel. Taking gateway A as an example, the interaction process of gateway messages is explained. CAE sends the message transmitted via the user service channel to the UCOM component, and then the UCOM component forwards the message to the gateway message filter, and the gateway message filter sends the filtered message to the event bus broker. There is a message interaction process between the event bus broker and each module in the scene JSDK, domain model, CPU load statistics module, SDL user side, master-slave database backup module, and message forwarding module. The event bus broker responds to the subscription request of any subscription side in the gateway message filter, scene JSDK, domain model, CPU load statistics module, SDL user side, master-slave database backup module, and message forwarding module, and publishes the gateway message indicated by the subscription request to any subscription side. In a realistic way, by adding a device shadow module to the gateway device access end, the redundant messages generated by the device attribute report can be well solved, and finally the gateway can achieve a continuous real-time controllable experience in the edge scenario.

[0055] Among them, Figure 2In the , SDL (smart device Linux SDK) means: an IoT software development kit for devices based on the Linux platform. CAE (Computer-Aided Engineering) is used to simulate, analyze and optimize physical phenomena with the help of computer technology and software tools, so as to help designers improve product performance and reliability, reduce product development cycles and costs, and realize intelligent and digital production. In gateway systems, CAE can also be used for modeling and simulation analysis of network connections. UCOM components refer to the universal type library under COM (Component Object Model) technology, which includes some basic interface and structure definitions. These interfaces and structures enable developers to share code in different development environments, thereby achieving more efficient and reliable software development. UCOM components are often used on the Microsoft .NET platform, through which unmanaged code or COM components can be easily called and objects written on the .NET platform can be interacted with. Event bus broker is a component in a messaging framework that is used to pass messages between different parts of an application or system. It simplifies application development by decoupling publishers and subscribers and realizing asynchronous communication. In the event bus system, the event bus broker plays the role of a central node as the interaction point for all publishing and receiving message information. The broker can ensure that data is sent to the correct target while providing data control to the connector and performing operations such as buffering events. This simplifies application integration, logging of processing tasks, and tracking problems. The scene JSDK (JAVA Software Development Kit) is a software development kit for creating and managing artificial intelligence scene models in a Java environment. It provides a rich application programming interface (API) and tools that enable developers to easily create, train, test, and deploy their own machine learning models. The SDK can be used with various third-party frameworks and libraries (such as TensorFlow, Keras, etc.), and supports local or cloud execution.

[0056] In this embodiment, a gateway information reporting method is provided, which is applied to the above-mentioned gateway device. Figure 3 : is a flow chart of a gateway information reporting method according to an embodiment of the present application, the process includes the following steps:

[0057] Step 320: If device attribute information is obtained from the preset device, determine the device status information according to the device attribute information and the acquisition time of the device attribute information;

[0058] Step 340: Determine the information to be reported based on the device status information and its historical reporting records;

[0059] Step 360: Report the information to be reported to a preset network device.

[0060] Among them, the gateway is used to process edge scene services. For the user-side gateway, a large number of devices are usually connected. These devices are devices that execute devices or detect environmental information. Some devices may report their own device attribute information at regular intervals. If the large amount of device attribute information received by the gateway is not reasonably removed from redundancy, it will cause the service end to waste a lot of CPU resources for processing these messages. For example, if the gateway device is connected to 100 devices, and each device reports 6 device attribute information per minute, 600 pieces of information to be reported will be generated per minute, which will increase the burden on the user-side gateway CPU. For products with low-frequency gateway hardware platforms, this CPU burden is more obvious. In the process of running edge scenarios on such gateways, it is very necessary to filter the reported information. The device attribute information can be the attribute information of the device itself that is connected to the gateway, including the device type, device location, and device operation attributes of the device itself, such as the temperature attribute of the air conditioner. The device attribute information and the time when it is obtained by the gateway device are combined to obtain the device status information. In the prior art, by setting a device shadow module in the gateway device, the data information stored locally each time can be synchronized on the device shadow module. For the operation of the above edge scenario, in one implementation, the redundant information generated by the device attribute reporting can be solved by the device shadow module at the access end of the gateway device, so as to achieve a continuous real-time controllable experience of the gateway edge scenario. According to the historical reporting records of the device attribute information, the reporting time and frequency of the device attribute information can be known. Under the condition that the attribute information can be reported in time, the redundant information is removed, the information to be reported is screened, and the information to be reported is reported to the local area network and / or the cloud.

[0061] The technical solution of this embodiment filters the device attribute information that needs to be reported through the historical reporting records of the device attribute information, removes redundant reporting information, solves the problem that the gateway cannot respond to the next control instructions in real time due to a backlog of business messages caused by busy business, reduces the load on the gateway CPU, and improves the real-time performance of the gateway device's response to control instructions.

[0062] In one possible implementation, step 340, determining the information to be reported according to the device status information and its historical reporting records, includes:

[0063] Obtain the historical reporting record corresponding to the device attribute information through the device shadow module; wherein the historical reporting record includes the historical attribute value, the historical attribute storage time and the number of historical attribute reports;

[0064] The information to be reported is determined according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports.

[0065] Among them, the device shadow module will synchronize the local data information of the gateway, including the device attribute information reported by the device to the gateway, and the attribute values ​​and corresponding times reported by the device are saved in the device shadow module as historical attribute values ​​and historical attribute storage times. Whenever a device attribute information is used as information to be reported and successfully reported, the number of historical attribute reports will be increased by one. If attribute information is reported, the device shadow module service will be triggered, and the device shadow module will load the stored historical attribute values ​​and compare them with the attribute values ​​reported by the current device.

[0066] In one possible implementation, Figure 4 A flowchart showing a method for reporting gateway information is shown, wherein the information to be reported is determined according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, including:

[0067] Determining a time difference between the acquisition time and the historical attribute storage time;

[0068] If the time difference is greater than the preset reporting time, determining the device attribute information as the information to be reported;

[0069] The number of times the historical attribute is reported is cleared.

[0070] Among them, if the time difference between the time of the currently reported attribute value and the historical attribute storage time stored in the device shadow module is greater than the preset reporting time, it means that the attribute value has not been reported for a certain time interval, and such device attribute information can be used as information to be reported. The acquisition time and the historical attribute storage time can be recorded in the form of a timestamp. The preset reporting time can be pre-set according to the need to report device attributes in the edge scenario, or it can be adjusted after the setting. For example, the preset reporting time can be set to 30s to 120s, where it can be 60s. After determining that the device attribute information is information to be reported, the device attribute information will be reported, and for such attribute values ​​with a longer reporting time interval, the number of historical attribute reports will be cleared. If the time difference is less than or equal to the preset reporting time, the device attribute information can be directly abandoned.

[0071] In an implementable manner, determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes:

[0072] If the time difference is less than or equal to the preset reporting time, determining whether the attribute value of the device attribute information is the same as the historical attribute value;

[0073] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a first preset number,

[0074] If the number of historical attribute reporting times is less than or equal to the first preset number, determining the device attribute information as the information to be reported, and accumulating the number of historical attribute reporting times;

[0075] If the attribute value of the device attribute information is different from the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a second preset number,

[0076] If the number of historical attribute reporting times is less than or equal to the second preset number, determining the device attribute information as the information to be reported, and accumulating the number of historical attribute reporting times;

[0077] Among them, the first preset number of times is less than the second preset number of times. In the process of screening whether the device attribute information can be used as the information to be reported, the screening logic can consider the reporting time interval and the number of times reported at the same time. For the device attribute information that has been reported within the preset reporting time, it may be a relevant message with urgent business in the edge scenario. Under the goal of reducing the CPU burden, the reliability of the edge scenario operation must also be considered. Some messages need to be reported to the cloud in a timely manner. Therefore, for the case where the attribute value is different from the historical attribute value, it is still necessary to allow the reporting of the attribute value. The second preset number of times can be set to a relatively large value. For example, when the preset reporting time is set to 60s, the second preset number of times is set to 100 to 150 times, which can be 120 times. For the case where the attribute value is the same as the historical attribute value, the reporting frequency can be appropriately controlled to be lower, and the first preset number of times can be set to a relatively small value. For example, when the preset reporting time is set to 60s, the first preset number of times is set to 1 to 3 times, which can be 1 time. It is understandable that it is also possible to directly determine whether the attribute value is the same as the historical attribute value without judging the size relationship between the time difference and the preset reporting time. If they are the same, the device attribute information is not reported. If they are different, the device attribute information is reported. It is also possible to only determine whether the number of historical attribute reports reaches the number of reports. If it reaches, the device attribute information is reported. It is also possible that, without judging the size relationship between the time difference and the preset reporting time, after judging whether the attribute value is the same as the historical attribute value, if the attribute value is the same as the historical attribute value, further determine the size relationship between the number of historical attribute reports and the first preset number, and determine the information to be reported in the above manner. If the attribute value is different from the historical attribute value, further determine the size relationship between the number of historical attribute reports and the second preset number, and determine the information to be reported in the above manner.

[0078] In an implementable manner, determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes:

[0079] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, and the number of historical attribute reports is greater than the first preset number, the device attribute information is not used as the information to be reported;

[0080] If the attribute value of the device attribute information is different from the corresponding historical attribute value, and the number of historical attribute reports is greater than the second preset number, the device attribute information is not used as the information to be reported.

[0081] Among them, in the case of considering the reporting time interval, the change of attribute value and the number of reports are used as factors for screening the information to be reported, which can effectively reduce the reporting of redundant information.

[0082] In an implementable manner, before determining the information to be reported according to the device status information and its historical reporting records, the method further includes:

[0083] Determine, by a device shadow module, whether to enable a function of filtering the information to be reported in the device attribute information;

[0084] If the filtering function is enabled, the information to be reported is determined based on the device status information and its historical reporting records. A filtering flag for enabling filtering of information to be reported can be set in the device shadow module. By enabling the filtering flag, the device shadow module is enabled to filter device attribute information and determine the filtered device attribute information as the information to be reported.

[0085] In one possible implementation, the gateway information reporting method further includes:

[0086] If the filtering function is not enabled, the execution of determining the information to be reported based on the device status information and its historical reporting records will not be performed. All the device attribute information may be determined as the information to be reported. It may also be reported according to other device attribute information reporting rules. For some edge scenarios, there are more urgent businesses, or fewer connected devices. If the CPU can handle the business, the function of the device shadow module to filter the device attribute information as the information to be reported may not be enabled.

[0087] In an implementable manner, before obtaining corresponding device status information from a preset device and determining device attribute information in the device status information, the method further includes:

[0088] Subscribe to the message of the preset device, wherein the subscribed message includes the device attribute information.

[0089] In one possible implementation, the gateway information reporting method further includes:

[0090] The device attribute information and its corresponding acquisition time are stored in the device shadow module. Among them, the device status information and its corresponding acquisition time (such as a timestamp) can be stored in the cache, and the historical attribute value (the attribute value stored last time) and its corresponding acquisition time (the timestamp stored last time) can be loaded through the device shadow module. When determining the time difference between the acquisition time and the historical attribute storage time, the time difference can be represented by the difference between the two timestamps (the timestamp stored last time and the timestamp acquired this time). To determine whether the attribute value of the device attribute information is the same as the historical attribute value, it is possible to compare the attribute value stored last time and the attribute value acquired this time. By implementing the device shadow module under the edge scenario business solution, the device shadow module implements the device attribute information reporting, filtering and deduplication algorithm, and can perform real-time control of devices (such as Zigbee devices) when the network is disconnected or there is no network, which can effectively increase the robustness of device control and the reliability of edge scenario operation.

[0091] In an implementable manner, reporting the information to be reported to a preset network device includes:

[0092] The information to be reported is reported to a preset gateway device in the local area network, and / or the information to be reported is reported to a preset server in the cloud. The information to be reported can also be reported to the user terminal, so that when the user terminal has a system restart, the device attribute information can also be obtained.

[0093] This application implements, for example Figure 5 The schematic diagram of the structure of the gateway information reporting device shown in the figure, the gateway information reporting device provided by the embodiment of the present application includes:

[0094] The device status information determination module 502 is used to determine the device status information according to the device attribute information and the acquisition time of the device attribute information if the device attribute information is acquired from the preset device;

[0095] The module 504 for determining information to be reported is used to determine information to be reported according to the device status information and its historical reporting records;

[0096] The information reporting module 506 is used to report the information to be reported to a preset network device.

[0097] In one possible implementation, the module 504 for filtering information to be reported includes:

[0098] A historical reporting record acquisition unit, used to acquire the historical reporting record corresponding to the device attribute information through a device shadow module; wherein the historical reporting record includes a historical attribute value, a historical attribute storage time, and a historical attribute reporting number;

[0099] The unit for determining information to be reported is used to determine the information to be reported based on at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports.

[0100] In one possible implementation, the unit for determining information to be reported is specifically configured to:

[0101] Determining a time difference between the acquisition time and the corresponding storage time of the historical attributes;

[0102] If the time difference is greater than the preset reporting time, determining the device attribute information as the information to be reported;

[0103] The number of times the historical attribute is reported is cleared.

[0104] In an implementable manner, the unit for determining the information to be reported is further specifically configured to:

[0105] If the time difference is less than or equal to the preset reporting time, determining whether the attribute value of the device attribute information is the same as the corresponding historical attribute value;

[0106] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a first preset number,

[0107] If the attribute reporting number is less than or equal to the first preset number, determining that the device attribute information is the information to be reported, and accumulating the historical attribute reporting number;

[0108] If the attribute value of the device attribute information is different from the corresponding historical attribute value, determining whether the number of historical attribute reports is greater than a second preset number,

[0109] If the number of historical attribute reporting times is less than or equal to the second preset number, determining the device attribute information as the information to be reported, and accumulating the number of historical attribute reporting times;

[0110] Wherein, the first preset number of times is less than the second preset number of times.

[0111] In an implementable manner, the unit for determining the information to be reported is further specifically configured to:

[0112] If the attribute value of the device attribute information is the same as the corresponding historical attribute value, and the number of historical attribute reports is greater than the first preset number, the device attribute information is not used as the information to be reported;

[0113] If the attribute value of the device attribute information is different from the corresponding historical attribute value, and the number of historical attribute reports is greater than the second preset number, the device attribute information is not the information to be reported.

[0114] In one possible implementation, the gateway information reporting device further includes:

[0115] A screening function enabling module, used to determine whether to enable a function of screening the information to be reported in the device attribute information through a device shadow module before determining the information to be reported according to the device status information and its historical reporting records;

[0116] The filtering execution module is enabled, and is used to determine the information to be reported based on the device status information and its historical reporting records if the filtering function is enabled.

[0117] In one possible implementation, the gateway information reporting device further includes:

[0118] The deactivation filtering module is used to not execute the determination of the information to be reported based on the device status information and its historical reporting records if the filtering function is not enabled.

[0119] In one possible implementation, the gateway information reporting device further includes:

[0120] The device message subscription module is used to subscribe to the message of the preset device before the device status information is determined according to the device attribute information and the acquisition time of the device attribute information if the device attribute information is obtained from the preset device, wherein the subscribed message includes the device attribute information.

[0121] In one possible implementation, the gateway information reporting device further includes:

[0122] The attribute information and time storage module is used to store the device attribute information and its corresponding acquisition time in the device shadow module.

[0123] In an implementable manner, the information reporting module 506 is specifically used to:

[0124] The information to be reported is reported to a preset gateway device in the local area network, and / or the information to be reported is reported to a preset server in the cloud.

[0125] The embodiment of the present application further provides an electronic device, wherein the electronic device may be a gateway device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to perform the following steps through the computer program:

[0126] If device attribute information is obtained from a preset device, the device status information is determined according to the device attribute information and the time when the device attribute information is obtained;

[0127] According to the device status information and its historical reporting records, the information to be reported is determined; and the information to be reported is reported to a preset network device.

[0128] As a computer-readable storage medium, the memory can be used to store software programs, computer executable programs and modules, such as the program instructions / modules corresponding to the gateway information reporting method in the embodiment of the present application (for example, the attribute information determination module 502, the information screening module 504 to be reported and the information reporting module 506 in the gateway information reporting device). The processor executes various functional applications and data processing of the electronic device by running the software programs, instructions and modules stored in the memory, that is, realizing the above-mentioned gateway information reporting method.

[0129] In this embodiment, the above-mentioned storage medium may include, but is not limited to: U disk, read-only memory (ROM), random access memory (RAM), mobile hard disk, magnetic disk or optical disk and other media that can store program code. Through the above description of the implementation method, the technicians in the relevant field can clearly understand that the present invention can be implemented with the help of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention can be essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium.

[0130] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A gateway information reporting method, characterized in that: include: If device attribute information is obtained from a preset device, the device status information is determined according to the device attribute information and the time when the device attribute information is obtained; Determine the information to be reported based on the device status information and its historical reporting records; Report the information to be reported to a preset network device.

2. The method according to claim 1, characterized in that The determining of the information to be reported according to the device status information and its historical reporting records includes: The historical reporting record corresponding to the device attribute information is obtained through the device shadow module; wherein the historical reporting record includes the historical attribute value, the historical attribute storage time and the number of historical attribute reports; the information to be reported is determined according to whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the historical attribute storage time, and at least one of the number of historical attribute reports.

3. The method according to claim 2, characterized in that The determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, includes: Determining a time difference between the acquisition time and the historical attribute storage time; If the time difference is greater than the preset reporting time, determining the device attribute information as the information to be reported; The number of times the historical attribute is reported is cleared.

4. The method according to claim 3, characterized in that The determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes: If the time difference is less than or equal to the preset reporting time, determining whether the attribute value of the device attribute information is the same as the historical attribute value, If the attribute value of the device attribute information is the same as the historical attribute value, determining whether the number of historical attribute reports is greater than a first preset number; If the number of historical attribute reporting times is less than or equal to the first preset number, the device attribute information is determined as the information to be reported, and the number of historical attribute reporting times is accumulated; or If the attribute value of the device attribute information is different from the historical attribute value, determining whether the number of historical attribute reports is greater than a second preset number, If the number of historical attribute reporting times is less than or equal to the second preset number, determining the device attribute information as the information to be reported, and accumulating the number of historical attribute reporting times; Wherein, the first preset number of times is less than the second preset number of times.

5. The method according to claim 4, characterized in that The determining the information to be reported according to at least one of whether the attribute value of the device attribute information changes relative to the historical attribute value, the time difference between the acquisition time of the device attribute information and the storage time of the historical attribute, and the number of historical attribute reports, further includes: If the attribute value of the device attribute information is the same as the historical attribute value, and the number of historical attribute reports is greater than the first preset number, or If the attribute value of the device attribute information is different from the historical attribute value, and the number of historical attribute reports is greater than the second preset number, The device attribute information is not the information to be reported.

6. The method according to claim 1, characterized in that Before determining the information to be reported according to the device status information and its historical reporting records, the method further includes: Determine, by a device shadow module, whether to enable a function of filtering the information to be reported in the device attribute information; If the filtering function is enabled, the information to be reported is determined based on the device status information and its historical reporting records.

7. The method according to claim 1, characterized in that Before the step of obtaining device attribute information from a preset device and determining device status information according to the device attribute information and the acquisition time of the device attribute information, the step further includes: Subscribe to the message of the preset device, wherein the subscribed message includes the device attribute information; The device attribute information and its corresponding acquisition time are stored in the device shadow module.

8. The method according to claim 1, characterized in that The step of reporting the information to be reported to a preset network device includes: The information to be reported is reported to a preset gateway device in the local area network, and / or the information to be reported is reported to a preset server in the cloud.

9. A gateway information reporting device, characterized in that: include: A device status information determination module, configured to determine the device status information according to the device attribute information and the acquisition time of the device attribute information if the device attribute information is acquired from the preset device; A module for determining information to be reported, used to determine the information to be reported based on the device status information and its historical reporting records; The information reporting module is used to report the information to be reported to a preset network device.

10. An electronic device comprising a memory and a processor, characterized in that: The memory stores a computer program, and the processor is configured to execute the gateway information reporting method according to any one of claims 1 to 8 through the computer program.

Citation Information

Patent Citations

  • State synchronization method and device, gateway device and storage medium

    CN108616433A

  • Method and device for household appliance to report information and equipment

    CN108880952A

  • Data sending method and device, server and computer storage medium

    CN117812164A

  • Automatic event information method

    JP1994222957A

Cited By

  • Method and device for determining reporting strategy, storage medium and electronic device

    CN120935027A