WO2020173375A1 - Multi-intelligent device linkage control method, device and system - Google Patents

Multi-intelligent device linkage control method, device and system Download PDF

Info

Publication number
WO2020173375A1
WO2020173375A1 PCT/CN2020/075982 CN2020075982W WO2020173375A1 WO 2020173375 A1 WO2020173375 A1 WO 2020173375A1 CN 2020075982 W CN2020075982 W CN 2020075982W WO 2020173375 A1 WO2020173375 A1 WO 2020173375A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
event
rule
execution
conditional
Prior art date
Application number
PCT/CN2020/075982
Other languages
French (fr)
Chinese (zh)
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 华为技术有限公司
Publication of WO2020173375A1 publication Critical patent/WO2020173375A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2807Exchanging configuration information on appliance services in a home automation network
    • H04L12/2814Exchanging control software or macros for controlling appliance services in a home automation network
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B15/00Systems controlled by a computer
    • G05B15/02Systems controlled by a computer electric
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B19/00Programme-control systems
    • G05B19/02Programme-control systems electric
    • G05B19/418Total factory control, i.e. centrally controlling a plurality of machines, e.g. direct or distributed numerical control [DNC], flexible manufacturing systems [FMS], integrated manufacturing systems [IMS] or computer integrated manufacturing [CIM]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/2803Home automation networks
    • H04L12/2816Controlling appliance services of a home automation network by calling their functionalities
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05BCONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
    • G05B2219/00Program-control systems
    • G05B2219/20Pc systems
    • G05B2219/26Pc applications
    • G05B2219/2642Domotique, domestic, home control, automation, smart house
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02PCLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
    • Y02P90/00Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
    • Y02P90/02Total factory control, e.g. smart factories, flexible manufacturing systems [FMS] or integrated manufacturing systems [IMS]

