WO2020107184A1 - 一种模型选择方法和终端 - Google Patents
一种模型选择方法和终端 Download PDFInfo
- Publication number
- WO2020107184A1 WO2020107184A1 PCT/CN2018/117534 CN2018117534W WO2020107184A1 WO 2020107184 A1 WO2020107184 A1 WO 2020107184A1 CN 2018117534 W CN2018117534 W CN 2018117534W WO 2020107184 A1 WO2020107184 A1 WO 2020107184A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- model
- terminal
- user
- behavior data
- next time
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N5/00—Computing arrangements using knowledge-based models
- G06N5/04—Inference or reasoning models
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q10/00—Administration; Management
- G06Q10/04—Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0481—Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
- G06F3/0482—Interaction with lists of selectable items, e.g. menus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0484—Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
- G06F3/04842—Selection of displayed objects or displayed text elements
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/048—Interaction techniques based on graphical user interfaces [GUI]
- G06F3/0487—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
- G06F3/0488—Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N20/00—Machine learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q30/00—Commerce
- G06Q30/06—Buying, selling or leasing transactions
- G06Q30/0601—Electronic shopping [e-shopping]
- G06Q30/0631—Recommending goods or services
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- This application relates to the field of terminal technology, and in particular, to a model selection method and terminal.
- AI artificial intelligence
- the realization of AI-related services by the terminal depends on model calculation.
- the terminal may collect feature data and use the feature data as an input parameter of the model.
- the mobile terminal runs the model to obtain an output result, and the terminal provides AI-related services based on the output result.
- the models used when the terminal implements the same AI-related functions are always the same model.
- the model selection is single, which is not flexible enough to meet the trend of terminal intelligence.
- This application provides a method and terminal for model selection, which improves the flexibility of model selection and can better meet the needs of various AI functions.
- an embodiment of the present application provides a method for selecting a model, which can be executed by a terminal (such as a mobile phone, ipad, notebook computer, etc.).
- the method includes: a terminal acquiring first behavior data of a user operating the terminal; the terminal selecting a first model from a plurality of models stored in the terminal according to a preset policy; the terminal converting the first behavior data As an input parameter of the first model, run the first model to obtain a first output result; the terminal provides a first artificial intelligence AI service based on the first output result; when the first model does not satisfy the conditions At this time, the terminal selects a second model from multiple models again; the terminal uses the second behavior data as an input parameter of the second model, operates the second model, and obtains a second output result; wherein, the first The second behavior data is generated after the first behavior data and belongs to the same behavior of the user operating the terminal; the terminal continues to provide the first AI service based on the second output result.
- the process for the terminal to provide an AI service is that the terminal selects a first model from a plurality of models, and uses the first model to provide an AI service (using user behavior data as an input parameter of the first model to obtain Output results, and provide AI services based on the output results). For example, use the model to predict the next application (output result) that the user may click, and then preload the application.
- the output may be inaccurate.
- the terminal can reselect the second model, and continue to use the second model to provide AI services.
- the terminal can use different models in the process of providing an AI service, improve the flexibility of selecting models, provide more accurate AI services, and improve the user experience.
- the terminal uses the first behavior data as an input parameter of the first model, and before running the first model, the terminal evaluates the first model;
- the terminal uses the first behavior data as an input parameter of the first model, and running the first model includes: when the evaluation result of the first model meets the condition, the terminal uses the first behavior data As an input parameter of the first model, run the first model to obtain an output result.
- the terminal can evaluate the model before using the model, and the model can be used only when the evaluation result meets the condition. When the evaluation result does not meet the condition, the terminal can reselect the model. In this way, it is helpful to choose a better-evaluated model and improve the accuracy of model selection.
- the terminal determines values of input parameters and output parameters; the terminal takes values of the determined input parameters and output parameters The value is brought into the formula of the first model to determine the value of the model parameter of the first model, the model parameter is other parameters except the input parameter and the output parameter in the first model Value; or the terminal determines the value of the model parameter corresponding to the first model according to the correspondence between the model and the value of the model parameter.
- the formula of the model includes input parameters, output parameters, and model parameters.
- the terminal Before the terminal evaluates the model, it can first determine the value of the model parameter. Specifically, the terminal can determine the value of the model parameter in two ways, such as substituting the value of the known input parameter and output parameter into the formula of the model to obtain the value of the model parameter. This method helps improve Determine the accuracy of the model parameter values.
- the correspondence between the model and the model parameter values is stored in the terminal in advance, and the terminal can select the model parameter values from it. This method is relatively simple and helps to improve the calculation efficiency.
- the evaluation of the first model by the terminal includes: the terminal acquiring third behavior data of a user operating the terminal, the third behavior data is in the first behavior data Generated before; the terminal uses the third behavior data as an input parameter of the first model, and runs the first model to obtain a test result; the terminal compares the test result with an actual result, the actual The result is the actual operation of the user after the third behavior data; if they match, the evaluation result of the first model meets the conditions; if they do not match, the evaluation result of the first model does not meet the conditions.
- the evaluation process of the model by the terminal is that the model is used to obtain the test result, and the test result is compared with the actual result. If the test result is consistent, the evaluation result of the model satisfies the conditions. The result does not meet the conditions. In this way, it is helpful to choose a better-evaluated model and improve the accuracy of model selection.
- the terminal selecting the first model from a plurality of models according to a preset strategy includes: the terminal randomly selecting the first model from the plurality of models, or the terminal according to the Q-table Select the model with the largest Q value, the Q-table includes the Q value corresponding to each model, the Q value is related to the evaluation result of each model; or the terminal selects the current service according to the current service Corresponding first model.
- the terminal there are various ways for the terminal to select one model from multiple models, for example, according to service selection.
- the two businesses of predicting the next click of the app and predicting the next click of the merchandise category can choose different models. In this way, it helps to improve the accuracy of model selection.
- the first output result is the next possible behavior of the user after the first behavior data; when the first model does not satisfy the condition, the terminal selects from multiple models again
- the second model includes: when the behavior predicted by the model next time that the user may happen is different from the behavior actually happened next, the terminal reselects the second model; or when the first model is used When the preset time is reached, the terminal reselects the second model.
- the output result obtained by the terminal using the model is to predict the next possible behavior of the user. Therefore, when the terminal uses the last selected model to provide AI services, if the last selected model cannot accurately predict the user's next possible behavior or the last selected model is used for a long time, the terminal reselects other model. In this way, it helps to improve the accuracy of model selection, and thus can more accurately predict the user's next possible behavior.
- the first behavior data or the second behavior data includes an application that the user has clicked three times recently;
- the first output result or the second output result is an application that the user may click next time ;
- the terminal can predict which application the user may click next time, so as to provide a corresponding AI service (such as preloading the application) to improve the user experience.
- a corresponding AI service such as preloading the application
- the third behavior data includes an application that has been clicked three times in a row before the most recent application is clicked, and the actual result is an application that was clicked before the application that was clicked three times in a row.
- the third behavior data used by the terminal in evaluating the model may be three consecutive clicks before the most recent application click.
- the terminal uses the third behavior data as the input parameter of the model to obtain the test result. If the test result is consistent with the actual result (before the three consecutive clicks on the application, the previous clicked application), the evaluation result is satisfied If the conditions do not match, the evaluation result does not meet the conditions. In this way, it helps to select a better-evaluated model, improve the accuracy of model selection, and then more accurately predict which application the user may click next, so as to provide corresponding AI services (such as pre-loaded applications) and improve user experience.
- AI services such as pre-loaded applications
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: an application predicted by the model that the user may click next time and a user next time The actual clicked application is different.
- the terminal uses the model selection method provided in the embodiment of the present application to predict that the user may click the application next time to provide the corresponding AI service, and the model can be replaced.
- the model selected last time cannot be accurately used.
- the predicted user may click on the application next time, and then select another model. In this way, the accuracy of model selection is improved, thereby predicting more accurately which application the user may click next time, so as to provide corresponding AI services (such as preloaded applications) and improve the user experience.
- the terminal provides AI-related services based on the first output result or the second output result, including: the terminal preloading an application that the user may click next time; or the terminal Close other applications that are not in the background running application in the background that the user may click next; or the terminal outputs a prompt message, the prompt information is used to remind the user that the user may click the next application, when the terminal When it is detected that the user determines the prompt information, an application that the user may click next time is loaded.
- the AI service provided by the terminal may include preloading the user's next possible click Application; or close other applications that are not in the background running application that the user may click next time; or output prompt information, the prompt information is used to remind the user that the user may click next application, when the When the terminal detects that the user determines the prompt information, it loads an application that the user may click next time. In this way, it is convenient for the user to operate the terminal and improve the user experience.
- the first behavior data or the second behavior data includes: the commodity type of the commodity that the user has clicked three times recently; the first output result or the second output result is the next time the user Types of products that may be clicked.
- the terminal can predict the type of the product that the user may click next time in order to provide corresponding AI services (such as preloading the product of this type) to improve the user experience.
- the third behavior data includes the product category that was clicked three times in a row before the product category that was last clicked, and the actual result is the previous click before the product category was clicked three times in a row. product category.
- the third behavior data used by the terminal in evaluating the model may be continuous before the last click of the product type.
- the terminal uses the third behavior data as the input parameter of the model to obtain the test result. If the test result is consistent with the actual result (the product type of the previous click before the three consecutive product product clicks) , The evaluation result meets the condition, and if it does not match, the evaluation result does not meet the condition.
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: the type of goods predicted by the model and the user may click next The types of products that are actually clicked once are different.
- the terminal uses the model selection method provided in the embodiment of the present application to predict the type of commodities that the user may click next time to provide the corresponding AI service.
- the model can be replaced. For example, the model selected last time cannot be used.
- the predicted user may click on the product category next time, and then choose another model. In this way, the accuracy of model selection is improved, and thus the user may more accurately predict the type of product that the user may click next time, so as to provide corresponding AI services (such as preloading the product of this type) and improve the user experience.
- the terminal provides AI-related services based on the first output result or the second output result, including: the terminal preloading the type of goods that the user may click next time; or The terminal outputs a prompt message, the prompt message is used to prompt the product category that the user may click next time, and when the terminal detects that the user determines the prompt message, the product category that the user may click next time is loaded; or The terminal outputs prompt information, and the prompt information is used to recommend a product type of interest to the user, and the product type of interest is the same as the product type that the user may click next time.
- the terminal uses the model selection method provided in the embodiment of the present application to predict the next possible type of product that the user may click to provide the corresponding AI service.
- the AI service provided by the terminal may include preloading the user’s next possible click Commodity type; or output prompt information for prompting the product type that the user may click next time, when the terminal detects that the user determines the prompt information, load the product type that the user may click next time; or output the prompt information , Which is used to recommend the kind of products of interest to users. In this way, it is convenient for the user to operate the terminal and improve the user experience.
- the first model or the second model is one of a decision tree, neural unit, logistic regression LR, naive Bayes NB classification algorithm, random forest RF algorithm and support vector machine SVM algorithm .
- an embodiment of the present application provides a model selection method, which may be performed by a server.
- the method includes: a server receiving first behavior data of a user operating the terminal sent by a terminal; the server selecting a first model from a plurality of models stored in the server according to a preset strategy; A behavior data is used as an input parameter of the first model, and the first model is run to obtain a first output result; the server sends the first output result to a terminal, and the terminal is based on the first output result Provide a first artificial intelligence AI service; when the first model does not meet the conditions, the server selects a second model from multiple models again; the server uses the second behavior data as the input parameter of the second model , Computing the second model to obtain a second output result; wherein, the second behavior data is sent by the terminal, generated after the first behavior data, and belongs to a similar behavior of a user operating the terminal; the server Sending the second output result to the terminal, and the terminal continues to provide the first AI service based on the second output result
- the terminal may collect user behavior data, send the behavior data to the server, and the server selects a model and runs the model to obtain an output result. Based on this output, the terminal provides AI services. Specifically, after the server selects a model, if the model does not meet the conditions, it can re-select the model. In this way, it helps to improve the accuracy of model selection, so that the terminal can get more accurate output results, and then more accurately provide AI services to improve the user experience.
- the server uses the first behavior data as an input parameter of the first model, and before running the first model, the server evaluates the first model;
- the server uses the first behavior data as an input parameter of the first model, and running the first model includes: when the evaluation result of the first model meets the condition, the server uses the first behavior data As an input parameter of the first model, run the first model to obtain a first output result.
- the server determines the values of input parameters and output parameters; the server takes the determined input parameters and output parameters The value is brought into the formula of the first model to determine the value of the model parameter of the first model, the model parameter is other parameters except the input parameter and the output parameter in the first model Value; or the server determines the value of the model parameter corresponding to the first model according to the correspondence between the model and the value of the model parameter.
- the evaluation of the first model by the server includes: the server acquiring third behavior data of a user operating terminal, the third behavior data generated before the first behavior data
- the server uses the third behavior data as an input parameter of the first model and runs the first model to obtain a test result; the server compares the test result with an actual result, and the actual result is The actual operation of the user after the third behavior data; if they match, the evaluation result of the first model meets the conditions; if they do not match, the evaluation result of the first model does not meet the conditions.
- the server selecting the first model from the multiple models according to a preset strategy includes: the server randomly selecting the first model from the multiple models, or the server according to the Q-table Select the model with the largest Q value, the Q-table includes the Q value corresponding to each model, the Q value is related to the evaluation result of each model; or the server selects the Describe the first model corresponding to the current business.
- the first output result is the next possible behavior of the user after the first behavior data; when the first model does not satisfy the condition, the server selects from multiple models again
- the second model includes: when the behavior predicted by the model next time that the user may happen is different from the behavior actually happened next, the server reselects the second model; or when the first model is used When the preset time is reached, the server reselects the second model.
- the terminal may statistically predict the user's next possible behavior using the model and the user's next actual behavior.
- the terminal sends a request to the server to request a new model selection.
- the first behavior data or the second behavior data includes an application that the user has clicked three times recently; the first output result or the second output result is an application that the user may click next time .
- the third behavior data includes an application that has been clicked three times in a row before the most recent application is clicked, and the actual result is an application that was clicked before the application that was clicked three times in a row.
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: an application predicted by the model that the user may click next time and a user next time The actual clicked application is different.
- the terminal provides AI-related services based on the first output result or the second output result, including: the terminal preloading an application that the user may click next time; or the terminal Close other applications that are not in the background running application in the background that the user may click next; or the terminal outputs a prompt message, the prompt information is used to remind the user that the user may click the next application, when the terminal When it is detected that the user determines the prompt information, an application that the user may click next time is loaded.
- the first behavior data or the second behavior data includes: the commodity type of the commodity that the user has clicked three times recently; the first output result or the second output result is the next time the user Types of products that may be clicked.
- the third behavior data includes the product category that was clicked three times in a row before the product category that was last clicked, and the actual result is the previous click before the product category was clicked three times in a row. product category.
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: the type of goods predicted by the model and the user may click next The types of products that are actually clicked once are different.
- the terminal provides AI-related services based on the first output result or the second output result, including: the terminal preloading the type of goods that the user may click next time; or The terminal outputs a prompt message, the prompt message is used to prompt the product category that the user may click next time, and when the terminal detects that the user determines the prompt message, the product category that the user may click next time is loaded; or The terminal outputs prompt information, and the prompt information is used to recommend a product type of interest to the user, and the product type of interest is the same as the product type that the user may click next time.
- the first model or the second model is one of a decision tree, neural unit, logistic regression LR, naive Bayes NB classification algorithm, random forest RF algorithm and support vector machine SVM algorithm .
- an embodiment of the present application provides a terminal, including: a behavior log collector for acquiring first behavior data of a user operating the terminal; an adaptive selector for removing data from the terminal according to a preset strategy
- the first model is selected from the stored multiple models; the executor is configured to use the first behavior data as an input parameter of the first model, run the first model, and obtain a first output result; the executor It is also used to provide a first artificial intelligence AI service based on the first output result.
- the adaptive selector is also used to select a second model from a plurality of models again when the first model does not satisfy the conditions; the executor is also used to use the second behavior data as the second model Input parameters, calculate the second model, obtain a second output result, and continue to provide the first AI service based on the second output result; wherein, the second behavior data is generated after the first behavior data, And it belongs to the similar behavior of the user operating the terminal.
- the terminal further includes: an evaluator for evaluating the first model; the executor is used for using the first behavior data as an input of the first model
- the parameter, when running the first model specifically includes: when the evaluation result of the first model satisfies the condition, using the first behavior data as an input parameter of the first model, running the first model, Get the first output.
- the adaptive selector is also used to: determine the values of the input parameters and output parameters; bring the determined values of the input parameters and output parameters into the formula of the first model , Determine the value of the model parameter of the first model, the model parameter is the value of other parameters except the input parameter and output parameter in the first model; or according to the model and the model parameter The correspondence between the values determines the value of the model parameter corresponding to the first model.
- the evaluator is specifically configured to: obtain third behavior data of a user operating the terminal, the third behavior data is generated before the first behavior data; and the third behavior The data is used as the input parameter of the first model, and the first model is run to obtain the test result; the test result is compared with the actual result, and the actual result is the actual operation of the user after the third behavior data; if If they match, the evaluation result of the first model meets the condition; if they do not match, the evaluation result of the first model does not meet the condition.
- the adaptive selector is specifically used to: randomly select the first model from multiple models, or select the model with the largest Q value according to the Q-table, the Q-table includes each Q value corresponding to each model, the Q value is related to the evaluation result of each model; or the first model corresponding to the current service is selected according to the current service.
- the first output result is the next possible behavior of the user after the first behavior data;
- the adaptive selector is used when the first model does not meet the conditions,
- the terminal selects the second model from the multiple models again, it is specifically used to: when the behavior predicted by the model next time that the user may occur is different from the behavior actually occurred by the user next time, reselect the second model; or
- the usage time of the first model reaches a preset time, the second model is reselected.
- the first behavior data or the second behavior data includes an application that the user has clicked three times recently;
- the first output result or the second output result is an application that the user may click next time ;
- the third behavior data includes an application that has been clicked three times in a row before the most recent application is clicked, and the actual result is an application that was clicked before the application that was clicked three times in a row.
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: an application predicted by the model that the user may click next time and a user next time The actual clicked application is different.
- the executor when used to provide AI-related services based on the first output result or the second output result, it is specifically used to: preload the application that the user may click next time; Or close other applications in the background running application that are not the applications that the user may click next time; or output prompt information, the prompt information is used to prompt the application that the user may click next time, when the terminal detects When the user determines the prompt information, an application that the user may click next time is loaded.
- the first behavior data or the second behavior data includes: the commodity type of the commodity that the user has clicked three times recently; the first output result or the second output result is the next time the user Types of products that may be clicked.
- the third behavior data includes the product category that was clicked three times in a row before the product category that was last clicked, and the actual result is the previous click before the product category was clicked three times in a row product category.
- the behavior predicted by the model next to the user may be different from the behavior actually occurred by the user next time, including: the type of goods predicted by the model and the user may click next The types of products that are actually clicked once are different.
- the executor when used to provide AI-related services based on the first output result or the second output result, it is specifically used to: pre-load the product category that the user may click next time
- output prompt information the prompt information is used to prompt the user may click on the next type of goods, when the terminal detects that the user determines the prompt information, load the next type of goods the user may click;
- output prompt information the prompt information is used to recommend to the user a product category of interest, and the product category of interest is the same as the product category that the user may click next time.
- the first model or the second model is one of a decision tree, neural unit, logistic regression LR, naive Bayes NB classification algorithm, random forest RF algorithm and support vector machine SVM algorithm .
- an embodiment of the present application provides a server, including:
- a receiver configured to receive the first behavior data sent by the user terminal to operate the terminal
- a processor configured to use the first behavior data as an input parameter of the first model, run the first model, and obtain a first output result
- a transmitter configured to send the first output result to a terminal, and the terminal provides a first artificial intelligence AI service based on the first output result;
- the processor is further used to select a second model from a plurality of models again when the first model does not satisfy the conditions; the server uses the second behavior data as an input parameter of the second model The second model obtains a second output result; wherein, the second behavior data is sent by the terminal, generated after the first behavior data, and belongs to a similar behavior of a user operating the terminal;
- the transmitter is further configured to send the second output result to the terminal, and the terminal continues to provide the first AI service based on the second output result.
- an embodiment of the present application provides a terminal, including a memory and a processor,
- the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the terminal can implement the first aspect or any of the first aspects A possible design method.
- an embodiment of the present application provides a server, including a memory and a processor,
- the memory is used to store one or more computer programs; when the one or more computer programs stored in the memory are executed by the processor, the server can implement the above second aspect or any of the above second aspects A possible design method.
- an embodiment of the present application further provides a terminal, and the terminal includes modules/units that execute the method of the first aspect or any possible design of the first aspect; these modules/units may be implemented by hardware, It can also be implemented by hardware executing corresponding software.
- an embodiment of the present application further provides a server, the server includes modules/units that perform the method of the second aspect or any possible design of the second aspect; these modules/units can be implemented by hardware, It can also be implemented by hardware executing corresponding software.
- an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a computer program, and when the computer program runs on a terminal, the terminal executes the first aspect or the above-mentioned first Any one of the possible design methods of one aspect; or, when the computer program runs on the server, causing the server to perform the second aspect or any of the above possible design methods of the second aspect.
- an embodiment of the present application further provides a computer program product that, when the computer program product runs on a terminal, causes the terminal to perform the first aspect or any of the possible designs of the first aspect above Method; or, when the computer program product runs on a server, causing the server to perform the second aspect or any one of the above-mentioned possible design methods of the second aspect.
- FIG. 1 is a schematic diagram of a model provided by an embodiment of this application.
- FIG. 2 is a schematic diagram of another model provided by an embodiment of the present application.
- FIG. 3 is a schematic diagram of a feature database provided by an embodiment of this application.
- FIG. 4 is a schematic structural diagram of a mobile phone 100 according to an embodiment of the present application.
- FIG. 5 is a schematic structural diagram of some devices in a mobile phone 100 according to an embodiment of the present application.
- FIG. 6 is a schematic flowchart of a method for selecting a model provided by an embodiment of the present application.
- FIG. 7 is a schematic diagram of a sample parameter provided by an embodiment of this application.
- FIG. 8 is a schematic diagram of a model training process provided by an embodiment of this application.
- FIG. 9 is a schematic structural diagram of some devices in a mobile phone 100 according to an embodiment of the present application.
- FIG. 10 is a schematic diagram of a correspondence between a model and model parameters provided by an embodiment of this application.
- FIG. 11 is a schematic flowchart of another model selection method provided by an embodiment of the present application.
- the application (application, abbreviated as app) involved in the embodiments of the present application is a software program capable of realizing a specific function or multiple specific functions.
- multiple applications can be installed in the terminal.
- the application program mentioned below may be an application program that has been installed when the terminal is shipped from the factory, or an application program that the user downloads from the network or obtains from other terminals while the terminal is in use.
- the model involved in the embodiments of the present application includes one or more functions/equations.
- the model mentioned in the embodiment of the present application may be a model of the prior art, such as a decision tree, logistic regression (LR), naive bayes (NB) classification algorithm, and random forest (RF) Algorithms, support vector machines (support vector machines, SVM) algorithms, etc.
- the model is a functional formula including model parameters, input parameters, and output parameters. Given the specific values of the model parameters and input parameters, the output result can be obtained by calculating the functional formula.
- the model parameters of different models are generally different. In the following, the model parameters are introduced by taking the model as a neural network unit and an RF algorithm as examples.
- model is a neural unit.
- the neural unit as a unit with computing power; its calculation method (ie model) is as follows:
- x1, x2-xn are multiple input parameters of the neural unit; w1, w2-wn are the coefficients (also called weights) of each input parameter; b is the offset of each input parameter (used to indicate The intercept between u and the origin of the coordinate); f is used to ensure that the output value range is a function within the interval [0,1] (such as Sigmoid function, tanh function, etc.).
- the model in the terminal is a neural unit
- the model parameters are the weight w i and the offset b
- the input parameter is x
- the output parameter is y.
- the model is a decision tree as an example.
- the decision tree includes three layers, the first layer includes a root node, the second layer includes two child nodes, and the third layer includes two child nodes.
- the root node in the first layer corresponds to the input parameter x1
- the decision tree determines whether the input parameter x1 satisfies the condition (for example, whether it is greater than the preset value a).
- x1 is greater than a
- the process goes to child node 1
- x1 is less than or equal to a
- the process goes to child node 2.
- the child nodes of the second layer correspond to the input parameter x2.
- the decision tree judges whether the input parameter x2 satisfies the condition (such as whether it is greater than the preset value b).
- the model parameters include the number of child nodes, the number of layers of the decision tree, preset values, and so on.
- Input parameters include x1 and x2. Given the specific values of the model parameters and input parameters, the terminal can obtain the output result y through the decision tree shown in FIG. 2.
- model parameters input parameters, and output parameters of the model by listing two examples of models. In actual application, it may be other models.
- the model parameters of different models are different, which will not be repeated here.
- the model parameters of the model are unknown. Taking the neural unit shown in FIG. 1 as an example, if the model parameters (weight w and offset b) of the model are unknown, the terminal running model cannot be obtained. Output results. Therefore, in the embodiment of the present application, the terminal may determine the model parameters through model training.
- the so-called model training process is a process in which the terminal determines the model parameters when the specific values of the input parameters and output parameters are known.
- the training process of the model is the process of determining the weight w and the offset b.
- the terminal detects the input parameter and the output parameter (xi, yi), and brings it into the formula to obtain the weight w and the offset b.
- the process of the terminal training the model is a process of determining the model parameters (number of layers, number of child nodes, preset value a) of the model.
- the model can be used, that is, the terminal uses the detected feature data as the input parameter of the model, and runs the model (the trained model) to obtain the output result.
- the feature data involved in the embodiments of the present application are input parameters of the model.
- the characteristic data includes behavior data of the user operating the terminal, and the terminal uses these behavior data as input parameters of the model to predict the next possible behavior of the user in order to provide corresponding AI services (described later).
- the model selection method provided by the embodiments of the present application may be applicable to multiple scenarios, and the feature data may be different in different scenarios.
- the feature data may be the record of the user clicking on the app (such as the currently clicked app, the previous clicked app, and the previous two clicked apps).
- the currently clicked app is the app clicked by the terminal at the current moment
- the previous clicked app is the last clicked app before the current moment
- the last two clicked apps are the penultimate clicked apps from the current moment.
- the terminal when it stores characteristic data, it can record the time of each data. For example, the current time t1 is 10:00, the terminal detects that the last time before the current time t1 was to click WeChat at t2 (09:58), and click Alipay at t3 (09:55), at t4 (09:50) Click Meituan when you click the application record between t1-t2, t2-t3, and t3-t4, then the current click app is WeChat, the previous click app is Alipay, and the first two clicks app is Meituan.
- the terminal uses these feature data (records of user clicks on the app) as input parameters of the model, and runs the model to obtain an output result, which is the app that the user may click next time.
- FIG. 3 is a schematic diagram of feature data provided by an embodiment of the present application.
- the characteristic data includes a record of the user clicking on the app.
- the terminal can correspond to a number for each application, for example, Taobao is 1, Tmall is 2, WeChat is 3, Jingdong is 4, Meituan is 5, and Alipay is 6.
- Taobao is 1
- Tmall is 2
- WeChat is 3
- Jingdong 4
- Meituan Meituan
- Alipay is 6.
- different applications are mapped to different numbers for calculation.
- the original data involved in the embodiments of the present application is unprocessed data collected by the terminal. After the terminal performs preprocessing on the original data (the preprocessing process will be described later), the aforementioned feature data is obtained.
- the training data involved in the embodiments of the present application is used for training model data.
- the training model needs to know the values of input parameters and output parameters to determine the values of unknown model parameters. Therefore, the training data includes values of known input parameters and output parameters.
- sample parameters 2-4 can be used as training data. Taking sample parameter 2 as an example, the sample parameter 2 obtains the first clicked app as a known output parameter; the sample parameter 2 the first two clicks of the app, and the previous three clicks of the app as known input parameters.
- the training data may also be set by the designer based on experience, and the embodiments of the present application are not limited.
- the test data involved in the embodiments of the present application are used to evaluate model data.
- the test data includes the values of known input parameters and output parameters.
- the terminal determines the model parameters of the model, it can evaluate the model through the test data.
- the model process of the model may be that the terminal substitutes the values of the known input parameters in the test data into the model, and runs the model to obtain the test results.
- the test results are compared with the real results. If they are consistent, the model evaluation is more Well, if it is inconsistent, the model is poorly evaluated.
- the test can be carried out multiple times, and the model is evaluated based on the comparison between the multiple test results and the real results.
- the test data may also be set by the designer based on experience, and the embodiments of the present application are not limited.
- sample parameter 1 can be used as test data, and the currently clicked app in sample parameter 1 can be used as the real result.
- the app of the previous click and the app of the previous two clicks can be used as known input parameters.
- the terminal runs the model based on these two input parameters and obtains test results. Assuming that the test result characterizes that the previous clicked app is app1, and the previous clicked app recorded in the test data (sample parameter 1) is app2, and app1 and app2 are inconsistent, the evaluation of the model is poor.
- the training data required during the model training process and the test data required during the model evaluation process in the embodiment of the present application are all from the feature database.
- FIG. 3 which data is used as training data and which data is used as test data is not limited in the embodiments of the present application.
- the sample parameters 2-4 in FIG. 3 are used as training data, and the sample parameter 1 is used as test data. In actual applications, other sample parameters may also be used as training data or test data.
- AI service In the AI service involved in the embodiment of the present application, after the terminal running model obtains the output result, it can provide a certain service based on the result.
- AI services are related to business.
- AI services for different businesses are also different. For example, it is predicted that the next clicked app is regarded as a service, and the AI service related to the service may preload the next clicked app.
- the product type of the next click is predicted as another service, and the AI service related to the service may be to recommend the same type of product to the user.
- the user of the terminal may order different services.
- a specific app of the mobile phone such as an application mall, may provide service ordering options.
- the mobile phone provides the corresponding AI service.
- the mobile phone After the mobile phone is activated, it will automatically provide the above-mentioned AI services without user subscription.
- the characteristic data required for different services that is, the input parameters are also different, that is, for different services, the terminal collects user behavior data differently. For example, to predict the app of the next click, the terminal pays more attention to the behavior of the user clicking the app.
- the feature data required by this service includes the user's current click on the app, the previous click on the app, and the previous two clicks on the app.
- the terminal pays more attention to the behavior of the user to click on the product.
- the feature data required by this business includes the user's current click on the product type, the previous click on the product type, and the previous two clicks on the product type.
- Multiple involved in the embodiments of the present application means greater than or equal to two.
- the terminal may be a portable terminal, such as a mobile phone, a tablet computer, a wearable device (such as a smart watch) with wireless communication function, and the like.
- the portable terminal includes a device (such as a processor) capable of running a model for calculation, and a device (such as a sensor) capable of acquiring characteristic data.
- Exemplary embodiments of portable terminals include but are not limited to piggybacking Or portable terminals of other operating systems.
- the above portable terminal may also be other portable terminals, as long as they can acquire characteristic data and run a model to perform calculations. It should also be understood that, in some other embodiments of the present application, the above-mentioned terminal may not be a portable terminal, but a desktop computer that can acquire characteristic data and run a model for calculation.
- the terminal may not need to have the ability to run the model for calculation, but only has the communication capability, and can send the detected feature data to other devices (such as the cloud) that have the ability to run the model for calculation. Server), the output result is calculated by other devices, and the terminal only needs to receive the output result sent by the cloud server.
- the terminal takes the terminal to obtain characteristic data and run the model for calculation as an example.
- FIG. 4 shows a schematic structural diagram of the mobile phone 100.
- the mobile phone 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, Mobile communication module 151, wireless communication module 152, audio module 191 (including speaker, receiver, microphone, headphone interface, etc. not shown), sensor module 180, button 190, display screen 194, and subscriber identification module (subscriber identification module) , SIM) card interface 195 and so on.
- the sensor module 180 may include a pressure sensor 180A, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a touch sensor 180K, etc. (The mobile phone 100 may also include other sensors such as a temperature sensor, an ambient light sensor, a gyro sensor, etc.) Not shown).
- the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the mobile phone 100.
- the mobile phone 100 may include more or fewer components than shown, or combine some components, or split some components, or arrange different components.
- the illustrated components can be implemented in hardware, software, or a combination of software and hardware.
- the processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), and an image signal processor (image)signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and/or neural-network processing unit (NPU) Wait.
- application processor application processor
- AP application processor
- GPU graphics processor
- ISP image signal processor
- controller memory
- video codec digital signal processor
- DSP digital signal processor
- NPU neural-network processing unit
- the controller may be the nerve center and command center of the mobile phone 100.
- the controller can generate the operation control signal according to the instruction operation code and the timing signal to complete the control of fetching instructions and executing instructions.
- the processor 110 may also be provided with a memory for storing instructions and data.
- the memory in the processor 110 is a cache memory.
- the memory may store instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can be directly called from the memory. Avoid repeated access, reduce the waiting time of the processor 110, thus improving the efficiency of the system.
- the processor 110 can run the model to perform calculations.
- the NPU can run a model to perform calculations.
- the embodiments of the present application relate to at least two different models. Among them, different models can be run by the same processor or by different processors. For example, for a model with a more complicated operation process, it can be run by a processor with relatively strong calculation capability, and for a model with a simpler operation process, it can be run by a processor with relatively weak operation.
- the processor 110 integrating an NPU and an application processor as an example, when the model is an RF algorithm, the model may be run by the NPU, and when the model is an LR algorithm, the model may be run by the application processor.
- the model is an RF algorithm
- the model may be run by the NPU
- the model is an LR algorithm
- the model may be run by the application processor.
- the above is an example. In actual applications, those skilled in the art can determine which model or which models are run by which processor according to the actual situation, which is not limited in the
- the internal memory 121 may be used to store computer executable program code, where the executable program code includes instructions.
- the processor 110 executes instructions stored in the internal memory 121 to execute various functional applications and data processing of the mobile phone 100.
- the internal memory 121 may include a storage program area and a storage data area.
- the storage program area may store an operating system, at least one function required application programs (such as sound playback function, image playback function, etc.).
- the storage data area may store data (such as audio data, phone book, etc.) created during the use of the mobile phone 100 and the like.
- the internal memory 121 can also be used to store at least two models (for example, at least two models can be stored in the storage program area).
- the model stored in the memory storage 121 can be accessed and executed by the processor 110.
- the internal memory 121 may also store codes of the behavior log collector, feature data preprocessor, adaptive selector, evaluator, and executor. When the code is executed by the processor 110, related functions are implemented, which will be described in detail later.
- the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
- a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and so on.
- the functions of the sensor module 180 are described below.
- the pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal.
- the pressure sensor 180A may be provided on the display screen 194.
- the distance sensor 180F is used to measure the distance.
- the mobile phone 100 can measure the distance by infrared or laser. In some embodiments, when shooting scenes, the mobile phone 100 may use the distance sensor 180F to measure distance to achieve fast focusing. In other embodiments, the mobile phone 100 can also use the distance sensor 180F to detect whether a person or an object is close.
- the proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode.
- the light emitting diode may be an infrared light emitting diode.
- the mobile phone 100 emits infrared light outward through a light emitting diode.
- the mobile phone 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the mobile phone 100. When insufficient reflected light is detected, the mobile phone 100 can determine that there is no object near the mobile phone 100.
- the mobile phone 100 can use the proximity light sensor 180G to detect that the user is holding the mobile phone 100 close to the ear to talk, so as to automatically turn off the screen to save power.
- the proximity light sensor 180G can also be used in leather case mode, pocket mode automatically unlocks and locks the screen.
- the fingerprint sensor 180H is used to collect fingerprints.
- the mobile phone 100 can use the collected fingerprint characteristics to unlock a fingerprint, access an application lock, take a photo with a fingerprint, and answer a call with a fingerprint.
- Touch sensor 180K also known as "touch panel”.
- the touch sensor 180K may be provided on the display screen 194, and the touch sensor 180K and the display screen 194 constitute a touch screen, also called a "touch screen”.
- the touch sensor 180K is used to detect a touch operation acting on or near it.
- the touch sensor 180K may pass the detected touch operation to the application processor to determine the type of touch event.
- the visual output related to the touch operation may be provided through the display screen 194.
- the touch sensor 180K may also be disposed on the surface of the mobile phone 100, which is different from the location where the display screen 194 is located.
- the behavior log collector collects the original data, which can reflect the user's behavior habit of operating the mobile phone 100.
- the touch sensor 180K detects a touch operation and sends the touch operation to the processor 110, and the processor 110 determines the position coordinates corresponding to the touch operation (for example, when the touch screen is a capacitive touch screen, the processor 110 determines the touch operation based on the capacitance change Corresponding coordinate position), that is, the user clicks the position coordinate on the display screen, the icon corresponding to the position coordinate is the icon that the user clicks (or, the touch sensor 180K itself can determine the coordinate position corresponding to the touch operation, and then The position occurs to the processor 110, and the processor 110 no longer needs to determine the coordinate position corresponding to the touch operation).
- the processor 110 runs the code of the behavior log collector, records the icon information (application package name, click time), and obtains the original data.
- the touch sensor 180K can determine the icon clicked by the user, the touch sensor 180K can send the icon information to the processor 110.
- the processor 110 runs the code of the behavior log collector, and can also record the usage duration of each application. For example, if the application interface of an application is displayed for 3 minutes, the usage duration of the application is 3 minutes.
- the data preprocessor is used to preprocess the original data collected by the behavior log collector.
- the touch sensor 180K detects two touch operations in a short time interval.
- the touch sensor 180K sends this touch operation to the processor 110.
- the processor 110 determines the position coordinates corresponding to these two touch operations. Assume that there is no corresponding icon at the position coordinate corresponding to the first touch operation (may be a misoperation), and there is a corresponding icon at the position coordinate corresponding to the second touch operation. Therefore, the behavior log collector collects the records of the two clicked apps. Among them, the record of the first click of the app is empty, and the record of the second click of the app is not empty.
- the data preprocessor can delete the record of the first click, or the data preprocessor can fill the content of the first click of the app, such as filling the app of the second click into the record of the first click of the app.
- Adaptive selector used to select a model from a variety of models. If the model is stored in the internal memory 121, the adaptive selector may select one model from a plurality of models stored in the internal memory 121. If the model is stored in the external memory, the adaptive selector may select one model from a plurality of models stored in the external memory (for example, select the model from the external memory through the external memory interface 120). There are many ways for the adaptive selector to select one model from multiple models, which will be described in detail below.
- the evaluator is used to evaluate the model selected by the adaptive selector.
- the actuator is used to run the model selected by the adaptive selector for calculation.
- the executor takes the characteristic data collected by the behavior log collector as the input parameters of the model, runs the model, and obtains the output result.
- the behavior log collector, data preprocessor, adaptive selector, evaluator, and executor are software codes.
- different software codes can all run on the same processor, or run on different processors (for example, when the processor 110 integrates the application processor and the NPU, the code of the adaptive selector runs on the application processor , The code of the executor runs on the NPU).
- the behavior log collector, data preprocessor, adaptive selector, evaluator, and executor are software codes.
- one or more of the behavior log collector, the data preprocessor, the adaptive selector, the evaluator, and the executor may also be hardware (or a combination of hardware and software). These hardwares can be set in the mobile phone 100 when the mobile phone 100 leaves the factory (such as chips or other hardware forms).
- the executor may be integrated in the processor 110, that is, as a part of the processor 110 (for example, when the processor 110 is an NPU, the executor is a part of the NPU), or may be independent of the processor 110 Parts. If the executor is a component independent of the processor 110, the processor 110 may not have the capability of running a model for calculation, and the executor may perform calculation.
- the mobile phone 100 realizes a display function through a GPU, a display screen 194, and an application processor.
- the GPU is a microprocessor for image processing, connecting the display screen 194 and the application processor.
- the GPU is used to perform mathematical and geometric calculations, and is used for graphics rendering.
- the processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
- the display screen 194 is used to display images, videos and the like.
- the display screen 194 includes a display panel.
- the display panel may use a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix organic light-emitting diode (active-matrix organic light) emitting diode, AMOLED, flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, quantum dot light emitting diode (QLED), etc.
- the mobile phone 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
- the mobile phone 100 can realize audio functions through the audio module 191 (speaker, receiver, microphone, headphone jack), and the processor 110. For example, music playback, recording, etc.
- the mobile phone 100 may receive key 190 input and generate key signal input related to user settings and function control of the mobile phone 100.
- the SIM card interface 195 in the mobile phone 100 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to achieve contact and separation with the mobile phone 100.
- the mobile phone 100 may further include a camera, such as a front camera and a rear camera; it may also include a motor for generating a vibration prompt (such as an incoming vibration prompt); and may also include an indicator such as an indicator light. It can also be used for indicating messages, missed calls, notifications, etc. for indicating the state of charge and the change in power.
- a camera such as a front camera and a rear camera
- a motor for generating a vibration prompt such as an incoming vibration prompt
- an indicator such as an indicator light. It can also be used for indicating messages, missed calls, notifications, etc. for indicating the state of charge and the change in power.
- the mobile phone 100 may select one model from multiple models, and then use the detected feature data as an input parameter of the model, and run the model to calculate and obtain an output result.
- the model selection method provided in the embodiments of the present application may be applicable to various application scenarios. In different application scenarios, the characteristic data is different. Exemplarily, taking an application scenario where the mobile phone 100 predicts an app that the user will click on, for example, the feature data may be a record of the user clicking on the app (for example, the app currently clicked by the user, the app clicked the previous time, and the app clicked on the first two times )and many more. After the mobile phone 100 selects one model from multiple models, the feature data is used as the input parameter of the selected model to obtain an output result, and the output result represents an app that the user may click next time.
- the mobile phone 100 detects that the app currently clicked by the user is Taobao, the app clicked the previous time is Tmall, and the app clicked the first two is WeChat.
- the mobile phone 100 uses these parameters as input parameters of the model, and runs the model to obtain an output result, assuming that the input result is Jingdong, that is, the mobile phone 100 predicts that the next time the user may click Jingdong.
- the mobile phone 100 predicts that the user may click JD.com next time, he can do some preparation work. For example, pre-load JD.com, or close apps that are temporarily impossible for users running in the background to click to clear memory space.
- the mobile phone 100 can predict the next possible behavior of the user according to the user's behavior of operating the mobile phone .
- the same user has different habits of operating a mobile phone at different time periods.
- the mobile phone 100 can predict the next possibility of the user in real time according to the user's behavior habits of operating the mobile phone in the current time period the behavior of.
- the above application scenario is just an example, and the model selection method provided in the embodiment of the present application can also be applied to other application scenarios (described later).
- the model of the embodiment of the present application is introduced Method of choosing.
- the mobile phone 100 is divided into an online part and an offline part.
- the offline part includes adaptive selectors and evaluators. Therefore, the functions of the offline part include: adaptive selector selection model, model training (determination of model parameters) process, and the process of evaluator evaluation of the model.
- the model training or model evaluation uses data with known input parameters and output results, which are only used to select models and evaluate models, without providing AI services (real-time feature data may not be applicable as input parameters , And use historical or preset data, as long as the data is known input parameters and output results).
- the functions of the online part include that the executor runs the model selected by the offline part, obtains output results, and provides AI services based on the output results. Therefore, the model used in the online part is the most suitable model selected by the offline part, which provides users with AI services. Generally, in order to provide users with accurate AI services, the online part will collect feature data in real time as input parameters of the model.
- the offline part and the online part can run simultaneously or not at the same time.
- the executor uses a model for calculation, while the offline part can perform model selection, training, and evaluation.
- the offline part selects another model, and sends the other model to the actuator of the online part, and the actuator performs calculation according to the other model.
- the offline part can run all the time, and the online part only runs when needed, such as when there is feature data, but not when there is no feature data (the user has not operated the phone for a long time).
- the internal memory 121 of the mobile phone 100 stores a model candidate set and a feature database (in practical applications, the model database and the feature database may be stored in other memories).
- the following describes the role of model candidate sets and feature databases.
- the model candidate set includes at least two models.
- the model is an algorithm, that is, at least two algorithms are stored in the model database.
- the at least two algorithms described here may be stored in the mobile phone 100 when the terminal is shipped; or may be an algorithm pushed by the cloud server to the mobile phone 100.
- the cloud server of the Huawei mobile phone may periodically push the algorithm to the Huawei mobile phone.
- Huawei phones store the pushed algorithm in the model candidate set.
- the model ie, algorithm
- the mobile phone 100 may set a model identifier for each model.
- the decision tree is model 1
- the NB algorithm is model 2
- the RF algorithm is model 3
- the SVM algorithm is model 4.
- the feature database includes feature data, which can be used as input parameters of the model.
- the feature data has already been described above, and will not be repeated here.
- the following describes a method for selecting a model implemented by the mobile phone 100 shown in FIG. 5 according to an embodiment of the present application.
- the behavior log collector collects the original data, and the data pre-processor pre-processes the original data to obtain the characteristic data (the specific process has been mentioned in the previous content, and will not be repeated here).
- the data preprocessor stores the feature data in the feature database.
- the adaptive selector selects a model from the model database (the model parameters are unknown), then selects the training data from the feature database, and uses the training data to train the selected model to obtain the trained model (for convenience of description)
- model after training is referred to as model A, and the model parameters in model A are known).
- the evaluator selects test data from the feature database, and evaluates model A through the test data (the specific process will be described later).
- the adaptive selector selects another model from multiple models again, and then performs the above process on the other model. If the evaluation result is good, the executor uses the model A for calculation (select the feature parameters from the feature database, and use the feature parameters as the input parameters of the model A, and run the model A to obtain the output result).
- FIG. 6 is a schematic flowchart of a model selection method provided by an embodiment of the present application.
- the process includes that the processor 110 runs the codes of the behavior log collector, feature data preprocessor, adaptive selector, evaluator, and executor stored in the internal memory 121, and executes the following processes:
- the behavior log collector is used to collect original data, and the original data includes feature data, and the feature data includes a record of a user clicking on the app.
- the data preprocessor is used to preprocess the original data to obtain feature data, which is stored in the feature database.
- the behavior log collector can detect a piece of raw data (such as the currently clicked app), the raw data can be sent to the data preprocessor; or, the behavior log collector can detect at least two After the original data (for example, the currently clicked app and the previous clicked app), the at least two pieces of original data are sent to the data preprocessor together.
- the data pre-processor can pre-process the original data collected by the behavior log collector, which has been described above, and will not be repeated here for the sake of brevity of the description.
- the adaptive selector selects one model from multiple models in the model candidate set according to a preset strategy.
- Strategy 1 The adaptive selector can randomly select a model from multiple models.
- the model candidate set includes three algorithms: decision tree, LR algorithm, NB algorithm, and RF algorithm.
- the adaptive selector can choose randomly, such as the LR algorithm.
- strategy one can be adopted.
- Strategy 2 The adaptive selector selects one model from multiple models based on reinforcement learning algorithm. For example, the terminal selects a model, and then evaluates the model to obtain an evaluation result, and selects a model based on the evaluation result. For example, select one of the best evaluation results, or select an evaluation result that meets the preset conditions (described later) and other methods. The evaluation process of the terminal on the model will be introduced later.
- the adaptive selector can periodically select the model (for example, the model can be automatically reselected after a period of use), or when the selected model is used for a period of time and the conditions are not met, the model is reselected.
- the model selected by the mobile phone 100 is model 1, and in the next time period, the user's behavior habits change, so the output accuracy of the model 1 selected in the previous time period is more accurate Poor (the output result does not match the app that the user actually clicked), and the mobile phone 100 can reselect the model.
- the adaptive selector can continually select the model suitable for the current actual situation.
- the reinforcement learning algorithm is the Q-table algorithm.
- the Q-table includes the Q value of each model.
- the Q value is a parameter related to the evaluation result of each model. For example, the better the model evaluation result, the higher the Q value; when the model evaluation result is poor , Q value is poor. Therefore, the size of the Q value can reflect the evaluation result of the model.
- the adaptive selector can select the model with the largest Q value in the Q-table.
- the Q value of each model in the Q-table may be the mobile phone 100 set at the factory, for example, before the mobile phone 100 is shipped, the designer determines the Q value of each model based on empirical values.
- the Q value of each model in the Q-table can also be filled in by the mobile phone 100 during use. For example, when the mobile phone 100 is activated or turned on, the Q value of each model in the Q-table is 0. The evaluator fills the Q value of the model in the Q-table after evaluating each model.
- the adaptive selector can refer to the Q value of the model in the Q-table when selecting the model. For example, if the Q value of the model is high, the adaptive selector can select the model; or, the adaptive selector can select the model with the larger Q value in the Q-table; of course, the adaptive selector can also adopt other strategies
- the selection model will not be described in detail in the embodiments of the present application.
- Strategy 3 The mobile phone 100 can select a model that matches the current business with the current business.
- the mobile phone 100 can select different models to run the business. Taking the two services of predicting the scenario where the user next clicks on the app and predicting the type of commodities that the user may click next as an example, the mobile phone 100 may select different models, that is, for each service, the process shown in FIG. 6 is performed once.
- strategy one and strategy two can be used in combination, for example, when the mobile phone 100 is activated or turned on, the Q value of each model in the Q-table is 0.
- the adaptive selector can adopt a strategy-selection model. After the adaptive selector fills in the Q value of each model in the Q-table in the subsequent process, it can select the model according to strategy two.
- the model can be trained to determine the model parameters.
- the adaptive selector obtains the training data from the feature database, and trains the selected model according to the training data to obtain the trained model.
- the training process of the model is the process of determining the parameters of the model. Since the adaptive selector trains the model, it is necessary to know the known input parameters and output results to determine the model parameters. Therefore, the adaptive selector can select training data from the feature database shown in FIG. 3.
- the training data includes known input parameters and output results.
- the adaptive selector can select sample parameter 2 as training data.
- the previous click app in sample parameter 2 can be used as the output parameter, and the first two click apps and the first three click apps can be used as input parameters.
- each sample parameter corresponds to a sample number (for convenience of description, unlike the sample parameter in FIG. 3, each sample parameter in FIG. 7 is an example of the previous two clicks on the app, the previous click on the app, and the current click on the app. ).
- FIG. 9 is a schematic diagram of a model training process provided by an embodiment of the present application. As shown in Figure 8, the process is as follows:
- the adaptive selector takes the first two clicks of the app in the sample numbers 1-4 in FIG. 6 as the root node, and determines the maximum and minimum values of the currently clicked app items in the sample numbers 1-4, based on The maximum and minimum values determine an intermediate value.
- the intermediate value may be the average value of the maximum value and the minimum value.
- the maximum value of the first two clicks on the app item is 6, and the minimum value is 1, then the median value is 3.5.
- the middle value can also be the value in the middle of the app item in the first two clicks in the sample numbers 1-4.
- the median value of the first two app items in sample numbers 1-4 is 5 or 4. In the subsequent steps, take the intermediate value of 5 as an example.
- the adaptive selector places the sample numbers 1-2 of the first two app items that are less than the intermediate value (that is, 5) into a branch (such as child node 1 in Figure 8), and the sample numbers that are greater than or equal to 5 3-4 homing another branch (as shown in Figure 8 child node 2).
- the adaptive selector takes the previous click app as the new root node, and determines the maximum and minimum value of the previous click app item in the branch of the child node 1 (sample number 1-2), and based on the maximum The value and the minimum value determine an intermediate value.
- the intermediate value may be the average of the maximum and minimum values.
- the maximum value of the previous app is 2, and the minimum value is 1, then the median value is 1.5.
- the intermediate value may also be the value in the middle of the first app item in the sample number 1-2.
- the middle value of the previous app item in sample number 1-2 is 1 or 2. In the subsequent steps, take the intermediate value of 1.5 as an example.
- the adaptive selector puts the sample sequence number 1 greater than 1.5 in the previous app item in the sample sequence number 1-2 into a branch (child node 3 shown in FIG. 8), and the sample sequence number 2 less than or equal to 1.5 It is classified as a branch (child node 4 shown in FIG. 8).
- the child node 3 since the child node 3 only includes the sample serial number 1, and there is no need to continue the branch, the child node 3 is characterized as the current app, and the child node 3 corresponds to WeChat.
- the process from the root node to the child node 3 is exemplarily described.
- the process from the root node to the child node 4 (child node 5 or child node 6) is similar, and for the sake of brevity of the description, it will not be described in detail.
- the model training process described above takes the model as a decision tree as an example, and for convenience of introduction, only some sample parameters are given in FIG. 7. In practical applications, the adaptive selector can also use more sample parameters to train the model.
- the adaptive selector determines the model parameters of the model. For example, the number of decision trees in Figure 8 and the number of child nodes, and the intermediate value from the follower node to each child node.
- the evaluator can evaluate the trained model.
- S605 The evaluator evaluates the model trained by the adaptive selector to obtain an evaluation result; if the evaluation result is good, execute S606, and if the evaluation result is poor, execute S603.
- the evaluation process of the model by the evaluator is that the evaluator runs the model through the known input parameters in the test data to obtain the test results, and compares the test results with the real results (the test data includes the real results).
- the evaluation results are good, and if they are not consistent, the evaluation results are poor.
- the evaluator can evaluate the results of the model based on the results of multiple comparisons.
- the following describes the process of the evaluator evaluating the model through the test data.
- the current click app, the previous click app, and the previous two click apps are taken as examples to introduce the model training process. Therefore, the model evaluation process continues to take the current clicked app, the previous clicked app, and the previous two clicked apps as examples.
- the evaluator can use the currently clicked app as a real result, and the previous clicked app and the previous two clicked apps can be used as input parameters of the model to evaluate the model.
- the specific process is as follows:
- the evaluator uses the previous two apps as the root node, determines that the previous two apps are less than 5, the process goes to child node 1, determines that the previous app is greater than or equal to 1.5, and the process goes to child node 4, and determines that the output is Tmall (that is, through The current click app calculated by the model is Tmall). Assuming that the real result is that the current clicked app is Jingdong, and the evaluator compares the output result (Tmall) with the real result, the model evaluation is poor.
- the adaptive selector can reselect the model, retrain the model, and then evaluate the model. This process is similar to the previous process and will not be repeated here.
- the adaptive selector can send the model to the executor.
- the executor uses the detected feature data as the input parameter of the model, runs the model, and obtains the output result.
- the evaluator may use multiple sample parameters during the evaluation of the model. For example, one sample parameter corresponds to one evaluation result, and multiple sample parameters correspond to multiple evaluation results. If most of the multiple evaluation results are better, the final evaluation result of the model is better.
- the evaluation results can be identified in various forms, such as "1" for good evaluation results and "0" for poor evaluation results; or, "good” for good evaluation results and "bad” for poor evaluation results. In short, the embodiment of the present application does not limit the expression form of the evaluation result.
- S606 The executor uses the detected feature data as an input parameter of the model, runs the model, and obtains an output result.
- the executor can obtain the current app, the previous app, and the previous two apps from the feature database as input parameters of the trained model, run the model to calculate, and obtain an output result, which is the next time the user clicks on the app.
- the evaluation results of the model can be stored corresponding to the model; or, continue to take Q-table as an example, the evaluator can use the evaluation results of each model and Q
- the model selected in the process shown in FIG. 6 is an RF algorithm
- the Q value (for example, 0.8) is obtained according to the evaluation result of the model, and the Q value is filled in the following Q-table table.
- the above Q-table table is empty.
- multiple models may be trained, and then each model is evaluated. For each model evaluated, you can The Q value of the model is obtained, and the Q value of the model is filled in the above Q-table.
- the adaptive selector can select according to the Q-table in the subsequent process of selecting the model, for example, selecting a model with a higher Q value of the model in the Q-table.
- the above-mentioned Q-table may be dynamically changed, that is, after each model is evaluated, a new Q value of the new evaluation result of the model may be calculated, and the new Q value may be updated to the Q-table.
- the mobile phone 100 uses the current app, the previous click app and the previous two click apps as the input parameters of the model.
- the mobile phone 100 can also use more feature data as Enter the parameters to run the model.
- the mobile phone 100 uses the current app, the previous click on the app, the previous two clicks on the app, and the duration of the current app as input parameters of the model.
- the mobile phone 100 trains the model (or evaluation model), more training data (or test data) needs to be used.
- the mobile phone 100 can also use the current geographic location, the current app, the last click of the app, and the previous two clicks of the app as the input parameters of the model to obtain an output result, which is characterized by the current geographic location, under the user An app that can be clicked once.
- the mobile phone 100 may provide an AI service based on the output result. For example, the mobile phone 100 preloads the application that the user may click next time; or, the mobile phone 100 closes other applications that are not the application that the user may click next time among the applications running in the background; or, the mobile phone 100 outputs a prompt message, The prompt information is used to prompt the application that the user may click next time.
- the mobile phone 100 detects an operation that the user determines the prompt information, the application that the user may click next is preloaded; or, the mobile phone 100 may output a recommendation Information, the recommendation information is used to recommend to the user an app that is not installed in the mobile phone 100 and is of the same type as the app that the user may click next time.
- the model when the mobile phone 100 uses the model to provide the AI service, the model can be replaced, that is, when the mobile phone 100 provides the same AI model, different models can be used.
- the model when the mobile phone 100 uses a model to provide an AI service, when the following trigger conditions are detected, the model may be reselected, and then the reselected model is used to continue to provide the AI service.
- Trigger condition 1 The mobile phone 100 automatically selects the model again when the last selected model reaches the preset cycle.
- the last model selected by the mobile phone 100 is the model 1, and the model 1 is used to predict the next app that the user may click.
- the mobile phone 100 automatically reselects the model.
- the preset period may be one day (24 hours), and the mobile phone 100 automatically selects the model at 12:00 every night.
- Trigger condition 2 When the mobile phone 100 determines that the last selected model is inaccurate, it reselects the model.
- the mobile phone 100 selected the model 1 last time, and the model 1 is evaluated better, and the model 1 is used to predict the app that the user may click next time. If the app that the user actually clicks next time is different from the app that may be clicked next time predicted using the model 1, it means that the model 1 is inaccurate, and the mobile phone 100 can reselect the model. Of course, the mobile phone 100 can also reselect after determining that the app that the user actually clicks next time is different from the app that may be clicked next time predicted by the model 1 (for example, more than the preset number of times, such as 3 times). model.
- the behavior of the user operating the mobile phone 100 changes in real time (for example, the original clicks on iQiyi and Alipay are fewer, and later the clicks on iQiyi and Alipay are more), so the mobile phone 100 adopts the last selection
- the model predicted by the user's next possible app is not the app that the user actually clicked.
- the mobile phone 100 can automatically reselect the model when the model selected last time is inaccurate, so as to improve the accuracy of model selection, and thus can provide AI services more accurately.
- the introduction of the mobile phone 100 training model or evaluation model in the previous content uses the historical records of the user's operation of the mobile phone (taking Figure 3 as an example, the training model uses the user's history of clicking the app), assuming that the mobile phone 100 is currently If 5 applications are installed, the feature data collected by the mobile phone 100 includes the records of the users clicking on these 5 applications.
- the output of the model obtained is also one of the 5 applications (see figure) 8 as an example, the results obtained by the mobile phone 100 training model include 4 WeChat, Tmall, Taobao, and Jingdong.
- the feature data is used as the input parameters of the model, and the output results obtained are among these 4 results one of).
- the mobile phone 100 When the mobile phone 100 uninstalls some of the applications or downloads new applications from the network side, the last selected model is unknown, so if the last selected model is still used, the output results are still the 5 applications previously installed An application in, but the user may actually click on the new application. It can be seen that the model selected last time is not suitable, so the mobile phone 100 can periodically select the model, or when the mobile phone 100 detects that the output result of the last selected model is inaccurate, it automatically reselects the model.
- the mobile phone 100 can use different models in the process of providing the same AI service, and the mobile phone 100 can select a suitable model periodically or according to actual conditions (such as the inaccurate prediction result of the previous model), which improves Choice of model flexibility.
- the mobile phone 100 after selecting a model, obtains model parameters of the model through training.
- the model parameters are known.
- the mobile phone 100 pre-stores one or more sets of model parameters for each model.
- the model parameters can be selected from the model. If a set of model parameters is selected among multiple sets of model parameters, the mobile phone 100 does not need to obtain the model parameters by training the model, saving calculation.
- the internal memory 121 also stores a model parameter library, and the model parameter library includes model parameters corresponding to each model.
- the model parameter library includes model parameters corresponding to each model.
- FIG. 10 shows the correspondence between the model and model parameters provided by the embodiments of the present application. Assuming that the mobile phone 100 selects a model (such as a decision tree), the mobile phone 100 can select a set of model parameters from the model parameter 1 and the model parameter 2. Assuming that the mobile phone 100 selects the model parameter 1, the mobile phone 100 does not need to train the model, and the evaluator can evaluate the selected model.
- FIG. 11 is a schematic flowchart of another model selection method provided by an embodiment of the present application.
- the process includes the processor 110 running the code of the behavior log collector, feature data preprocessor, adaptive selector, evaluator, and executor stored in the internal memory 121, and executes the following processes:
- the behavior log collector collects the original data, and the original data includes a record of the user clicking the app.
- the data preprocessor preprocesses the original data to obtain feature data, which is stored in the feature database.
- the adaptive selector selects one model from multiple models in the model candidate set according to a preset strategy.
- the adaptive selector selects the model parameters of the model from the model parameter library.
- S1105 The evaluator evaluates the adaptive selector model to obtain an evaluation result; if the evaluation result is good, execute S1106; if the evaluation result is poor, execute S1103.
- S1106 The executor runs the trained model according to the feature data detected in real time.
- the embodiment shown in FIG. 11 is different from the embodiment shown in FIG. 6 in that in the embodiment shown in FIG. 11, after the adaptive selector can select a model, the model can be selected from the model. Choose a set of model parameters from the known model parameters, without training the model to get the model parameters, saving calculation.
- the model parameters are known.
- the model parameters may be the model parameters obtained by the designer training the model according to the foregoing similar method before the mobile phone 100 leaves the factory, and then The model parameters are stored in the mobile phone 100 for use.
- the model parameters may also be that during the use of the mobile phone 100, the model is trained in a similar manner as described above to obtain model parameters, which are stored for use in subsequent processes.
- the mobile phone 100 selects a model, trains the model according to the process shown in FIG. 6, obtains model parameters, and then evaluates the model. When the evaluation result is poor, the mobile phone 100 selects another model again, as shown in FIG. Determine the model parameters of the model before evaluating the model.
- the processes shown in FIG. 6 and FIG. 11 may also be performed by a cloud server.
- the mobile phone 100 sends feature data to a cloud server.
- the cloud server selects one model from multiple models according to the process shown in FIG. 6, Then use the feature data as the input parameters of the model, run the model to perform calculations, obtain an output result, and then feed the output result back to the mobile phone 100.
- the above embodiments all take the mobile phone 100 according to the record of the user clicking on the app, by running the model to predict the scenario where the user may click on the app next time as an example.
- the technical solution provided by the embodiment of the present application can also be adapted to other application scenarios. For example, when a user opens the display interface of Taobao in the mobile phone 100, the display interface displays multiple commodities, and the currently clicked commodity is a shirt. The product that was clicked last time is a sweater, and the product that was clicked twice is a t-shirt, then the mobile phone 100 can also preset the type of the product that the user may click next according to the model selection method provided by the embodiment of the present application, and then recommend it to the user This type of goods.
- the technical solution provided by the embodiments of the present application can be applied to predict the user's next possible behavior or recommend the user's possible affairs to the user according to the user's habit of operating the mobile phone 100.
- the feature data (ie, input parameters) in the feature database may be manually specified.
- the designer may store the previously set feature data in the mobile phone 100, and the mobile phone 100 may evaluate or train the model based on the preset feature data.
- the mobile phone 100 can automatically search to obtain feature data.
- the mobile phone 100 can freely combine different parameters to obtain characteristic parameters.
- the mobile phone 100 can use only the first two clicks and the previous click app as input parameters, or the first three clicks on the app and the first two clicks on the app 2. Currently click app as input parameter.
- the mobile phone 100 may also automatically select other parameters than the parameters shown in FIG. 3 as input parameters.
- the mobile phone 100 can also select the currently clicked app, the duration of the current app, the number of times/frequency, the last time the app was clicked, the last time the app was used, the number of times/frequency, the last two clicks on the app, the first two clicks The length of time the app is used, the number/frequency of use, the current geographic location, the current time, etc.
- the feature data automatically searched by the mobile phone 100 during the model training process is consistent with the feature data searched during the model evaluation process.
- the feature data used for model training and the feature data used for model evaluation are continuous. Three click apps.
- the mobile phone 100 may fix the form of feature data, that is, the feature data includes three consecutively clicked apps. Therefore, when using the model, the mobile phone 100 selects feature data in the form of fixed feature data, such as selecting the currently clicked app, the previous click on the app, and the previous two clicks on the app as the feature data, which is the input parameter of the model.
- the method provided by the embodiments of the present application is introduced from the perspective of the terminal (mobile phone 100) as an execution subject.
- the terminal may include a hardware structure and/or a software module, and implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether one of the above functions is executed in a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application of the technical solution and design constraints.
- An embodiment of the present invention also provides a computer-readable storage medium.
- the storage medium may include a memory.
- the memory may store a program.
- the terminal is executed as described above. All or part of the steps performed by the terminal described in the illustrated method embodiment.
- An embodiment of the present invention also provides a computer program product, which, when the computer program product runs on a terminal, causes the terminal to execute the terminal described in the method embodiments shown in FIG. 6 and FIG. 11. All or part of the steps performed.
- Computer-readable media includes computer storage media and communication media, where communication media includes any medium that facilitates transfer of a computer program from one place to another.
- a storage medium may be any available medium that can be accessed by a computer.
- computer readable media may include RAM, ROM, electrically erasable programmable read-only memory (electrically erasable programmable read only memory, EEPROM), compact disc read-only (memory, CD- ROM) or other optical disk storage, magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer. Also. Any connection can become a computer-readable medium as appropriate.
- disks and discs include compact discs (CDs), laser discs, optical discs, digital video discs (DVDs), floppy disks, and Blu-ray discs, wherein Disks usually copy data magnetically, while disks use lasers to copy data optically.
- CDs compact discs
- DVDs digital video discs
- floppy disks floppy disks
- Blu-ray discs wherein Disks usually copy data magnetically, while disks use lasers to copy data optically.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Business, Economics & Management (AREA)
- Software Systems (AREA)
- Economics (AREA)
- Human Computer Interaction (AREA)
- Strategic Management (AREA)
- Computing Systems (AREA)
- Evolutionary Computation (AREA)
- Data Mining & Analysis (AREA)
- Mathematical Physics (AREA)
- Artificial Intelligence (AREA)
- General Business, Economics & Management (AREA)
- Accounting & Taxation (AREA)
- Human Resources & Organizations (AREA)
- Development Economics (AREA)
- Finance (AREA)
- Marketing (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Tourism & Hospitality (AREA)
- Medical Informatics (AREA)
- Operations Research (AREA)
- Entrepreneurship & Innovation (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Game Theory and Decision Science (AREA)
- Telephonic Communication Services (AREA)
- User Interface Of Digital Computer (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
一种模型选择方法和终端,该方法包括:终端获取用户操作所述终端的第一行为数据;终端按照预设策略从存储的多个模型中选择第一模型;终端将第一行为数据作为第一模型的输入参数,运行所述第一模型,得到第一输出结果;终端基于第一输出结果提供第一人工智能AI服务;当第一模型不满足条件时,终端重新从多个模型中选择第二模型;终端将第二行为数据作为第二模型的输入参数,运算第二模型,得到第二输出结果;其中,第二行为数据在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为;终端基于所述第二输出结果继续提供所述第一AI服务。通过这种方式,提高选择模型的灵活性,以更准确的提供AI服务,提升用户体验。
Description
本申请涉及终端技术领域,尤其涉及一种模型选择方法和终端。
随着人工智能(artificial intelligence,AI)技术的迅速发展,越来越多的终端中集成了AI类软硬件,为用户提供娱乐、工作、学习等AI相关服务,以满足人们对终端智能化需求。
现有技术中,终端实现AI相关服务的实现依赖于模型运算。具体而言,终端可以采集特征数据,将该特征数据作为模型的输入参数,移动终端运行该模型,得到输出结果,终端基于该输出结果提供AI相关服务。
当前,终端实现相同的AI相关功能时采用的模型始终都是同一个的模型,模型选择单一,不够灵活,无法满足终端智能化的趋势。
发明内容
本申请提供一种模型选择方法和终端,提高选择模型的灵活性,更能适应各种AI功能的需要。
第一方面,本申请实施例提供一种模型选择方法,该方法可以由终端(比如手机、ipad、笔记本电脑等)执行。该方法包括:终端获取用户操作所述终端的第一行为数据;所述终端按照预设策略从所述终端中存储的多个模型中选择第一模型;所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;所述终端基于所述第一输出结果提供第一人工智能AI服务;当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型;所述终端将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果;其中,第二行为数据在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为;所述终端基于所述第二输出结果继续提供所述第一AI服务。
在本申请实施例中,终端提供一项AI服务的过程为,终端从多个模型中选择第一模型,使用该第一模型提供AI服务(将用户行为数据作为第一模型的输入参数,得到输出结果,基于该输出结果提供AI服务)。比如,使用模型预测下一次用户可能点击的应用(输出结果),然后预加载该应用。通常,由于用户操作终端的行为会实时的发生变化,若终端一直使用第一模型,可能出现输出结果不准确的情况,比如,使用第一模型预测出用户下一次可能点击淘宝,但是用户实际上下一次点击游戏app,若多次出现这种情况,说明前述第一模型不准确(第一模型不符合条件),终端可以重新选择第二模型,继续使用该第二模型提供AI服务。在这个过程中,终端在提供一项AI服务的过程中可以使用不同的模型,提高选择模型的灵活性,以更准确的提供AI服务,提升用户体验。
在一种可能的设计中,所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型之前,所述终端对所述第一模型进行评价;所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,包括:当所述第一模型的评价结果满足条件时,所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一 模型,得到输出结果。
在本申请实施例中,终端使用模型之前,可以对该模型进行评价,当评价结果满足条件时,才使用该模型,当评价结果不满足条件,终端可以重新选择模型。通过这种方式有助于选择评价较好的模型,提高模型选择的准确性。
在一种可能的设计中,在所述终端对所述第一模型进行评价之前,所述终端确定输入参数和输出参数的取值;所述终端将所述确定的输入参数和输出参数的取值带入所述第一模型的公式中,确定所述第一模型的模型参数的取值,所述模型参数为所述第一模型中除去所述输入参数、输出参数之外的其它参数的取值;或者所述终端根据模型和模型参数的取值之间的对应关系,确定与所述第一模型对应的模型参数的取值。
在本申请实施例中,模型的公式中包括输入参数、输出参数和模型参数。终端对模型进行评价之前,可以先确定模型参数的取值。具体而言,终端可以使用两种方式确定模型参数的取值,比如将已知的输入参数和输出参数的取值代入模型的公式中,得到模型参数的取值,这种方式有助于提高确定模型参数的取值的准确性。再比如,终端中事先存储了模型和模型参数取值的对应关系,终端可以从中选择模型参数的取值,这种方式较为简单,有助于提高运算效率。
在一种可能的设计中,所述终端对所述第一模型进行评价,包括:所述终端获取用户操作所述终端的第三行为数据,所述第三行为数据在所述第一行为数据之前产生;所述终端将所述第三行为数据作为所述第一模型的输入参数,运行所述第一模型,得到测试结果;所述终端将所述测试结果与实际结果比较,所述实际结果为所述第三行为数据之后用户实际的操作;若一致,则所述第一模型的评价结果满足条件;若不一致,则所述第一模型的评价结果不满足条件。
在本申请实施例中,终端对模型的评价过程为,使用该模型得到测试结果,将测试结果和实际结果比较,若一致,则该模型的评价结果满足条件,若不一致,则该模型的评价结果不满足条件。通过这种方式有助于选择评价较好的模型,提高模型选择的准确性。
在一种可能的设计中,所述终端根据预设策略从多个模型中选择第一模型,包括:所述终端随机地从多个模型中选择第一模型,或者所述终端根据Q-table中选择Q值最大的模型,所述Q-table包括每个模型对应的Q值,所述Q值与所述每个模型的评价结果相关;或者所述终端根据当前业务选择与所述当前业务对应的第一模型。
在本申请实施例中,终端从多个模型中选择一个模型的方式有多种,比如根据业务选择。举例来说,预测下一次点击的app和预测下一次点击的商品种类这两项业务可以选择不同的模型。通过这种方式,有助于提高模型选择的准确性。
在一种可能的设计中,所述第一输出结果为在第一行为数据之后下一次用户可能发生的行为;当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型,包括:当通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同时,所述终端重新选择第二模型;或者当所述第一模型的使用时长达到预设时间时,所述终端重新选择第二模型。
在本申请实施例中,终端使用模型得到的输出结果为预测用户下一次可能发生的行为。因此,终端使用上一次选择出的模型提供AI服务的过程中,若上一次选择的模型无法准确的预测用户下一次可能发生的行为或者上一次选择的模型使用较长时间,则终端重新选择其它模型。通过这种方式,有助于提高模型选择的准确性,进而能够更准确的预测用户下 一次可能发生的行为。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括用户最近三次点击的应用;所述第一输出结果或所述第二输出结果为用户下一次可能点击的应用;
在本申请实施例中,终端能够预测用户下一次可能点击哪一个应用,以便提供相应的AI服务(比如预加载应用),提升用户体验。
在一种可能的设计中,所述第三行为数据包括在最近一次点击应用之前,连续三次点击的应用,所述实际结果为在所述连续三次点击应用之前的,前一次点击的应用。
在本申请实施例中,终端使用本申请实施例提供的模型选择方式预测用户下一次可能点击的应用时,终端评价模型时使用的第三行为数据可以是在最近一次点击应用之前,连续三次点击的应用,终端将第三行为数据作为模型的输入参数,得到测试结果,若测试结果和所述实际结果(在所述连续三次点击应用之前的,前一次点击的应用)一致,则评价结果满足条件,若不一致,则评价结果不满足条件。通过这种方式,有助于选择评价较好的模型,提高模型选择的准确性,进而更准确的预测用户下一次可能点击哪一个应用,以便提供相应的AI服务(比如预加载应用),提升用户体验。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的应用和用户下一次实际点击的应用不同。
在本申请实施例中,终端使用本申请实施例提供的模型选择方法预测用户下一次可能点击应用,以提供相应的AI服务的过程中,可以更换模型,比如使用上一次选择的模型无法准确的预测出的用户下一次可能点击应用,则重新选择其它模型。通过这种方式,提高模型选择的准确性,进而更准确的预测用户下一次可能点击哪一个应用,以便提供相应的AI服务(比如预加载应用),提升用户体验。
在一种可能的设计中,所述终端基于所述第一输出结果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的应用;或者所述终端关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用。
在本申请实施例中,终端使用本申请实施例提供的模型选择方法预测用户下一次可能点击应用,以提供相应的AI服务时,终端提供的AI服务可以包括预加载所述用户下一次可能点击的应用;或者关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用等。通过这种方式,方便用户操作终端,提升用户体验。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括:用户最近三次点击的商品的商品种类;所述第一输出结果或所述第二输出结果为用户下一次可能点击的商品种类。
在本申请实施例中,终端能够预测用户下一次可能点击的商品的种类,以便提供相应的AI服务(比如预加载该种类的商品),提升用户体验。
在一种可能的设计中,所述第三行为数据包括在最近一次点击商品种类之前,连续三次点击的商品种类,所述实际结果为在所述连续三次点击商品种类之前的,前一次点击的 商品种类。
在本申请实施例中,终端使用本申请实施例提供的模型选择方式预测用户下一次可能点击的商品种类时,终端评价模型时使用的第三行为数据可以是在最近一次点击商品种类之前,连续三次点击的商品种类,终端将第三行为数据作为模型的输入参数,得到测试结果,若测试结果和所述实际结果(在所述连续三次点击商品种类之前的,前一次点击的商品种类)一致,则评价结果满足条件,若不一致,则评价结果不满足条件。通过这种方式,有助于选择评价较好的模型,提高模型选择的准确性,进而更准确的预测用户下一次可能点击的商品种类,以便提供相应的AI服务(比如预加载该种类的商品),提升用户体验。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的商品种类和用户下一次实际点击的商品种类不同。
在本申请实施例中,终端使用本申请实施例提供的模型选择方法预测用户下一次可能点击的商品种类,以提供相应的AI服务的过程中,可以更换模型,比如使用上一次选择的模型无法准确的预测出的用户下一次可能点击商品种类,则重新选择其它模型。通过这种方式,提高模型选择的准确性,进而更准确的预测用户下一次可能点击商品种类,以便提供相应的AI服务(比如预加载该种类的商品),提升用户体验。
在一种可能的设计中,所述终端基于所述第一输出结果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于向用户推荐感兴趣的商品种类,所述感兴趣的商品种类与所述用户下一次可能点击的商品种类相同。
在本申请实施例中,终端使用本申请实施例提供的模型选择方法预测用户下一次可能点击商品种类,以提供相应的AI服务时,终端提供的AI服务可以包括预加载用户下一次可能点击的商品种类;或者输出提示信息,用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用户确定所述提示信息时,加载用户下一次可能点击的商品种类;或者输出提示信息,用于向用户推荐感兴趣的商品种类。通过这种方式,方便用户操作终端,提升用户体验。
在一种可能的设计中,所述第一模型或第二模型为决策树、神经单元、逻辑回归LR,朴素贝叶斯NB分类算法,随机森林RF算法和支持向量机SVM算法中的一种。
在本申请实施例中,上述的几种模型只是示例,还可以使用其它模型,本申请实施例不作限定。
第二方面,本申请实施例提供一种模型选择方法,该方法可以由服务器。该方法包括:服务器接收终端发送的用户操作所述终端的第一行为数据;所述服务器按照预设策略从所述服务器中存储的多个模型中选择第一模型;所述服务器将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;所述服务器将所述第一输出结果发送给终端,所述终端基于所述第一输出结果提供第一人工智能AI服务;当所述第一模型不满足条件时,所述服务器重新从多个模型中选择第二模型;所述服务器将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果;其中,第二行为数据所述终端发送的、在所述第一行为数据之后产生,且属于用户操作所述终端的同 类行为;所述服务器将所述第二输出结果发送所述终端,所述终端基于所述第二输出结果继续提供所述第一AI服务。
在本申请实施例中,终端可以采集用户行为数据,将该行为数据发送给服务器,由服务器选择模型,运行模型得到输出结果。终端基于该输出结果,提供AI服务。具体而言,服务器选择出一个模型之后,若这个模型不满足条件时,可以重新选择模型。通过这种方式,有助于提高模型选择的准确性,使得终端能够得到更加准确的输出结果,进而更准确的提供AI服务,提升用户体验。
在一种可能的设计中,所述服务器将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型之前,所述服务器对所述第一模型进行评价;所述服务器将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,包括:当所述第一模型的评价结果满足条件时,所述服务器将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果。
在一种可能的设计中,在所述服务器对所述第一模型进行评价之前,所述服务器确定输入参数和输出参数的取值;所述服务器将所述确定的输入参数和输出参数的取值带入所述第一模型的公式中,确定所述第一模型的模型参数的取值,所述模型参数为所述第一模型中除去所述输入参数、输出参数之外的其它参数的取值;或者所述服务器根据模型和模型参数的取值之间的对应关系,确定与所述第一模型对应的模型参数的取值。
在一种可能的设计中,所述服务器对所述第一模型进行评价,包括:所述服务器获取用户操作终端的第三行为数据,所述第三行为数据在所述第一行为数据之前产生;所述服务器将所述第三行为数据作为所述第一模型的输入参数,运行所述第一模型,得到测试结果;所述服务器将所述测试结果与实际结果比较,所述实际结果为所述第三行为数据之后用户实际的操作;若一致,则所述第一模型的评价结果满足条件;若不一致,则所述第一模型的评价结果不满足条件。
在一种可能的设计中,所述服务器根据预设策略从多个模型中选择第一模型,包括:所述服务器随机地从多个模型中选择第一模型,或者所述服务器根据Q-table中选择Q值最大的模型,所述Q-table包括每个模型对应的Q值,所述Q值与所述每个模型的评价结果相关;或者所述服务器根据所述终端当前业务选择与所述当前业务对应的第一模型。
在一种可能的设计中,所述第一输出结果为在第一行为数据之后下一次用户可能发生的行为;当所述第一模型不满足条件时,所述服务器重新从多个模型中选择第二模型,包括:当通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同时,所述服务器重新选择第二模型;或者当所述第一模型的使用时长达到预设时间时,所述服务器重新选择第二模型。
在本申请实施例中,终端可以统计使用模型预测出的用户下一次可能发生的行为,以及用户下一次实际发生的行为。当二者不同时,终端向服务器发送请求,以请求重新选择模型。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括用户最近三次点击的应用;所述第一输出结果或所述第二输出结果为用户下一次可能点击的应用。
在一种可能的设计中,所述第三行为数据包括在最近一次点击应用之前,连续三次点击的应用,所述实际结果为在所述连续三次点击应用之前的,前一次点击的应用。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次 实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的应用和用户下一次实际点击的应用不同。
在一种可能的设计中,所述终端基于所述第一输出结果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的应用;或者所述终端关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括:用户最近三次点击的商品的商品种类;所述第一输出结果或所述第二输出结果为用户下一次可能点击的商品种类。
在一种可能的设计中,所述第三行为数据包括在最近一次点击商品种类之前,连续三次点击的商品种类,所述实际结果为在所述连续三次点击商品种类之前的,前一次点击的商品种类。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的商品种类和用户下一次实际点击的商品种类不同。
在一种可能的设计中,所述终端基于所述第一输出结果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于向用户推荐感兴趣的商品种类,所述感兴趣的商品种类与所述用户下一次可能点击的商品种类相同。
在一种可能的设计中,所述第一模型或第二模型为决策树、神经单元、逻辑回归LR,朴素贝叶斯NB分类算法,随机森林RF算法和支持向量机SVM算法中的一种。
第三方面,本申请实施例提供一种终端,包括:行为日志采集器,用于获取用户操作所述终端的第一行为数据;自适应选择器,用于按照预设策略从所述终端中存储的多个模型中选择第一模型;执行器,用于将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;所述执行器还用于,基于所述第一输出结果提供第一人工智能AI服务。所述自适应选择器,还用于当所述第一模型不满足条件时,重新从多个模型中选择第二模型;所述执行器还用于将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果,并基于所述第二输出结果继续提供所述第一AI服务;其中,第二行为数据在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为。
在一种可能的设计中,所述终端还包括:评价器,用于对所述第一模型进行评价;所述执行器在用于将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型时,具体包括:当所述第一模型的评价结果满足条件时,将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果。
在一种可能的设计中,所述自适应选择器还用于:确定输入参数和输出参数的取值;将所述确定的输入参数和输出参数的取值带入所述第一模型的公式中,确定所述第一模型的模型参数的取值,所述模型参数为所述第一模型中除去所述输入参数、输出参数之外的 其它参数的取值;或者根据模型和模型参数的取值之间的对应关系,确定与所述第一模型对应的模型参数的取值。
在一种可能的设计中,所述评价器具体用于:获取用户操作所述终端的第三行为数据,所述第三行为数据在所述第一行为数据之前产生;将所述第三行为数据作为所述第一模型的输入参数,运行所述第一模型,得到测试结果;将所述测试结果与实际结果比较,所述实际结果为所述第三行为数据之后用户实际的操作;若一致,则所述第一模型的评价结果满足条件;若不一致,则所述第一模型的评价结果不满足条件。
在一种可能的设计中,所述自适应选择器具体用于:随机地从多个模型中选择第一模型,或者根据Q-table中选择Q值最大的模型,所述Q-table包括每个模型对应的Q值,所述Q值与所述每个模型的评价结果相关;或者根据当前业务选择与所述当前业务对应的第一模型。
在一种可能的设计中,所述第一输出结果为在第一行为数据之后下一次用户可能发生的行为;所述自适应选择器在用于当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型时,具体用于:当通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同时,重新选择第二模型;或者当所述第一模型的使用时长达到预设时间时,重新选择第二模型。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括用户最近三次点击的应用;所述第一输出结果或所述第二输出结果为用户下一次可能点击的应用;
在一种可能的设计中,所述第三行为数据包括在最近一次点击应用之前,连续三次点击的应用,所述实际结果为在所述连续三次点击应用之前的,前一次点击的应用。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的应用和用户下一次实际点击的应用不同。
在一种可能的设计中,所述执行器在用于基于所述第一输出结果或第二输出结果,提供AI相关服务时,具体用于:预加载所述用户下一次可能点击的应用;或者关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用。
在一种可能的设计中,所述第一行为数据或所述第二行为数据包括:用户最近三次点击的商品的商品种类;所述第一输出结果或所述第二输出结果为用户下一次可能点击的商品种类。
在一种可能的设计中,所述第三行为数据包括在最近一次点击商品种类之前,连续三次点击的商品种类,所述实际结果为在所述连续三次点击商品种类之前的,前一次点击的商品种类。
在一种可能的设计中,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的商品种类和用户下一次实际点击的商品种类不同。
在一种可能的设计中,所述执行器在用于基于所述第一输出结果或第二输出结果,提供AI相关服务时,具体用于:预加载所述用户下一次可能点击的商品种类;或者输出提示信息,所述提示信息用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用 户确定所述提示信息时,加载所述用户下一次可能点击的商品种类;或者输出提示信息,所述提示信息用于向用户推荐感兴趣的商品种类,所述感兴趣的商品种类与所述用户下一次可能点击的商品种类相同。
在一种可能的设计中,所述第一模型或第二模型为决策树、神经单元、逻辑回归LR,朴素贝叶斯NB分类算法,随机森林RF算法和支持向量机SVM算法中的一种。
第四方面,本申请实施例提供一种服务器,包括:
接收器,用于接收终端发送的用户操作所述终端的第一行为数据;
处理器,用于将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;
发送器,用于将所述第一输出结果发送给终端,所述终端基于所述第一输出结果提供第一人工智能AI服务;
所述处理器还用于,当所述第一模型不满足条件时,重新从多个模型中选择第二模型;所述服务器将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果;其中,第二行为数据所述终端发送的、在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为;
所述发送器还用于,将所述第二输出结果发送所述终端,所述终端基于所述第二输出结果继续提供所述第一AI服务。
第五方面,本申请实施例提供一种终端,包括存储器和处理器,
所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述终端能够实现上述第一方面或上述第一方面的任意一种可能的设计的方法。
第六方面,本申请实施例提供一种服务器,包括存储器和处理器,
所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述服务器能够实现上述第二方面或上述第二方面的任意一种可能的设计的方法。
第七方面,本申请实施例还提供了一种终端,所述终端包括执行第一方面或者第一方面的任意一种可能的设计的方法的模块/单元;这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第八方面,本申请实施例还提供了一种服务器,所述服务器包括执行第二方面或者第二方面的任意一种可能的设计的方法的模块/单元;这些模块/单元可以通过硬件实现,也可以通过硬件执行相应的软件实现。
第九方面,本申请实施例中还提供一种计算机可读存储介质,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行第一方面或上述第一方面的任意一种可能的设计的方法;或者,当计算机程序在服务器上运行时,使得所述服务器执行第二方面或上述第二方面的任意一种可能的设计的方法。
第九方面,本申请实施例还提供一种包含计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述终端执行第一方面或上述第一方面的任意一种可能的设计的方法;或者,当所述计算机程序产品在服务器上运行时,使得所述服务器执行第二方面或上述第二方面的任意一种可能的设计的方法。
图1为本申请一实施例提供的一种模型的示意图;
图2为本申请一实施例提供的另一种模型的示意图;
图3为本申请一实施例提供的一种特征数据库的示意图;
图4为本申请一实施例提供的手机100的结构示意图;
图5为本申请一实施例提供的手机100中部分器件的结构示意图;
图6为本申请一实施例提供的一种模型选择方法的流程示意图;
图7为本申请一实施例提供的一种样本参数的示意图;
图8为本申请一实施例提供的模型训练过程的示意图;
图9为本申请一实施例提供的手机100中部分器件的结构示意图;
图10为本申请一实施例提供的一种模型和模型参数对应关系的示意图;
图11为本申请一实施例提供的另一种模型选择方法的流程示意图。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述。
以下,对本申请实施例中的部分用语进行解释说明,以便于本领域技术人员理解。
本申请实施例涉及的应用程序(application,简称app),为能够实现某项或多项特定功能的软件程序。通常,终端中可以安装多个应用程序。比如,相机应用、短信应用、彩信应用、各种邮箱应用、微信、腾讯聊天软件(QQ)、WhatsApp Messenger、连我(Line)、照片分享(instagram)、Kakao Talk、钉钉等。下文中提到的应用程序,可以是终端出厂时已安装的应用程序,也可以是用户在使用终端的过程中从网络下载或其他终端获取的应用程序。
本申请实施例涉及的模型,即算法,包括一个或多个函数/方程。本申请实施例提到的模型可以是现有技术的模型,比如决策树、逻辑回归(logistic regression,LR),朴素贝叶斯(naive bayes,NB)分类算法,随机森林(random forest,RF)算法,支持向量机(support vector machines,SVM)算法等等。通常,模型是包括模型参数、输入参数和输出参数的函数式,在给定模型参数和输入参数的具体取值的情况下,通过计算该函数式可以得到输出结果。不同模型的模型参数一般不同。下面以模型是神经网络单元和RF算法为例,介绍模型参数。
请参见图1所示,以模型是神经单元为例。神经单元作为一个具有计算能力的单元;其计算方式(即模型)如下:
其中,x1,x2-xn是神经单元的多个输入参数;w1,w2-wn是每个输入参数的系数(也称之为权重);b是每个输入参数的偏移量(用于指示u与坐标原点的截距);f是用于保证输出结果的取值范围为区间[0,1]内的函数(比如Sigmoid函数、tanh函数等)。
因此,当终端中的模型为神经单元时,模型参数即为权重w
i和偏移量b,输入参数为x,输出参数为y。当w、b、x给出具体取值时,可以通过上述公式得到输出结果y。
请参见图2所示,图2中以模型是决策树为例。
如图2所示,决策树包括三层,第一层包括根节点,第二层包括两个子节点,第三层包括两个子节点。其中,第一层中根节点对应输入参数x1,决策树判断输入参数x1是否满足条件(比如是否大于预设值a)。当x1大于a时,流程走到子节点1,当x1小于等于a时,流程走到子节点2。第二层的子节点对应输入参数x2。决策树判断输入参数x2是否满足条件(比如是否大于预设值b)。当x2大于b时,流程走到子节点3,子节点3的值y即为输出结果。若x2小于等于b时,流程走到子节点4,子节点4的值y即为输出结果。
因此,当终端中的模型是决策树时,模型参数包括子节点个数、决策树的层数、预设值等等。输入参数包括x1和x2。在给出模型参数和输入参数的具体取值的情况下,终端可以通过图2所示的决策树,得到输出结果y。
以上只是通过列举两种模型示例,介绍模型的模型参数、输入参数、输出参数等。在实际应用中,还可以是其它模型,不同模型的模型参数不同,在此不多赘述。
需要说明的是,通常,模型的模型参数是未知的,以图1所示的神经单元为例,如果模型的模型参数(权重w和偏移量b)是未知的话,终端运行模型是无法得到输出结果的。因此,在本申请实施例中,终端可以通过模型训练的方式确定模型参数。所谓模型训练过程为,终端在已知输入参数和输出参数的具体值的情况下,确定模型参数的过程。以图1所示的模型为例,模型的训练过程为,确定权重w和偏移量b的过程。具体而言,终端检测输入参数和输出参数(xi、yi),带入公式,得到权重w和偏移量b。以图2所示的模型为例,终端训练模型的过程为,确定模型的模型参数(层数、子节点个数、预设值a)的过程。当模型训练之后,该模型才可以被使用,即终端将检测到的特征数据作为该模型的输入参数,运行模型(训练后的模型)得到输出结果。
本申请实施例涉及的特征数据,是模型的输入参数。通常,特征数据包括用户操作终端的行为数据,终端将这些行为数据作为模型的输入参数,预测用户下一次可能发生的行为,以便提供相应的AI服务(后文介绍)。需要说明的是,本申请实施例提供的模型选择方法可以适用于多种场景,不同的场景下,特征数据可以不同。比如,若模型选择方法应用在预测用户将要点击的app的场景时,特征数据可以是用户点击app的记录(比如当前点击的app,前一次点击的app,前两次点击的app)。其中,当前点击app是终端在当前时刻点击的app,前一次点击app是在当前时刻之前最近一次点击的app,前两次点击app是从当前时刻起倒数第二次点击的app。
需要说明的是,终端在存储特征数据时,可以记录每个数据的时间。比如,当前时刻t1是10:00,终端检测到在当前时刻t1之前最近一次是在t2(09:58)时点击微信,在t3(09:55)时点击支付宝,在t4(09:50)时点击美团,其中,t1-t2,t2-t3,t3-t4之间点击应用的记录,则当前点击app是微信,前一次点击app是支付宝,前两次点击app是美团。
终端将这些特征数据(用户点击app的记录)作为模型的输入参数,运行模型,得到输出结果,该输出结果为用户下一次可能点击的app。
请参见图3所示,为本申请实施例提供的特征数据的示意图。如图3所示,特征数据包括用户点击app的记录。需要说明的是,为了方便计算,终端可以为每个应用对应一个数字,比如淘宝为1,天猫为2,微信为3,京东为4,美团为5,支付宝为6。在计算过程中,将不同应用对应到不同数字进行计算。
本申请实施例涉及的原始数据,是终端采集的未经过处理的数据。终端对原始数据进行预处理(预处理过程将在后文介绍)之后,得到前述的特征数据。
本申请实施例涉及的训练数据,用于训练模型的数据。如前述内容可知,训练模型需要已知输入参数和输出参数的取值,以确定未知的模型参数取值。因此,训练数据中包括已知的输入参数和输出参数的取值。继续以预测用户将要点击的app的场景为例,请参见图3所示,样本参数2-4可以作为训练数据。以样本参数2为例,样本参数2中得到前第一次点击的app作为已知的输出参数;样本参数2中的前两次点击的app,前三次点击的app作为已知的输入参数。当然,训练数据也可以是设计人员根据经验设置的,本申请实施例不限定。
本申请实施例涉及的测试数据,用于评价模型的数据。其中,测试数据包括已知的输入参数和输出参数的取值。终端确定模型的模型参数后,可以通过测试数据对该模型进行评价。示例性的,对模型的模型过程可以是,终端将测试数据中已知的输入参数的取值代入模型,运行模型得到测试结果,该测试结果与真实结果比较,若一致,则该模型评价较好,若不一致,则该模型评价较差。并且,该测试可以进行多次,根据多次的测试结果与真实结果的比较,来评价模型。当然,测试数据也可以是设计人员根据经验设置的,本申请实施例不限定。
继续以预测用户将要点击的app的场景为例,请参见图3所示,样本参数1可以作为测试数据,样本参数1中的当前点击app可以作为真实结果。前一次点击的app和前两个次点击的app可以作为已知的输入参数。终端根据这两个输入参数,运行模型,得到测试结果。假设该测试结果表征前一次点击的app是app1,而测试数据(样本参数1)中记录的前一次点击的app是app2,app1和app2不一致,则该模型的评价较差。
需要说明的是,在本申请实施例中模型训练过程中需要训练数据和模型评价过程中需要的测试数据都是来自特征数据库。以图3为例,哪些数据作为训练数据,哪些数据作为测试数据,本申请实施例不限定。上述的例子中,是以图3中的样本参数2-4作为训练数据,而样本参数1作为测试数据的,在实际应用中,也可以将其它样本参数也可以作为训练数据或者测试数据。
需要说明的是,以上仅是以图3所示的例子介绍特征数据、训练数据和测试数据的区别,在实际应用中,特征数据,训练数据和测试数据可以更为复杂,本申请实施例不限定。
本申请实施例涉及的AI服务,终端运行模型得到输出结果后,可以基于该结果提供一定的服务。通常,AI服务和业务相关。不同业务的AI服务也不同。比如,预测下一次点击的app作为一项业务,该业务相关的AI服务可以预加载所述下一次点击的app等。再比如,预测下一次点击的商品种类作为另一项业务,该业务相关的AI服务可以是向用户推荐同种类商品等。
应理解,终端的用户可以订购不同的业务,以手机为例,手机的特定app比如应用商城可以提供业务订购选项。用户订购某个业务时,手机提供对应的AI服务。当然,手机也在激活后,自动提供上述AI服务,无需用户订购。
不同业务需要的特征数据即输入参数也不同,即对于不同的业务,终端采集用户的行为数据不同。比如,预测下一次点击的app这项业务,终端更关注用户点击app的行为,比如这项业务需要的特征数据包括用户当前点击app、前一次点击app、前两次点击app。而预测下一次点击的商品种类这项业务,终端更关注用户点击商品的行为,比如这项业务需要的特征数据包括用户当前点击商品种类、前一次点击商品种类、前两次点击商品种类。当终端订购某项业务后,终端就采集该项业务需要的特征数据。
本申请实施例涉及的多个,是指大于或等于两个。
需要说明的是,本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中字符“/”,如无特殊说明,一般表示前后关联对象是一种“或”的关系。且在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
以下介绍终端、用于这样的终端的图形用户界面(graphical user interface,GUI)、和用于使用这样的终端的实施例。在本申请一些实施例中,终端可以是便携式终端,诸如手机、平板电脑、具备无线通讯功能的可穿戴设备(如智能手表)等。该便携式终端包含能够运行模型进行计算的器件(比如处理器),以及能够获取特征数据的器件(比如传感器)。便携式终端的示例性实施例包括但不限于搭载
或者其它操作系统的便携式终端。上述便携式终端也可以是其它便携式终端,只要能够获取特征数据,并运行模型进行计算即可。还应当理解的是,在本申请其他一些实施例中,上述终端也可以不是便携式终端,而是能够获取特征数据,并运行模型进行计算即可的台式计算机。
当然,在本申请另一些实施例中,终端也可以无需具有运行模型进行计算的能力,只需具有通信能力,可以将检测的特征数据发给具有运行模型进行计算的能力的其他设备(比如云端服务器),由其他设备进行计算得到输出结果,终端只需接收云端服务器发送的输出结果即可。在下文中,以终端自己获取特征数据,并运行模型进行计算为例的。
以终端是手机为例,图4示出了手机100的结构示意图。
手机100可以包括处理器110,外部存储器接口120,内部存储器121,通用串行总线(universal serial bus,USB)接口130,充电管理模块140,电源管理模块141,电池142,天线1,天线2,移动通信模块151,无线通信模块152,音频模块191(包括扬声器,受话器,麦克风,耳机接口等图中未示出),传感器模块180,按键190,显示屏194,以及用户标识模块(subscriber identification module,SIM)卡接口195等。其中传感器模块180可以包括压力传感器180A,距离传感器180F,接近光传感器180G,指纹传感器180H,触摸传感器180K等(手机100还可包括其他传感器比如温度传感器、环境光传感器、陀螺仪传感器等,图中未示出)。
可以理解的是,本申请实施例示意的结构并不构成对手机100的具体限定。在本申请另一些实施例中,手机100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
下面对图4示出的手机100中的部件进行介绍。
处理器110可以包括一个或多个处理单元,例如:处理器110可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。其中,控制器可以是手机100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
处理器110中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110 中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器110的等待时间,因而提高了系统的效率。
其中,处理器110能够运行模型进行计算。以处理器110集成NPU为例,NPU能够运行模型进行计算。本申请实施例涉及至少两个不同的模型。其中,不同的模型可以同一处理器运行,也可以由不同的处理器运行。比如,对于运算过程较为复杂的模型,可以由运算能力相对较强的处理器来运行,对于运算过程较为简单的模型,可以由运算相对较弱的处理器来运行。以处理器110集成NPU和应用处理器为例,当模型是RF算法时,该模型可以由NPU运行,当模型是LR算法时,该模型可以由应用处理器运行。以上内容均是举例,在实际应用中,本领域技术人员可以根据实际情况确定哪一个模型或者哪一些模型由哪一个处理器运行,本申请实施例对此不限定。
内部存储器121可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器110通过运行存储在内部存储器121的指令,从而执行手机100的各种功能应用以及数据处理。内部存储器121可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储手机100使用过程中所创建的数据(比如音频数据,电话本等)等。
内部存储器121还可以用于存储至少两个模型(比如,存储程序区中可以存储至少两个模型)。内存存储器121中存储的模型可以被处理器110访问并运行。如图4所示,内部存储器121中还可以存储有行为日志采集器、特征数据预处理器、自适应选择器、评价器、执行器各自的代码。当所述代码被处理器110运行时,实现相关的功能,具体将在后文介绍。
其中,内部存储器121可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。
下面介绍传感器模块180的功能。
压力传感器180A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器180A可以设置于显示屏194。
距离传感器180F,用于测量距离。手机100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,手机100可以利用距离传感器180F测距以实现快速对焦。在另一些实施例中,手机100还可以利用距离传感器180F检测是否有人或物体靠近。
接近光传感器180G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。手机100通过发光二极管向外发射红外光。手机100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定手机100附近有物体。当检测到不充分的反射光时,手机100可以确定手机100附近没有物体。手机100可以利用接近光传感器180G检测用户手持手机100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器180G也可用于皮套模式,口袋模式自动解锁与锁屏。
指纹传感器180H用于采集指纹。手机100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。
触摸传感器180K,也称“触控面板”。触摸传感器180K可以设置于显示屏194,由触摸传感器180K与显示屏194组成触摸屏,也称“触控屏”。触摸传感器180K用于检测作用 于其上或附近的触摸操作。触摸传感器180K可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏194提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器180K也可以设置于手机100的表面,与显示屏194所处的位置不同。
下面介绍处理器110运行行为日志采集器、特征数据预处理器、自适应选择器、评价器、执行器的代码,实现的功能如下:
行为日志采集器采集原始数据,该原始数据可以反映用户操作手机100的行为习惯。
比如,触摸传感器180K检测到触摸操作,将该触摸操作发送给处理器110,处理器110确定该触摸操作对应的位置坐标(比如触摸屏是电容式触摸屏时,处理器110基于电容变化确定该触摸操作对应的坐标位置),即用户点击显示屏上的位置坐标,该位置坐标对应的图标即用户点击的图标(或者,触摸传感器180K自身能够确定触摸操作对应的坐标位置,将该触摸操作和该坐标位置发生给处理器110,处理器110无需再确定触摸操作对应的坐标位置)。处理器110运行行为日志采集器的代码,记录该图标的信息(应用的包名、点击时间),得到原始数据。当然,若触摸传感器180K可以自己确定出用户点击的图标的话,可以由触摸传感器180K将图标信息发送给处理器110。
处理器110运行行为日志采集器的代码,还可以记录每个应用的使用时长,比如一个应用的应用界面显示了3分钟,则该应用的使用时长为3分钟。
数据预处理器,用于对行为日志采集器采集的原始数据进行预处理。比如,触摸传感器180K在间隔较短的时间内检测到两个触摸操作。触摸传感器180K将这个触摸操作发送给处理器110。处理器110确定这两个触摸操作对应的位置坐标。假设第一个触摸操作对应的位置坐标处没有对应的图标(可能是误操作),第二个触摸操作对应的位置坐标处有对应的图标。因此,行为日志采集器采集到两个点击app的记录,其中第一次点击app的记录为空,第二次点击app的记录不为空。数据预处理器可以删除第一次点击的记录,或者,数据预处理器可以为第一次点击app填充内容,比如将第二次点击的app,填充到第一次点击app的记录中。
自适应选择器,用于从多种模型中选择一种模型。若模型存储在内部存储器121中,则自适应选择器可以从内部存储器121中存储的多种模型中选择一种模型。若模型存储在外部存储器中,则自适应选择器可以从外部存储器中存储的多种模型中选择一种模型(比如,通过外部存储器接口120从外部存储器中选择模型)。自适应选择器从多种模型中选择一种模型的方式有多种,在下文中将详细介绍。
评价器,用于对自适应选择器选择出的模型进行评价。评价器评价一个模型的方式有多种。比如,评价器可以通过测试数据(请参见前述关于测试数据的描述)运行该模型,得到测试结果,将该测试结果与真实结果进行比较,若测试结果与真实结果一致,则该模型评价较好。若测试结果与真实结果不一致,则该模型评价结果较差。评价器对模型的评价过程,将在后文介绍。
执行器,用于运行自适应选择器选择出的模型进行计算。具体而言,执行器将行为日志采集器采集的特征数据作为模型的输入参数,运行该模型,得到输出结果。
上文中,是以行为日志采集器、数据预处理器、自适应选择器、评价器、执行器是软件代码为例的。其中,不同的软件代码可以均在同一处理器上运行,或者在不同的处理器上运行(比如,当处理器110集成应用处理器和NPU时,自适应选择器的代码在应用处理器上运行,执行器的代码在NPU上运行)。
上文中,是以行为日志采集器、数据预处理器、自适应选择器、评价器、执行器是软件代码为例的。实际上,行为日志采集器、数据预处理器、自适应选择器、评价器、执行器中的一个或多个还可以是硬件(或软硬件结合)。这些硬件可以在手机100出厂时,设置在手机100中(比如芯片或者其它硬件形式)。
以执行器是硬件为例,执行器可以集成于处理器110中,即作为处理器110的一部分(比如处理器110是NPU时,执行器是NPU的一部分),也可以是独立于处理器110的部件。若执行器是独立于处理器110的部件,那么处理器110可以不具有运行模型进行计算的能力,由执行器进行计算即可。
手机100通过GPU,显示屏194,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏194和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器110可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏194用于显示图像,视频等。显示屏194包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emitting diode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrix organic light emitting diode的,AMOLED),柔性发光二极管(flex light-emitting diode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot light emitting diodes,QLED)等。在一些实施例中,手机100可以包括1个或N个显示屏194,N为大于1的正整数。
另外,手机100可以通过音频模块191(扬声器,受话器,麦克风,耳机接口),以及处理器110等实现音频功能。例如音乐播放,录音等。手机100可以接收按键190输入,产生与手机100的用户设置以及功能控制有关的键信号输入。手机100中的SIM卡接口195用于连接SIM卡。SIM卡可以通过插入SIM卡接口195,或从SIM卡接口195拔出,实现和手机100的接触和分离。
尽管图1未示出,手机100还可以包括摄像头,例如前置摄像头、后置摄像头;还可以包括马达,用于产生振动提示(比如来电振动提示);还可以包括指示器比如指示灯,用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。
本申请实施例提供的模型选择方法中,手机100可以从多种模型中选择一种模型,然后将检测到的特征数据作为该模型的输入参数,运行模型进行计算,得到输出结果。本申请实施例提供的模型选择方法可以适用于多种应用场景。在不同的应用场景下,特征数据不同。示例性的,以应用场景是手机100预测用户将要点击的app为例,则特征数据可以是用户点击app的记录(比如,用户当前点击的app,前一次点击的app,前两个点击的app)等等。手机100从多种模型中选择出一种模型后,将这些特征数据作为选出的模型的输入参数,得到输出结果,该输出结果表征用户下一次可能点击的app。
举例来说,手机100检测到用户当前点击的app是淘宝,前一次点击的app是天猫,前两个点击的app是微信。手机100将这些参数作为模型的输入参数,运行模型,得到输出结果,假设该输入结果是京东,即手机100预测出下一次用户可能点击京东。手机100预测出用户的下一次可能点击京东后,可以做一些准备工作。比如,预加载京东,或者关闭后台运行的用户暂时不可能点击的app,以清理内存空间等。
通常,不同的用户操作同一个手机的习惯不同,通过本申请实施例提供的模型选择方法,当不同用户操作手机时,手机100可以根据该用户操作手机的行为习惯,预测用户下一次可能的行为。通常,同一个用户在不同的时间段,操作手机的习惯也不同,通过本申 请实施例提供的模型选择方法,手机100可以根据用户当前时间段内操作手机的行为习惯实时预测该用户下一次可能的行为。
以上的应用场景只是一种示例,本申请实施例提供的模型选择方法还可以适用于其它的应用场景(后文介绍),下文中,以上述的应用场景为例,介绍本申请实施例的模型选择方法。
为了方便描述本申请实施例提供的模型选择方法,下文将通过与本申请实施例提供的模型选择方法相关的部件介绍本申请实施例的模型选择方法,具体请参见图5,图5中的部件可参考关于图1的相关描述。如图5所示,手机100分为在线部分和离线部分。其中,离线部分是包括自适应选择器和评价器。因此,离线部分的功能包括:自适应选择器选择模型、模型训练(确定模型参数)过程,以及评价器对模型评价的过程。如前述内容可知,模型训练或模型评价时采用的都是已知输入参数和输出结果的数据,只是用来选择模型和评价模型的,无需提供AI服务(可以不适用实时的特征数据作为输入参数,而使用历史的或者预先设置的数据,只要是已知输入参数和输出结果的数据即可)。
在线部分的功能包括,执行器运行离线部分选择出的模型,得到输出结果,并基于该输出结果提供AI服务。因此,在线部分使用的模型是由离线部分选择出的最合适的模型,为用户提供AI服务的部分。通常,为了给用户提供准确的AI服务,在线部分将实时采集特征数据作为模型的输入参数。
离线部分和在线部分可以同时运行也可以不同时运行。比如,在线部分中执行器在使用一个模型进行计算的同时,离线部分可以进行模型选择、训练、评价等过程。假设离线部分选择另一个模型,将该另一个模型发送给在线部分的执行器,由执行器根据另一个模型进行计算。再比如,离线部分可以一直运行,在线部分仅在需要的时候运行,比如在有特征数据的时候运行,而在没有特征数据(用户长时间未操作手机)的时候不运行。再比如,离线部分选择好一个模型之后,可以暂停工作一段时间,在这段时间内在线部分仍然需要基于选好的模型进行计算,以便实时的提供AI服务。
如图5所示,手机100中的内部存储器121中存储有模型候选集和特征数据库(在实际应用中,模型数据库和特征数据库可以存储在其它存储器中)。下面介绍模型候选集和特征数据库的作用。
(1)、模型候选集中包括至少两个模型。
如前述内容可知,模型即算法,即模型数据库中存储有至少两个算法。这里所述的至少两个算法可以是终端出厂时,就存储在手机100中的;也可以是云端服务器向手机100推送的算法,比如,华为手机的云端服务器可以定期的向华为手机推送算法,华为手机将推送的算法存储在模型候选集中。模型(即算法)可以是现有技术中的算法,比如,LR算法,NB算法,RF算法等等。
可选的,为了区分不同的模型,手机100可以为每个模型设置模型标识。比如,决策树为模型1,NB算法为模型2,RF算法为模型3,SVM算法为模型4。
(2)、特征数据库中包括特征数据,该特征数据可以作为模型的输入参数。特征数据前述已经描述过,在此不重复赘述。
下面介绍通过图5所示的手机100实现本申请实施例的模型选择方法。
行为日志采集器采集原始数据,数据预处理器对原始数据进行预处理,得到特征数据(具体过程前述内容已提到过程,在此不重复赘述)。数据预处理器将特征数据存储在特 征数据库中。自适应选择器从模型数据库中选择一个模型(模型参数是未知的),然后从特征数据库中选择训练数据,并通过该训练数据对选择出的模型进行训练,得到训练后的模型(为了方便描述,下文中简称训练后的模型为模型A,模型A中模型参数是已知的)。评价器从特征数据库中选择测试数据,并通过测试数据对模型A进行评价(具体过程将在后文介绍)。若评价结果较差,则自适应选择器重新从多个模型中选择另一个模型,然后对另一个模型执行上述过程。若评价结果较好,则执行器采用模型A进行计算(从特征数据库中选择特征参数,并将特征参数作为模型A的输入参数,运行模型A,得到输出结果)。
具体而言,请参见图6所示,为本申请实施例提供的模型选择方法的流程示意图。该流程包括,处理器110运行存储在内部存储器121中的行为日志采集器、特征数据预处理器、自适应选择器、评价器、执行器的代码,执行如下过程:
S601:行为日志采集器用于采集原始数据,该原始数据包括特征数据,该特征数据包括用户点击app的记录。
S602:数据预处理器用于对原始数据进行预处理,得到特征数据,存储在特征数据库中。
需要说明的是,行为日志采集器可以每检测到一条原始数据(比如当前点击的app),就将这条原始数据发送给数据预处理器;或者,行为日志采集器可以在检测到至少两条原始数据(比如,当前点击app、前一次点击app)后,将所述至少两条原始数据一并发送给数据预处理器。
关于数据预处理器可以对行为日志采集器采集的原始数据做预处理的过程,前文已经描述过,为了说明书的简洁在此不重复赘述。
S603:自适应选择器按照预设策略从模型候选集的多个模型中选择一个模型。
策略一:自适应选择器可以随机的从多个模型中选择一个模型。
示例性的,模型候选集中包括决策树、LR算法,NB算法,RF算法三种算法。自适应选择器可以随机选择,比如选择LR算法。手机100可以不确定哪一个模型较为合适时(手机100激活时或者开机时),可以采用策略一。
策略二:自适应选择器基于强化学习算法从多个模型中选择一个模型。比如,终端选择一个模型,然后对该模型进行评价,得到评价结果,基于该评价结果选择模型。比如从中选择一个评价结果最佳的,或者选择一个评价结果满足预设条件(后文介绍)等方式。关于终端对模型的评价过程,将在后文介绍。自适应选择器可以周期性的选择模型(比如模型使用一段时间后,可以自动重新选择模型),或者当选择出的模型使用一段时段后,不符合条件时,重新选择模型。举例来说,在上一个时间段内,手机100选择的模型为模型1,在下一个时间段内,用户的行为习惯发生变化,所以上一个时间段内选择出的模型1的输出结果准确性较差(输出结果和用户真实点击的app不符合),手机100可以重新选择模型。总之,自适应选择器可以不断地选择适合当前实际情况的模型。
下面以强化学习算法是Q-table算法为例。其中,Q-table中包括每个模型的Q值,该Q值是与每个模型的评价结果相关的参数,比如模型的评价结果越好时,Q值越高;模型的评价结果较差时,Q值较差。因此,Q值的大小可以反映模型的评价结果。自适应选择器可以在Q-table中选择Q值最大的模型。
可选的,Q-table中的每个模型的Q值可以是手机100在出厂时设置好的,比如手机100在出厂之前,设计人员根据经验值确定的每个模型的Q值。当然,Q-table中的每个模 型的Q值还可以是手机100在使用的过程中填充的。比如,手机100在激活或者开机时,Q-table中每个模型的Q值均为0。评价器在每评价一个模型后,就在Q-table中填充该模型的Q值。
因此,当某个模型在Q-table中的Q值不为0时,自适应选择器在选择模型时,可以参考Q-table中该模型的Q值。比如,若该模型的Q值较高,自适应选择器可以选择该模型;或者,自适应选择器可以选择Q-table中Q值较大的模型;当然,自适应选择器还可以采用其他策略选择模型,本申请实施例不多赘述。
需要说明的是,上述仅仅是以Q-table为例的,在实际应用中,还可以使用其他强化学习方法或者最优化算法,本申请实施例不限定。
策略三:手机100可以当前的业务选择与所述业务相匹配的模型。
如前述内容可知,不同业务对应的AI服务不同。因此,手机100可以选择不同的模型,以运行的业务。以预测用户下一次点击app的场景和预测用户下一次可能点击的商品种类这两项业务为例,手机100可以选择不同的模型,即对于每一项业务,执行一次图6所示的流程。
其中,策略一和策略二可以结合使用,比如,当手机100激活时或者开机后,Q-table中的每个模型的Q值均为0。自适应选择器可以采用策略一选择模型。当自适应选择器在后续过程中将Q-table中每个模型的Q值填充之后,可以按照策略二选择模型。
自适应选择器选择出模型之后,可以训练该模型,确定模型参数。
S604:自适应选择器从特征数据库中获取训练数据,并根据训练数据对选择的模型进行训练,得到训练后的模型。
如前述内容可知,模型的训练过程,即确定模型参数的过程。由于自适应选择器对模型训练,需要知道已知的输入参数和输出结果,才能确定出模型参数。因此,自适应选择器可以从图3所示的特征数据库中选择训练数据。该训练数据中包括已知的输入参数和输出结果。比如,自适应选择器可以选择样本参数2作为训练数据。样本参数2中的前一次点击app可以作为输出参数,前两个点击app和前三次点击app可以作为输入参数。
通常,为了得到较为准确的模型参数,在训练模型时,可以选择多个样本参数。比如,请参见图7所示,为4个样本参数的示意图。其中,每个样本参数对应一个样本序号(为了方便描述,与图3中的样本参数不同,图7中的每个样本参数是前两次点击app、前一次点击app、当前点击app为例的)。
下面以模型是图2所示的决策树为例,介绍自适应选择器训练模型的过程。请参见图9所示,为本申请实施例提供的模型训练的流程示意图。如图8所示,所述流程如下:
第一步,自适应选择器将图6中样本序号1-4中的前两次点击app作为根节点,在样本序号1-4中确定当前点击app项中的最大值和最小值,并基于这个最大值和最小值,确定一个中间值。
其中,中间值可以是最大值和最小值的平均值。比如,请参见图7所示,样本序号1-4中,前两次点击app项的最大值是6,最小值是1,则中间值是3.5。中间值也可以是样本序号1-4中前两次点击app项中取值位于中间的值。比如,请继续参见图7所示,样本序号1-4中前两次app项的中间值为5或者4。后续步骤中,以中间值是5为例。
第二步,自适应选择器将前两次app项中小于中间值(即5)的样本序号1-2归位一个分支(如图8中的子节点1),将大于等于5的样本序号3-4归位另一个分支(如图8中 的子节点2)。
第三步,自适应选择器将前一次点击app作为新的根节点,在子节点1的分支(样本序号1-2)中确定前一次点击app项的最大值和最小值,并基于该最大值和最小值,确定一个中间值。
类似的,中间值可以是最大值和最小值的平均值。比如,请参见图7所示,样本序号1-2中,前一次app的最大值是2,最小值是1,则中间值是1.5。中间值也可以是样本序号1-2中第一次app项中取值位于中间的值。比如,请继续参见图7所示,样本序号1-2中前一次app项的中间值为1或者2。后续步骤中,以中间值是1.5为例。
第四步,自适应选择器将样本序号1-2中的前一次app项中大于1.5的样本序号1归位一个分支(图8所示的子节点3),将小于等于1.5的样本序号2归为一个分支(图8所示的子节点4)。
第五步,由于子节点3只包括样本序号1,无需继续分支,则子节点3表征为当前app,子节点3对应微信。
上述第一步到第五步中,示例性的描述了从根节点到子节点3的过程。从根节点到子节点4(子节点5或子节点6)的过程类似,为了说明书的简洁,不多赘述。另外,以上介绍的模型训练过程,是以模型是决策树为例的,且为了方便介绍,图7中只给出了部分样本参数。在实际应用中,自适应选择器还可以采用更多的样本参数来训练模型。
以上介绍了自适应选择器训练模型的过程。在该训练过程中,自适应选择器确定了模型的模型参数。比如,图8中的决策树的层数和子节点的个数,以及从跟节点到各个子节点的中间值。当自适应选择器训练完模型之后,评价器可以对训练完的模型进行评价。
S605:评价器对自适应选择器训练出的模型进行评价,得到评价结果;若评价结果较好,则执行S606,若评价结果较差,则执行S603。
如前述内容可知,评价器对模型的评价过程为,评价器通过测试数据中已知的输入参数运行模型得到测试结果,将测试结果与真实结果(测试数据包括真实结果)进行比较,若一致,则评价结果较好,若不一致,则评价结果较差,如前所述,评价器可以根据多次比较的结果来评价模型的结果。
下面介绍评价器通过测试数据评价模型的过程。
由于在图7-图8中是以当前点击app、前一次点击app、前两次点击app为例介绍模型训练过程的。因此,模型评价过程,继续以当前点击app、前一次点击app、前两次点击app为例。
举例来说,评价器可以将当前点击app作为真实结果,将前一次点击app和前两次点击app可以作为模型的输入参数,对模型进行评价。请继续参见图8所示,具体过程如下:
评价器将前两次app作为根节点,确定前两次app小于5,流程走到子节点1,确定前一次app大于等于1.5,流程走到子节点4,确定输出结果为天猫(即通过模型计算出的当前点击app是天猫)。假设真实结果为当前点击app是京东,评价器比较该输出结果(天猫)与真实结果不一致,则该模型评价较差。
当训练出的模型的评价结果差时,自适应选择器可以重新选择模型,并重新训练该模型,然后评价该模型。该过程与前述过程类似,不重复赘述。当训练出的模型的评价结果较好时,自适应选择器可以将该模型发送给执行器,执行器将检测的特征数据作为模型的输入参数,运行模型,得到输出结果。
需要说明的是,在上面的模型评价过程中,仅以一个样本参数为例,在实际应用中,评价器在评价模型过程中,可以采用多个样本参数。比如,一个样本参数对应一个评价结果,多个样本参数对应多个评价结果。若多个评价结果中大多数评价结果较好,则该模型最终的评价结果较好。其中,评价结果可以以多种形式标识,比如“1”代表评价结果好,“0”代表评价结果差;或者,“good”代表评价结果好,“bad”代表评价结果差。总之,本申请实施例对评价结果的表现形式不限定。
S606:执行器将检测的特征数据作为模型的输入参数,运行模型,得到输出结果。
执行器可以从特征数据库中获取当前app、前一次app、前两次app,作为训练后的模型的输入参数,运行模型进行计算,得到输出结果,该输出结果即用户下一次点击app。
需要说明的是,执行器运行模型的过程,以前述的评价模型的过程类似,只是无需进行前述评价过程中将测试结果与真实结果比较的过程。因此,为了说明书的简洁,不重复赘述。
需要说明的是,评价器对每个模型进行评价之后,可以将该模型的评价结果与该模型对应存储;或者,继续以Q-table为例,评价器可以根据每个模型的评价结果以及Q值计算公式Q=f(评价结果),确定每个模型的Q值,将该Q值与每个模型对应存储,得到前述的Q-table。假设图6所示的流程中选择的模型是RF算法,则根据模型的评价结果,得到Q值(比如为0.8),将Q值填充到下面的Q-table表中。
Q-table表
| 模型1(决策树) | 模型2(NB) | 模型3(RF) | 模型4(SVM) | |
| Q值 | 0 | 0 | 0.8 | 0 |
需要说明的是,在手机100激活或者开机时,上述Q-table表为空,手机100在使用过程中,可能会训练到多个模型,然后对每个模型进行评价,每评价一个模型,可以得到该模型的Q值,将该模型的Q值填充到上述Q-table中。这样的话,自适应选择器在后续的选择模型的过程中,可以根据Q-table进行选择,比如选择Q-table中模型的Q值较高的模型。应理解,上述的Q-table可以是动态变化的,即每个评价完一个模型后,可以将该模型的新的评价结果,计算新的Q值,将新的Q值更新Q-table。
应理解,上文中仅是以Q-table为例进行介绍的,在实际应用中,还可以采用其他算法或者最优化算法,本申请实施例不限定。
需要说明的是,在上述实施例中,手机100将当前app、前一次点击app和前两次点击app作为了模型的输入参数,在实际应用中,手机100还可以将更多的特征数据作为输入参数来运行模型。比如,手机100将当前app、前一次点击app、前两次点击app、当前app使用时长作为了模型的输入参数。这种情况下,手机100训练模型(或者评价模型)时,需要使用更多的训练数据(或者测试数据)。再比如,手机100还可以将当前所在的地理位置、当前app、前一次点击app、前两次点击app作为了模型的输入参数,得到输出结果,该输出结果表征在当前地理位置处,用户下一次可能点击的app。
可选的,手机100通过上述过程得到输出结果(用户下一次可能点击的app)后,可以基于该输出结果,提供AI服务。比如,手机100预加载所述用户下一次可能点击的应用;或者,手机100关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者,手机100输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,若手机100检测到用户确定所述提示信息的操作,则预加载所述用户下一次可能 点击的应用;或者,手机100可以输出推荐信息,所述推荐信息用于向用户推荐手机100中未安装的,与用户下一次可能点击的app同类型的app。
在本申请实施例中,手机100使用模型提供AI服务的过程中,可以更换模型,即手机100提供同一AI模型的过程中,可以使用不同的模型。
可选的,手机100使用一个模型提供一项AI服务的过程中,当检测到如下触发条件时,可以重新选择模型,然后使用重新选择的模型继续提供该项AI服务。
触发条件一:手机100使用上一次选择出的模型达到预设周期时,自动重新选择模型。
比如,手机100上一次选择出的模型是模型1,使用模型1预测用户下一次可能点击的app,一段时间(达到预设周期)之后,手机100自动重新选择模型。比如,预设周期可以是一天(24小时),手机100在每天晚上12:00自动选择模型。
触发条件二:手机100确定上一次选择的模型不准确时,重新选择模型。
比如,手机100上一次选择出模型1,且该模型1评价较好,使用该模型1预测下一次用户可能点击的app。若用户下一次实际点击的app和使用模型1预测出的下一次可能点击的app不一样,说明该模型1不准确,手机100可以重新选择模型。当然,手机100也可以在确定用户下一次实际点击的app和使用模型1预测出的下一次可能点击的app不一样的情况出现多次(比如超过预设次数比如3次)之后,再重新选择模型。
需要说明的是,用户操作手机100的行为实时的发生变化(比如,原来点击爱奇艺和支付宝的次数较少,后来点击爱奇艺和支付宝的次数较多),所以手机100采用上一次选择的模型预测出的用户下一次可能点击的app,并不是用户实际点击的app。通过上述方式,手机100可以在上一次选择的模型不准确的情况下,自动重新选择模型,以提高模型选择的准确性,进而能够更准确的提供AI服务。
应理解,前面内容中介绍手机100训练模型或者评价模型时使用的都是用户操作手机的历史记录(以图3为例,训练模型时使用的是用户点击app的历史记录),假设手机100当前安装了5个应用,那么手机100采集到的特征数据包括用户点击这5个应用的记录,那么手机100训练模型后,得到的模型的输出结果也是这5个应用中的某个应用(以图8为例,手机100训练模型得到的结果包括4个微信、天猫、淘宝、京东,在后续使用的过程中,将特征数据作为该模型的输入参数,得到的输出结果是这4个结果中的一个)。当手机100卸载其中几个应用,或者从网络侧下载了新的应用时,上一次选择的模型是不知道的,所以若仍然使用上一次选择的模型时,输出结果还是以前安装的5个应用中的某个应用,但实际上用户可能点击的是新应用。可见,上一次选择的模型已经不合适,所以手机100可以周期性的选择模型,或者当手机100检测到上一次选择的模型的输出结果不准确时,自动重新选择模型。
通过以上描述可知,手机100在提供同一AI服务的过程中,可以采用不同的模型,手机100可以周期性的、或者根据实际情况(比如上一个模型预测结果不准确)选择合适的模型,提高了选择模型的灵活性。
在上面的实施例中,手机100在选择模型后,通过训练得到该模型的模型参数。下面介绍另一个实施例,在该实施例中,模型参数是已知的,比如手机100预先存储有每种模型的一组或多组模型参数,当手机100选择模型后,可以从该模型的多组模型参数中选择一组模型参数,则手机100无需通过训练模型得到模型参数,节省计算量。
请参见图9所示,内部存储器121还存储有模型参数库,该模型参数库中包括每种模 型对应的模型参数。继续以模型是图2所示的决策树为例。请参见图10所示,为本申请实施例提供的模型和模型参数的对应关系。假设手机100选择模型(比如决策树),手机100可以从模型参数1和模型参数2中选择一组模型参数。假设手机100选择模型参数1,则手机100无须对模型进行训练,评价器可以对选择出的模型进行评价。
因此,请参见图11所示,为本申请实施例提供的另一种模型选择方法的流程示意图。如图11所示,该流程包括处理器110运行存储在内部存储器121中的行为日志采集器、特征数据预处理器、自适应选择器、评价器、执行器的代码,执行如下过程:
S1101:行为日志采集器采集原始数据,该原始数据包括用户点击app的记录。
S1102:数据预处理器对原始数据进行预处理,得到特征数据,存储在特征数据库中。
S1103:自适应选择器按照预设策略从模型候选集的多个模型中选择一个模型。
S1104:自适应选择器从模型参数库中选择该模型的模型参数。
S1105:评价器对自适应选择器模型进行评价,得到评价结果;若评价结果较好,则执行S1106;若评价结果较差,则执行S1103。
S1106:执行器根据实时检测的特征数据,运行训练后的模型。
需要说明的是,图11所示的实施例与图6所示的实施例的不同之处在于,在图11所示的实施例中,自适应选择器可以选择了模型之后,可以从该模型已知的模型参数中选一组模型参数,无需对模型训练以得到模型参数,节省计算量。
当然,在图11所示的实施例中,模型参数是已知的,作为一种示例,模型参数可以是手机100在出厂之前,设计人员根据前述类似的方式对模型训练得到的模型参数,然后将该模型参数存储在手机100中,以便使用。作为另一种示例,模型参数也可以是手机100在使用过程中,按照前述类似的方式对模型进行训练得到模型参数,将其存储下来以便在在后续过程中使用。
需要说明的是,图6和图11所示的实施例可以单独实施,也可以结合实施例。比如,手机100选择一个模型,按照图6所示的流程训练该模型,得到模型参数,然后对该模型进行评价,当评价结果差时,手机100重新选择另一个模型,按照图11所示的方式确定该模型的模型参数,然后再评价该模型。
应理解,图6和图11所示的流程也可以由云端服务器执行,比如,手机100将特征数据发送给云端服务器,云端服务器按照图6所示的流程,从多种模型中选择一个模型,然后将特征数据作为模型的输入参数,运行模型进行计算,得到输出结果,然后将该输出结果反馈给手机100。
以上的实施例均是以手机100根据用户点击app的记录,通过运行模型,预测用户下一次可能点击的app的场景为例。实际上,本申请实施例提供的技术方案,还可以适应于其它应用场景,比如,用户打开手机100中的淘宝的显示界面时,该显示界面中显示多个商品,当前点击的商品是上衣,前一次点击的商品是毛衣,前两次点击的商品是t恤,则手机100也可以按照本申请实施例提供的模型选择方法,预设用户下一次可能点击的商品的种类,然后向用户推荐这种类型的商品。简而言之,本申请实施例提供的技术方案,可以适用于,根据用户操作手机100的习惯,预测用户下一次可能的行为或者向用户推荐用户可能喜欢的事务。
在上述图5-图6所示的实施例和图9-图11所示的实施例中,特征数据库中的特征数据(即输入参数)可以是人工指定的。比如设计人员可以将事先已经设置好的特征数据存 储在手机100中,手机100基于这些事先设置好的特征数据对模型进行评价或者训练即可。
因此,在本申请另一些实施例中,手机100可以自动搜索得到特征数据。以图3为例,手机100可以自由组合不同参数得到特征参数,比如,手机100可以仅将前两次点击和前一次点击app作为输入参数,也可以将前三次点击app、前两次点击app、当前点击app作为输入参数。
在另一些实施例中,手机100还可以自动选择除去图3所示的参数之外的其它参数作为输入参数。比如,手机100还可以选择当前点击app,当前app的使用时长,使用次数/频率,前一次点击app,前一次点击app的使用时长、使用次数/频率,前两次点击app,前两次点击app的使用时长、使用次数/频率、当前地理位置、当前时间等等。
需要说明的是,手机100在模型训练过程中自动搜索的特征数据,和模型评价过程中搜索的特征数据是一致的,比如,模型训练是的特征数据和模型评价时使用的特征数据都是连续三个点击的app。当模型评价结果较好时,手机100可以固定特征数据的形式,即特征数据包括连续三个点击的app。因此,手机100在使用该模型时,按照固定下的特征数据的形式选择特征数据,比如选择当前点击app,前一次点击app,前两次点击app作为特征数据即模型的输入参数。
本申请的各个实施方式可以任意进行组合,以实现不同的技术效果。
上述本申请提供的实施例中,从终端(手机100)作为执行主体的角度对本申请实施例提供的方法进行了介绍。为了实现上述本申请实施例提供的方法中的各功能,终端可以包括硬件结构和/或软件模块,以硬件结构、软件模块、或硬件结构加软件模块的形式来实现上述各功能。上述各功能中的某个功能以硬件结构、软件模块、还是硬件结构加软件模块的方式来执行,取决于技术方案的特定应用和设计约束条件。
本发明实施例还提供一种计算机可读存储介质,该存储介质可以包括存储器,该存储器可存储有程序,该程序被执行时,使得终端执行包括如前的执行如前的图6、图11所示的方法实施例中记载的终端所执行的全部或部分步骤。
本发明实施例还提供一种包含计算机程序产品,当所述计算机程序产品在终端上运行时,使得所述终端执行包括如前的图6、图11所示的方法实施例中记载的终端所执行的全部或部分步骤。
通过以上的实施方式的描述,所属领域的技术人员可以清楚地了解到本申请实施例可以用硬件实现,或固件实现,或它们的组合方式来实现。当使用软件实现时,可以将上述功能存储在计算机可读介质中或作为计算机可读介质上的一个或多个指令或代码进行传输。计算机可读介质包括计算机存储介质和通信介质,其中通信介质包括便于从一个地方向另一个地方传送计算机程序的任何介质。存储介质可以是计算机能够存取的任何可用介质。以此为例但不限于:计算机可读介质可以包括RAM、ROM、电可擦可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、只读光盘(compact disc read-Only memory,CD-ROM)或其他光盘存储、磁盘存储介质或者其他磁存储设备、或者能够用于携带或存储具有指令或数据结构形式的期望的程序代码并能够由计算机存取的任何其他介质。此外。任何连接可以适当的成为计算机可读介质。例如,如果软件是使用同轴电缆、光纤光缆、双绞线、数字用户线(digital subscriber line,DSL)或者诸如红外线、无线电和微波之类的无线技术从网站、服务器或者其他远程源传输的,那么同轴电缆、光纤光缆、双绞线、DSL或者诸如红外线、无线和微波之类的无线技术包括在所属介 质的定影中。如本申请实施例所使用的,盘(disk)和碟(disc)包括压缩光碟(compact disc,CD)、激光碟、光碟、数字通用光碟(digital video disc,DVD)、软盘和蓝光光碟,其中盘通常磁性的复制数据,而碟则用激光来光学的复制数据。上面的组合也应当包括在计算机可读介质的保护范围之内。
总之,以上所述仅为本申请的实施例而已,并非用于限定本申请的保护范围。凡根据本申请的揭露,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。
Claims (33)
- 一种模型选择方法,其特征在于,所述方法包括:终端获取用户操作所述终端的第一行为数据;所述终端按照预设策略从所述终端中存储的多个模型中选择第一模型;所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;所述终端基于所述第一输出结果提供第一人工智能AI服务;当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型;所述终端将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果;其中,第二行为数据在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为;所述终端基于所述第二输出结果继续提供所述第一AI服务。
- 如权利要求1所述的方法,其特征在于,所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型之前,所述方法还包括:所述终端对所述第一模型进行评价;所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,包括:当所述第一模型的评价结果满足条件时,所述终端将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果。
- 如权利要求2所述的方法,其特征在于,在所述终端对所述第一模型进行评价之前,还包括:所述终端确定输入参数和输出参数的取值;所述终端将所述确定的输入参数和输出参数的取值带入所述第一模型的公式中,确定所述第一模型的模型参数的取值,所述模型参数为所述第一模型中除去所述输入参数、输出参数之外的其它参数的取值;或者所述终端根据模型和模型参数的取值之间的对应关系,确定与所述第一模型对应的模型参数的取值。
- 如权利要求2或3所述的方法,其特征在于,所述终端对所述第一模型进行评价,包括:所述终端获取用户操作所述终端的第三行为数据,所述第三行为数据在所述第一行为数据之前产生;所述终端将所述第三行为数据作为所述第一模型的输入参数,运行所述第一模型,得到测试结果;所述终端将所述测试结果与实际结果比较,所述实际结果为所述第三行为数据之后用户实际的操作;若一致,则所述第一模型的评价结果满足条件;若不一致,则所述第一模型的评价结果不满足条件。
- 如权利要求1-4任一所述的方法,其特征在于,所述终端根据预设策略从多个模型 中选择第一模型,包括:所述终端随机地从多个模型中选择第一模型,或者所述终端根据Q-table中选择Q值最大的模型,所述Q-table包括每个模型对应的Q值,所述Q值与所述每个模型的评价结果相关;或者所述终端根据当前业务选择与所述当前业务对应的第一模型。
- 如权利要求1-5任一所述的方法,其特征在于,所述第一输出结果为在第一行为数据之后下一次用户可能发生的行为;当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型,包括:当通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同时,所述终端重新选择第二模型;或者当所述第一模型的使用时长达到预设时间时,所述终端重新选择第二模型。
- 如权利要求1-6任一所述的方法,其特征在于,所述第一行为数据或所述第二行为数据包括用户最近三次点击的应用;所述第一输出结果或所述第二输出结果为用户下一次可能点击的应用。
- 如权利要求7所述的方法,其特征在于,所述第三行为数据包括在最近一次点击应用之前,连续三次点击的应用,所述实际结果为在所述连续三次点击应用之前的,前一次点击的应用。
- 如权利要求6或8所述的方法,其特征在于,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的应用和用户下一次实际点击的应用不同。
- 如权利要求7-9任一所述的方法,其特征在于,所述终端基于所述第一输出结果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的应用;或者所述终端关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用。
- 如权利要求1-6任一所述的方法,其特征在于,所述第一行为数据或所述第二行为数据包括:用户最近三次点击的商品的商品种类;所述第一输出结果或所述第二输出结果为用户下一次可能点击的商品种类。
- 如权利要求11所述的方法,其特征在于,所述第三行为数据包括在最近一次点击商品种类之前,连续三次点击的商品种类,所述实际结果为在所述连续三次点击商品种类之前的,前一次点击的商品种类。
- 如权利要求10或11所述的方法,其特征在于,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的商品种类和用户下一次实际点击的商品种类不同。
- 如权利要求11-13任一所述的方法,其特征在于,所述终端基于所述第一输出结 果或第二输出结果,提供AI相关服务,包括:所述终端预加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的商品种类;或者所述终端输出提示信息,所述提示信息用于向用户推荐感兴趣的商品种类,所述感兴趣的商品种类与所述用户下一次可能点击的商品种类相同。
- 如权利要求1-14任一所述的方法,其特征在于,所述第一模型或第二模型为决策树、神经单元、逻辑回归LR,朴素贝叶斯NB分类算法,随机森林RF算法和支持向量机SVM算法中的一种。
- 一种终端,其特征在于,包括:行为采集器,用于获取用户操作所述终端的第一行为数据;自适应选择器,用于按照预设策略从所述终端中存储的多个模型中选择第一模型;执行器,用于将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果;所述执行器还用于,基于所述第一输出结果提供第一人工智能AI服务。所述自适应选择器,还用于当所述第一模型不满足条件时,重新从多个模型中选择第二模型;所述执行器还用于将第二行为数据作为所述第二模型的输入参数,运算所述第二模型,得到第二输出结果,并基于所述第二输出结果继续提供所述第一AI服务;其中,第二行为数据在所述第一行为数据之后产生,且属于用户操作所述终端的同类行为。
- 如权利要求16所述的终端,其特征在于,所述终端还包括:评价器,用于对所述第一模型进行评价;所述执行器在用于将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型时,具体包括:当所述第一模型的评价结果满足条件时,将所述第一行为数据作为所述第一模型的输入参数,运行所述第一模型,得到第一输出结果。
- 如权利要求17所述的终端,其特征在于,所述自适应选择器还用于:确定输入参数和输出参数的取值;将所述确定的输入参数和输出参数的取值带入所述第一模型的公式中,确定所述第一模型的模型参数的取值,所述模型参数为所述第一模型中除去所述输入参数、输出参数之外的其它参数的取值;或者根据模型和模型参数的取值之间的对应关系,确定与所述第一模型对应的模型参数的取值。
- 如权利要求17或18所述的终端,其特征在于,所述评价器具体用于:获取用户操作所述终端的第三行为数据,所述第三行为数据在所述第一行为数据之前产生;将所述第三行为数据作为所述第一模型的输入参数,运行所述第一模型,得到测试结 果;将所述测试结果与实际结果比较,所述实际结果为所述第三行为数据之后用户实际的操作;若一致,则所述第一模型的评价结果满足条件;若不一致,则所述第一模型的评价结果不满足条件。
- 如权利要求16-19任一所述的终端,其特征在于,所述自适应选择器具体用于:随机地从多个模型中选择第一模型,或者根据Q-table中选择Q值最大的模型,所述Q-table包括每个模型对应的Q值,所述Q值与所述每个模型的评价结果相关;或者根据当前业务选择与所述当前业务对应的第一模型。
- 如权利要求16-20任一所述的终端,其特征在于,所述第一输出结果为在第一行为数据之后下一次用户可能发生的行为;所述自适应选择器在用于当所述第一模型不满足条件时,所述终端重新从多个模型中选择第二模型时,具体用于:当通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同时,重新选择第二模型;或者当所述第一模型的使用时长达到预设时间时,重新选择第二模型。
- 如权利要求16-21任一所述的终端,其特征在于,所述第一行为数据或所述第二行为数据包括用户最近三次点击的应用;所述第一输出结果或所述第二输出结果为用户下一次可能点击的应用;
- 如权利要求22所述的终端,其特征在于,所述第三行为数据包括在最近一次点击应用之前,连续三次点击的应用,所述实际结果为在所述连续三次点击应用之前的,前一次点击的应用。
- 如权利要求22或23述的终端,其特征在于,通过模型预测的所述用户下一次可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的应用和用户下一次实际点击的应用不同。
- 如权利要求22-24任一所述的终端,其特征在于,所述执行器在用于基于所述第一输出结果或第二输出结果,提供AI相关服务时,具体用于:预加载所述用户下一次可能点击的应用;或者关闭后台正在运行的应用中不是所述用户下一次可能点击的应用的其它应用;或者输出提示信息,所述提示信息用于提示所述用户下一次可能点击的应用,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的应用。
- 如权利要求16-21任一所述的终端,其特征在于,所述第一行为数据或所述第二行为数据包括:用户最近三次点击的商品的商品种类;所述第一输出结果或所述第二输出结果为用户下一次可能点击的商品种类。
- 如权利要求26所述的终端,其特征在于,所述第三行为数据包括在最近一次点击商品种类之前,连续三次点击的商品种类,所述实际结果为在所述连续三次点击商品种类之前的,前一次点击的商品种类。
- 如权利要求26或27所述的终端,其特征在于,通过模型预测的所述用户下一次 可能发生的行为和用户下一次实际发生的行为不同,包括:通过模型预测的所述用户下一次可能点击的商品种类和用户下一次实际点击的商品种类不同。
- 如权利要求26-28任一所述的终端,其特征在于,所述执行器在用于基于所述第一输出结果或第二输出结果,提供AI相关服务时,具体用于:预加载所述用户下一次可能点击的商品种类;或者输出提示信息,所述提示信息用于提示所述用户下一次可能点击的商品种类,当所述终端检测到用户确定所述提示信息时,加载所述用户下一次可能点击的商品种类;或者输出提示信息,所述提示信息用于向用户推荐感兴趣的商品种类,所述感兴趣的商品种类与所述用户下一次可能点击的商品种类相同。
- 如权利要求16-29任一所述的终端,其特征在于,所述第一模型或第二模型为决策树、神经单元、逻辑回归LR,朴素贝叶斯NB分类算法,随机森林RF算法和支持向量机SVM算法中的一种。
- 一种终端,其特征在于,包括存储器和处理器,所述存储器用于存储一个或多个计算机程序;当所述存储器存储的一个或多个计算机程序被所述处理器执行时,使得所述终端能够实现如权利要求1-15任一所述的方法。
- 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质包括计算机程序,当计算机程序在终端上运行时,使得所述终端执行如权利要求1至15任一所述的方法。
- 一种包含指令的计算机程序产品,其特征在于,包括指令,当所述指令在计算机上运行时,使得所述计算机执行如权利要求1-15任一项所述的方法。
Priority Applications (4)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201880095191.0A CN112368723A (zh) | 2018-11-26 | 2018-11-26 | 一种模型选择方法和终端 |
| PCT/CN2018/117534 WO2020107184A1 (zh) | 2018-11-26 | 2018-11-26 | 一种模型选择方法和终端 |
| EP18941272.9A EP3876117A4 (en) | 2018-11-26 | 2018-11-26 | MODEL SELECTION PROCESS AND TERMINAL |
| US17/329,414 US12299595B2 (en) | 2018-11-26 | 2021-05-25 | Model selection method and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/CN2018/117534 WO2020107184A1 (zh) | 2018-11-26 | 2018-11-26 | 一种模型选择方法和终端 |
Related Child Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| US17/329,414 Continuation US12299595B2 (en) | 2018-11-26 | 2021-05-25 | Model selection method and terminal |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2020107184A1 true WO2020107184A1 (zh) | 2020-06-04 |
Family
ID=70853477
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2018/117534 Ceased WO2020107184A1 (zh) | 2018-11-26 | 2018-11-26 | 一种模型选择方法和终端 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US12299595B2 (zh) |
| EP (1) | EP3876117A4 (zh) |
| CN (1) | CN112368723A (zh) |
| WO (1) | WO2020107184A1 (zh) |
Cited By (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113961556A (zh) * | 2020-07-21 | 2022-01-21 | 日本电气株式会社 | 用于信息处理的方法、装置、设备和存储介质 |
| CN114693018A (zh) * | 2020-12-28 | 2022-07-01 | 北京三快在线科技有限公司 | 配送状态监测方法、装置、介质、终端及可穿戴设备 |
| WO2024092660A1 (zh) * | 2022-11-03 | 2024-05-10 | 北京小米移动软件有限公司 | 模型选择方法、装置 |
Families Citing this family (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2021141399A1 (en) * | 2020-01-10 | 2021-07-15 | Samsung Electronics Co., Ltd. | Method and electronic device for accelerating asset execution |
| US20210357722A1 (en) * | 2020-05-14 | 2021-11-18 | Samsung Electronics Co., Ltd. | Electronic device and operating method for performing operation based on virtual simulator module |
| GB2605795B (en) * | 2021-04-13 | 2023-05-17 | British Telecomm | Algorithm selection for processor-controlled device |
| JP2025507145A (ja) * | 2022-03-07 | 2025-03-13 | 維沃移動通信有限公司 | 通信ネットワークにおけるデータ処理方法、ネットワーク側機器及び可読記憶媒体 |
| US20230393896A1 (en) * | 2022-06-02 | 2023-12-07 | Cisco Technology, Inc. | Dynamic scheduling of multiple machine learning models |
| WO2024234257A1 (zh) * | 2023-05-15 | 2024-11-21 | 北京小米移动软件有限公司 | 一种人工智能通信方法、装置及存储介质 |
| US12499144B2 (en) | 2023-12-07 | 2025-12-16 | Google Llc | LLM latency reduction via bridging multiple LLMS of differing sizes |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104753765A (zh) * | 2013-12-31 | 2015-07-01 | 华为技术有限公司 | 自动回复信息的方法以及装置 |
| CN105068661A (zh) * | 2015-09-07 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | 基于人工智能的人机交互方法和系统 |
| US20160275413A1 (en) * | 2015-03-20 | 2016-09-22 | Xingtian Shi | Model vector generation for machine learning algorithms |
| CN107030691A (zh) * | 2017-03-24 | 2017-08-11 | 华为技术有限公司 | 一种看护机器人的数据处理方法及装置 |
| US20180032505A1 (en) * | 2016-07-29 | 2018-02-01 | Sap Se | Natural interactive user interface using artificial intelligence and freeform input |
| CN108057249A (zh) * | 2017-11-29 | 2018-05-22 | 腾讯科技(成都)有限公司 | 一种业务数据处理方法和装置 |
Family Cites Families (17)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2010011918A2 (en) | 2008-07-24 | 2010-01-28 | University Of Cincinnati | Methods for prognosing mechanical systems |
| JP5560845B2 (ja) * | 2010-03-30 | 2014-07-30 | ソニー株式会社 | 情報処理装置、画像出力方法及びプログラム |
| US9519408B2 (en) * | 2013-12-31 | 2016-12-13 | Google Inc. | Systems and methods for guided user actions |
| US20160357774A1 (en) * | 2015-06-05 | 2016-12-08 | Apple Inc. | Segmentation techniques for learning user patterns to suggest applications responsive to an event on a device |
| CN107544981B (zh) * | 2016-06-25 | 2021-06-01 | 华为技术有限公司 | 内容推荐方法及装置 |
| CN106484953B (zh) * | 2016-09-14 | 2019-06-11 | 江苏北弓智能科技有限公司 | 移动终端智能仿真系统及其仿真方法 |
| CN108268460A (zh) * | 2016-12-30 | 2018-07-10 | 广东精点数据科技股份有限公司 | 一种基于大数据的自动选择最优模型的方法 |
| US20180188906A1 (en) * | 2017-01-04 | 2018-07-05 | Google Inc. | Dynamically generating a subset of actions |
| CN107480587B (zh) * | 2017-07-06 | 2020-12-08 | 创新先进技术有限公司 | 一种模型配置以及图像识别的方法及装置 |
| CN109684069A (zh) * | 2017-10-13 | 2019-04-26 | 华为技术有限公司 | 资源管理的方法及终端设备 |
| CN107766940B (zh) * | 2017-11-20 | 2021-07-23 | 北京百度网讯科技有限公司 | 用于生成模型的方法和装置 |
| CN107958268A (zh) * | 2017-11-22 | 2018-04-24 | 用友金融信息技术股份有限公司 | 一种数据模型的训练方法及装置 |
| CN108389027B (zh) * | 2017-12-30 | 2020-06-16 | 北京航天智造科技发展有限公司 | 一种面向工业的app应用开发系统 |
| US20200160229A1 (en) * | 2018-11-15 | 2020-05-21 | Adobe Inc. | Creating User Experiences with Behavioral Information and Machine Learning |
| US11481676B2 (en) * | 2019-08-27 | 2022-10-25 | Sap Se | Sensitivity in supervised machine learning with experience data |
| CN115643210A (zh) * | 2019-11-30 | 2023-01-24 | 华为技术有限公司 | 控制数据包发送方法及系统 |
| CN112541159A (zh) * | 2020-09-30 | 2021-03-23 | 华为技术有限公司 | 一种模型训练方法及相关设备 |
-
2018
- 2018-11-26 EP EP18941272.9A patent/EP3876117A4/en active Pending
- 2018-11-26 WO PCT/CN2018/117534 patent/WO2020107184A1/zh not_active Ceased
- 2018-11-26 CN CN201880095191.0A patent/CN112368723A/zh active Pending
-
2021
- 2021-05-25 US US17/329,414 patent/US12299595B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104753765A (zh) * | 2013-12-31 | 2015-07-01 | 华为技术有限公司 | 自动回复信息的方法以及装置 |
| US20160275413A1 (en) * | 2015-03-20 | 2016-09-22 | Xingtian Shi | Model vector generation for machine learning algorithms |
| CN105068661A (zh) * | 2015-09-07 | 2015-11-18 | 百度在线网络技术(北京)有限公司 | 基于人工智能的人机交互方法和系统 |
| US20180032505A1 (en) * | 2016-07-29 | 2018-02-01 | Sap Se | Natural interactive user interface using artificial intelligence and freeform input |
| CN107030691A (zh) * | 2017-03-24 | 2017-08-11 | 华为技术有限公司 | 一种看护机器人的数据处理方法及装置 |
| CN108057249A (zh) * | 2017-11-29 | 2018-05-22 | 腾讯科技(成都)有限公司 | 一种业务数据处理方法和装置 |
Non-Patent Citations (1)
| Title |
|---|
| See also references of EP3876117A4 * |
Cited By (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113961556A (zh) * | 2020-07-21 | 2022-01-21 | 日本电气株式会社 | 用于信息处理的方法、装置、设备和存储介质 |
| CN113961556B (zh) * | 2020-07-21 | 2026-03-20 | 日本电气株式会社 | 用于信息处理的方法、装置、设备和存储介质 |
| CN114693018A (zh) * | 2020-12-28 | 2022-07-01 | 北京三快在线科技有限公司 | 配送状态监测方法、装置、介质、终端及可穿戴设备 |
| WO2024092660A1 (zh) * | 2022-11-03 | 2024-05-10 | 北京小米移动软件有限公司 | 模型选择方法、装置 |
Also Published As
| Publication number | Publication date |
|---|---|
| US20210279613A1 (en) | 2021-09-09 |
| CN112368723A (zh) | 2021-02-12 |
| EP3876117A4 (en) | 2021-11-17 |
| EP3876117A1 (en) | 2021-09-08 |
| US12299595B2 (en) | 2025-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2020107184A1 (zh) | 一种模型选择方法和终端 | |
| CN109919316B (zh) | 获取网络表示学习向量的方法、装置和设备及存储介质 | |
| US20240394072A1 (en) | Mixed-grained detection and analysis of user life events for context understanding | |
| US11128979B2 (en) | Inferring user availability for a communication | |
| US20190340521A1 (en) | Intelligent Recommendation Method and Terminal | |
| CN111125523B (zh) | 搜索方法、装置、终端设备及存储介质 | |
| US10462619B2 (en) | Providing a personal assistant module with a selectively-traversable state machine | |
| CN103631851B (zh) | 推荐好友的方法及其服务器和终端 | |
| WO2019133862A1 (en) | Computer vision for unsuccessful queries and iterative search | |
| CN112131410A (zh) | 多媒体资源展示方法、装置、系统和存储介质 | |
| US20160295372A1 (en) | Venue identification from wireless scan data | |
| US20230235495A1 (en) | Usage dependent user prompting | |
| WO2017083210A1 (en) | Enhanced computer experience from activity prediction | |
| CN111125269A (zh) | 一种数据管理方法、血缘关系显示方法和相关装置 | |
| US9531827B1 (en) | Push notification delivery system with feedback analysis | |
| US20140379521A1 (en) | Activity-based personal profile inference | |
| RU2613724C2 (ru) | Способ рекомендации друзей и сервер и терминал для этого | |
| US20170286522A1 (en) | Data file grouping analysis | |
| CN111800445A (zh) | 消息推送方法、装置、存储介质及电子设备 | |
| US20260058984A1 (en) | Automated vulnerability exception process | |
| US20240152512A1 (en) | Machine learning for dynamic information retrieval in a cold start setting | |
| CN115565215B (zh) | 一种人脸识别算法切换方法、装置及存储介质 | |
| US20220327401A1 (en) | Machine learning feature recommender | |
| US20240134704A1 (en) | Device cohort resource management | |
| WO2023235042A1 (en) | Maintaining stale files to minimize computing costs |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 18941272 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2018941272 Country of ref document: EP Effective date: 20210531 |
