Method and device for generating behavior preference table, storage medium and electronic device

By generating behavior indicators and preference tables, the problem of cumbersome generation of user preference models is solved, and the user behavior preferences is automatically generated, which reduces project maintenance costs and manual workloads, and improves work efficiency.

CN115390466BActive Publication Date: 2024-11-19QINGDAO HAIER TECH +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210910979.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2024-11-19
Estimated Expiration
2042-07-29

AI Technical Summary

Technical Problem

The process of generating existing user preference models is cumbersome, and every time a new user preference is added, it requires rewriting the underlying logic, wasting time and manpower.

Method used

By obtaining the historical behavior log of home appliances, integrating it into the user behavior standard table, and generating behavior indicator tables and behavior preference tables based on the behavior indicators and preference configuration tables, we can automatically generate user behavior preferences. We only need to maintain the configuration table without modifying the underlying layer Code.

Benefits of technology

It greatly reduces project maintenance costs and manual workload, improves work efficiency, and realizes automated user behavior preference generation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115390466B_ABST
    Figure CN115390466B_ABST
Patent Text Reader

Abstract

The present application discloses a method and device for generating a behavior preference table, a storage medium and an electronic device, and relates to the field of smart home technology. The method for generating the behavior preference table includes: obtaining historical behavior data when a target object controls a home appliance to perform a target operation, and integrating the historical operation data into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of the historical behavior data, a behavior name of the historical behavior data, and an execution time of the historical behavior data; generating a behavior indicator table according to a behavior indicator configuration table and standard behavior data, wherein the behavior indicator configuration table includes: a name of a first behavior indicator, a calculation method of the first behavior indicator, and a numerical type of the number of executions corresponding to the first behavior indicator; generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communications, and in particular, to a method and device for generating a behavior preference table, a storage medium, and an electronic device. Background Art

[0002] Currently, user preference is generally defined as the rational and biased choices made by users when considering goods and services. It is mainly applied to the field of goods and services, such as whether a user prefers product A or product B.

[0003] The shortcomings of current user preference models are as follows:

[0004] 1. The application field is too narrow. Currently, it is mostly used in the field of goods and services to recommend goods and services that users like;

[0005] 2. The process of generating the user preference model is too cumbersome. Every time a new user preference is added, the underlying preference calculation logic needs to be rewritten, wasting a lot of time and manpower.

[0006] Regarding the related technologies, the generation process of the user preference model is too cumbersome. Every time a new user preference is added, the underlying preference calculation logic needs to be rewritten, wasting a lot of time and manpower. No effective solution has been proposed yet. Summary of the invention

[0007] The embodiments of the present application provide a method and device for generating a behavior preference table, a storage medium, and an electronic device, so as to at least solve the problem in the related art that the generation process of the user preference model is too cumbersome, and each time a new user preference is added, the underlying preference calculation logic needs to be rewritten, wasting a lot of time and manpower.

[0008] According to an embodiment of the present application, a method for generating a behavior preference table is provided, comprising: obtaining a historical behavior log when a target object controls a household appliance to perform a target operation, and integrating the historical behavior log into a user behavior standard table, wherein the user behavior standard table comprises: a user identifier of the target object, a behavior identifier of standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data; generating a behavior indicator table according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table comprises: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table comprises: an indicator name of a second behavior indicator, a first number of executions of the second behavior indicator, and the first behavior indicator comprises at least: the second behavior indicator; generating a behavior preference table according to the behavior indicator table and a behavior preference configuration table, wherein the behavior preference configuration table comprises: a preference name of a first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table comprises: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0009] In an exemplary embodiment, a behavior indicator table is generated based on a behavior indicator configuration table and the user behavior standard table, including: determining the second behavior indicator corresponding to the standard behavior data and the indicator name of the second behavior indicator in the first behavior indicator; determining a second calculation method for the second behavior indicator and a third numerical type for the number of executions corresponding to the second behavior indicator in the behavior indicator configuration table; calculating the number of executions of the second behavior indicator corresponding to the standard behavior data according to the second calculation method, and determining a numerical value corresponding to the first number of executions according to the third numerical type; generating the behavior indicator table according to the indicator name of the second behavior indicator and the first number of executions represented by the third numerical type.

