Control flow generation method and device, equipment and storage medium

By analyzing the conversion requirements of smart devices and generating target control flows, the problem of repetitive logic in smart device control rules is solved, and the reuse of modules and the difficulty of development is reduced.

CN120281803APending Publication Date: 2025-07-08HAIER YOUJIA INTELLIGENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510395628.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-31
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

There are a large number of duplicate logic or functions in the control rules of existing smart devices, resulting in redundant code and increasing development difficulty.

Method used

By analyzing the conversion requirements of new smart devices, obtaining the information to be converted for triggering conditions, target devices and target operations, mapping them to the target module based on the module library, and stitching them according to the assembly rules to generate the target control flow, and finally encapsulate and send them to the target device.

Benefits of technology

Reuse of the same module in different control flows is realized, reducing development difficulty and redundant code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120281803A_ABST
    Figure CN120281803A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of intelligent household appliances, and particularly relates to a control flow generation method and device, equipment and a storage medium. When it is detected that a new intelligent device is added to the household intelligent device list, determining a conversion demand according to the new intelligent device; analyzing the conversion demand, and obtaining to-be-converted information and an assembly rule corresponding to the to-be-converted information; based on a module library, mapping the to-be-converted information to a corresponding target module, and splicing the target module according to the splicing rule to obtain a corresponding target control flow; and carrying out packaging processing on the target control flow, and issuing the packaged target control flow to the target equipment. Through the mode, the same module can be repeatedly used in different control flows, and the development difficulty is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of smart home appliances, and specifically relates to a control flow generation method, device, equipment, and storage medium. Background Art

[0002] With the rapid development of the Internet of Things and smart devices, more and more smart devices are widely used in the home field. These devices usually generate control instructions through preset control rules to achieve automated operations. For example, functions such as lighting control, temperature adjustment, and security monitoring in a smart home system all rely on a series of predefined control rules.

[0003] In existing technical solutions, the control rules of smart devices are usually implemented independently, that is, each rule corresponds to a specific set of code instructions. For example, when it is detected that a user enters the room, the system will trigger the rule of "turn on the light"; when it is detected that the ambient temperature is too high, the system will trigger the rule of "start the air conditioner".

[0004] However, with the increase in the functions of smart devices, there is a lot of duplicate logic or functions in the control rules of many smart devices. For example, multiple rules may all need to detect the ambient light intensity or user location information, but these detection logics will be repeatedly written in the existing technology, resulting in code redundancy and increasing the development difficulty. Summary of the Invention

[0005] This application provides a control flow generation method, device, equipment, and storage medium.

[0006] In a first aspect, this application provides a control flow generation method, the method including:

[0007] When a new smart device is detected to be added to the list of home smart devices, determining a conversion requirement according to the new smart device;

[0008] Analyzing the conversion requirement to obtain the information to be converted and the assembly rule corresponding to the information to be converted, where the information to be converted includes a trigger condition, a target device, and a target operation;

[0009] Based on a module library, mapping the information to be converted to a corresponding target module, and splicing the target modules according to the assembly rule to obtain a corresponding target control flow, where the target module includes a trigger condition module, a device control module, and an operation execution module;

[0010] Performing encapsulation processing on the target control flow and sending the encapsulated target control flow to the target device.

[0011] In a possible implementation manner, mapping the information to be converted to a corresponding target module based on the module library includes:

[0012] For each target content in the information to be converted, query in the module library whether there is a target module corresponding to the target content;

[0013] If there is, call the target module from the module library;

[0014] If not, generate a corresponding target module according to the target content, and add the target module corresponding to the target content to the module library.

[0015] In a possible implementation manner, generating a corresponding target module according to the target content includes:

[0016] Determine the information type corresponding to the target content, and extract keywords from the target content;

[0017] Query the module library based on the information type and the keywords, and determine whether there is a corresponding reference module in the module library;

[0018] If there is, adjust the reference module based on the target content to obtain a corresponding target module;

[0019] If not, generate a target module corresponding to the target content according to a preset module creation rule.

[0020] In a possible implementation manner, determining a conversion requirement according to the new intelligent device includes:

[0021] Determine whether there is a linked device in the list of home intelligent devices that is in a linkage process with the new intelligent device;

[0022] If there is, determine the linkage rule between the linked device and the new intelligent device, and the local control rule of the new intelligent device;

[0023] If not, determine the local control rule of the new intelligent device;

[0024] Generate a corresponding conversion requirement according to the local control rule and / or the linkage rule.

[0025] In a possible implementation manner, determining the linkage rule between the linked device and the new intelligent device includes:

[0026] Obtain a first linkage step of the new intelligent device in the linkage process, and a second linkage step of the linked device in the linkage process;

[0027] Determine whether there is a reference device in the list of home intelligent devices that has the same function as the new intelligent device;

[0028] If there is, obtain the reference linkage rule between the reference device and the linkage device, and determine the adapted linkage rule from the reference linkage rule based on the first linkage step and the second linkage step;

[0029] If not, analyze the step relationship between the first linkage step and the second linkage step based on the functional characteristics of the new intelligent device and the linkage device, and determine the adapted linkage rule according to the analysis result.

