Method and device for executing automatic instruction, electronic equipment and storage medium

By introducing multifunctional modules into electronic devices, the execution of automatic instructions is solved, and the problem of difficult automatic instructions in the prior art is difficult to implement different trigger conditions, reducing development costs and difficulty.

CN119718467APending Publication Date: 2025-03-28GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411804418.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The prior art is difficult to implement automatic instructions with different trigger conditions, resulting in high development costs and high difficulty in the case of diversified user needs.

Method used

By introducing multifunctional modules into electronic devices, they are used for data acquisition, logical judgment and operation execution respectively, and the execution of automatic instructions is realized. The specific steps include: the first functional module acquires the target data and transmits it to the second functional module. If the target data meets the triggering condition, the second functional module sends notification information to the third functional module and instructs it to perform the target operation.

Benefits of technology

Through this method, the same data can be reused, the difficulty of implementing automatic instructions with different trigger conditions can be reduced, the development process can be simplified, and the cost can be reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718467A_ABST
    Figure CN119718467A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for executing an automatic instruction, electronic equipment and a storage medium, and the method for executing the automatic instruction comprises the steps: obtaining target data corresponding to the automatic instruction through a first function module, and transmitting the target data to a second function module; if it is determined through the second function module that the target data meets the triggering condition corresponding to the automatic instruction, first notification information is sent to a third function module through the second function module, and the first notification information is used for instructing the third function module to execute target operation corresponding to the automatic instruction; and executing the target operation through the third function module according to the first notification information. According to the method, automatic instructions under different triggering conditions can be conveniently realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic devices, and more specifically, to a method, device, electronic device and storage medium for executing automatic instructions. Background Art

[0002] With the rapid advancement of science and technology and living standards, electronic devices (such as smart phones, tablet computers, etc.) have become one of the commonly used electronic products in people's lives. At present, many electronic devices support automatic command functions. According to the set automatic commands, the electronic devices can automatically perform corresponding operations when the trigger conditions in the automatic commands are met, thereby simplifying the operation of users when using electronic devices. With the widespread use of the automatic command function, the trigger conditions of the automatic commands required by users are also increasing, but it is difficult to implement automatic commands with various trigger conditions in the related technology. Summary of the invention

[0003] The present application proposes a method, device, electronic device and storage medium for executing automatic instructions, which can easily implement automatic instructions with different trigger conditions.

[0004] In a first aspect, an embodiment of the present application provides a method for executing automatic instructions, the method comprising: acquiring target data corresponding to the automatic instruction through a first functional module, and transmitting the target data to a second functional module; if the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, sending a first notification message to a third functional module through the second functional module, the first notification message being used to instruct the third functional module to execute the target operation corresponding to the automatic instruction; and executing the target operation through the third functional module according to the first notification message.

[0005] In a second aspect, an embodiment of the present application provides a device for executing automatic instructions, the device comprising: a data acquisition module, a data determination module and an operation execution module, wherein the data acquisition module is used to acquire target data corresponding to the automatic instruction through a first functional module, and transmit the target data to a second functional module; the data determination module is used to send a first notification message to a third functional module through the second functional module if it is determined through the second functional module that the target data meets the trigger condition corresponding to the automatic instruction, the first notification message being used to instruct the third functional module to execute the target operation corresponding to the automatic instruction; the operation execution module is used to execute the target operation through the third functional module according to the first notification message.

[0006] In a third aspect, an embodiment of the present application provides an electronic device, comprising: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method for executing automatic instructions provided in the first aspect above.

[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a program code is stored. The program code can be called by a processor to execute the method for executing automatic instructions provided in the first aspect above.

[0008] The solution provided by the present application, when implementing the automatic instruction, obtains the target data corresponding to the automatic instruction through the first functional module, and transmits the target data to the second functional module. If the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, the second functional module sends a first notification message to the third functional module, and the first notification message is used to instruct the third functional module to perform the target operation corresponding to the automatic instruction. The third functional module performs the target operation according to the first notification message. Thus, when implementing the automatic instruction, data collection and logical judgment are performed through different functional modules, so that the same data required for the automatic instructions with different trigger conditions can be reused, which reduces the difficulty of implementing the automatic instructions with different trigger conditions and facilitates the implementation of the automatic instructions with different trigger conditions. BRIEF DESCRIPTION OF THE DRAWINGS

[0009] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0010] Figure 1 A flow chart of a method for executing automatic instructions according to an embodiment of the present application is shown.

[0011] Figure 2 A flow chart of a method for executing automatic instructions according to another embodiment of the present application is shown.

[0012] Figure 3 A schematic flow chart of a method for executing automatic instructions according to yet another embodiment of the present application is shown.

[0013] Figure 4 A flow chart of a method for executing automatic instructions according to yet another embodiment of the present application is shown.

[0014] Figure 5A schematic flow chart of a method for executing automatic instructions according to yet another embodiment of the present application is shown.

[0015] Figure 6 A schematic diagram of an interface provided in an embodiment of the present application is shown.

[0016] Figure 7 A schematic diagram of an interface provided in an embodiment of the present application is shown.

[0017] Figure 8 A schematic diagram of an interface provided in an embodiment of the present application is shown.

[0018] Fig. 9 A schematic diagram of an interface provided in an embodiment of the present application is shown.

[0019] Fig.10 A flow chart of a method for executing automatic instructions according to yet another embodiment of the present application is shown.

[0020] Fig.11 A schematic diagram showing the working principle of the second functional module provided in an embodiment of the present application is shown.

[0021] Fig.12 A schematic diagram showing the working principle of the first functional module provided in an embodiment of the present application is shown.

[0022] Fig.13 A framework diagram provided by an embodiment of the present application is shown.

[0023] Fig.14 A timing diagram of a method for executing automatic instructions provided in an embodiment of the present application is shown.

[0024] Fig.15 A block diagram of a device for executing automatic instructions according to an embodiment of the present application is shown.