[0010] In an exemplary embodiment, the execution number of the second behavior indicator corresponding to the standard behavior data is calculated according to the second calculation method, including: when the second calculation method is summation, the number of operation behaviors in the standard behavior data is added to obtain the execution number of the second behavior indicator; when the second calculation method is averaging, the operation behaviors in the standard behavior data are added to obtain the average value to obtain the execution number of the second behavior indicator.

[0011] In an exemplary embodiment, determining the numerical value corresponding to the first execution number according to the third numerical type includes: when the third numerical type indicates an integer type, determining the numerical value corresponding to the first execution number through an integer; when the third numerical type executes a key-value pair type, determining the numerical value corresponding to the first execution number through a key-value pair, wherein the key-value pair is used to indicate the number of executions of the behavior corresponding to the second behavior indicator within the target time period.

[0012] In an exemplary embodiment, a behavior preference table is generated according to the behavior indicator table and the behavior preference configuration table, including: generating the behavior preference configuration table according to the behavior indicator configuration table, wherein the behavior preference configuration table is used to indicate the correspondence between the first behavior indicator and the first behavior preference; determining a second behavior preference corresponding to the second behavior indicator and a preference name of the second behavior preference in the first behavior preference; a first execution number of the second behavior indicator in the behavior indicator table; determining a numerical value corresponding to the second behavior preference according to the first execution number, and generating the behavior preference table according to the preference name of the second behavior preference and the numerical value corresponding to the second behavior preference.

[0013] In an exemplary embodiment, the behavior preference configuration table is generated according to the behavior indicator configuration table, including: determining the first behavior preference corresponding to the first behavior indicator; establishing a correspondence between the first behavior indicator and the first behavior preference according to the indicator name of the first behavior indicator and the preference name of the first behavior preference, and determining a fourth numerical type of the first behavior preference according to the first numerical type of the first behavior indicator; and generating the behavior preference configuration table according to the correspondence and the fourth numerical type.

[0014] In an exemplary embodiment, the historical behavior log is integrated into the user behavior standard table, including: cleaning the historical behavior log to obtain the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data; integrating the user identifier of the target object, the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data into the user behavior standard table.

[0015] According to another embodiment of the embodiment of the present application, a device for generating a behavior preference table is also provided, including: an integration module, used to obtain a historical behavior log when a target object controls a home appliance to perform a target operation, and integrate the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data; a first generation module, used to generate a behavior indicator table according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first number of executions of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator; a second generation module, used to generate a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0016] 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 the above-mentioned method for generating a behavior preference table when running.

[0017] According to another aspect of an embodiment of the present application, an electronic device is 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 generating the behavior preference table through the computer program.

[0018] In an embodiment of the present application, a historical behavior log is obtained when the target object controls the home appliance to perform the target operation, and the historical behavior log is integrated into a user behavior standard table, wherein the user behavior standard table includes: the user identifier of the target object, the behavior identifier of the standard behavior data corresponding to the historical behavior log, the behavior name of the standard behavior data, and the execution time of the standard behavior data; a behavior indicator table is generated according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: the indicator name of the first behavior indicator, the first calculation method of the first behavior indicator, and the first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table includes: the indicator name of the second behavior indicator, the first execution number of the second behavior indicator, and the first behavior indicator includes at least: The second behavior indicator; generate a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: the preference name of the first behavior preference, the second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: the preference name of the second behavior preference and the numerical value corresponding to the second behavior preference; the above technical solution is adopted to solve the problem that the generation process of the user preference model is too cumbersome, and each time a new user preference is added, the underlying preference calculation logic needs to be rewritten, which wastes a lot of time and manpower. In addition, the automatic generation of user behavior preferences is realized in the present application. When there are new user indicators or user preferences, it is only necessary to maintain the behavior indicator configuration table and the behavior preference table, and there is no need to modify the underlying code every time, which greatly reduces the project maintenance cost and manual workload and improves work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0020] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0021] Figure 1 It is a hardware environment diagram of a method for generating a behavior preference table according to an embodiment of the present application;