[0030] In a possible implementation manner, the method further includes:

[0031] When receiving the replacement requirement of the intelligent device, determine the device to be replaced and the replacement device based on the replacement requirement;

[0032] Determine the linkage rule associated with the device to be replaced, and retrieve the corresponding control flow to be adjusted from the control flow library;

[0033] Update the control flow to be adjusted based on the replacement device, and issue the updated control flow to be adjusted.

[0034] In a possible implementation manner, the updating the control flow to be adjusted based on the replacement device includes:

[0035] Identify the control flow to be adjusted to obtain multiple modules and corresponding assembly rules;

[0036] Analyze the functional characteristics of the replacement device based on the linkage rule, and determine the module to be adjusted and the corresponding adjustment content from the multiple modules according to the analysis result;

[0037] Update the module to be adjusted according to the adjustment content, and perform assembly processing according to the assembly rule to obtain the updated control flow to be adjusted.

[0038] In a second aspect, the present application provides a control flow generation device, including: a determination module, an acquisition module, and a control module, where:

[0039] The determination module is configured to determine the conversion requirement according to the new intelligent device when detecting the addition of a new intelligent device in the list of home intelligent devices;

[0040] The acquisition module is configured to parse the conversion requirement, acquire the information to be converted, and the assembly rule corresponding to the information to be converted, where the information to be converted includes a trigger condition, a target device, and a target operation;

[0041] The control module is configured to map the information to be transformed to corresponding target modules based on a module library, and splice the target modules according to the splicing rules to obtain a corresponding target control flow, where the target modules include a trigger condition module, a device control module, and an operation execution module;

[0042] The control module is further configured to perform encapsulation processing on the target control flow and send the encapsulated target control flow to the target device.

[0043] In a possible implementation manner, the control module is further configured to:

[0044] For each target content in the information to be transformed, query in the module library whether there is a target module corresponding to the target content;

[0045] If it exists, call the target module from the module library;

[0046] If it does not exist, generate a corresponding target module according to the target content and add the target module corresponding to the target content to the module library.

[0047] In a possible implementation manner, the control module is further configured to:

[0048] Determine the information type corresponding to the target content, and extract keywords from the target content;

[0049] Query the module library based on the information type and the keywords, and determine whether there is a corresponding reference module in the module library;

[0050] If it exists, adjust the reference module based on the target content to obtain a corresponding target module;

[0051] If it does not exist, generate a target module corresponding to the target content according to a preset module creation rule.

[0052] In a possible implementation manner, the determination module is further configured to:

[0053] Determine whether there is a linkage device in the home intelligent device list that is in a linkage process with the new intelligent device;

[0054] If it exists, determine the linkage rule between the linkage device and the new intelligent device, and the local control rule of the new intelligent device;

[0055] If it does not exist, determine the local control rule of the new intelligent device;

[0056] Generate corresponding transformation requirements according to the local control rules and / or the linkage rules.

[0057] In a possible implementation manner, the determining module is further configured to:

[0058] Obtain a first linkage step of the new intelligent device in the linkage process, and a second linkage step of the linkage device in the linkage process;

[0059] Determine whether there is a reference device with the same function as the new intelligent device in the list of home intelligent devices;

[0060] If there is, obtain the reference linkage rule between the reference device and the linkage device, and determine an adapted linkage rule from the reference linkage rule based on the first linkage step and the second linkage step;

[0061] If not, analyze the step relationship between the first linkage step and the second linkage step based on the functional characteristics of the new intelligent device and the linkage device, and determine an adapted linkage rule according to the analysis result.

[0062] In a possible implementation manner, the determining module is further configured to:

[0063] When receiving a replacement requirement of an intelligent device, determine a device to be replaced and a replacement device based on the replacement requirement;

[0064] Determine the linkage rule associated with the device to be replaced, and retrieve the corresponding control flow to be adjusted from the control flow library;

[0065] Update the control flow to be adjusted based on the replacement device, and send down the updated control flow to be adjusted.

[0066] In a possible implementation manner, the determining module is further configured to:

[0067] Identify the control flow to be adjusted to obtain multiple modules and corresponding assembly rules;

[0068] Analyze the functional characteristics of the replacement device based on the linkage rule, and determine a module to be adjusted and corresponding adjustment content from the multiple modules according to the analysis result;

[0069] Update the module to be adjusted according to the adjustment content, and perform assembly processing according to the assembly rules to obtain an updated control flow to be adjusted.

[0070] In a third aspect, the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor;

[0071] The memory stores computer-executable instructions;

[0072] The processor executes the computer-executable instructions stored in the memory to implement the control flow generation method as described in the first aspect.

[0073] In a fourth aspect, the present application provides a computer-readable storage medium storing computer-executable instructions, which are used to implement the control flow generation method as described in the first aspect when executed by a computer.

[0074] In a fifth aspect, the present application further provides a computer program product including a computer program, which can implement the steps of the solution recommendation method as described in any item of the first aspect when executed by a processor.