[0025] Fig.16 It is a block diagram of an electronic device for executing a method for executing automatic instructions according to an embodiment of the present application.

[0026] Fig.17 It is a storage unit of an embodiment of the present application for storing or carrying a program code for implementing a method for executing automatic instructions according to an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0028] At present, many electronic devices support the automatic command (also known as shortcut command) function. Based on this function, the electronic device can execute the corresponding operation in the automatic command when it detects that the current device meets the trigger conditions in the automatic command. For example, the automatic command is "connect to WiFi when returning home", then the electronic device can connect to WiFi when it detects that the current location is at home; for another example, the automatic command is "turn on the flight mode at 11 pm", then the electronic device can turn on the flight mode when it detects that the current time is 11 pm.

[0029] When implementing automatic instructions in the related art, the automatic instruction (shortcut) module can obtain the trigger conditions and execution actions edited by the user according to the user's editing operation, and the automatic instruction module can register the intention in the scene service (SceneService) module, that is, register the trigger conditions and execution actions edited by the user; the scene service module is used to monitor the current device state, collect the relevant data required to implement the automatic instruction, and notify the automatic instruction module to execute the above edited execution actions when the collected data meets the edited trigger conditions. In this way, in the process of implementing automatic instructions, data logical reasoning is taken into account during data collection, that is, the corresponding functional module will perform logical reasoning while performing data collection (judging whether the collected data meets the trigger conditions). In this way, for different automatic instructions, it is necessary to write separate data collection and logical reasoning codes, for example, to implement data collection and logical reasoning in the same class. In addition, as more and more users use the automatic instruction function, the trigger conditions of the required automatic instructions are also increasing. However, based on the above method, when implementing automatic instructions with different trigger conditions, it is necessary to write data collection and logical reasoning codes for each trigger condition, so that it is difficult to implement automatic instructions with different trigger conditions and the development cost is high.

[0030] In response to the above problems, the inventors have proposed the method, device, electronic device and storage medium for executing automatic instructions provided in the embodiments of the present application, which can perform data collection and logical judgment through different functional modules when implementing automatic instructions, so that the same data required for automatic instructions with different trigger conditions can be reused, reducing the difficulty of implementing automatic instructions with different trigger conditions and facilitating the implementation of automatic instructions with different trigger conditions. Among them, the specific method for executing automatic instructions is described in detail in the subsequent embodiments.

[0031] The following is a detailed description of the method for executing automatic instructions provided in the embodiment of the present application in conjunction with the accompanying drawings.

[0032] See also Figure 1 , Figure 1A flow chart of a method for executing an automatic instruction provided by an embodiment of the present application is shown. In a specific embodiment, the method for executing an automatic instruction is applied to Fig.15 The apparatus 700 for executing automatic instructions and the electronic device 100 ( Fig.16 ). The following will take an electronic device as an example to illustrate the specific process of this embodiment. Of course, it can be understood that the electronic device used in this embodiment can be a smart phone, a tablet computer, a smart watch, an e-book, etc., which is not limited here. Figure 1 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0033] Step S110: acquiring target data corresponding to the automatic instruction through the first functional module, and transmitting the target data to the second functional module.

[0034] Among them, the above first functional module can be a functional module for collecting data to implement automatic instructions, that is, the first functional module is used to collect data corresponding to the triggering conditions of the automatic instructions, and the data collected by the first functional module is used for logical reasoning in the process of implementing automatic instructions, and then it can be determined whether to execute the relevant operations of the automatic instructions; the above automatic instructions can be any automatic instructions set and activated (that is, in an enabled state) in the electronic device.

[0035] In an embodiment of the present application, the first functional module obtains the data corresponding to the above automatic instructions (as target data), that is, the data used to match the trigger conditions of the automatic instructions. After the first functional module obtains the target data corresponding to the automatic instructions, the target data can be transmitted to the second functional module so that the second functional module can perform logical reasoning based on the target data and the trigger conditions of the above automatic instructions.

[0036] In some implementations, since the triggering conditions of different automatic instructions may be different, the data types required for different triggering conditions may also be different, so the above first functional module can collect different types of data. The first functional module can be implemented by inheriting the data collection interface, for example, by inheriting IFactCollectorAbility, various types of data access objects (DAO) can be collected in the "collect" method.

[0037] Step S120: If the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, the second functional module sends a first notification message to the third functional module, and the first notification message is used to instruct the third functional module to perform the target operation corresponding to the automatic instruction.

[0038] Among them, the above second functional module can be a functional module used to perform logical reasoning (i.e. logical judgment or conditional judgment) on the collected data, that is, the second functional module is used to match the collected data for implementing automatic instructions with the trigger conditions of the automatic instructions to determine whether the collected data meets the trigger conditions of the automatic instructions.

[0039] In an embodiment of the present application, the second functional module can receive the target data collected by the first functional module for the above automatic instructions. After obtaining the above target data, the second functional module can perform logical reasoning to determine whether the above target data meets the trigger conditions corresponding to the above automatic instructions; if the above target data meets the trigger conditions corresponding to the automatic instructions, it means that the target operation corresponding to the automatic instructions needs to be executed at present, so the second functional module can send a first notification message to the third functional module to instruct the third functional module to execute the target operation corresponding to the automatic instructions.

[0040] Exemplarily, the above automatic instruction may be "play FM radio when connected to a specified Bluetooth device". When the second functional module determines that the acquired Bluetooth data represents that the Bluetooth connection address is the address of the specified Bluetooth device, the second functional module may send a first notification message to the third functional module to instruct the third functional module to perform the "play FM radio" operation.

[0041] Exemplarily, the above automatic instruction may be "when the remaining power is below 25%, and the designated wireless local area network (WLAN) is connected, and it is detected that the user is at home, turn on the silent mode", and the above target data may include power data, wireless connection data, and location data. When the second function module determines that the remaining power is less than 25% according to the power data, determines that the designated WLAN is connected according to the wireless connection data, and determines that the electronic device is located at home according to the location data, the second function module may send a first notification message to the third function module to instruct the third function module to perform the operation of "turning on the silent mode".