[0022] Figure 2 is a flow chart of a method for generating a behavior preference table according to an embodiment of the present application;

[0023] Figure 3 is a schematic diagram of a method for generating a behavior preference table according to an embodiment of the present application;

[0024] Figure 4 is a structural block diagram of a device for generating a behavior preference table according to an embodiment of the present application (I);

[0025] Figure 5 This is a structural block diagram of a device for generating a behavior preference table according to an embodiment of the present application (II). DETAILED DESCRIPTION

[0026] 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.

[0027] 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.

[0028] According to one aspect of an embodiment of the present application, a method for generating a behavior preference table is provided. The method for generating a behavior preference table is widely used in smart home (Smart Home), smart home, smart home device ecology, smart house (IntelligenceHouse) ecology and other whole-house intelligent digital control application scenarios. Optionally, in this embodiment, the above-mentioned method for generating a behavior preference table can be applied to Figure 1 In the hardware environment composed of the terminal device 102 and the server 104 shown in FIG. Figure 1 As shown, the server 104 is connected to the terminal device 102 via a network, and can be used to provide services (such as application services, etc.) for the terminal or a client installed on the terminal. A database can be set on the server or independently of the server to provide data storage services for the server 104. Cloud computing and / or edge computing services can be configured on the server or independently of the server to provide data computing services for the server 104.

[0029] The network may include but is not limited to at least one of the following: wired network, wireless network. The wired network may include but is not limited to at least one of the following: wide area network, metropolitan area network, local area network, and the wireless network may include but is not limited to at least one of the following: WIFI (Wireless Fidelity), Bluetooth. The terminal device 102 may be but is not limited to a PC, a mobile phone, a tablet computer, a smart air conditioner, a smart range hood, a smart refrigerator, a smart oven, a smart stove, a smart washing machine, a smart water heater, a smart washing device, a smart dishwasher, a smart projection device, a smart TV, a smart clothes drying rack, a smart curtain, a smart audio and video, a smart socket, a smart speaker, a smart fresh air device, a smart kitchen and bathroom device, a smart bathroom device, a smart sweeping robot, a smart window cleaning robot, a smart mopping robot, a smart air purification device, a smart steamer, a smart microwave oven, a smart kitchen treasure, a smart purifier, a smart water dispenser, a smart door lock, etc.

[0030] In this embodiment, a method for generating a behavior preference table is provided, which is applied to a computer terminal. Figure 2 : is a flow chart of a method for generating a behavior preference table according to an embodiment of the present application, and the flow includes the following steps:

[0031] Step S202, obtaining a historical behavior log when the target object controls the home appliance to perform the target operation, and integrating the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: the user identifier of the target object, the behavior identifier of the standard behavior data corresponding to the historical behavior log, the behavior name of the standard behavior data, and the execution time of the standard behavior data;

[0032] Step S204, generating a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first number of executions of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator;

[0033] Step S206, generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0034] Through the above steps, a historical behavior log when the target object controls the home appliance to perform the target operation is obtained, and the historical behavior log is integrated into the user behavior standard table, wherein the user behavior standard table includes: the user identifier of the target object, the behavior identifier of the standard behavior data corresponding to the historical behavior log, the behavior name of the standard behavior data, and the execution time of the standard behavior data; a behavior indicator table is generated according to the behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: the indicator name of the first behavior indicator, the first calculation method of the first behavior indicator and the first numerical type of the execution number corresponding to the first behavior indicator, and the behavior indicator table includes: the indicator name of the second behavior indicator, the first execution number of the second behavior indicator, and the first behavior indicator includes at least: The second behavior indicator; a behavior preference table is generated according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of the first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of the second behavior preference and a numerical value corresponding to the second behavior preference. This solves the problem in the related art that the generation process of the user preference model is too cumbersome, and each time a new user preference is added, the underlying preference calculation logic needs to be rewritten, wasting a lot of time and manpower. In the present application, automatic generation of user behavior preferences is realized. When there are new user indicators or user preferences, only the behavior indicator configuration table and the behavior preference table need to be maintained, and there is no need to modify the underlying code each time, which greatly reduces the project maintenance cost and manual workload and improves work efficiency.