[0075] The control flow generation method, apparatus, device, and storage medium provided by the present application, when detecting that a new intelligent device is added to the list of home intelligent devices, obtain the information to be transformed including trigger conditions, target devices, and target operations, as well as the corresponding assembly rules by parsing the corresponding transformation requirements, map the information to be transformed to the target module based on the module library, splice and generate the target control flow according to the assembly rules, and finally encapsulate and send it to the target device to achieve automated control. By the above method, the same module can be reused in different control flows, reducing the development difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0076] The drawings here are incorporated into the specification and form a part of the specification, showing the embodiments consistent with the present application and used together with the specification to explain the principles of the present application.

[0077] Figure 1 Schematic flow chart of a control flow generation method provided by an embodiment of the present application Figure 1 ;

[0078] Figure 2 Schematic flow chart of a control flow generation method provided by an embodiment of the present application Figure 2 ;

[0079] Figure 3 Schematic diagram of mapping information to be transformed to a target module provided by an embodiment of the present application;

[0080] Figure 4 Schematic flow chart of a control flow generation method provided by an embodiment of the present application Figure 3 ;

[0081] Figure 5 Schematic structural diagram of a control flow generation apparatus provided by an embodiment of the present application;

[0082] Figure 6A schematic structural diagram of an electronic device provided by an embodiment of the present application.

[0083] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and more detailed descriptions will be given in the following text. These drawings and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. Detailed implementation manners

[0084] To make the objectives, technical solutions, and advantages of the present application clearer, the technical solutions in the present application will be clearly and completely described below with reference to the accompanying drawings in the present application. Obviously, the described embodiments are some, but not all, of the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the scope of protection of the present application.

[0085] With the rapid development of the Internet of Things and intelligent devices, in the home field such as a smart home system, intelligent devices achieve automated operations through preset control rules. However, in existing technical solutions, the control rules of intelligent devices are usually implemented in a way that each rule corresponds to a set of specific code instructions. However, as the functions of intelligent devices increase, there is a lot of duplicate logic or functions in many control rules, which increases the difficulty of development.

[0086] The present application provides a control flow generation method. When a new intelligent device is added to the detected list of home intelligent devices, the to-be-converted information including a trigger condition, a target device, and a target operation, as well as the corresponding assembly rule, is obtained by parsing the corresponding conversion requirement. The to-be-converted information is mapped to a target module based on a module library, and the target control flow is spliced and generated according to the assembly rule. Finally, it is encapsulated and sent to the target device to achieve automated control. Through the above method, the same module can be reused in different control flows, reducing the difficulty of development.

[0087] The technical solutions of the present application and how the technical solutions of the present application solve the above technical problems will be described in detail below with specific embodiments. These several specific embodiments can exist independently or be combined with each other. The same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below with reference to the accompanying drawings.

[0088] Figure 1 A flowchart of a control flow generation method provided by an embodiment of the present application Figure 1 . As Figure 1 shown, the method includes:

[0089] S101. When a new smart device is added to the detected list of home smart devices, determine the transformation requirements based on the new smart device.

[0090] In this step, with the rapid development of the Internet of Things and smart devices, more and more smart devices are widely used in the home field. These devices usually generate control instructions through preset control rules to achieve automated operations. For example, functions such as lighting control, temperature adjustment, and security monitoring in a smart home system all rely on a series of predefined control rules. In existing technical solutions, the control rules of smart devices are usually implemented independently, that is, each rule corresponds to a specific set of code instructions. For example, when it is detected that the user enters the room, the system will trigger the rule of "turn on the light"; when it is detected that the environmental temperature is too high, the system will trigger the rule of "start the air conditioner". However, as the functions of smart devices increase, there is a lot of duplicate logic or functions in the control rules of many smart devices. For example, multiple rules may all need to detect the environmental light intensity or user location information, but these detection logics will be repeatedly written in the existing technology, resulting in code redundancy and increasing the difficulty of development. Therefore, in this embodiment, the control rules of smart devices are transformed into a control flow composed of multiple modules spliced together.

[0091] Specifically, when it is determined that a new smart device is added to the list of home smart devices, determine the native control rules and linkage rules of the new smart device, and determine the transformation requirements based on the native control rules and linkage rules.

[0092] S102. Analyze the transformation requirements, obtain the information to be transformed, and the splicing rules corresponding to the information to be transformed.

[0093] Among them, the information to be transformed includes a trigger condition, a target device, and a target operation.

[0094] In this step, analyze the control rules of the smart device, and determine that its core composition can be divided into three main parts: the target device, the trigger condition, and the target operation. These three parts jointly determine the control flow of the washing machine, that is, the process of generating and executing instructions. Therefore, the modules for constructing the control flow are mainly constructed based on these three types of parameters.

[0095] Specifically, the target device refers to the smart device itself, including its various components; the trigger condition refers to those events or states that cause the control flow to execute, such as the type of clothing, the degree of stain, the water level height, etc.; the target operation refers to the specific instructions for the smart device, such as starting washing, pausing the program, adjusting the temperature, etc.