[0042] Step S130: executing the target operation according to the first notification information through the third functional module.

[0043] Among them, the above-mentioned third functional module can be a functional module used to execute corresponding operations in automatic instructions. For example, the third functional module can be an automatic instruction module. In addition to being used to execute operations in automatic instructions, the third functional module can also be used to obtain automatic instructions edited by the user and register relevant information of the automatic instructions into the second functional module.

[0044] In the embodiment of the present application, the third functional module can receive the first notification information sent by the second functional module. After receiving the first notification message, the third functional module can respond to the first notification message and execute the target operation corresponding to the automatic instruction. The target operation refers to the operation to be executed set in the automatic instruction, that is, the operation to be executed when the target data meets the trigger condition.

[0045] In some implementations, the third functional module may store the data of each automatic instruction set in a database (DB) corresponding to the third functional module, so as to determine the operation in the automatic instruction to be executed according to the instruction information issued by the second functional module, and register the relevant information of the newly added automatic instruction to the second functional module according to the data of the newly added automatic instruction in the database, etc. Among them, the third functional module may at least store the triggering conditions of the automatic instruction and the operation to be executed in the above database.

[0046] The method for executing automatic instructions provided in the embodiment of the present application utilizes different functional modules to perform data collection and logical judgment when implementing the automatic instructions, so that the automatic instructions for different trigger conditions can reuse the same required data without the need to write relevant data collection codes specifically for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions for different trigger conditions and facilitating the implementation of automatic instructions for different trigger conditions.

[0047] See also Figure 2 , Figure 2 A flow chart of a method for executing an automatic instruction provided by another embodiment of the present application is shown. The method for executing an automatic instruction is applied to the above electronic device. Figure 2 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0048] Step S210: Acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module.

[0049] In the embodiment of the present application, step S210 can refer to the contents of other embodiments and will not be repeated here.

[0050] Step S220: Matching the target data with the rules corresponding to the automatic instructions registered in the second functional module through the second functional module.

[0051] In an embodiment of the present application, the relevant information of the above automatic instruction is registered in the second functional module with the rules corresponding to the automatic instruction. The rules can be obtained by converting the trigger condition into a machine language understandable to the second functional module (for example, into code) according to the trigger condition corresponding to the automatic instruction. The second functional module can determine whether the above target data sent by the first functional module meets the trigger condition corresponding to the automatic instruction according to the rules of the automatic instruction registered in the second functional module. Among them, the second functional module can match the target data with the above rules. If the target data matches the above rules, it means that the target data meets the trigger condition corresponding to the above automatic instruction; if the target data does not match the above rules, it means that the target data does not meet the trigger condition corresponding to the above automatic instruction.

[0052] In some implementations, a rule base may be provided corresponding to the second functional module. The rule base may be understood as a database for storing rules corresponding to each automatic instruction, ie, rules registered in the second functional module for each automatic instruction.

[0053] Step S230: If the target data matches the rule, the second function module sends a first notification message to the third function module based on the rule, wherein the first notification message is used to instruct the third function module to execute the target operation corresponding to the automatic instruction.

[0054] In an embodiment of the present application, after the second functional module matches the above target data with the rules corresponding to the above automatic instructions, based on the matching result, if the matching result indicates that the target data matches the rules, the second functional module can send a first notification message to the third functional module based on the rules to instruct the third functional module to execute the target operation corresponding to the automatic instruction.

[0055] In some implementations, the above rules may also include automatic instructions that need to be triggered when the triggering conditions are met, or a mapping relationship between the rules and the automatic instructions. Based on the rules, the second functional module may determine the automatic instructions that need to be triggered, and based on the determined automatic instructions, send the first notification information to the third functional module, so that the third functional module can determine the automatic instructions that need to be executed currently according to the first notification information, and execute the target operation in the automatic instructions according to the stored relevant information of the automatic instructions.

[0056] Step S240: executing the target operation according to the first notification information through the third functional module.

[0057] In the embodiment of the present application, step S240 can refer to the contents of other embodiments and will not be repeated here.

[0058] The method for executing automatic instructions provided in the embodiment of the present application, when implementing the automatic instructions, uses a separate functional module to collect data required by the automatic instructions, and provides the data to another functional module, and the other functional module uses the rules corresponding to the registered automatic instructions to match the collected data, and executes the operations corresponding to the automatic instructions when the rules are met. Therefore, the automatic instructions for different trigger conditions can reuse the same required data without the need to write relevant codes for data collection specifically for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions with different trigger conditions and facilitating the implementation of automatic instructions with different trigger conditions.

[0059] See also Figure 3 , Figure 3 A flow chart of a method for executing an automatic instruction provided by another embodiment of the present application is shown. The method for executing an automatic instruction is applied to the above electronic device. Figure 3 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0060] Step S310: acquiring target data corresponding to the automatic instruction through the first functional module, and transmitting the target data to the second functional module.

[0061] Step S320: Matching the target data with the rules corresponding to the automatic instructions registered in the second functional module through the second functional module.

[0062] In the embodiment of the present application, step S310 and step S320 may refer to the contents of other embodiments and will not be described in detail here.

[0063] Step S330: If the target data matches the rule, the second functional module sends a first notification message carrying the instruction identifier of the automatic instruction to the third functional module based on the rule, and the first notification message is used to instruct the third functional module to execute the target operation corresponding to the automatic instruction.

[0064] In an embodiment of the present application, after the second functional module matches the above target data with the rules corresponding to the above automatic instructions, based on the matching result, if the matching result indicates that the target data matches the rule, a first notification message carrying the instruction identifier of the automatic instruction can be generated based on the rule, and the first notification message can be sent to the third functional module to instruct the third functional module to execute the operation in the automatic instruction corresponding to the instruction identifier carried in the first notification message.