[0035] Optionally, a behavior indicator table is generated according to a behavior indicator configuration table and the user behavior standard table, including: determining the second behavior indicator corresponding to the standard behavior data and the indicator name of the second behavior indicator in the first behavior indicator; determining the second calculation method of the second behavior indicator and the third numerical type of the execution number corresponding to the second behavior indicator in the behavior indicator configuration table; calculating the execution number of the second behavior indicator corresponding to the standard behavior data according to the second calculation method, and determining the numerical value corresponding to the first execution number according to the third numerical type; generating the behavior indicator table according to the indicator name of the second behavior indicator and the first execution number represented by the third numerical type.

[0036] For example, the behavior name in the standard behavior data is "turn on the air conditioner", and the first behavior indicator includes "number of times the air conditioner is used per day" and "number of times the refrigerator door is opened per day", then the indicator name of the second behavior indicator corresponding to the standard behavior data is "number of times the air conditioner is used per day"; determine the "number of times the air conditioner is used per day" based on the number of standard behavior data with the behavior name of "turn on the air conditioner", and generate a corresponding behavior indicator table.

[0037] Optionally, the execution number of the second behavior indicator corresponding to the standard behavior data is calculated according to the second calculation method, including: when the second calculation method is summation, the number of operation behaviors in the standard behavior data is added to obtain the execution number of the second behavior indicator; when the second calculation method is averaging, the operation behaviors in the standard behavior data are added to obtain the average value to obtain the execution number of the second behavior indicator.

[0038] It should be noted that the behavior indicator configuration table includes: behavior indicator id, behavior indicator name, action id, behavior name of standard behavior data, calculation method (user describes the calculation method of the indicator, such as sum, count, avg, etc.) and indicator type (type 1 is a single value, type 2 is key:value), and then calculates the number of executions of the behavior indicator according to the "calculation method" in the behavior indicator configuration table.

[0039] For example, when the user behavior standard table is Table 1 and the behavior indicator configuration table is Table 2, a behavior indicator table Table 3 is generated according to the user behavior standard table and the behavior indicator configuration table:

[0040] Table 1

[0041] user_id action_id action_name times_tap 100001 A001 Turn on the air conditioner 20220724105322 100001 A002 Turn off the air conditioner 20220724125322 100001 A001 Turn on the air conditioner 20220724145322 100001 A002 Turn off the air conditioner 20220724165322 100001 A001 Turn on the air conditioner 20220724185322 100001 A002 Turn off the air conditioner 20220724205322 ...

[0042] Table 2

[0043]

[0044] Type 1 is a single value, and type 2 is key:value.

[0045] Table 3

[0046]

[0047] Optionally, determining the numerical value corresponding to the first execution number according to the third numerical type includes: when the third numerical type indicates an integer type, determining the numerical value corresponding to the first execution number through an integer; when the third numerical type executes a key-value pair type, determining the numerical value corresponding to the first execution number through a key-value pair, wherein the key-value pair is used to indicate the number of executions of the behavior corresponding to the second behavior indicator within the target time period.

[0048] If the value type corresponding to the "number of times the air conditioner is used per day" in Table 2 is "single value", determine that the value corresponding to the "number of times the air conditioner is used per day" is represented by a single value in Table 3; if the value type corresponding to the "number of times the air conditioner is used per hour" in Table 2 is "key:value", determine that the value corresponding to the "number of times the air conditioner is used per hour" is represented by a key:value format in Table 3.