[0096] In addition, to ensure the correct execution of the control flow, not only the modules corresponding to the above three parameters are required, but also a clear assembly rule, which will guide how to assemble the modules corresponding to the target device, trigger condition, and target operation into a complete control flow in the correct order. The assembly rule may include the logical order of the process, conditional judgment, interaction between modules, etc. Therefore, when analyzing and transforming the requirements in this embodiment, the above three parameters and the assembly rule need to be obtained.

[0097] Specifically, after receiving the transformation requirement, analyze the transformation requirement to obtain the rule to be transformed, disassemble the rule to obtain the information to be transformed including the trigger condition, target device, and target operation, as well as the corresponding assembly rule.

[0098] S103. Based on the module library, map the information to be transformed to the corresponding target modules, and splice the target modules according to the assembly rule to obtain the corresponding target control flow.

[0099] Among them, the target modules include a trigger condition module, a device control module, and an operation execution module.

[0100] In this step, with the increase in the number of the same type of intelligent devices on the market and the diversification of users' functional and operational requirements for intelligent devices, the control rules of intelligent devices are constantly increasing. As a result, among numerous control rules, there are many rules with the same constituent parts. That is, multiple control rules include the same target operation or trigger condition. In this case, there may be modules in the module library composed of multiple modules included in the control flow of existing intelligent devices that are called by different control flows. Therefore, first query the module library to determine whether there are callable target modules.

[0101] In addition, even if there are no modules in the module library that are exactly the same as the information to be transformed, due to the high similarity of the control rules of the same type or functionally identical intelligent devices. Therefore, there may be reference modules in the module library that are functionally similar to the required target modules. These reference modules can be used as substitutes, directly called and appropriately modified to obtain the required target modules. The target modules need to be stored in the module library.

[0102] Furthermore, when neither the same modules nor similar reference modules can be found in the module library, directly create the corresponding target modules according to the information to be transformed. Then, store the target modules in the module library for subsequent control flow calls.

[0103] For each target content in the information to be transformed, first determine whether there is a corresponding target module in the module library. If it exists, directly call it. If it does not exist, further analyze the target content to determine whether there is a corresponding reference module in the module library. And according to the result, determine to modify the reference module according to the target content to obtain the corresponding target module, or create the target module corresponding to the target content.

[0104] After determining that each target content in the information to be transformed is mapped to the corresponding target module, splice multiple target modules according to the splicing rules to obtain the corresponding target control flow.

[0105] S104. Perform encapsulation processing on the target control flow, and send the encapsulated target control flow to the target device.

[0106] In this step, after obtaining the target control flow, encapsulate the target control flow. Then, send the encapsulated target control flow to the target device.

[0107] The present application provides a control flow generation method. When a new intelligent device is detected to be added to the list of home intelligent devices, the information to be transformed including the trigger condition, target device, and target operation, as well as the corresponding splicing rules, is obtained by parsing the corresponding transformation requirements. Based on the module library, the information to be transformed is mapped to the target module, and the target control flow is spliced and generated according to the splicing rules. Finally, it is encapsulated and sent to the target device to achieve automatic control. By the above method, the same module can be reused in different control flows, reducing redundant code and lowering the development difficulty.

[0108] Figure 2 It is a flow schematic diagram of a control flow generation method provided by an embodiment of the present application Figure 2 . This embodiment details the steps of how to map the information to be transformed to the corresponding target module based on the module library. As Figure 2 shown, the method includes:

[0109] S201. For each target content in the information to be transformed, query in the module library whether there is a target module corresponding to the target content.

[0110] In this step, as the core component for transforming the control rules of intelligent devices into the corresponding control flow, the module library stores a large number of trigger condition modules, device control modules, and operation execution modules required to construct multiple control flows of intelligent devices. Considering that the information to be transformed of new intelligent devices may have duplicate content with the control rules corresponding to the control flows of existing intelligent devices. Therefore, in the process of mapping the information to be transformed to the corresponding target module, first query in the module library whether there is a directly callable target module.

[0111] Specifically, for each target content in the information to be transformed, query in the module library whether there is a target module corresponding to the target content.

[0112] S202. If there is, then call the target module from the module library.

[0113] In this step, when it is determined according to the query result that there is a target module corresponding to the target content in the module library, directly call the target module from the module library, which reduces the development time and resource consumption in the process of converting the control flow.

[0114] S203. If not, then determine the information type corresponding to the target content and extract keywords from the target content.

[0115] In this step, considering that there may be intelligent devices with similar functional characteristics to the new intelligent device in existing intelligent devices, then the control rules of this intelligent device have a certain similarity with the control rules of the new intelligent device. The constituent modules of the control flow corresponding to this intelligent device can be used as reference modules in the process of transforming the information to be transformed of the new intelligent device into a control flow. Therefore, when it is determined that there is no target module corresponding to the target content in the module library, it is possible to further query in the module library whether there is a reference module similar to the target module corresponding to the target content.

[0116] Specifically, when it is determined according to the query result that there is no target module corresponding to the target content in the module library, analyze the target content to determine the information type of the target content and extract keywords from the target content.

[0117] S204. Query the module library based on the information type and keywords, and determine whether there is a corresponding reference module in the module library.