[0065] In some embodiments, the above rules may include an instruction identifier of an automatic instruction that needs to be triggered when the trigger conditions are met. When the second functional module determines that the target data matches the rule, it can determine the instruction identifier based on the rule and send a first notification message carrying the instruction identifier to the third functional module.

[0066] Exemplarily, the instruction identifier of the above automatic instruction can be identity document (ID) 10, and the above rule can be generated according to "when connected to a specified Bluetooth device, trigger the automatic instruction of id10", wherein "when connected to a specified Bluetooth device" is the triggering condition of the automatic instruction. Then, the second functional module can determine whether the target data meets the triggering condition according to the rule, and can also determine the instruction identifier (i.e., id10) of the automatic instruction to be triggered according to the rule.

[0067] Step S340: Determine the automatic instruction corresponding to the instruction identifier according to the instruction identifier carried in the first notification information through the third functional module.

[0068] In an embodiment of the present application, the third functional module can receive the above-mentioned first notification information accordingly. After receiving the first notification information, the third functional module can determine the above-mentioned instruction identifier carried in the first notification information. According to the instruction identifier, the third functional module can know the automatic instruction that needs to be triggered, that is, the automatic instruction corresponding to the instruction identifier.

[0069] In some implementations, a database corresponding to the third functional module may be provided corresponding to the third functional module, and the database may store data of various automatic instructions set, and the stored automatic instruction data may include operations corresponding to the automatic instructions, mapping relationships between automatic instructions and instruction identifiers, etc. Of course, the database may also store trigger conditions corresponding to the automatic instructions, etc. After receiving the third notification information above, the third functional module may query the database for the automatic instruction corresponding to the instruction identifier according to the instruction identifier carried in the third notification information.

[0070] Step S350: executing the target operation corresponding to the automatic instruction through the third functional module.

[0071] In an embodiment of the present application, after the third functional module determines the automatic instruction corresponding to the instruction identifier, that is, after determining the automatic instruction that needs to be triggered, it can execute the target operation corresponding to the automatic instruction, that is, execute the corresponding target operation set for the automatic instruction.

[0072] In some implementations, the third functional module may determine the operation corresponding to the automatic instruction (as a target operation) based on data stored in a database corresponding to the third functional module, and execute the target operation.

[0073] The method for executing automatic instructions provided in the embodiment of the present application utilizes a separate functional module to collect data required by the automatic instructions when implementing the automatic instructions, and provides the data to another functional module. The other functional module matches the collected data using the rules corresponding to the registered automatic instructions, and when the rules are met, notifies the functional module that executes the operation of the instruction identifier of the automatic instruction. The functional module can execute the target operation corresponding to the automatic instruction based on the instruction identifier, so that the same required data can be reused for automatic instructions with different trigger conditions, without the need to write relevant data collection codes specifically for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions with different trigger conditions and facilitating the implementation of automatic instructions with different trigger conditions.

[0074] See also Figure 4 , Figure 4 A flow chart of a method for executing an automatic instruction provided by another embodiment of the present application is shown. The method for executing an automatic instruction is applied to the above electronic device. Figure 4 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0075] Step S410: The second functional module sends a second notification message to the first functional module according to the rule, wherein the second notification message is used to instruct the first functional module to collect target data corresponding to the automatic instruction.

[0076] In an embodiment of the present application, the second functional module can determine the target data corresponding to the automatic instruction based on the rules corresponding to the above automatic instructions registered in the second functional module, that is, the data required for logical judgment (logical reasoning) of the automatic instruction, and the target data is used to match the triggering condition of the automatic instruction. After the above rules are registered to the second functional module, the second functional module can determine the target data corresponding to the automatic instruction, and based on the determined target data, send a second notification message to the first functional module to instruct the first functional module to collect the target data corresponding to the automatic instruction. In other words, the second functional module notifies the first functional module to collect the data required for logical judgment in a targeted manner according to the registered rules.

[0077] Exemplarily, the above rules can be generated based on "when connected to the specified Bluetooth device, trigger the automatic instruction of id10", where "when connected to the specified Bluetooth device" is the triggering condition of the automatic instruction. Then the second functional module can determine, based on the rule, that the data needed for logical judgment is Bluetooth data, that is, the target data corresponding to the automatic instruction of id10 is Bluetooth data, then the second functional module can notify the first functional module to collect Bluetooth data.

[0078] Step S420: Responding to the second notification information, the first functional module obtains target data corresponding to the automatic instruction, and transmits the target data to the second functional module.

[0079] In an embodiment of the present application, the first functional module can receive the above second notification information sent by the second functional module, and the first functional module can respond to the second notification information and determine the target data that needs to be collected based on the second notification information, so that the first functional module can collect the above target data in a targeted manner and transmit the target data to the second functional module.

[0080] In some embodiments, considering that the target data corresponding to the above automatic instructions does not meet the trigger condition, if the target data collected by the first functional module has not changed, then after the first functional module transfers the target data to the second functional module, the second functional module will still determine that the target data does not meet the trigger condition, which will cause the second functional module to perform invalid processing. Therefore, after the first functional module obtains the above target data each time, it can compare the target data obtained this time with the target data obtained last time; according to the comparison result, if the target data changes, that is, the target data obtained this time changes relative to the target data obtained last time, then the first functional module will transfer the target data obtained this time to the second functional module; if the target data does not change, that is, the target data obtained this time does not change relative to the target data obtained last time, then the first functional module may not transfer the target data obtained this time to the second functional module.

[0081] In a possible implementation, the first functional module may cache the acquired target data each time after acquiring the target data, and may delete the cached target data acquired last time after comparing the target data acquired this time with the target data acquired last time each time, thereby always saving the storage resources of the electronic device by only caching the target data acquired last time.

[0082] Step S430: Matching the target data with the rules corresponding to the automatic instructions registered in the second functional module through the second functional module.

