WO2022068564A1 - 设备异常监测方法及设备 - Google Patents

设备异常监测方法及设备 Download PDF

Info

Publication number
WO2022068564A1
WO2022068564A1 PCT/CN2021/117990 CN2021117990W WO2022068564A1 WO 2022068564 A1 WO2022068564 A1 WO 2022068564A1 CN 2021117990 W CN2021117990 W CN 2021117990W WO 2022068564 A1 WO2022068564 A1 WO 2022068564A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal
server
message
iot
value
Prior art date
Application number
PCT/CN2021/117990
Other languages
English (en)
French (fr)
Inventor
陈晓阳
季振方
赵文远
周海
杨芬
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP21874225.2A priority Critical patent/EP4210289A4/en
Priority to US18/247,140 priority patent/US20230379234A1/en
Publication of WO2022068564A1 publication Critical patent/WO2022068564A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0805Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
    • H04L43/0817Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking functioning
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/75Information technology; Communication
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y10/00Economic sectors
    • G16Y10/80Homes; Buildings
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y20/00Information sensed or collected by the things
    • G16Y20/30Information sensed or collected by the things relating to resources, e.g. consumed power
    • GPHYSICS
    • G16INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR SPECIFIC APPLICATION FIELDS
    • G16YINFORMATION AND COMMUNICATION TECHNOLOGY SPECIALLY ADAPTED FOR THE INTERNET OF THINGS [IoT]
    • G16Y40/00IoT characterised by the purpose of the information processing
    • G16Y40/10Detection; Monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/28Restricting access to network management systems or functions, e.g. using authorisation function to access network configuration
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • H04L43/045Processing captured monitoring data, e.g. for logfile generation for graphical visualisation of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/28Routing or path finding of packets in data switching networks using route fault recovery
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/14Network analysis or design
    • H04L41/145Network analysis or design involving simulating, designing, planning or modelling of a network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/12Protocols specially adapted for proprietary or special-purpose networking environments, e.g. medical networks, sensor networks, networks in vehicles or remote metering networks