[0049] Optionally, generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table includes: generating the behavior preference configuration table according to the behavior indicator configuration table, wherein the behavior preference configuration table is used to indicate the correspondence between the first behavior indicator and the first behavior preference; determining a second behavior preference corresponding to the second behavior indicator and a preference name of the second behavior preference in the first behavior preference; a first execution number of the second behavior indicator in the behavior indicator table; determining a numerical value corresponding to the second behavior preference according to the first execution number, and generating the behavior preference table according to the preference name of the second behavior preference and the numerical value corresponding to the second behavior preference.

[0050] For example, when the behavior preference configuration table is Table 4, a behavior preference table Table 5 is generated according to the behavior index table and the behavior preference configuration table:

[0051] Table 4

[0052]

[0053] Table 5

[0054]

[0055] Optionally, generating the behavior preference configuration table according to the behavior indicator configuration table includes: determining the first behavior preference corresponding to the first behavior indicator; establishing a correspondence between the first behavior indicator and the first behavior preference according to the indicator name of the first behavior indicator and the preference name of the first behavior preference, and determining the fourth numerical type of the first behavior preference according to the first numerical type of the first behavior indicator; generating the behavior preference configuration table according to the correspondence and the fourth numerical type.

[0056] That is to say, since the behavior preference configuration table is generated based on the indicator configuration table, for example, the air conditioner usage time period preference (the preference user describes the time period in which the user likes to use the air conditioner) is calculated based on the indicator of the number of air conditioner usages per hour. The purpose of the behavior preference configuration table is to make the behavior indicators and behavior preferences correspond to each other, that is, a behavior preference is calculated based on the corresponding behavior indicators.

[0057] Optionally, the historical behavior log is integrated into the user behavior standard table, including: cleaning the historical behavior log to obtain the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data; integrating the user identifier of the target object, the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data into the user behavior standard table.

[0058] In other words, the data generated by each household appliance during use is integrated into the user behavior standard table.

[0059] In order to better understand the process of the method for generating the above-mentioned behavior preference table, the implementation method flow of generating the above-mentioned behavior preference table 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.

[0060] In this embodiment, a method for generating a behavior preference table is provided. Figure 3 is a schematic diagram of a method for generating a behavior preference table according to an embodiment of the present application, such as Figure 3 As shown, the specific steps are as follows:

[0061] Step 1: Data governance;

[0062] The data generated by each household appliance during use is integrated into a user behavior standard table (equivalent to the user behavior standard table in the above embodiment), and the user behavior standard table is shown in Table 6:

[0063] Table 6

[0064]

[0065]

[0066] The purpose of step 1 above is to standardize user behavior and to clean up standard user behavior from the messy user behavior logs, so as to facilitate automation of subsequent calculations.

[0067] Step 2: Obtain a user indicator configuration table (equivalent to the behavior indicator configuration table in the above embodiment), as shown in Table 7:

[0068] Table 7

[0069]

[0070] The user indicator configuration table is used to maintain user indicators, including indicator id, indicator name, action id, action name, calculation method (the user describes the calculation method of the indicator, such as sum, count, avg, etc.) and indicator type (type 1 is single value, type 2 is key:value)

[0071] Step 3: Combine the user behavior standard table and the user indicator configuration table, and use the python automation script to generate a user indicator table (equivalent to the behavior indicator table in the above embodiment), as shown in Table 8:

[0072] Table 8

[0073]

[0074] The Python script needs to be customized according to the business logic. Generally speaking, the function of the script is to read the user indicator configuration table, then automatically generate the calculation logic of the indicator, and output the calculation results to the user indicator table.

[0075] Step 4: Obtain a user preference configuration table (equivalent to the behavior preference configuration table in the above embodiment), as shown in Table 9:

[0076] Table 9

[0077]

[0078]