[0083] Step S440: If the target data matches the rule, the second function module sends a first notification message to the third function module based on the rule, wherein the first notification message is used to instruct the third function module to execute the target operation corresponding to the automatic instruction.

[0084] Step S450: executing the target operation according to the first notification information through the third functional module.

[0085] In the embodiment of the present application, steps S430 to S450 may refer to the contents of other embodiments and will not be described in detail here.

[0086] The method for executing automatic instructions provided in the embodiment of the present application utilizes the second functional module to notify the first functional module to collect data for the data required by the automatic instructions when implementing the automatic instructions. After collecting the required data, the first functional module provides the data to the second functional module. The second functional module matches the collected data using the rules corresponding to the registered automatic instructions, and executes the operations corresponding to the automatic instructions when the rules are met. Therefore, the same required data can be reused for automatic instructions with different trigger conditions, without the need to write relevant codes for data collection specifically for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions with different trigger conditions and facilitating the implementation of automatic instructions with different trigger conditions.

[0087] See also Figure 5 , Figure 5 A flow chart of a method for executing an automatic instruction provided by another embodiment of the present application is shown. The method for executing an automatic instruction is applied to the above electronic device. Figure 5 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0088] Step S510: Generate the rules based on the added automatic instructions through the third functional module, and send the rules to the second functional module.

[0089] In the embodiment of the present application, a method for registering the rules corresponding to the automatic instruction in the second functional module is also provided. It is worth noting that the registration of the rules corresponding to the automatic instruction can be performed after the automatic instruction is added, that is, in advance, and in the subsequent process of implementing the added automatic instruction, the second functional module can perform corresponding processing based on the registered rules corresponding to the automatic instruction, without registering the rules corresponding to the automatic instruction each time.

[0090] When registering the rules corresponding to the above automatic instructions to the second functional module, the third functional module can generate the rules corresponding to the automatic instructions based on the added automatic instructions, and send the rules to the second functional module so as to register the rules in the second functional module.

[0091] In some implementations, when a user adds an automatic instruction, the third functional module may respond to the adding operation on the automatic instruction and obtain the triggering condition and target operation corresponding to the added automatic instruction.

[0092] In a possible implementation, the user interface (UI) interaction can be implemented through the third functional module. The third functional module can display the adding interface of the automatic instruction, and the third functional module can obtain the triggering condition and target operation corresponding to the added automatic instruction in response to the adding operation performed in the adding interface.

[0093] For example, see Figure 6 , an automatic instruction adding interface A1 may be displayed, wherein the adding interface A1 includes a first control A2 of "add trigger condition" and a second control A3 of "add execution action"; after detecting an operation on the first control A2, refer to Figure 7 , a first editing interface A4 of the trigger condition can be displayed, and the first editing interface A4 may include different types of trigger conditions for the user to select. According to the user's operation in the first editing interface A4, the trigger condition added by the user can be determined; after detecting the operation on the second control A3, refer to Figure 8 , a second editing interface A5 of the trigger condition may be displayed, and the second editing interface A5 may include different types of execution actions for the user to select. According to the user's operation in the second editing interface A5, the execution action added by the user may be determined, and the determined execution action is the target operation corresponding to the added automatic instruction. In addition, please refer to Fig. 9 , the edited trigger conditions and execution actions can also be displayed in the add interface A1, for example Figure X The trigger condition shown in is "when connected to Bluetooth device Q", and the execution action is "play FM radio".

[0094] In a possible implementation, after obtaining the trigger conditions and target operations corresponding to the added automatic instructions, the trigger conditions and target operations corresponding to the automatic instructions can be stored in the database corresponding to the third functional module. After the data corresponding to the above added automatic instructions are newly added to the database, the third functional module can send a third notification message to the second functional module through the third functional module, and the third notification message is used to indicate that the data in the database has changed; correspondingly, the second functional module can receive the third notification message, and the second functional module can know that the data in the above database has changed according to the third notification message, and perform a rule query, and send a fourth notification message to the third functional module, and the fourth notification message is used to instruct the second functional module to generate rules for the added automatic instructions. Correspondingly, the third functional module can receive the fourth notification message, and in response to the fourth notification message, generate the rules corresponding to the automatic instructions based on the data of the automatic instructions added in the database.

[0095] Exemplarily, the trigger conditions and operations corresponding to the automatic instructions can be represented in the database as ShortcutTrigger (a class used to record the trigger conditions set by the user) and ShortcutTask (a class used to record the execution actions set by the user). In ShortcutTrigger and ShortcutTask, specId represents the trigger conditions and execution actions, configSettingValue is used to store the user's setting information (i.e., the trigger conditions, specific information in the execution actions, parameters, etc.), and shortcutId (the unique id for storing automatic instructions in the database) represents the bound automatic instructions.

[0096] In a possible implementation, when the third functional module generates the rules based on the trigger conditions and target operations corresponding to the added automatic instructions, the automatic instructions can be converted into a machine language understandable to the second functional module, such as machine code, to obtain the rules corresponding to the automatic instructions.

[0097] Optionally, the third functional module can determine the rule template corresponding to the trigger condition according to the trigger condition corresponding to the added automatic instruction, and fill the information, parameters, etc. in the trigger condition into the rule template; after combining all the filled rule templates, the rule corresponding to the automatic instruction can be obtained.

[0098] Exemplarily, based on each ShortcutTrigger (used to record the trigger condition class set by the user) in the automatic instruction, the specId corresponding to the trigger condition can be queried, and the corresponding rule template can be obtained according to the specId. The parameters set by the user are obtained from the parameters in the trigger condition stored in configSettingValue, and then the parameters set by the user are filled in the corresponding rule template, and then all the filled rules are combined together to obtain the generated rules.

[0099] Step S520: registering the rule into the second functional module through the second functional module.

[0100] In the embodiment of the present application, the second functional module may receive a rule corresponding to the added automatic instruction sent by the third functional module, and register the received rule in the second functional module.