Definitions

  • the present application relates to the technical field of the Internet of Things, and in particular, to a method and device for monitoring equipment abnormality.
  • IoT devices can connect to the network and log into the IoT cloud platform.
  • IoT devices can report their own status messages to the IoT cloud platform. For example, on or off status, power consumption, etc. Users can view the status messages of IoT devices and control IoT devices through electronic devices such as mobile phones and tablets.
  • the mobile phone can issue a control command to turn on the IoT device to the IoT cloud platform.
  • the IoT cloud platform can send a control command to turn on the IoT device.
  • the IoT device can be turned on.
  • the IoT device or the IoT cloud platform may be abnormal.
  • the IoT device frequently requests to log in to the IoT cloud platform, and the IoT cloud platform frequently sends the IoT device to the IoT device. Control instruction. These exceptions will waste the hardware and software resources of the IoT cloud platform and IoT devices.
  • the present application provides a device abnormality monitoring method and device.
  • This method can be applied to IoT systems.
  • the IoT system may include an IoT cloud platform and IoT devices.
  • IoT devices can perform anomaly monitoring. When it is detected that the IoT device frequently sends abnormal requests to the IoT cloud platform, the IoT device can reduce the frequency of sending abnormal requests. When it is detected that the IoT cloud platform frequently sends abnormal control commands to the IoT devices, the IoT devices can reduce the frequency of responding to the abnormal control commands.
  • the above method can effectively save the software and hardware resources of the IoT device and the IoT cloud platform when the IoT device or the IoT cloud platform is abnormal.
  • the present application provides a device abnormality monitoring method.
  • the first terminal may send the first message to the server. If the first terminal detects that the first terminal sends the first message to the server N1 times within the first unit time, and N1 is greater than the first value, the first terminal may reduce the number of times that the first message is sent to the server within the first unit time .
  • N1 is a positive integer.
  • the first terminal may receive the second message from the server. If the first terminal detects that the first terminal has received the second message from the server N2 times within the first unit time, and N2 is greater than the second value, the first terminal may reduce the response rate to the second message within the first unit time. frequency.
  • N2 is a positive integer.
  • the aforementioned first terminal may be the aforementioned IoT device.
  • the aforementioned server may be the aforementioned IoT cloud platform.
  • the first terminal can detect whether it is abnormal and whether the server is abnormal. When it is detected that the first terminal is abnormal and frequently sends the first message to the server, the first terminal can reduce the frequency of sending the first message. When it is detected that the server is abnormal, the first terminal frequently receives the second message from the server, and the first terminal can reduce the frequency of responding to the second message. In this way, when the first terminal or the server is abnormal, the first terminal and the server can save software and hardware resources and reduce waste of software and hardware resources.
  • the first terminal may send the first message to the server within the first unit time.
  • the number of times a message falls below the first value.
  • the first terminal may store the first exception rule.
  • the first exception rule may be used to determine whether the behavior of the first terminal sending the first message is an abnormal behavior.
  • the first exception rule may be: if the frequency of sending the first message by the first terminal is higher than 30 times/minute, the behavior of sending the first message is an abnormal behavior. That is to say, the above-mentioned first unit time may be 1 minute.
  • the above-mentioned first value may be 30.
  • the embodiments of the present application do not specifically limit the specific numerical values of the above-mentioned first unit time and the above-mentioned first value.
  • the above-mentioned first message may include a login request and/or a status message of the first terminal (eg, the state of the first terminal being turned on or off, the power consumption of the first terminal, and the data collected by a sensor configured on the first terminal).
  • a status message of the first terminal eg, the state of the first terminal being turned on or off, the power consumption of the first terminal, and the data collected by a sensor configured on the first terminal.
  • the above-mentioned method for the first terminal to reduce the number of times of sending the first message to the server within the first unit time to below the first value may specifically be: the first terminal may record the time of sending the first message each time. When the first message is about to be sent for the nth time, the first terminal may determine whether the number of times the first message is sent exceeds 30 times within the first minute of the current moment. If the number of times exceeds 30, the first terminal may determine the abnormal behavior when sending the first message for the nth time. Further, the first terminal may discard the first message that needs to be sent for the nth time. In this way, the first terminal can reduce the frequency of sending the first message to the server, and control the number of times of sending the first message within 1 minute within 30 (ie, the first value).
  • the frequency of the first message that needs to be processed by the first terminal and the server is reduced.
  • the waste of software and hardware resources of the first terminal and the server can be reduced.
  • the first terminal can still send the first message at a lower frequency (ie, lower than the frequency defined in the first abnormal rule), which can reduce the impact of misjudgment due to abnormal behavior on the function realization of the first terminal.
  • the first terminal may respond within the first unit time The number of times of the above-mentioned first message is reduced below the second value.
  • the first terminal may store the second exception rule.
  • the second exception rule can be used to determine whether the behavior of the server sending the second message is an abnormal behavior.
  • the second exception rule may be: if the frequency of receiving the second message from the server by the first terminal is higher than 30 times per minute, the behavior of the server sending the second message is an abnormal behavior. That is, the above-mentioned second value may be 30.
  • the specific numerical value of the second value is not limited in the embodiment of the present application.
  • the above-mentioned second message may include indication information of the first task.
  • the above-mentioned first task may include setting the state of the first terminal (eg turning on the first terminal, turning off the first terminal) and/or sending a state message of the first terminal to the server. This embodiment of the present application does not limit the specific content of the second message.
  • the method for the first terminal to reduce the number of times of responding to the first message within the first unit time to below the second value may specifically be: the first terminal may record the time each time the second message is received. When receiving the second message for the mth time, the first terminal may determine whether the number of times the second message is received in the first minute of the current moment exceeds 30 times. If it exceeds 30 times, the first terminal may determine that the second message received at the mth time is an abnormal control instruction. Further, the first terminal may discard the second message received for the mth time without responding. In this way, the first terminal can reduce the frequency of responding to the second message, and control the number of times that the first terminal responds to the second message within 30 (ie, the second value) within 1 minute.
  • the first terminal reduces the response frequency to the received second message, thereby reducing the waste of software and hardware resources of the first terminal.
  • setting the state of the first terminal may include one or more of the following: turning on the first terminal and making the first terminal play audio, turning off the first terminal, and adjusting the volume of the first terminal , switch the audio played by the first terminal, and pause the audio played by the first terminal.
  • the first value in the first exception rule and the second value in the second exception rule may be preset by the first terminal when it leaves the factory.
  • the above-mentioned first value and the above-mentioned second value may be sent by the server to the first terminal.
  • the server contains a risk control module for generating exception rules.
  • the server may send the abnormality rules (eg, the first abnormality rule and the second abnormality rule) generated by the risk control module to the first terminal.
  • the first terminal may store exception rules, and perform exception monitoring according to the stored exception rules.
  • the server may update the exception rule in the first terminal.
  • the first terminal stores the third value and the fourth value.
  • the third value may be used by the first terminal to detect whether the number of times the first terminal sends the first message to the server in the first unit time exceeds the third value.
  • the fourth value may be used by the first terminal to detect whether the number of times the first terminal receives the second message from the server in the first unit time exceeds the fourth value.
  • the third value and the fourth value may be preset by the first terminal. Alternatively, the third value and the fourth value may be sent by the server to the first terminal.
  • the risk control module in the server can generate the first exception rule according to the current consumption of software and hardware resources of the server.
  • the first exception rule includes a first value. If the server detects that the first message from the first terminal is received N1 times within the first unit time, and N1 is greater than the above-mentioned first value, the server may send the first exception rule to the first terminal.
  • the first terminal may update the above-mentioned third value to the above-mentioned first value. That is, the first terminal updates the exception rule for detecting whether the first message sent by the first terminal is an abnormal behavior to the first exception rule.
  • the risk control module in the server can generate the second exception rule according to the current consumption of software and hardware resources of the server.
  • the second exception rule includes a second value. If the server detects that the second message is sent to the first terminal N2 times within the first unit time, and N2 is greater than the above-mentioned second value, the server may send the second exception rule to the first terminal.
  • the first terminal may update the above-mentioned fourth value to the above-mentioned second value. That is, the first terminal updates the abnormality rule for detecting whether the second message sent by the server is an abnormal behavior to the second abnormality rule.
  • the abnormality rule used for abnormality monitoring in the first terminal is not fixed.
  • the above exception rules can be adaptively updated according to the consumption of server software and hardware resources. In this way, the software and hardware resources of the first terminal and the server can be reasonably used, and the software and hardware resources of the first terminal and the server can be better saved.
  • the IoT system may further include a second terminal.
  • the second terminal can be used to set the state of the first terminal and obtain a state message of the first terminal through the server.
  • the server may store the identifiers of one or more terminals mapped with the second terminal.
  • the one or more terminals mentioned above include the first terminal.
  • the second terminal may display a message notification indicating that the first terminal is abnormal or a message notification that the first terminal is under abnormal control.
  • the second terminal may display the type of the abnormality of the first terminal and/or the solution to the abnormality of the first terminal.
  • the second terminal may display the type of abnormal control received by the first terminal and/or the first The solution to the exception control received by the terminal.
  • the user can know that the first terminal is abnormal by viewing the second terminal, and solve the abnormality of the first terminal according to the above solution.
  • the first terminal may prompt the user that the first terminal is abnormal through a voice broadcast or different display lights.
  • the user can know in time that the first terminal is abnormal, so that the abnormality of the first terminal can be solved according to the relevant solution.
  • the second terminal can control the turning on and off of the abnormality monitoring switch on the first terminal through the Internet of Things APP. In this way, the user can remotely turn on or turn off the abnormality monitoring switch on the first terminal through the second terminal.
  • the present application also provides an abnormality monitoring method.
  • the method includes: the server may receive the first message from the first terminal. The server may generate the first value. If the server detects that the first message from the first terminal is received N1 times within the first unit time, and N1 is greater than the first value, the server may send the first value to the first terminal. The first value may be used by the first terminal to determine whether the number of times of sending the first message to the server within the first unit time exceeds the first value. The above N1 is a positive integer. Alternatively, the server may send the second message to the first terminal. The server may generate the second value.
  • the server may send the second value to the first terminal.
  • the second value may be used by the first terminal to determine whether the number of times of receiving the second message from the server in the first unit time exceeds the second value.
  • N2 is a positive integer.
  • the first terminal may reduce the number of sending the first message to the server within the first unit time. number of messages.
  • the frequency of the first message that needs to be processed by the first terminal and the server is reduced, so that the first terminal and the server can reduce the waste of software and hardware resources.
  • the first terminal can still send the first message at a lower frequency (ie, lower than the frequency defined in the first abnormal rule), which can reduce the impact of misjudgment due to abnormal behavior on the function realization of the first terminal.
  • the first terminal may reduce the response time within the first unit time to the above-mentioned first message. 2. The number of messages. The first terminal can reduce waste of software and hardware resources.
  • the aforementioned first terminal may be the aforementioned IoT device.
  • the aforementioned server may be the aforementioned IoT cloud platform.
  • the first terminal can detect whether it is abnormal and whether the server is abnormal. When it is detected that the first terminal is abnormal and frequently sends the first message to the server, the first terminal can reduce the frequency of sending the first message. When it is detected that the server is abnormal, the first terminal frequently receives the second message from the server, and the first terminal can reduce the frequency of responding to the second message. In this way, when the first terminal or the server is abnormal, the first terminal and the server can save software and hardware resources and reduce waste of software and hardware resources.
  • the above-mentioned first message may include a login request and/or a status message of the first terminal (eg, the state of the first terminal being turned on or off, the power consumption of the first terminal, and the data collected by a sensor configured on the first terminal).
  • a status message of the first terminal eg, the state of the first terminal being turned on or off, the power consumption of the first terminal, and the data collected by a sensor configured on the first terminal.
  • the above-mentioned second message may include indication information of the first task.
  • the above-mentioned first task may include setting the state of the first terminal (eg turning on the first terminal, turning off the first terminal) and/or sending a state message of the first terminal to the server. This embodiment of the present application does not limit the specific content of the second message.
  • the server may update the exception rules in the first terminal.
  • the server may receive the first message from the first terminal.
  • the server may generate a third value.
  • the third value is smaller than the first value described above. If the server detects that the first message from the first terminal is received N3 times within the first unit time, and N3 is greater than the third value, the server may send the third value to the first terminal.
  • the third value may be used to update the first value stored by the first terminal.
  • N3 is a positive integer.
  • the server may send the second message to the first terminal.
  • the server may generate a fourth value.
  • the fourth value is smaller than the above-mentioned second value. If the server detects that the second message is sent to the first terminal N4 times within the first unit time and N4 is greater than the fourth value, the server may send the fourth value to the first terminal.
  • the second value may be used to update the second value stored by the first terminal.
  • N4 is a positive integer.
  • the above-mentioned third value and fourth value may be generated by the server according to the consumption of software and hardware resources of the server.
  • the first terminal may use the updated third value and the fourth value to perform abnormality monitoring.
  • the abnormality rule used for abnormality monitoring in the first terminal is not fixed.
  • the above exception rules can be adaptively updated according to the consumption of server software and hardware resources. In this way, the software and hardware resources of the first terminal and the server can be reasonably used, and the software and hardware resources of the first terminal and the server can be better saved.
  • the server may send a message to the second terminal for indicating that the first terminal is abnormal.
  • the server may send a message for indicating that the first terminal is under abnormal control to the second terminal.
  • the server can determine whether the first terminal is abnormal according to the third value obtained after the update, and determine whether the first terminal is abnormal according to the fourth value. Whether a terminal is under abnormal control. If it is determined that the first terminal is abnormal or is under abnormal control, the service may send the third message or the fourth message to the second terminal.
  • the server may send the third message to the second terminal.
  • the indication content of the third message may be displayed on the second terminal, and the indication content of the third message includes the type of the abnormality of the first terminal and/or the solution to the abnormality of the first terminal.
  • the server may send the fourth message to the second terminal.
  • the indication content of the fourth message may be displayed on the second terminal, and the indication content of the fourth message includes the type of the abnormal control received by the first terminal and/or the solution of the abnormal control received by the first terminal.
  • the above-mentioned second terminal may be a device installed with an application (application, APP) for controlling the IoT device.
  • application application, APP
  • APP application for controlling the IoT device.
  • This embodiment of the present application does not limit the specific type of the second terminal.
  • the above application is, for example, an Internet of Things APP.
  • the user can know that the first terminal is abnormal by viewing the second terminal, and solve the abnormality of the first terminal according to the above solution.
  • the present application provides a terminal.
  • the terminal may include a communication module, a memory and a processor. in:
  • the communication module can be used to establish a communication connection with the server.
  • Memory can be used to store computer programs.
  • the processor may be configured to invoke a computer program, so that the terminal executes any of the possible implementation methods of the first aspect above.
  • the present application provides a server, which may include a communication module, a memory and a processor.
  • the communication module can be used to establish a communication connection with the terminal.
  • Memory can be used to store computer programs.
  • the processor may be configured to invoke the computer program in the above-mentioned memory, so that the server executes any one of the possible implementation methods of the above-mentioned second aspect.
  • the present application provides a computer-readable storage medium, comprising instructions, when the above-mentioned instructions are executed on the terminal provided in the above-mentioned third aspect, the terminal is made to execute any of the possible implementation methods of the above-mentioned first aspect.
  • the server when the above-mentioned instruction is executed on the server provided in the above-mentioned fourth aspect, the server is caused to execute any one of the possible implementation methods of the above-mentioned second aspect.
  • the present application provides a computer program product that, when the computer program product is executed on the terminal provided in the third aspect, enables the terminal to execute any of the possible implementation methods of the first aspect.
  • the server is caused to execute any one of the possible implementation methods of the above second aspect.
  • the present application provides a chip, which is applied to the terminal provided in the third aspect or the server provided in the fourth aspect, the chip includes one or more processors, and the one or more processors are used to invoke computer instructions
  • the terminal provided in the third aspect is made to execute any one of the possible implementation methods of the foregoing first aspect, or the server provided in the fourth aspect is made to execute any of the foregoing possible implementation methods of the second aspect.
  • the terminal provided in the third aspect the server provided in the fourth aspect, the computer-readable storage medium provided in the fifth aspect, the computer program product provided in the sixth aspect, and the chip provided in the seventh aspect are all used to execute the present invention.
  • FIG. 1A and FIG. 1B are schematic diagrams of a scenario in which an Internet of Things device is abnormal according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a scenario where an abnormality occurs in an IoT cloud platform provided by an embodiment of the present application
  • FIG. 3 is a schematic structural diagram of an Internet of Things system provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a setting interface of an Internet of Things application program of an electronic device provided by an embodiment of the present application
  • FIG. 5 is a flowchart of a method for abnormality monitoring of IoT devices provided by an embodiment of the present application
  • FIG. 6 is a flowchart of a method for an IoT device to reduce the frequency of abnormal behavior of an IoT device provided by an embodiment of the present application;
  • FIG. 7 is a flowchart of another method for abnormal monitoring of IoT devices provided by an embodiment of the present application.
  • FIG. 8 is a schematic diagram of a user interface in which an electronic device prompts a user that an Internet of Things device is abnormal according to an embodiment of the present application;
  • FIG. 9 is a flowchart of another method for abnormal monitoring of IoT devices provided by an embodiment of the present application.
  • FIG. 10 is a flowchart of a method for an IoT device to reduce the frequency of abnormal control of an IoT cloud platform provided by an embodiment of the present application;
  • FIG. 11 is a flowchart of another method for abnormality monitoring of IoT devices provided by an embodiment of the present application.
  • FIG. 12 is a flowchart of a method for an Internet of Things device to report the state of an abnormality monitoring switch provided by an embodiment of the present application;
  • FIG. 14 is a flowchart of a method for an electronic device to control an abnormality monitoring switch of an IoT device provided by an embodiment of the present application;
  • 15 is a flowchart of a method for monitoring equipment abnormality provided by an embodiment of the present application.
  • the above electronic device may be a device installed with an application (application, APP) for controlling IoT devices.
  • the electronic device may be a mobile phone, a tablet, a notebook computer, a handheld computer, a personal digital assistant (PDA), a wearable electronic device, and the like.
  • the above-mentioned APP for controlling the Internet of Things device may be an Internet of Things APP.
  • the electronic device can obtain the status message of the Internet of Things device through the above-mentioned Internet of Things APP, and send instructions for controlling the Internet of Things device. That is, the user can view the status message of the IoT device and control the IoT device through the IoT APP in the electronic device.
  • FIG. 1A and 1B exemplarily show a schematic diagram of a scenario where an IoT device is abnormal.
  • a data table may be stored in the IoT cloud platform 200 .
  • This data sheet can be used to represent the pairing relationship between electronic devices and IoT devices.
  • the electronic device 100 establishes a pairing relationship with both the IoT device 300 and the IoT device 500 .
  • the data table may include fields of electronic device identification, IoT device identification, IoT device login account, and IoT device login password.
  • Electronic device identification can be used to uniquely identify electronic devices.
  • IoT device identification can be used to uniquely identify IoT devices.
  • the IoT device login account and the IoT device login password can be used for the IoT device to log in to the IoT cloud platform.
  • the electronic device 100 can use the IoT APP to control the IoT device 300 through the IoT cloud platform 200 .
  • the IoT device 300 can also report its own status messages.
  • the IoT device 300 is a smart light.
  • the electronic device 100 is a mobile phone.
  • the smart light is logged into the IoT cloud platform 200, the mobile phone can control the lighting and extinguishing of the smart light through the IoT cloud platform 200.
  • the smart light can report to the IoT cloud platform 200 a status message of whether it is on or off. In this way, the mobile phone can obtain the status information of the smart light through the IoT cloud platform 200 .
  • the IoT cloud platform 200 can delete the control instruction of the electronic device 100 and the IoT device 300 in the data table. That is, the IoT cloud platform 200 can update the data table from table a to table b.
  • the IoT device 300 (such as a smart light) does not delete information such as the account number and password used to log in to the IoT cloud platform.
  • the electronic device 100 and the IoT cloud platform 200 have deleted the relevant information of the smart light 300 .
  • the smart light 300 cannot enter the state to be distributed to the network. That is to say, when the smart light 300 requests to log in to the IoT cloud platform 200 using the account and password (such as account Jane1 and password 123456) before the above-mentioned deletion operation, since the account of the smart light 300 does not exist in the IoT cloud platform 200 and password, the IoT cloud platform 200 can return the login failure information to the smart light 300 .
  • the account and password such as account Jane1 and password 123456
  • the smart light 300 is in an abnormal state and frequently sends login requests to the IoT cloud platform 200 .
  • the above behavior of the smart light 300 frequently requesting login will consume a large amount of software and hardware resources of the smart light 300 and the IoT cloud platform 200 .
  • the control rules in the IoT cloud platform have an infinite loop.
  • the occurrence of an infinite loop in the control rule may be that the IoT cloud platform 200 sends an instruction for turning on the light to the smart light 300 .
  • the IoT cloud platform 200 After sending the instruction for turning on the light, the IoT cloud platform 200 then sends the instruction for turning off the light to the smart light 300 .
  • the IoT device 200 continues to send the instruction for turning on the light to the smart light 300 .
  • the above-mentioned repeated cycle occurs in the IoT cloud platform 200 .
  • the smart light 300 can be turned on.
  • the smart light 300 may be turned off.
  • the above-mentioned Internet of Things cloud platform is abnormal, and the behavior of frequently sending control instructions to the smart light 300 will consume a large amount of software and hardware resources of the smart light 300 and the Internet of Things cloud platform 200 .
  • the embodiments of the present application do not limit the abnormal behaviors of the above IoT devices and IoT cloud platforms.
  • the abnormality that occurs in the IoT device 300 may also be that the IoT device 300 frequently reports its own status message to the IoT cloud platform 200 .
  • the IoT cloud platform 200 cannot identify the status message reported from the IoT device 300 .
  • the IoT cloud platform 200 does not reply to the IoT device 300 with a notification indicating that the status message is successfully received.
  • the IoT device 300 frequently reports status messages to the IoT cloud platform 200 .
  • the IoT cloud platform 200 cannot parse the status message. Then, the IoT cloud platform 200 does not reply to the IoT device 300 with the notification indicating the reception of the successful status message. Furthermore, the IoT device 300 may frequently report status messages to the IoT cloud platform 200 .
  • the abnormality of the IoT cloud platform 200 may also be due to the infinite loop of control rules, the failure of the flow control mechanism, or the malicious attack on the IoT cloud platform 200.
  • the IoT device 300 frequently sends control instructions or requests to obtain the IoT Status messages for device 300 .
  • the IoT device 300 is a smart speaker.
  • the IoT cloud platform 200 frequently sends a control instruction for adjusting the volume, a control instruction for switching songs, or a control instruction for adjusting the play mode of the smart speaker to the smart speaker, and the like.
  • the abnormal behaviors of the IoT device and the IoT cloud platform mentioned in the embodiments of this application may also be other.
  • the above-mentioned software and hardware resources may include hardware resources and software resources.
  • the hardware resources may include computing resources (eg, a central processing unit to perform related calculations) and storage resources (eg, memory to store related data).
  • Software resources may include system software and application software.
  • the IoT system can monitor whether an abnormality occurs from the IoT cloud platform.
  • a flow control mechanism may be set on the IoT cloud platform.
  • the flow control mechanism can be used to deal with abnormal behaviors such as the frequent sending of requests by IoT devices and the frequent sending of control commands by the IoT cloud platform. For example, when the IoT device frequently sends the same request to the IoT cloud platform, the IoT cloud platform can reduce the processing frequency of the same request, thereby saving the software and hardware resources of the IoT cloud platform.
  • the IoT cloud platform can partially discard the login request from the IoT device according to the flow control mechanism.
  • the IoT cloud platform received 60 login requests from IoT devices within 1 minute.
  • the IoT cloud platform can process the first 30 login requests according to the flow control mechanism, and return a login failure message to the IoT device.
  • the IoT cloud platform can discard the login requests received after 30 times within one minute. In this way, the software and hardware resources of the IoT cloud platform can be saved to a certain extent.
  • the IoT device is still in an abnormal state and frequently sends requests to the IoT cloud platform.
  • the hardware and software resources of IoT devices will still be occupied and wasted in large quantities. IoT cloud platforms still need to consume hardware and software resources to process requests sent by IoT devices.
  • the embodiment of the present application provides a method for monitoring equipment abnormality.
  • both the IoT APP of the electronic device and the IoT device can be configured with an abnormality monitoring switch.
  • the status of the abnormality monitoring switch on the IoT device can be consistent with the status of the abnormality monitoring switch in the IoT APP.
  • the IoT device stores abnormal rules for judging abnormal behaviors.
  • the IoT device can record the frequency of the IoT device sending requests (such as login requests) to the IoT cloud platform, and judge whether the request sent by the IoT device is abnormal according to the exception rules. If it is determined that the request sent by the IoT device is abnormal behavior, the IoT device can reduce the frequency of sending the request, thereby reducing the consumption of software and hardware resources of the IoT device and the IoT cloud platform.
  • the IoT device can also record the frequency of received control commands (such as turn-on commands) from the IoT cloud platform, and judge whether the control commands sent by the IoT cloud platform are abnormal behaviors according to abnormal rules. If it is determined that the control command sent by the IoT device is an abnormal behavior, the IoT device can send an abnormal response to the IoT cloud platform, and reduce the frequency of responding to the control command in the abnormal behavior. In this way, IoT devices can reduce the consumption of their own software and hardware resources.
  • control commands such as turn-on commands
  • a risk control module can be configured in the IoT cloud platform.
  • the risk control module can record the abnormal response sent by the above-mentioned Internet of Things device, and then determine that the Internet of Things cloud platform is abnormal.
  • the IoT cloud platform can reduce the frequency of sending control commands in the above abnormal behavior according to the flow control mechanism, thereby saving the software and hardware resources of the IoT device and the IoT cloud platform.
  • the risk control module can also record the frequency that the IoT device sends a request (such as a login request) to the IoT cloud platform, and judge whether the request sent by the IoT device is an abnormal behavior according to the exception rule.
  • the IoT cloud platform can send a notification to the electronic device.
  • the notification can be used to indicate that the IoT device is in an abnormally requested state or in an abnormally controlled state. In this way, the user can know that the Internet of Things device is abnormal through the Internet of Things APP on the electronic device, and then can handle the abnormality according to the relevant operation prompts.
  • the risk control module can also be used to update exception rules stored in IoT devices. Specifically, the risk control module can generate abnormal rules for judging whether the behavior of the Internet of Things device and the Internet of Things cloud platform is abnormal behavior according to the current consumption of software and hardware resources of the Internet of Things cloud platform.
  • the risk control module can send new exception rules to IoT devices.
  • the IoT device can update the abnormal rules stored locally, and use the updated abnormal rules for abnormal monitoring. In this way, the IoT device can adjust the frequency of interaction with the IoT cloud platform according to the consumption of software and hardware resources of the IoT cloud platform, so as to utilize the software and hardware resources of the IoT cloud platform more reasonably.
  • the abnormality monitoring method can monitor whether the Internet of Things device and the Internet of Things cloud platform are abnormal.
  • the method can reduce the frequency of the Internet of Things device sending abnormal requests when the Internet of Things device frequently sends abnormal requests to the Internet of Things cloud platform.
  • the method can also reduce the frequency of the Internet of Things device responding to the abnormal control instruction when the Internet of Things cloud platform frequently sends the abnormal control instruction to the Internet of Things device. In this way, software and hardware resources of IoT devices and IoT cloud platforms can be saved more effectively.
  • FIG. 3 exemplarily shows an Internet of Things system provided by an embodiment of the present application.
  • the IoT system may include an electronic device 100 , an IoT cloud platform 200 and an IoT device 300 .
  • the Internet of Things APP for controlling the Internet of Things device 300 may be installed in the electronic device 100 .
  • the electronic device 100 can obtain the status message of the IoT device 300 through the IoT APP, and send a control instruction for controlling the IoT device 300 .
  • the IoT APP may include an abnormality monitoring switch.
  • the abnormality monitoring switch can be used to turn on or off the abnormality monitoring switch 301 on the IoT device 300 .
  • FIG. 4 exemplarily shows the abnormality monitoring switch in the IoT APP.
  • the Internet of Things APP is installed in the electronic device 100 .
  • the electronic device 100 may display the setting interface as shown in FIG. 4 .
  • the setup interface may include an abnormality monitoring state 201 .
  • the abnormality monitoring state 201 may be used to prompt the user whether the abnormality monitoring switch on the Internet of Things device 300 is in an on state or an off state.
  • the abnormality monitoring state 201 shown in FIG. 2 includes the prompt word “closed”. This may indicate that the anomaly monitoring switch on the IoT device 300 is off.
  • the abnormality monitoring state 201 may include the abnormality monitoring switch 201A.
  • the electronic device 100 may turn on or off the abnormality monitoring switch on the IoT device 300 according to the user's selection.
  • the IoT cloud platform 200 may be used to connect the electronic device 100 and the IoT device 300 .
  • the IoT cloud platform 200 can establish a communication connection with the electronic device 100 and the IoT device 300 .
  • the above-mentioned communication connection may be a Bluetooth (bluetooth, BT) communication connection, a wireless fidelity (wireless fidelity, WiFi) communication connection, a ZigBee communication connection, a near field communication (near field communication, NFC) connection, and the like.
  • the embodiments of the present application do not limit the manner in which the Internet of Things cloud platform 200 communicates with the electronic device 100 and the Internet of Things device 300.
  • possible communication protocols in future technologies can also be used. to communicate.
  • the IoT cloud platform 200 may include a communication module, a processing module, and a storage module.
  • the above communication module can be used for the IoT cloud platform 200 to communicate with the electronic device 100 and the IoT device 300 .
  • the communication module of the IoT cloud platform 200 may communicate with the IoT device 300 through the first interface, and communicate with the electronic device 100 through the second interface.
  • the above-mentioned storage module can be used to store the corresponding information of the electronic device 100 and the Internet of Things device connected to the electronic device 100, and the status information reported by the Internet of Things device 300 (such as the state of the Internet of Things device 300 being turned on or off, power consumption, The abnormality monitoring switch 301 on the device 300 is on or off, etc.), the account number and password used by the IoT device 300 to log in to the IoT cloud platform, and the like.
  • Table 1 is a data table in the storage module provided by the embodiment of the present application.
  • the data table can be used to store information about the electronic device 100 and the Internet of Things devices connected to the electronic device.
  • the field "Electronic Equipment Identification” can be a keyword. That is, the IoT cloud platform 200 can search for IoT devices connected to the electronic device according to the electronic device in the column of the field "Electronic Device ID".
  • the field "Electronic Equipment Identity” may contain the identifier of each electronic equipment, for example, such as International Mobile Equipment Identity (IMEI). The identifier of the electronic device can be used to uniquely identify the electronic device.
  • IMEI International Mobile Equipment Identity
  • the data table may also include: field "IoT device ID”, field “IoT device login account”, field “IoT device login password”, field “IoT device open status”, field “IoT device abnormalMonitor”, Field “IoT Device Power Consumption”.
  • the data table may further include more or less fields, which are not limited in this embodiment of the present application.
  • IoT device identification may contain the identifier of the IoT device.
  • the identifier of the IoT device can be used to uniquely identify the IoT device.
  • the above field "Internet of Things device login account” and the above field “Internet of Things device login password” may be the account number and password for the Internet of Things device to log in to the Internet of Things cloud platform.
  • the above account and password may be allocated by the electronic device according to the relevant settings of the user after the electronic device is connected to the Internet of Things device.
  • the electronic device 100 may display a related user interface.
  • the user interface can be used to set the account and password of the IoT device 300 to log in to the IoT cloud platform 200 .
  • the electronic device 100 may send the account and password to the IoT device 300 via the IoT cloud platform 200 .
  • the IoT cloud platform 200 may store the above account and password in the data table as shown in FIG. 1B .
  • the IoT device 300 may also store the above account and password, and use the above account and password to log in to the IoT cloud platform 200 .
  • the electronic device 100 can control the related functions of the IoT device 300 through the IoT cloud platform 200, such as turning on or off the IoT device 300, adjusting the volume of the IoT device 300, etc. .
  • the electronic device 100 may also obtain the status message of the IoT device 300 through the IoT cloud platform 200 .
  • IoT Device On can be used to indicate whether the IoT device is on or off.
  • a value of 1 in this field may indicate that the IoT device is in an on state.
  • a value of 0 for this field can indicate that the IoT device is off.
  • Internet of Things device abnormalMonitor can be used to indicate that the abnormal monitoring switch of the Internet of Things device is on or off.
  • a value of 1 in this field may indicate that the abnormality monitoring switch is in an on state.
  • a value of 0 in this field indicates that the anomaly monitoring switch is off.
  • IoT Device Power Consumption can be used to represent the power consumption of the IoT device.
  • the storage module can also be used to store computer programs and related rules, such as rules for judging whether the IoT device or the IoT cloud platform is in an abnormal state.
  • the above processing module can be used to execute the computer program in the storage module, process requests from the electronic device 100 and the Internet of Things device 300 , and send a notification to the electronic device 100 and the Internet of Things device 300 .
  • the processing module may also perform flow control on the control instruction sent by the IoT cloud platform 200 and the request from the IoT device 300 according to the flow control mechanism in the IoT cloud platform 200 .
  • the exception rules stored in the IoT device 300 include: when the frequency of the IoT device 300 sending login requests to the IoT cloud platform 200 is higher than 30 times/minute, the IoT device 300 can determine that the login request sent is is an abnormal request.
  • the IoT cloud platform 200 may further include more or less modules, which are not limited in this embodiment of the present application.
  • the IoT device 300 may be provided with an abnormality monitoring switch 301 .
  • the IoT device 300 includes abnormal rules for judging the abnormal behavior of the IoT device and the abnormal behavior of the IoT cloud platform.
  • the abnormality monitoring switch 301 When the abnormality monitoring switch 301 is in an on state, when the IoT device 300 sends a message to the IoT cloud platform, it can judge whether the sending of the message is an abnormal behavior according to the above exception rules. If it is determined to be abnormal behavior, the IoT device 300 may discard the message. In this way, the IoT device 300 does not send the message to the IoT cloud platform. The IoT cloud platform may also not need to process the message.
  • the abnormality monitoring switch 301 when the abnormality monitoring switch 301 is turned on, when the IoT device 300 receives a message sent by the IoT cloud platform 200, it can judge whether the message sent by the IoT cloud platform 200 is an abnormal behavior according to the above exception rules. If it is determined that the behavior is abnormal, the IoT device 300 may not respond to the message sent by the IoT cloud platform 200 .
  • the IoT device 300 can monitor whether the IoT device 300 and the IoT cloud platform 200 are abnormal according to the locally stored exception rules. When it is detected that the IoT device 300 frequently sends abnormal requests to the IoT cloud platform 200, the IoT device 300 can reduce the frequency of the IoT device 300 sending the above-mentioned abnormal requests. When it is detected that the IoT cloud platform 200 frequently sends abnormal control commands to the IoT device 300, the IoT device 300 can reduce the frequency of the IoT device responding to the abnormal control command. In this way, the software and hardware resources of the IoT device 300 and the IoT cloud platform 200 can be effectively saved.
  • the status of the abnormality monitoring switch on the IoT APP in the electronic device 100 can be turned on or off accordingly.
  • the user can know the state of the abnormality monitoring switch 301 of the Internet of Things device 300 according to the state of the abnormality monitoring switch on the Internet of Things APP.
  • the electronic device 100 can control the state of the abnormality monitoring switch 301 on the IoT device 300 through the IoT APP. In this way, when the user is not beside the IoT device 300 or it is inconvenient to turn on or off the abnormality monitoring switch 301 on the IoT device 300, the user can turn on or off the abnormality monitoring switch 301 on the IoT device 300 through the IoT APP.
  • the Internet of Things device 300 can monitor whether the Internet of Things device 300 has abnormal behavior according to the abnormal rules stored locally.
  • the abnormal behavior of the IoT device 300 reference may be made to the introduction of the foregoing embodiments. The following is specifically described by taking as an example that the abnormality occurring in the IoT device 300 frequently sends the same request (eg, a login request) to the IoT cloud platform 200 .
  • the above-mentioned abnormal rule for monitoring whether the Internet of Things device 300 has abnormal behavior may be: the frequency of the Internet of Things device 300 sending the same request exceeds a preset frequency.
  • the preset frequency for determining whether the behavior of the IoT device 300 sending the login request is an abnormal behavior in the abnormal rule is 30 times/minute.
  • the frequency of the IoT device 300 sending the login request to the IoT cloud platform 200 is more than 30 times/min, for example, 50 times/min, the IoT device 300 can determine that the behavior of sending the login request is an abnormal behavior.
  • the above exception rule may also be: for the case where the IoT device 300 sends a message to the IoT cloud platform 200, the IoT device 300 receives the same feedback from the IoT cloud platform 200 more frequently than a preset frequency. For example, after the IoT device 300 sends a login request to the IoT cloud platform 200, if the IoT device 300 receives more than a preset frequency of login failure messages fed back by the IoT cloud platform 200, the IoT device 300 can determine to send the login request behavior is abnormal behavior.
  • This embodiment of the present application does not limit the specific content of the above exception rule.
  • the above exception rules may be stored in the erasable storage module of the IoT device 300 .
  • electrically erasable programmable read only memory electrically erasable programmable read only memory, EEPROM), erasable programmable read only memory (erasable programmable read only memory, EPROM), etc.
  • EEPROM electrically erasable programmable read only memory
  • EPROM erasable programmable read only memory
  • the embodiments of the present application do not limit the specific types of the above-mentioned erasable memory modules.
  • the above exception rule may be an erasable storage module preset in the IoT device 300 when it leaves the factory.
  • the above exception rules may also be issued by the IoT cloud platform 200 .
  • the IoT device 300 can update the exception rule preset at the factory or the last exception rule issued by the IoT cloud platform 200 in the erasable storage module. That is, the IoT device 300 can delete the abnormal rules preset at the factory or the last exception rules issued by the IoT cloud platform 200 from the erasable storage module, and delete the exception rules issued by the IoT cloud platform 200 this time.
  • Exception rules are stored in an erasable memory module.
  • exception rules may include multiple exception rules for judging whether different behaviors are abnormal behaviors.
  • the abnormal rules used to determine whether the login request sent by the IoT device 300 is an abnormal behavior and the abnormal rules used to determine whether the status message sent by the IoT device 300 is an abnormal behavior may be different.
  • the difference between the exception rules may specifically be different frequencies set in the exception rules. The embodiment of the present application does not limit the specific value of the frequency in the exception rule.
  • the following specifically introduces a device abnormality monitoring method provided by an embodiment of the present application in combination with an application scenario in which an Internet of Things device is abnormal.
  • FIG. 5 exemplarily shows a flow chart of a method for device abnormality monitoring.
  • the method may include steps S301-S305. in:
  • the IoT device 300 exhibits abnormal behavior.
  • the abnormal behavior may be that the IoT device 300 frequently sends login requests to the IoT cloud platform 200 .
  • the reason for the abnormal behavior may be that the IoT cloud platform 200 mentioned in the foregoing embodiment has deleted the account and password used by the IoT device 300 to log in, but the IoT device 300 has not been successfully deleted, and the above-mentioned Deleted account and password request to log in. Since the login cannot be successful, the IoT device 300 may frequently request login.
  • the IoT device 300 sends a login request to the IoT cloud platform 200.
  • the above login request may include an account number and password.
  • the IoT cloud platform 200 in response to the request from the electronic device 100 for deleting the IoT device 300, the IoT cloud platform 200 has deleted the above account and password.
  • the IoT cloud platform 200 sends a login failure message to the IoT device 300 .
  • the IoT cloud platform 200 may send a login failure message to the IoT device 300 .
  • the IoT device 300 may send a login request to the IoT cloud platform 200 again. Further, the IoT cloud platform 200 may send a login failure message to the IoT device 300 again.
  • the IoT device 300 and the IoT cloud platform 200 may always interact with the above steps S301 and S302. Exemplarily, because the login cannot be successful, the IoT device 300 frequently requests login. The request frequency reaches 50 times/minute.
  • the IoT device 300 receives a user operation for turning on the abnormality monitoring switch 301 .
  • the IoT device 300 can turn on the abnormality monitoring switch 301 .
  • the IoT device 300 determines that sending a login request by the IoT device 300 is an abnormal behavior according to the locally stored first exception rule (for example, a request frequency higher than 30 times/min is abnormal), and reduces the frequency of sending login requests.
  • the locally stored first exception rule for example, a request frequency higher than 30 times/min is abnormal
  • the IoT device 300 may record the number of times the IoT device 300 sends a login request, and compare the frequency of sending the login request with the first exception rule. If it is determined that the frequency of sending the login request is higher than the frequency set in the first exception rule, the IoT device 300 may determine that the sending of the login request is an abnormal behavior, thereby reducing the frequency of sending the login request.
  • This embodiment of the present application does not limit the specific value of the frequency set in the above-mentioned first exception rule.
  • the IoT device 300 may perform abnormality monitoring according to the method flowchart shown in FIG. 6 , and reduce the frequency of abnormal behaviors.
  • the method may include steps S3041-S3045. in:
  • the IoT device 300 is about to send a first request to the IoT cloud platform 200 .
  • the above-mentioned first request may be the login request in step S301.
  • the above-mentioned first request may also be other requests sent by the IoT device 300 to the IoT cloud platform 200 or a status message of the IoT device 300 reported.
  • This embodiment of the present application does not limit the specific content of the above-mentioned first request.
  • the IoT device 300 determines whether the abnormality monitoring switch 301 is turned on.
  • the IoT device 300 may first determine whether the abnormality monitoring switch 301 is turned on.
  • the IoT device 300 can perform abnormality monitoring. Specifically, the IoT device 300 may further perform step S3043.
  • the IoT device 300 does not perform abnormality monitoring. Specifically, the IoT device 300 may further perform step S3045.
  • the IoT device 300 may determine whether the abnormality monitoring switch 301 is in an on state by judging the level state of the corresponding pin of the abnormality monitoring switch 301 . Exemplarily, when it is determined that the level state on the corresponding pin of the abnormality monitoring switch 301 is a high level, the IoT device 300 may determine that the abnormality monitoring switch 301 is in an on state. When it is determined that the level state on the corresponding pin of the abnormality monitoring switch 301 is a low level, the IoT device 300 may determine that the abnormality monitoring switch 301 is in an off state.
  • This embodiment of the present application does not limit the manner in which the IoT device 300 determines whether the abnormality monitoring switch 301 is turned on.
  • the IoT device 300 determines whether the frequency of sending the first request complies with the first exception rule.
  • the above-mentioned first exception rule may be preset when the IoT device 300 is shipped from the factory.
  • the first exception rule may be: if the frequency of sending the first request (eg, login request) by the IoT device 300 is higher than 30 times/minute, the IoT device 300 may determine that sending the first request is an abnormal behavior.
  • a scenario in which the IoT device 300 sends the first request in step S3041 is that the IoT device 300 sends the first request for the 31st time within 1 minute is used as an example for description. That is, the IoT device 300 has sent the first request 30 times in less than 1 minute. Then, the IoT device 300 can determine that the 31st sending of the first request complies with the above-mentioned first rule, and can further determine that the sending of the first request is an abnormal behavior.
  • the IoT device 300 may perform step S3044.
  • the IoT device 300 may perform step S3045.
  • the specific method for the IoT device 300 to determine whether the frequency of sending the first request conforms to the first exception rule may be as follows: the IoT device 300 may record the time each time the first request is sent. When the n-th first request is about to be sent, the IoT device 300 may determine whether the number of times the first request is sent exceeds 30 times within the first minute of the current moment. If it exceeds 30 times, the IoT device 300 may determine that the frequency of sending the first request complies with the first exception rule. That is, the nth time the IoT device 300 sends the first request is an abnormal behavior. Further, the IoT device 300 may perform step S3044. If it does not exceed 30 times, the IoT device 300 may determine that the frequency of sending the first request does not conform to the first exception rule. Further, the IoT device 300 may perform step S3045. The above n is a positive integer.
  • the IoT device 300 discards the first request.
  • the IoT device 300 may discard the first request that needs to be sent this time.
  • the IoT device 300 discards the nth first request that needs to be sent, the nth first request that needs to be sent is not counted in the number of times the first request has been sent. Specifically, when the n+1 th first request is about to be sent, the IoT device 300 can determine whether the number of times the first request is sent exceeds 30 times within the first minute of the current moment. Wherein, when the time interval between the nth time that the IoT device 300 is about to send the first request and the n+1th time that the IoT device 300 is about to send the first request is less than 1 minute, the IoT device 300 judges that the first request at the current moment is 1 minute. Whether the number of times of sending the first request in a minute exceeds 30 times may not be counted as the nth first request that needs to be sent.
  • the IoT device 300 sends a first request to the IoT cloud platform 200 .
  • the IoT device 300 may directly send the first request to the IoT cloud platform 200 when it needs to send the first request to the IoT cloud platform 200 .
  • the IoT device 300 may send the first request to the IoT cloud platform 200 when determining that the frequency of sending the first request does not conform to the first exception rule.
  • the IoT device 300 can perform abnormality monitoring. If the IoT device 300 exhibits abnormal behavior, for example, frequently sends the first request to the IoT cloud platform 200, the IoT device 300 may reduce the frequency of sending the first request. Specifically, the IoT device 300 may limit the frequency of sending the first request to a range not higher than the frequency set in the first exception rule according to the frequency set in the first exception rule.
  • the IoT device 300 can continue to send the above-mentioned first request to implement related functions, thereby reducing the impact of misjudgment due to abnormal behavior on the functional realization of the Internet of Things device 300 .
  • the first request in the method shown in FIG. 6 may be a login request sent by the IoT device 300 to the IoT cloud platform 200 .
  • the IoT device 300 may send the login request at a lower frequency, for example, the frequency is 20 times/minute. specific:
  • the IoT device 300 sends a login request to the IoT cloud platform 200 .
  • the IoT device 300 can perform the judgment process in the method shown in FIG. 6 before sending a login request each time to determine whether the login request to be sent this time is to be sent. Discard, or send the login request that needs to be sent this time to the IoT cloud platform 200 . In this way, the IoT device 300 can control the frequency of sending the login request within a range not higher than the frequency set in the first exception rule, for example, 20 times/minute.
  • the IoT device 300 may stop sending the first request to the IoT cloud platform 200 after monitoring that the frequency of sending the first request (eg, login request) exceeds the frequency set in the first exception rule. That is to say, when the IoT device 300 determines that the first request sent by the IoT device 300 is an abnormal behavior according to the first exception rule stored in the erasable storage module, the IoT device 300 can directly terminate the abnormal behavior. In this way, abnormal interaction between the IoT device 300 and the IoT platform 200 can no longer be performed, thereby saving the software and hardware resources of the IoT device 300 and the IoT cloud platform 200 .
  • the frequency of sending the first request eg, login request
  • the IoT device 300 may prompt the user that the IoT device 300 is abnormal through a voice broadcast or a difference in display lights after an abnormality is detected.
  • the Internet of Things device 300 may voice broadcast "Login abnormality, please reset the device".
  • the IoT device 300 can prompt the user that the IoT device 300 is abnormal, and provide the user with a solution.
  • This embodiment of the present application does not limit the specific content of the above voice broadcast.
  • the IoT device 300 without a voice output device (such as a speaker) can prompt the user that the IoT device 300 is abnormal by displaying a change in the color of the light.
  • the IoT device 300 may be configured with a display light. If the display light is green, it means that the IoT device 300 is working normally. If the display light is red, it may indicate that the IoT device 300 is abnormal. This embodiment of the present application does not limit the above manner of prompting the user that an abnormality occurs.
  • the IoT device 300 since the electronic device 100 and the IoT cloud platform 200 delete the user name and password used to log in to the IoT cloud platform 200 of the IoT device 300, the IoT device 300 does not delete the above user name and password. In this case, the IoT device 300 may frequently request the IoT cloud platform 200 to log in. A specific solution to the above exception may be to perform a reset operation on the Internet of Things device 300 . In this way, the user name and password used to log in to the IoT cloud platform 200 in the IoT device 300 can be deleted. That is, the user can perform user operations on the reset button of the IoT device 300 . When the reset is successful, the IoT device 300 may no longer request a login from the IoT cloud platform 200 before obtaining a new user name and password for logging in to the IoT cloud platform 200 .
  • the Internet of Things device 300 can perform abnormality monitoring.
  • the IoT device 300 can reduce the frequency of sending login requests according to the methods shown in FIG. 5 and FIG.
  • the IoT device 300 may also voice broadcast "Login is abnormal, please reset the device" to prompt the user to perform a reset operation on the IoT device 300 . In this way, the IoT device 300 can eliminate the abnormal behavior described above.
  • the following still specifically introduces another device abnormality monitoring method provided by an embodiment of the present application in combination with an application scenario in which an Internet of Things device is abnormal.
  • FIG. 7 exemplarily shows a flow chart of a method for device abnormality monitoring.
  • the method may include steps S401-S409. in:
  • the IoT cloud platform 200 may be configured with a risk control module.
  • a risk control module For the function of the wind control module, reference may be made to the descriptions in the foregoing embodiments, which will not be repeated here.
  • the IoT device 300 exhibits abnormal behavior.
  • the abnormal behavior may be that the IoT device 300 frequently sends login requests to the IoT cloud platform 200 .
  • the reason why the IoT device 300 frequently sends login requests may refer to the foregoing embodiments, which will not be repeated here.
  • the IoT device 300 sends a login request to the IoT cloud platform 200 .
  • the IoT cloud platform 200 sends a login failure message to the IoT device 300 .
  • the IoT device 300 may request login to the IoT cloud platform 200 frequently (for example, at a frequency of 50 times/minute) due to the aforementioned reasons for the abnormality, and may log in after each login request is sent. A login failure message returned from the IoT cloud platform 200 is received. This greatly consumes the software and hardware resources of the IoT device 300 and the IoT cloud platform 200 .
  • the IoT device 300 receives a user operation for turning on the abnormality monitoring switch 301 .
  • the IoT device 300 can turn on the abnormality monitoring switch 301 .
  • the IoT device 300 and the IoT cloud platform 200 may interact according to the method shown in FIG. 3 , and the IoT cloud platform 200 may modify the value of the abnormalMonitor field used to indicate the state of the abnormal monitoring switch 301 to 1.
  • the risk control module in the IoT cloud platform 200 determines that the IoT device sends a login request as an abnormal behavior according to the second exception rule (for example, if the request frequency is higher than 20 times/minute, it is abnormal).
  • the risk control module can generate abnormal rules according to the consumption of software and hardware resources of the IoT cloud platform 200.
  • the software and hardware resource consumption of the IoT cloud platform 200 is too high, for example, the CPU consumption in the computing resources is too high, the IoT cloud platform 200 may freeze during the working process, which affects the work of the IoT cloud platform.
  • the risk control module can set the frequency of the exception rule to be lower when generating an exception rule for judging whether the IoT device 300 is abnormal.
  • the IoT device 300 can control the frequency of sending login requests to a lower range according to the updated exception rule, thereby better saving the software and hardware resources of the IoT cloud platform 200 and the IoT device 300 .
  • the risk control module may set the frequency of the exception rule to be slightly higher when generating an exception rule for judging whether the IoT device 300 is abnormal.
  • the risk control module can Set more demanding exception rules.
  • the risk control module can set lower requirements. exception rules.
  • the risk control module may generate the second exception rule according to the current consumption of software and hardware resources of the IoT cloud platform 200 .
  • the second abnormal rule may specifically be: if the frequency of sending the login request by the IoT device 300 is higher than 20 times/minute, the behavior of sending the login request is an abnormal behavior.
  • the risk control module can record the time when the IoT cloud platform 200 receives the login request sent by the IoT device 300 each time. Further, the risk control module can determine whether the frequency of sending the login request by the IoT device 300 exceeds the frequency set in the second exception rule.
  • the IoT device 300 Before the risk control module sends the second exception rule to the IoT device 300, the IoT device 300 can use the first exception rule stored in the erasable storage module to determine whether the IoT device 300 has abnormal behavior. Since the above-mentioned second abnormal rule has higher requirements than the above-mentioned first abnormal rule, the risk control module can determine that the behavior of sending the login request is abnormal behavior before the Internet of Things device 300 . For example, when the IoT device 300 has sent 30 login requests to the IoT cloud platform 200 in less than one minute, the risk control module can determine that the behavior of sending login requests is abnormal. On the other hand, the IoT device 300 determines, according to the first exception rule, that the behavior of sending the login request is not an abnormal behavior. IoT device 300 may continue to send login requests.
  • the risk control module in the IoT cloud platform 200 can identify which IoT device 300 the request received by the IoT cloud platform 200 specifically comes from.
  • each IoT device may add a device identifier to the request when sending the request. This device identifier can be used to uniquely identify IoT devices. In this way, the risk control module can identify the IoT device based on the device identifier in the request. Furthermore, the risk control module can determine whether the frequency of sending the same request by the IoT device conforms to the abnormal rule by recording the time when the IoT device sends the same request.
  • the IoT device 300 may execute step S405.
  • the risk control module in the IoT cloud platform 200 sends the second exception rule to the IoT device 300 .
  • the risk control module may send the second exception rule to the communication module in the IoT cloud platform 200 .
  • the communication module may send the second exception rule to the IoT device 300 via the first interface connected between the IoT cloud platform 200 and the IoT device 300 .
  • the IoT device 300 updates the locally stored first exception rule to the second exception rule.
  • the IoT device 300 may erase the first exception rule stored in the erasable storage module, and store the second exception rule in the erasable storage module.
  • the IoT device 300 determines that the sending of the login request by the IoT device 300 is an abnormal behavior according to the second exception rule stored locally, and reduces the frequency of sending the login request.
  • step S407 For the specific implementation process of step S407, reference may be made to step S304 in the aforementioned method shown in FIG. 5 . I won't go into details here.
  • the IoT device 300 may reduce the frequency of sending login requests within a range of 20 times/minute, for example, 15 times/minute, according to the second exception rule.
  • the Internet of Things device when it is determined that the Internet of Things device 300 has abnormal behavior, the Internet of Things device can prompt the user that the Internet of Things device 300 is abnormal through a voice broadcast or different display lights.
  • the Internet of Things device can prompt the user that the Internet of Things device 300 is abnormal through a voice broadcast or different display lights.
  • a voice broadcast or different display lights For the specific manner of the above prompt, reference may be made to the description of the foregoing embodiments, which will not be repeated here.
  • the IoT device 300 sends a login request to the IoT cloud platform 200 .
  • the IoT device 300 can perform the judgment process in the method shown in FIG. 6 before sending a login request each time to determine whether the login request to be sent this time is to be sent. Discard, or send the login request that needs to be sent this time to the IoT cloud platform 200 . In this way, the IoT device 300 can control the frequency of sending the login request within a range not higher than the frequency set in the second exception rule, for example, 15 times/minute.
  • the IoT cloud platform 200 may send a message to the electronic device 100 for indicating that the IoT device 300 is abnormal.
  • the IoT cloud platform 200 may send a message to the electronic device 100 to indicate that the IoT device 300 is abnormal.
  • the electronic device 100 may display a relevant message notification to prompt the user that the IoT device 300 is abnormal, and provide the user with a corresponding solution to the abnormal situation.
  • the electronic device 100 may display the user interface shown in FIG. 8 .
  • the user interface may include a message notification 210 .
  • the message notification may be a message notification from an Internet of Things APP, such as a "smart life" application.
  • the message notification 210 may include the prompt "The IoT device 300 cannot enter the state of being deployed to the network, click to view the solution".
  • the electronic device 100 may display a user interface containing a solution for resolving the abnormality of the IoT device 300 .
  • the solution could be, for example: please reset the IoT device 300 .
  • the solutions can be different.
  • the solution can also be: Please check the network connection. Alternatively, please disconnect from the network first, wait 1 minute and connect again. Or call customer service, log in to the relevant website to inquire about more detailed solutions, and so on.
  • the embodiments of the present application do not limit the specific content of the above solution.
  • the user can know that the Internet of Things device 300 is abnormal by viewing the electronic device 100, and solve the abnormality of the Internet of Things device 300 according to the above solution.
  • the IoT device 300 can monitor the abnormal situation according to the abnormality rule, and reduce the frequency of abnormal behavior (for example, reduce the frequency of sending login requests), thereby saving IoT devices 300 and the software and hardware resources of the IoT cloud platform 200.
  • the risk control module when the risk control module sends exception rules to the IoT device 300, different exception rules may be sent through different interfaces.
  • the interaction between the IoT cloud platform 200 and the IoT device 300 may be performed through the first interface.
  • the first interface may include multiple interfaces. The multiple interfaces can be used for data interaction between the IoT cloud platform 200 and the IoT device 300 to perform different functions.
  • the IoT device 300 may send a login request to the IoT cloud platform 200 through one of the interfaces, and receive a message from the IoT cloud platform 200 for indicating login failure or login success through the same interface.
  • the IoT cloud platform 200 may send a control instruction to enable the IoT device 300 through another interface, and receive a message from the IoT device 300 through the other interface for indicating that the startup is successful.
  • the abnormal rules for judging whether different interaction behaviors are abnormal behaviors can be sent by the Internet of Things cloud platform 200 to the Internet of Things device 300 through the interface for performing this interaction behavior.
  • the above-mentioned second abnormal rule for judging whether the behavior of the Internet of Things device 300 sending the login request is abnormal behavior may be issued by the Internet of Things cloud platform 200 to the Internet of Things through the interface for receiving the login request from the Internet of Things device 300.
  • Networked device 300 may use the second exception rule received through the interface to monitor whether the behavior of sending the login request is an abnormal behavior.
  • the risk control module may generate exception rules according to the consumption of software and hardware resources of the IoT cloud platform 200 every preset time period.
  • the above-mentioned preset time period may be one day, two days, and so on. This embodiment of the present application does not limit the specific length of the above-mentioned preset time period.
  • the risk control module may send the new exception rule to the IoT device 300 after generating the exception rule every preset time period.
  • the IoT device 300 can update the locally stored exception rules. In this way, the exception rule used by the IoT device 300 to determine whether an exception occurs can better adapt to the consumption of software and hardware resources of the IoT cloud platform 200 .
  • the risk control module may generate exception rules according to the consumption of software and hardware resources of the IoT cloud platform 200, and further utilize the above The generated exception rule is used to determine whether an exception occurs from the IoT device 300 .
  • the exception rules generated by the risk control module according to the consumption of software and hardware resources of the IoT cloud platform 200 may have lower requirements than the exception rules stored locally by the IoT device 300 . That is to say, the Internet of Things device 300 may determine that the behavior of the Internet of Things device 300 sending a certain request is an abnormal behavior before the risk control module. In this case, the risk control module may not send the generated exception rule to the IoT device 300 .
  • the second abnormal rule generated by the risk control module may be: if the frequency of sending the login request by the IoT device 300 is higher than 40 times/minute, the behavior of sending the login request is an abnormal behavior.
  • the first exception rule stored locally by the IoT device 300 may be: if the frequency of sending the login request by the IoT device 300 is higher than 30 times/min, the behavior of sending the login request is an abnormal behavior.
  • the risk control module determines that the behavior of sending login requests is not an abnormal behavior according to the second exception rule. However, the IoT device 300 can determine that the behavior of sending the login request is an abnormal behavior. Further, the IoT device 300 may reduce the frequency of sending login requests according to the first exception rule. For example, the IoT device 300 sends a login request to the IoT cloud platform at a frequency of 20 times/minute. When the frequency of sending login requests is 20 times/minute, both the IoT device 300 and the risk control module can determine that the behavior of sending the login request is not an abnormal behavior. In this way, the risk control module may not want the IoT device 30 to send the above-mentioned second exception rule.
  • This embodiment of the present application does not limit the content on which the abnormal rules are generated by the risk control module.
  • the risk control module can generate abnormal rules according to factors such as the current network quality of the IoT cloud platform.
  • the exception rule used in the IoT device for judging whether the IoT device is abnormal may vary.
  • the risk control module can generate exception rules according to factors such as the consumption of software and hardware resources of the IoT cloud platform, and send new exception rules to IoT devices.
  • IoT devices can update locally stored exception rules and use the new exception rules to determine whether IoT devices are abnormal. In this way, when the IoT device frequently sends the first request, it can adjust the frequency of sending the first request according to the consumption of the software and hardware resources of the IoT cloud platform, thereby saving the software and hardware resources of the IoT device and the IoT cloud platform, and improving the reliability of the entire IoT system.
  • the IoT cloud platform can send a message to the electronic device indicating that the IoT device is abnormal to remind the user that the IoT device is abnormal and provide users with solutions.
  • the exception solution This can help eliminate anomalies that occur in IoT devices.
  • the following specifically introduces a device abnormality monitoring method provided by an embodiment of the present application in combination with an application scenario in which an abnormality occurs on the IoT cloud platform.
  • the IoT cloud platform 200 behaves abnormally.
  • the abnormal behavior may be that the IoT cloud platform 200 frequently sends control commands to the IoT device 300 .
  • a control command for opening and a control command for closing For example, a control command for opening and a control command for closing.
  • the reason for the abnormal behavior may be that the control rule of the IoT cloud platform 200 mentioned in the foregoing embodiment has an infinite loop.
  • the above control instruction for turning on will trigger the IoT cloud platform 200 to send the control command for turning off.
  • the above control instruction for closing will trigger the IoT cloud platform 200 to send the control instruction for opening.
  • the IoT device 300 is a smart light.
  • the smart light When the above-mentioned abnormal behavior occurs on the IoT cloud platform 200, the smart light frequently turns on and off the light in response to the above-mentioned abnormal control instruction. This will greatly consume the hardware and software resources of IoT devices and IoT cloud platforms.
  • Fig. 9 exemplarily shows a flow chart of a method for device abnormality monitoring.
  • the method may include steps S501-S506. in:
  • the abnormality monitoring switch 301 of the IoT device 300 is turned on.
  • the IoT cloud platform 200 sends a first control instruction to the IoT device 300 .
  • the above-mentioned first control instruction may be a control instruction for turning on the IoT device.
  • the IoT device 300 is turned on.
  • the IoT device 300 is turned on.
  • the IoT cloud platform 200 sends a second control instruction to the IoT device 300 .
  • the above-mentioned second control instruction may be a control instruction for turning off the IoT device.
  • the above-mentioned first control instruction may trigger the IoT cloud platform 200 to send the second control instruction.
  • the IoT device 300 In response to the above-mentioned second control instruction, the IoT device 300 is turned off. It should be noted that the shutdown of the IoT device 300 may indicate that the IoT device 300 is in a standby state, for example, the main processor of the IoT device 300 is sleeping. When the IoT device 300 is in a standby state, the IoT device 300 can still receive and recognize the first control instruction for turning on the IoT device 300 . The IoT device 300 in the standby state may enter a working state when receiving the above-mentioned first control instruction, for example, wake up the main processor of the IoT device 300 .
  • the module for abnormality monitoring may be integrated in a low-power processor.
  • the module for abnormality monitoring can detect in real time whether the Internet of Things device or the Internet of Things cloud platform has abnormal behavior. That is to say, when the IoT device is in a standby state, a low-power processor integrated with a module for abnormality monitoring can still be in a working state.
  • the above-mentioned second control instruction may trigger the IoT cloud platform 200 to send the first control instruction. It can be seen that the IoT cloud platform 200 frequently sends control commands (the first control command and the second control command) to the IoT device 300 . Exemplarily, the frequency of sending the control command by the IoT cloud platform 200 may be 50 times/minute. This greatly consumes the software and hardware resources of the IoT cloud platform 200 and the IoT device 300 .
  • the IoT device determines that the control instruction (including the first control instruction and the second control instruction) sent by the IoT cloud platform 200 is abnormal according to the third exception rule stored locally (for example, the control frequency is higher than 30 times/minute). action to reduce the response frequency to the first control command and the second control command.
  • the IoT device 300 can record the number of times the control commands are received from the IoT cloud platform 200, and compare the frequency of received control commands with the third abnormality rule. If it is determined that the frequency of received control commands is higher than the frequency set in the third exception rule, the IoT device 300 may determine that the IoT cloud platform sends the above control command as abnormal behavior, thereby reducing the response frequency to the above control command.
  • This embodiment of the present application does not limit the specific value of the frequency set in the above-mentioned third exception rule.
  • the IoT device 300 may perform abnormality monitoring according to the method flowchart shown in FIG. 10 , and reduce the frequency of response to control instructions.
  • the method may include steps S5051-S5055. in:
  • the IoT device 300 receives the control instruction sent by the IoT cloud platform 200 .
  • the above-mentioned control instruction may include the first control instruction for turning on the IoT device 300 in the aforementioned step S501 , and the second control instruction for turning off the IoT device 300 in the step S503 .
  • control instructions may also be other types of instructions, such as a control instruction for adjusting volume, a control instruction for adjusting brightness, and the like.
  • the embodiment of the present application does not limit the specific content of the above control instruction.
  • the IoT device 300 determines whether the abnormality monitoring switch 301 is turned on.
  • the IoT device 300 Before responding to the control command sent by the IoT cloud platform 200, the IoT device 300 may perform abnormality monitoring to determine whether the control command sent by the IoT cloud platform 200 is an abnormal behavior.
  • the IoT device 300 may first determine whether the abnormality monitoring switch 301 is turned on. in,
  • the IoT device 300 can perform abnormality monitoring. Specifically, the IoT device 300 may further perform step S5053.
  • step S3042 in the method shown in FIG. 6 , which will not be repeated here.
  • the above-mentioned third exception rule may be preset by the IoT device 300 when it leaves the factory.
  • the third exception rule may be: if the frequency of the IoT device 300 receiving control commands (such as the first control command and the second control command) is higher than 30 times/minute, the IoT device 300 may determine that the IoT device 300 Sending the above control instruction by the cloud platform 200 is an abnormal behavior.
  • the IoT device 300 may perform step S5054.
  • the Internet of Things device 300 judges that the frequency of receiving the above-mentioned control instructions does not meet the third abnormal rule, that is, the frequency of receiving the above-mentioned control instructions does not exceed the frequency set in the third abnormal rule, the Internet of Things device 300 can perform step S5055.
  • the specific method for the Internet of Things device 300 to determine whether the frequency of receiving the above control instruction conforms to the third exception rule may refer to the specific method for the Internet of Things device 300 to determine whether the frequency of sending the first request conforms to the first exception rule in the foregoing embodiment. Repeat.
  • the IoT device 300 discards the control instruction.
  • the IoT device 300 may discard the control instruction received this time. Exemplarily, the IoT device 300 is turned on, and the abnormality monitoring switch 301 is turned on.
  • the IoT device 300 may determine whether the frequency of receiving the first control instruction and the second control instruction conforms to the third exception rule. If so, the IoT device 300 can discard the second control command received this time, that is, the IoT device 300 does not respond to the second control command received this time, does not turn off the IoT device 300, and remains on.
  • the IoT device 300 responds to the control instruction.
  • the IoT device 300 can directly respond to the control command when receiving the control command sent by the IoT cloud platform 200 .
  • the IoT device 300 may respond to the control instruction when it is determined that the frequency of receiving the control request does not conform to the third abnormality rule.
  • the IoT device 300 can perform abnormality monitoring. If the IoT cloud platform 200 has abnormal behavior, such as frequently sending control commands to the IoT device 300, the IoT device 300 can reduce the frequency of responding to the above control commands. Specifically, according to the frequency set in the third exception rule, the IoT device 300 may limit the frequency of responding to the above control instruction within a range not higher than the frequency set in the third exception rule.
  • the consumption of software and hardware resources of the IoT device 300 by the IoT device 300 frequently responding to the control commands of the IoT cloud platform 200 can be reduced, and the IoT device 300 can also be kept low in responding to the above control commands, thereby reducing the The impact of misjudgment of abnormal behavior on the functional realization of IoT device 300.
  • control instructions in the method shown in FIG. 10 may be the first control instruction and the second control instruction sent by the IoT cloud platform 200 to the IoT device 300 .
  • the IoT device 300 may also send an abnormal response to the IoT cloud platform 200 .
  • the IoT device 300 sends an abnormal response to the IoT cloud platform 200 .
  • the above abnormal response can be used to prompt that the behavior of sending the first control instruction and the second control instruction by the IoT cloud platform 100 is an abnormal behavior.
  • the IoT device 300 can prompt the user that the IoT device 300 receives the abnormal control through a voice broadcast or a difference in display lights.
  • the IoT cloud platform 200 sends a control command as an abnormal behavior, in addition to performing the steps of the method shown in FIG.
  • the IoT device 300 can prompt the user that the IoT device 300 is under abnormal control, and provide the user with a solution.
  • This embodiment of the present application does not limit the above manner of prompting the user that an abnormality occurs.
  • the IoT cloud platform 200 is provided with a flow control mechanism, and the flow control mechanism is not abnormal.
  • the IoT cloud platform 200 may control the frequency of sending control commands to the IoT device 300 according to the flow control mechanism.
  • the IoT cloud platform 200 can reduce the frequency of sending control commands, thereby saving the software and hardware resources of the IoT cloud platform and IoT devices.
  • the IoT device can monitor whether the IoT cloud platform is abnormal according to the abnormal rules stored locally. Among them, the exception rules stored locally by the IoT device can be updated.
  • the IoT cloud platform 200 may be configured with a risk control module.
  • a risk control module For the function of the wind control module, reference may be made to the descriptions in the foregoing embodiments, which will not be repeated here.
  • the IoT cloud platform 200 behaves abnormally. Specifically, the abnormal behavior may be that the IoT cloud platform 200 frequently sends a first control instruction for opening and a second control instruction for closing to the IoT device 300 .
  • the reason why the IoT cloud platform 200 frequently sends control instructions may refer to the foregoing embodiments, which will not be repeated here.
  • Fig. 11 exemplarily shows a flow chart of a method for device abnormality monitoring.
  • the method may include steps S601-S615. in:
  • the abnormality monitoring switch 301 of the IoT device 300 is turned on.
  • the first control instruction may be a control instruction for turning on the IoT device 300 .
  • the IoT device 300 is turned on.
  • the second control instruction may be a control instruction for turning off the Internet of Things device 300 .
  • the IoT device 300 determines that the control command (including the first control command and the second control command) sent by the IoT cloud platform 200 is: Abnormal behavior, reducing the response frequency to the first control command and the second control command.
  • the Internet of Things device 300 can perform abnormality monitoring during the process of sending the first control command in step S601 and sending the second control command in step S603. Specifically, when it is determined according to the third exception rule that the frequency of receiving the first control instruction and the second control instruction exceeds the frequency set in the third exception rule, the IoT device 300 can reduce the number of errors according to the method shown in FIG. 10 above. The response frequency of the first control command and the second control command. The method for reducing the above-mentioned response frequency is not repeated here.
  • the IoT device 300 can also prompt the user that the IoT device 300 receives an abnormal control command by means of voice broadcast, different display lights, etc. when it is determined that the received first control command or the second control command is an abnormal control command. Exception control.
  • the embodiments of the present application do not limit the specific manner in which the IoT device 300 prompts the user equipment to be abnormally controlled.
  • the IoT device 300 sends an abnormal response to the IoT cloud platform 200 .
  • the IoT device 300 may send an abnormal response to the IoT cloud platform 200 for instructing the IoT cloud platform 200 to send the above control instruction as abnormal behavior.
  • the risk control module may record the above abnormal response.
  • the risk control module can generate abnormal rules according to the consumption of software and hardware resources of the IoT cloud platform 200.
  • the risk control module may generate a fourth exception rule: if the frequency of sending the first control command and the second control command by the IoT cloud platform is higher than 20 times/min, then the behavior of sending the first control command and the second control command is abnormal behavior.
  • the risk control module may acquire the frequency at which the IoT cloud platform 200 sends the first control command and the second control command. Combined with the generated fourth exception rule, the risk control module can analyze whether the behavior of sending the above-mentioned first control instruction and second control instruction by the IoT cloud platform is an abnormal behavior.
  • the IoT cloud platform 200 sends a message to the electronic device 100 for indicating that the IoT device 300 is under abnormal control.
  • the electronic device 100 may display a relevant message notification to prompt the IoT device 300 to be under abnormal control, and provide the user with a corresponding solution to the abnormal situation.
  • the message notification displayed by the electronic device 100 may include the prompt "The IoT device 300 is under abnormal control, please temporarily disconnect the network connection".
  • the present application does not limit the specific content of the prompt in the above message notification.
  • the user can know that the IoT device 300 is under abnormal control by viewing the electronic device 100, and stop the IoT device 300 from being under the abnormal control according to the solution.
  • the IoT device 300 can judge and monitor the abnormal situation according to the abnormal rule, and reduce the impact on the abnormal control instructions (such as the first control instruction and the second control instruction). response frequency, thereby saving the software and hardware resources of the IoT device 300 .
  • the risk control module in the IoT cloud platform 200 sends the fourth exception rule to the IoT device 300 .
  • the risk control module may send the fourth exception rule to the communication module in the IoT cloud platform 200 .
  • the communication module may send the fourth exception rule to the IoT device 300 via the first interface connecting the IoT cloud platform 200 and the IoT device 300 .
  • the IoT device 300 updates the locally stored third exception rule to the fourth exception rule.
  • the IoT device 300 may erase the third exception rule stored in the erasable storage module, and store the fourth exception rule in the erasable storage module.
  • the console of the IoT cloud platform 200 may display the above-mentioned abnormal response to prompt relevant managers that the IoT cloud platform 200 is abnormal.
  • the control rules of the IoT cloud platform are in an infinite loop, the flow control mechanism is abnormal, or is maliciously controlled, the IoT cloud platform may frequently issue control instructions to the IoT devices.
  • the IoT cloud platform can prompt the relevant management personnel through the console after receiving an abnormal response. Furthermore, the relevant managers can solve the abnormality of the IoT cloud platform.
  • the above-mentioned console of the IoT cloud platform 200 can be used for relevant management personnel to log in, manage the IoT cloud platform 200, and handle exceptions that occur in the IoT cloud platform.
  • the IoT cloud platform 200 sends a first control instruction to the IoT device 300 .
  • the first control instruction may be a control instruction for turning on the IoT device 300 .
  • the IoT device 300 is turned on.
  • the IoT cloud platform 200 sends a second control instruction to the IoT device 300 .
  • the second control instruction may be a control instruction for turning off the Internet of Things device 300 .
  • the IoT device 300 determines that the sending of the first control instruction and the second control instruction by the IoT cloud platform 200 is an abnormal behavior according to the fourth exception rule stored locally, and reduces the response frequency to the first control instruction and the second control instruction.
  • the exception rule used in the IoT device 300 for judging whether the behavior of sending the first control instruction and the second control instruction by the IoT cloud platform 200 is abnormal behavior is updated from the third exception rule to the fourth exception rule.
  • the IoT device 300 can record the number of times the first control command and the second control command are received, and compare the frequency of receiving the first control command and the second control command with the frequency of the first control command and the second control command. The frequencies set in the four exception rules are compared. When it is determined that the frequency of receiving the first control instruction and the second control instruction is higher than the frequency set in the fourth exception rule, the IoT device 300 can reduce the frequency of the first control instruction and the second control instruction according to the method described in the aforementioned FIG. 10 . Command response frequency.
  • the IoT device 300 may also send an abnormal response to the IoT cloud platform 200 to prompt the IoT cloud platform 200 to have an abnormality .
  • the IoT cloud platform can send a message indicating that the IoT device is under abnormal control to the electronic device to remind the user that the IoT An abnormality occurs on a networked device and provides a solution for the user to resolve the abnormality.
  • the console of the IoT cloud platform can also display the above-mentioned abnormal response to prompt relevant managers that the IoT cloud platform is abnormal. Furthermore, the relevant management personnel can handle the abnormality of the IoT cloud platform after receiving the prompt.
  • the state of the abnormality monitoring switch on the IoT APP in the electronic device 100 (the abnormality monitoring state 201 shown in FIG. 4 ) and the state of the abnormality monitoring switch 301 on the IoT device 300 may be synchronized.
  • the IoT device 300 may detect a first user operation for turning on the abnormality monitoring switch 301.
  • the abnormality monitoring switch 301 may be a capacitive switch, an inductive switch, or other types of switches.
  • the IoT device 300 may specifically change the power on the corresponding pin of the abnormality monitoring switch 301 vindicate.
  • the IoT cloud platform 200 saves the state of the abnormality monitoring switch 301 of the IoT device 300 .
  • the electronic device 100 may update the state of the abnormality monitoring switch of the IoT device 300 in the IoT APP.
  • the electronic device 100 can update the status of the abnormality monitoring switch 301 of the IoT device 300 in the IoT APP.
  • the electronic device 100 can update the abnormality monitoring state 201 shown in FIG. 4 to an off state.
  • the prompt in the abnormal monitoring state 201 can be updated to "opened". In this way, the user can check from the Internet of Things APP that the abnormality monitoring switch 301 of the Internet of Things device 300 is in an on state.
  • the electronic device 100 may send a request for acquiring the status of the abnormality monitoring switch 301 to the IoT cloud platform 200 .
  • the IoT cloud platform 200 can send the status of the abnormality monitoring switch 301 to the electronic device 100 according to the abnormalMonitor field of the IoT device 300 .
  • the electronic device 100 can update the state of the abnormality monitoring switch 301 of the Internet of Things device 300 in the Internet of Things APP.
  • the IoT device 300 may report the status of the abnormality monitoring switch 301 to the IoT cloud platform 200, and the IoT device 300 may also Set a time period to report the status of the abnormality monitoring switch 301 to the IoT cloud platform 200 once.
  • the above-mentioned preset time period may be one day, two days, three days, and the like. This embodiment of the present application does not limit the length of the above-mentioned preset time period.
  • the IoT device 300 may report the status of the abnormality monitoring switch 301 to the IoT cloud platform 200 once a day at a fixed time (eg, 23:00).
  • the state of the abnormality monitoring switch 301 on the Internet of Things device 300 can be prevented from being inconsistent with the state of the abnormality monitoring switch 301 stored in the Internet of Things cloud platform 200 under some abnormal conditions.
  • 300 reports the frequency of the state of the abnormal monitoring switch 301 , thereby saving software and hardware resources of the IoT device 300 .
  • FIG. 13A to 13C exemplarily show schematic diagrams of user interfaces for turning on an abnormality monitoring switch through an IoT APP.
  • the IoT APP may include a setting interface for performing related settings on the IoT device 300 .
  • the setting interface may include an abnormality monitoring state 201 . It can be known from the prompt "closed" in the abnormality monitoring state 201 that the abnormality monitoring switch 301 on the IoT device 300 is in the off state.
  • the electronic device 100 may display a setting interface as shown in FIG. 13B .
  • the settings interface may include an option box 202 .
  • the option box 202 allows the user to change the state of the anomaly monitoring switch 301 on the IoT device 300 .
  • the option box 202 may contain an on option 202A and an off option 202B.
  • the electronic device 100 may display a setting interface as shown in FIG. 13C.
  • the prompt of the abnormality monitoring state 201 on the setting interface can be changed to "enabled". This may indicate that the abnormality monitoring switch 301 on the IoT device 300 is in an on state.
  • the electronic device 100 may also send an instruction for enabling the abnormality monitoring switch 301 on the IoT device 300 to the IoT cloud platform 100 .
  • the IoT cloud platform 200 may send the above instruction to the IoT device 300 .
  • the Internet of Things device 300 can turn on the abnormality monitoring switch.
  • the process for the electronic device 100 to turn off the abnormality monitoring switch 301 on the Internet of Things device 300 through the Internet of Things APP may be the same as the foregoing embodiment.
  • the user can control the state of the abnormality monitoring switch 301 on the Internet of Things device 300 through the Internet of Things APP on the electronic device 100.
  • the following describes a method for an electronic device to control the state of an abnormality monitoring switch on an IoT device provided by an embodiment of the present application with reference to the schematic diagrams of the user interfaces shown in FIGS. 13A to 13C .
  • FIG. 14 exemplarily shows a flow chart of a method for an electronic device to control the state of an abnormality monitoring switch on an IoT device.
  • the method may include steps S201-S205. in:
  • the electronic device 100 may detect a second user operation for turning on the abnormality monitoring switch 301 of the IoT device 300 in the IoT APP.
  • the abnormality monitoring switch 301 in the IoT device 300 is in an off state.
  • the information on the electronic device 100 and the IoT cloud platform 200 for indicating the state of the abnormality monitoring switch 301 is the information in the off state.
  • the user may turn on the abnormality monitoring switch 301 of the IoT device 300 through a second user operation acting on the electronic device 100 .
  • the above-mentioned second user operation may be, for example, the touch operation acting on the opening option 202A in the above-mentioned FIG. 13B .
  • the electronic device 100 may send an instruction for turning on the abnormality monitoring switch 301 of the IoT device 300 to the IoT device 300 through the IoT cloud platform 200 .
  • the electronic device 100 may send an instruction for turning on the abnormality monitoring switch 301 to the IoT cloud platform 200 through the second interface of the IoT cloud platform 200 . Further, the IoT cloud platform 200 may send the above-mentioned instruction for turning on the abnormality monitoring switch 301 to the IoT device 300 through the first interface.
  • the IoT device 300 can turn on the abnormality monitoring switch 301 . Specifically, the IoT device 300 may invert the level on the corresponding pin of the abnormality monitoring switch 301 .
  • the IoT device 300 may report the status of the abnormality monitoring switch 301 to the IoT cloud platform 200 .
  • the IoT cloud platform 200 may save the status of the abnormality monitoring switch 301 of the IoT device 300 .
  • the abnormality monitoring function of the IoT device 300 may be set to be enabled at the factory.
  • exception rules are stored in the erasable storage module of the IoT device 300 .
  • the IoT device 300 can determine whether the above request or status message is an abnormal request or an abnormal status message according to the exception rule.
  • the IoT device 300 receives the control instruction sent by the IoT cloud platform 200, the IoT device 300 can determine whether the above-mentioned control instruction is an abnormal control instruction according to the exception rule.
  • the first terminal sends a first message to the server.
  • the first terminal may be the IoT device 300 in the foregoing embodiment.
  • the server may be the IoT cloud platform 200 in the foregoing embodiment.
  • the first message may be a login request of the first terminal to log in to the server, a status message of the first terminal reported by the first terminal to the server (such as the status of the first terminal being turned on or off, the power consumption of the first terminal, the first terminal The data collected by the sensors configured in the terminal) and so on.
  • This embodiment of the present application does not limit the specific content of the first message.
  • the first terminal If the first terminal detects that the first terminal sends the first message to the server N1 times within the first unit time, and N1 is greater than the first value, the first terminal reduces the number of times that the first terminal sends the first message to the server within the first unit time. frequency.
  • Step S1502 will be specifically described below by taking the first message as a login request.
  • the first terminal may reduce the number of times that the first terminal sends login requests to the server in one minute. That is, the first terminal can reduce the frequency of sending a login request to the server.
  • the first terminal may record the time when each login request is sent. When the login request is about to be sent for the nth time, the first terminal may determine whether the number of times the login request is sent exceeds 30 times within the first minute of the current moment. If it exceeds 30 times, the first terminal can determine the abnormal behavior when sending the login request for the nth time. Further, the first terminal may discard the login request that needs to be sent for the nth time. In this way, the first terminal can reduce the frequency of sending the login request to the server, and control the number of times of sending the login request within 30 times within one minute.
  • the above device abnormality monitoring method can reduce the waste of software and hardware resources of the first terminal and the server.
  • the server includes a risk control module.
  • the risk control module can be used to monitor whether the first terminal is abnormal.
  • the risk control module can also be used to generate the above exception rules according to the current consumption of software and hardware resources of the server.
  • For the specific function of the wind control module reference may be made to the foregoing embodiments, which will not be repeated here.
  • the abnormality rule used for abnormality monitoring in the first terminal is not fixed.
  • the above exception rules can be adaptively updated according to the consumption of server software and hardware resources. In this way, the software and hardware resources of the first terminal and the server can be reasonably used, and the software and hardware resources of the first terminal and the server can be better saved.
  • the second terminal if the first terminal detects that the first terminal sends the first message to the server N1 times within the first unit time, and N1 is greater than the first value, the second terminal, that is, the electronic device 100 in the foregoing embodiments , it can display a message notification that an exception occurs on the first terminal and a solution to the exception. In this way, the user can know that the first terminal is abnormal by viewing the second terminal, and solve the abnormality of the first terminal according to the above solution.
  • the first terminal may prompt the user that the first terminal is abnormal through a voice broadcast or different display lights. In this way, the user can know in time that the first terminal is abnormal, so that the abnormality of the first terminal can be solved according to the relevant solution.
  • a physical abnormality monitoring switch may be provided on the first terminal.
  • the abnormality monitoring switch 301 shown in FIG. 3 In response to a user operation acting on the abnormality monitoring switch 301, the first terminal may turn on or off the abnormality monitoring function.
  • the first terminal may perform abnormality monitoring according to the abnormality monitoring method in the foregoing embodiment.
  • the first terminal may also send the status of whether the abnormality monitoring switch is on or off to the server.
  • the server may store the state of the abnormality monitoring switch. In this way, the second terminal can obtain the status of the abnormality monitoring switch through the server.
  • the first terminal ie, the Internet of Things device 300
  • the first terminal can detect whether an abnormality occurs in itself.
  • the first terminal may reduce the frequency of sending abnormal requests to the server. In this way, by reducing the processing of abnormal requests detected by the first terminal, the first terminal and the server can reduce the waste of software and hardware resources.
  • the first terminal reduces the frequency of sending the detected abnormal request to the server, instead of directly stopping sending the abnormal request, which can reduce the impact of misjudgment due to abnormal behavior on the function realization of the first terminal.
  • the second message may be a control instruction for the server to set the state of the first terminal (such as turning on the first terminal, closing the first terminal), an instruction for obtaining a state message of the first terminal, and so on.
  • This embodiment of the present application does not limit the specific content of the second message.
  • the server is abnormal and frequently sends second messages to the first terminal.
  • an abnormality occurs in the server, reference may be made to the embodiment shown in FIG. 2 above.
  • the first terminal may store abnormal rules for abnormal monitoring.
  • the above exception rule includes a third exception rule: if the frequency at which the first terminal receives the second message sent by the server is higher than 30 times/min, the behavior of the server sending the second message is an abnormal behavior. That is to say, if the first terminal detects that the number of times of receiving the second message from the server is higher than 30 times within 1 minute, the first terminal can determine that the behavior of the server sending the second message is abnormal.
  • the first terminal is abnormally controlled by the server.
  • the above-mentioned first unit time is 1 minute.
  • the above second value is 30. The embodiments of the present application do not limit the specific values of the first unit time and the second value.
  • the first terminal may reduce the number of times that the second message is responded to within one minute. That is, the first terminal can reduce the frequency of responding to the second message.
  • the first terminal may record the time each time the second message is received.
  • the first terminal may determine whether the number of times the second message is received in the first minute of the current moment exceeds 30 times. If it exceeds 30 times, the first terminal may determine that the second message received at the mth time is an abnormal control instruction. Further, the first terminal may discard the second message received for the mth time without responding. In this way, the first terminal can reduce the frequency of responding to the second message, and control the number of responding to the second message within 30 times within one minute.
  • the above device abnormality method can reduce the waste of software and hardware resources of the first terminal.
  • the exception rules stored in the first terminal may be updated by the server.
  • the server includes a risk control module.
  • the risk control module can be used to generate abnormal rules according to the current consumption of software and hardware resources of the server.
  • the term “when” may be interpreted to mean “if” or “after” or “in response to determining" or “in response to detecting" depending on the context.
  • the phrases “in determining" or “if detecting (the stated condition or event)” can be interpreted to mean “if determining" or “in response to determining" or “on detecting (the stated condition or event)” or “in response to the detection of (the stated condition or event)”.
  • the above-mentioned embodiments it may be implemented in whole or in part by software, hardware, firmware or any combination thereof.
  • software it can be implemented in whole or in part in the form of a computer program product.
  • the computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present application are generated.
  • the computer may be a general purpose computer, special purpose computer, computer network, or other programmable device.
  • the computer instructions may be stored in or transmitted from one computer readable storage medium to another computer readable storage medium, for example, the computer instructions may be downloaded from a website site, computer, server or data center Transmission to another website site, computer, server, or data center by wire (eg, coaxial cable, optical fiber, digital subscriber line) or wireless (eg, infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes an integration of one or more available media.
  • the usable media may be magnetic media (eg, floppy disks, hard disks, magnetic tapes), optical media (eg, DVDs), or semiconductor media (eg, solid state drives), and the like.
  • the process can be completed by instructing the relevant hardware by a computer program, and the program can be stored in a computer-readable storage medium.
  • the program When the program is executed , which may include the processes of the foregoing method embodiments.
  • the aforementioned storage medium includes: ROM or random storage memory RAM, magnetic disk or optical disk and other mediums that can store program codes.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Development Economics (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Cardiology (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Environmental & Geological Engineering (AREA)
  • Structural Engineering (AREA)
  • Computer Security & Cryptography (AREA)
  • Civil Engineering (AREA)
  • Architecture (AREA)
  • Telephonic Communication Services (AREA)
  • Computer And Data Communications (AREA)

Abstract

设备异常监测方法及设备。该方法可应用于物联网系统。该物联网系统可包括电子设备、物联网云平台、物联网设备。其中,物联网设备上设置有异常监测开关。当异常监测开关处于开启状态,物联网设备可以进行异常监测。物联网设备中存储有异常规则。根据该异常规则,物联网设备可以判断出物联网设备发送的请求是否是异常请求,以及接收到的来自物联网云平台的控制指令是否为异常控制指令。当监测到上述异常请求或异常控制指令,物联网设备可以丢弃异常请求或异常控制指令。实施该方法,在物联网设备或物联网云平台出现异常时,物联网设备和物联网云平台可以节省软硬件资源。

Description

设备异常监测方法及设备
本申请要求于2020年09月30日提交中国专利局、申请号为202011063323.7、申请名称为“设备异常监测方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及物联网技术领域,尤其涉及设备异常监测方法及设备。
背景技术
随着物联网技术的发展,物联网设备可以连接网络,并登录到物联网云平台。物联网设备可以向物联网云平台上报自己的状态消息。例如,开启或关闭的状态、耗电量等。用户可以通过手机、平板等电子设备查看物联网设备的状态消息,并控制物联网设备。例如手机可以向物联网云平台下发开启物联网设备的控制指令。进一步的,物联网云平台可以向物联网设备发送开启的控制指令。响应于上述开启的控制指令,物联网设备可以开启。
但在物联网设备和物联网云平台交互的过程中,物联网设备或者物联网云平台可能出现异常,例如物联网设备频繁请求登录物联网云平台、物联网云平台向物联网设备频繁下发控制指令。这些异常会浪费物联网云平台和物联网设备的软硬件资源。
发明内容
本申请提供了一种设备异常监测方法及设备。该方法可应用于物联网系统。该物联网系统可包括物联网云平台和物联网设备。物联网设备可以进行异常监测。当检测到物联网设备向物联网云平台频繁发送异常请求时,物联网设备可以降低发送异常请求的频率。当检测到物联网云平台向物联网设备频繁发送异常控制指令时,物联网设备可以降低响应该异常控制指令的频率。上述方法可以在物联网设备或物联网云平台出现异常时,有效节省物联网设备和物联网云平台的软硬件资源。
第一方面,本申请提供一种设备异常监测方法。在该方法包括,第一终端可以向服务器发送第一消息。若第一终端检测到在第一单位时间内第一终端向服务器发送第一消息N1次,且N1大于第一值,则第一终端可以降低在第一单位时间内向服务器发送第一消息的次数。上述N1为正整数。
或者,第一终端可以接收来自服务器的第二消息。若第一终端检测到在第一单位时间内第一终端接收到N2次来自服务器的第二消息,且N2大于第二值,则第一终端可以降低在第一单位时间内响应第二消息的次数。上述N2为正整数。
上述第一终端可以为前述物联网设备。上述服务器可以为前述物联网云平台。
通过本申请提供的一种设备异常监测方法,第一终端可以检测自己是否出现异常以及检测服务器是否出现异常。当检测到第一终端出现异常而频繁向服务器发送第一消息,第一终端可以降低发送第一消息的频率。当检测到服务器出现异常,第一终端频繁接收到来自服务器的第二消息,第一终端可以降低响应第二消息的频率。这样,在第一终端或服务器出现异常时,第一终端和服务器可以节省软硬件资源,减少软硬件资源的浪费。
在一种可能的实现方式中,若检测到在上述第一单位时间内,第一终端向服务器发送第一消息的次数大于第一值,第一终端可以将在第一单位时间内向服务器发送第一消息的次数降低至第一值以下。其中,第一终端可存储有第一异常规则。该第一异常规则可用于判断第一终端发送第一消息的行为是否是异常行为。该第一异常规则可以为:若第一终端发送第一消息的频率高于30次/分钟,则该发送第一消息的行为是异常行为。也即是说,上述第一单位时间可以为1分钟。上述第一值可以为30。本申请实施例对上述第一单位时间和上述第一值的具体数值均不作具体限定。
上述第一消息可以包含登录请求和/或第一终端的状态消息(如第一终端开启或者关闭的状态、第一终端的耗电量、第一终端配置的传感器所采集到的数据)。本申请实施例对第一消息的具体内容不作限定。
上述第一终端将在第一单位时间内向服务器发送第一消息的次数降低至第一值以下的方法具体可以为:第一终端可以记录每一次发送第一消息的时间。当即将第n次发送第一消息时,第一终端可以判断在当前时刻的前1分钟内发送第一消息的次数是否超过30次。若超过30次,第一终端可以判断出这第n次发送第一消息时异常行为。进一步的,第一终端可以将第n次需要发送的第一消息丢弃。这样,第一终端可以降低向服务器发送第一消息的频率,将在1分钟内发送第一消息的次数控制在30(即第一值)以内。
在上述方法中,第一终端和服务器需要处理的第一消息的频率降低。这样,在第一终端出现异常时,可以减少第一终端和服务器的软硬件资源的浪费。并且,第一终端仍能以较低的频率(即低于第一异常规则中限定的频率)发送第一消息,这样可以减少由于异常行为误判对第一终端功能实现的影响。
在一种可能的实现方式中,若检测到在上述第一单位时间内,第一终端接收到服务器发送的第二消息的次数大于第二值,第一终端可以将在第一单位时间内响应上述第一消息的次数降低至第二值以下。其中,第一终端可存储有第二异常规则。该第二异常规则可用于判断服务器发送第二消息的行为是否是异常行为。该第二异常规则可以为:若第一终端接收到服务器发送第二消息的频率高于30次/分钟,则服务器发送该第二消息的行为是异常行为。也即是说,上述第二值可以为30。本申请实施例对第二值的具体数值不作限定。
上述第二消息可以包含第一任务的指示信息。上述第一任务可以包括设置第一终端的状态(如开启第一终端、关闭第一终端)和/或向服务器发送第一终端的状态消息。本申请实施例对第二消息的具体内容不作限定。
上述第一终端将在第一单位时间内响应上述第一消息的次数降低至第二值以下的方法具体可以为:第一终端可以记录每一次接收到第二消息的时间。当第m次接收到第二消息时,第一终端可以判断在当前时刻的前1分钟内接收到第二消息的次数是否超过30次。若超过30次,第一终端可以判断出这第m次接收到的第二消息为异常的控制指令。进一步的,第一终端可以将这第m次接收到的第二消息丢弃,而不进行响应。这样,第一终端可以降低响应第二消息的频率,将在1分钟内响应第二消息的次数控制在30(即第二值)以内。
在上述方法中,第一终端降低对接收到的第二消息的响应频率,从而可以减少第一终端的软硬件资源的浪费。
结合第一方面,在一些实施例中,上述设置第一终端的状态可以包括以下一项或多项:开启第一终端并使得第一终端播放音频,关闭第一终端、调节第一终端的音量、切换第一终端播放的音频、暂停第一终端播放的音频。
结合第一方面,在一些实施例中,上述第一异常规则中的第一值和上述第二异常规则中 的第二值可以是第一终端在出厂时预置的。或者,上述第一值和上述第二值可以是服务器发送给第一终端的。例如,服务器中包含用于生成异常规则的风控模块。在第一终端与服务器建立通信连接后,服务器可以将风控模块生成的异常规则(如第一异常规则、第二异常规则)发送给第一终端。第一终端可以存储异常规则,并根据存储的异常规则进行异常监测。
结合第一方面,在另一些实施例中,服务器可以更新第一终端中的异常规则。
示例性的,第一终端存储有第三值和第四值。第三值可用于第一终端检测在第一单位时间内第一终端向服务器发送第一消息的次数是否超过第三值。第四值可用于第一终端检测在第一单位时间内第一终端接收来自服务器的第二消息的次数是否超过第四值。其中,第三值和第四值可以是第一终端预置的。或者,第三值和第四值可以是服务器发送给第一终端的。
服务器中的风控模块可以根据服务器当前软硬件资源的消耗情况生成第一异常规则。该第一异常规则中包含第一值。若服务器检测到在第一单位时间内接收到N1次来自第一终端的第一消息,且N1大于上述第一值,则服务器可以将第一异常规则发送给第一终端。第一终端可以将上述第三值更新为上述第一值。即第一终端将用于检测第一终端发送第一消息是否是异常行为的异常规则更新为第一异常规则。
服务器中的风控模块可以根据服务器当前软硬件资源的消耗情况生成第二异常规则。该第二异常规则中包含第二值。若服务器检测到在第一单位时间内向第一终端发送N2次第二消息,且N2大于上述第二值,则服务器可以将第二异常规则发送给第一终端。第一终端可以将上述第四值更新为上述第二值。即第一终端将用于检测服务器发送第二消息是否是异常行为的异常规则更新为第二异常规则。
在上述方法中,第一终端中用于进行异常监测的异常规则不是固定不变的。上述异常规则可以根据服务器软硬件资源的消耗情况进行适应性更新。这样,可以合理使用第一终端和服务器的软硬件资源,更好地节省第一终端和服务器的软硬件资源。
结合第一方面,在一些实施例中,物联网系统还可包括第二终端。该第二终端可用于通过服务器设置第一终端的状态以及获取第一终端的状态消息。服务器上可存储有与第二终端映射的一个或多个终端的标识符。上述一个或多个终端包含第一终端。
上述第二终端可以是安装有用于控制物联网设备的应用程序(application,APP)的设备。例如,手机、平板、笔记本电脑、手持计算机、个人数字助理、可穿戴电子设备等等。本申请实施例对第二终端的具体类型不作限定。上述应用程序例如是物联网APP。
当第一终端或服务器出现异常,第二终端可以显示用于指示第一终端出现异常的消息通知或第一终端受到异常控制的消息通知。
具体的,若第一终端在第一单位时间内向服务器发送第一消息N1次,且N1大于第一值,第二终端可以显示第一终端异常的类型和/或第一终端异常的解决方案。
或者,若第一终端在第一单位时间内接收到N2次来自服务器的第二消息,且N2大于第二值,第二终端可以显示第一终端收到的异常控制的类型和/或第一终端收到的异常控制的解决方案。
这样,用户可以通过查看第二终端而了解第一终端出现异常,并根据上述解决方案解决第一终端的异常。
可选的,当检测到第一终端或服务器出现异常,第一终端可以通过语音播报或者显示灯的不同来提示用户第一终端出现异常。
这样,用户可以及时知道第一终端出现异常,从而可以根据相关的解决方案来解决第一终端的异常。
结合第一方面,在一些实施例中,第一终端上可设置有物理的异常监测开关。响应于作用在异常监测开关上的用户操作,第一终端可以开启或者关闭异常监测功能。当开启异常监测功能,第一终端可以根据前述异常监测方法进行异常监测。第一终端还可以将异常监测开关是开启还是关闭的状态发送给服务器。服务器可以存储异常监测开关的状态。第二终端可以通服务器获取该异常监测开关的状态。
另外,第二终端可以通过物联网APP控制第一终端上异常监测开关的开启和关闭。这样,用户可以通过第二终端远程开启或关闭第一终端上的异常监测开关。
第二方面,本申请还提供一种异常监测方法。该方法包括:服务器可以接收来自第一终端的第一消息。服务器可以生成第一值。若服务器检测到在第一单位时间内接收到N1次来自第一终端的第一消息,且N1大于第一值,则服务器可以将第一值发送给第一终端。第一值可用于第一终端判断在第一单位时间内向服务器发送第一消息的次数是否超过第一值。上述N1为正整数。或者,服务器可以向第一终端发送第二消息。服务器可以生成第二值。若服务器检测到在第一单位时间内向第一终端发送N2次第二消息,且N2大于第二值,则服务器可以将第二值发送给第一终端。第二值可用于第一终端判断在第一单位时间内接收到来自服务器的第二消息的次数是否超过第二值。上述N2为正整数。
其中,若第一终端根据来自服务器的第一值检测出在第一单位时间内向服务器发送第一消息的次数超过该第一值,则第一终端可以降低在第一单位时间内向服务器发送第一消息的次数。
这样,第一终端和服务器需要处理的第一消息的频率降低,从而第一终端和服务器可以减少软硬件资源的浪费。并且,第一终端仍能以较低的频率(即低于第一异常规则中限定的频率)发送第一消息,这样可以减少由于异常行为误判对第一终端功能实现的影响。
若第一终端根据来自服务器的第二值检测出在第一单位时间内接收到来自服务器的第二消息的次数超过该第二值,则第一终端可以降低在第一单位时间内响应上述第二消息的次数。第一终端可以减少软硬件资源的浪费。
上述第一终端可以为前述物联网设备。上述服务器可以为前述物联网云平台。
通过本申请提供的一种设备异常监测方法,第一终端可以检测自己是否出现异常以及检测服务器是否出现异常。当检测到第一终端出现异常而频繁向服务器发送第一消息,第一终端可以降低发送第一消息的频率。当检测到服务器出现异常,第一终端频繁接收到来自服务器的第二消息,第一终端可以降低响应第二消息的频率。这样,在第一终端或服务器出现异常时,第一终端和服务器可以节省软硬件资源,减少软硬件资源的浪费。
上述第一消息可以包含登录请求和/或第一终端的状态消息(如第一终端开启或者关闭的状态、第一终端的耗电量、第一终端配置的传感器所采集到的数据)。本申请实施例对第一消息的具体内容不作限定。
上述第二消息可以包含第一任务的指示信息。上述第一任务可以包括设置第一终端的状态(如开启第一终端、关闭第一终端)和/或向服务器发送第一终端的状态消息。本申请实施例对第二消息的具体内容不作限定。
结合第二方面,在一些实施例中,服务器可以更新第一终端中的异常规则。
示例性的,服务器可以接收来自第一终端的第一消息。服务器可以生成第三值。该第三值小于上述第一值。若服务器检测到在第一单位时间内接收到N3次来自第一终端的第一消息,且N3大于第三值,则服务器可以将第三值发送给第一终端。第三值可用于更新第一终端存储的第一值。N3为正整数。或者,服务器可以向第一终端发送第二消息。服务器可以生 成第四值。该第四值小于上述第二值。若服务器检测到在第一单位时间内向第一终端发送N4次第二消息且N4大于第四值,则服务器可以将第四值发送给第一终端。第二值可用于更新第一终端存储的第二值。N4为正整数。
其中,上述第三值和第四值可以是服务器根据服务器的软硬件资源的消耗情况生成的。第一终端可以利用更新后得到的第三值和第四值来进行异常监测。
可以看出,第一终端中用于进行异常监测的异常规则不是固定不变的。上述异常规则可以根据服务器软硬件资源的消耗情况进行适应性更新。这样,可以合理使用第一终端和服务器的软硬件资源,更好地节省第一终端和服务器的软硬件资源。
结合第二方面,在一些实施例中,服务器上可存储有与第二终端映射的一个或多个终端的标识符。这一个或多个终端包含第一终端。第二终端可用于通过服务器设置第一终端的状态以及获取第一终端的状态消息。
当第一终端出现异常,服务器可以向第二终端发送用于指示第一终端出现异常的消息。当第一终端受到服务器的异常控制,服务器可以向第二终端发送用于指示第一终端受到异常控制的消息。
示例性的,若服务器检测到在第一单位时间内接收到N1次来自第一终端的第一消息,且N1大于第一值,则服务器可以向第二终端发送第三消息。第三消息的指示内容可显示在第二终端,第三消息的指示内容包括第一终端异常的类型和/或第一终端异常的解决方案。或者,若服务器检测到在第一单位时间内向第一终端发送N2次第二消息,且N2大于第二值,则服务器可以向第二终端发送第四消息。第四消息的指示内容可显示在第二终端,第四消息的指示内容包括第一终端收到的异常控制的类型和/或第一终端收到的异常控制的解决方案。
另外,当第一值被上述第三值更新或者第二值被上述第四值更新,服务器可以根据更新后得到的第三值来判断第一终端是否出现异常,以及根据第四值来判断第一终端是否受到异常控制。若确定第一终端出现异常或者受到异常控制,服务可以向第二终端发送上述第三消息或者第四消息。
示例性的,若服务器检测到在第一单位时间内接收到N3次来自第一终端的第一消息,且N3大于第三值,则服务器可以向第二终端发送第三消息。第三消息的指示内容可显示在第二终端,第三消息的指示内容包括第一终端异常的类型和/或第一终端异常的解决方案。或者,若服务器检测到在第一单位时间内向第一终端发送N4次第二消息,且N4大于第四值,则服务器可以向第二终端发送第四消息。第四消息的指示内容可显示在第二终端,第四消息的指示内容包括第一终端收到的异常控制的类型和/或第一终端收到的异常控制的解决方案。
上述第二终端可以是安装有用于控制物联网设备的应用程序(application,APP)的设备。例如,手机、平板、笔记本电脑、手持计算机、个人数字助理、可穿戴电子设备等等。本申请实施例对第二终端的具体类型不作限定。上述应用程序例如是物联网APP。
这样,用户可以通过查看第二终端而了解第一终端出现异常,并根据上述解决方案解决第一终端的异常。
第三方面,本申请提供一种终端。该终端可包括通信模块、存储器和处理器。其中:
通信模块可用于与服务器建立通信连接。存储器可用于存储计算机程序。处理器可用于调用计算机程序,使得该终端执行上述第一方面任一项可能的实现方法。
第四方面,本申请提供一种服务器,该服务器可包括通信模块、存储器和处理器。其中,通信模块可用于与终端建立通信连接。存储器可用于存储计算机程序。处理器可用于调用上述存储器中的计算机程序,使得该服务器执行上述第二方面任一项可能的实现方法。
第五方面,本申请提供一种计算机可读存储介质,包括指令,当上述指令在上述第三方面提供的终端上运行时,使得终端执行上述第一方面任一项可能的实现方法。或者,当上述指令在上述第四方面提供的服务器上运行时,使得服务器执行上述第二方面任一项可能的实现方法。
第六方面,本申请提供一种计算机程序产品,当上述计算机程序产品在在第三方面提供的终端上运行时,使得终端执行上述第一方面任一项可能的实现方法。或者,当上述计算机程序产品在第四方面提供的服务器上运行时,使得服务器执行上述第二方面任一项可能的实现方法。
第七方面,本申请提供一种芯片,该芯片应用于第三方面提供的终端或第四方面提供的服务器,该芯片包括一个或多个处理器,该一个或多个处理器用于调用计算机指令以使得第三方面提供的终端执行上述第一方面任一项可能的实现方法,或使得第四方面提供的服务器执行上述第二方面任一项可能的实现方法。
可以理解地,上述第三方面提供的终端、第四方面提供的服务器、第五方面提供的计算机可读存储介质、第六方面提供的计算机程序产品和第七方面芯片提供的均用于执行本申请实施例所提供的方法。因此,其所能达到的有益效果可参考对应方法中的有益效果,此处不再赘述。
附图说明
图1A和图1B是本申请实施例提供的一种物联网设备出现异常的场景示意图;
图2是本申请实施例提供的一种物联网云平台出现异常的场景示意图;
图3是本申请实施例提供的一种物联网系统的结构示意图;
图4是本申请实施例提供的一种电子设备的物联网应用程序的设置界面示意图;
图5是本申请实施例提供的一种物联网设备异常监测的方法流程图;
图6是本申请实施例提供的一种物联网设备降低物联网设备异常行为的频率的方法流程图;
图7是本申请实施例提供的另一种物联网设备异常监测的方法流程图;
图8是本申请实施例提供的一种电子设备提示用户物联网设备出现异常的用户界面示意图;
图9是本申请实施例提供的另一种物联网设备异常监测的方法流程图;
图10是本申请实施例提供的一种物联网设备降低对物联网云平台异常控制的频率的方法流程图;
图11是本申请实施例提供的另一种物联网设备异常监测的方法流程图;
图12是本申请实施例提供的一种物联网设备上报异常监测开关的状态的方法流程图;
图13A~图13C是本申请实施例提供的一系列电子设备控制物联网设备的异常监测开关的用户界面示意图;
图14是本申请实施例提供的一种电子设备控制物联网设备的异常监测开关的方法流程图;
图15是本申请实施例提供的一种设备异常监测方法的流程图;
图16是本申请实施例提供的一种设备异常监测方法的流程图。
具体实施方式
本申请以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括复数表达形式,除非其上下文中明确地有相反指示。还应当理解,本申请中使用的术语“和/或”是指并包含一个或多个所列出项目的任何或所有可能组合。
目前,物联网系统可以包括物联网设备、物联网云平台以及用于控制物联网设备的电子设备(如手机、平板等)。其中,上述物联网设备可以连接网络,并登录到物联网云平台。物联网设备可以向物联网云平台上报自己的状态消息。例如,物联网设备可以向物联网云平台上报自己是处于开启状态还是待机状态、自己的耗电量以及配置的传感器所采集到的数据等等。物联网设备还可以响应物联网云平台下发的控制指令。物联网设备可以是具有联网功能的家居设备、具有联网功能的交通设备、具有联网功能的工业应用设备、具有联网功能的农业应用设备、具有联网功能的军事应用设备等等。例如,物联网设备可以是智能灯、智能风扇、智能空调、智能电视、智能手环、智能音箱、智能冰箱,智能门窗、智能汽车、车机、智能监控器、智能机器人等设备。本申请实施例对物联网设备的类型不作限定。
上述物联网云平台可用于连接上述物联网设备和上述电子设备。具体的,物联网云平台可以保存物联网设备上报的状态消息。电子设备可以从物联网云平台获取物联网设备的状态消息。电子设备可以通过物联网云平台向物联网设备下发控制指令。这样,电子设备可以实现远程控制物联网设备。
上述电子设备可以是安装有用于控制物联网设备的应用程序(application,APP)的设备。例如,电子设备可以是手机、平板、笔记本电脑、手持计算机、个人数字助理(personal digital assistant,PDA)、可穿戴电子设备等等。其中,上述用于控制物联网设备的APP可以是物联网APP。电子设备可以通过上述物联网APP获取物联网设备的状态消息,并发送用于控制物联网设备的指令。即用户可以通过电子设备中的物联网APP,来查看物联网设备的状态消息,以及控制物联网设备。示例性的,上述电子设备通过物联网APP控制物联网设备可以为:在物联网设备为智能灯的场景下,电子设备可以通过物联网APP点亮智能灯、熄灭智能灯、调节智能灯的亮度等。在物联网设备为智能音箱的场景下,电子设备可以通过物联网APP开启智能音箱、关闭智能一项、调节智能音箱的音量、切换智能音箱播放的音频、暂停播放等。
但在上述物联网系统中,物联网云平台和物联网设备可能出现异常。进而浪费物联网云平台和物联网设备的软硬件资源。
图1A和图1B示例性示出了一种物联网设备出现异常的场景示意图。
电子设备100可以开启物联网APP并显示如图1A所示的设置界面。响应于作用在该设置界面中删除设备选项203的用户操作,电子设备100可以向物联网云平台200发送删除物联网设备300的指令。
如图1B所示,物联网云平台200中可存储有数据表。该数据表中可用于表示电子设备与物联网设备的配对关系。例如,电子设备100与物联网设备300和物联网设备500均建立有配对关系。具体的,该数据表可包括字段电子设备标识、物联网设备标识、物联网设备登录账号和物联网设备登录密码。电子设备标识可用于唯一标识电子设备。物联网设备标识可用于唯一标识物联网设备。物联网设备登录账号和物联网设备登录密码可用于物联网设备登 录至物联网云平台。其中,当物联网设备300利用上述物联网设备登录账号和物联网设备登录密码登录至物联网云平台200,电子设备100可以利用物联网APP通过物联网云平台200控制物联网设备300。物联网设备300也可以上报自己的状态消息。例如,物联网设备300为智能灯。电子设备100为手机。当智能灯登录至物联网云平台200,手机可以通过物联网云平台200控制智能灯的点亮和熄灭。智能灯可以向物联网云平台200上报自己是点亮或者熄灭的状态消息等。这样,手机可以通过物联网云平台200获取智能灯的状态消息。
当接收到上述用于删除物联网设备300的指令,物联网云平台200可以将数据表中电子设备100与物联网设备300的控制指令删除。即物联网云平台200可以将数据表由表a更新为表b。
但由于可能存在的网络问题,物联网设备300(例如智能灯)未将用于登录到物联网云平台的账号及密码等信息删除。而电子设备100和物联网云平台200已经将该智能灯300的相关信息删除。这样,智能灯300就无法进入待配网状态。也即是说,当智能灯300使用上述删除操作进行前的账号及密码(如账号Jane1和密码123456)请求登录物联网云平台200,由于物联网云平台200中不存在该智能灯300的账号及密码,物联网云平台200可以向智能灯300返回登录失败的信息。这样,智能灯300处于异常状态,频繁向物联网云平台200发送登录的请求。上述智能灯300频繁请求登录的行为会大量消耗智能灯300和物联网云平台200的软硬件资源。
图2示例性示出了一种物联网云平台出现异常的场景示意图。
如图2所示,物联网云平台中的控制规则出现死循环。其中,控制规则出现死循环可以为物联网云平台200向智能灯300发送用于开灯的指令。在发送用于开灯的指令之后,物联网云平台200接着向智能灯300发送用于关灯的指令。在发送用于关灯的指令之后,物联网设备200继续向智能灯300发送用于开灯的指令。物联网云平台200出现上述反复循环。当接收到用于开灯的指令,智能灯300可以点亮。当接收到用于关灯的指令,智能灯300可以熄灭。上述物联网云平台出现异常,频繁向智能灯300发送控制指令的行为会大量消耗智能灯300和物联网云平台200的软硬件资源。
本申请实施例对上述物联网设备和物联网云平台出现的异常行为不作限定。示例性的,物联网设备300出现的异常还可以是物联网设备300频繁向物联网云平台200上报自己的状态消息。其中,在物联网设备300未成功登录物联网云平台200之前,物联网云平台200无法识别来自物联网设备300上报的状态消息。那么,当接收到上述状态消息,物联网云平台200不向物联网设备300回复用于指示接收成功的状态消息的通知。进而,物联网设备300会频繁向物联网云平台200上报状态消息。或者由于物联网设备300中的软件开发工具包(soft development kit,SDK)出错、网络问题等原因,物联网设备300向物联网云平台200上报的状态消息中缺失部分字段。当接收到上述缺失部分字段的状态消息,物联网云平台200无法解析该状态消息。那么,物联网云平台200不向物联网设备300回复用于指示接收成功状态消息的通知。进而,物联网设备300也可能会频繁向物联网云平台200上报状态消息。另外,物联网云平台200出现的异常还可以是由于控制规则死循环、流控机制失效或者物联网云平台200受到恶意攻击等原因,向物联网设备300频繁发送控制指令或者频繁请求获取物联网设备300的状态消息。例如物联网设备300为智能音箱。物联网云平台200频繁向智能音箱发送用于调节音量的控制指令、用于切换歌曲的控制指令或者用于调整智能音箱播放模式的控制指令等。
不限于上述异常行为,本申请实施例中所提及的物联网设备和物联网云平台出现的异常行为还可以是其它。
需要进行说明的是,上述软硬件资源可以包括硬件资源和软件资源。其中,硬件资源可包括计算资源(如中央处理器进行相关计算)和存储资源(如存储器存储相关数据)。软件资源可包括系统软件和应用软件。
在一些实施例中,物联网系统可以从物联网云平台上来监测是否出现异常。具体的,物联网云平台上可设置有流控机制。该流控机制可用于处理物联网设备频繁发送请求和物联网云平台频繁发送控制指令等异常行为。例如在物联网设备频繁向物联网云平台发送相同请求时,物联网云平台可以降低对上述相同请求的处理频次,从而节省物联网云平台的软硬件资源。具体的,当物联网设备出现异常,例如频繁向物联网云平台发送登录请求,物联网云平台可以根据流控机制部分丢弃来自物联网设备的登录请求。例如,物联网云平台在1分钟内接收到来自物联网设备的60次登录请求。物联网云平台根据流控机制可以处理前30次登录请求,向物联网设备返回登录失败的消息。物联网云平台可以将这1分钟内接收到的30次之后的登录请求丢弃。这样,可以在一定程度上节省物联网云平台的软硬件资源。但在上述异常监测方法中,物联网设备仍然处于异常状态,并频繁向物联网云平台发送请求。物联网设备的软硬件资源仍然会被大量占用和浪费。物联网云平台也仍需消耗软硬件资源来处理物联网设备发送的请求。
本申请实施例提供了一种设备异常监测方法。在该方法中,电子设备的物联网APP和物联网设备中均可配置有异常监测开关。物联网设备上的异常监测开关状态可以与物联网APP中的异常监测开关保持状态一致。其中,物联网设备中存储有用于判断异常行为的异常规则。当物联网设备的异常监测开关开启,物联网设备可以记录物联网设备向物联网云平台发送请求(如登录请求)的频率,并根据异常规则判断物联网设备发送该请求是否是异常行为。若确定物联网设备发送该请求是异常行为,物联网设备可以降低发送该请求的频率,从而减少物联网设备和物联网云平台软硬件资源的消耗。
另外,物联网设备还可以记录接收到的来自物联网云平台的控制指令(如开启指令)的频率,并根据异常规则判断物联网云平台发送该控制指令是否是异常行为。若确定物联网设备发送该控制指令是异常行为,物联网设备可以向物联网云平台发送异常响应,并降低响应上述异常行为中控制指令的频率。这样,物联网设备可以减少自身软硬件资源的消耗。
物联网云平台中可配置有风控模块。该风控模块可以记录上述物联网设备发送的异常响应,进而确定物联网云平台出现异常。物联网云平台可以根据流控机制降低发送上述异常行为中控制指令的频率,从而节省物联网设备和物联网云平台的软硬件资源。
该风控模块还可以记录物联网设备向物联网云平台发送请求(如登录请求)的频率,并根据异常规则判断物联网设备发送该请求是否是异常行为。当风控模块判断出物联网云平台和/或物联网设备处于异常状态,物联网云平台可以向电子设备发送通知。该通知可用于指示物联网设备处于异常请求的状态或者处于被异常控制的状态。这样,用户可以通过电子设备上的物联网APP了解物联网设备处于异常,进而可以根据相关的操作提示来处理该异常。
该风控模块还可用于更新物联网设备中存储的异常规则。具体的,风控模块可以根据物联网云平台软硬件资源当前的消耗情况,生成用于判断物联网设备、物联网云平台的行为是否是异常行为的异常规则。风控模块可以将新的异常规则发送给物联网设备。当接收到来自 物联网云平台的风控模块下发的异常规则,物联网设备可以更新在本地存储的异常规则,并利用更新的异常规则来进行异常监测。这样,物联网设备可以根据物联网云平台软硬件资源的消耗情况来调整自己与物联网云平台交互的频率,从而更合理地利用物联网云平台的软硬件资源。
本申请实施例提供的异常监测方法可以监测物联网设备和物联网云平台是否出现异常。其中,该方法可以在物联网设备向物联网云平台频繁发送异常请求时,降低物联网设备发送异常请求的频率。该方法还可以在物联网云平台向物联网设备频繁发送异常控制指令时,降低物联网设备响应该异常控制指令的频率。这样,可以更有效地节省物联网设备和物联网云平台的软硬件资源。
图3示例性示出了本申请实施例提供的一种物联网系统。
如图3所示,该物联网系统可以包括电子设备100、物联网云平台200和物联网设备300。其中,电子设备100中可安装有用于控制物联网设备300的物联网APP。电子设备100可以通过该物联网APP来获取物联网设备300的状态消息,并发送用于控制物联网设备300的控制指令。该物联网APP中可包含有异常监测开关。该异常监测开关可用于开启或者关闭物联网设备300上的异常监测开关301。
图4示例性示出了物联网APP中的异常监测开关。
如图4所示,电子设备100中安装有物联网APP。响应于用于打开该物联网APP的设置界面的用户操作,电子设备100可以显示如图4所示的设置界面。该设置界面可包含异常监测状态201。该异常监测状态201可用于提示用户物联网设备300上的异常监测开关处于开启的状态还是关闭的状态。示例性的,图2所示的异常监测状态201包含提示语“已关闭”。这可以表示物联网设备300上的异常监测开关处于关闭状态。
上述异常监测状态201中可包含异常监测开关201A。响应于作用在异常监测开关201A的用户操作,电子设备100可以根据用户的选择来开启或者关闭物联网设备300上的异常监测开关。
物联网云平台200可用于连接电子设备100和物联网设备300。物联网云平台200可与电子设备100、物联网设备300建立通信连接。上述通信连接可以为蓝牙(bluetooth,BT)通信连接、无线高保真(wireless fidelity,WiFi)通信连接、ZigBee通信连接、近场通信(near field communication,NFC)连接等。本申请实施例对物联网云平台200与电子设备100、物联网设备300通信的方式不作限定,除了可以采用现有技术中的各项通信协议进行通信,还可以采用未来技术中可能的通信协议进行通信。
物联网云平台200可包含有通信模块、处理模块、存储模块。上述通信模块可用于物联网云平台200与电子设备100、物联网设备300进行通信。示例性的,物联网云平台200的通信模块可通过第一接口与物联网设备300进行通信,并通过第二接口与电子设备100进行通信。上述存储模块可用于存储电子设备100以及与该电子设备100连接的物联网设备的对应信息、物联网设备300上报的状态消息(如物联网设备300开启或关闭的状态、耗电量,物联网设备300上异常监测开关301开启或关闭的状态等)、物联网设备300用于登录物联网云平台的账号及密码等。
示例性的,表1是本申请实施例提供的存储模块中的数据表。该数据表可用于存储电子设备100以及与该电子设备连接的物联网设备的相关信息。
Figure PCTCN2021117990-appb-000001
表1
由表1可以看出,电子设备以及与该电子设备连接的物联网设备的相关信息可以对应存储。
在表1所示的数据表中,字段“电子设备标识”可以为关键字。即物联网云平台200可以根据在字段“电子设备标识”这一列的电子设备,来搜索与该电子设备连接的物联网设备。其中字段“电子设备标识”可包含各电子设备的标识符,例如,如国际移动设备识别码(international mobile equipment identity,IMEI)。电子设备的标识符可用于唯一标识该电子设备。
该数据表还可以包含:字段“物联网设备标识”、字段“物联网设备登录账号”、字段“物联网设备登录密码”、字段“物联网设备开启状态”、字段“物联网设备abnormalMonitor”、字段“物联网设备耗电量”。该数据表还可以包含更多或更少的字段,本申请实施例对此不作限定。
上述字段“物联网设备标识”可包含物联网设备的标识符。该物联网设备的标识符可用于唯一标识该物联网设备。
上述字段“物联网设备登录账号”和上述字段“物联网设备登录密码”可以为物联网设备登录物联网云平台的账号和密码。在一种可能的实现方式中,上述账号和密码可以为电子设备与该物联网设备连接后,由电子设备根据用户的相关设置而分配的。示例性的,电子设备100与物联网设备300首次配对,电子设备100可以显示相关用户界面。该用户界面可用于设置物联网设备300登录物联网云平台200的账户和密码。响应于设置上述账号和密码的用户操作,电子设备100可以将账号和密码经过物联网云平台200发送给物联网设备300。物联网云平台200可以将上述账号和密码存储在如图1B所示的数据表中。物联网设备300也可以存储上述账号和密码,并利用上述账号和密码登录物联网云平台200。当物联网设备300成功登录物联网云平台200,电子设备100可以通过物联网云平台200控制物联网设备300的相关功能,例如开启或关闭物联网设备300、调节物联网设备300的音量等等。电子设备100还可以通过物联网云平台200获取物联网设备300的状态消息。
上述字段“物联网设备开启状态”可用于表示物联网设备处于开启状态或关闭状态。示例性的,该字段的值为1可以表示物联网设备处于开启状态。该字段的值为0可以表示物联网设备处于关闭状态。
上述字段“物联网设备abnormalMonitor”可用于表示物联网设备的异常监测开关处于开启状态或关闭状态。示例性的,该字段的值为1可以表示异常监测开关处于开启状态。该字 段的值为0可以表示异常监测开关处于关闭状态。
上述字段“物联网设备耗电量”可用于表示物联网设备的耗电量。
存储模块还可用于存储计算机程序以及相关规则,例如用于判断物联网设备或物联网云平台是否处于异常状态的规则。上述处理模块可用于执行存储模块中的计算机程序,处理来自电子设备100和物联网设备300的请求,并向电子设备100和物联网设备300发送通知。处理模块还可根据物联网云平台200中的流控机制对物联网云平台200发送的控制指令和来自物联网设备300的请求进行流控。
物联网云平台200还可包含风控模块。该风控模块可用于记录来自物联网设备300请求的频率,并根据异常规则判断上述来自物联网设备300的请求是否是异常请求。该风控模块还可用于记录来自物联网设备300返回的异常响应。该异常响应可以是物联网设备300在确定物联网云平台发送的控制指令为异常控制指令时发出的。该风控模块还可用于更新物联网设备300中存储的异常规则。该异常规则可用于判断物联网设备300或物联网云平台200是否异常。示例性地,物联网设备300中存储的异常规则包括:当物联网设备300向物联网云平台200发送登录请求的频率高于30次/分钟,则物联网设备300可以判断出发送的登录请求是异常请求。
物联网云平台200还可以包含更多或更少的模块,本申请实施例对此不作限定。
物联网设备300可设置有异常监测开关301。并且,物联网设备300中包含有用于判断物联网设备异常行为和物联网云平台异常行为的异常规则。
当异常监测开关301处于开启状态,物联网设备300在向物联网云平台发送消息时,可以根据上述异常规则判断发送该消息是否是异常行为。若确定是异常行为,物联网设备300可以将该消息丢弃。这样,物联网设备300就不会将该消息发送给物联网云平台。物联网云平台也可以不用处理该消息。另外,当异常监测开关301处于开启状态,物联网设备300在向接收物联网云平台200发送的消息时,可以根据上述异常规则判断物联网云平台200发送该消息是否是异常行为。若确定是异常行为,物联网设备300可以不响应物联网云平台200发送的该消息。
在上述图3所示的物联网系统中,当异常监测开关301处于开启状态,物联网设备300可以根据本地存储的异常规则来监测物联网设备300和物联网云平台200是否出现异常。当监测出物联网设备300向物联网云平台200频繁发送异常请求时,物联网设备300可以降低物联网设备300发送上述异常请求的频率。当监测出物联网云平台200向物联网设备300频繁发送异常控制指令时,物联网设备300可以降低物联网设备响应该异常控制指令的频率。这样,可以有效节省物联网设备300和物联网云平台200的软硬件资源。
在图3所示的物联网系统中,当物联网设备300的异常监测开关301开启或者关闭,电子设备100中物联网APP上的异常监测开关的状态可以随之开启或者关闭。这样,用户可以根据物联网APP上异常监测开关的状态而知道物联网设备300的异常监测开关301的状态。
另外,在图3所示的物联网系统中,电子设备100可以通过物联网APP控制物联网设备300上异常监测开关301的状态。这样,当用户不在物联网设备300的旁边或者不方便在物联网设备300上开启或者关闭异常监测开关301时,用户可以通过物联网APP来开启或者关闭物联网设备300上异常监测开关301。
在异常监测开关301处于开启状态时,物联网设备300可以根据本地存储的异常规则来 监测物联网设备300是否出现异常行为。
物联网设备300出现的异常行为可以参考前述实施例的介绍。下面具体以物联网设备300出现的异常为频繁向物联网云平台200发送同一个请求(如登录请求)作为示例进行说明。
上述用于监测物联网设备300是否出现异常行为的异常规则可以为:物联网设备300发送同一个请求的频率超过预设频率。例如,异常规则中用于判断物联网设备300发送登录请求的行为是否是异常行为的预设频率为30次/分钟。当物联网设备300向物联网云平台200发送登录请求的频率为超过30次/分钟,例如为50次/分钟,物联网设备300可以判断出发送登录请求的行为是异常行为。
上述异常规则还可以为:对于物联网设备300向物联网云平台200发送消息的情况,物联网设备300接收到来自物联网云平台200相同反馈的频率超过预设频率。例如,物联网设备300向物联网云平台200发送登录请求后,若物联网设备300接收到物联网云平台200反馈的登录失败的消息超过预设频率,物联网设备300可以判断出发送登录请求的行为是异常行为。本申请实施例对上述异常规则的具体内容不作限定。
上述异常规则可存储在物联网设备300的可擦除存储模块中。例如,带电可擦可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)等。本申请实施例对上述可擦除存储模块的具体类型不作限定。
在一种可能的实现方式中,上述异常规则可以为物联网设备300在出厂时预置在其中的可擦除存储模块的。上述异常规则还可由物联网云平台200下发。当接收到物联网云平台200下发的异常规则,物联网设备300可以在可擦除存储模块中更新其中出厂时预置的异常规则或最近一次由物联网云平台200下发的异常规则。即物联网设备300可以将出厂时预置的异常规则或最近一次由物联网云平台200下发的异常规则从可擦除存储模块中删除,并将这一次由物联网云平台200下发的异常规则存储至可擦除存储模块。
另外,上述异常规则可包含多种用于判断不同行为是否是异常行为的异常规则。示例性的,用于判断物联网设备300发送登录请求是否是异常行为和用于判断物联网设备300发送状态消息是否是异常行为的异常规则可以不一样。其中,异常规则的不同之处具体可以为异常规则中设置的频率不同。本申请实施例对异常规则中频率的具体数值不作限定。
下面结合物联网设备出现异常的应用场景,具体介绍本申请实施例提供的一种设备异常监测方法。
图5示例性示出了一种设备异常监测的方法流程图。该方法可包括步骤S301~S305。其中:
物联网设备300出现异常行为。具体的,该异常行为可以为物联网设备300频繁向物联网云平台200发送登录请求。其中,出现该异常行为的原因可以为前述实施例中所提及的物联网云平台200已删除物联网设备300用于登录的账号及密码,而物联网设备300未删除成功,并利用上述被删除的账号及密码请求登录。由于无法登录成功,物联网设备300就可能频繁请求登录。
S301、物联网设备300向物联网云平台200发送登录请求。
上述登录请求中可包含有账号及密码。其中,响应于来自电子设备100用于删除物联网设备300的请求,物联网云平台200已将上述账号及密码删除。
S302、物联网云平台200向物联网设备300发送登录失败的消息。
由于物联网云平台200已将物联网设备300用于登录的账号及密码删除,物联网设备300 无法成功登录物联网云平台200。物联网云平台200可以向物联网设备300发送登录失败的消息。
当接收到来自物联网云平台200登录失败的消息,物联网设备300可以再次向物联网云平台200发送登录请求。进一步的,物联网云平台200可以再次向物联网设备300发送登录失败的消息。物联网设备300和物联网云平台200可能一直存在上述步骤S301和S302的交互。示例性的,由于无法登录成功,物联网设备300频繁请求登录。其中请求频率达到50次/分钟。
S303、物联网设备300接收到用于开启异常监测开关301的用户操作。
当接收到用于开启异常监测开关301的用户操作,物联网设备300可以开启异常监测开关301。
S304、物联网设备300根据本地存储的第一异常规则(如请求频率高于30次/分钟为异常)判断出物联网设备300发送登录请求为异常行为,降低发送登录请求的频率。
当异常监测开关301处于开启状态,物联网设备300可以记录物联网设备300发送登录请求的次数,并将发送登录请求的频率与第一异常规则进行比较。若判断出发送登录请求的频率高于第一异常规则中设置的频率,则物联网设备300可以判断出发送该登录请求为异常行为,进而降低发送登录请求的频率。
本申请实施例对上述第一异常规则中设置的频率的具体数值不作限定。
在一种可能的实现方式中,物联网设备300可以根据图6所示的方法流程图来进行异常监测,并降低异常行为的频率。
如图6所示,该方法可包括步骤S3041~S3045。其中:
S3041、物联网设备300即将向物联网云平台200发送第一请求。
上述第一请求可以为步骤S301中的登录请求。
上述第一请求还可以为物联网设备300向物联网云平台200发送的其他请求或者上报的物联网设备300的状态消息等。本申请实施例对上述第一请求的具体内容不作限定。
S3042、物联网设备300判断异常监测开关301是否开启。
在向物联网云平台200发送第一请求之前,物联网设备300可以先判断异常监测开关301是否开启。
若异常监测开关301处于开启状态,物联网设备300可以进行异常监测。具体的,物联网设备300可以进一步执行步骤S3043。
若异常监测开关301处于关闭状态,物联网设备300不进行异常监测。具体的,物联网设备300可以进一步执行步骤S3045。
在一种可能的实现方式中,物联网设备300可以通过判断异常监测开关301对应管脚上的电平状态,来判断异常监测开关301是否处于开启状态。示例性的,当判断出异常监测开关301对应管脚上的电平状态为高电平,物联网设备300可以确定异常监测开关301处于开启状态。当判断出异常监测开关301对应管脚上的电平状态为低电平,物联网设备300可以确定异常监测开关301处于关闭状态。
本申请实施例对物联网设备300判断异常监测开关301是否开启的方式不作限定。
S3043、物联网设备300判断发送第一请求的频率是否符合第一异常规则。
上述第一异常规则可以为物联网设备300在出厂时预置的。示例性的,第一异常规则可以为:若物联网设备300发送第一请求(如登录请求)的频率高于30次/分钟,物联网设备300可以判断出发送第一请求为异常行为。
以物联网设备300在发送上述步骤S3041中的第一请求为物联网设备300在1分钟内第31次发送该第一请求的场景为例进行说明。即物联网设备300在不到1分钟的时间内已经发送了30次第一请求。那么物联网设备300可以判断出这第31次发送该第一请求符合上述第一规则,进而可以判断出发送第一请求为异常行为。
进一步的,物联网设备300可以执行步骤S3044。
若物联网设备300判断出发送第一请求的频率不符合第一异常规则,即发送第一请求的频率未超过第一异常规则中设置的频率,物联网设备300可以执行步骤S3045。
在一种可能的实现方式中,物联网设备300判断发送第一请求的频率是否符合第一异常规则的具体方法可以为:物联网设备300可以记录每一次发送第一请求的时间。当即将第n次发送第一请求时,物联网设备300可以判断在当前时刻的前1分钟内发送第一请求的次数是否超过30次。若超过30次,物联网设备300可以判断发送第一请求的频率符合第一异常规则。即物联网设备300这第n次发送第一请求是异常行为。进一步的,物联网设备300可以执行步骤S3044。若未超过30次,物联网设备300可以判断发送第一请求的频率不符合第一异常规则。进一步的,物联网设备300可以执行步骤S3045。上述n为正整数。
S3044、物联网设备300丢弃第一请求。
若判断出发送第一请求的频率符合第一异常规则,物联网设备300可以将这一次需要发送的第一请求丢弃。
需要进行说明的是,若物联网设备300将第n次需要发送的第一请求丢弃,则这第n次需要发送的第一请求不计算在已经发送的第一请求的次数内。具体的,当即将第n+1次发送第一请求,物联网设备300可以判断在当前时刻的前1分钟内发送第一请求的次数是否超过30次。其中,在物联网设备300第n次即将发送第一请求和第n+1次即将发送第一请求之间的时间间隔小于1分钟的情况下,物联网设备300在判断在当前时刻的前1分钟内发送第一请求的次数是否超过30次时可以不计入上述第n次需要发送的第一请求。
S3045、物联网设备300向物联网云平台200发送第一请求。
若异常监测开关301处于关闭状态,物联网设备300可以在需要向物联网云平台200发送第一请求时,直接将第一请求发送给物联网云平台200。
若异常监测开关301处于开启状态,物联网设备300可以在判断出发送第一请求的频率不符合第一异常规则时,向物联网云平台200发送第一请求。
由上述方法可知,当异常监测开关301开启,物联网设备300可以进行异常监测。若物联网设备300出现异常行为,例如频繁向物联网云平台200发送第一请求,物联网设备300可以降低发送第一请求的频率。具体的,物联网设备300可以根据第一异常规则中设置的频率,将发送第一请求的频率限制在不高于第一异常规则中设置的频率的范围内。这样,不仅可以减少物联网设备300和物联网云平台200之间频繁的交互对物联网设备300和物联网云平台200软硬件资源的消耗,还可以使得物联网设备300继续发送上述第一请求来实现相关功能,从而减少由于异常行为误判对物联网设备300功能实现的影响。
图5所示的步骤S304中降低发送登录请求的频率的实现方式可以参考前述图6所示的方法流程图。即图6所示方法中的第一请求可以为物联网设备300向物联网云平台200发送的登录请求。
当降低发送登录请求的频率,物联网设备300可以以较低的频率来发送登录请求,例如频率为20次/分钟。具体的:
S305、物联网设备300向物联网云平台200发送登录请求。
在本申请中,当异常监测开关301处于开启状态,物联网设备300在每一次发送登录请求前,均可进行图6所示方法中的判断过程,来确定是将这一次需要发送的登录请求丢弃,还是将这一次需要发送的登录请求发送给物联网云平台200。这样,物联网设备300可以将发送登录请求的频率控制在不高于第一异常规则中设置的频率的范围内,例如20次/分钟。
在一些实施例中,物联网设备300可以在监测到发送第一请求(如登录请求)的频率超过第一异常规则中设置的频率后,不再向物联网云平台200发送第一请求。也即是说,当物联网设备300根据存储在可擦除存储模块中的第一异常规则,判断出物联网设备300发送第一请求是异常行为,物联网设备300可以直接终止该异常行为。这样,物联网设备300和物联网平台200之间可以不再进行异常交互,从而节省物联网设备300和物联网云平台200的软硬件资源。
在一些实施例中,物联网设备300可以在监测到异常后通过语音播报或者显示灯的不同来提示用户物联网设备300发生异常。示例性的,当监测到异常,除了执行图5所示方法中的步骤,物联网设备300可以语音播报“登录异常,请重置设备”。这样,物联网设备300可以提示用户物联网设备300发生异常,并向用户提供解决方案。本申请实施例对上述语音播报的具体内容不作限定。或者,不具备语音输出装置(如扬声器)的物联网设备300可以通过显示灯颜色的变化来提示用户物联网设备300发生异常。例如,物联网设备300上可配置有显示灯。该显示灯为绿色可以表示物联网设备300正常工作。该显示灯为红色可以表示物联网设备300出现异常。本申请实施例对上述提示用户出现异常的方式不作限定。
在出现前述实施例中由于电子设备100和物联网云平台200将物联网设备300的用于登录物联网云平台200的用户名和密码删除,但物联网设备300上并未删除上述用户名和密码的情况下,物联网设备300可能频繁向物联网云平台200请求登录。上述异常的具体解决方案可以为对物联网设备300进行重置操作。这样可以删除物联网设备300中用于登录物联网云平台200的用户名和密码。也即是说,用户可以在物联网设备300的重置按钮上进行用户操作。当重置成功,物联网设备300在获得新的用于登录物联网云平台200的用户名和密码之前可以不再向物联网云平台200请求登录。
其中,当异常监测开关301处于开启状态,物联网设备300可以进行异常监测。当判断出发送登录请求为异常行为,物联网设备300可以根据图5和图6所示的方法来降低发送登录请求的频率,以节省物联网设备300和物联网云平台200的软硬件资源。另外,物联网设备300还可以语音播报“登录异常,请重置设备”,来提示用户对物联网设备300进行重置操作。这样,物联网设备300可以消除上述异常行为。
下面仍然结合物联网设备出现异常的应用场景,具体介绍本申请实施例提供的另一种设备异常监测方法。
图7示例性示出了一种设备异常监测的方法流程图。该方法可包括步骤S401~S409。其中:
物联网云平台200可配置有风控模块。该风控模块的功能可以参考前述实施例中的说明,这里不再赘述。
物联网设备300出现异常行为。具体的,该异常行为可以为物联网设备300频繁向物联网云平台200发送登录请求。其中,物联网设备300频繁发送登录请求的原因可以参考前述实施例,这里不再赘述。
S401、物联网设备300向物联网云平台200发送登录请求。
S402、物联网云平台200向物联网设备300发送登录失败的消息。
在异常监测开关301处于关闭状态时,由于前述导致异常的原因,物联网设备300可以频繁(如频率为50次/分钟)向物联网云平台200请求登录,并可在每一次发送登录请求后接收到来自物联网云平台200返回的登录失败消息。这极大地消耗了物联网设备300和物联网云平台200的软硬件资源。
S403、物联网设备300接收到用于开启异常监测开关301的用户操作。
物联网设备300可以开启异常监测开关301。物联网设备300和物联网云平台200之间可以根据图3所示的方法进行交互,物联网云平台200可以将用于表示异常监测开关301状态的abnormalMonitor字段的值修改为1。
上述步骤S401~S403可以参考前述图5所示方法中的步骤S301~S303,这里不再赘述。
S404、物联网云平台200中的风控模块根据第二异常规则(如请求频率高于20次/分钟为异常)判断出物联网设备发送登录请求为异常行为。
风控模块可以根据物联网云平台200软硬件资源的消耗情况生成异常规则。物联网云平台200在软硬件资源消耗过高的情况下,例如计算资源中CPU消耗过高,可能会导致物联网云平台200在工作过程中出现卡顿等,影响物联网云平台的工作。当判断出物联网云平台200的软硬件资源消耗越高,风控模块在生成用于判断物联网设备300是否出现异常的异常规则时,可以将异常规则中的频率设置得越低。这样,物联网设备300可以根据更新的异常规则将发送登录请求的频率控制在更低的范围内,从而更好地节省物联网云平台200和物联网设备300的软硬件资源。当判断出物联网云平台200的软硬件资源消耗较低,风控模块在生成用于判断物联网设备300是否出现异常的异常规则时,可以将异常规则中的频率设置得稍高。
也即是说,当物联网云平台200的软硬件资源消耗越高,物联网云平台200中可用于处理来自物联网设备300可能是异常行为的请求的软硬件资源越少,风控模块可以设置更高要求的异常规则。当物联网云平台200的软硬件资源消耗越低,物联网云平台200中可用于处理来自物联网设备300可能是异常行为的请求的软硬件资源越多,风控模块可以设置更低要求的异常规则。
示例性的,在物联网设备300出现异常而频繁向物联网云平台200发送登录请求时,物联网云平台200当前的软硬件资源消耗较高。风控模块可以根据物联网云平台200当前的软硬件资源的消耗情况生成第二异常规则。该第二异常规则具体可以为:若物联网设备300发送登录请求的频率高于20次/分钟,则该发送登录请求的行为是异常行为。
风控模块可以记录物联网云平台200接收到物联网设备300每一次发送登录请求的时间。进一步的,风控模块可以判断物联网设备300发送登录请求的频率是否超过第二异常规则中设置的频率。
在风控模块将上述第二异常规则发送给物联网设备300之前,物联网设备300可以用上述存储在可擦除存储模块的第一异常规则来判断物联网设备300是否出现异常行为。由于上述第二异常规则比上述第一异常规则的要求更高,风控模块可以比物联网设备300先判断出发送登录请求的行为是异常行为。例如,当物联网设备300在不到1分钟的时间内已经向物联网云平台200发送了30次登录请求,风控模块可以判断出该发送登录请求的行为是异常行为。而物联网设备300根据第一异常规则判断出该发送登录请求的行为不是异常行为。物联网设备300可以继续发送登录请求。
需要进行说明的是,物联网云平台200中的风控模块可以识别出物联网云平台200接收到的请求具体来自于哪一个物联网设备300。示例性的,每一个物联网设备在发送请求时均 可以在该请求中增加设备标识符。该设备标识符可用于唯一标识物联网设备。这样,风控模块可以根据请求中的设备标识符来识别物联网设备。进而,风控模块可以通过记录物联网设备发送同一个请求的时间,来判断该物联网设备发送这同一个请求的频率是否符合异常规则。
当风控模块判断出该发送登录请求的行为是异常行为,物联网设备300可以执行步骤S405。
S405、物联网云平台200中的风控模块向物联网设备300发送第二异常规则。
在本申请中,风控模块可以将第二异常规则发送给物联网云平台200中的通信模块。该通信模块可以将第二异常规则经由物联网云平台200和物联网设备300连接的第一接口发送给物联网设备300。
S406、物联网设备300将本地存储的第一异常规则更新为第二异常规则。
当接收到来自物联网云平台200的第二异常规则,物联网设备300可以将可擦除存储模块中存储的第一异常规则擦除,并将第二异常规则存储至可擦除存储模块。
S407、物联网设备300根据本地存储的第二异常规则判断出物联网设备300发送登录请求为异常行为,降低发送登录请求的频率。
步骤S407的具体实现过程可以参考前述图5所示方法中的步骤S304。这里不再赘述。
示例性的,物联网设备300可以根据第二异常规则将发送登录请求的频率降低在20次/分钟以内的范围内,例如15次/分钟。
在本申请中,当判断出物联网设备300出现异常行为,物联网设备可以通过语音播报或显示灯的不同来提示用户物联网设备300发生异常。上述提示的方式具体可以参考前述实施例的说明,这里不再赘述。
S408、物联网设备300向物联网云平台200发送登录请求。
在本申请中,当异常监测开关301处于开启状态,物联网设备300在每一次发送登录请求前,均可进行图6所示方法中的判断过程,来确定是将这一次需要发送的登录请求丢弃,还是将这一次需要发送的登录请求发送给物联网云平台200。这样,物联网设备300可以将发送登录请求的频率控制在不高于第二异常规则中设置的频率的范围内,例如15次/分钟。
S409、物联网云平台200可向电子设备100发送用于指示物联网设备300出现异常的消息。
当风控模块判断出物联网设备300出现异常,物联网云平台200可以向电子设备100发送用于指示物联网设备300出现异常的消息。
当接收到物联网云平台200的上述消息,电子设备100可以显示相关的消息通知,来提示用户物联网设备300出现异常,以及向用户提供相应的异常情况解决方案。
示例性的,电子设备100(如手机)可以显示如图8所示的用户界面。
如图8所示,该用户界面可包含消息通知210。其中,该消息通知可以是来自物联网APP,例如“智慧生活”应用程序,的消息通知。消息通知210中可包含有提示语“物联网设备300无法进入待配网状态,点击查看解决方案”。响应于作用在消息通知210的用户操作,例如触摸操作,电子设备100可以显示包含用于解决物联网设备300异常的解决方案的用户界面。该解决方案可例如是:请重置物联网设备300。具体的,根据不同的异常情况,该解决方案可以不同。例如,解决方案还可以是:请检查网络连接情况。或者,请先断开网络连接,等待1分钟后再次连接。或者拨打客服电话、登录相关网址查询更详细的解决方案,等等。本申请实施例对上述解决方案的具体内容不作限定。
也即是说,用户可以通过查看电子设备100而了解物联网设备300出现异常,并根据上 述解决方案解决物联网设备300的异常。其中,在用户根据解决方案解决物联网设备300的异常之前,物联网设备300可以根据异常规则监测到异常情况,并降低异常行为的频率(如降低发送登录请求的频率),从而节省物联网设备300和物联网云平台200的软硬件资源。
本申请对上述步骤S409和S405之间的先后顺序不作限定。
在一些实施例中,风控模块向物联网设备300发送异常规则时,可以通过不同的接口发送不同的异常规则。
示例性的,物联网云平台200和物联网设备300之间可通过第一接口进行交互。其中,第一接口可包含有多个接口。这多个接口可用于物联网云平台200和物联网设备300进行不同功能的数据交互。例如,物联网设备300可以通过其中一个接口向物联网云平台200发送登录请求,且通过这同一个接口接收来自物联网云平台200用于指示登录失败或登录成功的消息。物联网云平台200可以通过另一个接口向物联网设备300发送开启的控制指令,且通过这另一个接口接收来自物联网设备300用于指示开启成功的消息。
那么用于判断不同交互行为是否是异常行为的异常规则可以通过进行这一交互行为的接口由物联网云平台200发送给物联网设备300。示例性的,上述用于判断物联网设备300发送登录请求的行为是否是异常行为的第二异常规则,可以由物联网云平台200通过接收来自物联网设备300的登录请求的接口下发给物联网设备300。物联网设备300可以利用通过该接口接收的第二异常规则来监测发送登录请求的行为是否是异常行为。
在一些实施例中,风控模块可以每隔预设时间段来根据物联网云平台200软硬件资源的消耗情况来生成异常规则。上述预设时间段可以为一天、两天等等。本申请实施例对上述预设时间段的具体长度不作限定。风控模块可以在每隔预设时间段生成异常规则后,将新的异常规则发送给物联网设备300。物联网设备300可以更新本地存储的异常规则。这样,物联网设备300用于判断是否出现异常的异常规则可以更好地适配物联网云平台200软硬件资源的消耗情况。
在一些实施例中,风控模块可以在物联网云平台200接收到来自物联网设备300发送请求或消息时,根据物联网云平台200软硬件资源的消耗情况来生成异常规则,并进一步利用上述生成的异常规则来判断来自物联网设备300的是否出现异常。
在一些实施例中,风控模块根据物联网云平台200软硬件资源的消耗情况生成的异常规则可能比物联网设备300本地存储的异常规则的要求更低。也即是说,物联网设备300可以比风控模块先判断出物联网设备300发送某一请求的行为是异常行为。在这种情况下,风控模块可以不将生成的异常规则发送给物联网设备300。
示例性的,在前述实施例中,在物联网设备300出现异常而频繁向物联网云平台200发送登录请求时,物联网云平台200当前的软硬件资源消耗较低。风控模块生成的第二异常规则可以为:若物联网设备300发送登录请求的频率高于40次/分钟,则该发送登录请求的行为是异常行为。而物联网设备300本地存储的第一异常规则可以为:若物联网设备300发送登录请求的频率高于30次/分钟,则该发送登录请求的行为是异常行为。
当物联网设备300在不到1分钟的时间内已经向物联网云平台200发送了35次登录请求,风控模块根据第二异常规则判断出该发送登录请求的行为不是异常行为。而物联网设备300可以判断出该发送登录请求的行为是异常行为。进一步的,物联网设备300可以根据第一异常规则降低发送登录请求的频率。例如物联网设备300以20次/分钟的频率向物联网云平台 发送登录请求。在发送登录请求的频率为20次/分钟时,物联网设备300和风控模块均可判断出该发送登录请求的行为不是异常行为。这样,风控模块可以不想物联网设备30发送上述第二异常规则。
本申请实施例对风控模块生成异常规则所依据的内容不作限定。除了上述物联网云平台软硬件资源的消耗情况,风控模块可可以根据物联网云平台当前的网络质量等因素来生成异常规则。
由上述方法可知,物联网设备中用于判断物联网设备是否出现异常的异常规则可以是变化的。当物联网云平台包含风控模块,风控模块可以根据物联网云平台软硬件资源的消耗情况等因素来生成异常规则,并将新的异常规则发送给物联网设备。物联网设备可以更新本地存储的异常规则,并利用新的异常规则来判断物联网设备是否出现异常。这样,物联网设备可以在频繁发送第一请求时,根据物联网云平台软硬件资源的消耗情况来调整发送第一请求的频率,从而节省物联网设备和物联网云平台的软硬件资源,提高了整个物联网系统的可靠性。
另外,当风控模块监测出物联网设备出现异常,物联网云平台可以向电子设备发送用于指示该物联网设备出现异常的消息,来提示用户该物联网设备出现异常,并为用户提供解决该异常的解决方案。这样可以有利于消除物联网设备出现的异常。
下面结合物联网云平台出现异常的应用场景,具体介绍本申请实施例提供的一种设备异常监测方法。
物联网云平台200出现异常行为。具体的,该异常行为可以为物联网云平台200频繁向物联网设备300发送控制命令。例如用于开启的控制命令和用于关闭的控制命令。其中,出现该异常行为的原因可以为前述实施例中所提及的物联网云平台200的控制规则出现死循环。上述用于开启的控制指令会触发物联网云平台200发送用于关闭的控制指令。上述用于关闭的控制指令会触发物联网云平台200发送用于开启的控制指令。示例性的,物联网设备300为智能灯。在物联网云平台200出现上述异常行为时,智能灯响应上述异常的控制指令,频繁的开灯和关灯。这会极大消耗物联网设备和物联网云平台的软硬件资源。
图9示例性示出了一种设备异常监测的方法流程图。该方法可包括步骤S501~S506。其中:
物联网设备300的异常监测开关301处于开启状态。
S501、物联网云平台200向物联网设备300发送第一控制指令。
上述第一控制指令可以是用于开启物联网设备的控制指令。
S502、物联网设备300开启。
响应于上述第一控制指令,物联网设备300开启。
S503、物联网云平台200向物联网设备300发送第二控制指令。
上述第二控制指令可以是用于关闭物联网设备的控制指令。其中,由于控制规则死循环,上述第一控制指令可以触发物联网云平台200发送第二控制指令。
S504、物联网设备300关闭。
响应于上述第二控制指令,物联网设备300关闭。需要进行说明的是,物联网设备300关闭可以表示物联网设备300的处于待机状态,例如物联网设备300的主处理器休眠。在物联网设备300处于待机状态的情况下,物联网设备300仍可以接收并识别用于开启物联网设备300的第一控制指令。处于待机状态的物联网设备300可以在接收到上述第一控制指令时, 进入工作状态,例如唤醒物联网设备300的主处理器。
另外,在本申请中,用于进行异常监测的模块可以集成在低功耗处理器中。当异常监测开关301处于开启状态,用于进行异常监测的模块可以实时检测物联网设备或物联网云平台是否出现异常行为。也即是说,在物联网设备处于待机状态时,集成有用于进行异常监测的模块的低功耗处理器仍可处于工作状态。
进一步的,上述第二控制指令可以触发物联网云平台200发送第一控制指令。可以看出,物联网云平台200频繁地向物联网设备300发送控制指令(第一控制指令和第二控制指令)。示例性的,物联网云平台200发送控制指令的频率可以为50次/分钟。这极大消耗了物联网云平台200和物联网设备300的软硬件资源。
S505、物联网设备根据本地存储的第三异常规则(如控制频率高于30次/分钟为异常)判断出物联网云平台200发送控制指令(包括第一控制指令和第二控制指令)为异常行为,降低对第一控制指令和第二控制指令的响应频率。
当异常监测开关301处于开启状态,物联网设备300可以记录接收到来自物联网云平台200的控制命令的次数,并将接收到控制命令的频率与第三异常规则进行比较。若判断出接收到控制命令的频率高于第三异常规则中设置的频率,则物联网设备300可以判断出物联网云平台发送上述控制命令为异常行为,进而降低对上述控制指令的响应频率。
本申请实施例对上述第三异常规则中设置的频率的具体数值不作限定。
在一种可能的实现方式中,物联网设备300可以根据图10所示的方法流程图来进行异常监测,并降低对控制指令的响应频率。
如图10所示,该方法可包括步骤S5051~S5055。其中:
S5051、物联网设备300接收到物联网云平台200发送的控制指令。
上述控制指令可以包括前述步骤S501中用于开启物联网设备300的第一控制指令,和步骤S503中用于关闭物联网设备300的第二控制指令。
上述控制指令还可以为其他类型的指令,例如调节音量的控制指令、调节亮度的控制指令,等等。本申请实施例对上述控制指令的具体内容不作限定。
S5052、物联网设备300判断异常监测开关301是否开启。
在对物联网云平台200发送的控制指令作出响应前,物联网设备300可以进行异常监测,来判断物联网云平台200发送该控制指令是否是异常行为。
具体的,物联网设备300可以先判断异常监测开关301是否开启。其中,
若异常监测开关301处于开启状态,物联网设备300可以进行异常监测。具体的,物联网设备300可以进一步执行步骤S5053。
若异常监测开关301处于关闭状态,物联网设备300不进行异常监测。具体的,物联网设备300可以进一步执行步骤S5055。
物联网设备300判断异常监测开关是否开启的具体方式可以参考前述图6所示方法中的步骤S3042,这里不再赘述。
S5053、物联网设备300判断接收到控制指令的频率是否符合第三异常规则。
上述第三异常规则可以为物联网设备300在出厂时预置的。示例性的,第三异常规则可以为:若物联网设备300接收到控制指令(如第一控制指令和第二控制指令)的频率高于30次/分钟,物联网设备300可以判断出物联网云平台200发送上述控制指令为异常行为。
进一步的,物联网设备300可以执行步骤S5054。
若物联网设备300判断出接收到上述控制指令的频率不符合第三异常规则,即接收到上 述控制指令的频率未超过第三异常规则中设置的频率,物联网设备300可以执行步骤S5055。
物联网设备300判断接收到上述控制指令的频率是否符合第三异常规则的具体方法可以参考前述实施例中物联网设备300判断发送第一请求的频率是否符合第一异常规则的具体方法,这里不再赘述。
S5054、物联网设备300丢弃控制指令。
若判断出接收到上述控制指令的频率符合第三异常规则,物联网设备300可以将这一次接收到的控制指令丢弃。示例性的,物联网设备300开启,且异常监测开关301处于开启状态。当接收到上述第二控制指令,物联网设备300可以判断接收到第一控制指令和第二控制指令的频率是否符合第三异常规则。若符合,物联网设备300可以丢弃这一次接收到的第二控制指令,即物联网设备300不响应这一次接收到的第二控制指令,不关闭物联网设备300,仍保持开启的状态。
S5055、物联网设备300对控制指令作出响应。
若异常监测开关301处于关闭状态,物联网设备300可以在接收到物联网云平台200发送的控制指令时,直接对该控制指令作出响应。
若异常监测开关301处于开启状态,物联网设备300可以在判断出接收到控制请求的频率不符合第三异常规则时,对该控制指令作出响应。
由上述方法可知,当异常监测开关301开启,物联网设备300可以进行异常监测。若物联网云平台200出现异常行为,例如频繁向物联网设备300发送控制指令,物联网设备300可以降低对上述控制指令的响应频率。具体的,物联网设备300可以根据第三异常规则中设置的频率,将响应上述控制指令的频率限制在不高于第三异常规则中设置的频率的范围内。这样,可以减少物联网设备300频繁响应物联网云平台200的控制指令对物联网设备300软硬件资源的消耗,还可以使得物联网设备300保持较低的频率来响应上述控制指令,从而减少由于异常行为误判对物联网设备300功能实现的影响。
图9所示的步骤S505中降低对第一控制指令和第二控制指令的响应频率的实现方式可以参考前述图10所示的方法流程图。即图10所示方法中的控制指令可以为物联网云平台200向物联网设备300发送的第一控制指令和第二控制指令。
当判断出物联网云平台200发送第一控制指令和第二控制指令为异常行为,除了降低对上述控制指令的响应频率,物联网设备300还可以向物联网云平台200发送异常响应。具体的:
S506、物联网设备300向物联网云平台200发送异常响应。
上述异常响应可用于提示物联网云平台100发送第一控制指令和第二控制指令的行为是异常行为。
在本申请中,当判断出接收到控制指令的频率符合第三异常规则,物联网设备300可以通过语音播报或者显示灯的不同来提示用户物联网设备300收到异常控制。示例性的,当判断出物联网云平台200发送控制指令为异常行为,除了执行图9所示方法的步骤,物联网设备300可以语音播报“受到异常控制,请暂时断开网络连接”。这样,物联网设备300可以提示用户物联网设备300受到异常控制,并向用户提供解决方案。本申请实施例对上述提示用户出现异常的方式不作限定。
在一种可能的实现方式中,物联网云平台200上设置有流控机制,且该流控机制未出现异常。物联网云平台200可以根据流控机制控制向物联网设备300发送控制指令的频率。这样,当物联网云平台200出现例如控制规则死循环等异常时,物联网云平台200可以降低发 送控制指令的频率,从而节省物联网云平台和物联网设备的软硬件资源。
若上述流控机制也出现异常,物联网云平台可能无法根据上述流控机制来控制下发控制指令的频率,物联网设备和物联网云平台的软硬件资源均会被极大消耗。但结合本申请中上述图9和图10所示的方法,物联网设备可以根据本地存储的异常规则监测出物联网云平台出现异常,进而降低响应来自物联网云平台异常的控制指令的频率。这样,物联网设备可以减少由于频繁响应异常的控制指令对软硬件资源的消耗。
上述图9和图10所示方法中,物联网设备可以根据本地存储的异常规则来监测物联网云平台是否出现异常。其中,物联网设备本地存储的异常规则可以更新。
下面仍结合物联网云平台出现异常的应用场景,具体介绍本申请实施例提供的另一种设备异常监测方法。
物联网云平台200可配置有风控模块。该风控模块的功能可以参考前述实施例中的说明,这里不再赘述。
物联网云平台200出现异常行为。具体的,该异常行为可以为物联网云平台200频繁向物联网设备300发送用于开启的第一控制指令和用于关闭的第二控制指令。其中,物联网云平台200频繁发送控制指令的原因可以参考前述实施例,这里不再赘述。
图11示例性示出了一种设备异常监测的方法流程图。该方法可包括步骤S601~S615。其中:
物联网设备300的异常监测开关301处于开启状态。
S601、物联网云平台200向物联网设备300发送第一控制指令。
该第一控制指令可以为用于开启物联网设备300的控制指令。
S602、物联网设备300开启。
S603、物联网云平台200向物联网设备300发送第二控制指令。
该第二控制指令可以为用于关闭物联网设备300的控制指令。
S604、物联网设备300关闭。
S605、物联网设备300根据本地存储的第三异常规则(如控制频率高于30次/分钟为异常)判断出物联网云平台200发送控制指令(包括第一控制指令和第二控制指令)为异常行为,降低对第一控制指令和第二控制指令的响应频率。
由于异常监测开关301处于开启状态,在上述步骤S601发送第一控制指令和步骤S603发送第二控制指令的过程中,物联网设备300可以进行异常监测。具体的,当根据第三异常规则判断出接收到上述第一控制指令和第二控制指令的频率超过第三异常规则中设置的频率,物联网设备300可以根据前述图10所示的方法降低对第一控制指令和第二控制指令的响应频率。这里对降低上述响应频率的方法不再赘述。
在本申请中,物联网设备300还可以在判断出接收到的第一控制指令或第二控制指令为异常控制指令时,通过语音播报、显示灯的不同等方式来提示用户物联网设备300受到异常控制。本申请实施例对物联网设备300提示用户设备受到异常控制的具体方式不作限定。
S606、物联网设备300向物联网云平台200发送异常响应。
当监测到物联网云平台200出现异常,物联网设备300可以向物联网云平台200发送用于指示物联网云平台200发送上述控制指令为异常行为的异常响应。
上述步骤S601~S606的具体实现过程均可参考前述图9所示的方法,这里不再赘述。
S607、物联网云平台200中的风控模块记录异常响应,并获取第一控制指令和第二控制 指令发送的频率。风控模块根据第四异常规则(如控制频率高于20次/分钟为异常)判断出物联网云平台发送第一控制指令和第二控制指令为异常行为。
当物联网云平台200接收到来自物联网设备300的异常响应,风控模块可以记录上述异常响应。风控模块可以根据物联网云平台200软硬件资源的消耗情况生成异常规则。例如,风控模块可以生成第四异常规则:若物联网云平台发送第一控制指令和第二控制指令的频率高于20次/分钟,则该发送第一控制指令和第二控制指令的行为是异常行为。其中,风控模块生成异常规则的实现方式可以参考前述图7所示方法中的步骤S404,这里不再赘述。
另外,风控模块可以获取物联网云平台200发送上述第一控制指令和第二控制指令的频率。结合生成的第四异常规则,风控模块可以分析物联网云平台发送上述第一控制指令和第二控制指令的行为是否是异常行为。
若根据第四异常规则判断出发送上述第一控制指令和第二控制指令的行为是异常行为,物联网云平台200可以执行步骤S608和步骤S609。
S608、物联网云平台200向电子设备100发送用于指示物联网设备300受到异常控制的消息。
当接收到物联网云平台200的上述消息,电子设备100可以显示相关的消息通知,来提示物联网设备300受到异常控制,以及向用户提供相应的异常情况解决方案。示例性的,电子设备100显示的消息通知可包含提示语“物联网设备300受到异常控制,请暂时断开网络连接”。本申请对上述消息通知中提示语的具体内容不作限定。
也即是说,用户可以通过查看电子设备100而了解物联网设备300受到异常控制,并根据解决方案停止物联网设备300受到异常控制。其中,在用户根据解决方案停止物联网设备300受到异常控制之前,物联网设备300可以根据异常规则判断监测到异常情况,并降低对异常控制指令(如第一控制指令和第二控制指令)的响应频率,从而节省物联网设备300的软硬件资源。
S609、物联网云平台200中的风控模块向物联网设备300发送第四异常规则。
在本申请中,风控模块可以将第四异常规则发送给物联网云平台200中的通信模块。该通信模块可以将第四异常规则经由物联网云平台200和物联网设备300连接的第一接口发送给物联网设备300。
S610、物联网设备300将本地存储第三异常规则更新为第四异常规则。
当接收到来自物联网云平台200的第四异常规则,物联网设备300可以将可擦除存储模块中存储的第三异常规则擦除,并将第四异常规则存储至可擦除存储模块。
在一种可能的实现方式中,当接收到来自物联网设备300的异常响应,物联网云平台200的控制台可以显示上述异常响应,来提示相关管理人员物联网云平台200出现异常。这样,在物联网云平台的控制规则出现死循环、流控机制出现异常或遭到恶意控制等情况下,物联网云平台可能频繁向物联网设备下发控制指令。在上述问题需要相关管理人员需要解决时,物联网云平台可以在接收到异常响应后通过控制台来提示相关管理人员。进而,相关管理人员可以解决物联网云平台出现的异常。
上述物联网云平台200的控制台可用于相关管理人员对登录,并管理物联网云平台200、处理物联网云平台出现的异常。
S611、物联网云平台200向物联网设备300发送第一控制指令。
该第一控制指令可以为用于开启物联网设备300的控制指令。
S612、物联网设备300开启。
S613、物联网云平台200向物联网设备300发送第二控制指令。
该第二控制指令可以为用于关闭物联网设备300的控制指令。
S614、物联网设备300关闭。
在物联网云平台200的相关管理人员解决上述异常之前,或者物联网云平台200的上述异常解决后物联网云平台再次出现上述异常的情况下,物联网云平台200频繁向物联网设备300发送上述步骤S611中的第一控制指令和上述步骤S613中的第二控制指令。即物联网设备300接收到的异常的控制指令。
S615、物联网设备300根据本地存储的第四异常规则判断出物联网云平台200发送第一控制指令和第二控制指令为异常行为,降低对第一控制指令和第二控制指令的响应频率。
由前述步骤S610可知,物联网设备300中用于判断物联网云平台200发送第一控制指令和第二控制指令的行为是否为异常行为的异常规则由第三异常规则更新为第四异常规则。
当物联网设备300的异常监测开关301开启,物联网设备300可以记录接收到的第一控制指令和第二控制指令的次数,并将接收到第一控制指令和第二控制指令的频率与第四异常规则中设置的频率进行比较。当判断出接收到第一控制指令和第二控制指令的频率高于第四异常规则中设置的频率,物联网设备300可以根据前述图10所述的方法降低对第一控制指令和第二控制指令的响应频率。
另外,当判断物联网云平台200发送第一控制指令和第二控制指令的行为是异常行为,物联网设备300还可以向物联网云平台200发送异常响应,以提示物联网云平台200出现异常。
由图11所述的方法可知,物联网设备中用于判断物联网云平台是否出现异常的异常规则可以是变化的。当物联网云平台包含风控模块,风控模块可以根据物联网云平台软硬件资源的消耗情况等因素来生成异常规则,并将新的异常规则发送给物联网设备。物联网设备可以更新本地存储的异常规则,并利用新的异常规则来判断物联网云平台是否出现异常。这样,物联网设备可以在频繁接收到异常的控制指令时,例如用于开启物联网设备的第一控制指令和用于关闭物联网设备的第二控制指令,降低对上述异常的控制指令的响应频率。上述方法可以节省物联网设备的软硬件资源。
另外,当风控模块根据接收到的异常响应以及异常规则确定物联网云平台出现异常行为,物联网云平台可以向电子设备发送用于指示物联网设备受到异常控制的消息,来提示用户该物联网设备出现异常,并为用户提供解决该异常的解决方案。当风控模块接收到异常响应,物联网云平台的控制台还可以显示上述异常响应,来提示相关管理人员物联网云平台出现异常。进而,相关管理人员可以在收到提示后处理物联网云平台的异常。
在本申请实施例中,电子设备100中物联网APP上异常监测开关的状态(如图4所示的异常监测状态201)与物联网设备300上异常监测开关301的状态可以是同步的。
下面介绍本申请实施例提供的一种物联网设备上报异常监测开关的状态的方法。
图12示例性示出了物联网设备300上报异常监测开关的状态的方法流程图。该方法可包括步骤S101~S105。其中:
S101、物联网设备300可以检测到用于开启异常监测开关301的第一用户操作。
在本申请实施例中,当检测到异常监测开关301的状态发生变化时,物联网设备300可以向物联网云平台200上报异常监测开关301的变化后的状态。
示例性的,异常监测开关301处于关闭状态。当检测到用于开启异常监测开关301的第 一用户操作,物联网设备300可以开启异常监测开关301。进一步的,物联网设备300可以将异常监测开关301的状态(即开启状态)上报给物联网云平台200。上述第一用户操作可以为在图3所示的异常监测开关301处于关闭状态时,作用在该异常监测开关301上的用户操作。例如触摸操作或按压操作等。
另外,异常监测开关301处于开启状态。当检测到用于关闭异常监测开关301的用户操作,物联网设备300可以关闭异常监测开关301。进一步的,物联网设备300可以将异常监测开关301的状态(即关闭状态)上报给物联网云平台200。上述用于关闭异常监测开关301的用户操作可以为在图3所示的异常监测开关301处于开启状态时,作用在该异常监测开关301上的用户操作。例如触摸操作或按压操作等。
本申请实施例对上述异常监测开关301的类型不作限定,例如,该异常监测开关301可以是电容式开关、电感式开关等其它类型的开关。在一种可能的实现方式中,异常监测开关301的状态由关闭状态变为开启状态,或者由开启状态变为关闭状态时,物联网设备300具体可以将异常监测开关301对应管脚上的电平取反。
S102、物联网设备300向物联网云平台200上报异常监测开关301的状态。
S103、物联网云平台200保存物联网设备300异常监测开关301的状态。
在本申请实施例中,物联网云平台200中可存储有abnormalMonitor字段。各物联网设备对应的abnormalMonitor字段可用于表示该物联网设备异常监测开关的状态。示例性的,物联网云平台200中与物联网设备300对应的abnormalMonitor字段的值为1,可以表示物联网设备300的异常监测开关301处于开启状态。物联网云平台200中与物联网设备300对应的abnormalMonitor字段的值为0,可以表示物联网设备300的异常监测开关301处于关闭状态。
当接收到来自物联网设备300上报的异常监测开关301的状态,物联网云平台200可以保存上述状态。即物联网云平台200可以修改物联网设备300对应的abnormalMonitor字段。示例性的,由于异常监测开关301从关闭状态变换为开启状态,物联网云平台可以将物联网设备300对应的abnormalMonitor字段的值修改为1。
S104、物联网云平台200可以向电子设备100发送指示异常监测开关301状态的信息。
当接收并保存物联网设备300上报的异常监测开关301的状态后,物联网云平台200可以向电子设备100发送指示异常监测开关301状态的信息。例如指示异常监测开关301处于开启状态的信息。
S105、电子设备100可以更新物联网APP中物联网设备300异常监测开关的状态。
当接收到物联网设备300的异常监测开关301的状态,电子设备100可以更新物联网APP中物联网设备300异常监测开关301的状态。示例性的,当接收到指示异常监测开关301处于开启状态的信息,电子设备100可以将如图4所示的异常监测状态201更新为关闭状态。其中,异常监测状态201中的提示语可以更新为“已开启”。这样,用户可以从物联网APP中查看到物联网设备300的异常监测开关301处于开启状态。
在一种可能的实现方式中,电子设备100可以向物联网云平台200发送用于获取异常监测开关301状态的请求。当接收到上述用于获取异常监测开关301状态的请求,物联网云平台200可以根据物联网设备300的abnormalMonitor字段,向电子设备100发送异常监测开关301状态。当接收到上述异常监测开关301的状态,电子设备100可以更新物联网APP中物联网设备300异常监测开关301的状态。上述电子设备100发送用于获取异常监测开关301状态的请求的时间可以为:电子设备100响应于用户操作开启物联网APP的时间。即物联网APP在开启时,电子设备100可以向物联网云平台200请求异常监测开关301的状态并在物 联网APP中进行更新。本申请实施例对上述电子设备100发送用于获取异常监测开关301状态的请求的时间不作限定。
在一些实施例中,物联网设备300可以定时向物联网云平台200上报异常监测开关301的状态。
示例性的,除了在前述实施例中,当异常监测开关301的状态发生变化时,物联网设备300可以向物联网云平台200上报异常监测开关301的状态,物联网设备300还可以每隔预设时间段向物联网云平台200上报一次异常监测开关301的状态。上述预设时间段可以为一天、两天、三天等。本申请实施例对上述预设时间段的长度不作限定。例如,物联网设备300可以每天在固定时间(例如23:00),向物联网云平台200上报一次异常监测开关301的状态。
这样,可以防止在一些异常情况下物联网设备300上异常监测开关301的状态和物联网云平台200中存储的异常监测开关301的状态不一致。另外,通过设置上述预设时间段,还可以在尽量保证物联网设备300上异常监测开关301的状态和物联网云平台200中存储的异常监测开关301的状态一致的情况下,减少物联网设备300上报异常监测开关301的状态的频率,从而节省物联网设备300的软硬件资源。
由图12所示的方法可知,物联网设备300上可包含有物理的异常监测开关301。当异常监测开关301的状态发生变化,物联网云平台200和电子设备100中与该异常监测开关301状态对应的数据均可以发生同步变化。即用户在物联网设备300上开启或者关闭异常监测开关301,物联网云平台200中用于表示异常监测开关301状态的abnormalMonitor字段的值可以发生对应地改变。并且,电子设备100中物联网APP上用于表示异常监测开关301状态的异常监测状态201也可以发生对应地改变。这样,电子设备100、物联网云平台200和物联网设备300这三侧异常监测开关310的状态可以保持一致。
图13A~图13C示例性示出了通过物联网APP来开启异常监测开关的用户界面示意图。
如图13A所示,物联网APP可包含用于对物联网设备300进行相关设置的设置界面。该设置界面可包含有异常监测状态201。由异常监测状态201中的提示语“已关闭”可知,物联网设备300上的异常监测开关301处于关闭状态。响应于作用在异常监测开关201A上的用户操作,电子设备100可以显示如图13B所示的设置界面。
在图13B中,该设置界面可包含有选项框202。该选项框202可用户改变物联网设备300上的异常监测开关301的状态。该选项框202中可包含有开启选项202A和关闭选项202B。响应于作用在开启选项202A的用户操作,电子设备100可以显示如图13C的设置界面。
在图13C中,该设置界面上异常监测状态201的提示语可以变为“已开启”。这可以表示物联网设备300上异常监测开关301处于开启状态。其中,响应于作用在开启选项202A的用户操作,电子设备100还可以向物联网云平台100发送用于开启物联网设备300上异常监测开关301的指令。进一步的,物联网云平台200可以将上述指令发送给物联网设备300。当接收到上述用于开启物联网设备300上异常监测开关301的指令,物联网设备300可以开启异常监测开关。
电子设备100通过物联网APP关闭物联网设备300上异常监测开关301的过程可以与前述实施例相同。
这样,用户就可以通过电子设备100上的物联网APP来控制物联网设备300上异常监测 开关301的状态。
下面结合上述图13A~图13C所示的用户界面示意图,介绍本申请实施例提供的一种电子设备控制物联网设备上异常监测开关的状态的方法。
图14示例性示出了电子设备控制物联网设备上异常监测开关的状态的方法流程图。该方法可包括步骤S201~S205。其中:
S201、电子设备100可以检测到用于开启物联网APP中物联网设备300异常监测开关301的第二用户操作。
物联网设备300中异常监测开关301处于关闭状态。电子设备100和物联网云平台200上用于表示异常监测开关301状态的信息均为关闭状态的信息。
用户可以通过作用在电子设备100上的第二用户操作来开启物联网设备300的异常监测开关301。上述第二用户操作可以例如是上述图13B中作用在开启选项202A的触摸操作。
S202、电子设备100可以通过物联网云平台200向物联网设备300发送用于开启物联网设备300异常监测开关301的指令。
具体的,当检测到上述第二用户操作,电子设备100可以通过物联网云平台200的第二接口,向物联网云平台200发送用于开启异常监测开关301的指令。进一步的,物联网云平台200可以通过第一接口向物联网设备300发送上述用于开启异常监测开关301的指令。
S203、物联网设备300可以开启异常监测开关301。
当接收到用于开启异常监测开关301的指令,物联网设备300可以开启异常监测开关301。具体的,物联网设备300可以将异常监测开关301对应管脚上的电平取反。
S204、物联网设备300可以向物联网云平台200上报异常监测开关301的状态。
S205、物联网云平台200可以保存物联网设备300异常监测开关301的状态。
上述步骤S204和步骤S205的实现过程可以参考前述图12所示的步骤S102和步骤S103,这里不再赘述。
在一种可能的实现方式中,物联网设备300的异常监测功能可以在出厂时就设置为开启。具体的,物联网设备300的可擦除存储模块中存储有异常规则。当物联网设备300向物联网云平台200发送请求或者状态消息,物联网设备300可以根据异常规则来判断上述请求或状态消息是否为异常的请求或异常的状态消息。当物联网设备300接收到物联网云平台200发送的控制指令,物联网设备300可以根据异常规则来判断上述控制指令是否为异常的控制指令。上述进行异常监测的具体过程以及监测到有异常后的处理方法可以参考前述实施例的介绍。也即是说,物联网设备300可以不用设置图3所示的异常监测开关301。
请参见图15,图15为本申请实施例提供的一种在物联网设备300出现异常时的设备异常监测方法。该方法包括如下步骤:
S1501、第一终端向服务器发送第一消息。
该第一终端可以为前述实施例中的物联网设备300。该服务器可以为前述实施例中的物联网云平台200。该第一消息可以是第一终端请求登录服务器的登录请求、第一终端向服务器上报的第一终端的状态消息(如第一终端开启或者关闭的状态、第一终端的耗电量、第一终端配置的传感器所采集到的数据)等等。本申请实施例对第一消息的具体内容不作限定。
S1502、若第一终端检测到在第一单位时间内第一终端向服务器发送第一消息N1次,且 N1大于第一值,则第一终端降低在第一单位时间内向服务器发送第一消息的次数。
下面以该第一消息为登录请求对步骤S1502进行具体说明。
第一终端出现异常,频繁向服务器发送登录请求。其中,第一终端出现上述异常的原因可以参考前述图1A和图1B所示的实施例。
第一终端可存储有用于进行异常监测的异常规则。示例性的,上述异常规则中包含第一异常规则:若第一终端发送登录请求的频率高于30次/分钟,则该发送登录请求的行为是异常行为。也即是说,若第一终端检测到在1分钟内第一终端向服务器发送登录请求的次数高于30次,第一终端可以判断出发送登录请求的行为是异常行为。其中,上述第一单位时间即为1分钟。上述第一值即为30。本申请实施例对上述第一单位时间和上述第一值的具体数值均不作具体限定。上述异常规则可以是第一终端在出厂时预置的。
若第一终端检测到在1分钟内第一终端向服务器发送登录请求的次数高于30次,第一终端可以降低在1分钟内向服务器发送登录请求的次数。即第一终端可以降低向服务器发送登录请求的频率。
具体的,第一终端可以记录每一次发送登录请求的时间。当即将第n次发送登录请求时,第一终端可以判断在当前时刻的前1分钟内发送登录请求的次数是否超过30次。若超过30次,第一终端可以判断出这第n次发送登录请求时异常行为。进一步的,第一终端可以将第n次需要发送的登录请求丢弃。这样,第一终端可以降低向服务器发送登录请求的频率,将在1分钟内发送登录请求的次数控制在30次以内。上述设备异常监测方法可以减少对第一终端和服务器的软硬件资源的浪费。
在一些实施例中,第一终端中存储的异常规则可以由服务器更新。
服务器中包含有风控模块。该风控模块可用于监测第一终端是否出现异常。该风控模块还可以用于根据服务器当前软硬件资源的消耗情况生成上述异常规则。风控模块的具体功能可以参考前述实施例,这里不再赘述。
若服务器的软硬件资源消耗越高,风控模块在生成异常规则时可以将异常规则中的频率设置得越低。这样,第一终端可以根据更新的异常规则将发送第一消息的频率控制在更低的范围内,从而更好地节省第一终端和服务器的软硬件资源。示例性的,风控模块可以生成第二异常规则。该第二异常规则可以为:若第一终端发送登录请求的频率高于20次/分钟,则该发送登录请求的行为是异常行为。服务器可以将第二异常发送给第一终端。第一终端可以将前述第一异常规则更新为第二异常规则。利用第二异常规则进行异常监测,第一终端可以在检测到发送登录请求为异常行为时,降低向服务器发送登录请求的频率,将在1分钟内发送登录请求的次数控制在20次以内。
由上述实施例可以看出,第一终端中用于进行异常监测的异常规则不是固定不变的。上述异常规则可以根据服务器软硬件资源的消耗情况进行适应性更新。这样,可以合理使用第一终端和服务器的软硬件资源,更好地节省第一终端和服务器的软硬件资源。
在一些实施例中,若第一终端检测到在第一单位时间内第一终端向服务器发送第一消息N1次,且N1大于第一值,第二终端,即前述实施例中的电子设备100,可以显示第一终端出现异常的消息通知以及该异常的解决方案等内容。这样,用户可以通过查看第二终端而了解第一终端出现异常,并根据上述解决方案解决第一终端的异常。
另外,若第一终端检测出异常行为,第一终端可以通过语音播报或者显示灯的不同来提示用户第一终端出现异常。这样,用户可以及时知道第一终端出现异常,从而可以根据相关的解决方案来解决第一终端的异常。
在一些实施例中,第一终端上可设置有物理的异常监测开关。例如图3所示的异常监测开关301。响应于作用在异常监测开关301上的用户操作,第一终端可以开启或者关闭异常监测功能。当开启异常监测功能,第一终端可以根据前述实施例中异常监测方法进行异常监测。第一终端还可以将异常监测开关是开启还是关闭的状态发送给服务器。服务器可以存储异常监测开关的状态。这样,第二终端可以通服务器获取该异常监测开关的状态。
通过上述异常监测方法,第一终端(即物联网设备300)可以检测自己是否出现异常。当检测到第一终端向服务器频繁发送异常请求时,第一终端可以降低向服务器发送异常请求的频率。这样,通过减少对第一终端检测出的异常请求的处理,第一终端和服务器可以减少软硬件资源的浪费。并且第一终端降低向服务器发送检测出的异常请求的频率,而不直接停止发送上述异常请求,可以减少由于异常行为误判对第一终端功能实现的影响。
请参见图16,图16为本申请实施例提供的一种在物联网云平台200出现异常时的设备异常监测方法。该方法包括如下步骤:
S1601、第一终端接收来自服务器的第二消息。
该第二消息可以是服务器设置第一终端的状态的控制指令(如开启第一终端、关闭第一终端)、获取第一终端的状态消息的指令等等。本申请实施例对第二消息的具体内容不作限定。
S1602、若第一终端检测到在第一单位时间内第一终端接收到N2次来自服务器的第二消息,且N2大于第一值,则第一终端降低在第一单位时间内响应第二消息的次数。
服务器出现异常,频繁向第一终端发送第二消息。其中,服务器出现异常的场景可以参考前述图2所示的实施例。
第一终端可存储有用于进行异常监测的异常规则。示例性的,上述异常规则中包含第三异常规则:若第一终端接收到服务器发送第二消息的频率高于30次/分钟,则服务器发送该第二消息的行为是异常行为。也即是说,若第一终端检测到在1分钟内接收到来自服务器的第二消息的次数高于30次,第一终端可以判断出服务器发送该第二消息的行为是异常行为。第一终端受到服务器的异常控制。其中,上述第一单位时间即为1分钟。上述第二值即为30。本申请实施例对上述第一单位时间和上述第二值的具体数值均不作限定。
若第一终端检测到在1分钟内接收到来自服务器的第二消息的次数高于30次,第一终端可以降低在1分钟内响应上述第二消息的次数。即第一终端可以降低响应第二消息的频率。
具体的,第一终端可以记录每一次接收到第二消息的时间。当第m次接收到第二消息时,第一终端可以判断在当前时刻的前1分钟内接收到第二消息的次数是否超过30次。若超过30次,第一终端可以判断出这第m次接收到的第二消息为异常的控制指令。进一步的,第一终端可以将这第m次接收到的第二消息丢弃,而不进行响应。这样,第一终端可以降低响应第二消息的频率,将在1分钟内响应第二消息的次数控制在30次以内。上述设备异常方法可以减少对第一终端的软硬件资源的浪费。
在一些实施例中,第一终端中存储的异常规则可以由服务器更新。
服务器中包含有风控模块。该风控模块可用于根据服务器当前软硬件资源的消耗情况生成异常规则。
示例性的,风控模块可以生成第四异常规则。该第四异常规则可以为:若第一终端接收到服务器发送第二消息的频率高于20次/分钟,则服务器发送该第二消息的行为是异常行为。服务器可以将第四异常规则发送给第一终端。第一终端可以将前述第三异常规则更新为第四 异常规则。利用第四异常规则进行异常监测,第一终端可以在检测服务器发送第二消息为异常行为时,降低响应第二消息的频率,将在1分钟响应第二消息的次数控制在20次以内。
通过上述异常监测方法,第一终端(即物联网设备300)可以检测服务器是否出现异常。当检测到第一终端频繁收到服务器的异常控制时,第一终端可以降低响应来自服务器的异常控制的频率。这样,通过减少对异常控制指令响应的频率,第一终端可以减少软硬件资源的浪费。
上述实施例中所用,根据上下文,术语“当…时”可以被解释为意思是“如果…”或“在…后”或“响应于确定…”或“响应于检测到…”。类似地,根据上下文,短语“在确定…时”或“如果检测到(所陈述的条件或事件)”可以被解释为意思是“如果确定…”或“响应于确定…”或“在检测到(所陈述的条件或事件)时”或“响应于检测到(所陈述的条件或事件)”。
在上述实施例中,可以全部或部分地通过软件、硬件、固件或者其任意组合来实现。当使用软件实现时,可以全部或部分地以计算机程序产品的形式实现。所述计算机程序产品包括一个或多个计算机指令。在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一个计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、数字用户线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如DVD)、或者半导体介质(例如固态硬盘)等。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,该流程可以由计算机程序来指令相关的硬件完成,该程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法实施例的流程。而前述的存储介质包括:ROM或随机存储记忆体RAM、磁碟或者光盘等各种可存储程序代码的介质。

Claims (16)

  1. 一种设备异常监测方法,其特征在于,所述方法包括:
    所述第一终端向所述服务器发送第一消息;
    若所述第一终端检测到在第一单位时间内所述第一终端向所述服务器发送所述第一消息N1次,且所述N1大于第一值,则所述第一终端降低在所述第一单位时间内向所述服务器发送所述第一消息的次数;所述N1为正整数;
    或者,
    所述第一终端接收来自所述服务器的第二消息;
    若所述第一终端检测到在所述第一单位时间内所述第一终端接收到N2次来自所述服务器的所述第二消息,且所述N2大于第二值,则所述第一终端降低在所述第一单位时间内响应所述第二消息的次数;所述N2为正整数。
  2. 根据权利要求1所述的方法,其特征在于,所述第一消息包含登录请求和/或所述第一终端的状态消息;所述第二消息包含第一任务的指示信息。
  3. 根据权利要求2所述的方法,其特征在于,所述第一终端响应所述第二消息包括所述第一终端根据所述第一任务的指示信息执行所述第一任务;其中,所述第一任务包括设置所述第一终端的状态和/或向所述服务器发送所述第一终端的状态消息。
  4. 根据权利要求3所述的方法,其特征在于,所述设置所述第一终端的状态包括以下一项或多项:开启所述第一终端并使得所述第一终端播放音频,关闭所述第一终端、调节所述第一终端的音量、切换所述第一终端播放的音频、暂停所述第一终端播放的音频。
  5. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一值和所述第二值是所述第一终端预置的;或者,
    所述第一值和所述第二值是所述服务器发送给所述第一终端的。
  6. 根据权利要求1-4中任一项所述的方法,其特征在于,所述第一终端存储有第三值和第四值,所述第三值用于所述第一终端检测在所述第一单位时间内所述第一终端向所述服务器发送所述第一消息的次数是否超过所述第三值,所述第四值用于所述第一终端检测在所述第一单位时间内所述第一终端接收来自所述服务器的所述第二消息的次数是否超过所述第四值;其中,所述第三值和所述第四值是所述第一终端预置的,或者,所述第三值和所述第四值是所述服务器发送给所述第一终端的;
    所述方法还包括:
    若所述服务器检测到在所述第一单位时间内所述服务器接收到N1次来自所述第一终端的所述第一消息,且所述N1大于第一值,则所述第一终端接收到来自所述服务器的所述第一值,并将所述第三值更新为所述第一值;所述第一值是所述服务器生成的;
    若所述服务器检测到在所述第一单位时间内所述服务器向所述第一终端发送N2次所述第二消息,且所述N2大于第二值,则所述第一终端接收到来自所述服务器的所述第二值, 并将所述第四值更新为所述第二值;所述第二值是所述服务器生成的。
  7. 根据权利要求1-6中任一项所述的方法,其特征在于,所述方法还包括:
    若所述第一终端在所述第一单位时间内向所述服务器发送所述第一消息N1次,且所述N1大于所述第一值,所述第一终端异常的类型和/或所述第一终端异常的解决方案显示在第二终端;
    或者,
    若所述第一终端在所述第一单位时间内接收到N2次来自所述服务器的所述第二消息,且所述N2大于所述第二值,所述第一终端收到的异常控制的类型和/或所述第一终端收到的异常控制的解决方案显示在所述第二终端;
    其中,所述第二终端用于通过所述服务器设置所述第一终端的状态以及获取所述第一终端的状态消息,所述服务器上存储有与所述第二终端映射的一个或多个终端的标识符,所述一个或多个终端包含所述第一终端。
  8. 一种设备异常监测方法,其特征在于,所述方法包括:
    服务器接收来自第一终端的第一消息;
    所述服务器生成第一值;
    若所述服务器检测到在所述第一单位时间内所述服务器接收到N1次来自所述第一终端的所述第一消息,且所述N1大于所述第一值,则所述服务器将所述第一值发送给所述第一终端;所述第一值用于所述第一终端判断在所述第一单位时间内向所述服务器发送所述第一消息的次数是否超过所述第一值;所述N1为正整数;
    或者,
    所述服务器向所述第一终端发送第二消息;
    所述服务器生成第二值;
    若所述服务器检测到在所述第一单位时间内所述服务器向所述第一终端发送N2次所述第二消息,且所述N2大于所述第二值,则所述服务器将所述第二值发送给所述第一终端;所述第二值用于所述第一终端判断在所述第一单位时间内接收到来自所述服务器的所述第二消息的次数是否超过所述第二值;所述N2为正整数。
  9. 根据权利要求8所述的方法,其特征在于,所述第一消息包含登录请求和/或所述第一终端的状态消息;所述第二消息包含第一任务的指示信息。
  10. 根据权利要求9所述的方法,其特征在于,所述第一任务包括设置所述第一终端的状态和/或向所述服务器发送所述第一终端的状态消息。
  11. 根据权利要求8-10中任一项所述的方法,其特征在于,所述方法还包括:
    所述服务器接收来自所述第一终端的所述第一消息;
    所述服务器生成所述第三值;所述第三值小于所述第一值;
    若所述服务器检测到在所述第一单位时间内所述服务器接收到N3次来自所述第一终端的所述第一消息,且所述N3大于所述第三值,则所述服务器将所述第三值发送给所述第一终端;所述第三值用于更新所述第一终端存储的所述第一值;所述N3为正整数;
    或者,
    所述服务器向所述第一终端发送所述第二消息;
    所述服务器生成第四值;所述第四值小于所述第二值;
    若所述服务器检测到在所述第一单位时间内所述服务器向所述第一终端发送N4次所述第二消息且所述N4大于所述第四值,则所述服务器将所述第四值发送给所述第一终端;所述第二值用于更新所述第一终端存储的所述第二值;所述N4为正整数。
  12. 根据权利要求8-11中任一项所述的方法,其特征在于,所述服务器上存储有与第二终端映射的一个或多个终端的标识符,所述一个或多个终端包含所述第一终端,所述第二终端用于通过所述服务器设置所述第一终端的状态以及获取所述第一终端的状态消息,所述方法还包括:
    若所述服务器检测到在所述第一单位时间内所述服务器接收到N1次来自所述第一终端的所述第一消息,且所述N1大于所述第一值,则所述服务器向所述第二终端发送第三消息;所述第三消息的指示内容显示在所述第二终端,所述第三消息的指示内容包括所述第一终端异常的类型和/或所述第一终端异常的解决方案;
    或者,
    若所述服务器检测到在所述第一单位时间内所述服务器向所述第一终端发送N2次所述第二消息,且所述N2大于所述第二值,则所述服务器向所述第二终端发送第四消息;所述第四消息的指示内容显示在所述第二终端,所述第四消息的指示内容包括所述第一终端收到的异常控制的类型和/或所述第一终端收到的异常控制的解决方案。
  13. 根据权利要求11所述的方法,其特征在于,所述服务器上存储有与第二终端映射的一个或多个终端的标识符,所述一个或多个终端包含所述第一终端,所述第二终端用于通过所述服务器设置所述第一终端的状态以及获取所述第一终端的状态消息,所述方法还包括:
    若所述服务器检测到在所述第一单位时间内所述服务器接收到N3次来自所述第一终端的所述第一消息,且所述N3大于所述第三值,则所述服务器向所述第二终端发送第三消息;所述第三消息的指示内容显示在所述第二终端,所述第三消息的指示内容包括所述第一终端异常的类型和/或所述第一终端异常的解决方案;
    或者,
    若所述服务器检测到在所述第一单位时间内所述服务器向所述第一终端发送N4次所述第二消息,且所述N4大于所述第四值,则所述服务器向所述第二终端发送第四消息;所述第四消息的指示内容显示在所述第二终端,所述第四消息的指示内容包括所述第一终端收到的异常控制的类型和/或所述第一终端收到的异常控制的解决方案。
  14. 一种终端,其特征在于,包括:通信模块、存储器和处理器;
    所述通信模块用于与服务器建立通信连接;
    所述存储器用于存储计算机程序;
    所述处理器用于调用所述计算机程序,使得所述终端执行如权利要求1-7中任一项所述的方法。
  15. 一种服务器,其特征在于,包括:通信模块、存储器和处理器;
    所述通信模块用于与终端建立通信连接;
    所述存储器用于存储计算机程序;
    所述处理器用于调用所述计算机程序,使得所述服务器执行如权利要求8-13中任一项所述的方法。
  16. 一种计算机可读存储介质,包括指令,其特征在于,当所述指令在所述终端上运行,使得所述终端执行如权利要求1-7中任一项所述的方法。
PCT/CN2021/117990 2020-09-30 2021-09-13 设备异常监测方法及设备 WO2022068564A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP21874225.2A EP4210289A4 (en) 2020-09-30 2021-09-13 METHOD AND DEVICE FOR MONITORING DEVICE ANOMALIES
US18/247,140 US20230379234A1 (en) 2020-09-30 2021-09-13 Device Anomaly Monitoring Method and Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011063323.7A CN114363220A (zh) 2020-09-30 2020-09-30 设备异常监测方法及设备
CN202011063323.7 2020-09-30

Publications (1)

Publication Number Publication Date
WO2022068564A1 true WO2022068564A1 (zh) 2022-04-07

Family

ID=80949655

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/117990 WO2022068564A1 (zh) 2020-09-30 2021-09-13 设备异常监测方法及设备

Country Status (4)

Country Link
US (1) US20230379234A1 (zh)
EP (1) EP4210289A4 (zh)
CN (1) CN114363220A (zh)
WO (1) WO2022068564A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115002148A (zh) * 2022-04-21 2022-09-02 浪潮云信息技术股份公司 一种物联网云边通信方法及系统

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170168885A1 (en) * 2015-12-09 2017-06-15 Hcl Technologies Limited System and Method for Testing Internet of Things Network
CN108616429A (zh) * 2018-05-14 2018-10-02 平安科技(深圳)有限公司 一种推送服务的重连方法及设备
CN109299135A (zh) * 2018-11-26 2019-02-01 平安科技(深圳)有限公司 基于识别模型的异常查询识别方法、识别设备及介质
CN110113350A (zh) * 2019-05-15 2019-08-09 四川长虹电器股份有限公司 一种物联网系统安全威胁监测与防御系统及方法
CN111200799A (zh) * 2018-11-20 2020-05-26 华为技术有限公司 一种车联网的异常行为检测方法、装置和系统

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102143552A (zh) * 2010-11-24 2011-08-03 华为技术有限公司 接入处理方法、基站和终端
EP3180944B1 (en) * 2014-08-11 2018-10-24 Telefonaktiebolaget LM Ericsson (publ) Access controlling of abnormal terminal devices

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170168885A1 (en) * 2015-12-09 2017-06-15 Hcl Technologies Limited System and Method for Testing Internet of Things Network
CN108616429A (zh) * 2018-05-14 2018-10-02 平安科技(深圳)有限公司 一种推送服务的重连方法及设备
CN111200799A (zh) * 2018-11-20 2020-05-26 华为技术有限公司 一种车联网的异常行为检测方法、装置和系统
CN109299135A (zh) * 2018-11-26 2019-02-01 平安科技(深圳)有限公司 基于识别模型的异常查询识别方法、识别设备及介质
CN110113350A (zh) * 2019-05-15 2019-08-09 四川长虹电器股份有限公司 一种物联网系统安全威胁监测与防御系统及方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4210289A4

Also Published As

Publication number Publication date
CN114363220A (zh) 2022-04-15
EP4210289A4 (en) 2024-02-28
EP4210289A1 (en) 2023-07-12
US20230379234A1 (en) 2023-11-23

Similar Documents

Publication Publication Date Title
AU2021269359B2 (en) Display method and apparatus
US11012260B2 (en) Methods, systems, and devices for managing client devices using a virtual anchor manager
JP2022501920A (ja) サイドリンクのリンク障害検出方法及び端末
CN107786424B (zh) 音视频通信方法、终端及服务器
US9763126B2 (en) Electronic device and method for processing packet in internet protocol-based network
WO2022068564A1 (zh) 设备异常监测方法及设备
US20220334543A1 (en) Smart device control system, method, and apparatus, smart gateway, and storage medium
CN112671897A (zh) 分布式系统的访问方法、装置、存储介质、设备和产品
CN103575053A (zh) 一种远程操作酒柜的方法
CN113064384A (zh) 智能家电、云端服务器以及进行异常监控的方法
CN105306244B (zh) 路由器管理方法、系统及设备
CN112997507B (zh) 音频系统控制方法、装置、终端和计算机可读存储介质
WO2017166093A1 (zh) 前置系统
WO2019237954A1 (zh) 网络连接方法、装置、可读存储介质及智能终端
CN115118636A (zh) 网络抖动状态的确定方法、装置、电子设备及存储介质
US11954996B2 (en) System and method for improving network connection reliability of IoT tracking and emergency response devices
CN112667868A (zh) 一种数据检测方法以及装置
WO2017166095A1 (zh) 服务器前置方法
WO2017166094A1 (zh) 服务器前置方法
US12010600B2 (en) Method, device, and server for emergency communication
CN113132195B (zh) 智能家居的控制方法及控制网关
CN114358915A (zh) 基于微服务架构的业务处理方法和系统
CN117453484A (zh) 一种缓存中间件服务集群的管理方法、装置、设备及介质
CN106888315A (zh) 以智能手机管理分散式行动电子装置的方法及系统
CN118174978A (zh) 家电设备的控制方法、装置及系统

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2021874225

Country of ref document: EP

Effective date: 20230406

NENP Non-entry into the national phase

Ref country code: DE