[0118] In this step, obtain the module label of each module in the module library, and this module label is used to indicate the information type and keywords of the content in the module. Match the information type and keywords of the target content with multiple module labels, and determine whether there is a reference module corresponding to the target content in the module library according to the matching result.

[0119] S205. If there is, then adjust the reference module based on the target content to obtain the corresponding target module.

[0120] In this step, when it is determined according to the matching result that there is a reference module corresponding to the target content in the module library, call the reference module and adjust the reference module according to the target content to obtain the required target module.

[0121] S206. If not, then generate a target module corresponding to the target content according to the preset module creation rule.

[0122] In this step, when it is determined according to the matching result that there is no reference module corresponding to the target content in the module library, the module creation rule is directly obtained, and the target module corresponding to the target content is generated based on the module creation rule. In this embodiment, the module creation rule is not limited. Exemplarily, the module creation rule includes the initial module corresponding to each information type, the adjustable parameter items in the initial module, and the adjustment description of each adjustable parameter item.

[0123] Figure 3 It is a schematic diagram for mapping the information to be transformed provided by the embodiment of the present application to the target module. As Figure 3 shown, the corresponding target module of the target content 2 can be queried in the module library. Therefore, the target module corresponding to the target content 2, that is, the target module 2, is directly called from the module library.

[0124] Further, the information type of the target content 1 is obtained as: trigger condition, and the keywords are extracted as: reference detergent beam, target washing dose or recommended washing dose. The information type of the target content 3 is obtained as: target operation, and the keywords are extracted as: run, target washing dose or recommended washing dose. Based on the foregoing information type and keywords, the reference module is matched from the module library, and finally the reference module corresponding to the target content 1 is obtained as: "the ratio of the reference washing dose to the recommended washing dose is less than 1 preset ratio". The reference module is adjusted according to the target content 1 to obtain the target module 1 as: "the difference between the reference washing dose and the recommended washing dose is greater than or equal to the difference threshold".

[0125] Finally, based on the module creation rule, the initial module corresponding to the target content 3 is determined as: execute XX operation. The initial module is adjusted according to the target content 3 to obtain the target module 3 as: "run according to the target washing dose".

[0126] S207. Add the target module corresponding to the target content to the module library.

[0127] In this step, after obtaining the target module corresponding to the target content according to the reference module or the module creation rule, the target module is stored in the module library to provide a callable module for the subsequent control flow.

[0128] The present application provides a control flow generation method. The query module library is queried to determine whether there is a target module corresponding to each target content in the information to be transformed, and the target module is directly called from the module library according to the query result, or the information type and keywords of the target content are determined, and it is determined whether there is a corresponding reference module in the module library. Then, according to the matching result, the reference module is called and adjusted according to the target content to obtain the corresponding target module, or the corresponding target module is generated according to the module creation rule. After that, the newly obtained target module is stored in the module library. In the above manner, each target content in the information to be transformed is mapped to the target module, reducing the development time and resource consumption in the process of converting the control flow.

[0129] Figure 4 Schematic flow of a control flow generation method provided by an embodiment of the present application Figure 3 This embodiment details the steps of how to determine the conversion requirements according to the new intelligent device. As Figure 4 shown, the method includes:

[0130] S401. Determine the local control rule of the new intelligent device, and determine whether there is a linked device in the home intelligent device list that is in the linked process with the new intelligent device.

[0131] In this step, the conversion is required to indicate the control rule for the new intelligent device to be converted into a control flow. Considering that there are many types of intelligent devices in the home environment, the new intelligent device may be linked and operated with other intelligent devices in the home environment. Therefore, in addition to the local control rule of the new intelligent device, it is also necessary to determine whether there is a linked rule for the new intelligent device.

[0132] Specifically, when a new intelligent device is detected to be added to the home intelligent device list, analyze the functional characteristics of the new intelligent device to determine the local control rule of the device. At the same time, analyze the functional characteristics of other intelligent devices in the home intelligent device list to determine whether there is a linked device in the home intelligent device list that is in the linked process with the new intelligent device.

[0133] S402. If there is a linked device, obtain the first linked step of the new intelligent device in the linked process and the second linked step of the linked device in the linked process.

[0134] In this step, when it is determined according to the analysis result that there is a linked device in the home intelligent device list that is in the linked process with the new intelligent device, based on this linked process, obtain the first linked step corresponding to the new intelligent device, and obtain the second linked step of the linked device in this linked process.

[0135] Exemplarily, the new smart device is a clothing care machine, the linked device is a clothes dryer, and the linkage process includes a washing step, a clothes drying step, and a care step. Based on the linkage process, the first linkage step corresponding to the clothing care machine is determined to be: the care step. The second linkage step of the clothes dryer in the linkage process is determined to be: the clothes drying step.

[0136] S403. Determine whether there is a reference device with the same function as the new smart device in the list of home smart devices.