Definitions

  • This application relates to the field of communication technologies, and in particular, to a method, device, and system for linkage control of multiple smart devices. Background technique
  • Smart home uses the Internet of Things technology to integrate various electronic devices in the home (such as audio and video equipment, lighting systems, curtain control, air conditioning control, security systems, digital cinema systems, audio and video servers) , Video cabinet system, network home appliances, etc.) are connected together to provide home appliance control, lighting control, telephone remote control, indoor and outdoor remote control, anti-theft alarm, environmental monitoring, HVAC control, infrared forwarding and programmable timing control and other functions.
  • each electronic device is based on I FTTT (abbreviation for i f th i s then t hat) rules for linkage and control between devices.
  • I FTTT abbreviation for i f th i s then t hat
  • th i s can be regarded as a triggering condition
  • tha t can be regarded as an execution operation or execution event of the device.
  • the smart door lock recognizes that the person at the door has passed the biometric authentication (trigger condition)
  • the door opens automatically (execution event).
  • the air conditioner will automatically start (execution event).
  • control equipment collects trigger conditions, and then sends execution commands to the equipment that needs linkage based on the trigger conditions.
  • a control device needs to obtain all trigger conditions in an IFTTT rule from some devices (can be called conditional devices), and then send operation instructions to other devices (can become execution devices) to instruct these execution devices to execute the corresponding Operation.
  • the linkage between the condition device and the execution device relies too much on the control device.
  • the control device disconnects, the linkage of all I FTTT rules in the network will fail. It can be seen that the efficiency and stability of linkage between conditional equipment and execution equipment need to be improved.
  • the method, device, and system for linkage control of multiple smart devices provided in the present application can get rid of the dependence on the control device in the linkage control of multiple electronic devices, which is beneficial to reduce the delay of linkage and improve linkage efficiency.
  • a method for linkage control of multiple electronic devices includes:
  • the first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device executes the first function; the first electronic device sends a message to the second electronic device according to the first rule A subscription message for an event; the first electronic device receives the notification message of the first event sent by the second electronic device; in response to the received notification message of the first event, the first electronic device performs the first function according to the first rule.
  • the first electronic device is an execution device, and the first function is an execution event in the first rule.
  • the second electronic device is a conditional device, and the first event is a trigger event or trigger condition corresponding to the second electronic device in the first rule.
  • the execution device directly obtains the first rule, and subscribes the trigger event to the condition device, and more trigger events When it happens, the execution device directly executes the corresponding execution event. It can be seen that in the process of the linkage between the execution equipment and the condition equipment, no other control equipment is relied on, and the efficiency of the linkage can be improved.
  • the method further includes: the first electronic device acquires a second rule, where the second rule indicates that when a second event occurs on the third electronic device and the fourth electronic device sends the third event, then the first The electronic device performs the second function; the first electronic device sends a subscription message for the second event to the third electronic device according to the second rule; the first electronic device receives the notification message of the second event sent by the third electronic device; An electronic device acquires whether the third event occurs on the fourth electronic device; in response to acquiring the third event on the fourth electronic device, the first electronic device executes the second function according to the second rule.
  • the first electronic device is an execution device
  • the second function is an execution event in the second rule.
  • the third electronic device and the fourth electronic device are conditional devices.
  • the second event is a trigger event or trigger condition corresponding to the third electronic device in the second rule.
  • the third event is a trigger event or trigger condition corresponding to the fourth electronic device in the second rule.
  • the executing device obtains the IFTTT rules in advance. After a trigger event occurs on the conditional device in the IFTTT rule, the executing device can be notified directly through the local network, and the executing device can also directly query the trigger events of other conditional devices through the local network . When the trigger conditions of all the conditional devices meet the IFTTT rules, the executing device can execute the corresponding event, that is, complete the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of the corresponding event by the executing device is completed in the local network.
  • the application can still complete the linkage of multiple electronic devices on the local network, which improves the success rate of linkage and improves the stability of the linkage system.
  • multiple electronic devices in the local network communicate directly during the linkage process, instead of using the Internet, it is beneficial to reduce the communication delay and improve the efficiency of linkage.
  • avoiding uploading the status of each electronic device in the local network and the execution of the IFTTT rules to the Internet is beneficial to avoid security risks.
  • the executing device in the IFTTT rules communicates directly with other conditional devices in the IFTTT rules, and no other intermediate devices are used for transfer and control, that is, it does not pass the IFTTT rules.
  • Other devices that are irrelevant to the rules such as gateways
  • the method provided by the embodiment of the present application allows multiple electronic devices in the local network to get rid of the dependence on the control device when the multiple electronic devices in the local network are linked, which is beneficial to reduce the time delay of the linkage and improve the linkage efficiency.
  • the first electronic device in response to acquiring that the third event occurs in the fourth electronic device, executes the second function according to the second rule, specifically: in response to the first electronic device receiving a message sent by the fourth electronic device When the notification message of the third event has occurred, the first electronic device performs the second function according to the second rule. Therefore, this application provides a method for other conditional devices to actively send to the executing device a notification message of whether a trigger event has occurred.
  • the method before the first electronic device receives the notification message that the third event has occurred sent by the fourth electronic device, the method further includes: responding to receiving the notification of the second event sent by the third electronic device Message, the first electronic device sends a message inquiring whether the third event occurs to the fourth electronic device. Therefore, the present application provides a method for an execution device to query other conditional devices for a notification message whether a trigger event occurs.
  • the method further includes: the first electronic device obtains the address of the third electronic device and the address of the fourth electronic device according to the second rule.
  • the second rule includes the identity of the third electronic device and the identity of the fourth electronic device; the first electronic device obtains the address of the third electronic device and the address of the fourth electronic device according to the second rule, Specifically: the first electronic device multicasts or broadcasts a first message, the first message includes the identity of the third electronic device and the identity of the fourth electronic device; the first electronic device receives the address of the third electronic device returned by the third electronic device ; The electronic device receives the address of the fourth electronic device returned by the fourth electronic device.
  • This application provides a method for an execution device to obtain the network address of each conditional device.
  • the method further includes: the first electronic device detects the legality and integrity of the second rule.
  • obtaining the second rule by the first electronic device includes: obtaining the second rule by the first electronic device from the server or the fifth electronic device.
  • this application provides a method for linkage control of multiple electronic devices, the method including:
  • the first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the first electronic device and a second event occurs in the second electronic device, the third electronic device performs the first function; the first electronic device receives the first event 2.
  • the first electronic device and the second electronic device are conditional devices in the first rule, and the first event is a trigger event or trigger condition corresponding to the first electronic device.
  • the second event is a trigger event or trigger condition corresponding to the second electronic device.
  • the third electronic device is an execution device, and the first function is an execution event corresponding to the third electronic device in the first rule.
  • the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule, such as the execution device. After a trigger event occurs on one or some conditional devices in the IFTTT rule, other conditional devices can be notified directly through the local network. After the other conditional device determines that it meets the IFTTT rules, it instructs the executing device to execute the corresponding event, that is, complete the linkage, which improves the linkage efficiency.
  • this application provides a method for linkage control of multiple electronic devices, the method including:
  • the first electronic device acquires the first rule, where the first rule indicates that when the first event occurs in the first electronic device and the second event occurs in the second electronic device, the third electronic device executes the first function; the first electronic device detects that it has A first event occurs; in response to detecting that the first event has occurred, the first electronic device sends a message to the second electronic device to query whether the second event has occurred; the first electronic device receives the second event sent by the second electronic device A notification message that has occurred; in response to the received notification message that the second event has occurred, the first electronic device sends an execution instruction to the third electronic device, and the execution instruction instructs the third electronic device to perform the first function.
  • the first electronic device and the second electronic device are conditional devices in the first rule, and the first event is a trigger event or trigger condition corresponding to the first electronic device.
  • the second event is a trigger event or trigger condition corresponding to the second electronic device.
  • the third electronic device is an execution device, and the first function is an execution event corresponding to the third electronic device in the first rule.
  • the executing device and some conditional devices obtain the IFTTT rules in advance, and discover other electronic devices in the IFTTT rules, such as other conditional devices.
  • the trigger event of other condition devices can be queried, or the executing device can be notified, and the executing device condition device can query the trigger event of other condition devices.
  • the execution device executes the corresponding event, which completes the linkage and improves the linkage efficiency.
  • a system for linkage control of multiple electronic devices includes a first electronic device and a second electronic device; the first electronic device is used to obtain a first rule, and the first rule indicates when the second electronic device When the first event occurs, the first electronic device executes the first function; according to the first rule, sends a subscription message for the first event to the second electronic device; and the second electronic device is used when detecting that the first event has occurred Send a notification message of the first event to the first electronic device; the first electronic device is further configured to perform the first function according to the first rule in response to the received notification message of the first event.
  • the system further includes a third electronic device and a fourth electronic device.
  • the first electronic device is also used to obtain a second rule, and the second rule indicates when a second event occurs on the third electronic device, and
  • the fourth electronic device sends the third event
  • the first electronic device executes the second function; according to the second rule, sends a subscription message for the second event to the third electronic device; and the third electronic device is used when it is detected
  • the first electronic device is also used to determine whether a third event has occurred in the fourth electronic device; in response to determining that the third event has occurred in the fourth electronic device, the second function is executed according to the second rule.
  • a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes.
  • the computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
  • a first rule where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device performs the first function; according to the first rule, sends a subscription message for the first event to the second electronic device; 2.
  • the first electronic device also obtains a second rule, and the second rule indicates that when a second event occurs on the third electronic device and the fourth electronic device sends the third event, the first electronic device executes Second function; Send a subscription message for the second event to the third electronic device according to the second rule; Receive a notification message for the second event sent by the third electronic device; Obtain whether the third event has occurred on the fourth electronic device; Response Upon acquiring that the third event occurs in the fourth electronic device, the second function is executed according to the second rule.
  • executing the second function according to the second rule is specifically: in response to receiving a notification message sent by the fourth electronic device that the third event has occurred , Perform the second function according to the second rule.
  • the first electronic device when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations:
  • the first electronic device In response to receiving the notification message of the second event sent by the third electronic device, the first electronic device sends a message inquiring whether the third event has occurred to the fourth electronic device.
  • the first electronic device when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations: Acquire the address of the third electronic device and the address of the fourth electronic device according to the second rule.
  • the second rule includes the identification of the third electronic device and the identification of the fourth electronic device; according to the second rule, obtaining the address of the third electronic device and the address of the fourth electronic device specifically includes: Broadcast or broadcast the first message, the first message includes the identification of the third electronic device and the identification of the fourth electronic device; receiving the address of the third electronic device returned by the third electronic device; the electronic device receiving the fourth electronic device returned by the fourth electronic device The address of the electronic device.
  • the first electronic device when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations: detecting the legality and/or integrity of the second rule.
  • obtaining the second rule specifically includes: obtaining the second rule from the server or the fifth electronic device.
  • a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes.
  • the computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
  • the third electronic device performs the first function
  • the second event sent by the second electronic device is received Notification message that has occurred
  • detect whether the first event has occurred if it is detected that the first event has occurred, send an execution instruction to the third electronic device, and the execution instruction instruction Three electronic devices perform the first function.
  • a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes.
  • the computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
  • the first rule indicates that when a first event occurs on the first electronic device, and a second event occurs on the second electronic device
  • the third electronic device executes the first function; detects that the first event has occurred; in response to detecting that the first event has occurred, sends a message to the second electronic device to query whether the second event has occurred; receives the second electronic device A notification message sent by the device that the second event has occurred; in response to the received notification message that the second event has occurred, an execution instruction is sent to the third electronic device, and the execution instruction instructs the third electronic device to perform the first function.
  • a computer storage medium includes computer instructions, and when the computer instructions run on a terminal, the terminal is caused to execute the method described in the first aspect to the third aspect and any one of the possible implementation manners thereof.
  • a ninth aspect a computer program product, when the computer program product runs on a computer, causes the computer to execute the method described in the first aspect to the third aspect and any one of the possible implementation manners.
  • FIG. 1 is a schematic structural diagram of a system for linkage control of multiple electronic devices according to an embodiment of the application
  • 2A is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of this application.
  • 2B is a schematic diagram of the software structure of an electronic device provided by an embodiment of this application.
  • FIG. 3A is a schematic diagram of an interface of an electronic device provided by an embodiment of this application.
  • FIG. 3B is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3C is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3D is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3E is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3F is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3G is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • FIG. 3H is a schematic diagram of an interface of another electronic device provided by an embodiment of the application.
  • FIG. 31 is a schematic diagram of an interface of another electronic device provided by an embodiment of this application.
  • 4A is a schematic flowchart of a method for linkage control of multiple electronic devices according to an embodiment of the application
  • FIG. 4B is a schematic flowchart of another method for linkage control of multiple electronic devices according to an embodiment of this application
  • FIG. 5A is a schematic flowchart of another method for linkage control of multiple electronic devices according to an embodiment of this application
  • FIG. 6A is a schematic flowchart of another method for linkage control of multiple electronic devices provided by an embodiment of the application
  • FIG. 6B is provided by an embodiment of the application
  • FIG. 7 is a schematic structural diagram of another electronic device according to an embodiment of the application;
  • FIG. 8 is a schematic structural diagram of yet another electronic device provided by an embodiment of the application.
  • first and second are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two.
  • IFTTT rule short for if this then that, its purpose is Put the internet to work for you. It can be simply understood that if a certain event is triggered, another set event is executed. That is, if full When the trigger condition in the IFTTT rule is satisfied, the corresponding operation in the IFTTT rule is executed.
  • the above trigger conditions can also be referred to as trigger events. If device A performs a certain operation or certain operations in the IFTTT rule, or a parameter detected by device A meets certain conditions or certain conditions, then device B performs the corresponding operation, then A device can be called a conditional device, and a B device can be called an execution device.
  • the number of conditional devices may be one or more, and the number of execution devices may be one or more, which is not limited in the embodiment of the present application.
  • An IFTTT rule is: If device A performs a certain operation (or the parameters detected by device A meets certain conditions), and device C performs a certain operation (or device C The detected parameter satisfies one or some conditions), then the B device executes the corresponding operation.
  • device A and device C are both conditional devices, and device B is the execution device.
  • Another IFTTT rule is: If device A performs a certain operation (or the parameters detected by device A meets certain conditions), device B performs the corresponding operation, and device JLD performs the corresponding operation operating.
  • a device conditional device, B device and D device are execution devices.
  • the executing device may automatically perform corresponding operations according to, for example, the local time.
  • multiple electronic device linkage processes based on IFTTT rules are all based on a centralized control scheme. For example: When a trigger event of a conditional device occurs, the trigger event will be transmitted to the control device via the Internet. After the control device makes a logical judgment, the execution command is sent to the execution device via the Internet, and then the execution device executes the corresponding operation. Since multiple electronic devices need to communicate via the Internet, the linkage process will inevitably be affected by the connection status of the Internet, resulting in a prolonged and unstable situation. In addition, multiple electronic devices can be the user's household equipment. The status of the household equipment and the implementation of the IFTTT rules are uploaded to the Internet. Once the information is leaked, there is a great security risk.
  • a control method provided by an embodiment of the present application can be used for linkage control between at least two electronic devices.
  • each electronic device can directly communicate through a local connection to complete the linkage. That is to say, during the linkage process of at least two electronic devices, the centralized control method in the prior art is no longer used, that is, it is no longer necessary to transfer through the control device.
  • a system for linkage of multiple electronic devices includes: an electronic device 10 (electronic device A), a server 11, and one or more electronic devices 12 ( Electronic device BX Wherein, the electronic device 10 (electronic device A) is used to provide an interactive interface between the system and the user, so that the user can set IFTTT rules. In some embodiments, the electronic device 10 (electronic device A) will set the IFTTT The rules are delivered to the electronic device 12 (electronic device B) in the local network through the server 11.
  • the electronic device 10 (electronic device A) can also be established with the electronic device 12 (electronic device B) in the local network Local connection, then, the electronic device 10 (electronic device A) may also send the set IFTTT rules to the electronic device 12 (electronic device B) through the local connection, which is not limited in the embodiment of the present application.
  • the electronic device 12 (electronic device B) of the local network may perform linkage between multiple electronic devices 12 (electronic device B) of the local network based on the obtained IFTTT rule.
  • the electronic device 10 may be a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, Wearable electronic devices, Augmented Reality (AR) devices, smart speakers Wait.
  • PC personal computer
  • PDA personal digital assistant
  • AR Augmented Reality
  • the electronic device 10 can establish a connection with the server 11 through a wired, WIFI, mobile data network or other connection methods.
  • the structure of the electronic device 10 (electronic device A) in the embodiment of the present application can refer to the structure of the electronic device 100 shown in FIG. 2A and the schematic diagram of the software structure of the electronic device 100 shown in FIG. 2B.
  • the electronic device 12 may be a hardware device of a smart home, and may include mobile terminals, household appliances, and sensor devices.
  • Electronic device 12 can be smart phones, smart TVs, smart lights, smart sockets, air purifiers, humidifiers, smart range hoods, smart desk lamps, smart speakers, smart door locks, smart patch panels, Smart induction cooker, smart camera, etc.
  • electronic device 12 can also be a smoke sensor (used to detect whether there is a gas leak in the room), a human sensor (used to sense whether a human body passes through), a temperature sensor (used to detect the room or objects The temperature value of the room), humidity sensor (used to detect the humidity value of the room), door and window sensors (used to sense whether doors and windows are open or closed), PM2.5 air sensor (used to detect the value of PM2.5 in the room), etc.
  • a smoke sensor used to detect whether there is a gas leak in the room
  • a human sensor used to sense whether a human body passes through
  • a temperature sensor used to detect the room or objects The temperature value of the room
  • humidity sensor used to detect the humidity value of the room
  • door and window sensors used to sense whether doors and windows are open or closed
  • PM2.5 air sensor used to detect the value of PM2.5 in the room
  • the electronic device 12 in the local network can establish a connection with the server 11 through wired, WIFI, mobile data network or other connection methods, or establish a connection with the server 11 through a router in the local area network.
  • the server 11 can be a home cloud, IoT (Internet of Things, Internet of Things) server or a server cluster, which can connect various electrical and electronic equipment in the home for unified management, remote monitoring and resource sharing, etc., to achieve Efficient and convenient living environment.
  • all the electronic devices 12 (electronic device B) in the local network can be connected to the server 11, or some of the electronic devices 12 (electronic device B) (electronic devices 12 (electronic devices that need to obtain IFTTT rules) Device B)) Establish a connection with the server 11, which is not specifically limited in the embodiment of this application.
  • the electronic devices 12 (electronic device B) in the local network can be connected in a wired or wireless manner, so that the electronic devices 12 (electronic device B) can communicate directly.
  • the wireless connection mode may be any one or several modes such as Bluetooth, ZigBee (ZigBee), and WiFi.
  • the embodiment of the present application does not limit the connection mode between the electronic devices 12 (electronic device B) in the local network.
  • the electronic device 12 (electronic device B) in the embodiment of the present application, reference may be made to the structure of the electronic device 100 shown in FIG. 2A and the schematic diagram of the software structure of the electronic device 100 shown in FIG. 2B. It should be noted that the electronic device 12 (electronic device B) may include more or fewer components than shown in the figure, or combine some components, or split some components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
  • the electronic device 12 when the electronic device 12 (electronic device B) is a smart door lock, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, a fingerprint sensor 180H, and a wireless communication module 160 (for example, it may be a WLAN communication module). ), battery 142, electric switch and other components.
  • the electronic device 12 when the electronic device 12 (electronic device B) is a smart speaker, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, a microphone (for example, a microphone 170C), and a wireless communication module 160 (for example, may include WLAN communication module, Bluetooth communication module, etc.), power management module 141, charging management module 140, battery 142, USB interface 130, indicator 192 and other components.
  • the electronic device 12 when the electronic device 12 (electronic device B) is an air conditioner, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, and a wireless communication module 160 (for example, it may include a WLAN communication module, an infrared signal module, etc.) ), power management module 141, charge management module 140, refrigeration system, ventilation system, electrical control system, cabinet system and other components.
  • a wireless communication module 160 for example, it may include a WLAN communication module, an infrared signal module, etc.
  • FIG. 2A shows a schematic structural diagram of the electronic device 100.
  • the electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2.
  • Mobile communication module 150 wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc.
  • SIM Subscriber identification module
  • the sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
  • the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100.
  • the electronic device 100 may include more or fewer components than shown, or combine certain components, or disassemble certain components, or arrange different components.
  • the components shown in the figure can be implemented in hardware, software or a combination of software and hardware.
  • the processor 110 may include one or more processing units.
  • the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
  • AP application processor
  • modem processor modem processor
  • GPU graphics processing unit
  • image signal processor image signal processor
  • ISP image signal processor
  • controller memory
  • video codec digital signal processor
  • DSP digital signal processor
  • NPU neural-network processing unit
  • the different processing units may be independent devices or integrated in one or more processors.
  • the controller can be the nerve center and command center of the electronic device 100.
  • the controller can generate operation control signals according to the command operation code and timing signals to complete the control of fetching and executing commands.
  • a memory may also be provided in the processor 110 to store instructions and data.
  • the memory in the processor 110 is a cache memory.
  • the memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
  • the processor 110 may include one or more interfaces.
  • the interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface.
  • I2C integrated circuit
  • I2S integrated circuit sound
  • PCM pulse code modulation
  • UART universal asynchronous transmitter
  • MIPI mobile industry processor interface
  • GPIO general-purpose input/output
  • SIM subscriber identity module
  • USB universal serial bus
  • the I2C interface is a two-way synchronous serial bus that includes a serial data line (SDA) and a derail clock line (SCL).
  • the processor 110 may include multiple sets of I2C buses.
  • the processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces.
  • the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100.
  • the I2S interface can be used for audio communication.
  • the processor 110 may include multiple sets of I2S buses.
  • the processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
  • the PCM interface can also be used for audio communication to sample, quantize and encode analog signals.
  • audio The module 170 and the wireless communication module 160 may be coupled through a PCM bus interface.
  • the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
  • the UART interface is a universal serial data bus used for asynchronous communication.
  • the bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication.
  • the UART interface is generally used to connect the processor 110 and the wireless communication module 160.
  • the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function.
  • the audio module 170 may transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
  • the MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices.
  • MIPI interface includes camera serial interface (CSI), display serial interface (DSI) and so on.
  • the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100.
  • the processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
  • the GPIO interface can be configured through software.
  • the GPIO interface can be configured as a control signal or as a data signal.
  • the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on.
  • the GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
  • the USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on.
  • the USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
  • the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely illustrative, and does not constitute a structural limitation of the electronic device 100.
  • the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
  • the charging management module 140 is used to receive charging input from the charger.
  • the charger can be a wireless charger or a wired charger.
  • the charging management module 140 may receive the charging input of the wired charger through the USB interface 130.
  • the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, the power management module 141 can also supply power to electronic devices.
  • the power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110.
  • the power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160.
  • the power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance).
  • the power management module 141 may also be provided in the processor 110.
  • the power management module 141 and the charging management module 140 may also be provided in the same device.
  • the wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization.
  • Antenna 1 can be multiplexed as a diversity antenna for wireless LAN.
  • the antenna can be used in combination with a tuning switch.
  • the mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100.
  • the mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) etc.
  • the mobile communication module 150 may receive electromagnetic waves by the antenna 1, and perform processing such as filtering and amplifying the received electromagnetic waves, and then transmitting them to the modem processor for demodulation.
  • the mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves through the antenna 1 for radiation.
  • at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110.
  • at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
  • the modem processor may include a modulator and a demodulator.
  • the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor.
  • the application processor outputs sound signals through audio equipment (not limited to speakers 170A, receiver 170B, etc.), or displays images or videos through the display 194.
  • the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
  • the wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions.
  • the wireless communication module 160 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110.
  • the wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves through the antenna 2 and radiate it out.
  • the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc.
  • the GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), and a quasi-zenith satellite system (quasi). -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
  • GPS global positioning system
  • GLONASS global navigation satellite system
  • BDS Beidou navigation satellite system
  • QZSS quasi-zenith satellite system
  • SBAS satellite based augmentation systems
  • the electronic device 100 implements a display function through GRJ, a display screen 194, and an application processor.
  • the GPU is a microprocessor for image processing, connected to the display 194 and the application processor.
  • the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
  • the processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
  • the display screen 194 is used to display images, videos, etc.
  • the display screen 194 includes a display panel.
  • the display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode).
  • LCD liquid crystal display
  • OLED organic light-emitting diode
  • active-matrix organic light-emitting diode active-matrix organic light-emitting diode
  • AMOLED flexible light-emitting diode
  • FLED flexible light-emitting diode
  • Miniled MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), etc.
  • the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
  • the electronic device 100 can pass ISP, camera 193, video codec, GPU, display 194 and applications The processor, etc. realize the shooting function.
  • the ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye.
  • ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene.
  • the ISP may be provided in the camera 193.
  • the camera 193 is used to capture still images or videos.
  • the object generates an optical image through the lens and projects it to the photosensitive element.
  • the photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor.
  • CMOS complementary metal-oxide-semiconductor
  • the photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal.
  • ISP outputs digital image signals to DSP for processing.
  • DSP converts digital image signals into standard RGB, YUV and other formats.
  • the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
  • the digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • the electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
  • MPEG moving picture experts group
  • NPU is a neural-network (NN) computing processor.
  • NN neural-network
  • applications such as intelligent cognition of the electronic device 100 can be implemented, such as image recognition, face recognition, voice recognition, text understanding, and so on.
  • the external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100.
  • the external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
  • the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
  • the processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121.
  • the internal memory 121 may include a program storage area and a data storage area.
  • the storage program area can store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.).
  • the storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100.
  • the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
  • UFS universal flash storage
  • the electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
  • the audio module 170 is used to convert digital audio information into an analog audio signal for output, and also used to convert an analog audio input into a digital audio signal.
  • the audio module 170 can also be used to encode and decode audio signals.
  • the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
  • the speaker 170A also called a “speaker” is used to convert audio electrical signals into sound signals.
  • the electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
  • the receiver 170B also called a "handset" is used to convert audio electrical signals into sound signals.
  • the microphone 170C also called “microphone”, “microphone”, is used to convert sound signals into electrical signals.
  • the user can The mouth is close to the microphone 170C to make a sound, and the sound signal is input to the microphone 170C.
  • the electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can not only collect sound signals, but also implement a noise reduction function.
  • the electronic device 100 may also be provided with three, four or more microphones 170C, so as to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions.
  • the earphone interface 170D is used to connect wired earphones.
  • the earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and the American cellular telecommunications industry association of the USA (CTIA) standard interface .
  • OMTP open mobile terminal platform
  • CTIA American cellular telecommunications industry association of the USA
  • the pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals.
  • the pressure sensor 180A may be provided on the display screen 194.
  • the capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes.
  • the electronic device 100 determines the strength of the pressure based on the change in capacitance.
  • the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A.
  • the electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A.
  • touch operations acting on the same touch position but with different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
  • the gyro sensor 180B can be used to determine the movement posture of the electronic device 100.
  • the angular velocity of the electronic device 100 around three axes i.e., X, y, and z axes
  • the gyro sensor 180B can be used for shooting anti-shake.
  • the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement to achieve anti-shake.
  • the gyro sensor 180B can also be used for navigation and somatosensory game scenes.
  • the air pressure sensor 180C is used to measure air pressure.
  • the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C, and assists positioning and navigation.
  • the magnetic sensor 180D includes a Hall sensor.
  • the electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster.
  • the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic flip cover unlocking are set.
  • the acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic equipment, and can be used in applications such as horizontal and vertical screen switching, pedometers and so on.
  • the electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
  • the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode.
  • the light emitting diode may be an infrared light emitting diode.
  • the electronic device 100 emits infrared light to the outside through the light emitting diode.
  • the electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100.
  • the electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power.
  • the proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
  • the ambient light sensor 180L is used to sense the brightness of the ambient light.
  • the electronic device 100 can adapt itself according to the perceived brightness of the ambient light The brightness of the display 194 should be adjusted.
  • the ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures.
  • the ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
  • the fingerprint sensor 180H is used to collect fingerprints.
  • the electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to the application lock, fingerprint photographs, fingerprint answering calls, and so on.
  • the temperature sensor 180J is used to detect temperature.
  • the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection.
  • the electronic device 100 when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature.
  • the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
  • Touch sensor 180K also called “touch panel”.
  • the touch sensor 180K can be set on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”.
  • the touch sensor 180K is used to detect touch operations on or near it.
  • the touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event.
  • the display screen 194 can provide visual output related to the touch operation.
  • the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
  • the bone conduction sensor 180M can acquire vibration signals.
  • the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice.
  • the bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal.
  • the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone.
  • the audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function.
  • the application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
  • the button 190 includes a power button, a volume button, and so on.
  • the button 190 may be a mechanical button. It can also be a touch button.
  • the electronic device 100 can receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
  • the motor 191 can generate vibration prompts.
  • the motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback.
  • touch operations applied to different applications can correspond to different vibration feedback effects.
  • Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects.
  • Different application scenarios for example: time reminder, receiving information, alarm clock, game, etc.
  • the touch vibration feedback effect can also support customization.
  • the indicator 192 may be an indicator light, which may be used to indicate a charging state, a change in power, and may also be used to indicate messages, missed calls, notifications, and the like.
  • the SIM card interface 195 is used to connect to the SIM card.
  • the SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100.
  • the electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than one.
  • SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on.
  • the same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different.
  • the SIM card interface 195 can also be compatible with different types of SIM cards.
  • the SIM card interface 195 is also compatible with external memory cards.
  • the electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication.
  • the electronic device 100 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
  • the software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture.
  • the embodiment of the present invention takes an Android system with a layered architecture as an example to exemplarily illustrate the software of the electronic device 100 Structure.
  • FIG. 2B is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
  • the layered architecture divides the software into thousands of layers, and each layer has a clear role and division of labor. Communication between layers through software interface.
  • the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
  • the application layer can include a series of application packages.
  • the application layer may include application packages such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • application packages such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
  • the application program layer may include a first application, and the first application may be a smart home application, and the user can use the application to set and manage smart home devices.
  • the user can use the first application to set IFTTT rules, and multiple second electronic devices in the home network can be linked based on the IFTTT rules set by the user to provide the user with a smart home life.
  • the application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer.
  • API application programming interface
  • the application framework layer includes some predefined functions.
  • the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
  • the window manager is used to manage window programs.
  • the window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
  • the content provider is used to store and retrieve data, and make these data accessible to applications.
  • the data may include video, image, audio, dialed and received calls, browsing history and bookmarks, phone book, etc.
  • the view system includes visual controls, such as controls that display text, controls that display pictures, and so on.
  • the view system can be used to build applications.
  • the display interface can be composed of one or more views.
  • a display interface including a short message notification icon may include a view displaying text and a view displaying pictures.
  • the phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.).
  • the resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
  • the notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction.
  • the notification manager is used to notify that the download is complete, message reminders, and so on.
  • the notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window.
  • text messages are displayed in the status bar, prompt sounds are emitted, electronic devices vibrate, and indicator lights flash.
  • Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system.
  • the core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.
  • the application layer and the application framework layer run in a virtual machine.
  • the virtual machine executes the java files in the application layer and application framework layer as binary files.
  • the virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
  • the system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
  • surface manager surface manager
  • media library Media Libraries
  • 3D graphics processing library for example: OpenGL ES
  • 2D graphics engine for example: SGL
  • the surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
  • the media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files.
  • Media library can Support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.
  • the 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
  • the 2D graphics engine is a graphics engine for 2D drawing.
  • the kernel layer is the layer between hardware and software.
  • the kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
  • the electronic device 10 first receives the user's setting of the IFTTT rule.
  • the web address associated with the server 11 can be entered in the browser of the electronic device 10 (electronic device A) to log in to the setting page of the IFTTT rule.
  • the first application such as a smart home APP, etc.
  • the user interface of the first application can also be used locally to set the IFTTT rule, which is not limited in the embodiment of the present application.
  • Figures 3A to 31 are schematic diagrams of some interfaces involved in the setting process of the IFTTT rules provided in this embodiment of the application.
  • FIG. 3A it is a schematic diagram of the desktop 301 of the mobile phone.
  • the desktop 301 displays a status bar, time and weather controls, application icons (for example, the icon 302 of the smart home APP), and a dock bar.
  • the status bar can include the name of the operator (such as China Mobile), time, WiFi icon, signal strength, and current remaining power.
  • the mobile phone When the mobile phone detects that the user clicks on the smart home icon 302 on the desktop 301, the mobile phone enters the main interface 303 of the smart home APP as shown in FIG. 3B.
  • the smart home APP can be used to discover and connect electronic devices to the home network. It can also create practical life scenarios based on these electronic devices, and provide humanized information prompts and interactions.
  • the mobile phone can set some manual life scenes through the smart home APP, that is, the user is required to manually turn on some life scenes, and based on preset rules, the electronic devices related to the life scenes perform corresponding operations.
  • the life scenes that are manually opened include, for example, "going home”, “leaving home”, “reading”, “sleeping” and so on. Among them, related settings can refer to the prior art, which will not be repeated here.
  • the window curtains are turned on for ventilation, and the TV opens the channel or program set by themselves .
  • the mobile phone can also set different life scenarios based on time through the smart home APP. That is, when a certain predetermined time is reached, based on a preset rule, the electronic device related to the predetermined time starts to automatically perform corresponding operations.
  • the related settings can refer to the prior art, which will not be repeated here.
  • the bedroom lights are turned on, the smart speakers play music, and the soymilk is cooked by the soymilk.
  • the mobile phone can also use the smart home APP to set different life scenarios based on the electronic device 12 (electronic device B) in the local network. That is, when the working state of one or some electronic devices 12 (electronic device B) meets the preset conditions, other electronic devices 12 (electronic device B) are automatically triggered to perform corresponding operations.
  • the smart door lock recognizes that the person at the door is legal, the smart door lock automatically unlocks.
  • the air conditioner will automatically start.
  • the following describes the process of setting different life scenarios on the mobile phone based on the electronic device 12 (electronic device B) in the local network.
  • the mobile phone pops up a menu for setting adding devices and adding scenes, as shown in the menu 307 in the interface 306 in FIG. 3C.
  • the mobile phone displays an interface for setting the IFTTT rules, as shown in the interface 308 in FIG. 3D.
  • the add control 309 on the left side of the interface 308 can be used to add conditional devices and set trigger conditions.
  • the add control 310 on the right side can be used to add execution devices and set execution operations.
  • the interface 311 is an interface for setting the condition device and trigger condition in the IFTTT rule.
  • the user can select a conditional device. After selecting the conditional device, the mobile phone will pop up a window or menu for setting the triggering condition of the conditional device.
  • interface 311 shown in Figure 3E after detecting that the user selects "smart door lock", a menu 312 pops up, and the user can further set the trigger condition of the conditional device.
  • the trigger condition is that the smart door lock is in the unlocked state.
  • a menu 314 pops up, and the user can further set the trigger condition of the conditional device.
  • the trigger condition is that the temperature value of the temperature sensor is greater than or equal to 28 degrees.
  • the type of the trigger condition of the condition device is also different.
  • the trigger condition can be the working state of the condition device, such as on or off; the trigger condition can also be the detection value or the range of the detection value of the condition device; the trigger condition can also be the detection result of the condition device, for example: human sensor sensing When the human body passes through, or the smoke sensor detects a gas leakage event, etc. Therefore, when the condition device type is different, the corresponding interface for setting the trigger condition will also be different, which is not limited in the embodiment of the present application.
  • condition devices set by the user can be one or more, and the trigger condition corresponding to each condition device can also be one or more, which is not limited in the embodiment of the present application.
  • the user can save the setting by clicking the "Save" button. The user can also directly modify and delete the added condition devices and trigger conditions, which will not be repeated here.
  • the following can set the execution device and execution operation in the IFTTT rule.
  • FIG. 3G it is detected that the user clicks the add control 310 on the interface 315, and the mobile phone displays the interface 316 as shown in FIG. 3H.
  • the user can select the execution device and set the operation of the execution device through the interface 316. For example, select the operation performed by the “smart air conditioner” (also referred to as the execution event) for the execution device to turn on the smart air conditioner, and set the temperature value of the smart air conditioner to 24 degrees.
  • the “smart air conditioner” also referred to as the execution event
  • the number of execution devices may be one or more, and the execution operation corresponding to each execution device may also be one or more.
  • the execution device and the condition device may be the same device or different devices.
  • Rule 1 is "If the smart door lock recognizes that the person at the door is legal, the smart door lock will automatically unlock.”
  • the condition device and the execution device are both smart door locks.
  • Rule 2 is "If the door is opened and the indoor temperature is higher than 28 degrees Celsius, the air conditioner will automatically start.”
  • the condition device is the door and temperature sensor, and the execution device is the air conditioner.
  • the user can save the setting by clicking the “Save” button, and the interface 318 as shown in Figure 31 can be displayed.
  • the user can also directly modify and delete the added execution devices and execution events, which will not be described one by one.
  • the user can first set the condition device and trigger condition, and then set the execution device and execution event, or first set the execution device and execution event, and then set the condition device and trigger condition. You can also set some condition devices and trigger conditions, then set the execution devices and execution events, and then set other condition devices and trigger conditions. That is to say, the embodiment of the present application does not limit the sequence of settings.
  • the user can also use voice (for example: when the electronic device A is a smart speaker, the user
  • the IFTTT rule can be set by voice dialogue with the smart speaker), or in other ways such as specific gestures.
  • the embodiment of this application does not limit the specific method for the user to set the IFTTT rule.
  • the set IFTTT rules need to be sent to the electronic device 12 (electronic device B) in the local network, and then locally The electronic device 12 (electronic device B) in the network performs local linkage based on the IFTTT rule.
  • the electronic device 12 in the local network has different roles in different IFTTT rules.
  • a certain electronic device 12 is a conditional device in some IFTTT rules, and it is an executing device in some other IFTTT rules.
  • Rule 1 is “If the smart door lock recognizes that the person at the door is legal, then the smart door lock will automatically unlock”.
  • the conditional device and the execution device are both smart door locks.
  • Rule 2 is "If the smart door lock is unlocked and the indoor temperature is higher than 28 degrees Celsius, the air conditioner will automatically start.”
  • the condition device is the smart door lock and temperature sensor, and the execution device is the air conditioner. It can be seen that the smart door lock is a conditional device and an execution device in rule 1, and a conditional device in rule 2.
  • conditional devices and execution devices may be one or more, which is not limited in the embodiment of this application.
  • Rule 3 is "If the door is opened and the indoor temperature is higher than 28 degrees Celsius, the window will be automatically closed and the air conditioner will automatically start.”
  • the condition device is the door and temperature sensor
  • the execution device is the window and air conditioner.
  • the role of the electronic device 12 (electronic device B) in the local network in the IFTTT rule is divided into conditional devices and execution devices.
  • the method of linkage of electronic equipment is illustrated as an example. It should be noted that the division of conditional equipment and execution equipment here does not constitute a specific limitation on electronic equipment 12 (electronic equipment B).
  • condition device and the execution device may be the same or different.
  • there is a certain electronic device in an IFTTT rule which is both a conditional device and an executing device.
  • the condition device and the execution device are both smart door locks.
  • the electronic device can directly call local data to obtain corresponding information, which will not be described separately.
  • the executing device may obtain the IFTTT rule in advance, and discover other electronic devices in the IFTTT rule, that is, conditional devices. After a trigger event occurs on a certain or certain conditional device in the IFTTT rule, the executing device can be notified directly through the local network. After receiving the notification message, the executing device can also directly query the trigger events of other conditional devices through the local network. When it is determined that the trigger events of all conditional devices have occurred, the execution device can execute the corresponding event (that is, the execution event, which can also be understood as the execution device to perform the corresponding function), that is, the linkage is completed.
  • the corresponding event that is, the execution event, which can also be understood as the execution device to perform the corresponding function
  • FIG. 4A it is a schematic diagram of a method for linkage of multiple electronic devices in a local network according to an embodiment of this application.
  • the execution device may obtain the IFTTT rule, and the conditional device may not obtain the IFTTT rule.
  • the method specifically includes:
  • S401 The execution device obtains the IFTTT rule.
  • IFTTT rules can include regular Identification, condition (condition) information and execution (action) information.
  • condition information may include: device identification, device type (type), attribute value, operator, value, etc.
  • the device identifier in the condition information is the identifier of the condition device
  • the device type is the type of the condition device
  • the attribute value is the parameter of the condition device (for example, when the condition device is a temperature sensor, the attribute value can be temperature), operation
  • the symbol is a logical operation (for example: greater than, less than, etc.), and the value is the value corresponding to the attribute value (for example: 26 degrees Celsius).
  • the execution information can include: device identification, device type, and specific operations performed. For example: the IFTTT rule can be set as that if the temperature value detected by the temperature sensor is greater than 26 degrees Celsius, the air conditioner is turned on.
  • the electronic device 10 can actively push the IFTTT rules (including adding, modifying and deleting IFTTT rules) set by the user to the execution device in the local network or through The server 11 actively pushes to the execution device.
  • the execution device in the local network may also request IFTTT rules from the electronic device 10 (electronic device A) or the server 11, and the electronic device 10 (electronic device A) or the server 11 sends the corresponding IFTTT rules It is sent to the execution device, which is not limited in this embodiment of the application.
  • the enforcement device checks the legality of the obtained IFTTT rules.
  • the first execution device may parse the acquired IFTTT rule, determine the integrity and correctness of the IFTTT rule, and check to ensure that the conditional device and the execution device can be linked according to the acquired IFTTT rule.
  • the integrity check of the IFTTT rule may include: detecting whether the IFTTT rule contains conditional information and whether the conditional information is complete, for example: conditional device information, conditional device attribute value, conditional device operator, attribute value correspondence Whether the value of is complete, etc. Check whether the IFTTT rule contains execution information, and whether the execution information is complete.
  • checking the correctness of the IFTTT rule may also include: checking the validity of the IFTTT rule to determine whether the IFTTT rule has not been tampered with, etc.
  • the first execution device requests to discover the first conditional device and the second conditional device in the IFTTT rule.
  • the first execution device obtains the identities of the related condition devices and the identities of other execution devices from the IFTTT rules, and performs multicast or broadcast in the local network, and requests to discover the condition devices and other devices in the IFTTT rules.
  • Execution equipment That is, the message that the first execution device multicasts or broadcasts in the local network may carry the identification of the condition device and the identification of the execution device in the IFTTT rule.
  • the IFTTT rule is: If the first event of the first condition device and the second event of the second condition device occur at the same time, the first execution device executes the third event.
  • the first event is a trigger event of the first conditional device
  • the second event is a trigger event of the second conditional device.
  • the third event is an execution event of the first execution device. Then, the first execution device may multicast or broadcast the identification of the first conditional device and the identification of the second conditional device.
  • the first execution device may multicast or broadcast the identification of the first conditional device and the identification of the second conditional device respectively, that is, one multicast or broadcast message only includes the identification of the first conditional device, and the other The multicast or broadcast message only contains the identifier of the second conditional device.
  • the first execution device may also multicast or broadcast the identification of the first conditional device and the identification of the second conditional device at the same time, that is, a multicast or broadcast message includes the identification of the first conditional device and The identification of the second condition device. The embodiments of this application do not limit this.
  • the IFTTT rule is: if the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees.
  • the first condition device is a smart door lock, and the first event is unlocking.
  • the second condition device is a temperature sensor, and the second event is that the temperature value is greater than 28 degrees.
  • the first execution device is a smart air conditioner, and the third event is Turn on the smart air conditioner and set the temperature at 24 degrees. Then, after the smart air conditioner obtains the IFTTT rule, it determines that the conditional devices in the IFTTT rule are the smart door lock and the temperature sensor.
  • the smart air conditioner can broadcast the identification of the smart door lock and the identification of the temperature sensor in the home network.
  • the first conditional device and the second conditional device respectively replies their respective addresses to the first execution device.
  • Step S404 specifically includes: the first conditional device replies its own address to the first execution device (step S404a), and the second conditional device replies its own address to the first execution device (step S404b)
  • other electronic devices in the local network other than the first executing device compare the device identifier in the multicast or broadcast message with its own identifier. If the comparison is successful, it means that the electronic device is a conditional device or an executing device in the IFTTT rule, and replies to the first executing device with their respective addresses, such as IP address, MAC address, etc., so that the subsequent first executing device can follow the The address sends a message related to the linkage to it. If the comparison fails, it means that the electronic device is not a conditional device and an executing device in the IFTTT rule, and the electronic device can ignore the received multicast or broadcast message.
  • the IFTTT rule is: If the first event of the first conditional device and the second event of the second conditional device occur at the same time, the first execution device executes the third event. Then, after receiving the multicast or broadcast message sent by the first executing device, the first conditional device determines that it contains the identity of the first conditional device, and then determines that the first conditional device is the conditional device in the IFTTT rule, and then sends An execution device sends the address of the first condition device so that the first execution device can send a corresponding message according to the address of the first condition device. Similarly, the second condition device also sends the address of the second condition device to the first execution device, which will not be repeated here.
  • the IFTTT rule is still: If the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees.
  • the smart door lock and the temperature sensor confirm that the broadcast message contains their own identification, and determine that they are related to the IFTTT rule, and then return their own network addresses to the smart air conditioner, namely the smart door The network address of the lock and the network address of the temperature sensor.
  • Other devices in the home network such as air purifiers, smart doors and windows, etc., after receiving the broadcast message, determine that they are not related to the IFTTT rule, they can directly ignore the broadcast message sent by the smart air conditioner.
  • the first execution device subscribes to the first conditional device for the first event (shown in step S405a in Figure 4A), and subscribes to the second conditional device for the second event (shown in step S405b in Figure 4A).
  • the first execution device may send a subscription message to each condition device to subscribe to the trigger event of each condition device That is, once the trigger event of each condition device occurs, the first execution device will be notified.
  • the subscription message sent by the first execution device to the first condition device may contain the specific content of the first event.
  • the subscription message sent by the first execution device to the second condition device may include specific content of the second event.
  • steps S405a and S405b are respectively shown.
  • the IFTTT rule is still: If the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees.
  • the smart air conditioner subscribes to the smart door lock for event 1 and the temperature sensor for event 2 respectively.
  • event 1 is the unlocking of the smart door lock.
  • Event 2 is that the temperature of the indoor temperature sensor is greater than 28 degrees.
  • the smart air conditioner queries the temperature sensor whether event 2 has occurred (that is, whether the temperature is greater than 28 degrees X After the temperature sensor determines that the temperature is greater than 28 degrees, it informs the smart air conditioner. Therefore, the smart air conditioner can determine to turn on the smart air conditioner and set the temperature to 24 degrees.
  • the conditional device after the conditional device receives the subscription message of the execution device, it may report to the execution device whether a trigger event occurs or a message that satisfies the trigger condition at intervals.
  • the execution device can determine whether the corresponding IFTTT rule is satisfied according to the message, and execute the corresponding execution event when it is satisfied. For example: after the first conditional device receives the subscription message of the first execution device, it may report to the first execution device a message about whether the first event has occurred after a period of time. Similarly, after the second conditional device receives the subscription message of the first execution device, it may report to the first execution device a message about whether the second event has occurred after a certain interval of time. The first execution device can determine whether the IFTTT rule is satisfied according to the messages reported by the first condition device and the second condition device, and if it is satisfied, it directly executes the first event.
  • the conditional device may also send a notification message to the executing device after detecting a corresponding trigger event.
  • the first condition device may also send a notification message that the first event has occurred to the first execution device after detecting the first event.
  • the second condition device may also send a notification message that the first event has occurred to the first execution device after detecting the second event.
  • the occurrence of the first event of the first condition device includes: the first condition device performs a certain operation, for example: unlocking of a smart door lock.
  • the working state of the first condition device changes, for example: the smart air conditioner changes from the off state to the on state.
  • the detection value of the first condition device satisfies a certain condition, for example: the temperature value detected by the temperature sensor is greater than or equal to 28 degrees.
  • the human body sensor senses that a human body passes through, etc. That is to say, the specific content of the first event can be changed according to the function of the first condition device, and the specific content of the first event is not limited in the embodiment of the present application.
  • a notification message may be sent to the first execution device to notify the first condition device that the first event has occurred.
  • the notification message may be a message of a specific format or specific content.
  • the first execution device may determine the first event according to the sender of the notification message (the first conditional device) happened.
  • the notification message may also carry the identifier of the first conditional device.
  • the first executing device may determine that the first event has occurred according to the identifier of the first conditional device.
  • the notification message may also carry the identifier of the first event or the content of the first event.
  • the first execution device may perform the identification according to the identifier of the first event or the content of the first event. Make sure that the first event has occurred.
  • the specific form and content of the notification message are not limited in the embodiments of this application.
  • the first execution device sends a query message to the second condition device, which is used to query whether the second event occurs.
  • the first execution device may query the second condition device whether the second event has occurred.
  • the first execution device may determine whether the IFTTT is satisfied according to the first event and the second event. Rule, and then step S409 is executed.
  • the second condition device After receiving the query message of the first execution device, the second condition device can determine whether the second event has occurred, and return the query result to the first execution device.
  • S409 The first execution device determines to execute the third event according to the notification message of the first event and the query result of the second event.
  • the third event is an execution event of the first execution device, and the execution event may be an action or a series of actions. That is, when the condition that triggers the first execution device to execute the first event is satisfied, the first execution device simultaneously executes or sequentially a series of actions in the first event.
  • the execution event may also set a delay, that is, when the condition that triggers the first execution device to execute the first event is satisfied, the first execution device may start to execute the first event after a preset delay time. This application embodiment does not limit this.
  • the first execution device makes a logical judgment according to the notification message of the first event and the query result of the second event. If the judgment result matches the trigger condition in the IFTTT rule, the first execution device executes the third event. If they do not match, the first execution device determines not to execute the third event.
  • the notification message of the first event has timeliness. In other words, the notification message of the first event is valid within the preset time period. If it exceeds the preset time period, the notification message is invalid, that is, the notification message cannot be used to indicate that the first event has occurred, and the first execution device also needs to query the first condition device whether the first event has occurred.
  • the conditional device may carry time information in the notification message, and the execution device determines whether the notification message is valid according to the time information. The execution device may also determine whether the notification message is valid according to the time when the notification message is received, which is not limited in this embodiment of the application.
  • the query process is similar to the process in which the first execution device queries the second condition device whether the second event has occurred, and will not be repeated here.
  • the executing device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule. After a trigger event occurs on a conditional device in the IFTTT rule, the executing device can be notified directly through the local network, and the executing device can also directly query the triggering event of other conditional devices through the local network. When the trigger conditions of all conditional devices meet the IFTTT rules, the executing device can execute the corresponding event, that is, complete the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of the corresponding event by the executing device is completed in the local network.
  • the application can still complete the linkage of multiple electronic devices in the local network, which improves the success rate of linkage and improves the stability of the linkage system.
  • multiple electronic devices in the local network communicate directly during the linkage process, instead of using the Internet, it is beneficial to reduce the communication delay and improve the efficiency of linkage.
  • avoiding uploading the status of each electronic device in the local network and the execution status of the IFTTT rules to the Internet is beneficial to avoid security risks.
  • the executing device in the IFTTT rules communicates directly with other conditional devices in the IFTTT rules, and no other intermediate devices are used for transfer and control, that is, it does not pass the IFTTT rules.
  • Other devices that are irrelevant to the rules such as gateways
  • the method provided by the embodiment of the present application allows multiple electronic devices in the local network to get rid of the dependence on the control device when the multiple electronic devices in the local network are linked, which is beneficial to reduce the time delay of the linkage and improve the linkage efficiency.
  • conditional devices there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S401 to S409 are similar. The difference is:
  • the first execution device requests the discovery of all condition devices according to the IFTTT rule, that is, the discovery of the first condition device, the second condition device, and the third condition device. Therefore, the multicast message or the broadcast message sent by the first execution device also includes the identifier of the third conditional device.
  • step S404 after receiving the multicast message or the broadcast message sent by the first execution device, the third conditional device determines that the multicast message or broadcast message contains the identifier of the third conditional device, and also sends the notification to the first execution device. Send the address of the third conditional device, so that the subsequent first execution device can send linkage-related messages to the third conditional device.
  • the first execution device also subscribes to the third condition device for the fourth event.
  • the fourth event is a trigger event corresponding to the third conditional device.
  • steps S407 to S409 in some embodiments, if the first execution device receives the notification message of the first event, but does not receive the notification message of the second event and the fourth event, the first execution device sends a notification to the second condition
  • the device queries whether the second event occurs, and queries the third condition device whether the fourth event occurs.
  • the second condition device and the third condition device respectively return the query result to the first execution device, and the first execution device determines whether to execute the third event according to the query result.
  • the first execution device If the first execution device receives the notification messages of the first event and the second event, but does not receive the notification message of the fourth event, the first execution device queries the third condition device whether the fourth event occurs. The third condition device returns the query result to the first execution device, and the first execution device determines whether to execute the third event according to the query result.
  • the first execution device receives notification messages of the first event, the second event, and the fourth event, the first execution device directly determines whether to execute the third event.
  • the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event.
  • the fifth event is an execution event of the second execution device.
  • condition that triggers the first execution device to execute the third event is the same as the condition that triggers the second execution device to execute the fifth event. Therefore, when the first execution device determines to execute the third event, the second execution device may be notified to execute the fifth event. Then, the second execution device may not need to obtain the IFTTT rule from the electronic device 10 (electronic device A) or the server 11.
  • the linkage process of multiple electronic devices can still be executed according to the method in steps S401 to S409. The difference is:
  • the first execution device requests to send the first condition device, the second condition device, and the second execution device in the IFTTT rule according to the IFTTT rule.
  • the multicast message or the broadcast message sent by the first execution device further includes the identifier of the second execution device.
  • step S404 after receiving the multicast message or broadcast message sent by the first executing device, the second executing device determines that the multicast message or the broadcast message contains the identifier of the second executing device, and also sends it to the first executing device The address of the second execution device, so that the first execution device can send linkage-related messages to the second execution device subsequently.
  • step S409 when the first execution device determines to execute the third event according to the notification message of the first event and the query result of the second event, it sends an instruction to the second execution device to notify the second execution device to execute the fifth event . Then, the second execution device executes the fifth event.
  • the second execution device may obtain the IFTTT rules from the electronic device 10 (electronic device A) or the server 11.
  • the processing procedure after the second execution device obtains the IFTTT rules is the same as the processing after the first execution device obtains the IFTTT rules. The process is the same and will not be repeated here.
  • the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule, such as the execution device. After a trigger event occurs on a certain or some conditional devices in the IFTTT rule, other conditional devices can be notified directly through the local network. After other conditional devices determine that the IFTTT rules are met, they instruct the executing device to execute the corresponding event to complete the linkage.
  • FIG. 4A can also be applied to linkage between two electronic devices.
  • FIG. 4B Two electronic devices in a local network provided in an embodiment of this application (Execution equipment and condition equipment) schematic diagram of the linkage method, the method specifically includes:
  • the execution device obtains IFTTT rules.
  • the IFTTT rule is that when the first event occurs on the conditional device, the execution device executes the corresponding execution event (such as the first function X
  • step S401 in FIG. 4A refers to the related description in step S401 in FIG. 4A.
  • the execution device checks the legality of the obtained IFTTT rules.
  • step S402 in FIG. 4A refers to the related description in step S402 in FIG. 4A.
  • the execution device request discovers the conditional device in the IFTTT rule.
  • step S403 in FIG. 4A refer to the related description in step S403 in FIG. 4A.
  • the conditional device returns its own address to the executing device.
  • step S404 in FIG. 4A refers to the related description in step S404 in FIG. 4A.
  • the execution device sends a subscription message for the first event to the condition device.
  • step S405 in FIG. 4A refers to the related description in step S405 in FIG. 4A.
  • conditional device When a first event occurs in the conditional device, the conditional device publishes a notification message of the first event to the execution device. For this step, refer to the related description in step S406 in FIG. 4A.
  • the execution device determines to execute a corresponding execution event according to the first event.
  • step S409 in FIG. 4A refers to the related description in step S409 in FIG. 4A.
  • FIG. 5A it is a schematic diagram of another method for linkage of multiple electronic devices in a local network provided in an embodiment of this application.
  • the conditional device may obtain the IFTTT rule, but the execution device may not obtain the IFTTT rule.
  • the method specifically includes:
  • the first conditional device and the second conditional device respectively obtain IFTTT rules.
  • This step specifically includes: the first conditional device obtains IFTTT rules (step S501a) and the second conditional device obtains IFTTT rules (step S501b X
  • the method for obtaining the IFTTT rule by the first conditional device and the second conditional device may refer to the obtaining of the IFTTT rule by the first executing device in step S401, which will not be repeated.
  • the first conditional device and the second conditional device respectively perform legality checks on the acquired IFTTT rules.
  • This step specifically includes: the first conditional device performs a legality check on the obtained IFTTT rule (step S502a), and the second conditional device performs a legality check on the obtained IFTTT rule (step S502b).
  • the first conditional device and the second conditional device respectively parse the acquired IFTTT rules to determine the completeness and correctness of the IFTTT rules to check to ensure that the conditional device and the Perform equipment linkage.
  • the first conditional device requests the discovery of the first execution device and the second conditional device according to the IFTTT rule; the second conditional device requests the discovery of the first execution device and the first conditional device according to the IFTTT rule.
  • This step specifically includes: the first conditional device requests the discovery of the first execution device and the second conditional device (step S503b), and the second conditional device requests the discovery of the first execution device and the first conditional device (S503a).
  • the first conditional device and the second conditional device respectively obtain the identifiers of related other devices from the IFTTT rule, and perform multicast or broadcast in the local network, requesting to discover other devices in the IFTTT rule. That is, the multicast or broadcast message in the local network may carry the identification of other devices in the IFTTT rule.
  • the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event.
  • the first event is a trigger event of the first conditional device
  • the second event is a trigger event of the second conditional device.
  • the third event is an execution event of the first execution device.
  • the first execution The device may multicast or broadcast the identity of the first conditional device and the identity of the second conditional device.
  • the message that the first conditional device multicasts or broadcasts in the local network may carry the identities of the first execution device and the second conditional device.
  • the message that the second conditional device multicasts or broadcasts in the local network may carry the identifiers of the first execution device and the first conditional device.
  • the first execution device and the second condition device replies to their respective addresses to the first condition device; the first execution device and the first condition device replies to their respective addresses to the second condition device.
  • step S504a step S504b, step S504c, and step S504d are shown respectively.
  • S505 When the first event of the first condition device occurs, the first condition device publishes the first event to the second condition device. After the first event occurs in the first condition device, a notification message may be sent to the second condition device to notify the first condition device that the first event has occurred.
  • the notification message may be a message of a specific format or specific content, and after receiving the notification message, the second condition device may determine the first event according to the sender of the notification message (the first condition device) happened.
  • the notification message may also carry the identification of the first conditional device.
  • the second conditional device may determine that the first event has occurred according to the identification of the first conditional device.
  • the notification message may also carry the identifier of the first event or the content of the first event.
  • the second conditional device may use the identifier of the first event or the content of the first event. Make sure that the first event has occurred.
  • the specific form and content of the notification message are not limited in the embodiments of this application.
  • the second conditional device can determine whether the IFTTT rules are satisfied according to the received notification message of the first event, combined with the second event that occurred by itself, and if the IFTTT rules are satisfied, then The first execution device sends a command to execute the third event.
  • the notification message of the first event has timeliness. In other words, the notification message of the first event is valid within the preset time period. If it exceeds the preset time period, the notification message is invalid, that is, the notification message cannot be used to indicate that the first event has occurred. Then, when the second event occurs, the second condition device also needs to query the first condition device for the first condition. Whether an event occurs is not repeated in the embodiment of this application.
  • the first execution device executes the third event.
  • the third event is an execution event of the first execution device, and the execution event may be an action or a series of actions. That is, when the condition that triggers the first execution device to execute the third event is satisfied, the first execution device simultaneously executes or sequentially a series of actions in the third event.
  • the execution event may also set a delay, that is, when the condition that triggers the first execution device to execute the third event is satisfied, the first execution device may start to execute the third event after a preset delay time. This application embodiment does not limit this.
  • the second condition device will first publish the second event to the first condition device, and then when the first condition device occurs In the case of the first event, it may be determined whether the IFTTT rule is satisfied according to the notification message of the second event and the first event. If it is met, the first condition device instructs the first execution device to execute the third event.
  • the electronic device 10 (electronic device A) is a mobile phone
  • the first condition device is a smart door
  • the second condition device is a brightness sensor
  • the first execution device is a lamp.
  • the smart door and the brightness sensor respectively obtain an IFTTT rule from the mobile phone side. For example, if the smart door is unlocked and the brightness sensor detects darkness, the light is turned on. Then, when the smart door unlocks, the event will be posted to the brightness The brightness sensor detects whether the room brightness is dark, and if it is dark, the brightness sensor issues an event to the light. After the light receives the event issued by the brightness sensor, it turns on the light.
  • the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule. After a trigger event occurs on the conditional device in the IFTTT rule, it can directly notify other conditional devices through the local network. After each conditional device determines that the IFTTT rule is satisfied, the executing device is instructed to execute the corresponding event, which completes the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of a corresponding event by the device is completed in the local network, which improves the efficiency of linkage and improves the security of user data.
  • conditional devices there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S501 to S507 are similar. The difference is:
  • step S501 all conditional devices need to obtain the IFTTT rule from the server 11 or the electronic device 10 (electronic device A), that is, the third conditional device also needs to obtain the IFTTT rule.
  • step S502 the third-condition device also performs a legality check on the IFTTT rule.
  • the first condition device and the second condition device also need to discover the third condition device, that is, the multicast message or broadcast message sent by the first condition device and the second condition device also contains the identity of the third condition device .
  • the third conditional device must also send a multicast message or a broadcast message for discovering other electronic devices in the IFTTT rule, such as the first conditional device, the second conditional device, and the first execution device.
  • step S504 after receiving the multicast message or the broadcast message sent by the first condition device and the second condition device, the third condition device will also send the third condition device to the first condition device and the second condition device respectively.
  • the address of the device In the same way, the first conditional device, the second conditional device, and the first execution device will also reply their respective network addresses to the third conditional device after receiving the multicast message or broadcast message sent by the third conditional device.
  • the first condition device publishes the first event to the second condition device and the third condition device respectively. In this way, both the second condition device and the third condition device learn that the first event has occurred. After the second event occurs, the second condition device publishes the second event to the third condition device (it can also publish the second event to the first condition device at the same time). In this way, when the fourth event of the third condition device (the trigger event corresponding to the third condition device) occurs, the third condition device determines whether to instruct the first execution device to execute the third event according to the IFTTT rule.
  • the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event.
  • the fifth event is an execution event of the second execution device.
  • steps S503 to S504 when the conditional device discovers other devices in the IFTTT rule, the second execution device also needs to be discovered.
  • the conditional device discovers other devices in the IFTTT rule
  • the second execution device also needs to be discovered.
  • step S506 when the second event of the second condition device occurs, the second condition device instructs the first execution device to execute the third event, and the second condition device instructs the second execution device to execute the fifth event.
  • the executing device and some conditional devices obtain the IFTTT rule in advance, and discover other electronic devices in the IFTTT rule, such as other conditional devices.
  • the trigger event of other condition devices can be queried, or the execution device can be notified, and the execution device condition device can query the trigger events of other condition devices.
  • the execution device executes the corresponding event, and the linkage is completed.
  • FIG. 6A it is a schematic diagram of another method for linkage of multiple electronic devices in a local network provided in an embodiment of this application.
  • the IFTTT rule can be obtained by the partial conditional device and the executing device, and the method specifically includes:
  • the first conditional device and the first execution device respectively obtain IFTTT rules.
  • This step specifically includes: the first conditional device obtains the IFTTT rule (step S601a), and the first execution device obtains the IFTTT rule (step S601b).
  • the method for obtaining the IFTTT rule by the first conditional device and the first execution device may refer to the first execution device obtaining the IFTTT rule in step S401, which will not be repeated.
  • the first condition device and the first execution device respectively perform legality checks on the acquired IFTTT rules.
  • This step specifically includes: the first condition device performs a legality check on the obtained IFTTT rule (step S602b), and the first execution device performs a legality check on the obtained IFTTT rule (S602a).
  • the first conditional device and the first execution device respectively parse the acquired IFTTT rules to determine the completeness and correctness of the IFTTT rules to check, so as to ensure that the conditional device and the execution device can be performed according to the acquired IFTTT rules. Perform equipment linkage.
  • the first conditional device requests discovery of the first conditional device and the second conditional device according to the IFTTT rule; the first conditional device requests discovery of the first conditional device and the second conditional device according to the IFTTT rule.
  • This step specifically includes: the first conditional device requests the discovery of the first conditional device and the second conditional device (step S603a), and the first conditional device requests the discovery of the first conditional device and the second conditional device (step S603b).
  • the first conditional device and the second conditional device respectively obtain the identifiers of related other devices from the IFTTT rule, and perform multicast or broadcast in the local network, requesting to discover other devices in the IFTTT rule. That is, the multicast or broadcast message in the local network may carry the identification of other devices in the IFTTT rule.
  • the first condition device since the first condition device does not need to send data to the second condition device, during this step, the first condition device may not find the second condition device. That is, the multicast message or broadcast message sent by the first conditional device does not carry the identifier of the second conditional device. In this way, after the second conditional device receives the multicast message or broadcast message, it does not need to reply to the first conditional device. Network address. Similarly, the first execution device does not need to send data to the first conditional device. Therefore, in this step, the first execution device may not discover the first conditional device. That is, the multicast message or broadcast message sent by the first execution device does not carry the identifier of the first conditional device.
  • the first execution device and the second condition device replies to their respective addresses to the first condition device; the first execution device and the first condition device item and the second condition device replies to their respective addresses.
  • step S604a step S604b, step S604c, and step S604d are shown respectively.
  • the first condition device publishes the first event to the first execution device. After the first event occurs in the first condition device, a notification message may be sent to the first execution device to notify the first condition device that the first event has occurred.
  • the first execution device queries the second condition device for the second event according to the IFTTT rule.
  • the second condition device returns the query result of the second event to the first execution device.
  • S608 The first execution device executes the third event.
  • the first execution device determines whether the IFTTT regulations are met according to the notification message of the first event and the query result at the second time. Then. If it is satisfied, the third event is executed. Otherwise, the third event is not executed.
  • the first conditional device after the first conditional device sends the first event, it may also query the second conditional device for the second event.
  • the first condition device determines whether the first event and the second event meet the IFTTT rule, and if they do, instruct the first execution device to execute the third event. That is, steps S605 to S607 can be replaced with steps S609 to S610, that is, the method of multi-device linkage provided in the embodiment of the present application includes: S601 to S604, S609 to S611, and step S608, as follows:
  • the first condition device queries the second condition device whether the second event occurs.
  • the second condition device returns the query result of the second time to the first condition device.
  • the first condition device determines whether the IFTTT rule is satisfied according to the query results of the first event and the second event, and if so, instructs the first execution device to execute the third event.
  • the electronic device adopts the process of steps S609 to S611, since the first execution device does not need to send data to the first condition device and the second condition device, in step S603 and In S604, the first execution device may not find the first condition device and the second condition device.
  • the execution device and the conditional device obtain the IFTTT rules, which can save the process of subscribing the execution device to the conditional device for the trigger event.
  • the status of the second event will be inquired. That is to say, when the second event of the second condition device frequently occurs, the second condition device does not need to publish the second event frequently, which is beneficial to saving resources.
  • the electronic device 10 is a mobile phone
  • the first condition device is a smart door
  • the second condition device is a brightness sensor (used to detect the brightness of an indoor environment)
  • the first execution device is Take the lamp as an example.
  • the smart door and the light obtain the IFTTT rules from the mobile phone, for example, if the smart door lock is unlocked and the indoor environment is in a dark state, the indoor light is automatically turned on. Then, when the smart door is unlocked, the smart door issues an unlock event to the light. The lamp then queries the brightness sensor to see if the room is dark. If it is dark, the light turns on automatically. It can be seen that in this application, only when the smart door lock is unlocked, which means that someone at home comes back, the detection result of the brightness sensor is checked. If the test result shows that the indoor environment is in a dark state, turn on the light. Considering that when no one is at home, the indoor environment may always be in a dark state. If the brightness sensor keeps reporting indoor dark events, it is meaningless and wastes resources.
  • conditional devices in an IFTTT rule there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S601 to S608 are similar.
  • the third condition device may not acquire the IFTTT rule. Then, the difference from the method adopted in steps S601 to S608 above is:
  • step S606 when the first execution device queries the second condition device for the second event, it also queries the third condition device for the fourth event.
  • the fourth event is a trigger event corresponding to the third conditional device. Then, the third condition device returns the query result of the fourth event to the first execution device.
  • step S608 the first execution device determines whether the IFTTT rule is satisfied and whether to execute the third event according to the notification message of the first event, the query results of the second event, and the fourth event.
  • the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that:
  • the interaction between the first conditional device and the third conditional device that have both obtained the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in steps S501 to S507, and details are not described herein again.
  • the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that:
  • the interaction between the first conditional device and the third conditional device that have both acquired the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in the foregoing steps S501 to S507, and details are not described herein again.
  • conditional devices there are more than two conditional devices in an IFTTT rule, for example: there is also a third conditional device, the process of linkage of multiple electronic devices is the same as the aforementioned S601 to S604, S609 to S611, and steps S608, similar.
  • the third conditional device may not acquire the IFTTT rule. Then, the method differs from the foregoing S601 to S604, S609 to S611, and step S608 in that:
  • step S609 when the first event of the first condition device occurs, the second condition device is inquired about the second event, and the third condition device is also inquired about the fourth event. Then, the third condition device returns the query result of the fourth event to the first condition device.
  • step S611 the first conditional device determines whether to instruct the first execution device to execute the third event according to the query results of the first event, the second event, and the fourth event.
  • the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that:
  • the interaction between the first conditional device and the third conditional device that have both acquired the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in the foregoing steps S501 to S507, and details are not described herein again.
  • the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event.
  • the fifth event is an execution event of the second execution device.
  • steps S601 to S608 or the method of steps S601 to S604, steps S609 to S611, and step S608 can still be used.
  • the difference is:
  • steps S603 to S604 the conditional device and the executing device also need to discover the second executing device during the process of discovering other devices in the IFTTT rule.
  • the conditional device and the executing device also need to discover the second executing device during the process of discovering other devices in the IFTTT rule.
  • step S608 when the first execution device determines to execute the third event, it also instructs the second execution device to execute the fifth event.
  • step S611 when the first conditional device instructs the first execution device to execute the third event, it also instructs the second execution device to execute the fifth event.
  • the aforementioned terminal and the like include hardware structures and/or software modules corresponding to each function.
  • the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Certain Whether each function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the embodiments of the present invention.
  • the embodiments of the present application may divide the above-mentioned terminal and the like into functional modules according to the above-mentioned method examples.
  • each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiment of the present invention is illustrative, and is only a logical function division, and other division methods may be used in actual implementation. The following is an example of dividing each function module corresponding to each function:
  • Fig. 7 shows a schematic structural diagram of an apparatus involved in the foregoing embodiment, and the apparatus can realize the function of the electronic device in the method provided in the embodiment of the present application.
  • the device may be an electronic device or a device that can support the electronic device to realize the functions of the electronic device in the embodiments of the present application.
  • the device is a chip system applied to the electronic device.
  • the device includes: a processing unit 701 and a communication unit 702.
  • the processing unit 701 may be used to support the electronic device shown in FIG. 4A to perform steps S402 and S409 in the foregoing embodiment, or to support the electronic device shown in FIG. 4B to perform steps S411 and S416 in the foregoing embodiment, or It is used to support the electronic device shown in FIG.
  • the communication unit 702 is used to support the electronic device shown in FIG. 4A to perform steps S401, S403 to S408 in the foregoing embodiment, or to support the electronic device shown in FIG. 4B to perform steps S412 to S415 in the foregoing embodiment, or use It is used to support the electronic device shown in FIG. 5A to execute steps S501, S503 to S506 in the foregoing embodiment, or to support the electronic device shown in FIG.
  • the chip system may be composed of chips, or may include chips and other discrete devices.
  • the communication unit in the embodiment of the present application may be a circuit, a device, an interface, a bus, a software module, a transceiver, or any other device that can implement communication.
  • the communication unit 702 may be an electronic device or a communication interface applied to a chip system in an electronic device.
  • the communication interface may be a transceiver circuit
  • the processing unit 701 may be an electronic device or a communication interface applied to the electronic device.
  • the processor of the chip system On the processor of the chip system.
  • FIG. 8 shows a schematic diagram of a possible logical structure of the device involved in the foregoing embodiment, and the device can realize the function of the electronic device in the method provided in the embodiment of the present application.
  • the device may be an electronic device or a chip system applied to the electronic device.
  • the device includes: a processing module 801 and a communication module 803.
  • the processing module 801 is used to control and manage the actions of the device shown in FIG. 7, for example, the processing module 801 is used to execute the steps of message or data processing on the device side shown in FIG. For example, it can be used to support the device shown in FIG.
  • the communication module 803 is used to support the device shown in FIG. 7 to perform steps S401, S403 to S408 in the foregoing embodiment, or to perform steps S412 to S415 in the foregoing embodiment, or to perform steps S501 and S503 in the foregoing embodiment.
  • steps S601, S603 to S607, and S609 to S611 in the foregoing embodiment may further include a storage module 802 for storing program codes and data of the device.
  • the processing module 801 may be a processor or a controller, for example, a central processing unit, a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, Hardware components or any combination thereof. It can implement or execute each of the descriptions in combination with the disclosure of the embodiments of the present application An exemplary logic block, module and circuit.
  • the processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on.
  • the communication module 803 may be a transceiver, a transceiver circuit, or a communication interface.
  • the storage module 802 may be a memory.
  • the processing module 801 is the processor 110
  • the communication module 803 is the mobile communication module 150 or the wireless communication module 160 or the USB interface 130
  • the storage module 802 is the internal memory 121, or the external memory connected to the external memory interface 120
  • the involved device may be the electronic device 100 shown in FIG. 2A.
  • the methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof.
  • software When implemented by software, it can be implemented in the form of a computer program product in whole or in part.
  • the computer program product includes one or more computer instructions.
  • the computer may be a general-purpose computer, a dedicated computer, a computer network, a network device, a terminal, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center.
  • 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 or a data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, an SSD).
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative, for example, the division of units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or integrated. To another system, or some features can be ignored, or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Manufacturing & Machinery (AREA)
  • Quality & Reliability (AREA)
  • Computer And Data Communications (AREA)

Abstract

Disclosed are a multi-intelligent device linkage control method, device and system, which relate to the technical field of communications, and can remove dependence on a control device in linkage control of a multi-intelligent device, thereby facilitating reducing time delay of linkage and improving linkage efficiency. The method specifically comprises: a first electronic device acquiring a first rule, wherein the first rule indicates that when a first event occurs to a second electronic device, the first electronic device executes a first function; the first electronic device sending a subscription message for the first event to the second electronic device according to the first rule; the first electronic device receiving a notification message of the first event sent by the second electronic device; and in response to the received notification message of the first event, the first electronic device executing the first function according to the first rule.

Description

一种多智能设备联动控制的方法、 设备以及系统 本申请要求在 2019年 2月 26 日提交中国国家知识产权局、 申请号为 201910142363. 1、 发明名称为 “一种多智能设备联动控制的方法、 设备及系统” 的中国专利申请的优先权, 其 全部内容通过引用结合在本申请中。 技术领域 A method, equipment and system for linkage control of multiple smart devices. This application is required to be submitted to the State Intellectual Property Office of China on February 26, 2019. The application number is 201910142363. 1. The title of the invention is "a method for linkage control of multiple smart devices" , Equipment and system”, the entire content of which is incorporated in this application by reference. Technical field
本申请涉及通信技术领域, 尤其涉及一种多智能设备联动控制的方法、 设备及系统。 背景技术 This application relates to the field of communication technologies, and in particular, to a method, device, and system for linkage control of multiple smart devices. Background technique
智能家居 ( sma r t home , 或 home au t oma t i on) 通过物联网技术将家中的各种电子 设备 (如音视频设备、 照明系统、 窗帘控制、 空调控制、 安防系统、 数字影院系统、 影 音服务器、 影柜系统、 网络家电等) 连接到一起, 提供家电控制、 照明控制、 电话远程 控制、 室内外遥控、 防盗报警、 环境监测、 暖通控制、 红外转发以及可编程定时控制等 多种功能。 Smart home (sma rt home, or home au t oma ti on) uses the Internet of Things technology to integrate various electronic devices in the home (such as audio and video equipment, lighting systems, curtain control, air conditioning control, security systems, digital cinema systems, audio and video servers) , Video cabinet system, network home appliances, etc.) are connected together to provide home appliance control, lighting control, telephone remote control, indoor and outdoor remote control, anti-theft alarm, environmental monitoring, HVAC control, infrared forwarding and programmable timing control and other functions.
在智能家居系统中, 各个电子设备基于 I FTTT( i f th i s then t ha t的缩写) 规则进 行设备与设备之间的联动和控制。 其中, th i s可认为是触发条件, tha t可认为是设备的 执行操作或执行事件。例如:如果智能门锁识别出门口的人通过了生物认证(触发条件), 则门自动打开 (执行事件) 。 又例如: 如果门开了, 且室内温度高于 28摄氏度(触发条 件) , 则空调自动启动 (执行事件) 。 In the smart home system, each electronic device is based on I FTTT (abbreviation for i f th i s then t hat) rules for linkage and control between devices. Among them, th i s can be regarded as a triggering condition, and tha t can be regarded as an execution operation or execution event of the device. For example: if the smart door lock recognizes that the person at the door has passed the biometric authentication (trigger condition), the door opens automatically (execution event). Another example: If the door is opened and the indoor temperature is higher than 28 degrees Celsius (trigger condition), the air conditioner will automatically start (execution event).
目前, 在设备和设备的联动过程中, 基本都是由控制设备收集触发条件, 然后基于 触发条件向需要联动的设备发送执行命令。 例如: 控制设备需要从一些设备 (可称为条 件设备) 处获取某个 IFTTT规则中所有的触发条件, 然后, 向另一些设备(可成为执行 设备) 发送操作指令, 以指示这些执行设备执行相应的操作。 At present, in the process of equipment and equipment linkage, basically the control equipment collects trigger conditions, and then sends execution commands to the equipment that needs linkage based on the trigger conditions. For example: a control device needs to obtain all trigger conditions in an IFTTT rule from some devices (can be called conditional devices), and then send operation instructions to other devices (can become execution devices) to instruct these execution devices to execute the corresponding Operation.
显然, 在现有的联动技术中, 条件设备和执行设备之间的联动过于依赖控制设备。 通常, 网络中存在多条 IFTTT规则, 若每条 IFTTT规则中的联动都要经过同一个控制设 备进行中转和控制, 会造成联动时延大, 效率低, 用户体验较差。 此外, 若控制设备断 开连接, 则该网络中的所有 I FTTT规则的联动都会失败。 可见, 条件设备和执行设备之 间的联动效率和稳定性都有待提高。 Obviously, in the existing linkage technology, the linkage between the condition device and the execution device relies too much on the control device. Generally, there are multiple IFTTT rules in the network. If the linkage in each IFTTT rule must be transferred and controlled by the same control device, the linkage delay will be large, the efficiency will be low, and the user experience will be poor. In addition, if the control device disconnects, the linkage of all I FTTT rules in the network will fail. It can be seen that the efficiency and stability of linkage between conditional equipment and execution equipment need to be improved.
发明内容 Summary of the invention
本申请提供的一种多智能设备联动控制的方法、 设备及系统, 可以在多电子设备的联 动控制中, 摆脱了对控制设备的依赖, 有利于减少联动的时延, 提升联动效率。 The method, device, and system for linkage control of multiple smart devices provided in the present application can get rid of the dependence on the control device in the linkage control of multiple electronic devices, which is beneficial to reduce the delay of linkage and improve linkage efficiency.
第一方面、 本申请提供的一种多电子设备联动控制的方法, 包括: In the first aspect, a method for linkage control of multiple electronic devices provided by this application includes:
第一电子设备获取第一规则, 第一规则指示当第二电子设备发生第一事件时, 第一电子 设备执行第一功能; 第一电子设备根据第一规则, 向第二电子设备发送针对第一事件的订阅 消息; 第一电子设备接收第二电子设备发送的第一事件的通知消息; 响应于接收到的第一事 件的通知消息, 第一电子设备根据第一规则执行第一功能。 The first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device executes the first function; the first electronic device sends a message to the second electronic device according to the first rule A subscription message for an event; the first electronic device receives the notification message of the first event sent by the second electronic device; in response to the received notification message of the first event, the first electronic device performs the first function according to the first rule.
其中, 第一电子设备为执行设备, 第一功能为第一规则中的执行事件。 第二电子设备为 条件设备, 第一事件为第一规则中第二电子设备对应的触发事件或触发条件。 Wherein, the first electronic device is an execution device, and the first function is an execution event in the first rule. The second electronic device is a conditional device, and the first event is a trigger event or trigger condition corresponding to the second electronic device in the first rule.
在本申请中, 由执行设备直接获取第一规则, 并向条件设备订阅触发事件, 多触发事件 发生时, 执行设备直接执行相应的执行事件。 可见, 在执行设备和条件设备的联动过程中, 没有依赖其他的控制设备, 可以提升联动的效率。 In this application, the execution device directly obtains the first rule, and subscribes the trigger event to the condition device, and more trigger events When it happens, the execution device directly executes the corresponding execution event. It can be seen that in the process of the linkage between the execution equipment and the condition equipment, no other control equipment is relied on, and the efficiency of the linkage can be improved.
一种可能的实现方式中, 该方法还包括: 第一电子设备获取第二规则, 第二规则指示当 第三电子设备发生第二事件, 且第四电子设备发送第三事件时, 则第一电子设备执行第二功 能; 第一电子设备根据第二规则, 向第三电子设备发送针对第二事件的订阅消息; 第一电子 设备接收到第三电子设备发送的第二事件的通知消息; 第一电子设备获取第四电子设备是否 发生第三事件; 响应于获取到第四电子设备发生第三事件, 第一电子设备根据第二规则执行 第二功能。 In a possible implementation manner, the method further includes: the first electronic device acquires a second rule, where the second rule indicates that when a second event occurs on the third electronic device and the fourth electronic device sends the third event, then the first The electronic device performs the second function; the first electronic device sends a subscription message for the second event to the third electronic device according to the second rule; the first electronic device receives the notification message of the second event sent by the third electronic device; An electronic device acquires whether the third event occurs on the fourth electronic device; in response to acquiring the third event on the fourth electronic device, the first electronic device executes the second function according to the second rule.
其中, 第一电子设备为执行设备, 第二功能为第二规则中的执行事件。 第三电子设备和 第四电子设备为条件设备。第二事件为第二规则中第三电子设备对应的触发事件或触发条件。 第三事件为第二规则中第四电子设备对应的触发事件或触发条件。 Wherein, the first electronic device is an execution device, and the second function is an execution event in the second rule. The third electronic device and the fourth electronic device are conditional devices. The second event is a trigger event or trigger condition corresponding to the third electronic device in the second rule. The third event is a trigger event or trigger condition corresponding to the fourth electronic device in the second rule.
在本申请中, 由执行设备提前获取 IFTTT规则, 在 IFTTT规则中的条件设备发生触发事 件后, 可以直接通过本地网络通知执行设备, 而执行设备也可以通过本地网络直接查询其他 条件设备的触发事件。 当所有条件设备的触发条件都满足 IFTTT规则时, 执行设备可以执行 相应事件, 即完成联动。 可见, 从某个条件设备的触发条件发生, 到执行设备执行相应事件 的整个过程中, 都是在本地网络中完成的。 这样, 即便是本地网络中有电子设备与互联网断 开, 本申请仍然可以完成本地网络的多个电子设备的联动, 提高了联动的成功率, 提升了联 动系统的稳定性。 并且, 由于联动过程中, 本地网络的多个电子设备直接进行通信, 而不再 通过互联网, 有利于降低通信的时延, 提升联动的效率。 再有, 避免将本地网络中各个电子 设备的状态, 以及 IFTTT规则的执行情况上传到互联网, 有利于规避安全风险。 In this application, the executing device obtains the IFTTT rules in advance. After a trigger event occurs on the conditional device in the IFTTT rule, the executing device can be notified directly through the local network, and the executing device can also directly query the trigger events of other conditional devices through the local network . When the trigger conditions of all the conditional devices meet the IFTTT rules, the executing device can execute the corresponding event, that is, complete the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of the corresponding event by the executing device is completed in the local network. In this way, even if there are electronic devices in the local network disconnected from the Internet, the application can still complete the linkage of multiple electronic devices on the local network, which improves the success rate of linkage and improves the stability of the linkage system. In addition, since multiple electronic devices in the local network communicate directly during the linkage process, instead of using the Internet, it is beneficial to reduce the communication delay and improve the efficiency of linkage. Furthermore, avoiding uploading the status of each electronic device in the local network and the execution of the IFTTT rules to the Internet is beneficial to avoid security risks.
此外, 在本申请实施例提供的方法中, 是由 IFTTT规则中的执行设备, 与 IFTTT规则中 其他的条件设备进行直接通信, 没有通过其他的中间设备进行中转和控制, 即没有通过与本 条 IFTTT规则无关的其他设备(例如: 网关)进行中转和控制。 换言之, 本申请实施例提供 的方法, 使得本地网络的多个电子设备联动时摆脱了对控制设备的依赖, 有利于减少联动的 时延, 提升联动效率。 In addition, in the method provided in the embodiments of the present application, the executing device in the IFTTT rules communicates directly with other conditional devices in the IFTTT rules, and no other intermediate devices are used for transfer and control, that is, it does not pass the IFTTT rules. Other devices that are irrelevant to the rules (such as gateways) are used for transfer and control. In other words, the method provided by the embodiment of the present application allows multiple electronic devices in the local network to get rid of the dependence on the control device when the multiple electronic devices in the local network are linked, which is beneficial to reduce the time delay of the linkage and improve the linkage efficiency.
一种可能的实现方式中, 响应于获取到第四电子设备发生第三事件, 第一电子设备根据 第二规则执行第二功能, 具体为: 响应于第一电子设备接收第四电子设备发送的已发生第三 事件的通知消息, 第一电子设备根据第二规则执行第二功能。 由此, 本申请提供了一种其他 条件设备主动向执行设备发送触发事件是否发生的通知消息的方法。 In a possible implementation manner, in response to acquiring that the third event occurs in the fourth electronic device, the first electronic device executes the second function according to the second rule, specifically: in response to the first electronic device receiving a message sent by the fourth electronic device When the notification message of the third event has occurred, the first electronic device performs the second function according to the second rule. Therefore, this application provides a method for other conditional devices to actively send to the executing device a notification message of whether a trigger event has occurred.
一种可能的实现方式中, 在第一电子设备接收第四电子设备发送的已发生第三事件的通 知消息之前, 该方法还包括: 响应于接收到第三电子设备发送的第二事件的通知消息, 第一 电子设备向第四电子设备发送查询第三事件是否发生的消息。 由此, 本申请提供了一种执行 设备向其他条件设备查询触发事件是否发生的通知消息的方法。 In a possible implementation manner, before the first electronic device receives the notification message that the third event has occurred sent by the fourth electronic device, the method further includes: responding to receiving the notification of the second event sent by the third electronic device Message, the first electronic device sends a message inquiring whether the third event occurs to the fourth electronic device. Therefore, the present application provides a method for an execution device to query other conditional devices for a notification message whether a trigger event occurs.
一种可能的实现方式中, 在第一电子设备获取第二规则之后, 方法还包括: 第一电子设 备根据第二规则, 获取第三电子设备的地址和第四电子设备的地址。 In a possible implementation manner, after the first electronic device obtains the second rule, the method further includes: the first electronic device obtains the address of the third electronic device and the address of the fourth electronic device according to the second rule.
一种可能的实现方式中, 第二规则包括第三电子设备的标识和第四电子设备的标识; 第 一电子设备根据第二规则, 获取第三电子设备的地址和第四电子设备的地址, 具体包括: 第 一电子设备组播或广播第一消息,第一消息包括第三电子设备的标识和第四电子设备的标识; 第一电子设备接收第三电子设备返回的第三电子设备的地址; 电子设备接收第四电子设备返 回的第四电子设备的地址。 In a possible implementation manner, the second rule includes the identity of the third electronic device and the identity of the fourth electronic device; the first electronic device obtains the address of the third electronic device and the address of the fourth electronic device according to the second rule, Specifically: the first electronic device multicasts or broadcasts a first message, the first message includes the identity of the third electronic device and the identity of the fourth electronic device; the first electronic device receives the address of the third electronic device returned by the third electronic device ; The electronic device receives the address of the fourth electronic device returned by the fourth electronic device.
本申请提供一种执行设备获取各个条件设备网络地址的方法。 一种可能的实现方式中, 在第一电子设备获取第二规则之后, 方法还包括: 第一电子设 备检测第二规则的合法性和成完整性。 This application provides a method for an execution device to obtain the network address of each conditional device. In a possible implementation manner, after the first electronic device obtains the second rule, the method further includes: the first electronic device detects the legality and integrity of the second rule.
一种可能的实现方式中, 第一电子设备获取第二规则包括: 第一电子设备从服务器或第 五电子设备获取第二规则。 In a possible implementation manner, obtaining the second rule by the first electronic device includes: obtaining the second rule by the first electronic device from the server or the fifth electronic device.
第二方面、 本申请提供的一种多电子设备联动控制的方法, 该方法包括: In the second aspect, this application provides a method for linkage control of multiple electronic devices, the method including:
第一电子设备获取第一规则, 第一规则指示当第一电子设备发生第一事件, 且第二电子 设备发生第二事件时, 第三电子设备执行第一功能; 第一电子设备接收到第二电子设备发送 的第二事件已发生的通知消息; 响应于接收到的第二事件已发生的通知消息, 第一电子设备 检测第一事件是否发生; 若检测到第一事件已发生, 则第一电子设备向第三电子设备发送执 行指令, 执行指令指示第三电子设备执行第一功能。 The first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the first electronic device and a second event occurs in the second electronic device, the third electronic device performs the first function; the first electronic device receives the first event 2. A notification message sent by the electronic device that the second event has occurred; in response to the received notification message that the second event has occurred, the first electronic device detects whether the first event has occurred; if it detects that the first event has occurred, An electronic device sends an execution instruction to a third electronic device, and the execution instruction instructs the third electronic device to perform the first function.
其中, 第一电子设备和第二电子设备为第一规则中的条件设备, 第一事件为第一电子设 备对应的触发事件或触发条件。 第二事件为第二电子设备对应的触发事件或触发条件。 第三 电子设备为执行设备, 第一功能为第一规则中第三电子设备对应的执行事件。 The first electronic device and the second electronic device are conditional devices in the first rule, and the first event is a trigger event or trigger condition corresponding to the first electronic device. The second event is a trigger event or trigger condition corresponding to the second electronic device. The third electronic device is an execution device, and the first function is an execution event corresponding to the third electronic device in the first rule.
本申请中, 由条件设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备, 例如执行设备。 在 IFTTT规则中的某个或某些条件设备发生触发事件后, 可以直接通过本地 网络通知其他条件设备。 其他条件设备在确定满足 IFTTT规则后, 指示执行设备执行相应事 件, 即完成联动, 提升了联动效率。 In this application, the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule, such as the execution device. After a trigger event occurs on one or some conditional devices in the IFTTT rule, other conditional devices can be notified directly through the local network. After the other conditional device determines that it meets the IFTTT rules, it instructs the executing device to execute the corresponding event, that is, complete the linkage, which improves the linkage efficiency.
第三方面、 本申请提供的一种多电子设备联动控制的方法, 该方法包括: In a third aspect, this application provides a method for linkage control of multiple electronic devices, the method including:
第一电子设备获取第一规则, 第一规则指示当第一电子设备发生第一事件, 且第二电子 设备发生第二事件时, 第三电子设备执行第一功能; 第一电子设备检测到已发生第一事件; 响应于检测到已发生第一事件, 第一电子设备向第二电子设备发送查询第二事件是否发生的 消息; 第一电子设备接收到第二电子设备发送的第二事件已发生的通知消息; 响应于接收到 的第二事件已发生的通知消息, 第一电子设备向第三电子设备发送执行指令, 执行指令指示 第三电子设备执行第一功能。 The first electronic device acquires the first rule, where the first rule indicates that when the first event occurs in the first electronic device and the second event occurs in the second electronic device, the third electronic device executes the first function; the first electronic device detects that it has A first event occurs; in response to detecting that the first event has occurred, the first electronic device sends a message to the second electronic device to query whether the second event has occurred; the first electronic device receives the second event sent by the second electronic device A notification message that has occurred; in response to the received notification message that the second event has occurred, the first electronic device sends an execution instruction to the third electronic device, and the execution instruction instructs the third electronic device to perform the first function.
其中, 第一电子设备和第二电子设备为第一规则中的条件设备, 第一事件为第一电子设 备对应的触发事件或触发条件。 第二事件为第二电子设备对应的触发事件或触发条件。 第三 电子设备为执行设备, 第一功能为第一规则中第三电子设备对应的执行事件。 The first electronic device and the second electronic device are conditional devices in the first rule, and the first event is a trigger event or trigger condition corresponding to the first electronic device. The second event is a trigger event or trigger condition corresponding to the second electronic device. The third electronic device is an execution device, and the first function is an execution event corresponding to the third electronic device in the first rule.
本申请中, 由执行设备和部分条件设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的 其他电子设备, 例如: 其他条件设备。 当获取 IFTTT规则的某个条件设备发生触发事件后, 可以查询其他条件设备的触发事件, 或者可以通知执行设备, 由执行设备条件设备去查询其 他条件设备的触发事件。 最后, 当确定所有条件设备的触发条件均发生后, 执行设备执行相 应事件, 即完成联动, 提升联动效率。 In this application, the executing device and some conditional devices obtain the IFTTT rules in advance, and discover other electronic devices in the IFTTT rules, such as other conditional devices. When a trigger event occurs on a certain condition device of the IFTTT rule, the trigger event of other condition devices can be queried, or the executing device can be notified, and the executing device condition device can query the trigger event of other condition devices. Finally, when it is determined that the triggering conditions of all the conditional devices have occurred, the execution device executes the corresponding event, which completes the linkage and improves the linkage efficiency.
第四方面、 本申请提供的一种多电子设备联动控制的系统, 包括第一电子设备和第二电 子设备; 第一电子设备, 用于获取第一规则, 第一规则指示当第二电子设备发生第一事件时, 第一电子设备执行第一功能; 根据第一规则, 向第二电子设备发送针对第一事件的订阅消息; 第二电子设备, 用于当检测到已发生第一事件时, 向第一电子设备发送第一事件的通知消息; 第一电子设备, 还用于响应于接收到的第一事件的通知消息, 根据第一规则执行第一功能。 In a fourth aspect, a system for linkage control of multiple electronic devices provided by the present application includes a first electronic device and a second electronic device; the first electronic device is used to obtain a first rule, and the first rule indicates when the second electronic device When the first event occurs, the first electronic device executes the first function; according to the first rule, sends a subscription message for the first event to the second electronic device; and the second electronic device is used when detecting that the first event has occurred Send a notification message of the first event to the first electronic device; the first electronic device is further configured to perform the first function according to the first rule in response to the received notification message of the first event.
一种可能的实现方式中, 该系统还包括第三电子设备和第四电子设备, 第一电子设备, 还用于获取第二规则, 第二规则指示当第三电子设备发生第二事件, 且第四电子设备发送第 三事件时, 则第一电子设备执行第二功能; 根据第二规则, 向第三电子设备发送针对第二事 件的订阅消息; 第三电子设备, 用于当检测到已发生第二事件时, 向第一电子设备发送第二 事件已发生的通知消息; 第一电子设备, 还用于确定第四电子设备是否发生第三事件; 响应 于确定第四电子设备发生第三事件, 根据第二规则执行第二功能。 In a possible implementation manner, the system further includes a third electronic device and a fourth electronic device. The first electronic device is also used to obtain a second rule, and the second rule indicates when a second event occurs on the third electronic device, and When the fourth electronic device sends the third event, the first electronic device executes the second function; according to the second rule, sends a subscription message for the second event to the third electronic device; and the third electronic device is used when it is detected When the second event occurs, send the second A notification message that an event has occurred; the first electronic device is also used to determine whether a third event has occurred in the fourth electronic device; in response to determining that the third event has occurred in the fourth electronic device, the second function is executed according to the second rule.
第五方面、 本申请提供的一种第一电子设备, 包括: 处理器和存储器, 存储器与处理器 耦合, 存储器用于存储计算机程序代码, 计算机程序代码包括计算机指令, 当计算机指令被 第一电子设备执行时, 使得第一电子设备执行如下操作: In a fifth aspect, a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes. The computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
获取第一规则, 第一规则指示当第二电子设备发生第一事件时, 第一电子设备执行第一 功能; 根据第一规则, 向第二电子设备发送针对第一事件的订阅消息; 接收第二电子设备发 送的第一事件的通知消息; 响应于接收到的第一事件的通知消息, 根据第一规则执行第一功 能。 Acquire a first rule, where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device performs the first function; according to the first rule, sends a subscription message for the first event to the second electronic device; 2. A notification message of the first event sent by the electronic device; in response to the received notification message of the first event, the first function is executed according to the first rule.
一种可能的实现方式中, 该第一电子设备还获取第二规则, 第二规则指示当第三电子设 备发生第二事件, 且第四电子设备发送第三事件时, 则第一电子设备执行第二功能; 根据第 二规则, 向第三电子设备发送针对第二事件的订阅消息; 接收到第三电子设备发送的第二事 件的通知消息; 获取第四电子设备是否发生第三事件; 响应于获取到第四电子设备发生第三 事件, 根据第二规则执行第二功能。 In a possible implementation manner, the first electronic device also obtains a second rule, and the second rule indicates that when a second event occurs on the third electronic device and the fourth electronic device sends the third event, the first electronic device executes Second function; Send a subscription message for the second event to the third electronic device according to the second rule; Receive a notification message for the second event sent by the third electronic device; Obtain whether the third event has occurred on the fourth electronic device; Response Upon acquiring that the third event occurs in the fourth electronic device, the second function is executed according to the second rule.
一种可能的实现方式中, 响应于获取到第四电子设备发生第三事件, 根据第二规则执行 第二功能, 具体为: 响应于接收第四电子设备发送的已发生第三事件的通知消息, 根据第二 规则执行第二功能。 In a possible implementation manner, in response to acquiring that the third event has occurred in the fourth electronic device, executing the second function according to the second rule is specifically: in response to receiving a notification message sent by the fourth electronic device that the third event has occurred , Perform the second function according to the second rule.
一种可能的实现方式中, 当计算机指令被第一电子设备执行时, 还使得第一电子设备执 行如下操作: In a possible implementation manner, when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations:
响应于接收到第三电子设备发送的第二事件的通知消息, 第一电子设备向第四电子设备 发送查询第三事件是否发生的消息。 In response to receiving the notification message of the second event sent by the third electronic device, the first electronic device sends a message inquiring whether the third event has occurred to the fourth electronic device.
一种可能的实现方式中, 当计算机指令被第一电子设备执行时, 还使得第一电子设备执 行如下操作: 根据第二规则, 获取第三电子设备的地址和第四电子设备的地址。 In a possible implementation manner, when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations: Acquire the address of the third electronic device and the address of the fourth electronic device according to the second rule.
一种可能的实现方式中, 第二规则包括第三电子设备的标识和第四电子设备的标识; 根 据第二规则, 获取第三电子设备的地址和第四电子设备的地址, 具体包括: 组播或广播第一 消息, 第一消息包括第三电子设备的标识和第四电子设备的标识; 接收第三电子设备返回的 第三电子设备的地址; 电子设备接收第四电子设备返回的第四电子设备的地址。 In a possible implementation manner, the second rule includes the identification of the third electronic device and the identification of the fourth electronic device; according to the second rule, obtaining the address of the third electronic device and the address of the fourth electronic device specifically includes: Broadcast or broadcast the first message, the first message includes the identification of the third electronic device and the identification of the fourth electronic device; receiving the address of the third electronic device returned by the third electronic device; the electronic device receiving the fourth electronic device returned by the fourth electronic device The address of the electronic device.
一种可能的实现方式中, 当计算机指令被第一电子设备执行时, 还使得第一电子设备执 行如下操作: 检测第二规则的合法性和 /或完整性。 In a possible implementation manner, when the computer instruction is executed by the first electronic device, the first electronic device is also caused to perform the following operations: detecting the legality and/or integrity of the second rule.
一种可能的实现方式中, 获取第二规则具体为: 从服务器或第五电子设备获取第二规则。 第六方面、 本申请提供的一种第一电子设备, 包括: 处理器和存储器, 存储器与处理器 耦合, 存储器用于存储计算机程序代码, 计算机程序代码包括计算机指令, 当计算机指令被 第一电子设备执行时, 使得第一电子设备执行如下操作: In a possible implementation manner, obtaining the second rule specifically includes: obtaining the second rule from the server or the fifth electronic device. In a sixth aspect, a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes. The computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
获取第一规则, 第一规则指示当第一电子设备发生第一事件, 且第二电子设备发生第二 事件时, 第三电子设备执行第一功能; 接收到第二电子设备发送的第二事件已发生的通知消 息; 响应于接收到的第二事件已发生的通知消息, 检测第一事件是否发生; 若检测到第一事 件已发生, 则向第三电子设备发送执行指令, 执行指令指示第三电子设备执行第一功能。 Acquire the first rule, where the first rule indicates that when the first event occurs in the first electronic device and the second event occurs in the second electronic device, the third electronic device performs the first function; and the second event sent by the second electronic device is received Notification message that has occurred; in response to the received notification message that the second event has occurred, detect whether the first event has occurred; if it is detected that the first event has occurred, send an execution instruction to the third electronic device, and the execution instruction instruction Three electronic devices perform the first function.
第七方面, 本申请提供的一种第一电子设备, 包括: 处理器和存储器, 存储器与处理器 耦合, 存储器用于存储计算机程序代码, 计算机程序代码包括计算机指令, 当计算机指令被 第一电子设备执行时, 使得第一电子设备执行如下操作: In a seventh aspect, a first electronic device provided by the present application includes: a processor and a memory, the memory is coupled to the processor, and the memory is used to store computer program codes. The computer program codes include computer instructions. When the device is executed, the first electronic device is caused to perform the following operations:
获取第一规则, 第一规则指示当第一电子设备发生第一事件, 且第二电子设备发生第二 事件时, 第三电子设备执行第一功能; 检测到已发生第一事件; 响应于检测到已发生第一事 件, 向第二电子设备发送查询第二事件是否发生的消息; 接收到第二电子设备发送的第二事 件已发生的通知消息; 响应于接收到的第二事件已发生的通知消息, 向第三电子设备发送执 行指令, 执行指令指示第三电子设备执行第一功能。 Acquire the first rule, the first rule indicates that when a first event occurs on the first electronic device, and a second event occurs on the second electronic device When an event occurs, the third electronic device executes the first function; detects that the first event has occurred; in response to detecting that the first event has occurred, sends a message to the second electronic device to query whether the second event has occurred; receives the second electronic device A notification message sent by the device that the second event has occurred; in response to the received notification message that the second event has occurred, an execution instruction is sent to the third electronic device, and the execution instruction instructs the third electronic device to perform the first function.
第八方面、 一种计算机存储介质, 包括计算机指令, 当计算机指令在终端上运行时, 使 得终端执行如第一方面至第三方面及其中任一种可能的实现方式中所述的方法。 In an eighth aspect, a computer storage medium includes computer instructions, and when the computer instructions run on a terminal, the terminal is caused to execute the method described in the first aspect to the third aspect and any one of the possible implementation manners thereof.
第九方面、 一种计算机程序产品, 当计算机程序产品在计算机上运行时, 使得计算机执 行如第一方面至第三方面中及其中任一种可能的实现方式中所述的方法。 A ninth aspect, a computer program product, when the computer program product runs on a computer, causes the computer to execute the method described in the first aspect to the third aspect and any one of the possible implementation manners.
附图说明 Description of the drawings
图 1为本申请实施例提供的一种多电子设备联动控制的系统的结构示意图; FIG. 1 is a schematic structural diagram of a system for linkage control of multiple electronic devices according to an embodiment of the application;
图 2A为本申请实施例提供的一种电子设备的硬件结构示意图; 2A is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of this application;
图 2B为本申请实施例提供的一种电子设备的软件结构示意图; 2B is a schematic diagram of the software structure of an electronic device provided by an embodiment of this application;
图 3A为本申请实施例提供的一种电子设备的界面示意图; FIG. 3A is a schematic diagram of an interface of an electronic device provided by an embodiment of this application;
图 3B为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3B is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3C为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3C is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3D为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3D is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3E为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3E is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3F为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3F is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3G为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3G is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 3H为本申请实施例提供的又一种电子设备的界面示意图; FIG. 3H is a schematic diagram of an interface of another electronic device provided by an embodiment of the application;
图 31为本申请实施例提供的又一种电子设备的界面示意图; FIG. 31 is a schematic diagram of an interface of another electronic device provided by an embodiment of this application;
图 4A为本申请实施例提供的一种多电子设备联动控制的方法的流程示意图; 4A is a schematic flowchart of a method for linkage control of multiple electronic devices according to an embodiment of the application;
图 4B为本申请实施例提供的又一种多电子设备联动控制的方法的流程示意图; 图 5A为本申请实施例提供的又一种多电子设备联动控制的方法的流程示意图; 图 5B为本申请实施例提供的又一种多电子设备联动控制的方法的流程示意图; 图 6A为本申请实施例提供的又一种多电子设备联动控制的方法的流程示意图; 图 6B为本申请实施例提供的又一种多电子设备联动控制的方法的流程示意图; 图 7为本申请实施例提供的又一种电子设备的结构示意图; 4B is a schematic flowchart of another method for linkage control of multiple electronic devices according to an embodiment of this application; FIG. 5A is a schematic flowchart of another method for linkage control of multiple electronic devices according to an embodiment of this application; A schematic flowchart of another method for linkage control of multiple electronic devices provided by an embodiment of the application; FIG. 6A is a schematic flowchart of another method for linkage control of multiple electronic devices provided by an embodiment of the application; FIG. 6B is provided by an embodiment of the application A schematic flowchart of another method for linkage control of multiple electronic devices; FIG. 7 is a schematic structural diagram of another electronic device according to an embodiment of the application;
图 8为本申请实施例提供的又一种电子设备的结构示意图。 FIG. 8 is a schematic structural diagram of yet another electronic device provided by an embodiment of the application.
具体实施方式 detailed description
下面将结合本申请实施例中的附图, 对本申请实施例中的技术方案进行描述。 其中, 在 本申请实施例的描述中, 除非另有说明, “/”表示或的意思, 例如, A/B可以表示 A或 B ; 本 文中的“和 /或”仅仅是一种描述关联对象的关联关系, 表示可以存在三种关系, 例如, A 和 / 或 B , 可以表示: 单独存在 A, 同时存在 A和 B , 单独存在 B这三种情况。 The technical solutions in the embodiments of the present application will be described below in conjunction with the drawings in the embodiments of the present application. Wherein, in the description of the embodiments of the present application, unless otherwise specified, "/" means or, for example, A/B can mean A or B; "and/or" in this document is only a description of related objects The association relationship of indicates that there can be three kinds of relationships. For example, A and/or B can indicate: A alone exists, A and B exist at the same time, and B alone exists.
以下, 术语 “第一”、 “第二” 仅用于描述目的, 而不能理解为指示或暗示相对重要性或 者隐含指明所指示的技术特征的数量。 由此, 限定有 “第一”、 “第二” 的特征可以明示或者 隐含地包括一个或者更多个该特征。 在本申请实施例的描述中, 除非另有说明, “多个” 的含 义是两个或两个以上。 Hereinafter, the terms “first” and “second” are only used for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Therefore, the features defined as “first” and “second” may explicitly or implicitly include one or more of these features. In the description of the embodiments of the present application, unless otherwise specified, "multiple" means two or more than two.
IFTTT规则: if this then that的缩写, 其宗旨为 Put the internet to work for you(让互联网 为你服务)。 可以筒单理解为, 如果触发了某一事件, 则执行设置好的另一事件。 也即, 若满 足了 IFTTT规则中触发条件, 则执行 IFTTT规则中对应的操作。 IFTTT rule: short for if this then that, its purpose is Put the internet to work for you. It can be simply understood that if a certain event is triggered, another set event is executed. That is, if full When the trigger condition in the IFTTT rule is satisfied, the corresponding operation in the IFTTT rule is executed.
上述触发条件, 也可以称之为触发事件, 如果 IFTTT规则中 A设备执行了某个或某些操 作, 或者 A设备检测的参数满足某个或某些条件, 则 B设备执行对应的操作, 则 A设备可以 称为条件设备, B设备可以称为执行设备。 其中, IFTTT规则中, 条件设备的数量可以是一 个或多个, 执行设备的数量可以是一个或多个, 本申请实施例不做限定。 The above trigger conditions can also be referred to as trigger events. If device A performs a certain operation or certain operations in the IFTTT rule, or a parameter detected by device A meets certain conditions or certain conditions, then device B performs the corresponding operation, then A device can be called a conditional device, and a B device can be called an execution device. Among them, in the IFTTT rule, the number of conditional devices may be one or more, and the number of execution devices may be one or more, which is not limited in the embodiment of the present application.
例如: 一条 IFTTT规则为: 如果 A设备执行了某个或某些操作 (或者 A设备检测的参 数满足某个或某些条件), 并且, C设备执行了某个或某些操作(或者 C设备检测的参数满足 某个或某些条件), 则 B设备执行对应的操作。 在该条 IFTTT规则中, A设备和 C设备均为 条件设备, B设备为执行设备。 For example: An IFTTT rule is: If device A performs a certain operation (or the parameters detected by device A meets certain conditions), and device C performs a certain operation (or device C The detected parameter satisfies one or some conditions), then the B device executes the corresponding operation. In this IFTTT rule, device A and device C are both conditional devices, and device B is the execution device.
又例如: 另一条 IFTTT规则为: 如果 A设备执行了某个或某些操作 (或者 A设备检测 的参数满足某个或某些条件), 则 B设备执行相应的操作, JL D设备执行相应的操作。 在该 条 IFTTT规则中, A设备条件设备, B设备和 D设备为执行设备。 Another example: Another IFTTT rule is: If device A performs a certain operation (or the parameters detected by device A meets certain conditions), device B performs the corresponding operation, and device JLD performs the corresponding operation operating. In this IFTTT rule, A device conditional device, B device and D device are execution devices.
需要说明的是, 在一些实施例中, IFTTT规则中也可以没有条件设备, 那么执行设备可 以根据例如本地的时间, 自动执行相应的操作。 It should be noted that, in some embodiments, there may be no conditional device in the IFTTT rule, and the executing device may automatically perform corresponding operations according to, for example, the local time.
在现有技术中, 基于 IFTTT规则的多个电子设备联动过程都是基于集中式控制的方案。 例如: 当条件设备的触发事件发生后, 会将触发事件通过互联网传递到控制设备, 由控制设 备进行逻辑判断后, 再通过互联网向执行设备发送执行命令, 而后执行设备执行相应操作。 由于多个电子设备需要通过互联网进行通信,联动过程必然会受到互联网的连接状态的影响, 造成时延长且不稳定的情况。 此外, 多个电子设备可以为用户的家居设备, 将家居设备的状 态以及 IFTTT规则的执行情况上传到互联网, 信息一旦泄露, 存在极大的安全风险。 In the prior art, multiple electronic device linkage processes based on IFTTT rules are all based on a centralized control scheme. For example: When a trigger event of a conditional device occurs, the trigger event will be transmitted to the control device via the Internet. After the control device makes a logical judgment, the execution command is sent to the execution device via the Internet, and then the execution device executes the corresponding operation. Since multiple electronic devices need to communicate via the Internet, the linkage process will inevitably be affected by the connection status of the Internet, resulting in a prolonged and unstable situation. In addition, multiple electronic devices can be the user's household equipment. The status of the household equipment and the implementation of the IFTTT rules are uploaded to the Internet. Once the information is leaked, there is a great security risk.
为此, 本申请实施例提供的一种控制方法, 可用于至少两个电子设备之间的联动控制。 在这至少两个电子设备之间的联动过程中, 各个电子设备之间可以通过本地连接直接进行通 信, 完成联动。 也就是说, 在这至少两个电子设备完成的联动过程中, 不再采用现有技术中 的集中式控制的方法, 即, 不再需要通过控制设备进行中转。 To this end, a control method provided by an embodiment of the present application can be used for linkage control between at least two electronic devices. In the linkage process between these at least two electronic devices, each electronic device can directly communicate through a local connection to complete the linkage. That is to say, during the linkage process of at least two electronic devices, the centralized control method in the prior art is no longer used, that is, it is no longer necessary to transfer through the control device.
这样, 一方面, 可以避免互联网的连接状态对多个电子设备之间的联动造成的影响, 也 可以避免将多个电子设备的信息上传互联网而带来的安全风险。 另一方面, 也有利于消除因 控制设备的中转带来的时延, 以及因控制设备的断开连接, 造成联动失败的情况, 提升了电 子设备之间联动的效率和稳定性。 In this way, on the one hand, the influence of the connection state of the Internet on the linkage between multiple electronic devices can be avoided, and the security risk caused by uploading information of multiple electronic devices to the Internet can also be avoided. On the other hand, it is also beneficial to eliminate the time delay caused by the transfer of the control device, and the linkage failure caused by the disconnection of the control device, which improves the efficiency and stability of the linkage between the electronic devices.
如图 1所示, 为本申请实施例提供的一种多个电子设备联动的系统, 该系统包括: 电子 设备 10(电子设备 A), 服务器 11以及本地网络的一个或多个电子设备 12 (电子设备 B X 其中, 电子设备 10(电子设备 A), 用于提供该系统与用户的交互界面, 以便用户设置 IFTTT规则。 在一些实施例中, 电子设备 10(电子设备 A)将设置好的 IFTTT规则通过服务 器 11下发到本地网络中的电子设备 12(电子设备 B)。在另一些实施例中, 电子设备 10(电 子设备 A)也可以与本地网络的电子设备 12(电子设备 B)建立本地连接,那么, 电子设备 10 (电子设备 A)也可以通过本地连接, 将设置好的 IFTTT规则发送给电子设备 12(电子设备 B), 本申请实施例对此不做限定。 As shown in FIG. 1, a system for linkage of multiple electronic devices provided by this embodiment of the present application includes: an electronic device 10 (electronic device A), a server 11, and one or more electronic devices 12 ( Electronic device BX Wherein, the electronic device 10 (electronic device A) is used to provide an interactive interface between the system and the user, so that the user can set IFTTT rules. In some embodiments, the electronic device 10 (electronic device A) will set the IFTTT The rules are delivered to the electronic device 12 (electronic device B) in the local network through the server 11. In other embodiments, the electronic device 10 (electronic device A) can also be established with the electronic device 12 (electronic device B) in the local network Local connection, then, the electronic device 10 (electronic device A) may also send the set IFTTT rules to the electronic device 12 (electronic device B) through the local connection, which is not limited in the embodiment of the present application.
而后, 本地网络的电子设备 12(电子设备 B)可以基于获取到的 IFTTT规则, 进行本地 网络的多个电子设备 12 (电子设备 B)之间的联动。 Then, the electronic device 12 (electronic device B) of the local network may perform linkage between multiple electronic devices 12 (electronic device B) of the local network based on the obtained IFTTT rule.
示例性的, 电子设备 10(电子设备 A)在具体的实现中, 可以为手机、 平板电脑、 个人 计算机( Personal Computer, PC)、 个人数字助理( personal digital assistant, PDA)、 智能手 表、 上网本、 可穿戴电子设备、 增强现实技术( Augmented Reality, AR)设备、 智能音响 等。 Exemplarily, in a specific implementation, the electronic device 10 (electronic device A) may be a mobile phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a smart watch, a netbook, Wearable electronic devices, Augmented Reality (AR) devices, smart speakers Wait.
其中, 电子设备 10(电子设备 A)可以通过有线、 WIFI、 移动数据网或者其他连接方式 与服务器 11建立连接。 Wherein, the electronic device 10 (electronic device A) can establish a connection with the server 11 through a wired, WIFI, mobile data network or other connection methods.
本申请实施例中的电子设备 10(电子设备 A)的结构可以参考图 2A所示的电子设备 100 的结构, 以及图 2B所示的电子设备 100的软件结构示意图。 The structure of the electronic device 10 (electronic device A) in the embodiment of the present application can refer to the structure of the electronic device 100 shown in FIG. 2A and the schematic diagram of the software structure of the electronic device 100 shown in FIG. 2B.
示例性的, 电子设备 12 (电子设备 B)在具体的实现中, 可以是智能家居的硬件设备, 可以包括移动终端、 家用电器以及传感器设备等。 例如: 电子设备 12 (电子设备 B)可以是 智能手机、 智能电视、 智能灯、 智能插座、 空气净化器、 加湿器、 智能油烟机、 智能台灯、 智能音箱、 智能门锁、 智能插线板、 智能电磁炉、 智能摄像头等。 再例如: 电子设备 12(电 子设备 B)还可以是烟雾传感器(用于检测房间内是否有燃气泄漏)、 人体感应器(用于感应 是否有人体通过)、 温度传感器(用于检测房间或物品的温度值)、 湿度传感器 (用于检测房 间的湿度值)、 门窗感应器(用于感知门窗是否开启或关闭)、 PM2.5 空气传感器(用于检测 房间 PM2.5的含值)等。 Exemplarily, in a specific implementation, the electronic device 12 (electronic device B) may be a hardware device of a smart home, and may include mobile terminals, household appliances, and sensor devices. For example: Electronic device 12 (electronic device B) can be smart phones, smart TVs, smart lights, smart sockets, air purifiers, humidifiers, smart range hoods, smart desk lamps, smart speakers, smart door locks, smart patch panels, Smart induction cooker, smart camera, etc. Another example: electronic device 12 (electronic device B) can also be a smoke sensor (used to detect whether there is a gas leak in the room), a human sensor (used to sense whether a human body passes through), a temperature sensor (used to detect the room or objects The temperature value of the room), humidity sensor (used to detect the humidity value of the room), door and window sensors (used to sense whether doors and windows are open or closed), PM2.5 air sensor (used to detect the value of PM2.5 in the room), etc.
其中, 本地网络中的电子设备 12(电子设备 B)可以通过有线、 WIFI、 移动数据网或者 其他连接方式与服务器 11建立连接, 或者通过局域网中的路由器与服务器 11建立连接。 其 中, 服务器 11可以为家居云, IoT( Internet of Things, 物联网)等的服务器或者服务器集群, 可以将家居中的各种电子电气设备连接起来, 统一管理、 远程监控和资源共享等, 实现了高 效、 便利的生活环境。 需要注意的是, 本地网络中全部的电子设备 12(电子设备 B)可以都 与服务器 11 建立连接, 也可以由其中一部分电子设备 12(电子设备 B)(需要获取 IFTTT 规则的电子设备 12(电子设备 B)) 与服务器 11建立连接, 本申请实施例不做具体限定。 Wherein, the electronic device 12 (electronic device B) in the local network can establish a connection with the server 11 through wired, WIFI, mobile data network or other connection methods, or establish a connection with the server 11 through a router in the local area network. Among them, the server 11 can be a home cloud, IoT (Internet of Things, Internet of Things) server or a server cluster, which can connect various electrical and electronic equipment in the home for unified management, remote monitoring and resource sharing, etc., to achieve Efficient and convenient living environment. It should be noted that all the electronic devices 12 (electronic device B) in the local network can be connected to the server 11, or some of the electronic devices 12 (electronic device B) (electronic devices 12 (electronic devices that need to obtain IFTTT rules) Device B)) Establish a connection with the server 11, which is not specifically limited in the embodiment of this application.
本地网络中的电子设备 12 (电子设备 B)之间, 可以通过有线或无线的方式建立连接, 使得电子设备 12(电子设备 B)之间可以直接进行通信。 其中, 无线连接方式例如可以为蓝 牙、 ZigBee(紫蜂)、 WiFi等任一种或任几种方式。 本申请实施例对本地网络中电子设备 12 (电子设备 B)之间的连接方式不做限定。 The electronic devices 12 (electronic device B) in the local network can be connected in a wired or wireless manner, so that the electronic devices 12 (electronic device B) can communicate directly. Among them, the wireless connection mode may be any one or several modes such as Bluetooth, ZigBee (ZigBee), and WiFi. The embodiment of the present application does not limit the connection mode between the electronic devices 12 (electronic device B) in the local network.
本申请实施例的电子设备 12(电子设备 B) 的结构可以参考图 2A所示的电子设备 100 的结构, 以及图 2B所示的电子设备 100的软件结构示意图。需要说明的是, 电子设备 12(电 子设备 B)可以包括比图示更多或更少的部件, 或者组合某些部件, 或者拆分某些部件, 或 者不同的部件布置。 图示的部件可以以硬件, 软件或软件和硬件的组合实现。 For the structure of the electronic device 12 (electronic device B) in the embodiment of the present application, reference may be made to the structure of the electronic device 100 shown in FIG. 2A and the schematic diagram of the software structure of the electronic device 100 shown in FIG. 2B. It should be noted that the electronic device 12 (electronic device B) may include more or fewer components than shown in the figure, or combine some components, or split some components, or have different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.
例如: 电子设备 12(电子设备 B) 为智能门锁时, 电子设备 12(电子设备 B)可以包 括有处理器 110、 内部存储器 121、指纹传感器 180H、无线通信模块 160(例如可以是 WLAN 通信模块)、 电池 142、 电开关等部件。 For example: when the electronic device 12 (electronic device B) is a smart door lock, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, a fingerprint sensor 180H, and a wireless communication module 160 (for example, it may be a WLAN communication module). ), battery 142, electric switch and other components.
再例如: 电子设备 12(电子设备 B) 为智能音箱时, 电子设备 12(电子设备 B)可以 包括有处理器 110、 内部存储器 121、 拾音器(例如麦克风 170C)、 无线通信模块 160(例如 可以包括 WLAN通信模块、 蓝牙通信模块等)、 电源管理模块 141、 充电管理模块 140、 电池 142、 USB接口 130、 指示器 192等部件。 For another example: when the electronic device 12 (electronic device B) is a smart speaker, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, a microphone (for example, a microphone 170C), and a wireless communication module 160 (for example, may include WLAN communication module, Bluetooth communication module, etc.), power management module 141, charging management module 140, battery 142, USB interface 130, indicator 192 and other components.
又例如: 电子设备 12(电子设备 B) 为空调时, 电子设备 12(电子设备 B)可以包括 有处理器 110、 内部存储器 121、 无线通信模块 160(例如可以包括 WLAN通信模块、 红外 信号模块等)、 电源管理模块 141、 充电管理模块 140、 制冷系统、 通风系统、 电气控制系统 和箱体系统等部件。 For another example: when the electronic device 12 (electronic device B) is an air conditioner, the electronic device 12 (electronic device B) may include a processor 110, an internal memory 121, and a wireless communication module 160 (for example, it may include a WLAN communication module, an infrared signal module, etc.) ), power management module 141, charge management module 140, refrigeration system, ventilation system, electrical control system, cabinet system and other components.
以下, 给出电子设备 100的硬件结构示意图以及说明, 电子设备 100的软件结构示意图 以及说明。 图 2A示出了电子设备 100的结构示意图。 Below, a schematic diagram and description of the hardware structure of the electronic device 100 and a schematic diagram and description of the software structure of the electronic device 100 are given. FIG. 2A shows a schematic structural diagram of the electronic device 100.
电子设备 100可以包括处理器 110, 外部存储器接口 120, 内部存储器 121, 通用串行总 线 (universal serial bus, USB)接口 130, 充电管理模块 140, 电源管理模块 141, 电池 142, 天 线 1, 天线 2, 移动通信模块 150, 无线通信模块 160, 音频模块 170, 扬声器 170A, 受话器 170B , 麦克风 170C, 耳机接口 170D, 传感器模块 180, 按键 190, 马达 191 , 指示器 192, 摄像头 193, 显示屏 194, 以及用户标识模块 (subscriber identification module, SIM)卡接口 195 等。其中传感器模块 180可以包括压力传感器 180A, 陀螺仪传感器 180B , 气压传感器 180C, 磁传感器 180D, 加速度传感器 180E, 距离传感器 180F, 接近光传感器 180G, 指纹传感器 180H, 温度传感器 180J, 触摸传感器 180K, 环境光传感器 180L, 骨传导传感器 180M等。 The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, and an antenna 2. , Mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, earphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display 194, and Subscriber identification module (subscriber identification module, SIM) card interface 195, etc. The sensor module 180 may include pressure sensor 180A, gyroscope sensor 180B, air pressure sensor 180C, magnetic sensor 180D, acceleration sensor 180E, distance sensor 180F, proximity light sensor 180G, fingerprint sensor 180H, temperature sensor 180J, touch sensor 180K, ambient light Sensor 180L, bone conduction sensor 180M, etc.
可以理解的是, 本发明实施例示意的结构并不构成对电子设备 100的具体限定。 在本申 请另一些实施例中, 电子设备 100可以包括比图示更多或更少的部件, 或者组合某些部件, 或者拆分某些部件, 或者不同的部件布置。 图示的部件可以以硬件, 软件或软件和硬件的组 合实现。 It can be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or combine certain components, or disassemble certain components, or arrange different components. The components shown in the figure can be implemented in hardware, software or a combination of software and hardware.
处理器 110 可以包括一个或多个处理单元, 例如: 处理器 110 可以包括应用处理器 (application processor, AP) , 调制解调处理器, 图形处理器 (graphics processing unit, GPU) , 图像信号处理器 (image signal processor, ISP), 控制器, 存储器, 视频编解码器, 数字信号处 理器 (digital signal processor , DSP) , 基带处理器, 和 /或神经网络处理器 (neural-network processing unit, NPU)等。 其中, 不同的处理单元可以是独立的器件, 也可以集成在一个或多 个处理器中。 The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), and an image signal processor. (image signal processor, ISP), controller, memory, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (NPU) Wait. Among them, the different processing units may be independent devices or integrated in one or more processors.
其中, 控制器可以是电子设备 100的神经中枢和指挥中心。 控制器可以根据指令操作码 和时序信号, 产生操作控制信号, 完成取指令和执行指令的控制。 Wherein, the controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the command operation code and timing signals to complete the control of fetching and executing commands.
处理器 110中还可以设置存储器, 用于存储指令和数据。 在一些实施例中, 处理器 110 中的存储器为高速缓冲存储器。 该存储器可以保存处理器 110刚用过或循环使用的指令或数 据。 如果处理器 110需要再次使用该指令或数据, 可从所述存储器中直接调用。 避免了重复 存取, 减少了处理器 110的等待时间, 因而提高了系统的效率。 A memory may also be provided in the processor 110 to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that the processor 110 has just used or used cyclically. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Repeated accesses are avoided, the waiting time of the processor 110 is reduced, and the efficiency of the system is improved.
在一些实施例中, 处理器 110 可以包括一个或多个接口。 接口可以包括集成电路 (inter- integrated circuit, I2C)接口, 集成电路内置音频 (inter-integrated circuit sound, I2S)接口, 脉冲编码调制 (pulse code modulation, PCM)接口,通用异步收发传输器 (universal asynchronous receiver/transmitter , UART)接口, 移动产业处理器接口 (mobile industry processor interface, MIPI) , 通用输入输出 (general-purpose input/output , GPIO)接口, 用户标识模块 (subscriber identity module, SIM)接口, 和 /或通用串行总线 (universal serial bus, USB)接口等。 In some embodiments, the processor 110 may include one or more interfaces. The interface may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit sound (inter-integrated circuit sound, I2S) interface, a pulse code modulation (PCM) interface, and a universal asynchronous transmitter (universal asynchronous transmitter) interface. receiver/transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (SIM) interface, and / Or universal serial bus (USB) interface, etc.
I2C接口是一种双向同步串行总线, 包括一根串行数据线 (serial data line, SDA)和一根串 行时钟线 (derail clock line, SCL)。 在一些实施例中, 处理器 110可以包含多组 I2C总线。 处 理器 110可以通过不同的 I2C总线接口分别耦合触摸传感器 180K, 充电器, 闪光灯, 摄像头 193等。 例如: 处理器 110可以通过 I2C接口耦合触摸传感器 180K, 使处理器 110与触摸传 感器 180K通过 I2C总线接口通信, 实现电子设备 100的触摸功能。 The I2C interface is a two-way synchronous serial bus that includes a serial data line (SDA) and a derail clock line (SCL). In some embodiments, the processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., through different I2C bus interfaces. For example, the processor 110 may couple the touch sensor 180K through the I2C interface, so that the processor 110 and the touch sensor 180K communicate through the I2C bus interface to realize the touch function of the electronic device 100.
I2S接口可以用于音频通信。 在一些实施例中, 处理器 110可以包含多组 I2S总线。 处理 器 110可以通过 I2S总线与音频模块 170耦合, 实现处理器 110与音频模块 170之间的通信。 在一些实施例中, 音频模块 170可以通过 I2S接口向无线通信模块 160传递音频信号, 实现 通过蓝牙耳机接听电话的功能。 The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled with the audio module 170 through an I2S bus to implement communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.
PCM接口也可以用于音频通信, 将模拟信号抽样, 量化和编码。 在一些实施例中, 音频 模块 170与无线通信模块 160可以通过 PCM总线接口耦合。 在一些实施例中, 音频模块 170 也可以通过 PCM接口向无线通信模块 160传递音频信号,实现通过蓝牙耳机接听电话的功能。 所述 I2S接口和所述 PCM接口都可以用于音频通信。 The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, audio The module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
UART接口是一种通用串行数据总线, 用于异步通信。 该总线可以为双向通信总线。 它 将要传输的数据在串行通信与并行通信之间转换。 在一些实施例中, UART接口通常被用于 连接处理器 110与无线通信模块 160。例如: 处理器 110通过 UART接口与无线通信模块 160 中的蓝牙模块通信, 实现蓝牙功能。 在一些实施例中, 音频模块 170可以通过 UART接口向 无线通信模块 160传递音频信号, 实现通过蓝牙耳机播放音乐的功能。 The UART interface is a universal serial data bus used for asynchronous communication. The bus can be a two-way communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 through the UART interface to implement the Bluetooth function. In some embodiments, the audio module 170 may transmit audio signals to the wireless communication module 160 through the UART interface, so as to realize the function of playing music through the Bluetooth headset.
MIPI接口可以被用于连接处理器 110与显示屏 194, 摄像头 193等外围器件。 MIPI接口 包括摄像头串行接口 (camera serial interface, CSI) , 显示屏串行接口 (display serial interface, DSI)等。 在一些实施例中, 处理器 110和摄像头 193通过 CSI接口通信, 实现电子设备 100 的拍摄功能。 处理器 110和显示屏 194通过 DSI接口通信, 实现电子设备 100的显示功能。 The MIPI interface can be used to connect the processor 110 with the display screen 194, the camera 193 and other peripheral devices. MIPI interface includes camera serial interface (CSI), display serial interface (DSI) and so on. In some embodiments, the processor 110 and the camera 193 communicate through a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to realize the display function of the electronic device 100.
GPIO接口可以通过软件配置。 GPIO接口可以被配置为控制信号, 也可被配置为数据信 号。 在一些实施例中, GPIO接口可以用于连接处理器 110与摄像头 193, 显示屏 194, 无线 通信模块 160, 音频模块 170, 传感器模块 180等。 GPIO接口还可以被配置为 I2C接口, I2S 接口, UART接口, MIPI接口等。 The GPIO interface can be configured through software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with the camera 193, the display screen 194, the wireless communication module 160, the audio module 170, the sensor module 180, and so on. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, etc.
USB接口 130是符合 USB标准规范的接口, 具体可以是 Mini USB接口, Micro USB接 口, USB Type C接口等。 USB接口 130可以用于连接充电器为电子设备 100充电, 也可以用 于电子设备 100与外围设备之间传输数据。 也可以用于连接耳机, 通过耳机播放音频。 该接 口还可以用于连接其他电子设备, 例如 AR设备等。 The USB interface 130 is an interface that complies with the USB standard specification, and specifically may be a Mini USB interface, a Micro USB interface, a USB Type C interface, and so on. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones and play audio through headphones. This interface can also be used to connect other electronic devices, such as AR devices.
可以理解的是, 本发明实施例示意的各模块间的接口连接关系, 只是示意性说明, 并不 构成对电子设备 100的结构限定。 在本申请另一些实施例中, 电子设备 100也可以采用上述 实施例中不同的接口连接方式, 或多种接口连接方式的组合。 It can be understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely illustrative, and does not constitute a structural limitation of the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection modes in the foregoing embodiments, or a combination of multiple interface connection modes.
充电管理模块 140用于从充电器接收充电输入。 其中, 充电器可以是无线充电器, 也可 以是有线充电器。 在一些有线充电的实施例中, 充电管理模块 140可以通过 USB接口 130接 收有线充电器的充电输入。 在一些无线充电的实施例中, 充电管理模块 140可以通过电子设 备 100的无线充电线圈接收无线充电输入。 充电管理模块 140为电池 142充电的同时, 还可 以通过电源管理模块 141为电子设备供电。 The charging management module 140 is used to receive charging input from the charger. Among them, the charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive the charging input of the wired charger through the USB interface 130. In some embodiments of wireless charging, the charging management module 140 may receive the wireless charging input through the wireless charging coil of the electronic device 100. While the charging management module 140 charges the battery 142, the power management module 141 can also supply power to electronic devices.
电源管理模块 141用于连接电池 142, 充电管理模块 140与处理器 110。 电源管理模块 141接收电池 142和 /或充电管理模块 140的输入, 为处理器 110, 内部存储器 121 , 外部存储 器, 显示屏 194, 摄像头 193 , 和无线通信模块 160等供电。 电源管理模块 141还可以用于监 测电池容量, 电池循环次数, 电池健康状态 (漏电, 阻抗)等参数。 在其他一些实施例中, 电 源管理模块 141也可以设置于处理器 110中。 在另一些实施例中, 电源管理模块 141和充电 管理模块 140也可以设置于同一个器件中。 The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle times, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may also be provided in the same device.
电子设备 100的无线通信功能可以通过天线 1, 天线 2, 移动通信模块 150, 无线通信模 块 160, 调制解调处理器以及基带处理器等实现。 The wireless communication function of the electronic device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor, and the baseband processor.
天线 1和天线 2用于发射和接收电磁波信号。 电子设备 100中的每个天线可用于覆盖单 个或多个通信频带。 不同的天线还可以复用, 以提高天线的利用率。 例如: 可以将天线 1复 用为无线局域网的分集天线。 在另外一些实施例中, 天线可以和调谐开关结合使用。 Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example: Antenna 1 can be multiplexed as a diversity antenna for wireless LAN. In other embodiments, the antenna can be used in combination with a tuning switch.
移动通信模块 150可以提供应用在电子设备 100上的包括 2G/3G/4G/5G等无线通信的解 决方案。 移动通信模块 150可以包括至少一个滤波器, 开关, 功率放大器, 低噪声放大器 (low noise amplifier, LNA)等。 移动通信模块 150可以由天线 1接收电磁波, 并对接收的电磁波进 行滤波, 放大等处理, 传送至调制解调处理器进行解调。 移动通信模块 150还可以对经调制 解调处理器调制后的信号放大, 经天线 1转为电磁波辐射出去。 在一些实施例中, 移动通信 模块 150的至少部分功能模块可以被设置于处理器 110中。 在一些实施例中, 移动通信模块 150的至少部分功能模块可以与处理器 110的至少部分模块被设置在同一个器件中。 The mobile communication module 150 can provide a wireless communication solution including 2G/3G/4G/5G and the like applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) etc. The mobile communication module 150 may receive electromagnetic waves by the antenna 1, and perform processing such as filtering and amplifying the received electromagnetic waves, and then transmitting them to the modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor, and convert it into electromagnetic waves through the antenna 1 for radiation. In some embodiments, at least part of the functional modules of the mobile communication module 150 may be provided in the processor 110. In some embodiments, at least part of the functional modules of the mobile communication module 150 and at least part of the modules of the processor 110 may be provided in the same device.
调制解调处理器可以包括调制器和解调器。 其中, 调制器用于将待发送的低频基带信号 调制成中高频信号。 解调器用于将接收的电磁波信号解调为低频基带信号。 随后解调器将解 调得到的低频基带信号传送至基带处理器处理。 低频基带信号经基带处理器处理后, 被传递 给应用处理器。 应用处理器通过音频设备 (不限于扬声器 170A, 受话器 170B等)输出声音信 号, 或通过显示屏 194显示图像或视频。 在一些实施例中, 调制解调处理器可以是独立的器 件。 在另一些实施例中, 调制解调处理器可以独立于处理器 110, 与移动通信模块 150或其 他功能模块设置在同一个器件中。 The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs sound signals through audio equipment (not limited to speakers 170A, receiver 170B, etc.), or displays images or videos through the display 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be provided in the same device as the mobile communication module 150 or other functional modules.
无线通信模块 160可以提供应用在电子设备 100上的包括无线局域网 (wireless local area networks , WLAN) (如无线保真 (wireless fidelity , Wi-Fi)网络), 蓝牙 (bluetooth, BT) , 全球导 航卫星系统 (global navigation satellite system, GNSS), 调频 (frequency modulation, FM) , 近距 离无线通信技术 (near field communication, NFC) , 红外技术 (infrared, IR)等无线通信的解决 方案。 无线通信模块 160可以是集成至少一个通信处理模块的一个或多个器件。 无线通信模 块 160经由天线 2接收电磁波, 将电磁波信号调频以及滤波处理, 将处理后的信号发送到处 理器 110。 无线通信模块 160还可以从处理器 110接收待发送的信号, 对其进行调频, 放大, 经天线 2转为电磁波辐射出去。 The wireless communication module 160 can provide applications on the electronic device 100 including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (bluetooth, BT), and global navigation satellites. System (global navigation satellite system, GNSS), frequency modulation (FM), near field communication (NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be sent from the processor 110, perform frequency modulation, amplify it, and convert it into electromagnetic waves through the antenna 2 and radiate it out.
在一些实施例中, 电子设备 100的天线 1和移动通信模块 150耦合, 天线 2和无线通信 模块 160耦合, 使得电子设备 100可以通过无线通信技术与网络以及其他设备通信。 所述无 线通信技术可以包括全球移动通讯系统 (global system for mobile communications , GSM) , 通 用分组无线服务 (general packet radio service, GPRS) , 码分多址接入 (code division multiple access, CDMA) , 宽带码分多址 (wideband code division multiple access, WCDMA) , 时分码分 多址 (time-division code division multiple access, TD-SCDMA) , 长期演进 (long term evolution, LTE) , BT, GNSS , WLAN, NFC , FM, 和 /或 IR技术等。 所述 GNSS可以包括全球卫星定 位系统 (global positioning system , GPS) , 全球导航卫星系统 (global navigation satellite system, GLONASS) , 北斗卫星导航系统 (beidou navigation satellite system, BDS) , 准天顶卫星系统 (quasi-zenith satellite system, QZSS)和 /或星基增强系统 (satellite based augmentation systems, SBAS)。 In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), broadband Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC , FM, and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), and a quasi-zenith satellite system (quasi). -zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).
电子设备 100通过 GRJ, 显示屏 194, 以及应用处理器等实现显示功能。 GPU为图像处 理的微处理器, 连接显示屏 194和应用处理器。 GPU用于执行数学和几何计算, 用于图形渲 染。 处理器 110可包括一个或多个 GPU, 其执行程序指令以生成或改变显示信息。 The electronic device 100 implements a display function through GRJ, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
显示屏 194用于显示图像, 视频等。 显示屏 194包括显示面板。 显示面板可以采用液晶 显示屏 (liquid crystal display, LCD) , 有机发光二极管 (organic light-emitting diode, OLED), 有 源矩阵有机发光二极体或主动矩阵有机发光二极体 (active-matrix organic light emitting diode 的, AMOLED) , 柔性发光二极管 (flex light-emitting diode , FLED) , Miniled , MicroLed , Micro-oLed, 量子点发光二极管 (quantum dot light emitting diodes, QLED)等。 在一些实施例 中, 电子设备 100可以包括 1个或 N个显示屏 194, N为大于 1的正整数。 The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt liquid crystal display (LCD), organic light-emitting diode (OLED), active matrix organic light-emitting diode or active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diodes (QLED), etc. In some embodiments, the electronic device 100 may include one or N display screens 194, and N is a positive integer greater than one.
电子设备 100可以通过 ISP, 摄像头 193 , 视频编解码器, GPU, 显示屏 194以及应用处 理器等实现拍摄功能。 The electronic device 100 can pass ISP, camera 193, video codec, GPU, display 194 and applications The processor, etc. realize the shooting function.
ISP用于处理摄像头 193反馈的数据。 例如, 拍照时, 打开快门, 光线通过镜头被传递 到摄像头感光元件上, 光信号转换为电信号,摄像头感光元件将所述电信号传递给 ISP处理, 转化为肉眼可见的图像。 ISP还可以对图像的噪点, 亮度, 肤色进行算法优化。 ISP还可以对 拍摄场景的曝光, 色温等参数优化。 在一些实施例中, ISP可以设置在摄像头 193中。 The ISP is used to process the data fed back from the camera 193. For example, when taking a picture, the shutter is opened, the light is transmitted to the photosensitive element of the camera through the lens, the light signal is converted into an electrical signal, and the photosensitive element of the camera transfers the electrical signal to the ISP for processing and is converted into an image visible to the naked eye. ISP can also optimize the image noise, brightness, and skin color. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 193.
摄像头 193用于捕获静态图像或视频。 物体通过镜头生成光学图像投射到感光元件。 感 光元件可以是电荷接合器件 (charge coupled device , CCD)或互补金属氧化物半导体 (complementary metal-oxide-semiconductor, CMOS)光电晶体管。 感光元件把光信号转换成电 信号, 之后将电信号传递给 ISP转换成数字图像信号。 ISP将数字图像信号输出到 DSP加工 处理。 DSP将数字图像信号转换成标准的 RGB , YUV等格式的图像信号。 在一些实施例中, 电子设备 100可以包括 1个或 N个摄像头 193 , N为大于 1的正整数。 The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it to the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transfers the electrical signal to the ISP to convert it into a digital image signal. ISP outputs digital image signals to DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, and N is a positive integer greater than one.
数字信号处理器用于处理数字信号, 除了可以处理数字图像信号, 还可以处理其他数字 信号。 例如, 当电子设备 100在频点选择时, 数字信号处理器用于对频点能量进行傅里叶变 换等。 The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects the frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
视频编解码器用于对数字视频压缩或解压缩。 电子设备 100可以支持一种或多种视频编 解码器。 这样, 电子设备 100可以播放或录制多种编码格式的视频, 例如: 动态图像专家组 (moving picture experts group , MPEG)1 , MPEG2 , MPEG3 , MPEG4等。 Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in multiple encoding formats, such as: moving picture experts group (MPEG)1, MPEG2, MPEG3, MPEG4, etc.
NPU为神经网络 (neural-network , NN)计算处理器, 通过借鉴生物神经网络结构, 例如 借鉴人脑神经元之间传递模式, 对输入信息快速处理, 还可以不断的自学习。 通过 NPU可以 实现电子设备 100的智能认知等应用, 例如: 图像识别, 人脸识别, 语音识别, 文本理解等。 NPU is a neural-network (NN) computing processor. By borrowing the structure of biological neural networks, for example, the transfer mode between human brain neurons, it can quickly process input information, and it can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be implemented, such as image recognition, face recognition, voice recognition, text understanding, and so on.
外部存储器接口 120可以用于连接外部存储卡, 例如 Micro SD卡, 实现扩展电子设备 100的存储能力。 外部存储卡通过外部存储器接口 120与处理器 110通信, 实现数据存储功 能。 例如将音乐, 视频等文件保存在外部存储卡中。 The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to realize the data storage function. For example, save music, video and other files in an external memory card.
内部存储器 121可以用于存储计算机可执行程序代码, 所述可执行程序代码包括指令。 处理器 110通过运行存储在内部存储器 121的指令, 从而执行电子设备 100的各种功能应用 以及数据处理。 内部存储器 121可以包括存储程序区和存储数据区。 其中, 存储程序区可存 储操作系统, 至少一个功能所需的应用程序 (比如声音播放功能, 图像播放功能等)等。 存储 数据区可存储电子设备 100使用过程中所创建的数据 (比如音频数据, 电话本等)等。 此外, 内部存储器 121可以包括高速随机存取存储器, 还可以包括非易失性存储器, 例如至少一个 磁盘存储器件, 闪存器件, 通用闪存存储器 (universal flash storage, UFS)等。 The internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the storage program area can store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.). The storage data area can store data (such as audio data, phone book, etc.) created during the use of the electronic device 100. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), and the like.
电子设备 100可以通过音频模块 170, 扬声器 170A, 受话器 170B , 麦克风 170C, 耳机 接口 170D, 以及应用处理器等实现音频功能。 例如音乐播放, 录音等。 The electronic device 100 can implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, a headphone interface 170D, and an application processor. For example, music playback, recording, etc.
音频模块 170用于将数字音频信息转换成模拟音频信号输出, 也用于将模拟音频输入转 换为数字音频信号。 音频模块 170还可以用于对音频信号编码和解码。 在一些实施例中, 音 频模块 170可以设置于处理器 110中, 或将音频模块 170的部分功能模块设置于处理器 110 中。 The audio module 170 is used to convert digital audio information into an analog audio signal for output, and also used to convert an analog audio input into a digital audio signal. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
扬声器 170A, 也称 “喇叭”, 用于将音频电信号转换为声音信号。 电子设备 100可以通 过扬声器 170A收听音乐, 或收听免提通话。 The speaker 170A, also called a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 170A, or listen to a hands-free call.
受话器 170B , 也称 “听筒”, 用于将音频电信号转换成声音信号。 当电子设备 100接听 电话或语音信息时,可以通过将受话器 170B靠近人耳接听语音。麦克风 170C,也称“话筒”, “传声器”, 用于将声音信号转换为电信号。 当拨打电话或发送语音信息时, 用户可以通过人 嘴靠近麦克风 170C发声, 将声音信号输入到麦克风 170C。 电子设备 100可以设置至少一个 麦克风 170C。 在另一些实施例中, 电子设备 100可以设置两个麦克风 170C, 除了采集声音 信号, 还可以实现降噪功能。 在另一些实施例中, 电子设备 100还可以设置三个, 四个或更 多麦克风 170C, 实现采集声音信号, 降噪, 还可以识别声音来源, 实现定向录音功能等。 耳 机接口 170D用于连接有线耳机。 耳机接口 170D可以是 USB接口 130, 也可以是 3.5mm的 开放移动电子设备平台 (open mobile terminal platform, OMTP)标准接口, 美国蜂寫电信工业 协会 (cellular telecommunications industry association of the USA, CTIA)标准接口。 The receiver 170B, also called a "handset", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or voice message, it can receive the voice by bringing the receiver 170B close to the human ear. The microphone 170C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can The mouth is close to the microphone 170C to make a sound, and the sound signal is input to the microphone 170C. The electronic device 100 may be provided with at least one microphone 170C. In other embodiments, the electronic device 100 may be provided with two microphones 170C, which can not only collect sound signals, but also implement a noise reduction function. In some other embodiments, the electronic device 100 may also be provided with three, four or more microphones 170C, so as to collect sound signals, reduce noise, identify sound sources, and realize directional recording functions. The earphone interface 170D is used to connect wired earphones. The earphone interface 170D can be a USB interface 130, or a 3.5mm open mobile terminal platform (OMTP) standard interface, and the American cellular telecommunications industry association of the USA (CTIA) standard interface .
压力传感器 180A用于感受压力信号, 可以将压力信号转换成电信号。 在一些实施例中, 压力传感器 180A可以设置于显示屏 194。 压力传感器 180A的种类很多, 如电阻式压力传感 器, 电感式压力传感器, 电容式压力传感器等。 电容式压力传感器可以是包括至少两个具有 导电材料的平行板。 当有力作用于压力传感器 180A, 电极之间的电容改变。 电子设备 100根 据电容的变化确定压力的强度。 当有触摸操作作用于显示屏 194, 电子设备 100根据压力传 感器 180A检测所述触摸操作强度。电子设备 100也可以根据压力传感器 180A的检测信号计 算触摸的位置。 在一些实施例中, 作用于相同触摸位置, 但不同触摸操作强度的触摸操作, 可以对应不同的操作指令。 例如: 当有触摸操作强度小于第一压力阈值的触摸操作作用于短 消息应用图标时, 执行查看短消息的指令。 当有触摸操作强度大于或等于第一压力阈值的触 摸操作作用于短消息应用图标时, 执行新建短消息的指令。 The pressure sensor 180A is used to sense pressure signals and can convert the pressure signals into electrical signals. In some embodiments, the pressure sensor 180A may be provided on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, and capacitive pressure sensors. The capacitive pressure sensor may include at least two parallel plates with conductive material. When a force is applied to the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the strength of the pressure based on the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic device 100 may also calculate the touched position based on the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation strengths may correspond to different operation instructions. For example: when a touch operation whose intensity is less than the first pressure threshold is applied to the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.
陀螺仪传感器 180B可以用于确定电子设备 100的运动姿态。 在一些实施例中, 可以通 过陀螺仪传感器 180B确定电子设备 100围绕三个轴 (即, X, y和 z轴)的角速度。 陀螺仪传感 器 180B可以用于拍摄防抖。 示例性的, 当按下快门, 陀螺仪传感器 180B检测电子设备 100 抖动的角度, 根据角度计算出镜头模组需要补偿的距离, 让镜头通过反向运动抵消电子设备 100的抖动, 实现防抖。 陀螺仪传感器 180B还可以用于导航, 体感游戏场景。 The gyro sensor 180B can be used to determine the movement posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., X, y, and z axes) can be determined by the gyroscope sensor 180B. The gyro sensor 180B can be used for shooting anti-shake. Exemplarily, when the shutter is pressed, the gyro sensor 180B detects the shake angle of the electronic device 100, calculates the distance that the lens module needs to compensate according to the angle, and allows the lens to counteract the shake of the electronic device 100 through a reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.
气压传感器 180C用于测量气压。 在一些实施例中, 电子设备 100通过气压传感器 180C 测得的气压值计算海拔高度, 辅助定位和导航。 The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude based on the air pressure value measured by the air pressure sensor 180C, and assists positioning and navigation.
磁传感器 180D包括霍尔传感器。电子设备 100可以利用磁传感器 180D检测翻盖皮套的 开合。 在一些实施例中, 当电子设备 100是翻盖机时, 电子设备 100可以根据磁传感器 180D 检测翻盖的开合。 进而根据检测到的皮套的开合状态或翻盖的开合状态, 设置翻盖自动解锁 等特性。 The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip holster. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 180D. Then, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, features such as automatic flip cover unlocking are set.
加速度传感器 180E可检测电子设备 100在各个方向上 (一般为三轴)加速度的大小。 当电 子设备 100静止时可检测出重力的大小及方向。 还可以用于识别电子设备姿态, 应用于横竖 屏切换, 计步器等应用。 The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of electronic equipment, and can be used in applications such as horizontal and vertical screen switching, pedometers and so on.
距离传感器 180F, 用于测量距离。 电子设备 100可以通过红外或激光测量距离。 在一些 实施例中, 拍摄场景, 电子设备 100可以利用距离传感器 180F测距以实现快速对焦。 Distance sensor 180F, used to measure distance. The electronic device 100 can measure the distance by infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 may use the distance sensor 180F to measure the distance to achieve fast focusing.
接近光传感器 180G可以包括例如发光二极管 (LED)和光检测器, 例如光电二极管。 发光 二极管可以是红外发光二极管。电子设备 100通过发光二极管向外发射红外光。电子设备 100 使用光电二极管检测来自附近物体的红外反射光。 当检测到充分的反射光时, 可以确定电子 设备 100附近有物体。 当检测到不充分的反射光时, 电子设备 100可以确定电子设备 100附 近没有物体。 电子设备 100可以利用接近光传感器 180G检测用户手持电子设备 100贴近耳 朵通话, 以便自动熄灭屏幕达到省电的目的。 接近光传感器 180G也可用于皮套模式, 口袋 模式自动解锁与锁屏。 The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device 100 emits infrared light to the outside through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode, and the pocket mode will automatically unlock and lock the screen.
环境光传感器 180L用于感知环境光亮度。电子设备 100可以根据感知的环境光亮度自适 应调节显示屏 194亮度。环境光传感器 180L也可用于拍照时自动调节白平衡。环境光传感器 180L还可以与接近光传感器 180G配合, 检测电子设备 100是否在口袋里, 以防误触。 The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device 100 can adapt itself according to the perceived brightness of the ambient light The brightness of the display 194 should be adjusted. The ambient light sensor 180L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 180L can also cooperate with the proximity light sensor 180G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.
指纹传感器 180H用于采集指纹。 电子设备 100可以利用采集的指纹特性实现指纹解锁, 访问应用锁, 指纹拍照, 指纹接听来电等。 The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, access to the application lock, fingerprint photographs, fingerprint answering calls, and so on.
温度传感器 180J用于检测温度。 在一些实施例中, 电子设备 100利用温度传感器 180J 检测的温度, 执行温度处理策略。 例如, 当温度传感器 180J上报的温度超过阈值, 电子设备 100执行降低位于温度传感器 180J附近的处理器的性能, 以便降低功耗实施热保护。 在另一 些实施例中, 当温度低于另一阈值时, 电子设备 100对电池 142加热, 以避免低温导致电子 设备 100异常关机。在其他一些实施例中, 当温度低于又一阈值时, 电子设备 100对电池 142 的输出电压执行升压, 以避免低温导致的异常关机。 The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute the temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to avoid abnormal shutdown of the electronic device 100 due to low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperature.
触摸传感器 180K, 也称 “触控面板”。 触摸传感器 180K可以设置于显示屏 194, 由触摸 传感器 180K与显示屏 194组成触摸屏, 也称 “触控屏”。 触摸传感器 180K用于检测作用于 其上或附近的触摸操作。 触摸传感器可以将检测到的触摸操作传递给应用处理器, 以确定触 摸事件类型。 可以通过显示屏 194提供与触摸操作相关的视觉输出。 在另一些实施例中, 触 摸传感器 180K也可以设置于电子设备 100的表面, 与显示屏 194所处的位置不同。 Touch sensor 180K, also called "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch screen is composed of the touch sensor 180K and the display screen 194, which is also called a “touch screen”. The touch sensor 180K is used to detect touch operations on or near it. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. The display screen 194 can provide visual output related to the touch operation. In other embodiments, the touch sensor 180K may also be disposed on the surface of the electronic device 100, which is different from the position of the display screen 194.
骨传导传感器 180M可以获取振动信号。 在一些实施例中, 骨传导传感器 180M可以获 取人体声部振动骨块的振动信号。 骨传导传感器 180M也可以接触人体脉搏, 接收血压跳动 信号。 在一些实施例中, 骨传导传感器 180M也可以设置于耳机中, 结合成骨传导耳机。 音 频模块 170可以基于所述骨传导传感器 180M获取的声部振动骨块的振动信号, 解析出语音 信号, 实现语音功能。 应用处理器可以基于所述骨传导传感器 180M获取的血压跳动信号解 析心率信息, 实现心率检测功能。 The bone conduction sensor 180M can acquire vibration signals. In some embodiments, the bone conduction sensor 180M can obtain the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 180M can also contact the human pulse and receive the blood pressure pulse signal. In some embodiments, the bone conduction sensor 180M may also be provided in the earphone, combined with the bone conduction earphone. The audio module 170 can parse the voice signal based on the vibration signal of the vibrating bone block of the voice obtained by the bone conduction sensor 180M, and realize the voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 180M, and realize the heart rate detection function.
按键 190包括开机键, 音量键等。 按键 190可以是机械按键。 也可以是触摸式按键。 电 子设备 100可以接收按键输入, 产生与电子设备 100的用户设置以及功能控制有关的键信号 输入。 The button 190 includes a power button, a volume button, and so on. The button 190 may be a mechanical button. It can also be a touch button. The electronic device 100 can receive key input, and generate key signal input related to user settings and function control of the electronic device 100.
马达 191可以产生振动提示。 马达 191可以用于来电振动提示, 也可以用于触摸振动反 馈。 例如, 作用于不同应用(例如拍照, 音频播放等)的触摸操作, 可以对应不同的振动反馈 效果。 作用于显示屏 194不同区域的触摸操作, 马达 191也可对应不同的振动反馈效果。 不 同的应用场景(例如: 时间提醒, 接收信息, 闹钟, 游戏等)也可以对应不同的振动反馈效果。 触摸振动反馈效果还可以支持自定义。 The motor 191 can generate vibration prompts. The motor 191 can be used for incoming call vibration notification, and can also be used for touch vibration feedback. For example, touch operations applied to different applications (such as photographing, audio playback, etc.) can correspond to different vibration feedback effects. Acting on touch operations in different areas of the display screen 194, the motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminder, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.
指示器 192可以是指示灯, 可以用于指示充电状态, 电量变化, 也可以用于指示消息, 未接来电, 通知等。 The indicator 192 may be an indicator light, which may be used to indicate a charging state, a change in power, and may also be used to indicate messages, missed calls, notifications, and the like.
SIM卡接口 195用于连接 SIM卡。 SIM卡可以通过插入 SIM卡接口 195 ,或从 SIM卡接 口 195拔出, 实现和电子设备 100的接触和分离。 电子设备 100可以支持 1个或 N个 SIM卡 接口, N为大于 1的正整数。 SIM卡接口 195可以支持 Nano SIM卡, Micro SIM卡, SIM卡 等。 同一个 SIM卡接口 195可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。 SIM卡接口 195也可以兼容不同类型的 SIM卡。 SIM卡接口 195也可以兼容外部存储卡。 电 子设备 100通过 SIM卡和网络交互, 实现通话以及数据通信等功能。 在一些实施例中, 电子 设备 100采用 eSIM, 即: 嵌入式 SIM卡。 eSIM卡可以嵌在电子设备 100中, 不能和电子设 备 100分离。 The SIM card interface 195 is used to connect to the SIM card. The SIM card can be inserted into the SIM card interface 195 or pulled out from the SIM card interface 195 to achieve contact and separation with the electronic device 100. The electronic device 100 may support one or N SIM card interfaces, and N is a positive integer greater than one. SIM card interface 195 can support Nano SIM card, Micro SIM card, SIM card and so on. The same SIM card interface 195 can insert multiple cards at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 adopts an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.
电子设备 100的软件系统可以采用分层架构, 事件驱动架构, 微核架构, 微服务架构, 或云架构。 本发明实施例以分层架构的 Android系统为例, 示例性说明电子设备 100的软件 结构。 The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present invention takes an Android system with a layered architecture as an example to exemplarily illustrate the software of the electronic device 100 Structure.
图 2B是本发明实施例的电子设备 100的软件结构框图。 FIG. 2B is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention.
分层架构将软件分成若千个层, 每一层都有清晰的角色和分工。 层与层之间通过软件接 口通信。 在一些实施例中, 将 Android 系统分为四层, 从上至下分别为应用程序层, 应用程 序框架层, 安卓运行时 (Android runtime)和系统库, 以及内核层。 The layered architecture divides the software into thousands of layers, and each layer has a clear role and division of labor. Communication between layers through software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.
应用程序层可以包括一系列应用程序包。 The application layer can include a series of application packages.
如图 2B 所示, 应用程序层可以包括相机, 图库, 日历, 通话, 地图, 导航, WLAN, 蓝牙, 音乐, 视频, 短信息等应用程序包。 As shown in Figure 2B, the application layer may include application packages such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, short message, etc.
在本申请的一些实施例中, 应用程序层可以包括第一应用, 第一应用可以为智能家居应 用, 用户可以使用该应用对智能家居的设备进行设置和管理。 例如: 用户可以使用第一应用, 设置 IFTTT规则,家庭网络中的多个第二电子设备可以基于用户设置的 IFTTT规则进行联动, 为用户提供智能的家居生活。 In some embodiments of the present application, the application program layer may include a first application, and the first application may be a smart home application, and the user can use the application to set and manage smart home devices. For example, the user can use the first application to set IFTTT rules, and multiple second electronic devices in the home network can be linked based on the IFTTT rules set by the user to provide the user with a smart home life.
应用程序框架层为应用程序层的应用程序提供应用编程接口 (application programming interface, API)和编程框架。 应用程序框架层包括一些预先定义的函数。 The application framework layer provides an application programming interface (API) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.
如图 2B 所示, 应用程序框架层可以包括窗口管理器, 内容提供器, 视图系统, 电话管 理器, 资源管理器, 通知管理器等。 As shown in Figure 2B, the application framework layer may include a window manager, a content provider, a view system, a phone manager, a resource manager, and a notification manager.
窗口管理器用于管理窗口程序。 窗口管理器可以获取显示屏大小, 判断是否有状态栏, 锁定屏幕, 截取屏幕等。 The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, capture the screen, etc.
内容提供器用来存放和获取数据, 并使这些数据可以被应用程序访问。 所述数据可以包 括视频, 图像, 音频, 拨打和接听的电话, 浏览历史和书签, 电话簿等。 The content provider is used to store and retrieve data, and make these data accessible to applications. The data may include video, image, audio, dialed and received calls, browsing history and bookmarks, phone book, etc.
视图系统包括可视控件, 例如显示文字的控件, 显示图片的控件等。 视图系统可用于构 建应用程序。 显示界面可以由一个或多个视图组成的。 例如, 包括短信通知图标的显示界面, 可以包括显示文字的视图以及显示图片的视图。 The view system includes visual controls, such as controls that display text, controls that display pictures, and so on. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a short message notification icon may include a view displaying text and a view displaying pictures.
电话管理器用于提供电子设备 100的通信功能。例如通话状态的管理 (包括接通,挂断等)。 资源管理器为应用程序提供各种资源, 比如本地化字符串, 图标, 图片, 布局文件, 视 频文件等等。 The phone manager is used to provide the communication function of the electronic device 100. For example, the management of the call status (including connecting, hanging up, etc.). The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and so on.
通知管理器使应用程序可以在状态栏中显示通知信息, 可以用于传达告知类型的消息, 可以短暂停留后自动消失, 无需用户交互。 比如通知管理器被用于告知下载完成, 消息提醒 等。 通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知, 例如后 台运行的应用程序的通知, 还可以是以对话窗口形式出现在屏幕上的通知。 例如在状态栏提 示文本信息, 发出提示音, 电子设备振动, 指示灯闪烁等。 The notification manager enables the application to display notification information in the status bar, which can be used to convey notification-type messages, and it can automatically disappear after a short stay without user interaction. For example, the notification manager is used to notify that the download is complete, message reminders, and so on. The notification manager can also be a notification that appears in the status bar at the top of the system in the form of a chart or scroll bar text, such as a notification of an application running in the background, or a notification that appears on the screen in the form of a dialog window. For example, text messages are displayed in the status bar, prompt sounds are emitted, electronic devices vibrate, and indicator lights flash.
Android Runtime包括核心库和虚拟机。 Android runtime负责安卓系统的调度和管理。 核心库包含两部分:一部分是 java语言需要调用的功能函数,另一部分是安卓的核心库。 应用程序层和应用程序框架层运行在虚拟机中。 虚拟机将应用程序层和应用程序框架层 的 java文件执行为二进制文件。虚拟机用于执行对象生命周期的管理, 堆栈管理, 线程管理, 安全和异常的管理, 以及垃圾回收等功能。 Android Runtime includes core libraries and virtual machines. Android runtime is responsible for the scheduling and management of the Android system. The core library consists of two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android. The application layer and the application framework layer run in a virtual machine. The virtual machine executes the java files in the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.
系统库可以包括多个功能模块。 例如: 表面管理器 (surface manager) , 媒体库 (Media Libraries), 三维图形处理库 (例如: OpenGL ES), 2D图形引擎 (例如: SGL)等。 The system library can include multiple functional modules. For example: surface manager (surface manager), media library (Media Libraries), 3D graphics processing library (for example: OpenGL ES), 2D graphics engine (for example: SGL), etc.
表面管理器用于对显示子系统进行管理,并且为多个应用程序提供了 2D和 3D图层的融 合。 The surface manager is used to manage the display subsystem and provides a combination of 2D and 3D layers for multiple applications.
媒体库支持多种常用的音频, 视频格式回放和录制, 以及静态图像文件等。 媒体库可以 支持多种音视频编码格式, 例如: MPEG4, H.264, MP3 , AAC, AMR, JPG, PNG等。 三维图形处理库用于实现三维图形绘图, 图像渲染, 合成, 和图层处理等。 The media library supports playback and recording of a variety of commonly used audio and video formats, as well as still image files. Media library can Support multiple audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc. The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, synthesis, and layer processing.
2D图形引擎是 2D绘图的绘图引擎。 The 2D graphics engine is a graphics engine for 2D drawing.
内核层是硬件和软件之间的层。 内核层至少包含显示驱动, 摄像头驱动, 音频驱动, 传 感器驱动。 The kernel layer is the layer between hardware and software. The kernel layer contains at least display driver, camera driver, audio driver, and sensor driver.
下面结合附图对本申请实施例提供的技术方案进行详细说明。 The technical solutions provided by the embodiments of the present application will be described in detail below in conjunction with the drawings.
首先, 在多个电子设备 12(电子设备 B)基于 IFTTT规则进行联动之前, 电子设备 10 (电子设备 A)先接收用户对 IFTTT规则的设置。 First, before multiple electronic devices 12 (electronic device B) are linked based on the IFTTT rule, the electronic device 10 (electronic device A) first receives the user's setting of the IFTTT rule.
示例性的, 可以在电子设备 10(电子设备 A) 的浏览器中输入与服务器 11相关联的网 址, 登录 IFTTT规则的设置页面。 或者, 也可以使用第一应用 (例如智能家居 APP等)登录 IFTTT规则的设置网址。 又或者, 还可以在本地使用第一应用 (例如智能家居 APP等)的用 户界面对 IFTTT规则进行设置等, 本申请实施例对此不做限定。 Exemplarily, the web address associated with the server 11 can be entered in the browser of the electronic device 10 (electronic device A) to log in to the setting page of the IFTTT rule. Alternatively, the first application (such as a smart home APP, etc.) can also be used to log in to the setting URL of the IFTTT rule. Alternatively, the user interface of the first application (for example, a smart home APP, etc.) can also be used locally to set the IFTTT rule, which is not limited in the embodiment of the present application.
以手机为例, 图 3A至图 31, 为本申请实施例提供的 IFTTT规则的设置过程涉及到一些 界面示意图。 Taking a mobile phone as an example, Figures 3A to 31 are schematic diagrams of some interfaces involved in the setting process of the IFTTT rules provided in this embodiment of the application.
如图 3A中所示, 为手机的桌面 301的示意图。 桌面 301显示有状态栏、 时间和天气控 件、 应用程序图标(例如智能家居 APP的图标 302), 以及 dock栏等。 其中, 状态栏可以包 括运营商的名称(例如中国移动)、 时间、 WiFi图标、 信号强度和当前的剩余电量等。 As shown in FIG. 3A, it is a schematic diagram of the desktop 301 of the mobile phone. The desktop 301 displays a status bar, time and weather controls, application icons (for example, the icon 302 of the smart home APP), and a dock bar. Among them, the status bar can include the name of the operator (such as China Mobile), time, WiFi icon, signal strength, and current remaining power.
当手机检测到用户点击桌面 301 中的智能家居的图标 302后, 手机进入如图 3B所示的 智能家居 APP的主界面 303。 When the mobile phone detects that the user clicks on the smart home icon 302 on the desktop 301, the mobile phone enters the main interface 303 of the smart home APP as shown in FIG. 3B.
其中, 智能家居 APP可用于发现和连接到家庭网络的电子设备, 还可以基于这些电子设 备打造实用的生活场景, 提供人性化的信息提示和交互等。 Among them, the smart home APP can be used to discover and connect electronic devices to the home network. It can also create practical life scenarios based on these electronic devices, and provide humanized information prompts and interactions.
示例性的, 手机可以通过智能家居 APP, 设置一些手动的生活场景, 即需要用户手动开 启某些生活场景, 基于预先设置好的规则, 与该生活场景相关电子设备执行相应的操作。 手 动开启的生活场景例如有: “回家”、 “离家”、 “阅读”、 “睡眠”等。 其中, 相关的设置可参考 现有技术, 这里不再赘述。 Exemplarily, the mobile phone can set some manual life scenes through the smart home APP, that is, the user is required to manually turn on some life scenes, and based on preset rules, the electronic devices related to the life scenes perform corresponding operations. The life scenes that are manually opened include, for example, "going home", "leaving home", "reading", "sleeping" and so on. Among them, related settings can refer to the prior art, which will not be repeated here.
例如: 若用户在智能家居 APP的主界面 303上, 点击控件 304中的 “回家”, 那么, 基 于预先设置好的规则, 窗户窗帘开启通风换气, 电视机打开自己设置的频道或节目等。 For example: if the user clicks "Go home" in the control 304 on the main interface 303 of the smart home APP, then based on the preset rules, the window curtains are turned on for ventilation, and the TV opens the channel or program set by themselves .
示例性的, 手机还可以通过智能家居 APP, 基于时间设置不同的生活场景。 即, 当到达 某个预定时间后, 基于预先设置好的规则, 与该预定时间相关的电子设备开始自动执行相应 的操作。 其中, 相关的设置可参考现有技术, 这里不再赘述。 Exemplarily, the mobile phone can also set different life scenarios based on time through the smart home APP. That is, when a certain predetermined time is reached, based on a preset rule, the electronic device related to the predetermined time starts to automatically perform corresponding operations. Among them, the related settings can refer to the prior art, which will not be repeated here.
例如: 当时间到达早上 6: 30, 基于预先设置好的规则, 卧室灯开启, 智能音箱播放音 乐, 豆浆机煮好豆浆等。 For example: When the time arrives at 6:30 in the morning, based on the preset rules, the bedroom lights are turned on, the smart speakers play music, and the soymilk is cooked by the soymilk.
示例性的, 手机还可以通过智能家居 APP, 基于本地网络中电子设备 12(电子设备 B) 设置不同的生活场景。 即, 当某个或某些电子设备 12(电子设备 B)的工作状态满足预设条 件时, 自动触发其他电子设备 12(电子设备 B)执行相应的操作。 Exemplarily, the mobile phone can also use the smart home APP to set different life scenarios based on the electronic device 12 (electronic device B) in the local network. That is, when the working state of one or some electronic devices 12 (electronic device B) meets the preset conditions, other electronic devices 12 (electronic device B) are automatically triggered to perform corresponding operations.
例如: 如果智能门锁识别出门口的人为合法的, 则智能门锁自动开锁。 又例如: 如果门 开了, 且室内温度高于 28摄氏度, 则空调自动启动。 For example: If the smart door lock recognizes that the person at the door is legal, the smart door lock automatically unlocks. Another example: If the door is opened and the indoor temperature is higher than 28 degrees Celsius, the air conditioner will automatically start.
下面对手机基于本地网络中电子设备 12(电子设备 B)设置不同的生活场景的过程进行 说明。 The following describes the process of setting different life scenarios on the mobile phone based on the electronic device 12 (electronic device B) in the local network.
请参见图 3B , 在智能家居 APP的主界面 303上, 检测到用户点击 “添加” 控件 305, 手 机弹出设置添加设备和添加场景的菜单, 如图 3C所示的界面 306中的菜单 307。 响应于用户 选择菜单 307中的添加场景, 手机显示设置 IFTTT规则的界面, 如图 3D所示的界面 308。 该界面 308 中左侧的添加控件 309, 可用于添加条件设备以及设置触发条件。 右侧的添加控 件 310, 可用于添加执行设备以及设置执行操作。 Referring to FIG. 3B, on the main interface 303 of the smart home APP, it is detected that the user clicks on the "add" control 305, and the mobile phone pops up a menu for setting adding devices and adding scenes, as shown in the menu 307 in the interface 306 in FIG. 3C. Respond to users Select Add Scene in the menu 307, and the mobile phone displays an interface for setting the IFTTT rules, as shown in the interface 308 in FIG. 3D. The add control 309 on the left side of the interface 308 can be used to add conditional devices and set trigger conditions. The add control 310 on the right side can be used to add execution devices and set execution operations.
需要说明的是, 用户进入设置 IFTTT规则的界面的方式可以有很多, 且设置 IFTTT规则 的界面的具体形式和具体内容也可以有多种, 本申请实施例对此均不做限定。 It should be noted that there can be many ways for the user to enter the interface for setting IFTTT rules, and the specific form and specific content of the interface for setting IFTTT rules can also be various, which are not limited in the embodiments of the present application.
在如图 3D所示的界面 308上, 检测到用户点击添加控件 309, 手机显示如图 3E所示的 界面 311, 该界面 311为对 IFTTT规则中的条件设备和触发条件进行设置的界面。 在该界面 311 上, 用户可以选择条件设备, 在选择条件设备后, 手机会弹出设置该条件设备的触发条 件的窗口或菜单等。 On the interface 308 shown in FIG. 3D, it is detected that the user clicks on the add control 309, and the mobile phone displays the interface 311 shown in FIG. 3E. The interface 311 is an interface for setting the condition device and trigger condition in the IFTTT rule. On this interface 311, the user can select a conditional device. After selecting the conditional device, the mobile phone will pop up a window or menu for setting the triggering condition of the conditional device.
例如: 如图 3E所示的界面 311, 在检测到用户选择 “智能门锁” 后, 弹出菜单 312, 用 户可以进一步设置该条件设备的触发条件。 例如: 触发条件为智能门锁处于开锁状态。 For example: interface 311 shown in Figure 3E, after detecting that the user selects "smart door lock", a menu 312 pops up, and the user can further set the trigger condition of the conditional device. For example: The trigger condition is that the smart door lock is in the unlocked state.
又例如: 如图 3F所示的界面 313 , 在检测到用户选择“温度传感器”后, 弹出菜单 314, 用户可以进一步设置该条件设备的触发条件。 例如: 触发条件为温度传感器的温度值大于或 等于 28度。 For another example, in the interface 313 shown in FIG. 3F, after detecting that the user selects the "temperature sensor", a menu 314 pops up, and the user can further set the trigger condition of the conditional device. For example: The trigger condition is that the temperature value of the temperature sensor is greater than or equal to 28 degrees.
需要说明的是, 当条件设备的类型不同时, 条件设备所具有触发条件的类型也不同。 例 如: 触发条件可以是条件设备的工作状态, 如开启或关闭; 触发条件还可以是条件设备的检 测值或者检测值的范围; 触发条件还可以是条件设备的检测结果, 例如: 人体感应器感应到 人体通过, 或者烟雾传感器检测到燃气泄漏事件等。 因此, 当条件设备类型不同时, 相对应 的设置触发条件的界面也会不同, 本申请实施例对此不作限定。 It should be noted that when the type of the condition device is different, the type of the trigger condition of the condition device is also different. For example: the trigger condition can be the working state of the condition device, such as on or off; the trigger condition can also be the detection value or the range of the detection value of the condition device; the trigger condition can also be the detection result of the condition device, for example: human sensor sensing When the human body passes through, or the smoke sensor detects a gas leakage event, etc. Therefore, when the condition device type is different, the corresponding interface for setting the trigger condition will also be different, which is not limited in the embodiment of the present application.
还需要说明的是, 用户设置的条件设备的数量可以为一个或多个, 每个条件设备所对应 的触发条件也可以为一个或多个, 本申请实施例对此不作限定。 在设置完条件设备和触发条 件后, 用户可以通过点击 “保存” 按钮, 保存设置。 用户也可以直接对已经添加的条件设备 和触发条件进行修改和删除, 不再—赘述。 It should also be noted that the number of condition devices set by the user can be one or more, and the trigger condition corresponding to each condition device can also be one or more, which is not limited in the embodiment of the present application. After setting the condition device and trigger condition, the user can save the setting by clicking the "Save" button. The user can also directly modify and delete the added condition devices and trigger conditions, which will not be repeated here.
下面可以对 IFTTT规则中的执行设备以及执行操作进行设置。 如图 3G所示, 检测到用 户点击界面 315上的添加控件 310,手机显示如图 3H所示的界面 316,用户可以通过界面 316 选择执行设备以及设置执行设备的操作。例如:选择执行设备为“智能空调'执行的操作(也 可称之为执行事件) 为开启智能空调, 且将智能空调的温度值设置在 24度。 The following can set the execution device and execution operation in the IFTTT rule. As shown in FIG. 3G, it is detected that the user clicks the add control 310 on the interface 315, and the mobile phone displays the interface 316 as shown in FIG. 3H. The user can select the execution device and set the operation of the execution device through the interface 316. For example, select the operation performed by the “smart air conditioner” (also referred to as the execution event) for the execution device to turn on the smart air conditioner, and set the temperature value of the smart air conditioner to 24 degrees.
需要说明的是, 执行设备的数量可以为一个或多个, 每个执行设备对应的执行操作也可 以为一个或多个。 It should be noted that the number of execution devices may be one or more, and the execution operation corresponding to each execution device may also be one or more.
再有, 执行设备可以与条件设备为相同的设备, 也可以为不同的设备。 例如: 规则 1为 “如果智能门锁识别出门口的人为合法的, 则智能门锁自动开锁”, 在规则 1中, 条件设备和 执行设备均为智能门锁。 又例如: 规则 2为 “如果门开了, 且室内温度高于 28摄氏度, 则空 调自动启动”, 在规则 2中, 条件设备为门和温度传感器, 执行设备为空调。 Furthermore, the execution device and the condition device may be the same device or different devices. For example: Rule 1 is "If the smart door lock recognizes that the person at the door is legal, the smart door lock will automatically unlock." In rule 1, the condition device and the execution device are both smart door locks. Another example: Rule 2 is "If the door is opened and the indoor temperature is higher than 28 degrees Celsius, the air conditioner will automatically start." In Rule 2, the condition device is the door and temperature sensor, and the execution device is the air conditioner.
在设置完执行设备和执行事件后, 用户可以通过点击 “保存” 按钮, 保存设置, 可以显 示如图 31所示的界面 318。 用户也可以直接对已经添加的执行设备和执行事件进行修改和删 除, 不再一一督述。 After setting the execution device and execution event, the user can save the setting by clicking the “Save” button, and the interface 318 as shown in Figure 31 can be displayed. The user can also directly modify and delete the added execution devices and execution events, which will not be described one by one.
还需要说明的是, 用户可以先设置条件设备和触发条件, 再设置执行设备和执行事件, 也可以先设置执行设备和执行事件, 在设置条件设备和触发条件。 还可以设置一部分条件设 备和触发条件后, 再设置执行设备和执行事件, 然后再设置另外的条件设备和触发条件等。 也就是说, 本申请实施例对设置的顺序不作限定。 It should also be noted that the user can first set the condition device and trigger condition, and then set the execution device and execution event, or first set the execution device and execution event, and then set the condition device and trigger condition. You can also set some condition devices and trigger conditions, then set the execution devices and execution events, and then set other condition devices and trigger conditions. That is to say, the embodiment of the present application does not limit the sequence of settings.
可以理解的是, 用户也可以通过语音的方式(例如: 当电子设备 A为智能音箱时, 用户 可以与智能音箱的语音对话), 或者特定手势等其他方式对 IFTTT规则进行设置, 本申请实 施例对用户设置 IFTTT规则的具体方式不做限定。 It is understandable that the user can also use voice (for example: when the electronic device A is a smart speaker, the user The IFTTT rule can be set by voice dialogue with the smart speaker), or in other ways such as specific gestures. The embodiment of this application does not limit the specific method for the user to set the IFTTT rule.
在电子设备 10(电子设备 A)设置好 IFTTT规则 (包括新增、 修改和删除 IFTTT规则) 后, 需要将设置好的 IFTTT规则发送给本地网络中的电子设备 12(电子设备 B), 而后本地 网络中的电子设备 12(电子设备 B)基于该 IFTTT规则进行本地联动。 After the electronic device 10 (electronic device A) has set the IFTTT rules (including adding, modifying and deleting IFTTT rules), the set IFTTT rules need to be sent to the electronic device 12 (electronic device B) in the local network, and then locally The electronic device 12 (electronic device B) in the network performs local linkage based on the IFTTT rule.
可以理解的是, 本地网络中的电子设备 12(电子设备 B)在不同的 IFTTT规则中有不同 角色。 也就是说, 某个电子设备 12(电子设备 B)在一些 IFTTT规则中为条件设备, 在另一 些 IFTTT规则为执行设备。 It is understandable that the electronic device 12 (electronic device B) in the local network has different roles in different IFTTT rules. In other words, a certain electronic device 12 (electronic device B) is a conditional device in some IFTTT rules, and it is an executing device in some other IFTTT rules.
例如: 规则 1为 “如果智能门锁识别出门口的人为合法的, 则智能门锁自动开锁”, 在规 则 1中, 条件设备和执行设备均为智能门锁。 又例如: 规则 2为 “如果智能门锁开锁了, 且 室内温度高于 28摄氏度, 则空调自动启动”, 在规则 2中, 条件设备为智能门锁和温度传感 器, 执行设备为空调。 可见, 智能门锁在规则 1中为条件设备和执行设备, 在规则 2中为条 件设备。 For example: Rule 1 is “If the smart door lock recognizes that the person at the door is legal, then the smart door lock will automatically unlock”. In rule 1, the conditional device and the execution device are both smart door locks. Another example: Rule 2 is "If the smart door lock is unlocked and the indoor temperature is higher than 28 degrees Celsius, the air conditioner will automatically start." In Rule 2, the condition device is the smart door lock and temperature sensor, and the execution device is the air conditioner. It can be seen that the smart door lock is a conditional device and an execution device in rule 1, and a conditional device in rule 2.
需要说明的是, 在同一条 IFTTT规则中, 条件设备和执行设备的数量都可以是一个或多 个, 本申请实施例不做限定。 例如: 在上述规则 1中, 条件设备为 1个, 执行设备为 1个。 在上述规则 2中, 条件设备为 2个, 执行设备为 1个。 再例如: 规则 3为 “如果门开了, 且 室内温度高于 28摄氏度, 则窗户自动关闭, 且空调自动启动”, 在规则 3中, 条件设备为门 和温度传感器, 执行设备为窗户和空调。 在规则 3中, 条件设备为 2个, 执行设备为 2个。 It should be noted that, in the same IFTTT rule, the number of conditional devices and execution devices may be one or more, which is not limited in the embodiment of this application. For example: In the above rule 1, there is one condition device and one execution device. In the above rule 2, there are two condition devices and one execution device. Another example: Rule 3 is "If the door is opened and the indoor temperature is higher than 28 degrees Celsius, the window will be automatically closed and the air conditioner will automatically start." In Rule 3, the condition device is the door and temperature sensor, and the execution device is the window and air conditioner. . In rule 3, there are two condition devices and two execution devices.
为了便于说明, 针对某一条 IFTTT规则, 将本地网络中的电子设备 12(电子设备 B)在 该条 IFTTT规则的角色, 划分为条件设备和执行设备, 对本申请实施例提供的本地网络中多 个电子设备的联动的方法进行示例性说明。 需要说明的是, 这里条件设备和执行设备的划分 不构成对电子设备 12(电子设备 B) 的具体限定。 For ease of description, for a certain IFTTT rule, the role of the electronic device 12 (electronic device B) in the local network in the IFTTT rule is divided into conditional devices and execution devices. For multiple local networks provided in the embodiments of this application, The method of linkage of electronic equipment is illustrated as an example. It should be noted that the division of conditional equipment and execution equipment here does not constitute a specific limitation on electronic equipment 12 (electronic equipment B).
需要说明的是, 在同一条 IFTTT规则中, 条件设备和执行设备可以相同, 也可以不同。 换言之, 存在某一个电子设备在一条 IFTTT规则中, 既是条件设备, 又是执行设备。 例如: 在上述规则 1中, 条件设备和执行设备均为智能门锁。 在这种情况中, 本文介绍的多个电子 设备联动的方法中, 当涉及到某个电子设备在同一条 IFTTT规则中, 具有两个角色(条件设 备和执行设备) 时, 且该两个角色之间需要进行数据传输时, 可理解为该电子设备可以直接 调用本地数据来获取相应信息, 不再另行说明。 It should be noted that, in the same IFTTT rule, the condition device and the execution device may be the same or different. In other words, there is a certain electronic device in an IFTTT rule, which is both a conditional device and an executing device. For example: In the above rule 1, the condition device and the execution device are both smart door locks. In this case, in the method of linkage of multiple electronic devices introduced in this article, when a certain electronic device has two roles (conditional device and execution device) in the same IFTTT rule, and the two roles When data transmission is required between them, it can be understood that the electronic device can directly call local data to obtain corresponding information, which will not be described separately.
可选的, 在本申请提供的一种多个电子设备联动的方法中, 可以由执行设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备, 即条件设备。 在 IFTTT规则中的某个 或某些条件设备发生触发事件后, 可以直接通过本地网络通知执行设备。 执行设备在收到通 知消息后, 也可以通过本地网络直接查询其他条件设备的触发事件。 当确定所有条件设备的 触发事件均发生时, 执行设备可以执行相应事件(即执行事件, 也可以理解为执行设备执行 相应的功能), 即完成联动。 Optionally, in a method for linkage of multiple electronic devices provided in this application, the executing device may obtain the IFTTT rule in advance, and discover other electronic devices in the IFTTT rule, that is, conditional devices. After a trigger event occurs on a certain or certain conditional device in the IFTTT rule, the executing device can be notified directly through the local network. After receiving the notification message, the executing device can also directly query the trigger events of other conditional devices through the local network. When it is determined that the trigger events of all conditional devices have occurred, the execution device can execute the corresponding event (that is, the execution event, which can also be understood as the execution device to perform the corresponding function), that is, the linkage is completed.
如图 4A所示, 为本申请实施例提供的一种本地网络中多个电子设备联动的方法示意图。 在方法中, 可以由执行设备获取 IFTTT规则, 而条件设备可以不获取 IFTTT规则。 该方法具 体包括: As shown in FIG. 4A, it is a schematic diagram of a method for linkage of multiple electronic devices in a local network according to an embodiment of this application. In the method, the execution device may obtain the IFTTT rule, and the conditional device may not obtain the IFTTT rule. The method specifically includes:
S401 第 执行设备获取 IFTTT规则。 S401: The execution device obtains the IFTTT rule.
其中, 在 IFTTT规则中, 可以将多个条件设备的触发事件用各种逻辑操作 (例如: 逻辑 与操作, 或者逻辑或操作)进行自由组合。 当这多个条件设备的触发事件均满足时, 会触发 执行设备执行相应的操作, 即触发执行设备的执行事件。 例如: IFTTT规则可以包括规则的 标识、 条件( condition)信息和执行( action)信息。 其中, 在本地网络中可以存在多条 IFTTT 规则, 故规则的标识可用于区分本地网络中的各条 IFTTT规则。 条件信息可以包括: 设备标 识、 设备类型 (type)、 属性值、 操作符、 数值等。 可以理解的是, 条件信息中的设备标识为 条件设备的标识, 设备类型为条件设备的类型, 属性值为条件设备的参数(例如: 条件设备 为温度传感器时, 属性值可以为温度), 操作符为逻辑操作 (例如: 大于、 小于等), 数值为 该属性值对应的数值大小 (例如: 26摄氏度), 执行信息中可以包括: 设备标识、 设备类型 以及执行的具体操作等。 例如: IFTTT规则可以设置为, 温度传感器检测到的温度值为大于 26摄氏度, 则空调开启。 Among them, in the IFTTT rule, trigger events of multiple condition devices can be freely combined with various logical operations (for example, logical AND operation, or logical OR operation). When the trigger events of these multiple condition devices are all satisfied, the execution device will be triggered to perform a corresponding operation, that is, the execution event of the execution device will be triggered. For example: IFTTT rules can include regular Identification, condition (condition) information and execution (action) information. Among them, there may be multiple IFTTT rules in the local network, so the identifier of the rule can be used to distinguish each IFTTT rule in the local network. The condition information may include: device identification, device type (type), attribute value, operator, value, etc. It is understandable that the device identifier in the condition information is the identifier of the condition device, the device type is the type of the condition device, and the attribute value is the parameter of the condition device (for example, when the condition device is a temperature sensor, the attribute value can be temperature), operation The symbol is a logical operation (for example: greater than, less than, etc.), and the value is the value corresponding to the attribute value (for example: 26 degrees Celsius). The execution information can include: device identification, device type, and specific operations performed. For example: the IFTTT rule can be set as that if the temperature value detected by the temperature sensor is greater than 26 degrees Celsius, the air conditioner is turned on.
在本申请的一些实施例中, 电子设备 10(电子设备 A)可以在接收到用户设置 IFTTT 规则 (包括新增、 修改和删除 IFTTT规则)后, 就主动推送给本地网络中的执行设备或者通 过服务器 11 主动推送给执行设备。 在本申请的又一些实施例中, 本地网络中的执行设备也 可以向电子设备 10(电子设备 A)或者服务器 11请求 IFTTT规则, 电子设备 10(电子设 备 A)或者服务器 11将相应的 IFTTT规则发送给执行设备, 本申请实施例对此不做限定。 In some embodiments of the present application, the electronic device 10 (electronic device A) can actively push the IFTTT rules (including adding, modifying and deleting IFTTT rules) set by the user to the execution device in the local network or through The server 11 actively pushes to the execution device. In still other embodiments of the present application, the execution device in the local network may also request IFTTT rules from the electronic device 10 (electronic device A) or the server 11, and the electronic device 10 (electronic device A) or the server 11 sends the corresponding IFTTT rules It is sent to the execution device, which is not limited in this embodiment of the application.
5402 第 执行设备对获取到的 IFTTT规则进行合法性检查。 5402 The enforcement device checks the legality of the obtained IFTTT rules.
示例性的, 第一执行设备可以对获取到的 IFTTT规则进行解析, 确定该 IFTTT规则的完 整性和正确性进行检查, 以确保可以根据该获取到的 IFTTT规则进行条件设备和执行设备的 联动。 Exemplarily, the first execution device may parse the acquired IFTTT rule, determine the integrity and correctness of the IFTTT rule, and check to ensure that the conditional device and the execution device can be linked according to the acquired IFTTT rule.
例如:对 IFTTT规则的完整性检测可以包括:检测该 IFTTT规则中是否包含有条件信息, 以及条件信息是否完整, 例如: 条件设备的信息、 条件设备的属性值、 条件设备操作符、 属 性值对应的数值是否完整等。 检测该 IFTTT规则中是否包含执行信息, 以及执行信息是否完 整。 For example: the integrity check of the IFTTT rule may include: detecting whether the IFTTT rule contains conditional information and whether the conditional information is complete, for example: conditional device information, conditional device attribute value, conditional device operator, attribute value correspondence Whether the value of is complete, etc. Check whether the IFTTT rule contains execution information, and whether the execution information is complete.
又例如: 对 IFTTT规则的正确性检测还可以包括: 对 IFTTT规则进行合法性校验, 确定 该 IFTTT规则是否没有被篡改过等。 For another example: checking the correctness of the IFTTT rule may also include: checking the validity of the IFTTT rule to determine whether the IFTTT rule has not been tampered with, etc.
5403、 第一执行设备根据 IFTTT规则, 请求发现 IFTTT规则中的第一条件设备和第二条 件设备。 S403. According to the IFTTT rule, the first execution device requests to discover the first conditional device and the second conditional device in the IFTTT rule.
示例性的, 第一执行设备从 IFTTT规则中获取相关的条件设备的标识, 以及其他的执行 设备的标识, 并在本地网络中进行组播或广播, 请求发现该 IFTTT规则中的条件设备以及其 他执行设备。 即, 第一执行设备在本地网络中组播或广播的消息中, 可以携带有 IFTTT规则 中的条件设备的标识和执行设备的标识。 Exemplarily, the first execution device obtains the identities of the related condition devices and the identities of other execution devices from the IFTTT rules, and performs multicast or broadcast in the local network, and requests to discover the condition devices and other devices in the IFTTT rules. Execution equipment. That is, the message that the first execution device multicasts or broadcasts in the local network may carry the identification of the condition device and the identification of the execution device in the IFTTT rule.
例如: 假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事件同 时发生, 则第一执行设备执行第三事件。 其中, 第一事件为第一条件设备的触发事件, 第二 事件为第二条件设备的触发事件。 第三事件为第一执行设备的执行事件。 那么, 第一执行设 备可以将第一条件设备的标识、 第二条件设备的标识进行组播或广播。 For example: Suppose the IFTTT rule is: If the first event of the first condition device and the second event of the second condition device occur at the same time, the first execution device executes the third event. Wherein, the first event is a trigger event of the first conditional device, and the second event is a trigger event of the second conditional device. The third event is an execution event of the first execution device. Then, the first execution device may multicast or broadcast the identification of the first conditional device and the identification of the second conditional device.
一些实施例中, 第一执行设备可以将第一条件设备的标识和第二条件设备的标识分别进 行组播或广播, 即, 一条组播或广播消息仅包括第一条件设备的标识, 另一条组播或广播消 息中仅包含第二条件设备的标识。 另一些实施例中, 第一执行设备也可以将第一条件设备的 标识和第二条件设备的标识同时进行组播或广播, 即, 一条组播或广播消息中包括第一条件 设备的标识和第二条件设备的标识。 本申请实施例对此不做限定。 In some embodiments, the first execution device may multicast or broadcast the identification of the first conditional device and the identification of the second conditional device respectively, that is, one multicast or broadcast message only includes the identification of the first conditional device, and the other The multicast or broadcast message only contains the identifier of the second conditional device. In other embodiments, the first execution device may also multicast or broadcast the identification of the first conditional device and the identification of the second conditional device at the same time, that is, a multicast or broadcast message includes the identification of the first conditional device and The identification of the second condition device. The embodiments of this application do not limit this.
又例如: IFTTT规则为: 如果智能门锁开锁, 且室内温度传感器的温度大于 28度, 则智 能空调开启且温度设置在 24度。 其中, 第一条件设备为智能门锁, 第一事件为开锁。 第二条 件设备为温度传感器, 第二事件为温度值大于 28度。 第一执行设备为智能空调, 第三事件为 开启智能空调且温度设置在 24度。 那么, 智能空调获取该 IFTTT规则后, 确定出该 IFTTT 规则中的条件设备为智能门锁和温度传感器。 智能空调可以在家庭网络中广播智能门锁的标 识和温度传感器的标识。 Another example: The IFTTT rule is: if the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees. Among them, the first condition device is a smart door lock, and the first event is unlocking. The second condition device is a temperature sensor, and the second event is that the temperature value is greater than 28 degrees. The first execution device is a smart air conditioner, and the third event is Turn on the smart air conditioner and set the temperature at 24 degrees. Then, after the smart air conditioner obtains the IFTTT rule, it determines that the conditional devices in the IFTTT rule are the smart door lock and the temperature sensor. The smart air conditioner can broadcast the identification of the smart door lock and the identification of the temperature sensor in the home network.
5404、 第一条件设备和第二条件设备分别向第一执行设备回复各自的地址。 S404. The first conditional device and the second conditional device respectively replies their respective addresses to the first execution device.
步骤 S404具体包括: 第一条件设备向第一执行设备回复自身的地址(步骤 S404a), 以 及第二条件设备向第一执行设备回复自身的地址(步骤 S404b) Step S404 specifically includes: the first conditional device replies its own address to the first execution device (step S404a), and the second conditional device replies its own address to the first execution device (step S404b)
示例性的,本地网络中的除第一执行设备外的其他电子设备在接收到组播或广播消息后, 将组播或广播消息中的设备标识与自身的标识进行比对。 若比对成功, 则表示该电子设备是 该 IFTTT规则中的条件设备或执行设备, 并向第一执行设备回复各自的地址, 例如 IP地址, MAC地址等,以便后续第一执行设备可以根据该地址向其发送联动相关的消息。若比对失败, 则表示该电子设备不是该 IFTTT规则中的条件设备和执行设备, 则该电子设备可以忽略接收 到的组播或广播消息。 Exemplarily, after receiving the multicast or broadcast message, other electronic devices in the local network other than the first executing device compare the device identifier in the multicast or broadcast message with its own identifier. If the comparison is successful, it means that the electronic device is a conditional device or an executing device in the IFTTT rule, and replies to the first executing device with their respective addresses, such as IP address, MAC address, etc., so that the subsequent first executing device can follow the The address sends a message related to the linkage to it. If the comparison fails, it means that the electronic device is not a conditional device and an executing device in the IFTTT rule, and the electronic device can ignore the received multicast or broadcast message.
例如: 仍然假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事 件同时发生, 则第一执行设备执行第三事件。 那么, 第一条件设备在接收到第一执行设备发 送的组播或广播消息后,确定其中包含第一条件设备的标识,则确定第一条件设备是该 IFTTT 规则中的条件设备, 那么向第一执行设备发送第一条件设备的地址, 以便后续第一执行设备 可以根据第一条件设备的地址发送相应的消息。 类似的, 第二条件设备也向第一执行设备发 送第二条件设备的地址, 不再赘述。 For example: It is still assumed that the IFTTT rule is: If the first event of the first conditional device and the second event of the second conditional device occur at the same time, the first execution device executes the third event. Then, after receiving the multicast or broadcast message sent by the first executing device, the first conditional device determines that it contains the identity of the first conditional device, and then determines that the first conditional device is the conditional device in the IFTTT rule, and then sends An execution device sends the address of the first condition device so that the first execution device can send a corresponding message according to the address of the first condition device. Similarly, the second condition device also sends the address of the second condition device to the first execution device, which will not be repeated here.
又例如: IFTTT规则仍然为: 如果智能门锁开锁, 且室内温度传感器的温度大于 28度, 则智能空调开启且温度设置在 24度。 Another example: The IFTTT rule is still: If the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees.
接着, 智能门锁和温度传感器在接收智能空调发送的广播消息后, 确认该广播消息中包 含有自身的标识, 确定与该 IFTTT规则相关, 则分别向智能空调返回自身的网络地址, 即智 能门锁的网络地址和温度传感器的网络地址。 家庭网络中的其他设备, 例如: 空气净化器、 智能门窗等, 在接收到该广播消息后, 确定自身与该 IFTTT规则无关, 则可以直接忽略智能 空调发送的该广播消息。 Then, after receiving the broadcast message sent by the smart air conditioner, the smart door lock and the temperature sensor confirm that the broadcast message contains their own identification, and determine that they are related to the IFTTT rule, and then return their own network addresses to the smart air conditioner, namely the smart door The network address of the lock and the network address of the temperature sensor. Other devices in the home network, such as air purifiers, smart doors and windows, etc., after receiving the broadcast message, determine that they are not related to the IFTTT rule, they can directly ignore the broadcast message sent by the smart air conditioner.
5405、 第一执行设备向第一条件设备订阅第一事件(图 4A中步骤 S405a示出), 向第二 条件设备订阅第二事件(图 4A中步骤 S405b示出 X S405. The first execution device subscribes to the first conditional device for the first event (shown in step S405a in Figure 4A), and subscribes to the second conditional device for the second event (shown in step S405b in Figure 4A).
示例性的, 由于第一执行设备获取到了 IFTTT规则, 且获取到该 IFTTT规则中相关条件 设备的地址, 那么第一执行设备可以向各个条件设备发送订阅消息, 用于订阅各个条件设备 的触发事件, 即各个条件设备的触发事件一旦发生, 则会通知第一执行设备。 Exemplarily, since the first execution device obtains the IFTTT rule and obtains the address of the related condition device in the IFTTT rule, the first execution device may send a subscription message to each condition device to subscribe to the trigger event of each condition device That is, once the trigger event of each condition device occurs, the first execution device will be notified.
例如: 第一执行设备向第一条件设备发送的订阅消息中, 可以包含有第一事件的具体内 容。 这样, 当第一条件设备根据该订阅消息, 确定第一事件发生时, 可以通知第一执行设备。 类似的, 第一执行设备向第二条件设备发送的订阅消息中, 可以包括有第二事件的具体内容。 这样, 当第二条件设备根据该订阅消息, 确定第二事件发生时, 可以通知第一执行设备。 图 中以步骤 S405a和 S405b分别示出。 For example, the subscription message sent by the first execution device to the first condition device may contain the specific content of the first event. In this way, when the first conditional device determines that the first event occurs according to the subscription message, it can notify the first execution device. Similarly, the subscription message sent by the first execution device to the second condition device may include specific content of the second event. In this way, when the second conditional device determines that the second event occurs according to the subscription message, it can notify the first execution device. In the figure, steps S405a and S405b are respectively shown.
又例如: IFTTT规则仍然为: 如果智能门锁开锁, 且室内温度传感器的温度大于 28度, 则智能空调开启且温度设置在 24度。 Another example: The IFTTT rule is still: If the smart door lock is unlocked and the temperature of the indoor temperature sensor is greater than 28 degrees, the smart air conditioner is turned on and the temperature is set at 24 degrees.
接着, 智能空调在接收到智能门锁和温度传感器发送的各自的网络地址后, 智能空调分 别向智能门锁订阅事件 1, 向温度传感器订阅事件 2。 其中, 事件 1为智能门锁开锁。 事件 2 为室内温度传感器的温度大于 28度。 后续, 当智能门锁发生事件 1 (即智能门锁开锁时), 会通知智能空调。然后,智能空调向温度传感器查询是否发生事件 2(即温度是否大于 28度 X 温度传感器确定温度大于 28度后, 告知智能空调。 于是, 智能空调可以确定打开智能空调, 并将温度设置到 24度。 Then, after the smart air conditioner receives the respective network addresses sent by the smart door lock and the temperature sensor, the smart air conditioner subscribes to the smart door lock for event 1 and the temperature sensor for event 2 respectively. Among them, event 1 is the unlocking of the smart door lock. Event 2 is that the temperature of the indoor temperature sensor is greater than 28 degrees. Later, when event 1 occurs in the smart door lock (that is, when the smart door lock is unlocked), the smart air conditioner will be notified. Then, the smart air conditioner queries the temperature sensor whether event 2 has occurred (that is, whether the temperature is greater than 28 degrees X After the temperature sensor determines that the temperature is greater than 28 degrees, it informs the smart air conditioner. Therefore, the smart air conditioner can determine to turn on the smart air conditioner and set the temperature to 24 degrees.
在本申请的一些实施例中, 条件设备在接收到执行设备的订阅消息后, 可以每间隔一段 时间向执行设备上报是否发生触发事件或是否满足触发条件的消息。 而执行设备可以根据该 消息确定是否满足相应的 IFTTT规则, 满足时执行相应的执行事件。 例如: 当第一条件设备 接收到第一执行设备的订阅消息后, 可以每间隔一段时间后, 向第一执行设备上报第一事件 是否发生的消息。 同理, 当第二条件设备接收到第一执行设备的订阅消息后, 可以每间隔一 段时间后, 向第一执行设备上报第二事件是否发生的消息。 而第一执行设备可以根据第一条 件设备和第二条件设备上报的消息确定是否满足 IFTTT规则,若满足,则直接执行第一事件。 In some embodiments of the present application, after the conditional device receives the subscription message of the execution device, it may report to the execution device whether a trigger event occurs or a message that satisfies the trigger condition at intervals. The execution device can determine whether the corresponding IFTTT rule is satisfied according to the message, and execute the corresponding execution event when it is satisfied. For example: after the first conditional device receives the subscription message of the first execution device, it may report to the first execution device a message about whether the first event has occurred after a period of time. Similarly, after the second conditional device receives the subscription message of the first execution device, it may report to the first execution device a message about whether the second event has occurred after a certain interval of time. The first execution device can determine whether the IFTTT rule is satisfied according to the messages reported by the first condition device and the second condition device, and if it is satisfied, it directly executes the first event.
在本申请的另一些实施例中, 条件设备在接收到执行设备的订阅消息后, 也可以在检测 到相应的触发事件后, 向执行设备发送通知消息。 例如: 第一条件设备也可以在检测到第一 事件后, 向第一执行设备发送第一事件已发生的通知消息。 类似, 第二条件设备也可以在检 测到第二事件后, 向第一执行设备发送第一事件已发生的通知消息。 In some other embodiments of the present application, after receiving the subscription message of the executing device, the conditional device may also send a notification message to the executing device after detecting a corresponding trigger event. For example, the first condition device may also send a notification message that the first event has occurred to the first execution device after detecting the first event. Similarly, the second condition device may also send a notification message that the first event has occurred to the first execution device after detecting the second event.
以下步骤 S406至 S409则是以条件设备检测到相应的触发事件后, 向执行设备发送通知 消息为例进行说明的。 The following steps S406 to S409 are described with an example in which the conditional device sends a notification message to the execution device after detecting the corresponding trigger event.
5406、 当第一条件设备的第一事件发生时, 第一条件设备向第一执行设备发送第一事件 的通知消息。 S406: When the first event of the first condition device occurs, the first condition device sends a notification message of the first event to the first execution device.
其中, 第一条件设备发生第一事件包括: 第一条件设备执行了某个操作, 例如: 智能门 锁开锁。 或者, 第一条件设备的工作状态发生变化, 例如: 智能空调从关闭状态改变到开启 状态。 或者, 第一条件设备的检测值满足某个条件, 例如: 温度传感器检测到的温度值大于 或等于 28度。 又例如: 人体感应器感应到有人体通过等。 也就是说, 第一事件的具体内容可 以根据第一条件设备具有的功能相应变化, 本申请实施例对第一事件的具体内容不做限定。 Wherein, the occurrence of the first event of the first condition device includes: the first condition device performs a certain operation, for example: unlocking of a smart door lock. Or, the working state of the first condition device changes, for example: the smart air conditioner changes from the off state to the on state. Or, the detection value of the first condition device satisfies a certain condition, for example: the temperature value detected by the temperature sensor is greater than or equal to 28 degrees. Another example: The human body sensor senses that a human body passes through, etc. That is to say, the specific content of the first event can be changed according to the function of the first condition device, and the specific content of the first event is not limited in the embodiment of the present application.
第一条件设备发生第一事件后, 可以向第一执行设备发送通知消息, 用于通知第一条件 设备已发生第一事件。 After the first event occurs in the first condition device, a notification message may be sent to the first execution device to notify the first condition device that the first event has occurred.
示例性的, 该通知消息可以是一个特定格式或特定内容的消息, 第一执行设备在接收到 该通知消息后, 可以 4艮据该通知消息的发送者 (第一条件设备)确定第一事件已发生。 再示 例性的, 该通知消息也可以携带第一条件设备的标识, 那么, 第一执行设备在接收到该通知 消息后, 可以根据该第一条件设备的标识确定第一事件已发生。 又示例性的, 该通知消息也 可以携带第一事件的标识或者第一事件的内容, 那么, 第一执行设备在接收到该通知消息后, 可以根据第一事件的标识或者第一事件的内容确定第一事件已发生。 本申请实施例中对通知 消息的具体形式和内容不做限定。 Exemplarily, the notification message may be a message of a specific format or specific content. After receiving the notification message, the first execution device may determine the first event according to the sender of the notification message (the first conditional device) happened. As another example, the notification message may also carry the identifier of the first conditional device. Then, after receiving the notification message, the first executing device may determine that the first event has occurred according to the identifier of the first conditional device. In another example, the notification message may also carry the identifier of the first event or the content of the first event. Then, after receiving the notification message, the first execution device may perform the identification according to the identifier of the first event or the content of the first event. Make sure that the first event has occurred. The specific form and content of the notification message are not limited in the embodiments of this application.
5407、 第一执行设备向第二条件设备发送查询消息, 用于查询第二事件是否发生。 S407. The first execution device sends a query message to the second condition device, which is used to query whether the second event occurs.
其中, 第二事件的内容可参考步骤 S406中关于第一事件的描述, 这里不再赘述。 For the content of the second event, reference may be made to the description of the first event in step S406, which will not be repeated here.
在一些实施例中, 若第一执行设备接收到第一事件的通知消息, 但未接收到第二事件的 通知消息, 第一执行设备可以向第二条件设备查询第二事件是否发生。 In some embodiments, if the first execution device receives the notification message of the first event, but does not receive the notification message of the second event, the first execution device may query the second condition device whether the second event has occurred.
在又一些实施例中, 若第一执行设备接收到第一事件的通知消息, 同时也接收到第二事 件的通知消息, 则第一执行设备可以根据第一事件和第二事件确定是否满足 IFTTT规则, 而 后执行步骤 S409。 In still other embodiments, if the first execution device receives the notification message of the first event and also receives the notification message of the second event, the first execution device may determine whether the IFTTT is satisfied according to the first event and the second event. Rule, and then step S409 is executed.
5408、 第二条件设备将查询结果返回给第一执行设备。 S408: The second condition device returns the query result to the first execution device.
第二条件设备在接收到第一执行设备的查询消息后, 可以判断是否发生第二事件, 并将 查询结果返回给第一执行设备。 S409、 第一执行设备根据第一事件的通知消息和第二事件的查询结果, 确定执行第三事 件。 After receiving the query message of the first execution device, the second condition device can determine whether the second event has occurred, and return the query result to the first execution device. S409: The first execution device determines to execute the third event according to the notification message of the first event and the query result of the second event.
其中, 第三事件为第一执行设备的执行事件, 该执行事件可以是一个动作或者一系列的 动作。 即, 当触发第一执行设备执行第一事件的条件满足时, 第一执行设备同时执行或者顺 序第一事件中一系列的动作。 该执行事件还可以设置延迟, 即, 当触发第一执行设备执行第 一事件的条件满足时, 第一执行设备可以在预设的延迟时间后开始执行第一事件。 本申请实 施例对此不做限定。 Wherein, the third event is an execution event of the first execution device, and the execution event may be an action or a series of actions. That is, when the condition that triggers the first execution device to execute the first event is satisfied, the first execution device simultaneously executes or sequentially a series of actions in the first event. The execution event may also set a delay, that is, when the condition that triggers the first execution device to execute the first event is satisfied, the first execution device may start to execute the first event after a preset delay time. This application embodiment does not limit this.
示例性的, 第一执行设备根据第一事件的通知消息和第二事件的查询结果, 进行逻辑判 断。若判断结果与 IFTTT规则中的触发条件相符, 则第一执行设备执行第三事件。若不相符, 则第一执行设备确定不执行第三事件。 Exemplarily, the first execution device makes a logical judgment according to the notification message of the first event and the query result of the second event. If the judgment result matches the trigger condition in the IFTTT rule, the first execution device executes the third event. If they do not match, the first execution device determines not to execute the third event.
在另一些示例中, 第一事件的通知消息具有时效性。 也就是说, 第一事件的通知消息在 预设的时间段内是有效的。 若超过预设时间段, 则该通知消息为无效, 即该通知消息不能用 于说明第一事件已发生, 则第一执行设备还需要向第一条件设备查询第一事件是否发生。 具 体实现中, 可以由条件设备在通知消息中携带时间信息, 执行设备根据该时间信息确定是否 该通知消息是否有效。 也可以由执行设备根据接收到通知消息的时间, 自行确定该通知消息 是否有效, 本申请实施例不做限定。 其中, 查询过程与第一执行设备向第二条件设备查询第 二事件是否发生的过程类似, 不再赘述。 In other examples, the notification message of the first event has timeliness. In other words, the notification message of the first event is valid within the preset time period. If it exceeds the preset time period, the notification message is invalid, that is, the notification message cannot be used to indicate that the first event has occurred, and the first execution device also needs to query the first condition device whether the first event has occurred. In a specific implementation, the conditional device may carry time information in the notification message, and the execution device determines whether the notification message is valid according to the time information. The execution device may also determine whether the notification message is valid according to the time when the notification message is received, which is not limited in this embodiment of the application. The query process is similar to the process in which the first execution device queries the second condition device whether the second event has occurred, and will not be repeated here.
综上,本申请实施例提供的多电子设备联动的方法中, 由执行设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备。 在 IFTTT规则中的条件设备发生触发事件后, 可以 直接通过本地网络通知执行设备, 而执行设备也可以通过本地网络直接查询其他条件设备的 触发事件。 当所有条件设备的触发条件都满足 IFTTT规则时, 执行设备可以执行相应事件, 即完成联动。 可见, 从某个条件设备的触发条件发生, 到执行设备执行相应事件的整个过程 中, 都是在本地网络中完成的。 这样, 即便是本地网络中有电子设备与互联网断开, 本申请 仍然可以完成本地网络的多个电子设备的联动, 提高了联动的成功率, 提升了联动系统的稳 定性。 并且, 由于联动过程中, 本地网络的多个电子设备直接进行通信, 而不再通过互联网, 有利于降低通信的时延, 提升联动的效率。 再有, 避免将本地网络中各个电子设备的状态, 以及 IFTTT规则的执行情况上传到互联网, 有利于规避安全风险。 In summary, in the method for multi-electronic device linkage provided in the embodiments of the present application, the executing device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule. After a trigger event occurs on a conditional device in the IFTTT rule, the executing device can be notified directly through the local network, and the executing device can also directly query the triggering event of other conditional devices through the local network. When the trigger conditions of all conditional devices meet the IFTTT rules, the executing device can execute the corresponding event, that is, complete the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of the corresponding event by the executing device is completed in the local network. In this way, even if an electronic device in the local network is disconnected from the Internet, the application can still complete the linkage of multiple electronic devices in the local network, which improves the success rate of linkage and improves the stability of the linkage system. In addition, since multiple electronic devices in the local network communicate directly during the linkage process, instead of using the Internet, it is beneficial to reduce the communication delay and improve the efficiency of linkage. Furthermore, avoiding uploading the status of each electronic device in the local network and the execution status of the IFTTT rules to the Internet is beneficial to avoid security risks.
此外, 在本申请实施例提供的方法中, 是由 IFTTT规则中的执行设备, 与 IFTTT规则中 其他的条件设备进行直接通信, 没有通过其他的中间设备进行中转和控制, 即没有通过与本 条 IFTTT规则无关的其他设备(例如: 网关)进行中转和控制。 换言之, 本申请实施例提供 的方法, 使得本地网络的多个电子设备联动时摆脱了对控制设备的依赖, 有利于减少联动的 时延, 提升联动效率。 In addition, in the method provided in the embodiments of the present application, the executing device in the IFTTT rules communicates directly with other conditional devices in the IFTTT rules, and no other intermediate devices are used for transfer and control, that is, it does not pass the IFTTT rules. Other devices that are irrelevant to the rules (such as gateways) are used for transfer and control. In other words, the method provided by the embodiment of the present application allows multiple electronic devices in the local network to get rid of the dependence on the control device when the multiple electronic devices in the local network are linked, which is beneficial to reduce the time delay of the linkage and improve the linkage efficiency.
在本申请的另一些实施例中, 一条 IFTTT规则中条件设备有 2个以上, 例如: 还有第三 条件设备,第三条件设备对应第四事件,则多个电子设备联动的过程与上述步骤 S401至 S409 相类似。 不同之处在于: In other embodiments of the present application, there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S401 to S409 are similar. The difference is:
在步骤 S403中, 第一执行设备根据 IFTTT规则, 请求发现所有的条件设备, 即包括发 现第一条件设备、 第二条件设备以及第三条件设备。 因此, 第一执行设备发送的组播消息或 广播消息中还包括第三条件设备的标识。 In step S403, the first execution device requests the discovery of all condition devices according to the IFTTT rule, that is, the discovery of the first condition device, the second condition device, and the third condition device. Therefore, the multicast message or the broadcast message sent by the first execution device also includes the identifier of the third conditional device.
在步骤 S404中, 第三条件设备在接收到第一执行设备发送的组播消息或广播消息后,确 定该组播消息或广播消息中包含第三条件设备的标识, 也会向第一执行设备发送第三条件设 备的地址, 以便后续第一执行设备可以向第三条件设备发送联动相关的消息。 在步骤 S405中, 第一执行设备也要向第三条件设备订阅第四事件。 其中, 第四事件为第 三条件设备对应的触发事件, 相关内容可以参考前面相关描述, 此处不再赘述。 In step S404, after receiving the multicast message or the broadcast message sent by the first execution device, the third conditional device determines that the multicast message or broadcast message contains the identifier of the third conditional device, and also sends the notification to the first execution device. Send the address of the third conditional device, so that the subsequent first execution device can send linkage-related messages to the third conditional device. In step S405, the first execution device also subscribes to the third condition device for the fourth event. Among them, the fourth event is a trigger event corresponding to the third conditional device. For related content, refer to the previous related description, which is not repeated here.
在步骤 S407至 S409中,在一些实施例中,若第一执行设备接收到第一事件的通知消息, 未接收到第二事件和第四事件的通知消息, 则第一执行设备向第二条件设备查询第二事件是 否发生, 向第三条件设备查询第四事件是否发生。 第二条件设备和第三条件设备分别向第一 执行设备返回查询结果, 第一执行设备根据查询结果确定是否执行第三事件。 In steps S407 to S409, in some embodiments, if the first execution device receives the notification message of the first event, but does not receive the notification message of the second event and the fourth event, the first execution device sends a notification to the second condition The device queries whether the second event occurs, and queries the third condition device whether the fourth event occurs. The second condition device and the third condition device respectively return the query result to the first execution device, and the first execution device determines whether to execute the third event according to the query result.
若第一执行设备接收到第一事件和第二事件的通知消息,未接收到第四事件的通知消息, 则第一执行设备向第三条件设备查询第四事件是否发生。 第三条件设备向第一执行设备返回 查询结果, 第一执行设备根据查询结果确定是否执行第三事件。 If the first execution device receives the notification messages of the first event and the second event, but does not receive the notification message of the fourth event, the first execution device queries the third condition device whether the fourth event occurs. The third condition device returns the query result to the first execution device, and the first execution device determines whether to execute the third event according to the query result.
若第一执行设备接收到第一事件、 第二事件和第四事件的通知消息, 则第一执行设备直 接确定是否执行第三事件。 If the first execution device receives notification messages of the first event, the second event, and the fourth event, the first execution device directly determines whether to execute the third event.
其他内容请参考上文相关内容的描述, 不再赘述。 For other content, please refer to the description of the relevant content above, and will not repeat it.
在本申请的另一些实施例中, 一条 IFTTT规则中执行设备有 2个以及 2个以上, 例如: 还有第二执行设备。 In some other embodiments of the present application, there are two or more execution devices in an IFTTT rule, for example: there is a second execution device.
例如: 假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事件同 时发生, 则第一执行设备执行第三事件, 且第二执行设备执行第五事件。 其中, 第五事件为 第二执行设备的执行事件。 For example: Assume that the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event. Among them, the fifth event is an execution event of the second execution device.
在一些示例中, 可以理解的是, 触发第一执行设备执行第三事件的条件, 与触发第二执 行设备执行第五事件的条件相同。 故可以在第一执行设备确定要执行第三事件时, 可以通知 第二执行设备执行第五事件。 那么, 第二执行设备可以不用从电子设备 10(电子设备 A)或 服务器 11处获取 IFTTT规则。 仍然可以依照步骤 S401至 S409的方法执行多电子设备的联 动过程。 不同之处在于: In some examples, it can be understood that the condition that triggers the first execution device to execute the third event is the same as the condition that triggers the second execution device to execute the fifth event. Therefore, when the first execution device determines to execute the third event, the second execution device may be notified to execute the fifth event. Then, the second execution device may not need to obtain the IFTTT rule from the electronic device 10 (electronic device A) or the server 11. The linkage process of multiple electronic devices can still be executed according to the method in steps S401 to S409. The difference is:
在步骤 S403中, 第一执行设备根据 IFTTT规则, 请求发送 IFTTT规则中的第一条件设 备、 第二条件设备以及第二执行设备。 在一些实施例中, 第一执行设备发送的组播消息或广 播消息中还包括第二执行设备的标识。 In step S403, the first execution device requests to send the first condition device, the second condition device, and the second execution device in the IFTTT rule according to the IFTTT rule. In some embodiments, the multicast message or the broadcast message sent by the first execution device further includes the identifier of the second execution device.
在步骤 S404中, 第二执行设备在接收到第一执行设备发送的组播消息或广播消息后,确 定该组播消息或广播消息中包含第二执行设备的标识, 也向第一执行设备发送第二执行设备 的地址, 以便后续第一执行设备可以向第二执行设备发送联动相关的消息。 In step S404, after receiving the multicast message or broadcast message sent by the first executing device, the second executing device determines that the multicast message or the broadcast message contains the identifier of the second executing device, and also sends it to the first executing device The address of the second execution device, so that the first execution device can send linkage-related messages to the second execution device subsequently.
在步骤 S409中, 当第一执行设备根据第一事件的通知消息和第二事件的查询结果,确定 要执行第三事件时, 向第二执行设备发送指令, 通知第二执行设备执行第五事件。 而后, 第 二执行设备执行第五事件。 In step S409, when the first execution device determines to execute the third event according to the notification message of the first event and the query result of the second event, it sends an instruction to the second execution device to notify the second execution device to execute the fifth event . Then, the second execution device executes the fifth event.
在另一些示例中, 第二执行设备可以从电子设备 10(电子设备 A)或服务器 11处获取 IFTTT规则,第二执行设备获取 IFTTT规则后的处理过程与第一执行设备获取 IFTTT规则后 的处理过程相同, 不再重复赘述。 In other examples, the second execution device may obtain the IFTTT rules from the electronic device 10 (electronic device A) or the server 11. The processing procedure after the second execution device obtains the IFTTT rules is the same as the processing after the first execution device obtains the IFTTT rules. The process is the same and will not be repeated here.
其他内容可参考上文的相关内容的描述, 不再赘述。 For other content, please refer to the description of related content above, and will not be repeated here.
可选的, 本申请实施例提供的另一种多电子设备联动的方法中, 由条件设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备, 例如执行设备。 在 IFTTT规则中的某 个或某些条件设备发生触发事件后, 可以直接通过本地网络通知其他条件设备。 其他条件设 备在确定满足 IFTTT规则后, 指示执行设备执行相应事件, 即完成联动。 Optionally, in another multi-electronic device linkage method provided in the embodiment of the present application, the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule, such as the execution device. After a trigger event occurs on a certain or some conditional devices in the IFTTT rule, other conditional devices can be notified directly through the local network. After other conditional devices determine that the IFTTT rules are met, they instruct the executing device to execute the corresponding event to complete the linkage.
可以理解的是, 图 4A所示的多个电子设备联动的方法也可以适用于两个电子设备之间 的联动。 具体的, 请参考图 4B 所示, 为本申请实施例提供的一种本地网络中两个电子设备 (执行设备和条件设备)联动的方法示意图, 该方法具体包括: It can be understood that the method of linkage between multiple electronic devices shown in FIG. 4A can also be applied to linkage between two electronic devices. Specifically, please refer to FIG. 4B. Two electronic devices in a local network provided in an embodiment of this application (Execution equipment and condition equipment) schematic diagram of the linkage method, the method specifically includes:
5410、 执行设备获取 IFTTT规则。 5410. The execution device obtains IFTTT rules.
其中, IFTTT规则是当条件设备发生第一事件时, 执行设备执行相应的执行事件(如第 一功能 X Among them, the IFTTT rule is that when the first event occurs on the conditional device, the execution device executes the corresponding execution event (such as the first function X
该步骤可参考图 4A中的步骤 S401中的相关描述。 For this step, refer to the related description in step S401 in FIG. 4A.
5411、 执行设备对获取的 IFTTT规则进行合法性检查。 5411. The execution device checks the legality of the obtained IFTTT rules.
该步骤可参考图 4A中的步骤 S402中的相关描述。 For this step, refer to the related description in step S402 in FIG. 4A.
5412、 执行设备请求发现 IFTTT规则中的条件设备。 5412. The execution device request discovers the conditional device in the IFTTT rule.
该步骤可参考图 4A中的步骤 S403中的相关描述。 For this step, refer to the related description in step S403 in FIG. 4A.
5413、 条件设备向执行设备返回自身的地址。 5413. The conditional device returns its own address to the executing device.
该步骤可参考图 4A中的步骤 S404中的相关描述。 For this step, refer to the related description in step S404 in FIG. 4A.
5414、 执行设备向条件设备发送针对第一事件的订阅消息。 S414. The execution device sends a subscription message for the first event to the condition device.
该步骤可参考图 4A中的步骤 S405中的相关描述。 For this step, refer to the related description in step S405 in FIG. 4A.
5415、 当条件设备发生第一事件时, 条件设备向执行设备发布第一事件的通知消息。 该步骤可参考图 4A中的步骤 S406中的相关描述。 5415. When a first event occurs in the conditional device, the conditional device publishes a notification message of the first event to the execution device. For this step, refer to the related description in step S406 in FIG. 4A.
5416、 执行设备根据第一事件, 确定执行相应的执行事件。 S416. The execution device determines to execute a corresponding execution event according to the first event.
该步骤可参考图 4A中的步骤 S409中的相关描述。 For this step, refer to the related description in step S409 in FIG. 4A.
如图 5A所示, 为本申请实施例提供的另一种本地网络中多个电子设备联动的方法示意 图。 在方法中, 可以由条件设备获取 IFTTT规则, 而执行设备可以不获取 IFTTT规则, 该方 法具体包括: As shown in FIG. 5A, it is a schematic diagram of another method for linkage of multiple electronic devices in a local network provided in an embodiment of this application. In the method, the conditional device may obtain the IFTTT rule, but the execution device may not obtain the IFTTT rule. The method specifically includes:
5501、 第一条件设备和第二条件设备分别获取 IFTTT规则。 S501. The first conditional device and the second conditional device respectively obtain IFTTT rules.
本步骤具体包括:第一条件设备获取 IFTTT规则(步骤 S501a)和第二条件设备获取 IFTTT 规则 (步骤 S501b X This step specifically includes: the first conditional device obtains IFTTT rules (step S501a) and the second conditional device obtains IFTTT rules (step S501b X
其中, 第一条件设备和第二条件设备获取 IFTTT规则的方法可参考步骤 S401 中第一执 行设备获取 IFTTT规则, 不再赘述。 Wherein, the method for obtaining the IFTTT rule by the first conditional device and the second conditional device may refer to the obtaining of the IFTTT rule by the first executing device in step S401, which will not be repeated.
5502、 第一条件设备和第二条件设备分别对获取到的 IFTTT规则进行合法性检查。 本步骤具体包括: 第一条件设备对获取到的 IFTTT规则进行合法性检查(步骤 S502a), 以及第二条件设备对获取到的 IFTTT规则进行合法性检查(步骤 S502b)。 S502. The first conditional device and the second conditional device respectively perform legality checks on the acquired IFTTT rules. This step specifically includes: the first conditional device performs a legality check on the obtained IFTTT rule (step S502a), and the second conditional device performs a legality check on the obtained IFTTT rule (step S502b).
示例性的, 第一条件设备和第二条件设备分别对获取到的 IFTTT规则进行解析, 确定该 IFTTT规则的完整性和正确性进行检查, 以确保可以根据该获取到的 IFTTT规则进行条件设 备和执行设备的联动。 Exemplarily, the first conditional device and the second conditional device respectively parse the acquired IFTTT rules to determine the completeness and correctness of the IFTTT rules to check to ensure that the conditional device and the Perform equipment linkage.
5503、 第一条件设备根据 IFTTT规则, 请求发现第一执行设备和第二条件设备; 第二条 件设备根据 IFTTT规则, 请求发现第一执行设备和第一条件设备。 S503. The first conditional device requests the discovery of the first execution device and the second conditional device according to the IFTTT rule; the second conditional device requests the discovery of the first execution device and the first conditional device according to the IFTTT rule.
本步骤具体包括: 第一条件设备请求发现第一执行设备和第二条件设备(步骤 S503b), 和第二条件设备请求发现第一执行设备和第一条件设备( S503a)。 This step specifically includes: the first conditional device requests the discovery of the first execution device and the second conditional device (step S503b), and the second conditional device requests the discovery of the first execution device and the first conditional device (S503a).
示例性的, 第一条件设备和第二条件设备分别从 IFTTT规则中获取相关的其他设备的标 识, 并在本地网络中进行组播或广播, 请求发现该 IFTTT规则中的其他设备。 即, 在本地网 络中组播或广播的消息中, 可以携带有 IFTTT规则中的其他设备的标识。 Exemplarily, the first conditional device and the second conditional device respectively obtain the identifiers of related other devices from the IFTTT rule, and perform multicast or broadcast in the local network, requesting to discover other devices in the IFTTT rule. That is, the multicast or broadcast message in the local network may carry the identification of other devices in the IFTTT rule.
例如: 假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事件同 时发生, 则第一执行设备执行第三事件。 其中, 第一事件为第一条件设备的触发事件, 第二 事件为第二条件设备的触发事件。 第三事件为第一执行设备的执行事件。 那么, 第一执行设 备可以将第一条件设备的标识、 第二条件设备的标识进行组播或广播。 那么, 第一条件设备 在本地网络中组播或广播的消息中, 可以携带有第一执行设备和第二条件设备的标识。 第二 条件设备在本地网络中组播或广播的消息中, 可以携带有第一执行设备和第一条件设备的标 识。 For example: Assume that the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event. The first event is a trigger event of the first conditional device, and the second event is a trigger event of the second conditional device. The third event is an execution event of the first execution device. Then, the first execution The device may multicast or broadcast the identity of the first conditional device and the identity of the second conditional device. Then, the message that the first conditional device multicasts or broadcasts in the local network may carry the identities of the first execution device and the second conditional device. The message that the second conditional device multicasts or broadcasts in the local network may carry the identifiers of the first execution device and the first conditional device.
5504、 第一执行设备和第二条件设备向第一条件设备回复各自地址; 第一执行设备和第 一条件设备向第二条件设备回复各自的地址。 5504. The first execution device and the second condition device replies to their respective addresses to the first condition device; the first execution device and the first condition device replies to their respective addresses to the second condition device.
图中分别以步骤 S504a、 步骤 S504b、 步骤 S504c和步骤 S504d示出。 In the figure, step S504a, step S504b, step S504c, and step S504d are shown respectively.
5505、 当第一条件设备的第一事件发生时, 第一条件设备向第二条件设备发布第一事件。 第一条件设备发生第一事件后, 可以向第二条件设备发送通知消息, 用于通知第一条件 设备已发生第一事件。 S505: When the first event of the first condition device occurs, the first condition device publishes the first event to the second condition device. After the first event occurs in the first condition device, a notification message may be sent to the second condition device to notify the first condition device that the first event has occurred.
示例性的, 该通知消息可以是一个特定格式或特定内容的消息, 第二条件设备在接收到 该通知消息后, 可以 4艮据该通知消息的发送者 (第一条件设备)确定第一事件已发生。 再示 例性的, 该通知消息也可以携带第一条件设备的标识, 那么, 第二条件设备在接收到该通知 消息后, 可以根据该第一条件设备的标识确定第一事件已发生。 又示例性的, 该通知消息也 可以携带第一事件的标识或者第一事件的内容, 那么, 第二条件设备在接收到该通知消息后, 可以根据第一事件的标识或者第一事件的内容确定第一事件已发生。 本申请实施例中对通知 消息的具体形式和内容不做限定。 Exemplarily, the notification message may be a message of a specific format or specific content, and after receiving the notification message, the second condition device may determine the first event according to the sender of the notification message (the first condition device) happened. As another example, the notification message may also carry the identification of the first conditional device. Then, after receiving the notification message, the second conditional device may determine that the first event has occurred according to the identification of the first conditional device. For another example, the notification message may also carry the identifier of the first event or the content of the first event. Then, after receiving the notification message, the second conditional device may use the identifier of the first event or the content of the first event. Make sure that the first event has occurred. The specific form and content of the notification message are not limited in the embodiments of this application.
5506、 当第二条件设备的第二事件发生时, 第二条件设备向第一执行设备发送执行第三 事件的命令。 S506: When the second event of the second condition device occurs, the second condition device sends a command to execute the third event to the first execution device.
由于第二条件设备获取有 IFTTT规则, 所以, 第二条件设备可以根据接收到的第一事件 的通知消息, 再结合自身发生的第二事件, 确定是否满足 IFTTT规则, 若满足 IFTTT规则, 则向第一执行设备发送执行第三事件的命令。 Since the second conditional device has acquired the IFTTT rules, the second conditional device can determine whether the IFTTT rules are satisfied according to the received notification message of the first event, combined with the second event that occurred by itself, and if the IFTTT rules are satisfied, then The first execution device sends a command to execute the third event.
在一些实施例中, 第一事件的通知消息具有时效性。 也就是说, 第一事件的通知消息在 预设的时间段内是有效的。 若超过预设时间段, 则该通知消息为无效, 即该通知消息不能用 于说明第一事件已发生, 那么, 当第二事件发生时, 第二条件设备还需要向第一条件设备查 询第一事件是否发生, 本申请实施例不再重复赘述。 In some embodiments, the notification message of the first event has timeliness. In other words, the notification message of the first event is valid within the preset time period. If it exceeds the preset time period, the notification message is invalid, that is, the notification message cannot be used to indicate that the first event has occurred. Then, when the second event occurs, the second condition device also needs to query the first condition device for the first condition. Whether an event occurs is not repeated in the embodiment of this application.
5507、 第一执行设备执行第三事件。 S507. The first execution device executes the third event.
其中, 第三事件为第一执行设备的执行事件, 该执行事件可以是一个动作或者一系列的 动作。 即, 当触发第一执行设备执行第三事件的条件满足时, 第一执行设备同时执行或者顺 序第三事件中一系列的动作。 该执行事件还可以设置延迟, 即, 当触发第一执行设备执行第 三事件的条件满足时, 第一执行设备可以在预设的延迟时间后开始执行第三事件。 本申请实 施例对此不做限定。 Wherein, the third event is an execution event of the first execution device, and the execution event may be an action or a series of actions. That is, when the condition that triggers the first execution device to execute the third event is satisfied, the first execution device simultaneously executes or sequentially a series of actions in the third event. The execution event may also set a delay, that is, when the condition that triggers the first execution device to execute the third event is satisfied, the first execution device may start to execute the third event after a preset delay time. This application embodiment does not limit this.
可以理解的是, 若第二条件设备的第二事件先于第一条件设备的第一事件发生时, 第二 条件设备会先向第一条件设备发布第二事件, 后续当第一条件设备发生第一事件时, 可以根 据第二事件的通知消息和第一事件确定是否满足 IFTTT规则。 若满足, 则第一条件设备指示 第一执行设备执行第三事件。 It is understandable that if the second event of the second condition device occurs before the first event of the first condition device, the second condition device will first publish the second event to the first condition device, and then when the first condition device occurs In the case of the first event, it may be determined whether the IFTTT rule is satisfied according to the notification message of the second event and the first event. If it is met, the first condition device instructs the first execution device to execute the third event.
下面结合具体的场景, 示例性说明下该本申请实施例中的本地联动的方法。 In the following, in combination with specific scenarios, the local linkage method in this embodiment of the present application will be exemplarily described.
如图 5B所示, 以电子设备 10(电子设备 A)是手机, 第一条件设备是智能门, 第二条 件设备是亮度传感器, 第一执行设备是灯为例进行说明。 As shown in FIG. 5B, the electronic device 10 (electronic device A) is a mobile phone, the first condition device is a smart door, the second condition device is a brightness sensor, and the first execution device is a lamp.
智能门和亮度传感器分别从手机侧获取一条 IFTTT规则, 例如: 如果智能门开锁, 且亮 度传感器检测到黑暗, 则执行开灯。 那么, 当智能门执行了开锁后, 会将该事件发布给亮度 传感器, 而亮度传感器检测房间亮度是否为黑暗, 若为黑暗, 则亮度传感器向灯发布事件。 灯接收到亮度传感器发布的事件后, 开灯。 The smart door and the brightness sensor respectively obtain an IFTTT rule from the mobile phone side. For example, if the smart door is unlocked and the brightness sensor detects darkness, the light is turned on. Then, when the smart door unlocks, the event will be posted to the brightness The brightness sensor detects whether the room brightness is dark, and if it is dark, the brightness sensor issues an event to the light. After the light receives the event issued by the brightness sensor, it turns on the light.
综上,本申请实施例提供的多电子设备联动的方法中, 由条件设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备。 在 IFTTT规则中的条件设备发生触发事件后, 可以 直接通过本地网络通知其他条件设备, 由各个条件设备确定满足 IFTTT规则后, 指示执行设 备执行相应事件, 即完成联动。 可见, 从某个条件设备的触发条件发生, 到执行设备执行相 应事件的整个过程中, 都是在本地网络中完成的, 提高了联动的效率, 提升了用户数据的安 全性。 In summary, in the method for multi-electronic device linkage provided in the embodiments of the present application, the conditional device obtains the IFTTT rule in advance, and discovers other electronic devices in the IFTTT rule. After a trigger event occurs on the conditional device in the IFTTT rule, it can directly notify other conditional devices through the local network. After each conditional device determines that the IFTTT rule is satisfied, the executing device is instructed to execute the corresponding event, which completes the linkage. It can be seen that the entire process from the occurrence of a trigger condition of a certain condition device to the execution of a corresponding event by the device is completed in the local network, which improves the efficiency of linkage and improves the security of user data.
在本申请的另一些实施例中, 一条 IFTTT规则中条件设备有 2个以上, 例如: 还有第三 条件设备,第三条件设备对应第四事件,则多个电子设备联动的过程与上述步骤 S501至 S507 相类似。 不同之处在于: In other embodiments of the present application, there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S501 to S507 are similar. The difference is:
在步骤 S501 中, 所有的条件设备都需要从服务器 11或电子设备 10(电子设备 A)处 获取 IFTTT规则, 也就是说, 第三条件设备也要获取 IFTTT规则。 在步骤 S502中, 第三条 件设备也要对 IFTTT规则进行合法性检查。 In step S501, all conditional devices need to obtain the IFTTT rule from the server 11 or the electronic device 10 (electronic device A), that is, the third conditional device also needs to obtain the IFTTT rule. In step S502, the third-condition device also performs a legality check on the IFTTT rule.
在步骤 S503中, 第一条件设备和第二条件设备还要发现第三条件设备, 即第一条件设备 和第二条件设备发送的组播消息或广播消息中还包含有第三条件设备的标识。 同理, 第三条 件设备也要发送组播消息或广播消息, 用于发现 IFTTT规则中的其他电子设备, 例如: 第一 条件设备、 第二条件设备和第一执行设备。 In step S503, the first condition device and the second condition device also need to discover the third condition device, that is, the multicast message or broadcast message sent by the first condition device and the second condition device also contains the identity of the third condition device . In the same way, the third conditional device must also send a multicast message or a broadcast message for discovering other electronic devices in the IFTTT rule, such as the first conditional device, the second conditional device, and the first execution device.
在步骤 S504中,第三条件设备在接收到第一条件设备和第二条件设备分别发送的组播消 息或广播消息后, 也会分别向第一条件设备和第二条件设备分别发送第三条件设备的地址。 同理, 第一条件设备、 第二条件设备和第一执行设备在接收到第三条件设备发送的组播消息 或广播消息后, 也会向第三条件设备回复各自的网络地址。 In step S504, after receiving the multicast message or the broadcast message sent by the first condition device and the second condition device, the third condition device will also send the third condition device to the first condition device and the second condition device respectively. The address of the device. In the same way, the first conditional device, the second conditional device, and the first execution device will also reply their respective network addresses to the third conditional device after receiving the multicast message or broadcast message sent by the third conditional device.
在步骤 S505至 S506中, 当第一条件设备发生第一事件时, 第一条件设备分别向第二条 件设备和第三条件设备发布第一事件。 这样, 第二条件设备和第三条件设备都获知到第一事 件已发生。 当第二事件发生后, 第二条件设备向第三条件设备发布第二事件(也可以同时也 向第一条件设备发布第二事件)。 这样, 当第三条件设备的第四事件(第三条件设备对应的触 发事件)发生时, 第三条件设备根据 IFTTT规则,确定是否指示第一执行设备执行第三事件。 In steps S505 to S506, when the first event occurs in the first condition device, the first condition device publishes the first event to the second condition device and the third condition device respectively. In this way, both the second condition device and the third condition device learn that the first event has occurred. After the second event occurs, the second condition device publishes the second event to the third condition device (it can also publish the second event to the first condition device at the same time). In this way, when the fourth event of the third condition device (the trigger event corresponding to the third condition device) occurs, the third condition device determines whether to instruct the first execution device to execute the third event according to the IFTTT rule.
其他内容请参考上文相关内容的描述, 不再赘述。 For other content, please refer to the description of the relevant content above, and will not repeat it.
在本申请的另一些实施例中, 一条 IFTTT规则中执行设备有 2个以及 2个以上, 例如: 还有第二执行设备, 第二执行设备需要执行的事件为第五事件。 那么, 在确定所有条件设备 的触发事件都满足 IFTTT规则时, 指示第一执行设备执行第三事件的同时, 也指示其他执行 设备执行相应的事件。 In other embodiments of the present application, there are two or more execution devices in an IFTTT rule. For example, there is a second execution device, and the event that the second execution device needs to execute is the fifth event. Then, when it is determined that the trigger events of all conditional devices satisfy the IFTTT rule, the first execution device is instructed to execute the third event, and other execution devices are also instructed to execute the corresponding event.
例如: 假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事件同 时发生, 则第一执行设备执行第三事件, 且第二执行设备执行第五事件。 其中, 第五事件为 第二执行设备的执行事件。 For example: Assume that the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event. Among them, the fifth event is an execution event of the second execution device.
在这种场景下, 仍然可以采用步骤 S501至 S507中的方法, 不同之处在于: In this scenario, the methods in steps S501 to S507 can still be used, and the difference lies in:
在步骤 S503至 S504, 条件设备发现 IFTTT规则中其他设备的过程中, 也需要发现第二 执行设备。 相关内容可参考上文描述, 不再赘述。 In steps S503 to S504, when the conditional device discovers other devices in the IFTTT rule, the second execution device also needs to be discovered. For related content, please refer to the above description, which will not be repeated here.
在步骤 S506 中,当第二条件设备的第二事件发生时, 第二条件设备指示第一执行设备执 行第三事件, 同时第二条件设备指示第二执行设备执行第五事件。 In step S506, when the second event of the second condition device occurs, the second condition device instructs the first execution device to execute the third event, and the second condition device instructs the second execution device to execute the fifth event.
其他内容参考上文相关内容的描述, 不再赘述。 可选的, 本申请实施例提供的又一种多电子设备联动的方法中, 由执行设备和部分条件 设备提前获取 IFTTT规则, 并发现该 IFTTT规则中的其他电子设备, 例如: 其他条件设备。 当获取 IFTTT规则的某个条件设备发生触发事件后, 可以查询其他条件设备的触发事件, 或 者可以通知执行设备, 由执行设备条件设备去查询其他条件设备的触发事件。 最后, 当确定 所有条件设备的触发条件均发生后, 执行设备执行相应事件, 即完成联动。 For other content, refer to the description of the relevant content above, and will not be repeated. Optionally, in another multi-electronic device linkage method provided in the embodiment of the present application, the executing device and some conditional devices obtain the IFTTT rule in advance, and discover other electronic devices in the IFTTT rule, such as other conditional devices. When a trigger event occurs on a certain condition device that obtains the IFTTT rule, the trigger event of other condition devices can be queried, or the execution device can be notified, and the execution device condition device can query the trigger events of other condition devices. Finally, when it is determined that the triggering conditions of all the condition devices have occurred, the execution device executes the corresponding event, and the linkage is completed.
如图 6A所示, 为本申请实施例提供的另一种本地网络中多个电子设备联动的方法示意 图。 在方法中, 可以由部分条件设备和执行设备获取 IFTTT规则, 该方法具体包括: As shown in FIG. 6A, it is a schematic diagram of another method for linkage of multiple electronic devices in a local network provided in an embodiment of this application. In the method, the IFTTT rule can be obtained by the partial conditional device and the executing device, and the method specifically includes:
5601、 第一条件设备和第一执行设备分别获取 IFTTT规则。 S601. The first conditional device and the first execution device respectively obtain IFTTT rules.
本步骤具体包括: 第一条件设备获取 IFTTT规则 (步骤 S601a), 和第一执行设备获取 IFTTT规则 (步骤 S601b)。 This step specifically includes: the first conditional device obtains the IFTTT rule (step S601a), and the first execution device obtains the IFTTT rule (step S601b).
其中, 第一条件设备和第一执行设备获取 IFTTT规则的方法可参考步骤 S401 中第一执 行设备获取 IFTTT规则, 不再赘述。 Wherein, the method for obtaining the IFTTT rule by the first conditional device and the first execution device may refer to the first execution device obtaining the IFTTT rule in step S401, which will not be repeated.
5602、 第一条件设备和第一执行设备分别对获取到的 IFTTT规则进行合法性检查。 本步骤具体包括: 第一条件设备对获取到的 IFTTT规则进行合法性检查(步骤 S602b), 和第一执行设备分别对获取到的 IFTTT规则进行合法性检查( S602a)。 S602. The first condition device and the first execution device respectively perform legality checks on the acquired IFTTT rules. This step specifically includes: the first condition device performs a legality check on the obtained IFTTT rule (step S602b), and the first execution device performs a legality check on the obtained IFTTT rule (S602a).
示例性的, 第一条件设备和第一执行设备分别对获取到的 IFTTT规则进行解析, 确定该 IFTTT规则的完整性和正确性进行检查, 以确保可以根据该获取到的 IFTTT规则进行条件设 备和执行设备的联动。 Exemplarily, the first conditional device and the first execution device respectively parse the acquired IFTTT rules to determine the completeness and correctness of the IFTTT rules to check, so as to ensure that the conditional device and the execution device can be performed according to the acquired IFTTT rules. Perform equipment linkage.
5603、 第一条件设备根据 IFTTT规则, 请求发现第一执行设备和第二条件设备; 第一执 行设备根据 IFTTT规则, 请求发现第一条件设备和第二条件设备。 S603. The first conditional device requests discovery of the first conditional device and the second conditional device according to the IFTTT rule; the first conditional device requests discovery of the first conditional device and the second conditional device according to the IFTTT rule.
本步骤具体包括: 第一条件设备请求发现第一执行设备和第二条件设备(步骤 S603a), 以及第一执行设备请求发现第一条件设备和第二条件设备(步骤 S603b)。 This step specifically includes: the first conditional device requests the discovery of the first conditional device and the second conditional device (step S603a), and the first conditional device requests the discovery of the first conditional device and the second conditional device (step S603b).
示例性的, 第一条件设备和第二条件设备分别从 IFTTT规则中获取相关的其他设备的标 识, 并在本地网络中进行组播或广播, 请求发现该 IFTTT规则中的其他设备。 即, 在本地网 络中组播或广播的消息中, 可以携带有 IFTTT规则中的其他设备的标识。 Exemplarily, the first conditional device and the second conditional device respectively obtain the identifiers of related other devices from the IFTTT rule, and perform multicast or broadcast in the local network, requesting to discover other devices in the IFTTT rule. That is, the multicast or broadcast message in the local network may carry the identification of other devices in the IFTTT rule.
在一些实施例中, 由于第一条件设备不需要向第二条件设备发送数据, 因此, 在该步骤 中时, 第一条件设备也可以不发现第二条件设备。 即, 第一条件设备发送的组播消息或广播 消息中不携带第二条件设备的标识, 这样, 当第二条件设备接收到该组播消息或广播消息后, 不用向第一条件设备回复自身的网络地址。 同理, 第一执行设备不需要向第一条件设备发送 数据, 因此, 在该步骤中, 第一执行设备也可以不发现第一条件设备。 即, 第一执行设备发 送的组播消息或广播消息中不携带第一条件设备的标识。 In some embodiments, since the first condition device does not need to send data to the second condition device, during this step, the first condition device may not find the second condition device. That is, the multicast message or broadcast message sent by the first conditional device does not carry the identifier of the second conditional device. In this way, after the second conditional device receives the multicast message or broadcast message, it does not need to reply to the first conditional device. Network address. Similarly, the first execution device does not need to send data to the first conditional device. Therefore, in this step, the first execution device may not discover the first conditional device. That is, the multicast message or broadcast message sent by the first execution device does not carry the identifier of the first conditional device.
5604、 第一执行设备和第二条件设备向第一条件设备回复各自地址; 第一执行设备和第 一条件设备项第二条件设备回复各自的地址。 5604. The first execution device and the second condition device replies to their respective addresses to the first condition device; the first execution device and the first condition device item and the second condition device replies to their respective addresses.
图中分别以步骤 S604a、 步骤 S604b、 步骤 S604c和步骤 S604d示出。 In the figure, step S604a, step S604b, step S604c, and step S604d are shown respectively.
5605、 当第一条件设备的第一事件发生时, 第一条件设备向第一执行设备发布第一事件。 第一条件设备发生第一事件后, 可以向第一执行设备发送通知消息, 用于通知第一条件 设备已发生第一事件。 S605. When the first event of the first condition device occurs, the first condition device publishes the first event to the first execution device. After the first event occurs in the first condition device, a notification message may be sent to the first execution device to notify the first condition device that the first event has occurred.
5606、 第一执行设备根据 IFTTT规则, 向第二条件设备查询第二事件。 S606. The first execution device queries the second condition device for the second event according to the IFTTT rule.
5607、 第二条件设备向第一执行设备返回第二事件的查询结果。 S607: The second condition device returns the query result of the second event to the first execution device.
5608、 第一执行设备执行第三事件。 S608: The first execution device executes the third event.
第一执行设备根据第一事件的通知消息和第二时间的查询结果, 确定是否满足 IFTTT规 则。 若满足, 则执行第三事件。 否则, 不执行第三事件。 The first execution device determines whether the IFTTT regulations are met according to the notification message of the first event and the query result at the second time. Then. If it is satisfied, the third event is executed. Otherwise, the third event is not executed.
在本申请的另一些实施例中, 第一条件设备发送第一事件后, 也可以向第二条件设备查 询第二事件。 第一条件设备确定第一事件和第二事件是否满足 IFTTT规则, 若满足, 则指示 第一执行设备执行第三事件。 也就是说, 步骤 S605至 S607可替换为步骤 S609至 S610, 即 本申请实施例提供的多设备联动的方法包括: S601至 S604, S609至 S611 , 以及步骤 S608 , 如下: In some other embodiments of the present application, after the first conditional device sends the first event, it may also query the second conditional device for the second event. The first condition device determines whether the first event and the second event meet the IFTTT rule, and if they do, instruct the first execution device to execute the third event. That is, steps S605 to S607 can be replaced with steps S609 to S610, that is, the method of multi-device linkage provided in the embodiment of the present application includes: S601 to S604, S609 to S611, and step S608, as follows:
5609、 当第一条件设备发生第一事件时, 第一条件设备向第二条件设备查询第二事件是 否发生。 S609. When the first event occurs in the first condition device, the first condition device queries the second condition device whether the second event occurs.
5610、 第二条件设备向第一条件设备返回第二时间的查询结果。 5610. The second condition device returns the query result of the second time to the first condition device.
5611、 第一条件设备根据第一事件和第二事件的查询结果, 确定是否满足 IFTTT规则, 若满足, 则指示第一执行设备执行第三事件。 5611. The first condition device determines whether the IFTTT rule is satisfied according to the query results of the first event and the second event, and if so, instructs the first execution device to execute the third event.
还需要说明都是, 在一些实施例中, 若电子设备采用步骤 S609至 S611的流程时, 由于 第一执行设备不需要向第一条件设备和第二条件设备发送数据, 因此, 在步骤 S603和 S604 中时, 第一执行设备也可以不发现第一条件设备和第二条件设备。 It should also be noted that, in some embodiments, if the electronic device adopts the process of steps S609 to S611, since the first execution device does not need to send data to the first condition device and the second condition device, in step S603 and In S604, the first execution device may not find the first condition device and the second condition device.
综上, 在该实施例中, 由执行设备和条件设备获取 IFTTT规则, 可以省去执行设备向条 件设备订阅触发事件的过程。 而且, 在该实施例中, 只有当第一条件设备的第一事件发生时, 才会去查询第二事件的状态。 也就是说, 当第二条件设备的第二事件频繁发生时, 第二条件 设备也不用频繁发布第二事件, 有利于节省资源。 In summary, in this embodiment, the execution device and the conditional device obtain the IFTTT rules, which can save the process of subscribing the execution device to the conditional device for the trigger event. Moreover, in this embodiment, only when the first event of the first condition device occurs, the status of the second event will be inquired. That is to say, when the second event of the second condition device frequently occurs, the second condition device does not need to publish the second event frequently, which is beneficial to saving resources.
例如: 如图 6B所示, 以电子设备 10(电子设备 A)是手机, 第一条件设备是智能门, 第二条件设备是亮度传感器(用于检测室内环境的亮度), 第一执行设备是灯为例进行说明。 For example: as shown in Figure 6B, the electronic device 10 (electronic device A) is a mobile phone, the first condition device is a smart door, the second condition device is a brightness sensor (used to detect the brightness of an indoor environment), and the first execution device is Take the lamp as an example.
智能门和灯, 分别从手机处获取 IFTTT规则, 例如为, 如果智能门锁开锁了, 且室内环 境处于黑暗状态时, 则自动开启室内灯。 那么, 当智能门开锁时, 智能门向灯发布开锁事件。 灯再向亮度传感器查询室内是否黑暗。 若黑暗, 则灯自动开启。 可见, 在本申请中, 只有在 智能门锁开锁时, 即表示家里有人回来, 才去查询亮度传感器的检测结果。 若检测结果表明 室内环境处于黑暗状态, 则开灯。 考虑到当家里没有人在时, 室内环境可能一直处于黑暗状 态。 若亮度传感器一直发布室内黑暗的事件, 没有意义, 反而浪费资源。 The smart door and the light obtain the IFTTT rules from the mobile phone, for example, if the smart door lock is unlocked and the indoor environment is in a dark state, the indoor light is automatically turned on. Then, when the smart door is unlocked, the smart door issues an unlock event to the light. The lamp then queries the brightness sensor to see if the room is dark. If it is dark, the light turns on automatically. It can be seen that in this application, only when the smart door lock is unlocked, which means that someone at home comes back, the detection result of the brightness sensor is checked. If the test result shows that the indoor environment is in a dark state, turn on the light. Considering that when no one is at home, the indoor environment may always be in a dark state. If the brightness sensor keeps reporting indoor dark events, it is meaningless and wastes resources.
在本申请的另一些实施例中, 一条 IFTTT规则中条件设备有 2个以上, 例如: 还有第三 条件设备,第三条件设备对应第四事件,则多个电子设备联动的过程与上述步骤 S601至 S608 相类似。 In other embodiments of the present application, there are more than two conditional devices in an IFTTT rule, for example: there is a third conditional device, and the third conditional device corresponds to the fourth event, the process of multiple electronic device linkage is the same as the above steps S601 to S608 are similar.
在一些示例中, 第三条件设备可以不获取 IFTTT规则, 那么, 与上述步骤 S601至 S608 采用的方法, 不同之处在于: In some examples, the third condition device may not acquire the IFTTT rule. Then, the difference from the method adopted in steps S601 to S608 above is:
在步骤 S603至 S604的发现其他电子设备的过程中, 还要发现第三条件设备, 具体发现 过程不再赘述。 In the process of discovering other electronic devices in steps S603 to S604, the third condition device is also discovered, and the specific discovery process will not be described again.
在步骤 S606中, 第一执行设备向第二条件设备查询第二事件时,也向第三条件设备查询 第四事件。 其中, 第四事件为第三条件设备对应的触发事件。 而后, 第三条件设备向第一执 行设备返回第四事件的查询结果。 In step S606, when the first execution device queries the second condition device for the second event, it also queries the third condition device for the fourth event. Among them, the fourth event is a trigger event corresponding to the third conditional device. Then, the third condition device returns the query result of the fourth event to the first execution device.
在步骤 S608中, 第一执行设备根据第一事件的通知消息、第二事件和第四事件的查询结 果, 确定是否满足 IFTTT规则, 是否执行第三事件。 In step S608, the first execution device determines whether the IFTTT rule is satisfied and whether to execute the third event according to the notification message of the first event, the query results of the second event, and the fourth event.
其他内容请参考上文相关内容的描述, 不再赘述。 For other content, please refer to the description of the relevant content above, and will not repeat it.
在另一些示例中,第三条件设备可以获取 IFTTT规则,那么,与上述 S601至 S604, S609 至 S611 , 以及步骤 S608的方法不同之处在于: 都获取了 IFTTT规则的第一条件设备和第三条件设备之间的交互可以参考上述步骤 S501 至 S507中第一条件设备和第二条件设备之间的交互, 不再赘述。 In other examples, the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that: The interaction between the first conditional device and the third conditional device that have both obtained the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in steps S501 to S507, and details are not described herein again.
在另一些示例中,第三条件设备可以获取 IFTTT规则,那么,与上述 S601至 S604, S609 至 S611 , 以及步骤 S608的方法不同之处在于: In other examples, the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that:
都获取了 IFTTT规则的第一条件设备和第三条件设备之间的交互可以参考上述步骤 S501 至 S507中第一条件设备和第二条件设备之间的交互, 不再赘述。 The interaction between the first conditional device and the third conditional device that have both acquired the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in the foregoing steps S501 to S507, and details are not described herein again.
在本申请的另一些实施例中, 一条 IFTTT规则中条件设备有 2个以上, 例如: 还有第三 条件设备, 则多个电子设备联动的过程与上述 S601至 S604, S609至 S611 , 以及步骤 S608, 相类似。 In other embodiments of the present application, there are more than two conditional devices in an IFTTT rule, for example: there is also a third conditional device, the process of linkage of multiple electronic devices is the same as the aforementioned S601 to S604, S609 to S611, and steps S608, similar.
在一些示例中,第三条件设备可以不获取 IFTTT规则,那么,与上述 S601至 S604, S609 至 S611 , 以及步骤 S608的方法不同之处在于: In some examples, the third conditional device may not acquire the IFTTT rule. Then, the method differs from the foregoing S601 to S604, S609 to S611, and step S608 in that:
在步骤 S603至 S604的发现其他电子设备的过程中, 还要发现第三条件设备, 具体发现 过程不再赘述。 In the process of discovering other electronic devices in steps S603 to S604, the third condition device is also discovered, and the specific discovery process will not be described again.
在步骤 S609中, 当第一条件设备的第一事件发生时, 向第二条件设备查询第二事件, 同 时也向第三条件设备查询第四事件。 而后, 第三条件设备向第一条件设备返回第四事件的查 询结果。 In step S609, when the first event of the first condition device occurs, the second condition device is inquired about the second event, and the third condition device is also inquired about the fourth event. Then, the third condition device returns the query result of the fourth event to the first condition device.
在步骤 S611中, 第一条件设备根据第一事件、 第二事件以及第四事件的查询结果, 确定 是否指示第一执行设备执行第三事件。 In step S611, the first conditional device determines whether to instruct the first execution device to execute the third event according to the query results of the first event, the second event, and the fourth event.
其他内容请参考上文相关内容的描述, 不再赘述。 For other content, please refer to the description of the relevant content above, and will not repeat it.
在另一些示例中,第三条件设备可以获取 IFTTT规则,那么,与上述 S601至 S604, S609 至 S611 , 以及步骤 S608的方法不同之处在于: In other examples, the third conditional device can obtain the IFTTT rule. Then, the method differs from the above-mentioned S601 to S604, S609 to S611, and step S608 in that:
都获取了 IFTTT规则的第一条件设备和第三条件设备之间的交互可以参考上述步骤 S501 至 S507中第一条件设备和第二条件设备之间的交互, 不再赘述。 The interaction between the first conditional device and the third conditional device that have both acquired the IFTTT rule can refer to the interaction between the first conditional device and the second conditional device in the foregoing steps S501 to S507, and details are not described herein again.
在本申请的另一些实施例中, 一条 IFTTT规则中执行设备有 2个以及 2个以上, 例如: 还有第二执行设备, 第二执行设备需要执行的事件为第五事件。 那么, 在确定所有条件设备 的触发事件都满足 IFTTT规则时, 指示第一执行设备执行第三事件的同时, 也指示其他执行 设备执行相应的事件。 In other embodiments of the present application, there are two or more execution devices in an IFTTT rule. For example, there is a second execution device, and the event that the second execution device needs to execute is the fifth event. Then, when it is determined that the trigger events of all conditional devices satisfy the IFTTT rule, the first execution device is instructed to execute the third event, and other execution devices are also instructed to execute the corresponding event.
例如: 假设 IFTTT规则为: 如果第一条件设备的第一事件和第二条件设备的第二事件同 时发生, 则第一执行设备执行第三事件, 且第二执行设备执行第五事件。 其中, 第五事件为 第二执行设备的执行事件。 For example: Assume that the IFTTT rule is: if the first event of the first condition device and the second event of the second condition device occur simultaneously, the first execution device executes the third event, and the second execution device executes the fifth event. Among them, the fifth event is an execution event of the second execution device.
在这种场景下,仍然可以采用上述步骤 S601至 S608的方法或者上述步骤 S601至 S604, 步骤 S609至 S611 , 以及步骤 S608的方法, 不同之处在于: In this scenario, the method of steps S601 to S608 or the method of steps S601 to S604, steps S609 to S611, and step S608 can still be used. The difference is:
在步骤 S603至 S604, 条件设备和执行设备在发现 IFTTT规则中其他设备的过程中, 也 需要发现第二执行设备。 相关内容可参考上文描述, 不再赘述。 In steps S603 to S604, the conditional device and the executing device also need to discover the second executing device during the process of discovering other devices in the IFTTT rule. For related content, please refer to the above description, which will not be repeated here.
在步骤 S608 中,当第一执行设备确定执行第三事件时, 也指示第二执行设备执行第五事 件。 或者, 在步骤 S611中, 当第一条件设备指示第一执行设备执行第三事件时, 也指示第二 执行设备执行第五事件。 In step S608, when the first execution device determines to execute the third event, it also instructs the second execution device to execute the fifth event. Alternatively, in step S611, when the first conditional device instructs the first execution device to execute the third event, it also instructs the second execution device to execute the fifth event.
其他内容参考上文相关内容的描述, 不再赘述。 For other content, refer to the description of the relevant content above, and will not be repeated.
可以理解的是, 上述终端等为了实现上述功能, 其包含了执行各个功能相应的硬件结构 和 /或软件模块。 本领域技术人员应该很容易意识到, 结合本文中所公开的实施例描述的各示 例的单元及算法步骤, 本申请实施例能够以硬件或硬件和计算机软件的结合形式来实现。 某 个功能究竟以硬件还是计算机软件驱动硬件的方式来执行, 取决于技术方案的特定应用和设 计约束条件。 专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能, 但 是这种实现不应认为超出本发明实施例的范围。 It can be understood that, in order to implement the aforementioned functions, the aforementioned terminal and the like include hardware structures and/or software modules corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of the examples described in the embodiments disclosed herein, the embodiments of the present application can be implemented in the form of hardware or a combination of hardware and computer software. Certain Whether each function is executed by hardware or computer software-driven hardware depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the embodiments of the present invention.
本申请实施例可以根据上述方法示例对上述终端等进行功能模块的划分, 例如, 可以对 应各个功能划分各个功能模块, 也可以将两个或两个以上的功能集成在一个处理模块中。 上 述集成的模块既可以采用硬件的形式实现, 也可以采用软件功能模块的形式实现。 需要说明 的是, 本发明实施例中对模块的划分是示意性的, 仅仅为一种逻辑功能划分, 实际实现时可 以有另外的划分方式。 下面以采用对应各个功能划分各个功能模块为例进行说明: The embodiments of the present application may divide the above-mentioned terminal and the like into functional modules according to the above-mentioned method examples. For example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiment of the present invention is illustrative, and is only a logical function division, and other division methods may be used in actual implementation. The following is an example of dividing each function module corresponding to each function:
图 7示出了上述实施例中所涉及的一种装置的结构示意图, 该装置可以实现本申请实施 例提供的方法中电子设备的功能。 该装置可以为电子设备或者为可以支持电子设备实现本 申请实施例中电子设备的功能的装置, 例如该装置为应用于电子设备中的芯片系统。 该 装置包括: 处理单元 701和通信单元 702。 其中, 处理单元 701可以用于支持图 4A所示的电 子设备执行上述实施例中的步骤 S402和 S409,或者用于支持图 4B所示的电子设备执行上述 实施例中的步骤 S411和 S416,或者用于支持图 5A所示的电子设备执行上述实施例中的步骤 S502和 S507 , 或者用于支持图 6A所示的电子设备执行上述实施例中的步骤 S602和 S608。 通信单元 702用于支持图 4A所示的电子设备执行上述实施例中的步骤 S401、 S403至 S408 , 或者用于支持图 4B所示的电子设备执行上述实施例中的步骤 S412至 S415 ,或者用于支持图 5A所示的电子设备执行上述实施例中的步骤 S501、 S503至 S506, 或者用于支持图 6A所示 的电子设备执行上述实施例中的步骤 S601、 S603至 S607 , S609至 S611。 上述方法实施例涉 及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述, 在此不再赘述。 Fig. 7 shows a schematic structural diagram of an apparatus involved in the foregoing embodiment, and the apparatus can realize the function of the electronic device in the method provided in the embodiment of the present application. The device may be an electronic device or a device that can support the electronic device to realize the functions of the electronic device in the embodiments of the present application. For example, the device is a chip system applied to the electronic device. The device includes: a processing unit 701 and a communication unit 702. The processing unit 701 may be used to support the electronic device shown in FIG. 4A to perform steps S402 and S409 in the foregoing embodiment, or to support the electronic device shown in FIG. 4B to perform steps S411 and S416 in the foregoing embodiment, or It is used to support the electronic device shown in FIG. 5A to execute steps S502 and S507 in the foregoing embodiment, or it is used to support the electronic device shown in FIG. 6A to execute steps S602 and S608 in the foregoing embodiment. The communication unit 702 is used to support the electronic device shown in FIG. 4A to perform steps S401, S403 to S408 in the foregoing embodiment, or to support the electronic device shown in FIG. 4B to perform steps S412 to S415 in the foregoing embodiment, or use It is used to support the electronic device shown in FIG. 5A to execute steps S501, S503 to S506 in the foregoing embodiment, or to support the electronic device shown in FIG. 6A to execute steps S601, S603 to S607, and S609 to S611 in the foregoing embodiment. All relevant content of each step involved in the above method embodiment can be cited in the functional description of the corresponding functional module, and will not be repeated here.
可选的, 本申请的实施例中, 芯片系统可以由芯片构成, 也可以包含芯片和其他分立器 件。 Optionally, in the embodiments of the present application, the chip system may be composed of chips, or may include chips and other discrete devices.
可选的, 本申请实施例中的通信单元可以为电路、 器件、 接口、 总线、 软件模块、 收发 器或者其它任意可以实现通信的装置。 Optionally, the communication unit in the embodiment of the present application may be a circuit, a device, an interface, a bus, a software module, a transceiver, or any other device that can implement communication.
可选地, 通信单元 702可以为电子设备或者应用于电子设备中的芯片系统的通信接口, 例如, 该通信接口可以为收发电路, 处理单元 701可以为集成在电子设备或者应用于电子设 备中的芯片系统的处理器上。 Optionally, the communication unit 702 may be an electronic device or a communication interface applied to a chip system in an electronic device. For example, the communication interface may be a transceiver circuit, and the processing unit 701 may be an electronic device or a communication interface applied to the electronic device. On the processor of the chip system.
图 8示出了上述实施例中所涉及的装置的一种可能的逻辑结构示意图, 该装置可以实现 本申请实施例提供的方法中电子设备的功能。 该装置可以为电子设备或者应用于电子设备 中的芯片系统, 该装置包括: 处理模块 801和通信模块 803。 处理模块 801用于对图 7所示 的装置的动作进行控制管理, 例如, 处理模块 801用于执行在图 7所示的装置侧进行消息或 数据处理的步骤。例如,可以用于支持图 7所示的装置执行上述实施例中的步骤 S402和 S409, 或者执行上述实施例中的步骤 S411和 S416, 或者执行上述实施例中的步骤 S502和 S507 , 或者执行上述实施例中的步骤 S602和 S608。 通信模块 803用于支持图 7所示的装置执行上 述实施例中的步骤 S401、 S403至 S408 , 或者执行上述实施例中的步骤 S412至 S415, 或者 用于执行上述实施例中的步骤 S501、 S503至 S506,或者执行上述实施例中的步骤 S601、 S603 至 S607 , S609至 S611。 和 /或用于本文所描述的技术的其他由图 8所示的装置执行的过程。 可选的, 图 8所示的装置还可以包括存储模块 802, 用于存储该装置的程序代码和数据。 FIG. 8 shows a schematic diagram of a possible logical structure of the device involved in the foregoing embodiment, and the device can realize the function of the electronic device in the method provided in the embodiment of the present application. The device may be an electronic device or a chip system applied to the electronic device. The device includes: a processing module 801 and a communication module 803. The processing module 801 is used to control and manage the actions of the device shown in FIG. 7, for example, the processing module 801 is used to execute the steps of message or data processing on the device side shown in FIG. For example, it can be used to support the device shown in FIG. 7 to perform steps S402 and S409 in the foregoing embodiment, or perform steps S411 and S416 in the foregoing embodiment, or perform steps S502 and S507 in the foregoing embodiment, or perform the foregoing Steps S602 and S608 in the embodiment. The communication module 803 is used to support the device shown in FIG. 7 to perform steps S401, S403 to S408 in the foregoing embodiment, or to perform steps S412 to S415 in the foregoing embodiment, or to perform steps S501 and S503 in the foregoing embodiment. To S506, or execute steps S601, S603 to S607, and S609 to S611 in the foregoing embodiment. And/or other processes performed by the apparatus shown in FIG. 8 used in the techniques described herein. Optionally, the device shown in FIG. 8 may further include a storage module 802 for storing program codes and data of the device.
其中, 处理模块 801可以是处理器或控制器, 例如可以是中央处理器单元, 通用处理器, 数字信号处理器, 专用集成电路, 现场可编程门阵列或者其他可编程逻辑器件、 晶体管逻辑 器件、 硬件部件或者其任意组合。 其可以实现或执行结合本申请实施例公开内容所描述的各 种示例性的逻辑方框, 模块和电路。 处理器也可以是实现计算功能的组合, 例如包含一个或 多个微处理器组合, 数字信号处理器和微处理器的组合等等。 通信模块 803可以是收发器、 收发电路或通信接口等。 存储模块 802可以是存储器。 The processing module 801 may be a processor or a controller, for example, a central processing unit, a general-purpose processor, a digital signal processor, an application specific integrated circuit, a field programmable gate array or other programmable logic devices, transistor logic devices, Hardware components or any combination thereof. It can implement or execute each of the descriptions in combination with the disclosure of the embodiments of the present application An exemplary logic block, module and circuit. The processor may also be a combination that implements computing functions, for example, a combination of one or more microprocessors, a combination of a digital signal processor and a microprocessor, and so on. The communication module 803 may be a transceiver, a transceiver circuit, or a communication interface. The storage module 802 may be a memory.
当处理模块 801为处理器 110,通信模块 803为移动通信模块 150或者无线通信模块 160 或者 USB接口 130, 存储模块 802为内部存储器 121 , 或者外部存储器接口 120连接的外部 存储器时, 本申请实施例所涉及的装置可以为图 2A所示的电子设备 100。 When the processing module 801 is the processor 110, the communication module 803 is the mobile communication module 150 or the wireless communication module 160 or the USB interface 130, and the storage module 802 is the internal memory 121, or the external memory connected to the external memory interface 120, the embodiment of the present application The involved device may be the electronic device 100 shown in FIG. 2A.
本申请实施例提供的方法中, 可以全部或部分地通过软件、 硬件、 固件或者其任意组合 来实现。 当使用软件实现时, 可以全部或部分地以计算机程序产品的形式实现。 所述计算机 程序产品包括一个或多个计算机指令。 在计算机上加载和执行所述计算机程序指令时, 全部 或部分地产生按照本申请实施例描述的流程或功能。 所述计算机可以是通用计算机、 专用计 算机、 计算机网络、 网络设备、 终端或者其他可编程装置。 所述计算机指令可以存储在计算 机可读存储介质中, 或者从一个计算机可读存储介质向另一个计算机可读存储介质传输, 例 如, 所述计算机指令可以从一个网站站点、 计算机、 服务器或数据中心通过有线 (例如同轴 电缆、 光纤、 数字用户线( digital subscriber line, DSL))或无线(例如红外、 无线、 微波等) 方式向另一个网站站点、 计算机、 服务器或数据中心进行传输。 所述计算机可读存储介质可 以是计算机可以存取的任何可用介质或者是包含一个或多个可用介质集成的服务器、 数据中 心等数据存储设备。 所述可用介质可以是磁性介质(例如, 软盘、 硬盘、 磁带)、 光介质(例 如, 数字视频光盘( digital video disc , DVD))、 或者半导体介质 (例如, SSD)等。 The methods provided in the embodiments of the present application may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented by software, it can be implemented in the form of a computer program product in whole or in part. 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, a dedicated computer, a computer network, a network device, a terminal, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website, computer, server or data center via wired (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as 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 or a data center integrated with one or more available media. The usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a digital video disc (digital video disc, DVD)), or a semiconductor medium (for example, an SSD).
本领域普通技术人员可以意识到, 结合本文中所公开的实施例描述的各示例的单元及算 法步骤, 能够以电子硬件、 或者计算机软件和电子硬件的结合来实现。 这些功能究竟以硬件 还是软件方式来执行, 取决于技术方案的特定应用和设计约束条件。 专业技术人员可以对每 个特定的应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本申请的范 围。 A person of ordinary skill in the art may realize that, in combination with the examples described in the embodiments disclosed herein, the units and algorithm steps can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
所属领域的技术人员可以清楚地了解到, 为描述的方便和筒洁, 上述描述的系统、 装置 和单元的具体工作过程, 可以参考前述方法实施例中的对应过程, 在此不再赘述。 Those skilled in the art can clearly understand that, for convenience and clarity of description, the specific working process of the system, device, and unit described above can refer to the corresponding process in the foregoing method embodiment, and will not be repeated here.
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和方法, 可以通过 其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性的, 例如, 单元的划分, 仅 仅为一种逻辑功能划分, 实际实现时可以有另外的划分方式, 例如多个单元或组件可以结合 或者可以集成到另一个系统, 或一些特征可以忽略, 或不执行。 另一点, 所显示或讨论的相 互之间的耦合或直接耦合或通信连接可以是通过一些接口, 装置或单元的间接耦合或通信连 接, 可以是电性, 机械或其它的形式。 In the several embodiments provided in this application, it should be understood that the disclosed system, device, and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components may be combined or integrated. To another system, or some features can be ignored, or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的, 作为单元显示的部件可 以是或者也可以不是物理单元, 即可以位于一个地方, 或者也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。 The units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外, 在本申请各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个 单元单独物理存在, 也可以两个或两个以上单元集成在一个单元中。 In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
以上, 仅为本申请的具体实施方式, 但本申请实施例的保护范围并不局限于此, 任何熟 悉本技术领域的技术人员在本申请实施例揭露的技术范围内, 可轻易想到变化或替换, 都应 涵盖在本申请实施例的保护范围之内。 因此, 本申请实施例的保护范围应以权利要求的保护 范围为准。 The above are only specific implementations of the application, but the protection scope of the embodiments of the application is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the embodiments of the application. , Should be covered within the protection scope of the embodiments of this application. Therefore, the protection scope of the embodiments of the present application should be subject to the protection scope of the claims.

Claims

权 利 要 求 书 Claims
1、 一种多电子设备联动控制的方法, 其特征在于, 所述方法包括: 1. A method for linkage control of multiple electronic devices, characterized in that the method includes:
第一电子设备获取第一规则, 所述第一规则指示当第二电子设备发生第一事件时, 所述 第一电子设备执行第一功能; The first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device performs a first function;
所述第一电子设备根据所述第一规则, 向所述第二电子设备发送针对所述第一事件的订 阅消息; Sending, by the first electronic device, a subscription message for the first event to the second electronic device according to the first rule;
所述第一电子设备接收所述第二电子设备发送的所述第一事件的通知消息; Receiving, by the first electronic device, the notification message of the first event sent by the second electronic device;
响应于接收到的所述第一事件的通知消息, 所述第一电子设备根据所述第一规则执行所 述第一功能。 In response to receiving the notification message of the first event, the first electronic device executes the first function according to the first rule.
2、 根据权利要求 1所述的方法, 其特征在于, 还包括: 2. The method according to claim 1, further comprising:
所述第一电子设备获取第二规则, 所述第二规则指示当第三电子设备发生第二事件, 且 第四电子设备发送第三事件时, 则所述第一电子设备执行第二功能; Acquiring, by the first electronic device, a second rule, where the second rule indicates that when a second event occurs in a third electronic device and the fourth electronic device sends a third event, the first electronic device performs a second function;
所述第一电子设备根据所述第二规则, 向所述第三电子设备发送针对所述第二事件的订 阅消息; Sending, by the first electronic device, a subscription message for the second event to the third electronic device according to the second rule;
所述第一电子设备接收到所述第三电子设备发送的所述第二事件的通知消息; 所述第一电子设备确定所述第四电子设备是否发生所述第三事件; The first electronic device receives the notification message of the second event sent by the third electronic device; the first electronic device determines whether the third event occurs on the fourth electronic device;
响应于确定所述第四电子设备发生所述第三事件, 所述第一电子设备根据所述第二规则 执行所述第二功能。 In response to determining that the third event occurs in the fourth electronic device, the first electronic device executes the second function according to the second rule.
3、根据权利要求 2所述的方法, 其特征在于, 所述响应于确定所述第四电子设备发生所 述第三事件, 所述第一电子设备根据所述第二规则执行所述第二功能, 具体为: 3. The method according to claim 2, wherein, in response to determining that the third event occurs in the fourth electronic device, the first electronic device executes the second event according to the second rule Functions, specifically:
响应于所述第一电子设备接收所述第四电子设备发送的已发生所述第三事件的通知消 息, 所述第一电子设备根据所述第二规则执行所述第二功能。 In response to the first electronic device receiving the notification message sent by the fourth electronic device that the third event has occurred, the first electronic device executes the second function according to the second rule.
4、根据权利要求 3所述的方法, 其特征在于, 在所述第一电子设备接收所述第四电子设 备发送的已发生所述第三事件的通知消息之前, 所述方法还包括: 4. The method according to claim 3, characterized in that, before the first electronic device receives a notification message sent by the fourth electronic device that the third event has occurred, the method further comprises:
响应于接收到所述第三电子设备发送的所述第二事件的通知消息, 所述第一电子设备向 所述第四电子设备发送查询所述第三事件是否发生的消息。 In response to receiving the notification message of the second event sent by the third electronic device, the first electronic device sends a message inquiring whether the third event has occurred to the fourth electronic device.
5、 根据权利要求 2-4任一项所述的方法, 其特征在于, 在所述第一电子设备获取所述第 二规则之后, 所述方法还包括: 5. The method according to any one of claims 2-4, wherein after the first electronic device obtains the second rule, the method further comprises:
所述第一电子设备根据所述第二规则, 获取所述第三电子设备的地址和所述第四电子设 备的地址。 The first electronic device obtains the address of the third electronic device and the address of the fourth electronic device according to the second rule.
6、根据权利要求 5所述的方法, 其特征在于, 所述第二规则包括所述第三电子设备的标 识和所述第四电子设备的标识; 6. The method according to claim 5, wherein the second rule includes an identification of the third electronic device and an identification of the fourth electronic device;
所述第一电子设备根据所述第二规则, 获取所述第三电子设备的地址和所述第四电子设 备的地址, 具体包括: The first electronic device acquiring the address of the third electronic device and the address of the fourth electronic device according to the second rule specifically includes:
所述第一电子设备组播或广播第一消息, 所述第一消息包括所述第三电子设备的标识和 所述第四电子设备的标识; The first electronic device multicasts or broadcasts a first message, where the first message includes an identifier of the third electronic device and an identifier of the fourth electronic device;
所述第一电子设备接收所述第三电子设备返回的所述第三电子设备的地址; 所述电子设 备接收所述第四电子设备返回的所述第四电子设备的地址。 The first electronic device receives the address of the third electronic device returned by the third electronic device; the electronic device receives the address of the fourth electronic device returned by the fourth electronic device.
7、 根据权利要求 2-6任一项所述的方法, 其特征在于, 在所述第一电子设备获取第二规 则之后, 所述方法还包括: 7. The method according to any one of claims 2-6, wherein after the first electronic device obtains the second rule, the method further comprises:
所述第一电子设备检测所述第二规则的合法性。 The first electronic device detects the validity of the second rule.
8、 根据权利要求 2-7任一项所述的方法, 其特征在于, 所述第一电子设备获取第二规则 包括: 8. The method according to any one of claims 2-7, wherein the first electronic device acquiring the second rule comprises:
所述第一电子设备从服务器或第五电子设备获取所述第二规则。 The first electronic device obtains the second rule from a server or a fifth electronic device.
9、 一种多电子设备联动控制的方法, 其特征在于, 所述方法包括: 9. A method for linkage control of multiple electronic devices, characterized in that the method includes:
第一电子设备获取第一规则, 所述第一规则指示当所述第一电子设备发生第一事件, 且 第二电子设备发生第二事件时, 第三电子设备执行第一功能; The first electronic device acquires a first rule, where the first rule indicates that when a first event occurs in the first electronic device and a second event occurs in the second electronic device, the third electronic device performs the first function;
所述第一电子设备接收到所述第二电子设备发送的所述第二事件的通知消息; 响应于接收到的所述第二事件的通知消息, 所述第一电子设备检测所述第一事件是否发 生; The first electronic device receives the notification message of the second event sent by the second electronic device; in response to the received notification message of the second event, the first electronic device detects the first Whether the incident occurred;
若检测到所述第一事件已发生,则所述第一电子设备向所述第三电子设备发送执行指令, 所述执行指令指示所述第三电子设备执行所述第一功能。 If it is detected that the first event has occurred, the first electronic device sends an execution instruction to the third electronic device, and the execution instruction instructs the third electronic device to execute the first function.
10、 一种多电子设备联动控制的系统, 其特征在于, 包括第一电子设备和第二电子设备; 所述第一电子设备, 用于: 10. A system for linkage control of multiple electronic devices, comprising: a first electronic device and a second electronic device; the first electronic device is used for:
获取第一规则, 所述第一规则指示当所述第二电子设备发生第一事件时, 所述第一 电子设备执行第一功能; Acquiring a first rule, where the first rule indicates that when a first event occurs in the second electronic device, the first electronic device performs a first function;
根据所述第一规则, 向所述第二电子设备发送针对所述第一事件的订阅消息; 所述第二电子设备, 用于当检测到已发生所述第一事件时, 向所述第一电子设备发送所 述第一事件的通知消息; According to the first rule, send a subscription message for the first event to the second electronic device; and the second electronic device is configured to send a subscription message to the first event when detecting that the first event has occurred An electronic device sends a notification message of the first event;
所述第一电子设备, 还用于响应于接收到的所述第一事件的通知消息, 根据所述第一规 则执行所述第一功能。 The first electronic device is further configured to execute the first function according to the first rule in response to the received notification message of the first event.
11、 根据权利要求 10所述的系统, 其特征在于, 所述系统还包括第三电子设备和第四电 子设备, 11. The system according to claim 10, wherein the system further comprises a third electronic device and a fourth electronic device,
所述第一电子设备, 还用于: The first electronic device is also used for:
获取第二规则, 所述第二规则指示当所述第三电子设备发生第二事件, 且第四电子 设备发送第三事件时, 则所述第一电子设备执行第二功能; Acquiring a second rule, where the second rule indicates that when a second event occurs on the third electronic device and the fourth electronic device sends a third event, the first electronic device performs a second function;
根据所述第二规则, 向所述第三电子设备发送针对所述第二事件的订阅消息; 所述第三电子设备, 用于当检测到已发生所述第二事件时, 向所述第一电子设备发送所 述第二事件已发生的通知消息; According to the second rule, send a subscription message for the second event to the third electronic device; and the third electronic device is configured to send the second event to the third electronic device when detecting that the second event has occurred An electronic device sends a notification message that the second event has occurred;
所述第一电子设备, 还用于: The first electronic device is also used for:
确定所述第四电子设备是否发生所述第三事件; Determine whether the third event occurs on the fourth electronic device;
响应于确定所述第四电子设备发生所述第三事件, 根据所述第二规则执行所述第二 功能。 In response to determining that the third event occurs in the fourth electronic device, execute the second function according to the second rule.
12、 一种第一电子设备, 其特征在于, 包括: 处理器和存储器, 所述存储器与所述处理 器耦合, 所述存储器用于存储计算机程序代码, 所述计算机程序代码包括计算机指令, 当所 述计算机指令被所述第一电子设备执行时, 使得所述第一电子设备执行如下操作: 12. A first electronic device, comprising: a processor and a memory, the memory is coupled to the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when When the computer instruction is executed by the first electronic device, the first electronic device is caused to perform the following operations:
获取第一规则, 所述第一规则指示当第二电子设备发生第一事件时, 所述第一电子设备 执行第一功能; Acquiring a first rule, where the first rule indicates that when a first event occurs in a second electronic device, the first electronic device performs a first function;
根据所述第一规则, 向所述第二电子设备发送针对所述第一事件的订阅消息; 接收所述第二电子设备发送的所述第一事件的通知消息; Send a subscription message for the first event to the second electronic device according to the first rule; receive a notification message for the first event sent by the second electronic device;
响应于接收到的所述第一事件的通知消息, 根据所述第一规则执行所述第一功能。 In response to the received notification message of the first event, execute the first function according to the first rule.
13、根据权利要求 12所述的第一电子设备, 其特征在于, 当所述计算机指令被所述第一 电子设备执行时, 还使得所述第一电子设备执行如下操作: 13. The first electronic device according to claim 12, wherein when the computer instruction is When the electronic device executes, it also causes the first electronic device to execute the following operations:
获取第二规则, 所述第二规则指示当第三电子设备发生第二事件, 且第四电子设备发送 第三事件时, 则所述第一电子设备执行第二功能; Acquiring a second rule, where the second rule indicates that when a second event occurs on a third electronic device and the fourth electronic device sends a third event, the first electronic device executes the second function;
根据所述第二规则, 向所述第三电子设备发送针对所述第二事件的订阅消息; 接收到所述第三电子设备发送的所述第二事件的通知消息; Send a subscription message for the second event to the third electronic device according to the second rule; receive a notification message for the second event sent by the third electronic device;
确定所述第四电子设备是否发生所述第三事件; Determine whether the third event occurs on the fourth electronic device;
响应于确定所述第四电子设备发生所述第三事件,根据所述第二规则执行所述第二功能。 In response to determining that the third event occurs in the fourth electronic device, execute the second function according to the second rule.
14、根据权利要求 13所述的第一电子设备, 其特征在于, 所述响应于确定所述第四电子 设备发生所述第三事件, 根据所述第二规则执行所述第二功能, 具体为: 14. The first electronic device according to claim 13, wherein, in response to determining that the third event occurs in the fourth electronic device, the second function is executed according to the second rule, specifically As:
响应于接收所述第四电子设备发送的已发生所述第三事件的通知消息, 根据所述第二规 则执行所述第二功能。 In response to receiving a notification message sent by the fourth electronic device that the third event has occurred, execute the second function according to the second rule.
15、根据权利要求 14所述的第一电子设备, 其特征在于, 当所述计算机指令被所述第一 电子设备执行时, 还使得所述第一电子设备执行如下操作: 15. The first electronic device according to claim 14, wherein when the computer instruction is executed by the first electronic device, the first electronic device is further caused to perform the following operations:
响应于接收到所述第三电子设备发送的所述第二事件的通知消息, 所述第一电子设备向 所述第四电子设备发送查询所述第三事件是否发生的消息。 In response to receiving the notification message of the second event sent by the third electronic device, the first electronic device sends a message inquiring whether the third event has occurred to the fourth electronic device.
16、 根据权利要求 13-15任一项所述的第一电子设备, 其特征在于, 当所述计算机指令 被所述第一电子设备执行时, 还使得所述第一电子设备执行如下操作: 16. The first electronic device according to any one of claims 13-15, wherein when the computer instruction is executed by the first electronic device, the first electronic device is further caused to perform the following operations:
根据所述第二规则, 获取所述第三电子设备的地址和所述第四电子设备的地址。 Acquire the address of the third electronic device and the address of the fourth electronic device according to the second rule.
17、根据权利要求 16所述的第一电子设备, 其特征在于, 所述第二规则包括所述第三电 子设备的标识和所述第四电子设备的标识; 17. The first electronic device according to claim 16, wherein the second rule includes an identification of the third electronic device and an identification of the fourth electronic device;
所述根据所述第二规则, 获取所述第三电子设备的地址和所述第四电子设备的地址, 具 体包括: The obtaining the address of the third electronic device and the address of the fourth electronic device according to the second rule specifically includes:
组播或广播第一消息, 所述第一消息包括所述第三电子设备的标识和所述第四电子设备 的标识; Multicast or broadcast a first message, where the first message includes the identifier of the third electronic device and the identifier of the fourth electronic device;
接收所述第三电子设备返回的所述第三电子设备的地址; 所述电子设备接收所述第四电 子设备返回的所述第四电子设备的地址。 Receiving the address of the third electronic device returned by the third electronic device; the electronic device receives the address of the fourth electronic device returned by the fourth electronic device.
18、 根据权利要求 13-17任一项所述的第一电子设备, 其特征在于, 当所述计算机指令 被所述第一电子设备执行时, 还使得所述第一电子设备执行如下操作: 18. The first electronic device according to any one of claims 13-17, wherein when the computer instruction is executed by the first electronic device, the first electronic device is further caused to perform the following operations:
检测所述第二规则的合法性。 Check the validity of the second rule.
19、 根据权利要求 13-18任一项所述的第一电子设备, 其特征在于, 所述获取第二规则 具体为: 从服务器或第五电子设备获取所述第二规则。 19. The first electronic device according to any one of claims 13-18, wherein the acquiring the second rule is specifically: acquiring the second rule from a server or a fifth electronic device.
20、 一种第一电子设备, 其特征在于, 包括: 处理器和存储器, 所述存储器与所述处理 器耦合, 所述存储器用于存储计算机程序代码, 所述计算机程序代码包括计算机指令, 当所 述计算机指令被所述第一电子设备执行时, 使得所述第一电子设备执行如下操作: 20. A first electronic device, comprising: a processor and a memory, the memory is coupled with the processor, the memory is used to store computer program code, the computer program code includes computer instructions, when When the computer instruction is executed by the first electronic device, the first electronic device is caused to perform the following operations:
获取第一规则, 所述第一规则指示当所述第一电子设备发生第一事件, 且第二电子设备 发生第二事件时, 第三电子设备执行第一功能; Acquiring a first rule, where the first rule indicates that when a first event occurs in the first electronic device and a second event occurs in the second electronic device, the third electronic device performs the first function;
接收到所述第二电子设备发送的所述第二事件已发生的通知消息; Receiving a notification message sent by the second electronic device that the second event has occurred;
响应于接收到的所述第二事件已发生的通知消息, 检测所述第一事件是否发生; 若检测到所述第一事件已发生, 则向所述第三电子设备发送执行指令, 所述执行指令指 示所述第三电子设备执行所述第一功能。 In response to the received notification message that the second event has occurred, detect whether the first event has occurred; if it is detected that the first event has occurred, send an execution instruction to the third electronic device, The execution instruction instructs the third electronic device to execute the first function.
21、 一种计算机存储介质, 其特征在于, 包括计算机指令, 当所述计算机指令在终端上 运行时, 使得所述终端执行如权利要求 1-9中任一项多电子设备联动控制的方法。21. A computer storage medium, characterized by comprising computer instructions, when the computer instructions are on a terminal During operation, the terminal is caused to execute the method for linkage control of multiple electronic devices according to any one of claims 1-9.
22、 一种计算机程序产品, 其特征在于, 当所述计算机程序产品在计算机上运行时, 使 得所述计算机执行如权利要求 1-9中任一项所述多电子设备联动控制的方法。 22. A computer program product, characterized in that, when the computer program product runs on a computer, the computer is caused to execute the method for linkage control of multiple electronic devices according to any one of claims 1-9.
PCT/CN2020/075982 2019-02-26 2020-02-20 Multi-intelligent device linkage control method, device and system WO2020173375A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910142363.1 2019-02-26
CN201910142363.1A CN111614524A (en) 2019-02-26 2019-02-26 Multi-intelligent-device linkage control method, device and system

Publications (1)

Publication Number Publication Date
WO2020173375A1 true WO2020173375A1 (en) 2020-09-03

Family

ID=72203003

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/075982 WO2020173375A1 (en) 2019-02-26 2020-02-20 Multi-intelligent device linkage control method, device and system

Country Status (2)

Country Link
CN (1) CN111614524A (en)
WO (1) WO2020173375A1 (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114363820A (en) * 2020-09-29 2022-04-15 华为终端有限公司 Electronic equipment searching method and electronic equipment
CN114584414B (en) * 2020-12-01 2024-05-03 深圳绿米联创科技有限公司 Device control method, device, electronic device, and computer-readable storage medium
CN112702428B (en) * 2020-12-23 2023-04-18 上海商米科技集团股份有限公司 Distributed Internet of things equipment interoperation method and system
CN115220372A (en) * 2021-04-16 2022-10-21 华为技术有限公司 Event processing method, device and system
CN113406891B (en) * 2021-06-18 2023-04-21 杭州深渡科技有限公司 Internet of things equipment linkage control method, system, device and storage medium
CN113452793B (en) * 2021-06-30 2024-05-14 东软睿驰汽车技术(沈阳)有限公司 Diagnostic service processing method and device, vehicle-mounted terminal and medium
CN116027692A (en) * 2021-10-25 2023-04-28 华为技术有限公司 Automatic control method, electronic equipment and system based on human body perception
CN114157725B (en) * 2021-11-11 2023-09-12 珠海格力电器股份有限公司 Method, device, server, electronic equipment and storage medium for equipment linkage
CN114167738A (en) * 2021-11-26 2022-03-11 珠海格力电器股份有限公司 Equipment linkage control method, device, equipment and storage medium
CN114143906B (en) * 2022-01-30 2022-06-17 荣耀终端有限公司 Electronic equipment connection method and electronic equipment
CN114815642A (en) * 2022-03-30 2022-07-29 青岛海尔科技有限公司 Control method and device of intelligent equipment, storage medium and electronic device
CN117666453A (en) * 2022-08-26 2024-03-08 华为技术有限公司 Link control method and electronic equipment
CN115412391A (en) * 2022-11-02 2022-11-29 长沙朗源电子科技有限公司 Method and system for building intelligent scene of multiple small household appliances and storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103440606A (en) * 2013-08-02 2013-12-11 马祥龙 Integrated remote network smart home security rescue management system
US20150370272A1 (en) * 2014-06-23 2015-12-24 Google Inc. Intelligent configuration of a smart environment based on arrival time
CN204908704U (en) * 2015-06-07 2015-12-30 何连婷 Semiconductor refrigeration mattress circuit
US9252967B2 (en) * 2011-09-01 2016-02-02 Sony Corporation Facilitated use of heterogeneous home-automation edge components
CN105913596A (en) * 2016-06-23 2016-08-31 余新城 Home security system
CN106996621A (en) * 2017-04-10 2017-08-01 盐城师范学院 Intelligent air condition control device and control method based on infrared acquisition
WO2018006203A1 (en) * 2016-07-02 2018-01-11 李珂悦 Smart air conditioner

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104216379B (en) * 2014-09-09 2017-05-24 联想(北京)有限公司 Information processing method and electronic device
CN104932456B (en) * 2015-04-27 2019-02-19 小米科技有限责任公司 Intelligent scene implementation method and device, intelligent terminal and control equipment
CN205721123U (en) * 2016-03-04 2016-11-23 橙朴(上海)智能科技有限公司 A kind of intelligent home control system of decentration
CN105549415A (en) * 2016-03-04 2016-05-04 橙朴(上海)智能科技有限公司 Decentralized intelligent home control system
CN106227045B (en) * 2016-07-25 2019-12-20 青岛海信电器股份有限公司 Smart home linkage control method, device and system
CN106054655B (en) * 2016-07-25 2019-05-21 青岛海信电器股份有限公司 A kind of smart home inter-linked controlling method and device
CN107783781A (en) * 2016-08-24 2018-03-09 北京京东尚科信息技术有限公司 Smart machine interlock method and device based on IFTTT
CN108733005B (en) * 2017-04-21 2021-05-25 北京京东尚科信息技术有限公司 Method and device for controlling linkage of intelligent equipment
CN109302415B (en) * 2018-11-09 2019-11-01 四川虹微技术有限公司 A kind of authentication method, block chain node and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9252967B2 (en) * 2011-09-01 2016-02-02 Sony Corporation Facilitated use of heterogeneous home-automation edge components
CN103440606A (en) * 2013-08-02 2013-12-11 马祥龙 Integrated remote network smart home security rescue management system
US20150370272A1 (en) * 2014-06-23 2015-12-24 Google Inc. Intelligent configuration of a smart environment based on arrival time
CN204908704U (en) * 2015-06-07 2015-12-30 何连婷 Semiconductor refrigeration mattress circuit
CN105913596A (en) * 2016-06-23 2016-08-31 余新城 Home security system
WO2018006203A1 (en) * 2016-07-02 2018-01-11 李珂悦 Smart air conditioner
CN106996621A (en) * 2017-04-10 2017-08-01 盐城师范学院 Intelligent air condition control device and control method based on infrared acquisition

Also Published As

Publication number Publication date
CN111614524A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
WO2020173375A1 (en) Multi-intelligent device linkage control method, device and system
WO2020192714A1 (en) Device control page display method, related apparatus and system
WO2021000808A1 (en) Device control method and device
WO2020224486A1 (en) Calling method, device and system
WO2022257977A1 (en) Screen projection method for electronic device, and electronic device
WO2020155014A1 (en) Smart home device sharing system and method, and electronic device
EP4084486B1 (en) Cross-device content projection method, and electronic device
WO2021169847A1 (en) Distributed service scheduling method and related apparatus
WO2021043045A1 (en) Method and device for configuring network configuration information
CN111628916B (en) Method for cooperation of intelligent sound box and electronic equipment
WO2021052204A1 (en) Address book-based device discovery method, audio and video communication method, and electronic device
WO2020224447A1 (en) Method and system for adding smart home device to contacts
WO2021000923A1 (en) Router configuration method, terminal, and router
WO2020216098A1 (en) Method for providing forwarding service across electronic apparatuses, apparatus, and system
WO2021103955A1 (en) Calling method and apparatus
WO2021253975A1 (en) Permission management method and apparatus for application, and electronic device
WO2021179990A1 (en) Application server access method and terminal
WO2022042637A1 (en) Bluetooth-based data transmission method and related apparatus
WO2020133467A1 (en) Method for smart home appliance to access network and related device
CN116074143A (en) Scene synchronization method and device, electronic equipment and readable storage medium
WO2022228180A1 (en) Application management method and electronic device
CN114567871A (en) File sharing method and device, electronic equipment and readable storage medium
WO2022143273A1 (en) Information processing method and electronic device
WO2024114274A1 (en) Iot device network configuration method and related apparatus
WO2023142941A1 (en) Playing record display method and related device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20762333

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20762333

Country of ref document: EP

Kind code of ref document: A1