Method and device for generating scene control index, electronic device, and storage medium
By acquiring and correlating scene control data in smart homes, analyzing action execution results, and calculating scene control success rate, the problem that the existing technology cannot accurately evaluate scene control situations, and the accurate evaluation of scene control situations and promotion of business development is achieved.
Patent Information
- Application Number
- CN202111390636.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-19
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-11-19
AI Technical Summary
The existing technology cannot accurately evaluate scenario control, resulting in the inability to effectively promote the development of scenario control business in smart homes.
By obtaining the various scene data and action data generated by scene control in the target time period, correlating each scene data with its corresponding action data, analyzing the action execution results, determining the number of target scene data, and calculating the scene control success rate.
Accurate evaluation of scene control situations is achieved, which can more effectively reflect the control situation of scene control, thereby promoting the development of scene control business in smart homes.
Smart Images

Figure CN116149194B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of scene control evaluation, and in particular to a method and device for generating a scene control index, an electronic device, and a storage medium. Background Art
[0002] In a smart home, the corresponding scene control can usually be automatically triggered by weather, timing, geographic location, etc., or manually triggered by client operations, so as to perform corresponding actions on the device, such as pushing messages to the device, turning the device on or off, etc.
[0003] In order to provide users with a better experience and promote the development of scene control services, the control status of scene control is very important. Therefore, in the prior art, the control status of the scene control mechanism is measured by the business data of scene control.
[0004] However, the business data of scene control is affected by many factors, so it is not accurate to evaluate the control situation of scene control through the business data of scene control. Summary of the invention
[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a method and device for generating a scene control index, an electronic device, and a storage medium to solve the problem that the prior art cannot accurately evaluate the scene control situation.
[0006] In order to achieve the above objectives, this application provides the following technical solutions:
[0007] The first aspect of the present application provides a method for generating a scene control index, comprising:
[0008] Acquire each scene data and each action data generated by the scene control within the target time period; wherein one scene data corresponds to one scene control;
[0009] Associating each of the scene data with the corresponding action data; wherein the action data corresponding to one of the scene data is relevant data of the action executed when the scene control corresponding to the scene data is executed;
[0010] Based on the action execution results of each controlled device in each action data associated with each of the scene data, determine the number of target scene data in each of the scene data; wherein the target scene data refers to the scene data in which the action execution results of each controlled device in each of the associated action data are only offline and / or successfully executed;
[0011] The ratio of the number of the target scene data to the total number of each of the scene data is calculated to obtain the scene control success rate within the target time period.
[0012] Optionally, in the above-mentioned method for generating scene control indicators, associating each scene data with corresponding action data includes:
[0013] For each of the scene data, the action data and the scene data containing the same serial number as the scene data are associated respectively; wherein, one scene control corresponds to one serial number; and the scene data and the action data generated by one scene control both contain the serial number corresponding to this scene control.
[0014] Optionally, in the above-mentioned method for generating a scene control index, the determining the number of target scene data in each scene data based on the action execution result of each controlled device in each action data associated with each scene data further includes:
[0015] For each of the scene data, traverse the action execution results of each controlled device in each of the action data associated with the scene data in turn;
[0016] If the action execution result of any controlled device in each of the action data associated with the scene data is not the device being offline or being successfully executed, the scene data is filtered out;
[0017] The number of each scene data that has not been filtered out is counted.
[0018] Optionally, in the above-mentioned method for generating a scene control index, the target scene data includes first target scene data and second target scene data, and the determining the number of target scene data in each scene data based on the action execution result of each controlled device in each action data associated with each scene data includes:
[0019] Determine each of the scenario data whose operation results are successfully executed as the first target scenario data; wherein the operation results in the scenario data are set to be successfully executed when the action execution results of each controlled device in each of the associated action data are successfully executed;
[0020] Based on the action execution result of each controlled device in each action data associated with each scene data to be processed, the second target scene data is screened out from each scene data to be processed; wherein the data to be processed refers to each scene data whose operation result is partially successful; the operation result in the scene data is set to partially successful when only part of the action execution results of each controlled device in each action data associated with it is successfully executed; the second target scene data refers to the scene data to be processed whose action execution results of each controlled device in each associated action data are only offline and successfully executed;
[0021] The total number of the first target scene data and the second target scene data is counted.
[0022] Optionally, in the above-mentioned method for generating scene control indicators, the step of filtering out second target scene data from each of the scene data to be processed based on the action execution result of each controlled device in each of the action data associated with each of the scene data to be processed comprises:
[0023] Deleting the action execution results of the controlled device in each of the action data associated with each of the scene data to be processed, in which the action execution results are that the device is offline;
[0024] The scene data to be processed in which the action execution results of each controlled device in each associated action data are successfully executed are screened out from each of the scene data to be processed as the second target scene data.
[0025] Optionally, in the above-mentioned method for generating a scene control index,
[0026] After determining the number of target scene data in each of the scene data based on the action execution results of each controlled device in each of the action data associated with each of the scene data, the method further includes:
[0027] Marking the scenario data that does not belong to the target scenario data and in which at least one of the associated action data has an action execution result of the controlled device being offline or successfully executed as partially successful;
[0028] Calculate the ratio of the number of the scene data marked as partially successful to the total number of each of the scene data to obtain a partial success rate;
[0029] The failure rate is obtained by calculating the ratio of the number of each of the scene data that does not belong to the target scene data and is not marked as partially successful to the total number of each of the scene data.
[0030] Optionally, in the above-mentioned method for generating a scene control index, after calculating the ratio of the number of the target scene data to the total number of each scene data to obtain the scene control success rate within the target time period, the method further includes:
[0031] Determine whether the scene control success rate within the target time period is greater than a preset success rate threshold;
[0032] If the scene control success rate within the target time period is not greater than a preset success rate threshold, an alarm message is fed back.
[0033] A second aspect of the present application provides a device for generating a scene control index, including:
[0034] An acquisition unit, used to acquire each scene data and each action data generated by the scene control within a target time period; wherein one scene data corresponds to one scene control;
[0035] An associating unit, used to associate each of the scene data with the corresponding action data; wherein the action data corresponding to one of the scene data is relevant data of the action executed when the scene control corresponding to the scene data is executed;
[0036] A quantity determination unit, configured to determine the quantity of target scene data in each of the scene data based on the action execution results of each controlled device in each of the action data associated with each of the scene data; wherein the target scene data refers to scene data in which the action execution results of each controlled device in each of the associated action data are only device offline and / or successfully executed;
[0037] The first calculation unit is used to calculate the ratio of the number of the target scene data to the total number of each scene data to obtain the scene control success rate within the target time period.
[0038] Optionally, in the above-mentioned scene control index generation device, the association unit includes:
[0039] The association subunit is used to associate each of the action data and the scene data containing the same serial number as the scene data for each of the scene data; wherein, one scene control corresponds to one serial number; and the scene data and the action data generated by one scene control both contain the serial number corresponding to this scene control.
[0040] Optionally, in the above-mentioned scene control index generation device, the quantity determination unit includes:
[0041] A traversal unit, used for traversing the action execution results of each controlled device in each action data associated with the scene data in turn for each scene data;
[0042] A screening unit, configured to screen out the scene data if the action execution result of any controlled device in each of the action data associated with the scene data is not that the device is offline or successfully executed;
[0043] The first counting unit is used to count the number of each of the scene data that has not been screened out.
[0044] Optionally, in the above-mentioned scene control index generation device, the target scene data includes first target scene data and second target scene data, and the quantity determination unit includes:
[0045] A first determining unit is used to determine each of the scenario data whose operation results are successfully executed as the first target scenario data; wherein the operation results in the scenario data are set to be successfully executed when the action execution results of each controlled device in each of the associated action data are successfully executed;
[0046] A first screening unit is used to screen out the second target scenario data from each of the scenario data to be processed based on the action execution result of each controlled device in each of the action data associated with each of the scenario data to be processed; wherein the data to be processed refers to each of the scenario data whose operation results are partially successful; the operation results in the scenario data are set to be partially successful when only part of the action execution results of each controlled device in each of the action data associated with it is successfully executed; the second target scenario data refers to the scenario data to be processed whose action execution results of each controlled device in each of the associated action data are only the device offline and successfully executed;
[0047] The second counting unit is used to count the total number of the first target scene data and the second target scene data.
[0048] Optionally, in the above-mentioned scene control index generation device, the first screening unit includes:
[0049] A deleting unit, used for respectively deleting the action execution results of the controlled device in each of the action data associated with each of the scene data to be processed, in which the action execution results are that the device is offline;
[0050] The second screening unit is used to screen out the scene data to be processed whose action execution results of each controlled device in the associated action data are all successfully executed from the scene data to be processed, as the second target scene data.
[0051] Optionally, the above-mentioned scene control index generation device further includes:
[0052] a marking unit, configured to mark, as partially successful, each of the scene data not belonging to the target scene data, the scene data in which at least one action execution result of the controlled device in the associated action data is that the device is offline or successfully executed;
[0053] A second calculation unit is used to calculate the ratio of the number of the scene data marked as partially successful to the total number of each scene data to obtain a partial success rate;
[0054] The third calculation unit is used to calculate the ratio of the number of each of the scene data that does not belong to the target scene data and is not marked as partially successful to the total number of each of the scene data to obtain a failure rate.
[0055] Optionally, the above-mentioned scene control index generation device further includes:
[0056] A judging unit, used to judge whether the scene control success rate within the target time period is greater than a preset success rate threshold;
[0057] The alarm unit is used to feed back alarm information if the scene control success rate within the target time period is not greater than a preset success rate threshold.
[0058] A third aspect of the present application provides an electronic device, including:
[0059] Memory and processor;
[0060] Wherein, the memory is used to store programs;
[0061] The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method for generating a scene control indicator as described in any one of the above items.
[0062] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement a method for generating a scene control indicator as described in any one of the above.
[0063] The present application provides a method for generating a scene control index, which obtains each scene data and each action data generated by the scene control within the target time period. Then, each scene data is associated with each corresponding action data; wherein, one scene data corresponds to one scene control, and the action data corresponding to one scene data is the relevant data of the action executed when the scene control corresponding to the scene data is executed, so as to manage the scene data and action data of each scene control. Then, based on the action execution results of each controlled device in each action data associated with each scene data, the number of target scene data in each scene data is determined. Wherein, the target scene data refers to the scene data in which the action execution results of each controlled device in each associated action data are only the device offline and / or successfully executed, that is, by analyzing and excluding the scene data of the scene control that failed to execute due to the scene control mechanism problem, the scene data of the scene control that was successfully executed, that is, the target scene data, is obtained, so the ratio of the number of target scene data to the total number of each scene data is calculated, and the scene control success rate within the target time period can be obtained, and since the scene control success rate is obtained by analyzing the execution of each action executed when the scene control is performed, it can accurately reflect the control situation of the scene control. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0065] Figure 1 A flowchart of a method for generating a scene control index provided in an embodiment of the present application;
[0066] Figure 2 A schematic diagram of a scene control provided in an embodiment of the present application;
[0067] Figure 3 A flowchart of a method for determining the amount of target scene data provided by an embodiment of the present application;
[0068] Figure 4 A flowchart of a method for screening scene data to be processed provided in an embodiment of the present application;
[0069] Figure 5 A flowchart of another method for determining the amount of target scene data provided by an embodiment of the present application;
[0070] Figure 6A flowchart of a method for calculating partial success rate and failure rate provided in an embodiment of the present application;
[0071] Figure 7 A schematic diagram of the structure of a device for generating a scene control index provided in an embodiment of the present application;
[0072] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0073] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0074] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.
[0075] The present application embodiment provides a method for generating a scene control index, such as Figure 1 As shown, including:
[0076] S101, acquiring each scene data and each action data generated by scene control within a target time period.
[0077] It should be noted that if Figure 2 As shown, scene control means that the corresponding scene can be automatically triggered by weather, timing, geographic location, etc., or manually triggered by client operations, so as to perform corresponding actions on the device, such as pushing messages to the device, turning the device on or off, etc., so that the device enters the corresponding scene.
[0078] When performing scene control, corresponding scene logs and action logs will be generated. Among them, the scene log includes various scene data. In addition, one scene data corresponds to one scene control, which is used to record scene-related information during one scene control, such as scene name, operation result, trigger type, etc. Optionally, the scene data can be in a table format, for example, as shown in Table 1, specifically including multiple field names and multiple field names. It should be noted that the included fields can be set as needed, and must include all the information in Table 1, nor is it limited to the information in Table 1.
[0079] Table 1
[0080]
[0081]
[0082] The action log includes multiple action logs. When a scene control is executed, each action executed corresponds to an action log, which is used to record relevant information of the action, which may include action type, group number, etc., and can also be in the form of a table, for example, as shown in Table 2.
[0083]
[0084] The target time period refers to a set time period, which can be set according to specific needs. For example, if it is set to one day, then various scene data and various action data generated by the scene control executed by the content of one day can be obtained.
[0085] S102: Associating each scene data with corresponding action data.
[0086] Among them, the action data corresponding to a scene data is the relevant data of the action performed when executing the scene control corresponding to the scene data, so the scene data related to a scene control is associated with the action data, so as to determine whether the scene data is the target scene data according to the action data, that is, to determine whether the scene control execution is successful.
[0087] Optionally, in another embodiment of the present application, a corresponding serial number is generated for each scene control, that is, one scene control corresponds to one serial number. In addition, the scene data and action data generated by one scene control both contain the serial number corresponding to this scene control, that is, the "sn" field included in both Table 1 and Table 2 above. Therefore, optionally, the scene data and action data can be associated with each other through the serial number, so a specific implementation of step S102 can be:
[0088] For each scene data, each action data and scene data having the same serial number as the scene data are associated.
[0089] S103: Determine the number of target scene data in each scene data based on the action execution results of each controlled device in each action data associated with each scene data.
[0090] Among them, the target scenario data refers to the scenario data in which the action execution results of each controlled device in the associated action data are only the device offline and / or successful execution. That is, when all the action execution results corresponding to a scenario data only include the device offline, or successful execution, or the device offline and successful execution, and do not include other results, then the scenario data is the target scenario data.
[0091] It should be noted that when performing a scene control, an action may be executed on multiple controlled devices, so the action data of the action will include the action execution result of each controlled device, that is, the execution result of the action on each controlled device. For example, the "exec_result_info" field in Table 2 includes the ID of each controlled device and the action execution result associated with the ID of each controlled device, that is, the action execution result of each controlled device.
[0092] It should also be noted that, when executing an action, there may be individual controlled devices that are offline, resulting in the failure to successfully execute the action on the controlled device. At this time, the scene data will record that the execution of the action on the controlled device is a failure. However, since the failure to execute successfully is not caused by the control mechanism, when calculating the success rate of the scene control, the scene control with this situation should not be considered as identified. Therefore, in the embodiment of the present application, as long as the action execution result of each controlled device in the associated action data is only the device offline and / or successfully executed, the scene data is considered to belong to the scene data of the successfully executed scene control, that is, the action execution results of the controlled devices included only include the scenes where the device is offline or successfully executed, and all scenes can be recorded as all successful scenes. If there is any controlled device whose action execution result is not the device offline or successful, it means that there is an action that failed to execute, so it cannot be used to calculate the success rate.
[0093] Optionally, in another embodiment of the present application, a specific implementation of step S103 is as follows: Figure 3 As shown, the following steps are included:
[0094] S301. Determine each scene data including an operation result of successful execution as the first target scene data.
[0095] It should be noted that, in the embodiment of the present application, the target scenario data includes first target scenario data and second target scenario data, the first target scenario data is scenario data in which all corresponding action execution results are successfully executed, and the second target scenario data is scenario data in which all corresponding action execution results include both device offline and successful execution, that is, the second target scenario data refers to the action execution results of each controlled device in the associated action data, which are only the pending scenario data for device offline and successful execution.
[0096] Optionally, in an embodiment of the present application, the operation result field in the scene data stores the execution result of the corresponding scene control, for example, "operation_status" as shown in Table 1, including: execution failure, execution success, executing and partial success.
[0097] The operation result in the scene data is set to be executed successfully when the action execution results of each controlled device in each action data associated with it are all executed successfully.
[0098] Therefore, each scene data including operation results of successful execution can be directly determined as target scene data.
[0099] The operation results in the scene data are set to partially successful when only part of the action execution results of each controlled device in its associated action data are successfully executed. Therefore, when there are action execution results of controlled devices whose devices are offline or failed to execute, the operation results will be set to partially successful. Therefore, the partially successful scene data needs to be further determined.
[0100] S302: Filter out second target scene data from each scene data to be processed based on the action execution result of each controlled device in each action data associated with each scene data to be processed.
[0101] The scene data to be processed refers to each scene data whose operation result is partially successful.
[0102] It should be noted that in the embodiment of the present application, the execution order of step S301 and step S302 is only an optional method, and the two are independent of each other and can be executed separately.
[0103] The failure is caused by the device being offline, not by problems with the scene control mechanism. Therefore, the action execution results of each controlled device in the associated action data are selected from the various scene data to be processed, and the scene data to be processed whose action execution results are device offline and successful execution are selected to determine them as the second target scene data.
[0104] Optionally, in another embodiment of the present application, a specific implementation of step S303 is as follows: Figure 4 As shown, the following steps are included:
[0105] S401 , respectively deleting the action execution results of the controlled devices in each action data associated with each scene data to be processed, in which the action execution results of the controlled devices are offline.
[0106] S402 , filtering out, from each of the scene data to be processed, the scene data to be processed in which the action execution results of each controlled device in each of the associated action data are all successfully executed, as the second target scene data.
[0107] It should be noted that, since the action execution results of the controlled device that are offline have been deleted in step S401, after deletion, if the action execution results of each controlled device in each action data associated with the scene data to be processed are all successfully executed, then before deletion, the action execution results of each controlled device in each action data associated with the scene data to be processed must all be offline or successfully executed. Therefore, after the deletion operation, the action execution results of each controlled device in each associated action data that are screened out are all successfully executed scene data to be processed, that is, the action execution results of each controlled device in each associated action data are all offline or successfully executed scene data to be processed.
[0108] Optionally, the execution results of successful execution can be deleted first, and then the scene data of the execution results of the device being offline can be filtered out to obtain the second target scene data. However, since the execution results of the device being offline are relatively few, the selection of deleting the execution results of the device being offline can make the screening more efficient.
[0109] S303: Count the total number of the first target scene data and the second target scene data.
[0110] Optionally, in another embodiment of the present application, another specific implementation of step S103 is as follows: Figure 5 As shown, the following steps are included:
[0111] S501 , for each scene data, traverse the action execution results of each controlled device in each action data associated with the scene data in sequence.
[0112] S502: Determine whether the action execution result of the controlled device in the action data associated with the currently traversed scene data is not that the device is offline or is successfully executed.
[0113] Since each action execution result corresponding to the target scene data can only be the device offline or successfully executed, when it is determined that the action execution result of the controlled device in the action data associated with the scene data currently traversed is not the device offline or successfully executed, step S503 is executed, that is, if the action execution result of any controlled device in the various action data associated with the scene data traversed is not the device offline or successfully executed, the scene data is filtered out.
[0114] If the action execution result of the controlled device in the action data associated with the currently traversed scene data is judged to be offline or successfully executed, the next execution result can be traversed until the action execution results of each controlled device in all action data managed by the scene data are traversed.
[0115] S503: Filter out the scene data.
[0116] In order to improve efficiency, in the embodiment of the present application, when there is any execution result that is not device offline or successfully executed, the scene data can be saved without traversing the corresponding execution result. After all the scene data are traversed, step S504 is executed to obtain the number of target scene data.
[0117] Of course, this is only an optional method. It can also be to directly traverse the action data associated with the scene data and determine the action execution results of each controlled device as offline or successfully executed. When there are no other execution results, the scene data is determined as the target scene data, and finally the number of target scene data is counted.
[0118] S504: Count the number of scene data that have not been screened out.
[0119] Since any scene data with execution results other than device offline or successful execution is filtered out, the scene data not filtered out is the target scene data. Therefore, the number of each scene data not filtered out is counted to obtain the number of target scene data.
[0120] S104: Calculate the ratio of the number of target scene data to the total number of each scene data to obtain the scene control success rate within the target time period.
[0121] Since the amount of target scene data is obtained by analyzing the results of various actions performed during scene control, the scene control success rate within the target time period finally obtained can accurately reflect the control status of the scene control mechanism.
[0122] Optionally, in another embodiment of the present application, after executing step S104, it may be further performed to determine whether the scene control success rate within the target time period is greater than a preset success rate threshold.
[0123] Among them, if the scene control success rate within the target time period is not greater than the preset success rate threshold, an alarm message will be fed back to allow the operation and maintenance personnel to promptly understand the abnormality of the scene control, so as to make timely adjustments and repairs to ensure user use.
[0124] Optionally, in another embodiment of the present application, after determining the target scene data, the success rate and failure rate of the partially successful scene control may be further calculated, so that the operation and maintenance personnel can timely understand the various indicators. Therefore, in another embodiment of the present application, after executing step S103, the calculation of the partial success rate and failure rate may be further included. Figure 6 As shown, including:
[0125] S601. Mark as partially successful the scene data in which each action data associated with each scene data not belonging to the target scene data has at least one scene data in which the action execution result of the controlled device is device offline or successfully executed.
[0126] It should be noted that, as can be seen from the above, the system will also set it as failed when the device is offline, but the device offline is not caused by the control logic, so it should be set as successful execution during calculation. Therefore, in the action data managed by other scene data outside the target scene data, if there is an execution result of device offline, it is equivalent to the existence of an execution result of successful execution, so it is also marked as partial.
[0127] Optionally, in order to improve processing efficiency, since the pending successful data is the scene data with a partially successful operation result, that is, the execution results corresponding to the pending successful data must include successful execution results, each pending scene data that does not belong to the target data may be marked as partially successful first. Then, from the scene data with a failed operation result, the scene data with at least one action execution result of a controlled device in the associated action data is selected and also marked as scene data.
[0128] S602: Calculate the ratio of the number of scene data marked as partially successful to the total number of each scene data to obtain a partial success rate.
[0129] S603: Calculate the ratio of the number of each scene data that does not belong to the target scene data and is not marked as partially successful to the total number of each scene data to obtain the failure rate.
[0130] Each scene data that does not belong to the target scene data and is not marked as partially successful is the scene data that is likely to fail due to the control logic, so their number and the total data volume of the scene data are calculated to obtain the failure rate.
[0131] Optionally, step S603 is only one way to calculate the failure rate, and the failure rate may be obtained by subtracting 1 from the scene control success rate calculated in step S104 and the partial success rate obtained in step S602.
[0132] The embodiment of the present application provides a method for generating a scene control index, and obtains each scene data and each action data generated by the scene control within the target time period. Then, each of the scene data is associated with the corresponding action data; wherein, one scene data corresponds to one scene control, and the action data corresponding to one scene data is the relevant data of the action executed when the scene control corresponding to the scene data is executed, so that the scene data and action data of each scene control are managed. Then, based on the action execution results of each controlled device in each action data associated with each scene data, the number of target scene data in each scene data is determined. Wherein, the target scene data refers to the scene data in which the action execution results of each controlled device in each associated action data are only the device offline and / or successfully executed, that is, by analyzing and excluding the scene data of the scene control that failed to execute due to the scene control mechanism problem, the scene data of the scene control that was successfully executed, that is, the target scene data, is obtained, so the ratio of the number of target scene data to the total number of each scene data is calculated, and the scene control success rate within the target time period can be obtained, and since the scene control success rate is obtained by analyzing the execution of each action executed when the scene control is performed, it can accurately reflect the control situation of the scene control.
[0133] Another embodiment of the present application provides a device for generating a scene control index, such as Figure 7 As shown, including:
[0134] The acquisition unit 701 is used to acquire each scene data and each action data generated by the scene control within the target time period.
[0135] Among them, one scene data corresponds to one scene control.
[0136] The associating unit 702 is used to associate each scene data with corresponding action data.
[0137] The action data corresponding to a scene data is data related to the action performed when the scene control corresponding to the scene data is executed.
[0138] The quantity determination unit 703 is used to determine the quantity of target scene data in each scene data based on the action execution result of each controlled device in each action data associated with each scene data.
[0139] The target scenario data refers to scenario data in which the action execution results of each controlled device in each associated action data are only the device offline and / or successfully executed.
[0140] The first calculation unit 704 is used to calculate the ratio of the amount of target scene data to the total amount of each scene data to obtain the scene control success rate within the target time period.
[0141] Optionally, in the scene control index generation device provided in another embodiment of the present application, the association unit includes:
[0142] The association subunit is used to associate each action data and scene data containing the same serial number with each scene data. One scene control corresponds to one serial number. The scene data and action data generated by one scene control all contain the serial number corresponding to this scene control.
[0143] Optionally, a quantity determination unit in a scene control index generation device provided in another embodiment of the present application includes:
[0144] The traversal unit is used to traverse the action execution results of each controlled device in each action data associated with the scene data in turn for each scene data.
[0145] The screening unit is used to screen out the scene data if the action execution result of any controlled device in each action data associated with the scene data is not the device offline or successfully executed.
[0146] The first counting unit is used to count the number of each scene data that has not been screened out.
[0147] Optionally, in a scene control indicator generation device provided in another embodiment of the present application, the target scene data includes first target scene data and second target scene data, and the quantity determination unit includes:
[0148] The first determination unit is used to determine each scene data including the operation result of successful execution as the first target scene data, wherein the operation result in the scene data is set to be successfully executed when the action execution result of each controlled device in each action data associated with it is successfully executed.
[0149] The first screening unit is used to screen out second target scene data from each scene data to be processed based on the action execution result of each controlled device in each action data associated with each scene data to be processed. The data to be processed refers to each scene data in which the operation result contained is partially successful. The operation result in the scene data is set to partially successful when only part of the action execution results of each controlled device in each action data associated with it is successfully executed. The second target scene data refers to the action execution results of each controlled device in each associated action data, and only the scene data to be processed is offline and successfully executed.
[0150] The second counting unit is used to count the total number of the first target scene data and the second target scene data.
[0151] Optionally, in the scene control index generation device provided in another embodiment of the present application, the first screening unit includes:
[0152] The deleting unit is used to delete the action execution results of the controlled device in each action data associated with each scene data to be processed, where the action execution results are that the device is offline.
[0153] The second screening unit is used to screen out the scene data to be processed, in which the action execution results of each controlled device in each associated action data are successfully executed, from each scene data to be processed, as the second target scene data.
[0154] Optionally, in the scene control index generation device provided in another embodiment of the present application, the method further includes:
[0155] The marking unit is used to mark the scene data that does not belong to the target scene data and in which the action execution result of at least one controlled device in the associated action data is that the device is offline or successfully executed as partially successful.
[0156] The second calculation unit is used to calculate the ratio of the number of scene data marked as partially successful to the total number of each scene data to obtain a partial success rate.
[0157] The third calculation unit is used to calculate the ratio of the number of each scene data that does not belong to the target scene data and is not marked as partially successful to the total number of each scene data to obtain the failure rate.
[0158] Optionally, in the scene control index generation device provided in another embodiment of the present application, the method further includes:
[0159] The judgment unit is used to judge whether the scene control success rate within the target time period is greater than a preset success rate threshold.
[0160] The alarm unit is used to feedback alarm information if the scene control success rate within the target time period is not greater than a preset success rate threshold.
[0161] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.
[0162] Another embodiment of the present application provides an electronic device, such as Figure 8 As shown, including:
[0163] Memory 801 and processor 802 .
[0164] The memory 801 is used to store programs.
[0165] The processor 802 is used to execute the program stored in the memory 801, and when the program is executed, it is specifically used to implement the method for generating a scene control index provided in any one of the above embodiments.
[0166] In a fourth aspect, the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the method for generating a scene control indicator provided in any one of the above embodiments.
[0167] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0168] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0169] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating a scene control index, characterized in that: include: Acquire each scene data and each action data generated by the scene control within the target time period; wherein one scene data corresponds to one scene control; Associating each of the scene data with the corresponding action data; wherein the action data corresponding to one of the scene data is relevant data of the action executed when the scene control corresponding to the scene data is executed; Based on the action execution results of each controlled device in each action data associated with each of the scene data, determine the number of target scene data in each of the scene data; wherein the target scene data refers to the scene data in which the action execution results of each controlled device in each of the associated action data are only offline and / or successfully executed; Calculating the ratio of the number of the target scene data to the total number of each of the scene data to obtain the scene control success rate within the target time period; The target scene data includes first target scene data and second target scene data, and the action execution results of each controlled device in each action data associated with each scene data are determined based on the number of target scene data in each scene data, including: Determine each of the scenario data whose operation results are successfully executed as the first target scenario data; wherein the operation results in the scenario data are set to be successfully executed when the action execution results of each controlled device in each of the associated action data are successfully executed; Based on the action execution result of each controlled device in each action data associated with each scene data to be processed, the second target scene data is screened out from each scene data to be processed; wherein the scene data to be processed refers to each scene data whose operation result is partially successful; the second target scene data refers to the scene data to be processed whose action execution result of each controlled device in each associated action data is only the device offline and successfully executed; The total number of the first target scene data and the second target scene data is counted.
2. The method according to claim 1, characterized in that: The associating each of the scene data with the corresponding action data comprises: For each of the scene data, the action data and the scene data containing the same serial number as the scene data are associated respectively; wherein, one scene control corresponds to one serial number; and the scene data and the action data generated by one scene control both contain the serial number corresponding to this scene control.
3. The method according to claim 1, characterized in that The step of determining the number of target scene data in each of the scene data based on the action execution results of each of the controlled devices in each of the action data associated with each of the scene data further includes: For each of the scene data, traverse the action execution results of each controlled device in each of the action data associated with the scene data in turn; If the action execution result of any controlled device in each of the action data associated with the scene data is not the device being offline or being successfully executed, the scene data is filtered out; The number of each scene data that has not been filtered out is counted.
4. The method according to claim 1, characterized in that The step of filtering out the second target scene data from each of the scene data to be processed based on the action execution result of each controlled device in each of the action data associated with each of the scene data to be processed includes: Deleting the action execution results of the controlled device in each of the action data associated with each of the scene data to be processed, in which the action execution results are that the device is offline; The action execution results of each controlled device in the associated action data are filtered out from each of the scene data to be processed. After deleting the action execution results of the device offline, all the scene data to be processed that are successfully executed are used as the second target scene data.
5. The method according to claim 1, characterized in that After determining the number of target scene data in each of the scene data based on the action execution results of each controlled device in each of the action data associated with each of the scene data, the method further includes: Marking the scenario data that does not belong to the target scenario data and in which at least one of the associated action data has an action execution result of the controlled device being offline or successfully executed as partially successful; Calculate the ratio of the number of the scene data marked as partially successful to the total number of each of the scene data to obtain a partial success rate; The failure rate is obtained by calculating the ratio of the number of each of the scene data that does not belong to the target scene data and is not marked as partially successful to the total number of each of the scene data.
6. The method according to claim 1, characterized in that After calculating the ratio of the number of the target scene data to the total number of each scene data to obtain the scene control success rate within the target time period, the method further includes: Determine whether the scene control success rate within the target time period is greater than a preset success rate threshold; If the scene control success rate within the target time period is not greater than a preset success rate threshold, an alarm message is fed back.
7. A device for generating a scene control index, characterized in that: include: An acquisition unit, used to acquire each scene data and each action data generated by the scene control within a target time period; wherein one scene data corresponds to one scene control; An associating unit, used to associate each of the scene data with the corresponding action data; wherein the action data corresponding to one of the scene data is relevant data of the action executed when the scene control corresponding to the scene data is executed; A quantity determination unit, configured to determine the quantity of target scene data in each of the scene data based on the action execution results of each controlled device in each of the action data associated with each of the scene data; wherein the target scene data refers to scene data in which the action execution results of each controlled device in each of the associated action data are only device offline and / or successfully executed; A first calculation unit, used to calculate the ratio of the number of the target scene data to the total number of each of the scene data, to obtain the scene control success rate within the target time period; The target scene data includes first target scene data and second target scene data, and the quantity determination unit includes: A first determining unit is used to determine each of the scenario data whose operation results are successfully executed as the first target scenario data; wherein the operation results in the scenario data are set to be successfully executed when the action execution results of each controlled device in each of the associated action data are successfully executed; A first screening unit is used to screen out the second target scenario data from each of the scenario data to be processed based on the action execution result of each controlled device in each of the action data associated with each of the scenario data to be processed; wherein the scenario data to be processed refers to each of the scenario data whose operation results are partially successful; the operation results in the scenario data are set to be partially successful when only part of the action execution results of each controlled device in each of the action data associated with it is successfully executed; the second target scenario data refers to the scenario data to be processed whose action execution results of each controlled device in each of the associated action data are only the device offline and successfully executed; The second counting unit is used to count the total number of the first target scene data and the second target scene data.
8. An electronic device, characterized in that: include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the method for generating a scene control indicator as described in any one of claims 1 to 6.
9. A computer storage medium, characterized in that: Used to store a computer program, which, when executed, is used to implement the method for generating a scene control indicator as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Scene linkage control method, terminal and computer readable storage medium
CN112350907A
Intelligent scene test method and device, electronic equipment and storage medium
CN113032267A