[0137] In this step, with the increase in the types and functions of smart devices, there are smart devices with similar functional characteristics. This phenomenon stems from the rapid development of the smart home market and the continuous evolution of technology. Currently, a household may have multiple brands or models of smart lighting, smart thermostats, and other devices at the same time, and these devices often have a high degree of functional overlap. For example, smart bulbs of different brands on the market may all support functions such as color temperature adjustment, brightness adjustment, and timer switch. At the same time, if there are multiple members in the home environment, then for the sake of convenience or space requirements, there may be multiple identical smart devices in the home environment. For example, in a family of three, each bedroom may be equipped with the same smart speaker to meet the personal use needs of different members.

[0138] If the new smart device belongs to the above two types, that is, it is of the same type as the existing device or has similar functional characteristics, then the control rules of the same smart device or smart devices with similar functional characteristics can play an important reference role in determining the linkage rules of the new smart device. This reference is mainly reflected in the following aspects: First, the existing device control logic can be directly transplanted or optimized and then applied to the new device, such as setting automation rules for different scenarios; Second, the usage habit data of users can be used as the basis for the automation setting of the new device, such as adjusting the working mode of the device according to the daily routine of family members; Third, the collaborative working mechanism between devices can refer to the linkage experience of existing devices to ensure the stability and consistency of the entire smart home system.

[0139] Therefore, after determining the first linkage step of the new smart device and the second linkage step of the linked device, based on the list of home smart devices, determine whether there is a reference device with the same function as the new smart device.

[0140] S404. If there is a reference device, obtain the reference linkage rule between the reference device and the linked device, and determine the adapted linkage rule from the reference linkage rule based on the first linkage step and the second linkage step.

[0141] In this step, when it is determined that there is a reference device in the list of home intelligent devices, obtain the reference linkage rule between the reference device and the linkage device. Combine the first linkage step of the new intelligent device and the second linkage step of the linkage device to determine the applicable linkage rule from the reference linkage rules.

[0142] Exemplarily, the new intelligent device is washing machine a, the linkage device with washing machine a is a dryer, and the reference device of washing machine a is washing machine b. The first linkage step corresponding to washing machine a is: the washing step, and the second linkage step corresponding to the dryer is: the drying step.

[0143] Determine the reference linkage rules between washing machine b and the intelligent curtain as: Reference linkage rule 1, when the remaining running time of washing machine b is less than 5 minutes, the dryer starts the preheating operation; Reference linkage rule 2, when washing machine b turns on the power-saving mode, the dryer turns on the power-saving mode.

[0144] Based on the first linkage step, the washing step, and the second linkage step, the drying step, it is determined that the applicable linkage rule should be related to drying. Therefore, the linkage rule between washing machine a and the dryer can be determined according to Reference linkage rule 1.

[0145] S405. If there is no reference device, then based on the functional characteristics of the new intelligent device and the linkage device, analyze the step relationship between the first linkage step and the second linkage step, and determine the applicable linkage rule according to the analysis result.

[0146] In this step, when it is determined that there is no reference device for the new intelligent device in the list of home intelligent devices, based on the functional characteristics of the new intelligent device and the functional characteristics of the linkage device, analyze the step relationship between the first linkage step and the second linkage step, and determine the applicable linkage rule.

[0147] S406. Generate corresponding conversion requirements according to the local control rule and / or the linkage rule.

[0148] In this step, when there is no linkage device for the new intelligent device, generate corresponding conversion requirements according to the local control rule of the new intelligent device; when there is a linkage device for the new intelligent device, generate corresponding conversion requirements according to the local control rule of the new intelligent device and the linkage rule between the new intelligent device and the linkage device.

[0149] Furthermore, when the intelligent device in the home environment is replaced, the control flow of the replacement device can be directly obtained according to the control flow corresponding to the linkage rule of the device to be replaced. The specific steps are as follows:

[0150] When receiving the replacement requirement of the intelligent device, determine the device to be replaced and the replacement device based on the replacement requirement;

[0151] Determine the linkage rules associated with the device to be replaced, and retrieve the corresponding control flow to be adjusted from the control flow library;

[0152] Identify the control flow to be adjusted to obtain multiple modules and corresponding assembly rules;

[0153] Based on the linkage rules, analyze the functional characteristics of the replacement device, and determine the module to be adjusted and the corresponding adjustment content from multiple modules according to the analysis results;

[0154] Update the module to be adjusted according to the adjustment content, and perform assembly processing according to the assembly rules to obtain the updated control flow to be adjusted;

[0155] Send the updated control flow to be adjusted.

[0156] This application provides a control flow generation method. According to whether there is a linkage device of a new intelligent device in the home intelligent device list, directly obtain the local control rules, and generate a transformation requirement according to the local control rules, or further determine whether there is a reference device with the same function in the home intelligent device list, and determine the linkage rules of the new intelligent device in the corresponding manner according to the determination result. Then, generate a transformation requirement according to the linkage rules and the local control rules. Through the above method, the steps of determining the transformation requirements for the new intelligent device are simplified, and the efficiency of the solution is improved.

[0157] Figure 5 It is a schematic structural diagram of a control flow generation device provided by an embodiment of this application. As Figure 5 shown, the control flow generation device 50 includes: a determination module 501, an acquisition module 502, and a control module 503, where:

[0158] The determination module 501 is configured to determine a transformation requirement according to the new intelligent device when detecting that a new intelligent device is added to the home intelligent device list;

[0159] The acquisition module 502 is configured to parse the transformation requirement, obtain the information to be transformed, and the assembly rules corresponding to the information to be transformed, where the information to be transformed includes a trigger condition, a target device, and a target operation;

[0160] The control module 503 is configured to map the information to be transformed to the corresponding target module based on the module library, and splice the target modules according to the assembly rules to obtain the corresponding target control flow, where the target modules include a trigger condition module, a device control module, and an operation execution module;

[0161] The control module 503 is further configured to perform encapsulation processing on the target control flow and send the encapsulated target control flow to the target device.

[0162] In a possible implementation, the control module 503 is further configured to:

[0163] For each target content in the information to be converted, query in the module library whether there is a target module corresponding to the target content;

[0164] If it exists, call the target module from the module library;

[0165] If it does not exist, generate a corresponding target module according to the target content, and add the target module corresponding to the target content to the module library.

[0166] In a possible implementation, the control module 503 is further configured to:

[0167] Determine the information type corresponding to the target content, and extract keywords from the target content;

[0168] Query the module library based on the information type and the keywords, and determine whether there is a corresponding reference module in the module library;

[0169] If it exists, adjust the reference module based on the target content to obtain a corresponding target module;

[0170] If it does not exist, generate a target module corresponding to the target content according to the preset module creation rules.

[0171] In a possible implementation, the determination module 501 is further configured to:

[0172] Determine whether there is a linkage device in the home intelligent device list that is in the linkage process with the new intelligent device;

[0173] If it exists, determine the linkage rule between the linkage device and the new intelligent device, and the local control rule of the new intelligent device;

[0174] If it does not exist, determine the local control rule of the new intelligent device;

[0175] Generate a corresponding conversion requirement according to the local control rule and / or the linkage rule.

[0176] In a possible implementation, the determination module 501 is further configured to:

[0177] Obtain the first linkage step of the new intelligent device in the linkage process, and the second linkage step of the linkage device in the linkage process;

[0178] Determine whether there is a reference device in the list of home intelligent devices that has the same function as the new intelligent device;

[0179] If there is, obtain the reference linkage rule between the reference device and the linkage device, and determine the adapted linkage rule from the reference linkage rule based on the first linkage step and the second linkage step;

[0180] If not, analyze the step relationship between the first linkage step and the second linkage step based on the functional characteristics of the new intelligent device and the linkage device, and determine the adapted linkage rule according to the analysis result.

[0181] In a possible implementation manner, the determining module 501 is further configured to:

[0182] When receiving the replacement requirement of the intelligent device, determine the device to be replaced and the replacement device based on the replacement requirement;

[0183] Determine the linkage rule associated with the device to be replaced, and retrieve the corresponding control flow to be adjusted from the control flow library;

[0184] Update the control flow to be adjusted based on the replacement device, and send down the updated control flow to be adjusted.

[0185] In a possible implementation manner, the determining module 501 is further configured to:

[0186] Identify the control flow to be adjusted to obtain multiple modules and the corresponding assembly rules;

[0187] Analyze the functional characteristics of the replacement device based on the linkage rule, and determine the module to be adjusted and the corresponding adjustment content from the multiple modules according to the analysis result;

[0188] Update the module to be adjusted according to the adjustment content, and perform assembly processing according to the assembly rules to obtain the updated control flow to be adjusted.

[0189] A control flow generation device provided in this embodiment can execute the control flow generation method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be elaborated here in this embodiment.

[0190] Figure 6 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application. As Figure 6 shown, the electronic device 60 includes: a processor 601, and a memory 602 communicatively connected to the processor 601. Optionally, the electronic device 60 further includes a communication component 603. The processor 601, the memory 602, and the communication component 603 are connected through a bus 604. Among them:

[0191] The memory 602 stores computer-executable instructions;

[0192] The processor 601 executes the computer-executable instructions stored in the memory 602 to implement the control flow generation method as described above.

[0193] Wherein, at least one processor 601 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.

[0194] Optionally, in a specific implementation, if the processor 601 and the memory 602 are implemented independently, the processor 601 and the memory 602 may be interconnected through a bus and communicate with each other. The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc., but it does not mean that there is only one bus or one type of bus.

[0195] Optionally, in a specific implementation, if the processor 601 and the memory 602 are integrated on a chip, the processor 601 and the memory 602 may communicate through an internal interface.

[0196] The present application also provides a computer storage medium, in which computer-executable instructions are stored. When the processor executes the computer-executable instructions, the technical solution of the foregoing control flow generation method is implemented.

[0197] The above computer-readable storage medium may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (SRAM), an electrically erasable programmable read-only memory (EEPROM), an erasable programmable read-only memory (EPROM), a programmable read-only memory (PROM), a read-only memory (ROM), a magnetic memory, a flash memory, a magnetic disk or an optical disc. The computer-readable storage medium may be any available medium accessible by a general-purpose or special-purpose computer.

[0198] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an Application Specific Integrated Circuits (ASIC). Of course, the processor and the readable storage medium can also exist as discrete components in the control device of a laundry treatment apparatus.