[0079] Since the user preference configuration table is generated based on the user index configuration table, for example, the air conditioner usage time period preference (the preference user describes the time period in which the user likes to use the air conditioner) is calculated based on the index of the number of air conditioner usages per hour. The purpose of the user preference configuration table is to match user indexes with user preferences, that is, a certain user preference is calculated based on that user index, and it also serves to realize the automatic calculation of user preferences in the later stage.

[0080] Step 5: Combine the user index table and the user preference configuration table, and use the python automation script to generate a user preference table (equivalent to the behavior preference table in the above embodiment), as shown in Table 10:

[0081] Table 10

[0082]

[0083] The Python script needs to be customized according to the business logic. The function of the script is to read the user preference configuration table, then automatically generate the calculation logic of the indicator, and output the calculation results to the user preference table.

[0084] This application applies user preferences to the field of smart home, and can calculate the user's favorite air conditioning temperature, water heater temperature, TV watching time, light turning time, etc., a series of user's preferred behaviors and states in the process of using smart home. Moreover, the user preference model is automated, requiring only a small amount of manpower to maintain the configuration table, and there is no need to manually rewrite the logic every time a new preference is added.

[0085] 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.

[0086] Figure 4 is a structural block diagram of a device for generating a behavior preference table according to an embodiment of the present application (I); Figure 4 As shown, including:

[0087] An integration module 42 is used to obtain a historical behavior log when the target object controls the home appliance to perform a target operation, and integrate the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of the standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data;

[0088] A first generating module 44 is used to generate a behavior indicator table according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the execution number corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first execution number of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator;

[0089] The second generation module 46 is used to generate a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference and a second numerical type of the number of executions corresponding to the first behavior preference; and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0090] Through the above-mentioned device, a historical behavior log when the target object controls the home appliance to perform the target operation is obtained, and the historical behavior log is integrated into a user behavior standard table, wherein the user behavior standard table includes: the user identifier of the target object, the behavior identifier of the standard behavior data corresponding to the historical behavior log, the behavior name of the standard behavior data, and the execution time of the standard behavior data; a behavior indicator table is generated according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: the indicator name of the first behavior indicator, the first calculation method of the first behavior indicator and the first numerical type of the execution number corresponding to the first behavior indicator, and the behavior indicator table includes: the indicator name of the second behavior indicator, the first execution number of the second behavior indicator, and the first behavior indicator includes at least: The second behavior indicator; a behavior preference table is generated according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of the first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of the second behavior preference and a numerical value corresponding to the second behavior preference. This solves the problem in the related art that the generation process of the user preference model is too cumbersome, and each time a new user preference is added, the underlying preference calculation logic needs to be rewritten, wasting a lot of time and manpower. In the present application, automatic generation of user behavior preferences is realized. When there are new user indicators or user preferences, only the behavior indicator configuration table and the behavior preference table need to be maintained, and there is no need to modify the underlying code each time, which greatly reduces the project maintenance cost and manual workload and improves work efficiency.

[0091] In an exemplary embodiment, the first generation module 44 is used to determine the second behavior indicator and the indicator name of the second behavior indicator corresponding to the standard behavior data in the first behavior indicator; determine the second calculation method of the second behavior indicator and the third numerical type of the execution number corresponding to the second behavior indicator in the behavior indicator configuration table; calculate the execution number of the second behavior indicator corresponding to the standard behavior data according to the second calculation method, and determine the numerical value corresponding to the first execution number according to the third numerical type; generate the behavior indicator table according to the indicator name of the second behavior indicator and the first execution number represented by the third numerical type.

[0092] In an exemplary embodiment, Figure 5 is a structural block diagram of a device for generating a behavior preference table according to an embodiment of the present application (II); Figure 5As shown, the above-mentioned device also includes: a calculation module 52, which is used to add the number of operation behaviors in the standard behavior data to obtain the number of executions of the second behavior indicator when the second calculation method is summation; when the second calculation method is averaging, the operation behaviors in the standard behavior data are added and averaged to obtain the number of executions of the second behavior indicator.

