Scene execution method and system, electronic equipment and storage medium

By using fuzzy logic to handle scene conflicts in smart home systems, and by using fuzzy membership and execution priority to select target scenes, the problem of scene execution results deviating from user expectations is solved, and automated execution in dynamic scenes is achieved.

CN121069804APending Publication Date: 2025-12-05GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1

Patent Information

Application Number
CN202511027799.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-24
Publication Date
2025-12-05

AI Technical Summary

Technical Problem

In smart home systems, when the triggering conditions of multiple scene modes are met, handling conflicts between scenes based on linkage rules may lead to execution results deviating from user expectations.

Method used

Fuzzy logic is used to handle scene conflicts. By determining the fuzzy membership degree between the current triggering parameter and the scene, the execution priority is calculated, the target scene is selected, and execution is performed.

Benefits of technology

It effectively avoids the problem of precise matching failing to adapt to dynamic scenarios, resulting in execution results deviating from user intent, and achieves automated execution in dynamic scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121069804A_ABST
    Figure CN121069804A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a scene execution method and system, electronic equipment and a storage medium, and the method comprises the steps: determining a current triggering parameter, and determining a first fuzzy membership degree of the current triggering parameter and a mode triggering condition of a conflict scene with an execution conflict; according to the first fuzzy membership degree, determining an execution priority of the conflict scene; and according to the execution priority, determining a target scene from the plurality of conflict scenes, and executing the target scene. Through the embodiment of the invention, the conflict of the scene can be eliminated based on the fuzzy logic, so that the problems that the execution result deviates from the user intention due to the fact that accurate matching is difficult to adapt to the actual scene, and automatic execution in the dynamic scene is met are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of smart homes, and in particular to a method, system, electronic device, and storage medium for executing a scene. Background Technology

[0002] In a smart home system, multiple scenes can be set up; each scene can correspond to mode triggering conditions and execution actions. When at least two scenes are triggered because their mode triggering conditions are met, and their execution actions conflict, the linkage rules can be traversed to resolve the conflict between scenes. However, handling conflicts between scenes based on linkage rules may result in execution results that do not meet user expectations. Summary of the Invention

[0003] In view of the above problems, a method, system, electronic device, and storage medium for performing a scenario that overcomes or at least partially solves the above problems are proposed, including:

[0004] An execution method for a scenario, the method comprising:

[0005] Determine the current triggering parameters, and determine the first fuzzy membership degree between the current triggering parameters and the mode triggering conditions of the conflict scenario where there is an execution conflict;

[0006] Determine the current triggering parameters, and determine the first fuzzy membership degree between the current triggering parameters and the mode triggering conditions of the conflict scenario where there is an execution conflict;

[0007] Based on the first fuzzy membership degree, the execution priority of the conflict scenario is determined;

[0008] Based on the execution priority, a target scenario is determined from multiple conflict scenarios, and the target scenario is executed.

[0009] Optionally, the method further includes:

[0010] Determine the second fuzzy membership degree between the current triggering parameter and the mode triggering conditions of each scene, and determine the third fuzzy membership degree of each scene based on the second fuzzy membership degree;

[0011] Based on the third fuzzy membership degree, determine whether there are scene execution conflicts between different scenes.

[0012] Optionally, determining whether there is a scene execution conflict between different scenes based on the third fuzzy membership degree includes:

[0013] For any two scenarios, determine the smaller third fuzzy membership degree from the corresponding third fuzzy membership degrees;

[0014] When the third fuzzy membership value is smaller than the first preset value, it is determined that there is a scene execution conflict between the two scenes.

[0015] When the third fuzzy membership value is not smaller than the first preset value, it is determined that there is no scene execution conflict between the two scenes.

[0016] Optionally, the method further comprises:

[0017] Collecting the mode trigger conditions of the respective scenes, and clustering the mode trigger conditions of the respective scenes to obtain a plurality of membership functions;

[0018] The determining of the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scene with the execution conflict comprises:

[0019] According to the membership function, the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scene with the execution conflict is determined.

[0020] Optionally, after the target scene is executed, the method further comprises:

[0021] In the case that there is an intervention operation for the target scene, a fuzzy entropy is determined based on the second fuzzy membership corresponding to each scene;

[0022] The membership function is adjusted according to the fuzzy entropy.

[0023] Optionally, the method further comprises:

[0024] For at least two scenes without a scene execution conflict, a feature vector distance of the at least two scenes is calculated;

[0025] When the feature vector distance is smaller than a second preset value, the at least two scenes are merged.

[0026] Optionally, the method further comprises:

[0027] According to the execution priority of each conflict scene, other conflict scenes except the target scene are sorted;

[0028] According to the sorting, the execution of other conflict scenes except the target scene is delayed.

[0029] Embodiments of the present application also provide an intelligent home system, the system comprising:

[0030] A conflict detection module is configured to determine a current trigger parameter, and determine a first fuzzy membership of the current trigger parameter and a mode trigger condition of a conflict scene with an execution conflict;

[0031] a fuzzy inference engine configured to determine an execution priority of the conflict scenario according to the first fuzzy membership degree, and determine a target scenario from the plurality of conflict scenarios according to the execution priority;

[0032] a scenario execution module configured to execute the target scenario.

[0033] Optionally, the conflict detection module is further configured to determine a second fuzzy membership degree of the current trigger parameter and a pattern trigger condition of each scenario, and determine a third fuzzy membership degree of each scenario according to the second fuzzy membership degree, and determine whether there is a scenario execution conflict between each scenario according to the third fuzzy membership degree.

[0034] Optionally, the system further comprises:

[0035] a scenario trigger monitoring module configured to detect a trigger of a scenario;

[0036] a fuzzy rule generation library configured to collect a pattern trigger condition of each scenario, cluster the pattern trigger condition of each scenario to obtain a plurality of membership functions, and store the plurality of membership functions in the fuzzy rule library;

[0037] a scenario rule database configured to store the pattern trigger condition of each scenario;

[0038] a feedback and optimization module configured to determine a fuzzy entropy based on the second fuzzy membership degree corresponding to each scenario in a case where there is an intervention operation for the target scenario, and adjust the membership function in the fuzzy rule library according to the fuzzy entropy.

[0039] The embodiment of the present application further provides an electronic device, including a processor, a memory, and a computer program stored in the memory and capable of running on the processor, and the computer program is executed by the processor to implement the scenario execution method.

[0040] The embodiment of the present application further provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the scenario execution method.

[0041] The embodiment of the present application has the following advantages:

[0042] In the embodiment of the present application, the current trigger parameter is determined, and the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene where the execution conflict exists is determined; the execution priority of the conflict scene is determined according to the first fuzzy membership degree; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed. Through the embodiment of the present application, the conflict of the scene can be resolved based on fuzzy logic, so as to avoid the problem that the execution result deviates from the user's intention because the precise matching is difficult to adapt to the actual scene, and to meet the problem of automatic execution in the dynamic scene. BRIEF DESCRIPTION OF DRAWINGS

[0043] In order to more clearly illustrate the technical solutions of the present application, the following will briefly introduce the drawings needed to be used in the description of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.