[0199] The division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the couplings or direct couplings or communication connections shown or discussed among each other can be indirect couplings or communication connections through some interfaces, devices or units, and can be in electrical, mechanical or other forms.

[0200] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0201] Furthermore, in each embodiment of the present invention, the functional units can be integrated in a processing unit, or each unit can physically exist alone, or two or more units can be integrated in one unit.

[0202] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROM, Read-Only Memory), random access memories (RAM, Random Access Memory), magnetic disks, or optical discs.

[0203] Those of ordinary skill in the art can understand that all or part of the steps to implement the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including those of the above method embodiments; and the foregoing storage medium includes: various media such as ROM, RAM, magnetic disk, or optical disk that can store program codes.

[0204] So far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some or all of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A control flow generation method, characterized in that, The method includes: When a new intelligent device is added to the detected list of home intelligent devices, determining a transformation requirement according to the new intelligent device; Analyzing the transformation requirement to obtain the information to be transformed and the assembly rule corresponding to the information to be transformed, where the information to be transformed includes a trigger condition, a target device, and a target operation; Based on a module library, mapping the information to be transformed to corresponding target modules, and splicing the target modules according to the assembly rule to obtain a corresponding target control flow, where the target modules include a trigger condition module, a device control module, and an operation execution module; Performing encapsulation processing on the target control flow and sending the encapsulated target control flow to the target device.

2. The method according to claim 1, wherein The mapping of the information to be transformed to corresponding target modules based on the module library includes: For each target content in the information to be transformed, querying in the module library whether there is a target module corresponding to the target content; If there is, calling the target module from the module library; If not, generating a corresponding target module according to the target content and adding the target module corresponding to the target content to the module library.

3. The method according to claim 2, wherein The generating of the corresponding target module according to the target content includes: Determining the information type corresponding to the target content and extracting keywords from the target content; Querying the module library based on the information type and the keywords and determining whether there is a corresponding reference module in the module library; If there is, adjusting the reference module based on the target content to obtain a corresponding target module; If not, generating a target module corresponding to the target content according to a preset module creation rule.

4. The method according to any one of claims 1 to 3, characterized in that, The determining of the transformation requirement according to the new intelligent device includes: Determining whether there is a linked device in the list of home intelligent devices that is in a linked process with the new intelligent device; If there is, determining the linkage rule between the linked device and the new intelligent device and the local control rule of the new intelligent device; If not, determining the local control rule of the new intelligent device; Generating a corresponding transformation requirement according to the local control rule and / or the linkage rule.

5. The method according to claim 4, wherein The determining of the linkage rule between the linked device and the new intelligent device includes: Obtaining a first linkage step of the new intelligent device in the linked process and a second linkage step of the linked device in the linked process; Determining whether there is a reference device with the same function as the new intelligent device in the list of home intelligent devices; If there is, obtaining the reference linkage rule between the reference device and the linked device and determining an adapted linkage rule from the reference linkage rule based on the first linkage step and the second linkage step; If not, analyzing the step relationship between the first linkage step and the second linkage step based on the functional characteristics of the new intelligent device and the linked device and determining an adapted linkage rule according to the analysis result.

6. The method according to claim 1, characterized in that, The method further includes: When receiving the replacement requirement of the intelligent device, determine the device to be replaced and the replacement device based on the replacement requirement; Determine the linkage rule associated with the device to be replaced, and retrieve the corresponding control flow to be adjusted from the control flow library; Based on the replacement device, update the control flow to be adjusted, and issue the updated control flow to be adjusted.

7. The method according to claim 6, wherein The updating the control flow to be adjusted based on the replacement device includes: Identify the control flow to be adjusted to obtain multiple modules and corresponding assembly rules; Based on the linkage rule, analyze the functional characteristics of the replacement device, and determine the module to be adjusted and the corresponding adjustment content from multiple modules according to the analysis result; Update the module to be adjusted according to the adjustment content, and perform assembly processing according to the assembly rule to obtain the updated control flow to be adjusted.

8. A control flow generation device, characterized in that, including: A determination module, an acquisition module, and a control module, where: The determination module is configured to determine the conversion requirement according to the new intelligent device when detecting that a new intelligent device is added to the home intelligent device list; The acquisition module is configured to parse the conversion requirement, obtain the information to be converted, and the assembly rule corresponding to the information to be converted, where the information to be converted includes a trigger condition, a target device, and a target operation; The control module is configured to map the information to be converted to the corresponding target module based on the module library, and splice the target modules according to the assembly rule to obtain the corresponding target control flow, where the target module includes a trigger condition module, a device control module, and an operation execution module; The control module is further configured to perform encapsulation processing on the target control flow, and issue the encapsulated target control flow to the target device.

9. An electronic device, characterized in that, including: A processor and a memory communicatively connected to the processor; The memory stores computer execution instructions; The processor executes the computer execution instructions stored in the memory to implement the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Computer execution instructions are stored in the computer-readable storage medium, and when the computer execution instructions are executed by the processor, they are used to implement the control flow generation method according to any one of claims 1 to 7.