Method and device for determining operation behavior, storage medium and electronic device
By calculating the conditional probability of continuous operation behavior in smart homes and determining the next operation behavior, the problem of low accuracy in the prior art is solved, and the accuracy and user experience of operation behavior are improved.
Patent Information
- Application Number
- CN202210169940.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-23
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-02-23
AI Technical Summary
In the existing smart home technology, the accuracy of determining the next operation behavior among multiple continuous operation behaviors is low, and environmental data factors are lacking.
By detecting the user's operation behavior on home appliances, obtaining the number of consecutive operation behaviors within the preset time period, calculating the conditional probability of each continuous operation behavior, and determining the behavior with the highest conditional probability as the next behavior to be executed.
Improve the accuracy of the next operation behavior among multiple continuous operation behaviors, and enhance the recommendation accuracy and user experience of operation behaviors.
Smart Images

Figure CN114675551B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home, and more specifically, to a method and device for determining an operation behavior, a storage medium, and an electronic device. Background Art
[0002] At present, in the smart home scenario, common home control systems include Smart Home Brain, which can provide users with proactive and considerate services and improve the security and reliability of smart devices. Smart Home Brain can determine the user's future operation behavior based on the user's historical behavior. Generally, Smart Home Brain analyzes the user's historical behavior, predicts the user's operation behavior based on the user's frequent behavior, and directly recommends the predicted operation behavior to the user through smart devices.
[0003] Although in related technologies, the use of this recommendation scheme can also achieve the purpose of recommending predicted behaviors to users, this technical scheme only determines the operation behavior based on the frequency of occurrence of the behavior. The data type is too single and lacks other environmental data related to the operation behavior, resulting in low accuracy of the obtained operation behavior.
[0004] In the related art, no effective solution has been proposed for the problem of how to improve the accuracy of determining the next operation behavior among multiple consecutive operation behaviors. Summary of the invention
[0005] The embodiments of the present application provide a method and device for determining an operation behavior, a storage medium, and an electronic device to at least solve the problem in the related art of how to improve the accuracy of determining the next operation behavior among multiple continuous operation behaviors.
[0006] According to an embodiment of the present application, a method for determining an operation behavior is provided, including: when it is detected that a first object performs a first operation behavior on a household appliance at a current moment, obtaining the number of times the first object performs multiple consecutive operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment; determining the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are performed, and determining the behavior that is performed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as a second operation behavior, wherein the second operation behavior is the behavior to be performed by the first object after the first operation behavior is completed.
[0007] In an exemplary embodiment, the conditional probability of the multiple continuous operation behaviors is determined based on the number of times the multiple continuous operation behaviors are performed, including: determining the total number of times the first object performs the multiple continuous operation behaviors respectively within the preset time period; determining a first sum value of the multiple total numbers, and determining the ratio of each total number in the multiple total numbers to the first sum value as the conditional probability of each continuous operation behavior, so as to determine the conditional probability of the multiple continuous operation behaviors.
[0008] In an exemplary embodiment, the conditional probability of the multiple continuous operation behaviors is determined based on the number of times the multiple continuous operation behaviors are performed, including: dividing the preset time period into multiple first time periods in units of hours, and counting the first numbers corresponding to the first object performing the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the sum of the first numbers of multiple first numbers; determining the conditional probability of the multiple continuous operation behaviors based on the ratio of the multiple first numbers to the sum of the first numbers.
[0009] In an exemplary embodiment, the conditional probability of the multiple continuous operation behaviors is determined based on the number of times the multiple continuous operation behaviors are performed, including: splitting the preset time period into a second time period and a third time period, and counting the second numbers corresponding to the first object performing the multiple continuous operation behaviors in the second time period and the third time period, respectively, and the sum of the second numbers of the multiple second numbers, wherein the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold; determining the ratio of the multiple second numbers to the sum of the second numbers as the conditional probability of the multiple continuous operation behaviors.
[0010] In an exemplary embodiment, the conditional probability of the multiple continuous operation behaviors is determined based on the number of times the multiple continuous operation behaviors are performed, including: determining the historical operation locations corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period; when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, counting the third number corresponding to the first object performing the multiple continuous operation behaviors, and the sum of the multiple third numbers; and determining the ratio of the third number to the sum of the third numbers as the conditional probability of the multiple continuous operation behaviors.
[0011] In an exemplary embodiment, after determining the historical operation locations corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period, the method also includes: when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are different, obtaining the first continuous operation behavior of the first object at the first operation location, and the second continuous operation behavior of the first object at the second operation location; respectively counting the fourth number of times the first object performs the multiple continuous operation behaviors in the first operation location, the fifth number of times the first object performs the multiple continuous operation behaviors in the second operation location, and the second sum of the fourth number and the fifth number; determining the ratio of the fourth number to the second sum as the conditional probability of the multiple continuous operation behaviors; or, determining the ratio of the fifth number to the sum of the fourth number and the fifth number as the conditional probability of the multiple continuous operation behaviors; wherein the historical operation locations include at least: the first operation location and the second operation location.
[0012] In an exemplary embodiment, determining the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are performed includes: obtaining a first conditional probability, a second conditional probability and a third conditional probability; determining the product of the first conditional probability, the second conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers to the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time period into hours; the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers. The conditional probability is determined by the ratio of the third number to the sum of the third numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period respectively, the number of times the first object uses the household appliance in the second time period is less than the first threshold, and the number of times the first object uses the household appliance in the third time period is greater than the second threshold; the third conditional probability is the conditional probability of the multiple continuous operation behaviors determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0013] According to another embodiment of the embodiments of the present application, a device for determining an operation behavior is also provided, including: an acquisition module, for, when it is detected that a first object performs a first operation behavior on a household appliance at a current moment, obtaining the number of times the first object performs multiple consecutive operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is the time period before the current moment; a determination module, for determining the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are performed, and determining the behavior that is performed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as a second operation behavior, wherein the second operation behavior is the behavior to be performed by the first object after the first operation behavior is completed.
[0014] According to another aspect of the embodiments of the present application, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute a determination method for executing the above-mentioned operation behavior during runtime.
[0015] According to another aspect of an embodiment of the present application, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the method for determining the above-mentioned operation behavior through the computer program.
[0016] In an embodiment of the present application, when it is detected that a first object performs a first operation behavior on a household appliance at the current moment, the number of times the first object performs multiple consecutive operation behaviors within a preset time period is obtained, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is the time period before the current moment; the conditional probability of the multiple continuous operation behaviors is determined according to the number of times the multiple continuous operation behaviors are performed, and the behavior that is performed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability is determined as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is completed; the above-mentioned technical solution is adopted to solve the problem of how to improve the accuracy of determining the next operation behavior among multiple continuous operation behaviors, thereby improving the accuracy of the operation behavior. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0018] Figure 1It is a hardware structure block diagram of a computer terminal of a method for determining an operation behavior in an embodiment of the present application;
[0019] Figure 2 is a flow chart of a method for determining an operation behavior according to an embodiment of the present application;
[0020] Figure 3 is a flowchart of a method for determining an operation behavior according to an embodiment of the present application;
[0021] Figure 4 is a statistical diagram of behavioral habits according to an embodiment of the present application;
[0022] Figure 5 is a schematic diagram of a calculation process of conditional probability according to an embodiment of the present application;
[0023] Figure 6 It is a structural block diagram of a device for determining an operation behavior according to an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. 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 should fall within the scope of protection of the present application.
[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0026] The method embodiments provided in the embodiments of the present application can be executed in a computer terminal or a similar computing device. Taking running on a computer terminal as an example, Figure 1 1 is a hardware structure block diagram of a computer terminal of a method for determining an operation behavior according to an embodiment of the present application. Figure 1 As shown, the computer terminal may include one or more ( Figure 1Only one is shown in the figure) processor 102 (processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. In an exemplary embodiment, the computer terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above-mentioned computer terminal. Figure 1 More or fewer components as shown, or with Figure 1 Equivalent functions or comparisons shown Figure 1 A different configuration with more features is shown.
[0027] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for determining the operation behavior in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0028] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of a computer terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0029] In this embodiment, a method for determining an operation behavior is provided, which is applied to the above-mentioned computer terminal. Figure 2 : is a flowchart of a method for determining an operation behavior according to an embodiment of the present application, and the process includes the following steps:
[0030] Step S202, when it is detected that the first object performs a first operation behavior on the home appliance at the current moment, obtaining the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment;
[0031] It should be noted that the above-mentioned first object can be understood as an object that performs operations on the above-mentioned home appliance, which may include a person, a robot, etc., and this application does not impose any restrictions on this.
[0032] It should be noted that the above-mentioned continuous operation behavior may include the above-mentioned first object's continuous operation on the same household appliance and the above-mentioned first object's continuous operation on different household appliances. For example, if the above-mentioned first object manually adjusts the temperature of the air conditioner after voice-controlling the refrigerator to adjust the temperature of the refrigerator's cold storage compartment, then the continuous operation behavior performed by the first object is "adjust the refrigerator temperature-adjust the air conditioner temperature". Or, after the above-mentioned first object voice-controls the TV to change the TV program, and then voice-controls to increase the TV volume, then the continuous operation behavior performed by the first object is "change the TV program-turn up the TV volume".
[0033] Step S204, determining the conditional probabilities of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are executed, and determining the behavior that is executed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed.
[0034] Through the above steps, when it is detected that the first object performs a first operation behavior on the household appliance at the current moment, the number of times the first object performs multiple consecutive operation behaviors within a preset time period is obtained, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is the time period before the current moment; the conditional probability of the multiple continuous operation behaviors is determined according to the number of times the multiple continuous operation behaviors are performed, and the behavior that is performed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability is determined as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after executing the first operation behavior, which solves the problem of how to improve the accuracy of determining the next operation behavior among multiple continuous operation behaviors in the related technology, thereby improving the accuracy of the next operation behavior among multiple continuous operation behaviors.
[0035] In an exemplary embodiment, in order to better understand how to determine the conditional probabilities of the multiple continuous operation behaviors based on the number of times the multiple continuous operation behaviors are performed in the above-mentioned step S204, the total number of times the first object performs the multiple continuous operation behaviors respectively within the preset time period can be determined; the first sum value of the multiple total numbers is determined, and the ratio of each total number in the multiple total numbers to the first sum value is determined as the conditional probability of each continuous operation behavior to determine the conditional probability of the multiple continuous operation behaviors.
[0036] In an exemplary embodiment, in order to better understand how to determine the conditional probability of the multiple continuous operation behaviors based on the number of times the multiple continuous operation behaviors are performed in the above-mentioned step S204, a technical solution is provided, and the specific steps include: dividing the preset time period into multiple first time periods in units of hours, and counting the first numbers corresponding to the first object performing the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the sum of the first numbers of the multiple first numbers; determining the conditional probability of the multiple continuous operation behaviors based on the ratio of the multiple first numbers to the sum of the first numbers.
[0037] It should be noted that the above-mentioned preset time period, as the time period before the current moment, can be understood as the historical time period corresponding to the user performing continuous operations before the current moment, and may include 24 hours in units of hours, working days, rest days, statutory holidays, etc. This application does not impose any restrictions on this.
[0038] In an exemplary embodiment, in order to better understand how to determine the conditional probability of the multiple continuous operation behaviors based on the number of times the multiple continuous operation behaviors are performed in the above-mentioned step S204, the preset time period can also be divided into a second time period and a third time period, and the second numbers corresponding to the first object performing the multiple continuous operation behaviors in the second time period and the third time period respectively, and the sum of the second numbers of the multiple second numbers are counted, wherein the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold; the ratio of the multiple second numbers to the sum of the second numbers is determined as the conditional probability of the multiple continuous operation behaviors.
[0039] It should be noted that the first threshold and the second threshold may be pre-set fixed values. For example, if the first threshold is set to 10, the time period when the number of times the home appliance is used is less than 10 is determined as the second time period. If the second threshold is set to 20, the time period when the number of times the home appliance is used is greater than 20 is determined as the second time period.
[0040] For example, the second time period and the third time period mentioned above may be working days and rest days, or may be statutory holidays and working days, and this application does not limit this.
[0041] Through the above embodiments, by determining the conditional probabilities of continuous operation behaviors in different time periods, the influence of time factors on the continuous operation behaviors is taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0042] Optionally, in an exemplary embodiment, a technical solution is provided for determining the conditional probability of the multiple continuous operation behaviors based on the number of times the multiple continuous operation behaviors are performed, and the specific steps include: determining the historical operation locations corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period; when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, counting the third number corresponding to the first object performing the multiple continuous operation behaviors, and the sum of the multiple third numbers; and determining the ratio of the third number to the sum of the third numbers as the conditional probability of the multiple continuous operation behaviors.
[0043] Through the above embodiment, the conditional probability of the continuous operation behavior of the first object in the same operation location is determined, and the operation location factor of the continuous operation behavior is taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0044] In an exemplary embodiment, after determining the historical operation locations corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period, a technical solution is also provided, specifically: when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are different, obtain the first continuous operation behavior of the first object at the first operation location, and the second continuous operation behavior of the first object at the second operation location; respectively count the fourth number of times the first object performs the multiple continuous operation behaviors in the first operation location, the fifth number of times the first object performs the multiple continuous operation behaviors in the second operation location, and the second sum of the fourth number and the fifth number; determine the ratio of the fourth number to the second sum as the conditional probability of the multiple continuous operation behaviors; or, determine the ratio of the fifth number to the sum of the fourth number and the fifth number as the conditional probability of the multiple continuous operation behaviors; wherein the historical operation locations include at least: the first operation location and the second operation location.
[0045] Through the above embodiment, the conditional probability of the first object at different operation locations is determined according to the number of consecutive operation behaviors of the first object at different operation locations, and the operation locations of the consecutive operation behaviors are taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0046] Optionally, in an exemplary embodiment, other technical solutions for determining the conditional probabilities of the multiple consecutive operation behaviors according to the number of times the multiple consecutive operation behaviors are performed are also proposed, including:
[0047] Solution 1: Obtain a first conditional probability, a second conditional probability and a third conditional probability; determine the product of the first conditional probability, the second conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers to the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time period into hours; the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers, and the second number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods. An object performs the multiple continuous operation behaviors for a corresponding number of times in a second time period and a third time period respectively, the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold; the third conditional probability is the conditional probability of the multiple continuous operation behaviors determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0048] Solution 2: Obtain a first conditional probability and a second conditional probability; determine the product of the first conditional probability and the second conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers and the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time periods into units of hours; the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers and the sum of multiple second numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period, the number of times the first object uses the home appliance in the second time period is less than a first threshold, and the number of times the first object uses the home appliance in the third time period is greater than a second threshold.
[0049] Solution 3: Obtain a first conditional probability and a third conditional probability; determine the product of the first conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers and the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time periods into hours; the third conditional probability is a conditional probability determined according to the ratio of the third number and the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0050] Solution 4: Obtain a second conditional probability and a third conditional probability; determine the product of the second conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period respectively, the number of times the first object uses the home appliance in the second time period is less than a first threshold, and the number of times the first object uses the home appliance in the third time period is greater than the second threshold; the third conditional probability is a conditional probability determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0051] Through the above embodiments, a variety of technical solutions for determining the conditional probabilities of continuous operation behaviors are provided, the calculation methods of the conditional probabilities are increased, and the accuracy of the calculation results of the conditional probabilities is improved.
[0052] In order to better understand the process of the method for determining the above-mentioned operation behavior, the implementation method flow of determining the above-mentioned operation behavior is described below in combination with an optional embodiment, but it is not used to limit the technical solution of the embodiment of the present application.
[0053] In this embodiment, a method for determining an operation behavior is provided. Figure 3 is a flow chart of a method for determining an operation behavior according to an embodiment of the present application, such as Figure 3 As shown, the details are as follows:
[0054] Step S301: determining the continuous operation behavior of the user (equivalent to the first object mentioned above);
[0055] The acquired historical behavior records of the user are analyzed to determine the number of consecutive operation behaviors of the user in the historical time period (equivalent to the number of times the first object performs multiple consecutive operation behaviors in the preset time period).
[0056] In one embodiment, in combination Figure 4 Analyze the statistical process of the user's continuous operation behavior. For example, after user 1 performs behavior A, he continuously performs behavior B. Then the continuous operation behavior of user 1 is AB behavior. Figure 4 As shown, the number of times the user's AB behavior is executed is 3.
[0057] Step S302: Analyze the conditional probability of the user's continuous behavior in each time period. Specifically, the analysis can be performed in the following ways:
[0058] Method 1: Determine the conditional probability of continuous operation behaviors in each period of the historical time period in units of hours. For example, the number of times behavior 1 occurs between 13:00 and 14:00 is 8, and the number of times behavior 2 occurs after behavior 1 is 4. Then the probability of behavior 2 occurring after behavior 1 is 0.5.
[0059] Method 2: Divide the date into working days and weekends (equivalent to the third period mentioned above), or divide the date into holidays and ordinary time (equivalent to the third period mentioned above), and calculate the conditional probability of the behavior in the same way as in Method 1;
[0060] Method 4: Calculate the conditional probability of the user's continuous operation behavior in each space (equivalent to the above operation location). The conditional probability of the user's continuous operation behavior in the kitchen is expressed as P(AB|kitchen), and the conditional probability of the user's continuous operation behavior in the living room is expressed as P(AB|living room).
[0061] Step S303: predicting the user's operation behavior (equivalent to the second operation behavior described above).
[0062] If it is determined that the user performs behavior A, first obtain all the behaviors performed by the user after performing A from the user's historical behavior records; calculate the probability of the user's behavior after performing behavior A in the historical time period according to the calculation method of the conditional probability in step S302.
[0063] In one embodiment, if it is determined that the user performs B and C successively after performing behavior A, the following calculation formula is used to calculate the conditional probability that the user performs behaviors A, B, and C successively:
[0064] P(A,B,C)=P(B|A)×P(C|B) (1).
[0065] In one embodiment, the continuous operation behaviors performed by the user corresponding to the conditional probability greater than a preset threshold can be sent to the user as the predicted operation behavior, thereby improving the accuracy of the next operation behavior in the continuous operation behavior recommended to the user and improving the user's usage experience.
[0066] Through the above embodiments, the user's continuous operation behaviors are obtained based on the perspective of time and space, which enriches the analysis level of the user's historical records and improves the accuracy of determining the next operation behavior among multiple continuous operation behaviors.
[0067] In an optional exemplary embodiment, in combination Figure 5 The process of determining the continuous operation behaviors of the user in the second time period and the third time period is described, wherein the continuous operation behaviors of the user occur at the same operation location. Figure 5 As shown, after analyzing the user's historical behavior records, it is determined that the user's continuous operation behaviors include behavior AB and behavior AC, and the conditional probability of the user executing behavior AB between 16:00 and 17:00 (equivalent to the above-mentioned second time period) is 0.7, and the conditional probability of executing behavior AC is 0.3; the conditional probability of the user executing behavior AB on weekends (equivalent to the above-mentioned third time period) is 0.4, and the conditional probability of executing behavior AC is 0.6; the conditional probability of the user executing behavior AB in the living room (equivalent to the above-mentioned operation location) is 0.8, and the conditional probability of executing behavior AC is 0.2.
[0068] Furthermore, the probability P(AB) that the user performs continuous operation AB in the living room between 16:00 and 17:00 on weekends is calculated as:
[0069] P(AB) = P(B|living room, A) × P(B|16:00 to 17:00, A) × P(B|rest day, A)
[0070] =0.8×0.7×0.4=0.0224 (2).
[0071] Similarly, the probability P(AC) that the user performs continuous operation AC in the living room between 16:00 and 17:00 on weekends is calculated as:
[0072] P(AC) = P(C|Living room, A) × P(C|16:00 to 17:00, A) × P(C|Holiday, A)
[0073] =0.2×0.3×0.6=0.0036 (3).
[0074] Through the above embodiments, the purpose of predicting the user's operation behavior based on the continuous operation behaviors in the user's historical behavior records is achieved, and the user's operation behavior is predicted from multiple dimensions in combination with environmental information such as time and place, thereby improving the prediction accuracy of the next operation behavior among the user's multiple continuous operation behaviors.
[0075] Furthermore, the user experience is improved by predicting the user's next operation behavior and providing reasonable operation suggestions based on the predicted operation behavior.
[0076] In addition, the above embodiment proposes a simple algorithm structure, which has a high reusability rate of various information used to implement the algorithm, reduces the difficulty and complexity of implementing the algorithm, and improves the executability of the algorithm.
[0077] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.
[0078] Figure 6 is a structural block diagram of a device for determining an operation behavior according to an embodiment of the present application; Figure 6 As shown, including:
[0079] an acquisition module 62, configured to acquire, when it is detected that the first object performs a first operation behavior on the household appliance at the current moment, the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment;
[0080] It should be noted that the above-mentioned first object can be understood as an object that performs operations on the above-mentioned home appliance, which may include a person, a robot, etc., and this application does not impose any restrictions on this.
[0081] It should be noted that the above-mentioned continuous operation behavior may include the above-mentioned first object's continuous operation on the same household appliance and the above-mentioned first object's continuous operation on different household appliances. For example, if the above-mentioned first object manually adjusts the temperature of the air conditioner after voice-controlling the refrigerator to adjust the temperature of the refrigerator's cold storage compartment, then the continuous operation behavior performed by the first object is "adjust the refrigerator temperature-adjust the air conditioner temperature". Or, after the above-mentioned first object voice-controls the TV to change the TV program, and then voice-controls to increase the TV volume, then the continuous operation behavior performed by the first object is "change the TV program-turn up the TV volume".
[0082] Determination module 64 is used to determine the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are executed, and determine the behavior that is executed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed.
[0083] Through the above-mentioned device, when it is detected that the first object performs a first operation behavior on the household appliance at the current moment, the number of times the first object performs multiple consecutive operation behaviors within a preset time period is obtained, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is the time period before the current moment; the conditional probability of the multiple continuous operation behaviors is determined according to the number of times the multiple continuous operation behaviors are performed, and the behavior that is performed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability is determined as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed, which solves the problem in the related art of how to improve the accuracy of determining the next operation behavior among multiple continuous operation behaviors, thereby improving the accuracy of the next operation behavior among multiple continuous operation behaviors.
[0084] In an exemplary embodiment, the above-mentioned determination module is also used to determine the total number of times that the first object performs multiple continuous operation behaviors within the preset time period; determine a first sum value of the multiple total numbers, and determine the ratio of each total number in the multiple total numbers to the first sum value as the conditional probability of each continuous operation behavior, so as to determine the conditional probability of the multiple continuous operation behaviors.
[0085] In an exemplary embodiment, the above-mentioned determination module is also used to divide the preset time period into multiple first time periods in units of hours, and count the first times corresponding to the first object performing the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the sum of the first times of multiple first times; determine the conditional probability of the multiple continuous operation behaviors based on the ratio of the multiple first times to the sum of the first times.
[0086] It should be noted that the above-mentioned preset time period, as the time period before the current moment, can be understood as the historical time period corresponding to the user performing continuous operations before the current moment, and may include 24 hours in units of hours, working days, rest days, statutory holidays, etc. This application does not impose any restrictions on this.
[0087] In an exemplary embodiment, the above-mentioned determination module is also used to split the preset time period into a second time period and a third time period, and count the second numbers corresponding to the first object performing the multiple continuous operation behaviors in the second time period and the third time period, respectively, and the sum of the second numbers of the multiple second numbers, wherein the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold; and the ratio of the multiple second numbers to the sum of the second numbers is determined as the conditional probability of the multiple continuous operation behaviors.
[0088] It should be noted that the first threshold and the second threshold may be pre-set fixed values. For example, if the first threshold is set to 10, the time period when the number of times the home appliance is used is less than 10 is determined as the second time period. If the second threshold is set to 20, the time period when the number of times the home appliance is used is greater than 20 is determined as the second time period.
[0089] For example, the second time period and the third time period mentioned above may be working days and rest days, or may be statutory holidays and working days, and this application does not limit this.
[0090] Through the above embodiments, by determining the conditional probabilities of continuous operation behaviors in different time periods, the influence of time factors on the continuous operation behaviors is taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0091] Optionally, in an exemplary embodiment, the above-mentioned determination module is also used to determine the historical operation locations corresponding to the first object performing multiple continuous operation behaviors within the preset time period; when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, count the third times corresponding to the first object performing the multiple continuous operation behaviors, and the sum of the multiple third times; determine the ratio of the third time to the sum of the third times as the conditional probability of the multiple continuous operation behaviors.
[0092] Through the above embodiment, the conditional probability of the continuous operation behavior of the first object in the same operation location is determined, and the operation location factor of the continuous operation behavior is taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0093] In an exemplary embodiment, the above-mentioned determination module is also used to, when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are different, obtain the first continuous operation behavior of the first object at the first operation location, and the second continuous operation behavior of the first object at the second operation location; respectively count the fourth number of times the first object performs the multiple continuous operation behaviors in the first operation location, the fifth number of times the first object performs the multiple continuous operation behaviors in the second operation location, and the second sum of the fourth number and the fifth number; determine the ratio of the fourth number to the second sum as the conditional probability of the multiple continuous operation behaviors; or, determine the ratio of the fifth number to the sum of the fourth number and the fifth number as the conditional probability of the multiple continuous operation behaviors; wherein the historical operation locations include at least: the first operation location and the second operation location.
[0094] Through the above embodiment, the conditional probability of the first object at different operation locations is determined according to the number of consecutive operation behaviors of the first object at different operation locations, and the operation locations of the consecutive operation behaviors are taken into consideration, thereby improving the calculation accuracy of the conditional probability.
[0095] Optionally, in an exemplary embodiment, the above-mentioned operation behavior device further includes a first probability determination module, a second probability determination module, a third probability determination module, and a fourth probability determination module, specifically:
[0096] The above-mentioned first probability determination module is used to obtain a first conditional probability, a second conditional probability and a third conditional probability; the product of the first conditional probability, the second conditional probability and the third conditional probability is determined as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers to the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time period into hours; the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period respectively, the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold; the third conditional probability is the conditional probability of the multiple continuous operation behaviors determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0097] The above-mentioned second probability determination module is used to obtain a first conditional probability and a second conditional probability; and determine the product of the first conditional probability and the second conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers and the sum of multiple first numbers, and the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time periods into units of hours; the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers and the sum of multiple second numbers, and the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period, respectively, and the number of times the first object uses the household appliance in the second time period is less than a first threshold, and the number of times the first object uses the household appliance in the third time period is greater than a second threshold.
[0098] The above-mentioned third probability determination module is used to obtain the first conditional probability and the third conditional probability; determine the product of the first conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein, the first conditional probability is a conditional probability determined according to the ratio of multiple first numbers and the sum of multiple first numbers, the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of the multiple first time periods, and the multiple first time periods are obtained by splitting the preset time periods in units of hours; the third conditional probability is determined as the conditional probability of the multiple continuous operation behaviors according to the ratio of the third number and the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0099] The fourth probability determination module is used to obtain a second conditional probability and a third conditional probability; and determine the product of the second conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein the second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period respectively, the number of times the first object uses the home appliance in the second time period is less than the first threshold, and the number of times the first object uses the home appliance in the third time period is greater than the second threshold; the third conditional probability is a conditional probability determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object in the preset time period.
[0100] Through the above embodiments, a variety of technical solutions for determining the conditional probabilities of continuous operation behaviors are provided, the calculation methods of the conditional probabilities are increased, and the accuracy of the calculation results of the conditional probabilities is improved.
[0101] An embodiment of the present application further provides a storage medium, which includes a stored program, wherein the program executes any of the above methods when it is run.
[0102] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:
[0103] S1, when it is detected that a first object performs a first operation behavior on a household appliance at a current moment, obtaining the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment;
[0104] S2, determining the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are executed, and determining the behavior that is executed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed.
[0105] An embodiment of the present application further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0106] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0107] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0108] S1, when it is detected that a first object performs a first operation behavior on a household appliance at a current moment, obtaining the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment;
[0109] S2, determining the conditional probability of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are executed, and determining the behavior that is executed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed.
[0110] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store program codes.
[0111] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0112] Obviously, those skilled in the art should understand that the above modules or steps of the present application can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, and optionally, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order from that herein, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present application is not limited to any specific combination of hardware and software.
[0113] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principles of the present application shall be included in the protection scope of the present application.
Claims
1. A method for determining an operation behavior, characterized in that: include: In the case where it is detected that the first object performs a first operation behavior on the household appliance at the current moment, obtaining the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is the time period before the current moment; determining the conditional probabilities of the multiple continuous operation behaviors according to the number of times the multiple continuous operation behaviors are executed, and determining the behavior that is executed continuously with the first operation behavior among the continuous operation behaviors with the highest conditional probability as the second operation behavior, wherein the second operation behavior is the behavior to be executed by the first object after the first operation behavior is executed; Determining the conditional probabilities of the plurality of consecutive operation behaviors according to the number of times the plurality of consecutive operation behaviors are performed includes: Obtain the first conditional probability, the second conditional probability and the third conditional probability; Determine the product of the first conditional probability, the second conditional probability and the third conditional probability as the conditional probability of the plurality of continuous operation behaviors; The first conditional probability is a conditional probability determined according to the ratio of a plurality of first numbers to the sum of a plurality of first numbers, the first number is the number of times the first object performs the plurality of consecutive operation behaviors in each of a plurality of first time periods, and the plurality of first time periods are obtained by splitting the preset time period into hours; The second conditional probability is a conditional probability determined according to a ratio of a plurality of second numbers to a sum of a plurality of second numbers, the second number is a number of times the first object performs the plurality of consecutive operation behaviors in a second time period and a third time period respectively, the number of times the first object uses the home appliance in the second time period is less than a first threshold, and the number of times the first object uses the home appliance in the third time period is greater than a second threshold; The second conditional probability is determined according to the ratio of the plurality of second secondary numbers to the sum of the plurality of second secondary numbers in the following manner: The second number is the number of times the first object performs the multiple consecutive operation behaviors in the second time period, and a conditional probability is determined based on the ratio of the multiple second numbers to the sum of the multiple second numbers; For the second number of times being the number of times the first object performs the plurality of consecutive operation behaviors within a third time period, another conditional probability is determined based on a ratio of the plurality of second numbers to the sum of the plurality of second numbers; determining the second conditional probability based on a product of the one conditional probability and the other conditional probability; The third conditional probability is the conditional probability of the multiple continuous operation behaviors determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period.
2. A device for determining an operation behavior, characterized in that: include: an acquisition module, configured to, when detecting that a first object performs a first operation behavior on a household appliance at a current moment, acquire the number of times the first object performs multiple continuous operation behaviors within a preset time period, wherein the first operation behavior of any continuous operation behavior among the multiple continuous operation behaviors is the first operation behavior, and the preset time period is a time period before the current moment; a determination module, configured to determine the conditional probabilities of the plurality of consecutive operation behaviors according to the number of times the plurality of consecutive operation behaviors are executed, and determine, among the consecutive operation behaviors with the highest conditional probability, the behavior that is executed consecutively with the first operation behavior as a second operation behavior, wherein the second operation behavior is a behavior to be executed by the first object after the first operation behavior is executed; The determination module is further used to obtain a first conditional probability, a second conditional probability and a third conditional probability; and determine the product of the first conditional probability, the second conditional probability and the third conditional probability as the conditional probability of the multiple continuous operation behaviors; wherein the first conditional probability is a conditional probability determined according to a ratio of multiple first numbers and a sum of multiple first numbers, and the first number is the number of times the first object performs the multiple continuous operation behaviors in each first time period of multiple first time periods, and the multiple first time periods are obtained by splitting the preset time period into hours; The second conditional probability is a conditional probability determined according to the ratio of multiple second numbers to the sum of multiple second numbers, the second number is the number of times the first object performs the multiple continuous operation behaviors in the second time period and the third time period respectively, the number of times the first object uses the home appliance in the second time period is less than a first threshold, and the number of times the first object uses the home appliance in the third time period is greater than a second threshold; the second conditional probability is determined according to the ratio of multiple second numbers to the sum of multiple second numbers in the following manner: for the second number being the number of times the first object performs the multiple continuous operation behaviors in the second time period, a conditional probability is determined based on the ratio of the multiple second numbers to the sum of the multiple second numbers; for the second number being the number of times the first object performs the multiple continuous operation behaviors in the third time period, another conditional probability is determined based on the ratio of the multiple second numbers to the sum of the multiple second numbers; the second conditional probability is determined based on the product of the one conditional probability and the other conditional probability; The third conditional probability is the conditional probability of the multiple continuous operation behaviors determined according to the ratio of the third number to the sum of the third numbers, the third number is the number of times the first object performs the multiple continuous operation behaviors when it is determined that the historical operation locations corresponding to the multiple continuous operation behaviors are the same, and the historical operation location is the operation location corresponding to the multiple continuous operation behaviors performed by the first object within the preset time period.
3. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in claim 1 when executed.
4. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method described in claim 1 through the computer program.