[0101] In some implementations, a rule base may be provided corresponding to the second functional module. The rule base may be understood as a database. After receiving the rules corresponding to the above automatic instructions, the second functional module may store the rules corresponding to the automatic instructions in the rule base.

[0102] Step S530: Acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module.

[0103] Step S540: Matching the target data with the rules corresponding to the automatic instructions registered in the second functional module through the second functional module.

[0104] Step S550: If the target data matches the rule, the second function module sends a first notification message to the third function module based on the rule, wherein the first notification message is used to instruct the third function module to execute the target operation corresponding to the automatic instruction.

[0105] Step S560: Execute the target operation according to the first notification information through the third functional module.

[0106] In the embodiment of the present application, steps S530 to S560 may refer to the contents of other embodiments and will not be described in detail here.

[0107] The method for executing automatic instructions provided in the embodiment of the present application utilizes different functional modules to perform data collection and logical judgment when implementing the automatic instructions, so that the automatic instructions for different trigger conditions can reuse the same required data without having to specifically write relevant data collection codes for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions for different trigger conditions and facilitating the implementation of automatic instructions for different trigger conditions; in addition, the embodiment of the present application also provides a method for registering the rules of automatic instructions into the functional module of logical judgment, so that the functional module of logical judgment can perform logical judgment based on the registered rules, thereby realizing the execution of automatic instructions.

[0108] See also Fig.10 , Fig.10 A flow chart of a method for executing an automatic instruction provided by yet another embodiment of the present application is shown. The method for executing an automatic instruction is applied to the above electronic device. Fig.10 The process shown is described in detail, and the method for executing the automatic instruction may specifically include the following steps:

[0109] Step S610: Acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module.

[0110] In the embodiment of the present application, step S610 may refer to the contents of other embodiments and will not be described in detail here.

[0111] Step S620: If the inference engine in the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, a first indication message is sent to the third functional module through the inference engine, and the first notification message is used to instruct the third functional module to perform the target operation corresponding to the automatic instruction.

[0112] In the embodiment of the present application, the above second functional module can be implemented based on an inference engine, for example, it can be implemented based on a Jena engine. The inference engine is a module in the operating system used to complete the inference function, which can also be called an inference engine. Since the data inference (i.e., judging whether the target data meets the trigger condition) is handed over to the inference engine, the repeated code in the logical judgment can be reduced, and the data collected by different services can be reused, thereby further reducing the difficulty of implementing automatic instructions for different trigger conditions.

[0113] In some embodiments, see Fig.11, the above second functional module may include a rule base, an inference engine and a workspace, and the inference engine may include a pattern matcher, an agenda and an execution engine. The rule base stores rules corresponding to automatic instructions; the above target data for the inference process received by the second functional module can be input into the workspace, which is the place where all facts and data involved in the current inference process are stored, and is the basis for the inference engine to perform inference; the inference engine is used to complete logical judgment, that is, to judge whether the above target data matches the rules, and to execute the rules that meet the facts. For example, please refer to Fig.12 By inheriting IFactCollectorAbility, you can collect various types of data access objects (DAO) in the "collect" method, and use the JeanAdapter class to update the collected data to the workspace for the inference engine to perform inference.

[0114] In the above implementation, a pattern matcher can be used to match the target data in the workspace with the rules in the rule base to find all possible triggered rules; pattern matching is the process of finding a matching structure or instance in existing knowledge and facts based on a specified pattern. The implementation of pattern matching usually involves string matching, regular expressions, semantic networks, or semantic graphs.

[0115] After determining all possible triggered rules, the determined rules can be stored in an agenda, which is used to manage the execution order of successfully matched rules and resolve conflicts between rules. It is understandable that if multiple rules are triggered at the same time, conflict resolution is required. This usually involves evaluating factors such as the priority and relevance of the rules to determine the execution order of the rules. The execution engine can execute the actions defined in the rules according to the rules stored in the agenda, that is, send a first notification message to the third functional module to instruct the third functional module to execute the target operation corresponding to the automatic instruction.

[0116] Step S630: Execute the target operation according to the first notification information through the third functional module.

[0117] In the embodiment of the present application, step S630 can refer to the contents of other embodiments and will not be repeated here.

[0118] The method for executing automatic instructions provided in the embodiment of the present application utilizes different functional modules to perform data collection and logical judgment when implementing the automatic instructions, so that the automatic instructions for different trigger conditions can reuse the same required data without having to write relevant data collection codes specifically for each automatic instruction, thereby reducing the difficulty of implementing automatic instructions for different trigger conditions and facilitating the implementation of automatic instructions for different trigger conditions; in addition, the functional module of logical judgment is implemented based on the inference engine, so that the repeated code in the logical judgment can be reduced, and the data collected by different services can be reused, thereby further reducing the difficulty of implementing automatic instructions for different trigger conditions.

[0119] Next, pass Fig.13 The method for executing automatic instructions involved in the above-mentioned embodiment is introduced.

[0120] The method for executing automatic instructions involved in the above-mentioned embodiment can be performed by Fig.13 The framework shown is implemented in Fig.13 The framework shown includes a first functional module, a second functional module and a third functional module. Among them, the first functional module and the second functional module can be divided into intelligent decision-making services, but the first functional module and the second functional module are independently operated functional modules. The first functional module is used to obtain the data required for the logical judgment of the automatic instruction, and is not responsible for the logical judgment of the specific business, and only updates the acquired data to the second functional module. The second functional module can register the rules corresponding to the generated automatic instructions to the second functional module. The second functional module analyzes the data required for the logical judgment according to the registered rules, and notifies the first functional module based on the analysis results. The first functional module collects and monitors the data required for the analysis. When the first functional module monitors the data change, the first functional module pushes the data to the second functional module. After receiving the data pushed by the first functional module, the second functional module performs a logical judgment based on the received data to detect whether the trigger condition set by the user is met. If it is met, the third functional module is notified to perform the target operation corresponding to the automatic instruction. The third functional module may be an automatic instruction module. In addition to executing operations in the automatic instruction, the third functional module may also be used to obtain the automatic instruction edited by the user and register relevant information of the automatic instruction into the second functional module.