[0044] Figure 1 is a step flow chart of a scene execution method according to an embodiment of the present application;

[0045] Figure 2 is a step flow chart of another scene execution method according to an embodiment of the present application;

[0046] Figure 3 is a step flow chart of another scene execution method according to an embodiment of the present application;

[0047] Figure 4 is a step flow chart of another scene execution method according to an embodiment of the present application;

[0048] Figure 5a is a step flow chart of another scene execution method according to an embodiment of the present application;

[0049] Figure 5b is a step flow chart of a scene execution according to an embodiment of the present application;

[0050] Figure 6 is a structural schematic diagram of an intelligent home system according to an embodiment of the present application;

[0051] Figure 7 is a structural schematic diagram of another intelligent home system according to an embodiment of the present application. DETAILED DESCRIPTION

[0052] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0053] In related technologies, conflicts between smart home scenarios can be handled through control methods based on linkage rules or through manual user intervention.

[0054] For example, when the home host executes the "dinner scene" (turn on the restaurant lights and play background music) and the "energy-saving scene" (turn off the lights), if the two scenes are triggered at the same time, the home host usually resolves the conflict by traversing the linkage rules or by the user making manual adjustments.

[0055] However, relying on manual user adjustments wastes user time; while methods that resolve conflicts by traversing preset linkage rules suffer from the fuzzy and dynamic nature of mode triggering conditions (such as time, user location, and light intensity) (e.g., a user approaches the restaurant but hasn't fully entered), making precise matching of linkage rules difficult to adapt to real-world scenarios. This leads to execution results deviating from user intent, thus failing to meet the needs of automated execution in dynamic scenarios. To address this, this invention provides a scenario execution method that can resolve scenario conflicts based on fuzzy logic. For example, refer to... Figure 1 The diagram illustrates a flowchart of the execution method for a scenario according to an embodiment of the present invention.

[0056] like Figure 1 As shown, the execution method for this scenario may include the following steps:

[0057] Step 101: Determine the current triggering parameters and determine the first fuzzy membership degree between the current triggering parameters and the mode triggering conditions of the conflict scenario where there is an execution conflict.

[0058] In some embodiments, when a scenario execution conflict is detected, the mode triggering conditions corresponding to each scenario currently having an execution conflict (hereinafter referred to as a conflict scenario for ease of distinction) can be determined first.

[0059] If the execution actions between scenarios are opposite and the execution times of the actions overlap, then the scenarios can be determined to have execution conflicts; in this case, these scenarios with execution conflicts can be regarded as conflict scenarios.

[0060] The trigger condition can refer to the conditions that the corresponding action of the triggering scenario must meet; when the trigger condition is met, the corresponding action of the scenario begins to be executed.

[0061] For example, the scenario is a dinner scenario; the mode trigger condition is 18:00 and the user is in the dining room, and the execution action is to turn on the dining room lights and play background music. When it is detected that the time is 18:00 and the user is in the dining room, it is determined that the mode trigger condition of the dinner scenario is met, and the execution action of the dinner scenario, that is, turning on the dining room lights and playing background music, is executed.

[0062] After determining the mode trigger conditions corresponding to the conflict scenarios, the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scenario with execution conflict can be determined based on a fuzzy C-means clustering algorithm. The first fuzzy membership is used to describe the degree to which a current trigger parameter belongs to a certain mode trigger condition. The first fuzzy membership can take a value between 0 and 1. The closer the first fuzzy membership is to 1, the more the current trigger parameter belongs to the mode trigger condition.

[0063] The current trigger parameter can refer to the parameters of the current environment and the user, such as the current time, the distance of the current user from the dining room, the intensity of the ambient light, and the like. It can be detected based on various sensors, detection devices, systems, and the like, and the embodiments of the present application do not limit this.

[0064] Step 102, determining the execution priority of the conflict scenario according to the first fuzzy membership.

[0065] In some embodiments, the current trigger parameter can include multiple parameters. Therefore, the first fuzzy membership of different mode trigger conditions corresponding to each trigger parameter can be determined respectively.

[0066] After determining the first fuzzy membership of each trigger parameter corresponding to different mode trigger conditions, the execution priority of each conflict scenario can be determined based on the first fuzzy membership. That is, based on the first fuzzy membership, it is determined which conflict scenario should be triggered by the current trigger parameter.

[0067] Step 103, determining a target scenario from the multiple conflict scenarios according to the execution priority, and executing the target scenario.

[0068] After determining the execution priority, the target scenario that should be executed at present can be determined from the multiple conflict scenarios based on the execution priority, and the execution action corresponding to the target scenario is executed. For example:

[0069] If it is determined that the target scenario is a dinner scenario, the dining room lights can be turned on and background music can be played, and the embodiments of the present application do not limit this.

[0070] In the embodiment of the present application, the current trigger parameter is determined, and the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene existing execution conflict is determined; the execution priority of the conflict scene is determined according to the first fuzzy membership degree; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed. Through the embodiment of the present application, the conflict of the scene can be resolved based on fuzzy logic, so as to avoid the problem that the execution result deviates from the user's intention because the precise matching is difficult to adapt to the actual scene, and to meet the automatic execution in the dynamic scene and the like.

[0071] Referring to Figure 2 , a step flow chart of another scene execution method of the embodiment of the present application can include the following steps:

[0072] Step 201, the second fuzzy membership degree of the current trigger parameter and the mode trigger condition of each scene is determined, and the third fuzzy membership degree of each scene is determined according to the second fuzzy membership degree.

[0073] In some feasible embodiments, the current trigger parameter can be determined first; then, the second fuzzy membership degree of the current trigger parameter and the mode trigger condition of each scene can be determined; the second fuzzy membership degree is used to describe the degree of a current trigger parameter belonging to a certain mode trigger condition, the second fuzzy membership degree can take a value between 0 and 1, and the closer the second fuzzy membership degree is to 1, the more the current trigger parameter belongs to the mode trigger condition.

[0074] After the second fuzzy membership degree is determined, a third fuzzy membership degree of each scene can be determined based on the second fuzzy membership degrees, and the third fuzzy membership degree can be used to represent the relationship degree of the current trigger parameter and each scene, and the greater the value, the more likely the current trigger parameter triggers the corresponding scene.

[0075] Step 202, whether there is a scene execution conflict between each scene is judged according to the third fuzzy membership degree.

[0076] After the third fuzzy membership degree of each scene is determined, whether there is a scene execution conflict between each scene can be judged based on the third fuzzy membership degree.

[0077] For example, whether there is a scene execution conflict between scenes can be judged for scenes existing conflict in execution action; whether there is a scene execution conflict between scenes can also be judged for scenes existing conflict in execution action and similar execution time, and the embodiment of the present application does not limit this.

[0078] Step 203, the current trigger parameter is determined, and the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene existing execution conflict is determined.

[0079] In some embodiments, in case of detecting that there is a scenario execution conflict, it can be determined first that each scenario (hereinafter referred to as a conflict scenario for the sake of convenience of distinguishing) currently existing and having an execution conflict corresponds to a mode trigger condition.

[0080] Wherein, if the execution actions between scenarios are opposite and the execution time of the execution actions overlaps, it can be determined that the scenarios exist an execution conflict; at this time, the several scenarios existing an execution conflict can be taken as conflict scenarios.

[0081] After determining the mode trigger condition corresponding to each conflict scenario, the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scenario existing an execution conflict can be determined based on a fuzzy C-means clustering algorithm.

[0082] Step 204, determining the execution priority of the conflict scenario according to the first fuzzy membership.

[0083] In some embodiments, the current trigger parameter can include multiple; therefore, the first fuzzy membership corresponding to different mode trigger conditions can be determined respectively for each trigger parameter.

[0084] After determining the first fuzzy membership corresponding to different mode trigger conditions for each trigger parameter, the execution priority of each conflict scenario can be determined based on the first fuzzy membership; that is, based on the first fuzzy membership, it is determined which conflict scenario is most likely to be triggered to execute by the current trigger parameter.

[0085] Step 205, determining a target scenario from the multiple conflict scenarios according to the execution priority, and executing the target scenario.

[0086] After determining the execution priority, the target scenario currently should be executed can be determined from the multiple conflict scenarios based on the execution priority, and the execution action corresponding to the target scenario is executed.

[0087] In some feasible embodiments, the scenarios other than the target scenario in the conflict scenarios can be processed with a delay or cancelled, and the embodiments of the present application do not limit this.

[0088] In the embodiment of the present application, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene are determined, and the third fuzzy membership degrees of each scene are determined according to the second fuzzy membership degrees; whether there is a scene execution conflict between each scene is judged according to the third fuzzy membership degrees; the current trigger parameter is determined, and the first fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the conflict scenes with the execution conflict are determined; the execution priority of the conflict scenes is determined according to the first fuzzy membership degrees; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed. Through the embodiment of the present application, the conflict of the scene can be resolved based on fuzzy logic, so as to avoid the problem that the execution result deviates from the user's intention because the precise matching is difficult to adapt to the actual scene, and to meet the problem of automatic execution in the dynamic scene.

[0089] Reference Figure 3 The step flow chart of another scene execution method of the embodiment of the present application is shown, which can include the following steps:

[0090] Step 301, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene are determined, and the third fuzzy membership degrees of each scene are determined according to the second fuzzy membership degrees.

[0091] In some feasible embodiments, the current trigger parameter can be determined first; then, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene can be determined.

[0092] After the second fuzzy membership degrees are determined, a third fuzzy membership degree can be determined for each scene based on the second fuzzy membership degrees.

[0093] For example, for any one scene, the second fuzzy membership degree with the smallest value in the multiple second fuzzy membership degrees corresponding to the scene can be taken as the third fuzzy membership degree of the scene.

[0094] Step 302, for any two scenes, the third fuzzy membership degree with the smaller value is determined from the corresponding third fuzzy membership degrees.

[0095] After the third fuzzy membership degrees of each scene are determined, whether there is a scene execution conflict between each scene can be judged based on the third fuzzy membership degrees.

[0096] For example, for any two scenes, the third fuzzy membership degree with the smaller value can be determined from the third fuzzy membership degrees of the two scenes to judge whether there is a scene execution conflict between the two scenes.

[0097] Step 303, when the third fuzzy membership degree with the smaller value exceeds the first preset value, it is determined that there is a scene execution conflict between the two scenes.

[0098] In some possible embodiments, the first preset value can be set to determine whether there is a scene execution conflict between scenes; that is, when the current trigger parameter can trigger multiple scenes with a high probability, and the execution actions of the multiple scenes conflict, it can be determined that there is a scene execution conflict between scenes.

[0099] For example, it can be determined that one of the third fuzzy membership degrees of the two scenes is smaller, and the size relationship between the third fuzzy membership degree and the first preset value is determined.

[0100] If the third fuzzy membership degree is smaller than the first preset value, it can be determined that the current trigger parameter can trigger the two scenes with a high probability; if the execution actions of the two scenes further conflict, it can be determined that there is a scene execution conflict between the two scenes.

[0101] When the third fuzzy membership degree is smaller than the first preset value, it can be determined that there is no scene execution conflict between the two scenes.

[0102] Conversely, if the third fuzzy membership degree is smaller than the first preset value, it can be determined that the current trigger parameter can trigger only one of the two scenes with a high probability; at this time, it can be determined that there is no scene execution conflict between the two scenes.

[0103] Step 305: determining the current trigger parameter and determining the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene.

[0104] In some embodiments, when it is detected that there is a scene execution conflict, the mode trigger condition corresponding to each scene (hereinafter referred to as a conflict scene for the sake of convenience) currently having an execution conflict can be determined first.

[0105] If the execution actions of the scenes are opposite and the execution times of the execution actions overlap, it can be determined that the scenes have an execution conflict; at this time, the scenes having an execution conflict can be taken as conflict scenes.

[0106] After the mode trigger condition corresponding to each conflict scene is determined, the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene can be determined based on a fuzzy C-means clustering algorithm.

[0107] Step 306: determining the execution priority of the conflict scene according to the first fuzzy membership degree.

[0108] In some embodiments, the current trigger parameter can include multiple trigger parameters; therefore, the first fuzzy membership degree of the different mode trigger conditions can be determined for each trigger parameter.

[0109] After the first fuzzy membership degrees of each trigger parameter corresponding to different mode trigger conditions are determined, the execution priorities of the respective conflict scenes can be determined based on the first fuzzy membership degrees; that is, based on the first fuzzy membership degrees, it is determined which conflict scene the current trigger parameter is most likely to trigger to execute.

[0110] Step 307: determining a target scene from the multiple conflict scenes according to the execution priorities, and executing the target scene.

[0111] After the execution priorities are determined, the target scene that should be executed at present can be determined from the multiple conflict scenes based on the execution priorities, and the execution action corresponding to the target scene is executed.

[0112] In some feasible embodiments, the scenes other than the target scene in the conflict scenes can be processed with a delay or cancelled, and the embodiments of the present application do not limit this.

[0113] In the embodiments of the present application, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the respective scenes are determined, and the third fuzzy membership degrees of each scene are determined according to the second fuzzy membership degrees; for any two scenes, the third fuzzy membership degree with a smaller value is determined from the corresponding third fuzzy membership degrees; when the third fuzzy membership degree with a smaller value exceeds a first preset value, it is determined that there is a scene execution conflict between the two scenes; when the third fuzzy membership degree with a smaller value does not exceed the first preset value, it is determined that there is no scene execution conflict between the two scenes; the current trigger parameter is determined, and the first fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the conflict scenes with execution conflicts are determined; the execution priorities of the conflict scenes are determined according to the first fuzzy membership degrees; the target scene is determined from the multiple conflict scenes according to the execution priorities, and the target scene is executed. Through the embodiments of the present application, the conflict of the scenes can be resolved based on fuzzy logic, so as to avoid the problem that the execution result deviates from the user's intention because the precise matching is difficult to adapt to the actual scene, and to meet the problem of automatic execution in dynamic scenes.

[0114] Referring to Figure 4 , a step flowchart of another scene execution method according to an embodiment of the present application can include the following steps:

[0115] Step 401: determining the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the respective scenes, and determining the third fuzzy membership degrees of each scene according to the second fuzzy membership degrees.

[0116] In some feasible embodiments, the current trigger parameter can be determined first; then, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the respective scenes can be determined.

[0117] After the second fuzzy membership degree is determined, for any one scene, the second fuzzy membership degree with the smallest value among the second fuzzy membership degrees corresponding to the scene can be taken as the third fuzzy membership degree of the scene.

[0118] In an embodiment of the present application, the method can further include the following steps:

[0119] The mode trigger conditions of the scenes are collected, and the mode trigger conditions of the scenes are clustered to obtain the plurality of membership functions.

[0120] In some possible embodiments, the mode trigger conditions of the scenes can be collected in advance, and the mode trigger conditions of the scenes are clustered based on a fuzzy C-means clustering algorithm to obtain the plurality of membership functions.

[0121] For example, time close to 18:00 can be divided into "very close (17:50-18:10)", "slightly far (18:10-18:30)", and "far away (greater than 18:30)", and a triangular membership function is used;

[0122] The light intensity is divided into "dark (0-100 lux)", "moderate (100-200 lux)", and "bright (greater than 200 lux)", and a Gaussian membership function is used.

[0123] After the membership functions are obtained, the second fuzzy membership degrees of each current trigger parameter and the mode trigger conditions of the scenes can be determined based on the membership functions.

[0124] Step 402, for any two scenes, the third fuzzy membership degree with a smaller value is determined from the corresponding third fuzzy membership degrees.

[0125] After the third fuzzy membership degrees of the scenes are determined, for any two scenes, a third fuzzy membership degree with a smaller value can be determined from the third fuzzy membership degrees of the two scenes to determine whether there is a scene execution conflict between the two scenes.

[0126] Step 403, when the third fuzzy membership degree with a smaller value exceeds a first preset value, it is determined that there is a scene execution conflict between the two scenes.

[0127] In some possible embodiments, the first preset value can be set to determine whether there is a scene execution conflict between the scenes; that is, when the current trigger parameter can trigger a plurality of scenes with a high probability, and the execution actions of the plurality of scenes conflict, it can be determined that there is a scene execution conflict between the scenes.

[0128] For example, the size relationship between the third fuzzy membership degree with a smaller value and the first preset value can be determined.

[0129] If the third fuzzy membership value is smaller than the first preset value, it can be determined that the current trigger parameter is likely to trigger both of the two scenes; if the execution actions of the two scenes are further in conflict, it can be determined that there is a scene execution conflict between the two scenes.

[0130] Step 404: When the third fuzzy membership value is smaller than the first preset value, it is determined that there is no scene execution conflict between the two scenes.

[0131] Conversely, if the third fuzzy membership value is smaller than the first preset value, it can be determined that the current trigger parameter will at most only trigger one of the two scenes with a high probability; at this time, it can be determined that there is no scene execution conflict between the two scenes.

[0132] Step 405: According to the membership function, the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scene with the execution conflict is determined.

[0133] In some possible embodiments, the first fuzzy membership can also be determined based on the membership function; in fact, the first fuzzy membership is the second fuzzy membership of the conflict scene with the execution conflict.

[0134] Step 406: According to the first fuzzy membership, the execution priority of the conflict scene is determined.

[0135] In some embodiments, the current trigger parameter can include multiple trigger parameters; therefore, the first fuzzy membership corresponding to different mode trigger conditions can be determined for each trigger parameter respectively.

[0136] After determining the first fuzzy membership of each trigger parameter corresponding to different mode trigger conditions, the execution priority of each conflict scene can be determined based on the first fuzzy membership; that is, based on the first fuzzy membership, it is determined which conflict scene should be triggered by the current trigger parameter to execute.

[0137] Step 407: According to the execution priority, a target scene is determined from the multiple conflict scenes, and the target scene is executed.

[0138] After determining the execution priority, the target scene that should be executed at present can be determined from the multiple conflict scenes based on the execution priority, and the execution action corresponding to the target scene is executed. For example:

[0139] If it is determined that the target scene is the dinner scene, the restaurant lights can be turned on, and background music can be played, which is not limited by the embodiments of the present application.

[0140] In the embodiment of the present application, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene are determined, and the third fuzzy membership degrees of each scene are determined according to the second fuzzy membership degrees; for any two scenes, the third fuzzy membership degree with a smaller value is determined from the corresponding third fuzzy membership degrees; when the third fuzzy membership degree with a smaller value exceeds a first preset value, it is determined that there is a scene execution conflict between the two scenes; when the third fuzzy membership degree with a smaller value does not exceed the first preset value, it is determined that there is no scene execution conflict between the two scenes; the first fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of the conflict scenes with the execution conflict are determined according to the membership functions; the execution priority of the conflict scenes is determined according to the first fuzzy membership degrees; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed. Through the embodiment of the present application, the conflict of the scenes can be resolved based on fuzzy logic, so that the problem that the execution result deviates from the user's intention due to the difficulty in adapting to the actual scene by accurate matching can be avoided, and the problem of satisfying the automatic execution in the dynamic scene can be solved.

[0141] Reference Figure 5a Another scene execution method according to an embodiment of the present application is shown in the step flowchart, which can include the following steps:

[0142] Step 501, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene are determined, and the third fuzzy membership degrees of each scene are determined according to the second fuzzy membership degrees.

[0143] In some feasible embodiments, the current trigger parameter can be determined first; then, the second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene can be determined.

[0144] After the second fuzzy membership degrees are determined, for any one scene, the second fuzzy membership degree with the smallest value in the multiple second fuzzy membership degrees corresponding to the scene can be taken as the third fuzzy membership degree of the scene.

[0145] In some feasible embodiments, the mode trigger conditions of each scene can be collected in advance, and the mode trigger conditions of the scenes can be clustered based on the fuzzy C-means clustering algorithm, so as to obtain multiple membership functions.

[0146] After the membership functions are obtained, the second fuzzy membership degrees of each current trigger parameter and the mode trigger conditions of each scene can be determined based on the membership functions.

[0147] Step 502, for any two scenes, the third fuzzy membership degree with a smaller value is determined from the corresponding third fuzzy membership degrees.

[0148] After determining the third fuzzy membership degrees of the respective scenes, for any two scenes, a third fuzzy membership degree with a smaller value can be determined from the third fuzzy membership degrees of the two scenes to determine whether there is a scene execution conflict between the two scenes.

[0149] Step 503, when the third fuzzy membership degree with a smaller value exceeds the first preset value, it is determined that there is a scene execution conflict between the two scenes.

[0150] In some possible embodiments, the first preset value can be set to determine whether there is a scene execution conflict between scenes; that is, when the current trigger parameter is likely to trigger multiple scenes with a high probability, and the execution actions of the multiple scenes conflict, it can be determined that there is a scene execution conflict between the scenes.

[0151] For example, the third fuzzy membership degrees of the two scenes can be determined, and the size relationship between the third fuzzy membership degree with a smaller value and the first preset value can be determined.

[0152] If the third fuzzy membership degree with a smaller value exceeds the first preset value, it can be determined that the current trigger parameter is likely to trigger the two scenes with a high probability; if further the execution actions of the two scenes conflict, it can be determined that there is a scene execution conflict between the two scenes.

[0153] Step 504, when the third fuzzy membership degree with a smaller value does not exceed the first preset value, it is determined that there is no scene execution conflict between the two scenes.

[0154] Conversely, if the third fuzzy membership degree with a smaller value does not exceed the first preset value, it can be determined that the current trigger parameter will at most trigger only one scene with a high probability; at this time, it can be determined that there is no scene execution conflict between the two scenes.

[0155] Step 505, determining a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene with an execution conflict according to a membership function.

[0156] In some possible embodiments, the first fuzzy membership degree can also be determined based on the membership function; in fact, the first fuzzy membership degree is the second fuzzy membership degree of the conflict scene with an execution conflict.

[0157] Step 506, determining an execution priority of the conflict scene according to the first fuzzy membership degree.

[0158] In some embodiments, the current trigger parameter can include multiple trigger parameters; therefore, the first fuzzy membership degree corresponding to different mode trigger conditions can be determined for each trigger parameter.

[0159] After determining the first fuzzy membership degrees of each trigger parameter corresponding to different mode trigger conditions, an execution priority of each conflict scene can be determined based on the first fuzzy membership degrees; that is, based on the first fuzzy membership degrees, it is determined which conflict scene the current trigger parameter should trigger to execute.

[0160] Step 507: According to the execution priority, a target scene is determined from the multiple conflict scenes, and the target scene is executed.

[0161] After determining the execution priority, a target scene that should be executed at present can be determined from the multiple conflict scenes based on the execution priority, and an execution action corresponding to the target scene is executed. For example:

[0162] If the target scene is determined to be the dinner scene, the restaurant lights can be turned on, and background music can be played, which is not limited in the embodiments of the present application.

[0163] Step 508: After executing the target scene, if there is an intervention operation for the target scene, a fuzzy entropy is determined based on the second fuzzy membership degrees corresponding to each scene.

[0164] After executing the target scene, if the target scene is a scene that the user expects to execute, the user will not perform an intervention operation; on the contrary, if the target scene is not considered to be a scene that the user expects to execute, the user will perform an intervention operation for the target scene.

[0165] For example, the target scene is the energy-saving scene, and the execution action is to turn off all the lights; however, after executing the execution action of the target scene, the user immediately turns on the restaurant lights, which can be determined as an intervention operation for the target scene.

[0166] After detecting that the target scene is executed, if there is an intervention operation for the target scene, a fuzzy entropy can be determined based on the second fuzzy membership degrees corresponding to each scene.

[0167] Step 509: The membership function is adjusted according to the fuzzy entropy.

[0168] Then, the membership function can be adjusted based on the fuzzy entropy, and the membership function is dynamically adjusted by combining the fuzzy entropy and the closed-loop feedback mechanism, so that self-adaptive conflict resolution is realized, and the limitations of the preset strategy generation rule are overcome.

[0169] In an embodiment of the present application, the execution method of any one of the above scenes can further include the following steps:

[0170] For at least two scenes in which there is no scene execution conflict, a feature vector distance of the at least two scenes is calculated; when the feature vector distance is less than a second preset value, the at least two scenes are merged.

[0171] In some possible embodiments, when there are at least two scenes in conflict with the non-existing scene, a feature vector distance of the at least two scenes can be calculated; the feature vector distance can be calculated based on the mode trigger condition of the two scenes. For example, the execution action of the at least two scenes can be the same.

[0172] In an embodiment of the present application, the execution method of any one of the scenes can further include the following steps:

[0173] The scenes other than the target scene are sorted according to the execution priority of each conflict scene; and the scenes other than the target scene are executed in sequence.

[0174] In some possible embodiments, the scenes other than the target scene can also be sorted according to the execution priority of each conflict scene. After the target scene is executed, the scenes other than the target scene can be executed in sequence according to the sorting to ensure the execution of each scene.

[0175] In an embodiment of the present application, the second fuzzy membership of the current trigger parameter and the mode trigger condition of each scene is determined, and the third fuzzy membership of each scene is determined according to the second fuzzy membership; for any two scenes, the third fuzzy membership with a smaller value is determined from the corresponding third fuzzy membership; when the third fuzzy membership with a smaller value exceeds a first preset value, it is determined that there is a scene execution conflict between the two scenes; when the third fuzzy membership with a smaller value does not exceed the first preset value, it is determined that there is no scene execution conflict between the two scenes; the first fuzzy membership of the current trigger parameter and the mode trigger condition of the conflict scene with the execution conflict is determined according to the membership function; the execution priority of the conflict scene is determined according to the first fuzzy membership; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed; after the target scene is executed, the fuzzy entropy is determined based on the second fuzzy membership of each scene in the case of intervention operation for the target scene; and the membership function is adjusted according to the fuzzy entropy. Through the embodiment of the present application, the conflict of the scene can be resolved based on fuzzy logic, so as to avoid the deviation of the execution result from the user's intention due to the difficulty in adapting to the actual scene by precise matching, and to solve the problem of meeting the automatic execution in the dynamic scene.

[0176] In addition, the membership function is dynamically adjusted in combination with the fuzzy entropy and the closed-loop feedback mechanism, so as to realize adaptive conflict resolution and overcome the limitation of the preset strategy generation rule.

[0177] For example, as shown in Figure 5b FIG. 1 shows a step flow diagram of a scene execution according to an embodiment of the present application;

[0178] The smart home system can include a home host, which can be used to execute the following method:

[0179] The "dinner scene" (mode trigger condition: 18:00 and the user is in the dining room, action: turn on the dining room lights, play background music) and the "energy saving scene" (mode trigger condition: sufficient ambient light, action: turn off the lights) are managed. According to the above flowchart, the following is the specific process of running:

[0180] 1. Scene rule collection and modeling: First, the home host collects all the scene rules, records the mode trigger conditions and execution actions of each scene. For example, the mode trigger condition of the "dinner scene" is "the time is close to 18:00 and the user is in the dining room", and the execution action is "turn on the dining room lights and play background music"; the mode trigger condition of the "energy saving scene" is "the ambient light intensity is greater than 200 lux", and the execution action is "turn off all the lights". These rules are sorted into JSON format and stored in the scene rule database. Each rule contains a unique ID, mode trigger conditions (such as time, location, light), and execution actions (such as light switch, sound control), which can be quickly read and processed by the system.

[0181] 2. Fuzzy rule base construction: Analyze these rules and extract the features of the mode trigger conditions, such as time deviation, user distance in the dining room, light intensity, etc. Use fuzzy C-means clustering algorithm to divide these conditions into "high", "medium", and "low" intensity levels, and generate fuzzy variables. For example, time close to 18:00 can be divided into "very close (17:50-18:10)", "slightly far (18:10-18:30)", and "far away (more than 18:30)", using a triangular membership function; light intensity is divided into "dark (0-100 lux)", "medium (100-200 lux)", and "bright (more than 200 lux)", using a Gaussian membership function. Based on these variables, define fuzzy rules, such as: "if the time is very close to 18:00 and the user's location is in the dining room, then the priority of the dinner scene is high". The initial rule base contains dozens of rules, stored as key-value pairs, and supports extension.

[0182] 3. Conflict detection: Real-time monitoring of mode trigger conditions. The scene trigger monitoring module detects that the time is 18:03 (close to 18:00, membership degree 0.85), the user's distance from the dining room is 1.2 meters (in the dining room, membership degree 0.9), and the light intensity is 230 lux (bright, membership degree 0.8). The conflict detection module calculates the fuzzy membership degree and evaluates the conflict possibility based on fuzzy entropy:

[0183] Conflict possibility formula: P_conflict = max(μ_dinner ∩ μ_energy saving)

[0184] (μ is the membership degree, ∩ is the fuzzy intersection operation (taking the minimum value))

[0185] Calculation result: P_conflict = 0.85 (dinner scenario) ∩ 0.8 (energy saving scenario) = 0.8, exceeds threshold 0.5, conflict confirmed (light control conflict: on vs off).

[0186] 4. Fuzzy reasoning resolution: upon detecting conflict, fuzzy reasoning engine is initiated, processing based on weighted Mamdani inference model.

[0187] Input membership (dinner scenario 0.85, energy saving scenario 0.8), inference conducted in conjunction with fuzzy rule base. As per rule 1, dinner scenario priority is deduced as 0.85 (high), rule 2 deduces energy saving scenario priority as 0.8 (high). Considering user location is more important than lighting (in weighted Mamdani inference model, weight distribution is determined by pre-set rules, assigning 0.65 weight to dinner scenario rules and 0.35 weight to energy saving scenario. Inference result decides to execute dinner scenario (turn on lights, play background music) first, while lighting off action of energy saving scenario is delayed until conditions change (e.g. user leaves dining room).

[0188] 5. Scene execution: based on inference result, scene execution module sends instructions to immediately execute "dinner scenario", sending instructions to turn on dining room lights, play background music. Delay "energy saving scenario" lighting off action until lighting intensity remains >200 lux and user leaves dining room (location proximity <0.5). Instructions are sent through MQTT (Message Queuing Telemetry Transport) protocol interface of home hub.

[0189] 6. Feedback and optimization: feedback and optimization module records execution result: dinner scenario executed first, user did not manually adjust, indicating strategy is effective. If user feedbacks "lights turning on is unnecessary", module adjusts membership functions based on fuzzy entropy feedback:

[0190] Fuzzy entropy formula: H = -sum(μ_i*log(μ_i))

[0191] (μ_i is membership degree)

[0192] Optimization adjusts membership function range of "time close to 18:00" from [17:50, 18:10] to [17:55, 18:05], reducing entropy value. Adjusted rule base is stored back to database, providing more accurate basis for next conflict resolution.

[0193] Detailed technical details:

[0194] Fuzzy C-Means (FCM, Fuzzy C-Means) algorithm:

[0195] Feature vectors of input context rules (e.g. time offset, user location, light intensity) are clustered into k=3 classes (high, medium, low intensity) to generate fuzzy variables and membership functions.

[0196] A dynamic weight adjustment mechanism is introduced to assign weights to each feature based on its time sensitivity (e.g. time offset is prioritized over light intensity) during FCM iterations, formula:

[0197] J = sum_i sum_j w_k * (μ_ij)^m * ||x_i - c_j||^2

[0198] where w_k is the feature weight (e.g. time offset weight 0.5, location weight 0.3, light weight 0.2), μ_ij is the membership degree of data point x_i to cluster center c_j, m=2 is the fuzzification parameter, ||x_i - c_j||^2 is the squared Euclidean distance. sum_i and sum_j represent double summation (∑_i∑_j), indicating traversal over all data points and all cluster centers.

[0199] A convergence acceleration strategy is added by estimating initial cluster centers (based on historical data mean), reducing the number of iterations.

[0200] Membership degrees and cluster centers are iteratively updated, with convergence condition J change <0.01 and iteration number about 10 times (compared to traditional FCM's 12 times reduction). Fuzzy variables (e.g. "light intensity = bright") and membership function parameters are output.

[0201] Through dynamic weight adjustment, the clustering result is more consistent with the priority of scene mode trigger conditions (e.g. time is prioritized over light), improving the accuracy of rule generation; the acceleration convergence strategy reduces computational overhead, adapting to resource-constrained home servers.

[0202] Complexity: O(nkI), n is the number of rules, k is the number of clusters (3), I is the number of iterations (10).

[0203] Weighted Mamdani fuzzy reasoning:

[0204] Input: First fuzzy membership degree (e.g. time proximity = 0.9, light intensity = 0.8).

[0205] Reasoning steps:

[0206] 1) Rule activation: Calculate the trigger strength of each rule, formula:

[0207] strength = min(μ_1, μ_2,..., μ_n)

[0208] where μ_i is the input membership degree.

[0209] 2) Weighted aggregation: Assign a weight to each rule (e.g., dinner scene rule weight 0.7), formula:

[0210] output = sum(w_i * strength_i) / sum(w_i)

[0211] where w_i is the rule weight, strength_i is the rule trigger strength.

[0212] 3) Defuzzification: Use the centroid method, formula:

[0213] y = ∑_k (μ_k * y_k) / ∑_k μ_k

[0214] where μ_k: membership degree of the kth output rule, y_k: output value of the kth rule, output result: y ∈ [0, 1], the larger the value, the higher the scene priority.

[0215] Complexity: O(r), r is the number of rules.

[0216] Fuzzy entropy optimization:

[0217] Formula: H = -sum(μ_i * log(μ_i))

[0218] where μ_i is the membership degree.

[0219] Optimization strategy: If H > 0.5, adjust the membership function parameters (e.g., reduce the range of the triangular function by 5%), reduce the uncertainty of the rules. The update frequency can be set to every 24 hours or after 15 user feedbacks to perform optimization.

[0220] Performance optimization:

[0221] Rule caching: Store high-frequency triggered rules (such as the dinner scene) in memory.

[0222] Use a similar rule merging algorithm, merge rules based on feature vector distance (Euclidean distance <0.1), reduce the size of the rule base (Rule A: Pattern trigger condition (time deviation = high, light intensity = medium), execute action (turn on light). Rule B: Pattern trigger condition (time deviation = high, light intensity = medium-high), execute action (turn on light). Distance calculation: time deviation is the same, light intensity difference <0.1, then merge into one rule: Pattern trigger condition (time deviation = high, light intensity = medium), execute action (turn on light).

[0223] Parallel processing: Conflict detection and fuzzy reasoning are executed in parallel on a multi-core processor.

[0224] Storage optimization: Fuzzy rule base is stored in SQLite database with index optimization.

[0225] Conflict resolution strategy generation:

[0226] Strategy type: priority adjustment (select high priority scenario), action merge (retain non-conflicting action), action delay (delay conflicting action).

[0227] Decision formula: S = argmax(w_i * μ_i)

[0228] Where w_i is the rule weight, μ_i is the membership degree.

[0229] Improvements:

[0230] Introduce strategy priority ranking, assign weights to strategies based on historical execution frequency (such as priority adjustment weight 0.6), optimize selection efficiency.

[0231] Use priority queue to store strategies, sorting time O(logm), m is the number of strategies (all strategies are stored in heap (Max-Heap) in descending order of "historical effectiveness weight", the optimal strategy is directly taken from the top of the heap when conflict occurs, and the weight is updated and the heap structure is adjusted after strategy execution).

[0232] Priority adjustment accounts for 55%, action merge accounts for 35%, and action delay accounts for 10%. Strategy priority ranking improves decision efficiency, priority queue ensures fast selection of optimal strategy, and improves response speed of conflict resolution.

[0233] It should be noted that for the method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the embodiments of the present application are not limited by the described action sequence, because according to the embodiments of the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions involved are not necessarily necessary for the embodiments of the present application.

[0234] Referring to Figure 6 , a structural schematic diagram of an intelligent home system 60 according to an embodiment of the present application is shown, which can include the following modules:

[0235] The conflict detection module 610 is configured to determine the current trigger parameter, and determine the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene existing execution conflict;

[0236] The fuzzy reasoning engine 620 is configured to determine the execution priority of the conflict scene according to the first fuzzy membership degree, and determine the target scene from the multiple conflict scenes according to the execution priority;

[0237] The scene execution module 630 is configured to execute the target scene.

[0238] In some embodiments, the conflict detection module 610 can be configured to detect whether there is a scene execution conflict between scenes; in the case of detecting that there is a scene execution conflict, the conflict detection module 610 can first determine the mode trigger condition corresponding to each scene (hereinafter referred to as a conflict scene for the sake of convenience) that is currently in execution conflict.

[0239] After determining the mode trigger condition corresponding to each conflict scene, the conflict detection module 610 can determine, based on a fuzzy C-means clustering algorithm, a first fuzzy membership degree of the current trigger parameter to the mode trigger condition of the conflict scene that is in execution conflict.

[0240] In some embodiments, the current trigger parameter can include multiple; therefore, the conflict detection module 610 can determine the first fuzzy membership degree of each trigger parameter to different mode trigger conditions respectively.

[0241] After determining the first fuzzy membership degree of each trigger parameter to different mode trigger conditions, the fuzzy reasoning engine 620 can determine the execution priority of each conflict scene based on the first fuzzy membership degrees; that is, based on the first fuzzy membership degrees, determine which conflict scene should be triggered by the current trigger parameter to execute.

[0242] After determining the execution priority, the fuzzy reasoning engine 620 can determine, based on the execution priority, the target scene that should be currently executed from the multiple conflict scenes.

[0243] Next, the scene execution module 630 can execute the execution action corresponding to the target scene. For example:

[0244] If it is determined that the target scene is the dinner scene, the scene execution module 630 can turn on the restaurant light, play background music, and the present embodiment is not limited in this regard.

[0245] In an embodiment of the present application, the conflict detection module 610 is further configured to determine a second fuzzy membership degree of the current trigger parameter to the mode trigger condition of each scene, and determine a third fuzzy membership degree of each scene according to the second fuzzy membership degree; and determine whether there is a scene execution conflict between scenes according to the third fuzzy membership degree.

[0246] In some feasible embodiments, the conflict detection module 610 can determine the second fuzzy membership degree of the current trigger parameter to the mode trigger condition of each scene.

[0247] After determining the second fuzzy membership degree, the conflict detection module 610 can determine a third fuzzy membership degree for each scene based on the second fuzzy membership degrees.

[0248] After determining the third fuzzy membership degrees of the respective scenes, the conflict detection module 610 can determine whether there is a scene execution conflict between the respective scenes based on the third fuzzy membership degrees.

[0249] For example, the conflict detection module 610 can determine whether there is a scene execution conflict between the respective scenes for the scenes in which there is a conflict in the execution actions; and can also determine whether there is a scene execution conflict between the respective scenes for the scenes in which there is a conflict in the execution actions and the execution times are close, and the embodiments of the present application do not limit this.

[0250] In an embodiment of the present application, as shown in Figure 7 The smart home system can further include:

[0251] A scene trigger monitoring module 660, configured to detect a trigger of a scene.

[0252] A fuzzy rule generation library 650, configured to collect a mode trigger condition of each scene, and cluster the mode trigger condition of each scene to obtain a plurality of membership functions and store the plurality of membership functions in a fuzzy rule library 690.

[0253] A scene rule database 640, configured to store the mode trigger condition of each scene.

[0254] A feedback and optimization module 680, configured to, in a case where there is an intervention operation for a target scene, determine a fuzzy entropy based on a second fuzzy membership degree corresponding to each scene; and adjust the membership functions in the fuzzy rule library 690 according to the fuzzy entropy.

[0255] In some possible embodiments, as shown in Figure 7 In addition to the conflict detection module 610, the fuzzy reasoning engine 620, and the scene execution module 630, the smart home system 60 can further include the scene trigger monitoring module 660, the fuzzy rule generation library 650, the scene rule database 640, and the feedback and optimization module 680.

[0256] The scene trigger monitoring module 660 can be configured to detect and collect a current trigger parameter, and determine whether a scene is triggered based on the current trigger parameter.

[0257] The fuzzy rule generation library 650 can be configured to collect a mode trigger condition of each scene, and cluster the mode trigger condition of each scene based on a fuzzy C-means clustering algorithm to obtain a plurality of membership functions and store the plurality of membership functions in the fuzzy rule library 690.

[0258] The scene rule database 640 can be configured to store the mode trigger condition of each scene; in addition, the scene rule database 640 can also store an execution action of each scene and a displacement ID of the scene, and the embodiments of the present application do not limit this.

[0259] The feedback and optimization module 680 can be used to determine the fuzzy entropy based on the second fuzzy membership degrees of each scene after detecting the execution of the target scene, if there is an intervention operation for the target scene.

[0260] Then, the feedback and optimization module 680 can adjust the membership function based on the fuzzy entropy, dynamically adjust the membership function in combination with the fuzzy entropy and the closed-loop feedback mechanism, realize adaptive conflict resolution, and overcome the limitations of the preset strategy generation rule.

[0261] In some possible embodiments, the smart home system 60 can further include a resolution strategy generation module 670 for generating a strategy of scene priority adjustment, action merging or delayed execution.

[0262] As shown in the figure, the scene rule database 640 stores scene rules, including mode trigger conditions (such as time, ambient light, user location) and execution actions (such as turning on / off devices). Figure 7 The fuzzy rule generation library 650 analyzes the scene rules based on the fuzzy C-means clustering algorithm, defines fuzzy variables (such as “mode trigger condition strength”), membership functions and fuzzy rules, and constructs a dynamic fuzzy rule library 690. The fuzzy rule library 690 stores dynamic fuzzy rules generated by the fuzzy C-means clustering algorithm, and is an updateable database for supporting the decision-making of the fuzzy reasoning engine 620.

[0263] The conflict detection module 610 monitors the mode trigger events of the scene in real time, calculates the fuzzy membership degree of the mode trigger condition, and evaluates potential conflicts.

[0264] The fuzzy reasoning engine 620 evaluates the priority and execution impact of the conflict scene based on the weighted Mamdani reasoning model, and generates a resolution strategy.

[0265] The resolution strategy generation module 670 generates a strategy of scene priority adjustment, action merging or delayed execution.

[0266] The scene execution module 630 executes scene actions according to the strategy and controls smart home devices.

[0267] The feedback and optimization module 680 optimizes the membership function and rule weight based on historical execution data and user feedback, updates the fuzzy rule library 690, and uses fuzzy entropy.

[0268] The scene trigger monitoring module 660 is responsible for real-time monitoring of mode trigger events in the smart home system. This module detects and preprocesses event data (event data is raw state information collected from the smart home environment (such as system time, sensor readings, etc.)), and provides input for the conflict detection module.

[0269]

[0270] In the embodiments of the present application, the current trigger parameter is determined, and the first fuzzy membership degree of the current trigger parameter and the mode trigger condition of the conflict scene in which the execution conflict exists is determined; the execution priority of the conflict scene is determined according to the first fuzzy membership degree; the target scene is determined from the multiple conflict scenes according to the execution priority, and the target scene is executed. Through the embodiments of the present application, the conflict of the scene can be resolved based on fuzzy logic, so as to avoid the problem that the execution result deviates from the user's intention because the precise matching is difficult to adapt to the actual scene, and to meet the automatic execution in the dynamic scene and the like.

[0271] The embodiments of the present application also provide an electronic device, including a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and the computer program is executed by the processor to implement the scene execution method as above.

[0272] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by the processor to implement the scene execution method as above.

[0273] For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the related parts are referred to the part of the method embodiments.

[0274] Each of the embodiments in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments, and the same and similar parts between the embodiments are referred to each other.

[0275] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present application can adopt a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can adopt the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer usable program codes.

[0276] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams according to the method, terminal device (system), and computer program product of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of the flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the computer or other programmable data processing terminal device produce a machine that implements the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the block or blocks.

[0277] These computer program instructions can also be stored in a computer- readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the block or blocks.

[0278] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the Figure 1 one or more processes and / or blocks Figure 1 an apparatus for performing the functions specified in the block or blocks.

[0279] Although preferred embodiments of the application have been described, those skilled in the art will recognize that additional modifications and changes can be made thereto without departing from the scope of the present application. Accordingly, the appended claims are intended to cover all such modifications and changes as fall within the scope of the application.

[0280] Finally, it should be noted that the terms "comprises", "comprising", or other variations thereof are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. The terms "comprises", "comprising", or other variations thereof, are intended to cover a non-exclusive inclusion, such that a process or method that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process or method.

[0281] The execution method, system, electronic device and storage medium of the scenario provided are described in detail, the principle and implementation manner of the present application are described by applying specific examples in the present application, the above description of the examples is only used for helping to understand the method of the present application and the core idea thereof; meanwhile, for the general technical personnel in the art, according to the idea of the present application, the specific implementation manner and application range will be changed, and the above description should not be understood as the limitation of the present application.

Claims

1. A method of executing a scenario, characterized by, The method comprises: determining a current trigger parameter, and determining a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene in which a conflict exists; determining a current trigger parameter, and determining a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene in which a conflict exists; determining an execution priority of the conflict scene according to the first fuzzy membership degree; determining a target scene from a plurality of conflict scenes according to the execution priority, and executing the target scene.

2. The method of claim 1, wherein, The method further comprises: determining a second fuzzy membership degree of the current trigger parameter and a mode trigger condition of each scene, and determining a third fuzzy membership degree of each scene according to the second fuzzy membership degree; judging whether a scene execution conflict exists between each scene according to the third fuzzy membership degree.

3. The method of claim 2, wherein, The judging whether a scene execution conflict exists between each scene according to the third fuzzy membership degree comprises: for any two scenes, determining a third fuzzy membership degree with a smaller value from the corresponding third fuzzy membership degrees; when the third fuzzy membership degree with the smaller value exceeds a first preset value, determining that a scene execution conflict exists between the two scenes; when the third fuzzy membership degree with the smaller value does not exceed the first preset value, determining that a scene execution conflict does not exist between the two scenes.

4. The method of claim 1, wherein, The method further comprises: collecting mode trigger conditions of each scene, and clustering the mode trigger conditions of each scene to obtain a plurality of membership functions; The determining a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene in which a conflict exists comprises: determining a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene in which a conflict exists according to the membership functions.

5. The method of claim 4, wherein, After executing the target scene, the method further comprises: in a case where an intervention operation exists for the target scene, determining a fuzzy entropy based on the second fuzzy membership degrees corresponding to each scene; adjusting the membership functions according to the fuzzy entropy.

6. The method of claim 1, wherein, The method further comprises: for at least two scenes in which a scene execution conflict does not exist, calculating a feature vector distance of the at least two scenes; when the feature vector distance is less than a second preset value, merging the at least two scenes.

7. The method of claim 1, wherein, The method further comprises: sequencing other conflict scenes except the target scene according to the execution priorities of the conflict scenes; delaying the execution of the other conflict scenes except the target scene according to the sequencing.

8. A smart home system, characterized by, The system comprises: a conflict detection module configured to determine a current trigger parameter, and determine a first fuzzy membership degree of the current trigger parameter and a mode trigger condition of a conflict scene in which a conflict exists; a fuzzy reasoning engine configured to determine an execution priority of the conflict scene according to the first fuzzy membership degree, and determine a target scene from a plurality of conflict scenes according to the execution priority; a scene execution module configured to execute the target scene.

9. The system of claim 8, wherein The conflict detection module is further configured to determine second fuzzy membership degrees of the current trigger parameter and the mode trigger conditions of each scene, and determine third fuzzy membership degrees of each scene according to the second fuzzy membership degrees; and determine whether there is a scene execution conflict between each scene according to the third fuzzy membership degrees.

10. The system of claim 8, wherein, The system further comprises: a scene trigger monitoring module configured to detect a trigger of a scene; a fuzzy rule generation library configured to collect the mode trigger conditions of each scene, cluster the mode trigger conditions of each scene to obtain a plurality of membership functions, and store the plurality of membership functions in the fuzzy rule library; a scene rule database configured to store the mode trigger conditions of each scene; a feedback and optimization module configured to, in a case where there is an intervention operation for the target scene, determine a fuzzy entropy based on the second fuzzy membership degrees corresponding to each scene; and adjust the membership functions in the fuzzy rule library according to the fuzzy entropy.

11. An electronic device, comprising: A computer program product comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the scene execution method according to any one of claims 1 to 7 when executed by the processor.

12. A computer-readable storage medium, characterized in that, A computer program product comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the scene execution method according to any one of claims 1 to 7 when executed by the processor.

Citation Information

Patent Citations

  • Intelligent vehicle urban intersection passing decision multi-objective optimization model based on conflict resolution

    CN110992695A

  • Linkage control method, system and device of smart home equipment and storage medium

    CN113671847A

  • Target equipment control method and system, storage medium and computer equipment

    CN113777921A

  • Equipment control method and device, equipment and storage medium

    CN119676016A

  • Event detection and summarisation

    US20180129873A1

Cited By

  • Skill generation method, control device and control system for body-equipped agent

    CN122018353A