[0093] In an exemplary embodiment, the first generation module 44 is used to determine the numerical value corresponding to the first execution number through an integer when the third numerical type indicates an integer type; and to determine the numerical value corresponding to the first execution number through a key-value pair when the third numerical type executes a key-value pair type, wherein the key-value pair is used to indicate the number of executions of the behavior corresponding to the second behavior indicator within a target time period.

[0094] In an exemplary embodiment, the second generation module 46 is used to generate the behavior preference configuration table according to the behavior indicator configuration table, wherein the behavior preference configuration table is used to indicate the correspondence between the first behavior indicator and the first behavior preference; determine the second behavior preference corresponding to the second behavior indicator and the preference name of the second behavior preference in the first behavior preference; the first execution number of the second behavior indicator in the behavior indicator table; determine the numerical value corresponding to the second behavior preference according to the first execution number, and generate the behavior preference table according to the preference name of the second behavior preference and the numerical value corresponding to the second behavior preference.

[0095] In an exemplary embodiment, the second generation module 46 is used to determine the first behavior preference corresponding to the first behavior indicator; establish a correspondence between the first behavior indicator and the first behavior preference according to the indicator name of the first behavior indicator and the preference name of the first behavior preference, and determine the fourth numerical type of the first behavior preference according to the first numerical type of the first behavior indicator; and generate the behavior preference configuration table according to the correspondence and the fourth numerical type.

[0096] In an exemplary embodiment, the integration module 42 is used to clean up the historical behavior log to obtain the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data; and integrate the user identifier of the target object, the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data into the user behavior standard table.

[0097] 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.

[0098] Optionally, in this embodiment, the storage medium may be configured to store program codes for executing the following steps:

[0099] S1, obtaining a historical behavior log when a target object controls a home appliance to perform a target operation, and integrating the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data;

[0100] S2, generating a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the execution number corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first execution number of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator;

[0101] S3, generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0102] 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.

[0103] 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.

[0104] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0105] S1, obtaining a historical behavior log when a target object controls a home appliance to perform a target operation, and integrating the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data;

[0106] S2, generating a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the execution number corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first execution number of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator;

[0107] S3, generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference, a second numerical type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference.

[0108] 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.

[0109] 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.

[0110] 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.

[0111] The above is only a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for generating a behavior preference table, It is characterized in that include: Obtaining a historical behavior log when the target object controls the home appliance to perform the target operation, and integrating the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of the standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data; Generate a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator, a first number of executions of the second behavior indicator, and the first behavior indicator at least includes: the second behavior indicator; Generate a behavior preference table according to the behavior index table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of a first behavior preference and a second numerical value type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of a second behavior preference and a numerical value corresponding to the second behavior preference; Wherein, generating a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table includes: Executing a python script so that the python script generates the behavior indicator table according to the behavior indicator configuration table and the user behavior standard table; Wherein, generating a behavior indicator table according to the behavior indicator configuration table and the user behavior standard table includes: Determining the second behavior indicator and the indicator name of the second behavior indicator corresponding to the standard behavior data in the first behavior indicator; Determine in the behavior indicator configuration table a second calculation method for the second behavior indicator and a third numerical type of the number of executions corresponding to the second behavior indicator; Calculating the number of executions of the second behavior indicator corresponding to the standard behavior data according to the second calculation method, and determining a value corresponding to the first number of executions according to the third value type; The behavior indicator table is generated according to the indicator name of the second behavior indicator and the first execution number represented by the third numerical type.

2. The method for generating a behavior preference table according to claim 1, It is characterized in that Calculating the execution times of the second behavior indicator corresponding to the standard behavior data according to the second calculation method includes: When the second calculation method is summing, the number of operation behaviors in the standard behavior data is added to obtain the number of executions of the second behavior indicator; When the second calculation method is to calculate the average value, the operation behaviors in the standard behavior data are added together to calculate the average value to obtain the execution times of the second behavior indicator.