[0121] In the above methods, please refer to Fig.14, the user interface (UI) interaction can be realized through the third functional module. The third functional module can store the data (trigger conditions, execution actions, etc.) of the added automatic instructions in the database according to the editing operation in the user interface; then, the second functional module is notified that the data in the database has changed; after the listener in the second functional module listens to the notification, it queries the third functional module for rules; the third functional module can generate rules corresponding to the automatic instructions according to the trigger conditions and send the rules to the second functional module; the second functional module can register the received rules, and then notify the first functional module to collect the required data according to the registered rules; when the first functional module listens to the required data change, the first functional module pushes the listened data to the second functional module; the second functional module updates the received data to the workspace, and performs logical reasoning based on the data in the workspace, that is, determines whether the data in the workspace matches the rules; if the data in the workspace matches the rules, then the second functional module can notify the third functional module to execute the automatic instruction corresponding to the id based on the id of the automatic instruction; the third functional module can query the operation corresponding to the id (that is, the operation corresponding to the above automatic instruction) according to the notification, and then execute the queried operation.

[0122] Therefore, through the above method, the capabilities of the third functional module can be expanded. Only the UI interaction with the user, rule generation templates and data collection need to be considered, and the corresponding logical judgment does not need to be considered, which reduces the development cost; the second functional module can be implemented based on an inference engine (such as the jena engine), so that the probability of error when implementing logical judgment will be greatly reduced, and the code for logical judgment is handed over to the jena engine, which reduces the duplication of code in logical judgment and can reuse data collected by other businesses; when it is necessary to change or add trigger conditions, only the combination strategy of UI and rules needs to be updated, and no other additional development work needs to be considered; when analyzing the problem when a problem occurs, the main verification is whether the collected data is correct and whether the corresponding rule template is correct. It is no longer necessary to consider the complex logical part, which is easy for subsequent problem analysis; and data collection and logical judgment are implemented through different functional modules to make them independent of each other, which can be easy to maintain and expand.

[0123] See also Fig.15, which shows a structural block diagram of a device 700 for executing automatic instructions provided in an embodiment of the present application. The device 700 for executing automatic instructions uses the above-mentioned electronic device, and the device 700 for executing automatic instructions includes: a data acquisition module 710, a data determination module 720, and an operation execution module 730, wherein the data acquisition module 710 is used to acquire the target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module; the data determination module 720 is used to send a first notification message to the third functional module through the second functional module if the target data is determined to meet the trigger condition corresponding to the automatic instruction through the second functional module, and the first notification message is used to instruct the third functional module to execute the target operation corresponding to the automatic instruction; the operation execution module 730 is used to execute the target operation through the third functional module according to the first notification message.

[0124] In some embodiments, the data determination module 720 can be specifically used to: match the target data with the rules corresponding to the automatic instructions registered in the second functional module through the second functional module; if the target data matches the rules, then send a first notification message to the third functional module based on the rules through the second functional module.

[0125] In a possible implementation, the data determination module 720 may be specifically configured to: if the target data matches the rule, send a first notification message carrying an instruction identifier of the automatic instruction to a third function module based on the rule through the second function module.

[0126] In this embodiment, the operation execution module 730 can be specifically used to: determine the automatic instruction corresponding to the instruction identifier according to the instruction identifier carried in the first notification information through the third functional module; and execute the target operation corresponding to the automatic instruction through the third functional module.

[0127] In a possible implementation, the device 700 for executing automatic instructions may further include a first notification module. The first notification module is used to send second notification information to the first functional module through the second functional module according to the rule before acquiring the target data corresponding to the automatic instruction through the first functional module, wherein the second notification information is used to instruct the first functional module to collect the target data corresponding to the automatic instruction.

[0128] In this implementation, the data acquisition module 710 may be specifically used to: acquire target data corresponding to the automatic instruction in response to the second notification information through the first functional module.

[0129] In a possible implementation, the apparatus 700 for executing automatic instructions may further include a rule generation module and a rule registration module. The rule generation module may be used to generate the rule based on the added automatic instruction through the third functional module and send the rule to the second functional module; the rule registration module is used to register the rule into the second functional module through the second functional module.

[0130] Optionally, the apparatus 700 for executing automatic instructions may further include an instruction adding module. The instruction adding module may be used to obtain a trigger condition and a target operation corresponding to the added automatic instruction in response to an adding operation for the automatic instruction through the third functional module before generating the rule based on the added automatic instruction through the third functional module.

[0131] Optionally, the device 700 for executing automatic instructions may further include a data storage module, a second notification module and a third notification module, the data storage module being used to store the trigger conditions and target operations corresponding to the automatic instructions in a database corresponding to the third functional module through the third functional module; the second notification module being used to send third notification information to the second functional module through the third functional module, the third notification information being used to indicate that data in the database has changed; the third notification module being used to send fourth notification information to the third functional module through the second functional module in response to the third notification information, the fourth notification information being used to instruct the second functional module to generate the rules for the added automatic instructions.

[0132] In some embodiments, the data determination module 720 may be specifically used to: if the inference engine in the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, then send the first indication information to the third functional module through the inference engine.

[0133] In some implementations, the data acquisition module 710 may be specifically configured to: acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module when the target data changes.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.

[0135] In several embodiments provided in the present application, the coupling between modules may be electrical, mechanical or other forms of coupling.

[0136] In addition, each functional module in each embodiment of the present application can be integrated into a processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software functional modules.

[0137] In summary, the solution provided by the present application, when implementing the automatic instruction, obtains the target data corresponding to the automatic instruction through the first functional module, and transmits the target data to the second functional module. If the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, the second functional module sends a first notification message to the third functional module, and the first notification message is used to instruct the third functional module to perform the target operation corresponding to the automatic instruction. The third functional module performs the target operation according to the first notification message. Thus, when implementing the automatic instruction, data collection and logical judgment are performed through different functional modules, so that the same data required for the automatic instructions with different trigger conditions can be reused, which reduces the difficulty of implementing the automatic instructions with different trigger conditions and facilitates the implementation of the automatic instructions with different trigger conditions.