3. The method for generating a behavior preference table according to claim 1, It is characterized in that Determining a value corresponding to the first execution number according to the third value type includes: In a case where the third value type indicates an integer type, determining a value corresponding to the first execution number by an integer; In the case where the third numerical type executes a key-value pair type, the numerical value corresponding to the first execution number is determined by a key-value pair, wherein the key-value pair is used to indicate the number of executions of the behavior corresponding to the second behavior indicator within the target time period.

4. The method for generating a behavior preference table according to claim 1, It is characterized in that Generating a behavior preference table according to the behavior indicator table and the behavior preference configuration table includes: generating the behavior preference configuration table according to the behavior indicator configuration table, wherein the behavior preference configuration table is used to indicate the corresponding relationship between the first behavior indicator and the first behavior preference; Determining, in the first behavior preference, a second behavior preference corresponding to the second behavior indicator and a preference name of the second behavior preference; a first execution number of a second behavior indicator in the behavior indicator table; The numerical value corresponding to the second behavior preference is determined according to the first execution count, and the behavior preference table is generated according to the preference name of the second behavior preference and the numerical value corresponding to the second behavior preference.

5. The method for generating a behavior preference table according to claim 4, It is characterized in that Generating the behavior preference configuration table according to the behavior indicator configuration table includes: Determine the first behavior preference corresponding to the first behavior indicator; establishing a correspondence between the first behavior indicator and the first behavior preference according to the indicator name of the first behavior indicator and the preference name of the first behavior preference, and determining a fourth numerical type of the first behavior preference according to the first numerical type of the first behavior indicator; The behavior preference configuration table is generated according to the corresponding relationship and the fourth value type.

6. The method for generating a behavior preference table according to claim 1, It is characterized in that Integrate the historical behavior log into the user behavior standard table, including: Cleaning the historical behavior log to obtain the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data; The user identifier of the target object, the behavior identifier of the standard behavior data, the behavior name of the standard behavior data, and the execution time of the standard behavior data are integrated into a user behavior standard table.

7. A device for generating a behavior preference table, It is characterized in that include: An integration module is used to obtain a historical behavior log when a target object controls a home appliance to perform a target operation, and integrate the historical behavior log into a user behavior standard table, wherein the user behavior standard table includes: a user identifier of the target object, a behavior identifier of the standard behavior data corresponding to the historical behavior log, a behavior name of the standard behavior data, and an execution time of the standard behavior data; A first generating module is used to generate a behavior indicator table according to a behavior indicator configuration table and the user behavior standard table, wherein the behavior indicator configuration table includes: an indicator name of a first behavior indicator, a first calculation method of the first behavior indicator, and a first numerical type of the number of executions corresponding to the first behavior indicator, and the behavior indicator table includes: an indicator name of a second behavior indicator and a first number of executions of the second behavior indicator; A second generating module is used to generate a behavior preference table according to the behavior index table and the behavior preference configuration table, wherein the behavior preference configuration table includes: a preference name of the first behavior preference and a second numerical value type of the number of executions corresponding to the first behavior preference, and the behavior preference table includes: a preference name of the second behavior preference and a numerical value corresponding to the second behavior preference; Wherein, the first generating module is further used to execute a python script, so that the python script generates the behavior indicator table according to the behavior indicator configuration table and the user behavior standard table; Among them, the first generating module is also used to determine the second behavior indicator and the indicator name of the second behavior indicator corresponding to the standard behavior data in the first behavior indicator; determine the second calculation method of the second behavior indicator and the third numerical type of the execution number corresponding to the second behavior indicator in the behavior indicator configuration table; calculate the execution number of the second behavior indicator corresponding to the standard behavior data according to the second calculation method, and determine the numerical value corresponding to the first execution number according to the third numerical type; generate the behavior indicator table according to the indicator name of the second behavior indicator and the first execution number represented by the third numerical type.

8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 6 when executed.

9. An electronic device comprising a memory and a processor, It is characterized in that A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 6 through the computer program.