[0138] Please refer to Fig.16 , which shows a structural block diagram of an electronic device provided in an embodiment of the present application. The electronic device 100 may be an electronic device capable of running applications, such as a smart phone, a tablet computer, a smart watch, an e-book, etc. The electronic device 100 in the present application may include one or more of the following components: a processor 110, a memory 120, and one or more applications, wherein the one or more applications may be stored in the memory 120 and configured to be executed by one or more processors 110, and the one or more applications are configured to execute the method described in the aforementioned method embodiment.

[0139] The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes various functions and processes data of the electronic device 100 by running or executing instructions, programs, code sets or instruction sets stored in the memory 120, and calling data stored in the memory 120. Optionally, the processor 110 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes the operating system, user interface, and application programs; the GPU is responsible for rendering and drawing display content; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 110, but may be implemented separately through a communication chip.

[0140] The memory 120 may include a random access memory (RAM) or a read-only memory (ROM). The memory 120 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc. The data storage area may also store data (such as a phone book, audio and video data, chat record data) created by the electronic device 100 during use.

[0141] Please refer to Fig.17 , which shows a structural block diagram of a computer-readable storage medium provided in an embodiment of the present application. The computer-readable medium 800 stores program codes, which can be called by a processor to execute the method described in the above method embodiment.

[0142] The computer readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a ROM. Optionally, the computer readable storage medium 800 includes a non-transitory computer-readable storage medium. The computer readable storage medium 800 has storage space for program code 810 that performs any method step in the above method. These program codes can be read from or written to one or more computer program products. The program code 810 can be compressed, for example, in an appropriate form.

[0143] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for executing an automatic instruction, characterized in that: The method comprises: Acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module; If it is determined by the second functional module that the target data meets the trigger condition corresponding to the automatic instruction, the second functional module sends a first notification message to the third functional module, where the first notification message is used to instruct the third functional module to perform the target operation corresponding to the automatic instruction; The target operation is performed according to the first notification information by the third functional module.

2. The method according to claim 1, characterized in that If it is determined by the second functional module that the target data meets the trigger condition corresponding to the automatic instruction, sending first notification information to the third functional module by the second functional module includes: Matching the target data with the rule corresponding to the automatic instruction registered in the second functional module through the second functional module; If the target data matches the rule, the second functional module sends first notification information to the third functional module based on the rule.

3. The method according to claim 2, characterized in that If the target data matches the rule, sending first notification information to the third function module based on the rule through the second function module includes: If the target data matches the rule, sending a first notification message carrying the instruction identifier of the automatic instruction to a third functional module based on the rule through the second functional module; The performing the target operation according to the first notification information by the third functional module includes: Determining, by the third functional module, the automatic instruction corresponding to the instruction identifier according to the instruction identifier carried in the first notification information; The target operation corresponding to the automatic instruction is executed through the third functional module.

4. The method according to claim 2, characterized in that: Before acquiring the target data corresponding to the automatic instruction through the first functional module, the method further includes: Sending, by the second functional module, second notification information to the first functional module according to the rule, the second notification information being used to instruct the first functional module to collect target data corresponding to the automatic instruction; The step of obtaining target data corresponding to the automatic instruction through the first functional module includes: The target data corresponding to the automatic instruction is acquired by the first functional module in response to the second notification information.

5. The method according to any one of claims 2 to 4, characterized in that: The method further comprises: Generate the rule based on the added automatic instruction by the third functional module, and send the rule to the second functional module; The rule is registered into the second functional module through the second functional module.

6. The method according to claim 5, characterized in that Before generating the rule based on the added automatic instruction by the third functional module, the method further includes: In response to the adding operation for the automatic instruction, the triggering condition and the target operation corresponding to the added automatic instruction are acquired through the third functional module.

7. The method according to claim 6, characterized in that After the third functional module responds to the adding operation for the automatic instruction and obtains the triggering condition and the target operation corresponding to the added automatic instruction, the method further includes: The triggering condition and the target operation corresponding to the automatic instruction are stored in a database corresponding to the third functional module through the third functional module; Sending third notification information to the second functional module through the third functional module, where the third notification information is used to indicate that data in the database has changed; The second functional module sends fourth notification information to the third functional module in response to the third notification information, where the fourth notification information is used to instruct the second functional module to generate the rule for the added automatic instruction.

8. The method according to claim 1, characterized in that: If it is determined by the second functional module that the target data meets the trigger condition corresponding to the automatic instruction, sending the first indication information to the third functional module by the second functional module includes: If the inference engine in the second functional module determines that the target data meets the trigger condition corresponding to the automatic instruction, the first indication information is sent to the third functional module through the inference engine.

9. The method according to claim 1, characterized in that: The step of acquiring target data corresponding to the automatic instruction through the first functional module and transmitting the target data to the second functional module includes: The target data corresponding to the automatic instruction is acquired through the first functional module, and when the target data changes, the target data is transmitted to the second functional module.

10. A device for executing automatic instructions, characterized in that: The device comprises: a data acquisition module, a data determination module and an operation execution module, wherein: The data acquisition module is used to acquire target data corresponding to the automatic instruction through the first functional module, and transmit the target data to the second functional module; The data determination module is used to send a first notification message to a third function module through the second function module if the second function module determines that the target data meets the trigger condition corresponding to the automatic instruction, wherein the first notification message is used to instruct the third function module to perform the target operation corresponding to the automatic instruction; The operation execution module is used to execute the target operation according to the first notification information through the third function module.

11. An electronic device, characterized in that: include: one or more processors; Memory; One or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the method according to any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program codes, which can be called by a processor to execute the method according to any one of claims 1 to 9.