Service recommendation method, electronic equipment and storage medium
Through the neural network model, a unified sorting and embedding process of multiple types of services is solved, and the problem of limited accuracy of service recommendation in the prior art is achieved, and more accurate and comprehensive service recommendation is achieved.
Patent Information
- Application Number
- CN202310955143.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2025-02-14
AI Technical Summary
In the prior art, the accuracy of service recommendations is affected due to the differences in user usage rates of different types of services.
Through the neural network model, multiple types of services are uniformly sorted, and the embedding results of the service sequence and candidate service set are used to calculate the recommendation score to improve the accuracy of service recommendations.
It realizes a unified sorting of multiple types of services, improves the accuracy of service recommendations, and avoids the problem that long-tail information sources cannot be recommended.
Smart Images

Figure CN119441577A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and in particular to a service recommendation method, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Currently, electronic devices can provide various types of services, such as applications (APP), atomic services (FA), etc. In order to facilitate users to quickly find the required services, electronic devices can TM Recommend services to users in the suggestion window).
[0003] In the prior art, electronic devices recommend different types of services to users in a simple mixed arrangement manner. For example, the electronic device independently sorts applications and FAs to obtain the two top ranked applications and the two top ranked FAs, and the electronic device simply mixes the two applications and the two FAs and recommends them to the user.
[0004] Since users have different usage rates for different types of services, for example, the usage rate for applications is greater than the usage rate for FA, the existing solution of simply mixing different types of services affects the accuracy of service recommendations. Summary of the invention
[0005] Some embodiments of the present application provide a service recommendation method, an electronic device, a computer-readable storage medium, and a computer program product for improving the accuracy of service recommendations. The present application is introduced from multiple aspects below, and the embodiments and beneficial effects of the following aspects can be referenced to each other.
[0006] In a first aspect, the present application provides a service recommendation method, which is used to recommend m different types of services on an electronic device, where m is a positive integer greater than or equal to 2: the method includes: determining m service sequences, wherein the i-th service sequence is composed of one or more i-th type services used by the user in a first historical period, and i is a positive integer between 1 and m; embedding the m service sequences through a first network unit in a neural network model to obtain a first embedding result matrix; determining a second embedding result matrix, which is obtained by embedding m candidate service sets, wherein the i-th candidate service set is composed of one or more i-th type services; obtaining an input of a second network unit of the neural network model based on the first embedding result matrix and the second embedding result matrix, so as to obtain a recommendation score for each service of at least one candidate service set among the m candidate service sets through processing by the second network unit.
[0007] According to the embodiments of the present application, a neural network model can be used to uniformly sort multiple types of services (e.g., applications and FA) on an electronic device. Compared with a solution that independently sorts and simply mixes different types of services, the accuracy of service recommendations can be improved.
[0008] In addition, in the implementation mode of the present application, by embedding multiple service sequences and multiple candidate service sets, the correlation between different service types can be fully considered, so that the user usage behavior of long-tail information sources can also be learned by the model, thereby avoiding the situation where the long-tail information source cannot be recommended by the model.
[0009] In some implementations, determining a second embedding result matrix includes: determining m candidate service sets; and embedding the m candidate service sets through a third network unit in a neural network model to obtain a second embedding result matrix.
[0010] In some embodiments, obtaining the input of the second network unit of the neural network model according to the first embedding result matrix and the second embedding result matrix includes: calculating the product of the second embedding result matrix and the first embedding result matrix, and using the product as the input of the second network unit.
[0011] In some embodiments, the first network unit includes a first subnetwork and a second subnetwork; m service sequences are embedded through the first network unit in the neural network model to obtain a first embedding result matrix, including: feature crossover of the m service sequences through the first subnetwork to obtain m cross feature vectors; and the m cross feature vectors are embedded through the second subnetwork to obtain a first embedding result matrix.
[0012] According to the implementation manner of the present application, the first network unit includes a first sub-network and a second sub-network, so that the m service sequences are embedded step by step to improve the accuracy of the embedding result.
[0013] In some embodiments, the second sub-network of the first network unit is an attention mechanism network.
[0014] In some embodiments, the third network unit is an attention mechanism network.
[0015] In some embodiments, the method further includes: determining the first service launched by the user after the first historical period, and determining the actual usage score of each service in the set of m candidate services based on the first service; determining the difference between the actual usage score and the recommended score of each service; and updating the neural network model based on the difference to improve the prediction accuracy of the neural network model.
[0016] In some embodiments, the m different types of services include a first type of service and a second type of service, and a usage rate of the first type of service is greater than a usage rate of the second type of service; the method further includes: determining a recommended exposure rate of the second type of service based on the recommendation scores of each service, and determining an exposure rate difference between the recommended exposure rate and an expected exposure rate of the second type of service; updating the neural network model based on the difference, including: updating the neural network model based on a superposition value of the difference and the exposure rate difference.
[0017] According to the implementation mode of the present application, the exposure rate of the long-tail information source is used as a constraint condition to update (or "train") the neural network model. Thus, in the recommendation results of the neural network model, a certain proportion of the long-tail information source services can be exposed, thereby further avoiding the situation where the long-tail information source cannot be recommended by the model.
[0018] In some embodiments, the method further includes: performing a first processing on the first embedding result matrix to obtain a first weight matrix; obtaining a recommendation score for each service of at least one candidate service set among the m candidate service sets by running a second network unit, including: obtaining an output result of the second network unit by running the second network unit; adding the output result to the first weight matrix to obtain a recommendation score for each service of at least one candidate service set among the m candidate service sets.
[0019] According to the implementation mode of the present application, it is beneficial to make the long-tail information source have sufficient exposure rate
[0020] In some embodiments, the first processing includes a normalization process.
[0021] In some implementations, the m different types of services include a first type of service and a second type of service, the first type of service is an application, and the second type of service is an atomic service.
[0022] In a second aspect, the present application provides an electronic device, comprising: a memory for storing instructions executed by one or more processors of the electronic device; and a processor, when the processor executes the instructions in the memory, the electronic device can execute the method provided by any implementation of the first aspect of the present application. The beneficial effects that can be achieved by the second aspect can refer to the beneficial effects of any implementation of the second aspect of the present application, and will not be repeated here.
[0023] In a third aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when the instructions are executed on a computer, the computer can execute the method provided by any implementation of the first aspect of the present application. The beneficial effects that can be achieved in the third aspect can refer to the beneficial effects of any implementation of the first aspect of the present application, and will not be repeated here.
[0024] In a fourth aspect, the present application provides a computer program product, wherein the program code contained in the computer program product, when executed by a computer or a processor, enables the computer or the processor to execute the method provided by any implementation of the first aspect. The beneficial effects that can be achieved in the fourth aspect can refer to the beneficial effects of the method provided by any implementation of the first aspect, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figures 1A to 1D A schematic diagram of a service recommendation window provided in an embodiment of the present application;
[0026] Figure 2 An exemplary structural diagram of a service recommendation model is provided for an embodiment of the present application;
[0027] Figure 3 A schematic diagram of a service recommendation method provided in an embodiment of the present application;
[0028] Figure 4A Flow chart 1 of the service recommendation method provided in the embodiment of the present application;
[0029] Figure 4B Schematic diagram of the service recommendation method provided in the embodiment of the present application Figure 2 ;
[0030] Figure 5 Schematic diagram of the service recommendation method provided in the embodiment of the present application Figure 3 ;
[0031] Figure 6 Flow chart 4 of the service recommendation method provided in the embodiment of the present application;
[0032] Figure 7 Schematic diagram of the service recommendation method provided in the embodiment of the present application Figure 5 ;
[0033] Figure 8 A schematic diagram of the architecture of the service recommendation system provided in the embodiment of the present application;
[0034] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0035] Fig.10 A block diagram of an electronic device provided in an embodiment of the present application is shown;
[0036] Fig.11 A schematic structural diagram of a system on chip (SOC) provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0037] The implementation methods of the present application will be described in detail below with reference to the accompanying drawings.
[0038] Currently, the electronic device 100 (or "end-side device") may include different types of services, such as applications and FA. The electronic device 100 may recommend services to the user in a service recommendation window (eg, Xiaoyi suggestion window) so that the user can quickly find the required services.
[0039] For example, refer to Figure 1A , the electronic device 100 may include two FAs and two applications in the service recommendation window, namely, FA 11 (eg, QQ Music TM ), FA 12 (e.g., reading), Application 21 (e.g., WeChat TM ) and applications 22 (e.g., Toutiao TM ).
[0040] For example, reference Figure 1B , the electronic device 100 may include one FA and four applications in the service recommendation window, namely FA13, application 23 (Himalaya TM ), Application 24, Application 25 and Application 26 (for example, Kuwo Music TM ).
[0041] For example, reference Figure 1C , the electronic device 100 can include two FAs and two applications in the service recommendation window, namely FA14 and FA15 (for example, Baidu Map TM ), Application 27 (e.g., Starbucks TM ) and application 24.
[0042] For example, reference Figure 1D The electronic device 100 may include two FAs and two applications in the service recommendation window, namely FA 16 and FA 17 (for example, Alipay TM ), application 28 (for example, Dianping.com TM ) and application 29 (e.g., Tao Piao Piao TM ).
[0043] In some embodiments, applications and FA are sorted independently. Specifically, for applications, the electronic device 100 has a built-in application sorting model, which can sort the applications on the electronic device 100 based on the click-through rate of the applications. For FA, its sorting model is often deep and has a complex feature space. Deploying the FA sorting model on the electronic device 100 has the problems of high power consumption and insufficient memory performance. Therefore, the FA sorting model is usually deployed in a cloud server. After the cloud server obtains the FA sorting result through the FA sorting model, it sends the sorting result to the electronic device 100.
[0044] For example, in Figure 1A In the illustrated scenario, after the electronic device 100 sorts the applications using the built-in application sorting model, the top two applications are application 21 and application 22. After the cloud server sorts the FAs using the FA sorting model, the top two FAs are FA 11 and FA 12. The cloud server can send the sorting result to the electronic device 100. After receiving the sorting result, the electronic device 100 simply shuffles FA 11, FA 12, application 21, and application 22 (for example, FA is arranged before the application), and displays the service icons of the four services in the service recommendation window.
[0045] In the above embodiment, different types of services are sorted independently, and the recommendation priorities between different types of services cannot be comprehensively considered. For example, the recommendation priority between FA 11 and application 21, or the recommendation priority between FA 11 and other applications other than applications 21 and 22 cannot be considered, thereby affecting the accuracy of service recommendations.
[0046] To this end, the present application provides a service recommendation model that can uniformly sort multiple types of services (e.g., applications and FA) on the electronic device 100. Compared with the solution of independently sorting and simply mixing different types of services, the accuracy of service recommendation can be improved.
[0047] In addition, compared to applications, the usage data of FA is sparse. For example, the user click behavior of FA may be only about one ten-thousandth of that of applications. The long-tail phenomenon is serious, and it is difficult for some service recommendation models to effectively learn the usage habits of FA. In this regard, in this application, it is considered that different types of services have certain correlations. For example, FA is essentially another form of application, and the user's behavior of using the application and the behavior of using FA will have a certain correlation. Therefore, in the service recommendation model provided by this application, different service types can be embedded, which can help the model use the user usage behavior of the head information source (for example, the application) to understand the user usage behavior of the long-tail information source (or "sparse source", for example, FA), so that the behavior of the long-tail information source can also be learned by the model, avoiding the situation where the long-tail information source is always difficult to be recommended due to the lack of user usage data.
[0048] Figure 2 The structural diagram of the service recommendation model provided in the embodiment of the present application is shown. The service recommendation model 200 provided in the embodiment of the present application can be deployed on the electronic device 100 (i.e., the "end-side device"), or it can be deployed on a server. The service recommendation model 200 is introduced from the aspects of the input of the service recommendation model 200, the main structure of the service recommendation model 200, and the output of the service recommendation model 200.
[0049] (1) Input of service recommendation model 200
[0050] refer to Figure 2 , the input of the service recommendation model 200 includes m service sequences (the first service sequence, the second service sequence, ..., the mth service sequence), and m candidate service sets (the first candidate service set, the second candidate service set, ..., the mth candidate service set). Wherein, m is a positive integer greater than 2, for example, m is 2, 3, 5, etc. In some embodiments, M is the number of service types on the electronic device 100.
[0051] For ease of understanding, in the following description, the first type of service is an application, and the second type of service is a FA. However, it should be understood that the present application is not limited thereto.
[0052] First, the m service sequences are introduced. The i-th service sequence consists of multiple i-th type services used by the user in the set historical period T (or "first historical period"), where i is a positive integer between 1 and m. Exemplarily, the first service sequence consists of p applications used by the user in the period T, that is, the first service sequence = {application 1, application 2, ..., application p}. The second service sequence consists of p FAs used by the user in the period T, that is, the second service sequence = {FA 1, FA2, ..., FA p}. Wherein, p is a positive integer. For example, p is 1, 10, 15, 25, etc. That is, the number of services in each service sequence can be 1 or more.
[0053] The value of each element in the service sequence may be an identifier of the corresponding service (eg, application name, application package name, etc.). For example, the value of the first element in the first service sequence may be the application package name of application 1.
[0054] Exemplarily, when the number of services of the i-th type used by the user in the time period T is less than p, the blank elements in the i-th service sequence can be filled with set characters (e.g., "000"). For example, when P=10, and the number of FAs used by the user in the time period T is only 3, the second service sequence can be {FA 1, FA 2, FA3, 000, 000, ..., 000}.
[0055] In this embodiment, the number of services (also understood as the number of elements) in each service sequence is the same (all p), which is conducive to simplifying the structure of the service recommendation model 200. In other embodiments, the number of services in each service sequence may also be different.
[0056] As described above, the input of the service recommendation model 200 also includes m candidate service sets. Among them, the i-th candidate service set consists of one or more services of the i-th type. Exemplarily, candidate service set 1 consists of q candidate applications, that is, the first candidate service set = {candidate application 1, candidate application 2, ..., candidate application q}, and the second candidate service set consists of q candidate FAs, that is, the second candidate service set = {candidate FA 1, candidate FA 2, ..., candidate FA q}. Among them, q is a positive integer. For example, q is 1, 15, 25, 50, etc. That is, the number of services in each candidate service set can be 1 or more. In addition, the value of each element in the candidate service set can also be the identifier of the corresponding service (for example, application name, application package name, etc.).
[0057] In this embodiment, the number of candidate services (also understood as the number of elements) in each candidate service set is the same (all q), which is conducive to simplifying the structure of the service recommendation model 200. In other embodiments, the number of candidate services in each candidate service set may also be different.
[0058] (2) Main structure of service recommendation model 200
[0059] refer to Figure 2 The service recommendation model 200 is a neural network model, which includes an encoding unit 210, a network unit 220 (as a first network unit), a network unit 230 (as a third network unit), a network unit 240 (as a second network unit), a multiplication unit 250 and a data processing unit 260. Each network unit may include one or more layers of a neural network.
[0060] The encoding unit 210 (eg, Heterogeneous Encoding Module) is used to encode the input of the service recommendation model 200 to encode the elements in each service sequence and candidate service set from character form to numerical form to facilitate subsequent calculations of the neural network model.
[0061] The network unit 220 is used to embed the m service sequences to obtain an embedding result matrix R (as a first embedding result matrix). Wherein, the matrix R = [r1, r2, ..., r m ], the i-th element r in the matrix R i It can be understood as a column vector with dimension z.
[0062] Among them, embedding (also known as "embedding") is a way for neural network models to process objects, which can express discrete objects as digital continuous vectors.
[0063] Exemplarily, the network unit 220 includes a subnetwork 221 (as a first subnetwork) and a subnetwork 222 (as a second subnetwork). The subnetwork 221 is used to perform feature crossover (e.g., "Intra source Interaction") on m service sequences to obtain m crossover feature vectors (e.g., "Inear Sharing"), which are vector α1, vector α2, ..., vector α m The sub-network 222 is used to embed the m cross feature vectors to obtain an embedding result matrix R. Exemplarily, the sub-network 222 is a network based on an attention mechanism (eg, Multi-head Self-attention).
[0064] In this embodiment, the network unit 220 is a structure composed of two sub-networks. In other embodiments, the network unit 220 can be a network of any other structure capable of implementing an embedding function, such as a recurrent neural network (RNN).
[0065] The network unit 230 is used to embed the m candidate service sets (for example, "Listwise Context Modeling") to obtain an embedding result matrix X (as a second embedding result matrix). The dimension of the matrix X is m×z (i.e., m rows and z columns), and the element in the i-th row and j-th column of the matrix X can be recorded as x i,j In this embodiment, the network unit 230 is a network based on an attention mechanism (eg, Multi-head Self-attention). In other embodiments, the network unit 230 may be any other network capable of implementing an embedding function, such as a RNN network.
[0066] The multiplication unit 250 is used to perform a multiplication calculation (or “Source level Fusion”) on the embedding result matrix X and the embedding result matrix R. Exemplarily, the matrix multiplication calculation may be a matrix circle multiplication calculation.
[0067] The network unit 240 is used to process the product of the matrix X and the matrix R to output the result Y'. In this embodiment, the network unit 240 is a personalized multi-layer perceptron (MLP) (or "fully connected neural network"). In other embodiments, the network unit 240 can also be other forms of neural networks, such as a network with bias nodes, a multi-expert system, etc.
[0068] The data processing unit 260 (eg, "Preference adaptive generator") is used to process the embedding result matrix R to obtain a weight matrix K (as a first weight matrix). The embedding result matrix R may be processed by normalization, equal value processing (ie, the processing result has the same value as the matrix R), etc.
[0069] (3) Output of service recommendation model 200
[0070] refer to Figure 2 The output result Y of the service recommendation model 200 includes the recommendation score of each service in the m candidate service set. Specifically, Y = {y1, y2, ..., y m}. Among them, y i It can be understood as a vector with dimension q, y i The jth element y in i,j is the recommendation score of the jth candidate service in the ith candidate service set. Exemplarily, the recommendation score of each service is a decimal between 0 and 1, for example, y1={0.7, 0.85, ..., 0.3}. The larger the recommendation score, the higher the recommendation priority of the corresponding service.
[0071] In some embodiments, the weight matrix K is superimposed on the output result Y′ of the network unit 230 as the output result Y of the service recommendation model 200 . In other embodiments, the output result Y′ of the network unit 230 may be directly used as the output result Y of the service recommendation model 200 .
[0072] In summary, the service recommendation model 200 provided in the present application includes a network unit 220 for embedding multiple service sequences, and a network unit 230 for embedding multiple candidate service sets, so that the correlation between different service types can be fully considered, so that the user usage behavior of long-tail information sources (for example, FA) can also be learned by the model, thereby avoiding the situation where the long-tail information source cannot be recommended by the model.
[0073] The following combination Figure 2 The service recommendation model 200 shown introduces the service recommendation method provided by this embodiment, wherein the execution subject of the service recommendation method provided by each embodiment of the present application can be the electronic device 100 or the server. The following is introduced by taking the execution subject as the electronic device 100 as an example.
[0074] In the present application, the electronic device 100 may be a mobile phone, a laptop computer, a tablet, a wearable device (e.g., a watch, smart glasses, a helmet), an augmented reality (AR) / virtual reality (VR) device, a personal digital assistant (PDA), etc., and the present application does not limit this.
[0075] For ease of understanding, the service recommendation method provided in this embodiment is first briefly introduced. Figure 3 In the example, m=2, the first type of service is application (Application, APP), and the second type of service is atomic service (FA).
[0076] refer to Figure 3 In the service recommendation method provided in the embodiment of the present application, firstly, multiple APPs are estimated and sorted according to the click-through rate of APP to obtain the APP sorting result; and FAs are estimated and sorted according to the click-through rate of FA to obtain the FA sorting result. Then, the estimated APP sorting result and the estimated FA sorting result are input into the service recommendation model 200 to obtain a mixed sorting result of APP and FA. After obtaining the mixed sorting result, the service sorting model can also be trained according to the actual use of the service on the electronic device 100 by the user to update the model.
[0077] The following introduces an exemplary process of the service recommendation method provided in an embodiment of the present application.
[0078] [Example 1]
[0079] refer to Figure 4A The service recommendation method provided in this embodiment may include the following steps:
[0080] S101: The electronic device 100 determines m service sequences.
[0081] As described above, the i-th service sequence consists of multiple i-th type services used by the user within the set historical period T, for example, the 1st service sequence = {application 1, application 2, ..., application p}, the 2nd service sequence = {FA 1, FA 2, ..., FA p}, ...
[0082] The electronic device 100 can record the user's use of various types of services on the electronic device 100 within a set historical period T, and determine m service sequences based on the use. For example, the user's operation of starting a service, the user's operation on the page provided by the service, etc. can all be regarded as the user's use of the service.
[0083] In addition, within the same service sequence, each service may be sorted according to the order of use by the user within the time period T, or may be sorted according to the usage duration and / or frequency of use by the user within the time period T, which is not limited in this application.
[0084] The time period T can be any time period within a day, for example, the morning working time period, the evening rush hour period, the bedtime period, etc. In addition, the application does not limit the duration of the time period T, and the duration of the time period T can be 0.5 hours, 1 hour, 2 hours, etc.
[0085] S102: The electronic device 100 determines m candidate service sets.
[0086] As described above, the i-th candidate service set is composed of multiple i-th type services. For example, the first candidate service set = {candidate application 1, candidate application 2, ..., candidate application q}, the second candidate service set = {candidate FA 1, candidate FA 2, ..., candidate FA q}, ...
[0087] The electronic device 100 may preset a candidate service set or obtain a candidate service set from a cloud server. For example, each time a service is recommended, the electronic device 100 obtains a candidate service set that matches the time period T from the cloud server. For example, when the time period T is the evening peak period, the services in the candidate service set may be mainly travel services, map services, or catering services. For the sake of narrative coherence, the method for determining the candidate service set will be described in detail later.
[0088] S103: The electronic device 100 embeds the m service sequences through the network unit 220 to obtain an embedding result matrix R.
[0089] Exemplarily, when the elements in the service sequence are in non-numerical form (e.g., character form), the elements in the service sequence are first converted from non-numerical form to numerical form by the encoding unit 210. Afterwards, the m service sequences are input into the network unit 220, so that the m service sequences are embedded by the network unit 220, and the embedding result matrix R is output. The embedding result matrix R = [r1, r2, ..., r m ], the i-th element r in the matrix R i It can be understood as a column vector with dimension z.
[0090] That is, the network unit 220 can learn the elements in the m service sequences, extract the key information between the elements, and rearrange and combine the key information to obtain the embedding result matrix R. For example, when the first service sequence includes video applications and the second service sequence includes football FA, the embedding result matrix R may include the type element of "football video".
[0091] In this embodiment, by setting the network unit 220, services in different service sequences can be embedded, which is conducive to the behavior in the long-tail information source (for example, FA) being learned by the service recommendation model 200.
[0092] In this embodiment, the network unit 220 includes a sub-network 221 and a sub-network 222. Figure 4B , step S103 may include the following sub-steps:
[0093] S103a: Perform feature crossover on the m service sequences through the sub-network 221 to obtain m crossover feature vectors. The m crossover feature vectors are respectively vector α1, vector α2, ..., vector α m .
[0094] By performing feature crossover on the m service sequences, the features of the m service sequences can be combined in advance, so as to obtain a more accurate embedding result R later. This embodiment does not limit the network structure of the sub-network 221, and the sub-network can be a neural network such as an MLP network, a Product network, and a Cross network.
[0095] S103b: Embed the m cross feature vectors through the sub-network 222 to obtain an embedding result matrix R.
[0096] In this embodiment, the sub-network 222 is a network based on the attention mechanism. The attention mechanism network can pay more attention to important information more accurately, thereby improving the accuracy of the embedding result R. In other embodiments, the sub-network 222 can also be other neural networks that can realize the embedding function, such as RNN.
[0097] In this embodiment, the network unit 220 includes a sub-network 221 and a sub-network 222, so as to embed the m service sequences step by step to improve the accuracy of the embedding result R. In other embodiments, the network unit 220 can be any other neural network capable of implementing the embedding function, such as RNN, Convolutional Neural Networks (CNN), etc.
[0098] S104: The electronic device 100 embeds the m candidate service sets through the network unit 230 to obtain an embedding result matrix X.
[0099] Similar to step S100, when the elements in the candidate service set are in non-numerical form (e.g., character form), the elements of the candidate service set can be first converted from non-numerical form to numerical form by the encoding unit 210. Afterwards, the m candidate service sets are input into the network unit 230, so that the m candidate service sets are embedded by the network unit 230, and the embedding result matrix X is output. Wherein, the embedding result matrix X = [x1, x2, ..., x m ], the dimension of matrix X can be m×z (i.e., m rows and z columns), and the element in the i-th row and j-th column of matrix X can be denoted by x i,j .
[0100] In this embodiment, the network unit 230 is a network based on an attention mechanism. The attention mechanism network can pay more attention to important information more accurately, thereby improving the accuracy of the embedding result X. In other embodiments, the network unit 230 can also be other neural networks that can realize the embedding function, such as RNN, CNN, etc.
[0101] S105: The electronic device 100 calculates the product of the embedding result matrix X and the embedding result matrix R (ie, X×R).
[0102] Exemplarily, the matrix X and the matrix R may be multiplied by the multiplication unit 250. Exemplarily, the multiplication is a matrix circle multiplication to improve the efficiency of the multiplication. In addition, according to the above, the dimension of the matrix X may be m×z, and the dimension of the matrix R may be z×m. Therefore, the product of the matrix X and the matrix R may be an m×m matrix.
[0103] The result of multiplying the matrix X and the matrix R can be understood as the result of applying the user preference to the candidate service set. The product of the matrix X and the matrix R is used as the input of the network unit 230 to improve the accuracy of the recommendation result of the service recommendation model 200. In other embodiments, the input of the network unit 230 can also be obtained in other ways, for example, the matrix X is weighted according to the matrix R, and the weighted result is used as the input of the network unit 230.
[0104] S106: The electronic device 100 uses the product of the matrix X and the matrix R as the input of the network unit 230, so as to obtain the recommendation score of each service in the m candidate service sets through processing by the network unit 230.
[0105] In this embodiment, the network unit 230 is a multi-layer perceptron MLP. In other embodiments, the network unit 230 may also be a neural network with other structures, for example, a neural network with bias nodes, a multi-expert system, etc.
[0106] Exemplarily, the output result Y' of the network unit 230 is {y1', y2', ..., ym '}, where y i ' can be understood as a column vector of dimension q.
[0107] In this embodiment, the output result Y' of the network unit 230 is used as the output result Y of the service recommendation model 200. That is, the output result Y = output result Y' = {y1, y2, ..., y m}, where y i It can be understood as a column vector with dimension q, y i The jth element y in i,j is the recommendation score of the jth candidate service in the ith candidate service set. That is, the output result Y of the service recommendation model 200 includes the recommendation score of each service in the m candidate service sets.
[0108] The recommendation score of each service is a value in the interval [0, a]. For example, a=1, that is, the recommendation score of each service is a decimal between 0 and 1, for example, y1={0.71, 0.73, ..., 0.3}.
[0109] It can be understood that the larger the recommendation score, the higher the recommendation priority of the corresponding service. Therefore, by sorting the recommendation scores in the output result Y, the recommended services can be obtained. For example, the top four services with the highest recommendation scores are used as recommended services. The recommended services may include different types of services, for example, applications and FAs.
[0110] In summary, in this embodiment, by setting the service recommendation model 200 in the electronic device 100, multiple types of services (e.g., applications and FA) on the electronic device 100 can be uniformly sorted. Compared with the solution of independently sorting and simply mixing different types of services, the accuracy of service recommendation can be improved.
[0111] In addition, in this embodiment, m service sequences and m candidate service sets are embedded respectively to obtain an embedding result matrix R and an embedding result matrix X. Based on the embedding result matrix X and the embedding result matrix R, the input of the network unit 230 can be obtained, and the recommendation score of each service can be obtained by running the network unit 230. In this embodiment, by embedding multiple service sequences and embedding multiple candidate service sets, the correlation between different service types can be fully considered, so that the user usage behavior of the long-tail information source (for example, FA) can also be learned by the model, thereby avoiding the situation where the long-tail information source cannot be recommended by the model.
[0112] In addition, in the present embodiment, for different types of services, dedicated input channels are retained in the service recommendation model 200 (for example, the application is input through the first service sequence and the first candidate service set, and the FA is input through the second service sequence and the second candidate service set). Thus, the model parts corresponding to each type of service can remain relatively independent, so that the model parts corresponding to each type of service can be independently updated to a certain extent, thereby better retaining the model's ability to learn sparse source data.
[0113] It should be noted that the above is only an exemplary description of the technical solution of the present application, and those skilled in the art may make other modifications.
[0114] For example, in this embodiment, the service recommendation model 200 in the electronic device 100 includes a network unit 230. In other embodiments, the service recommendation model 200 may not include the network unit 230, but other devices (e.g., a cloud server) embed the m candidate service sets and provide the embedding result matrix X to the electronic device 100.
[0115] For another example, in this embodiment, the service recommendation model 200 may output the recommendation scores of the services in each candidate service set. In other embodiments, the service recommendation model 200 may output the recommendation scores of the services in some candidate service sets (i.e., at least one candidate service set), for example, the service recommendation model 200 only outputs the recommendation scores of the services in the first candidate service set, or only outputs the recommendation scores of the services in the second candidate service set.
[0116] In addition, this embodiment does not limit the execution order of steps S101 and S102, which can be executed successively or simultaneously. Correspondingly, the execution order of steps S103 and S104 is also not limited, which can be executed successively or simultaneously.
[0117] [Example 2]
[0118] This embodiment is based on the first embodiment. Based on the first embodiment, this embodiment can further calculate the loss of the service recommendation model 200 and update the service recommendation model 200 according to the loss.
[0119] refer to Figure 5 The service recommendation method provided in this embodiment may include the following steps:
[0120] S201: The electronic device 100 determines m service sequences.
[0121] S202: The electronic device 100 determines m candidate service sets.
[0122] S203: The electronic device 100 embeds the m service sequences through the network unit 220 to obtain an embedding result matrix R.
[0123] S204: The electronic device 100 embeds the m candidate service sets through the network unit 230 to obtain an embedding result matrix X.
[0124] S205: The electronic device 100 calculates the product of the embedding result matrix X and the embedding result matrix R (ie, X×R).
[0125] S206: The electronic device 100 uses the product of the matrix X and the matrix R as the input of the network unit 230, so as to obtain the recommendation score of each service in the m candidate service sets through processing by the network unit 30.
[0126] The implementation details and variations of steps S201 to S206 are substantially the same as those of steps S101 to S106 in the first embodiment, so reference may be made to the description in the first embodiment and no further details are given.
[0127] S207: The electronic device 100 determines the first service started by the user after the preset historical period T, and determines the actual usage score of each service in the m candidate service sets based on the first service.
[0128] The electronic device 100 may monitor the user's operation on the electronic device 100 after the period T, and record the first service started by the user after the period T. The user's behavior of starting a service may include the user's behavior of opening a new service, or the user's behavior of switching a service from the background to the foreground.
[0129] After monitoring the first service started by the user after time period T, the electronic device 100 can determine the actual usage score of the first service as the end value a of the interval [0, a] (for the meaning of the interval [0, a], please refer to the description in step S106 above), and determine the actual usage scores of other services in the m candidate service set as 0.
[0130] S208: The electronic device 100 calculates the difference ΔD between the actual usage score and the recommendation score of each service in the m candidate service sets.
[0131] For example, when the first service used by the user after time period T is candidate application 2 in the first candidate service set, the actual usage score of candidate application 2 may be 1. Therefore, the difference between the actual usage score of candidate application 2 and the recommended score ΔD is 1,2 1-y 1,2 '.
[0132] The actual usage score of other candidate services in the candidate service set is 0. Therefore, the difference between the actual usage score of other candidate services and the recommended score is ΔDi,j -y i,j . As described in step S106, y i,j is the recommendation score of the jth candidate service in the i-th candidate service set, ΔD i,j is the difference between the actual usage score and the recommended score of the jth candidate service in the i-th candidate service set.
[0133] S209: The electronic device 100 updates the service recommendation model 200 according to the difference ΔD.
[0134] The difference ΔD between the actual usage score and the recommended score of each service in the candidate service set can be used as the loss of the service recommendation model 200. The service recommendation model 200 can be updated based on the loss (for example, the weight parameters of each network unit in the service recommendation model 200 are updated) to improve the prediction accuracy of the service recommendation model 200.
[0135] It should be noted that other details and variations of this embodiment not described herein can be referred to the introduction in the first embodiment and will not be described in detail herein.
[0136] [Example 3]
[0137] This embodiment is based on the second embodiment. On the basis of the second embodiment, this embodiment adds the exposure rate constraint of the long-tail information source so that the long-tail information source has a certain exposure rate. In the following, the second type of service (ie, FA) is taken as an example of the long-tail information source.
[0138] refer to Figure 6 The service recommendation method provided in this embodiment may include the following steps:
[0139] S301: The electronic device 100 determines m service sequences.
[0140] S302: The electronic device 100 determines m candidate service sets.
[0141] S303: The electronic device 100 embeds the m service sequences through the network unit 220 to obtain an embedding result matrix R.
[0142] S304: The electronic device 100 embeds the m candidate service sets through the network unit 230 to obtain an embedding result matrix X.
[0143] S305: The electronic device 100 calculates the product of the embedding result matrix X and the embedding result matrix R (ie, X×R).
[0144] S306: The electronic device 100 uses the product of the matrix X and the matrix R as the input of the network unit 230, so as to obtain the recommendation score of each service in the m candidate service sets through processing by the network unit 230.
[0145] S307: The electronic device 100 determines the first service started by the user after the preset historical period T, and determines the actual usage score of each service in the m candidate service sets based on the first service.
[0146] S308: The electronic device 100 calculates the difference ΔD between the actual usage score and the recommendation score of each service in the m candidate service sets.
[0147] The implementation details and variations of steps S301 to S308 are substantially the same as those of steps S101 to S108 in the first embodiment, so reference may be made to the description in the first embodiment and no further elaboration is given.
[0148] S309: The electronic device 100 determines the recommended exposure rate of FA according to the recommendation scores of each service in the m candidate service sets, and determines the exposure rate difference ΔD1 between the recommended exposure rate and the expected exposure rate of FA.
[0149] The meaning of the recommended exposure rate of FA is: assuming that a total of 10 services are exposed (ie, a total of 10 services are recommended), if the number of FAs recommended (or "exposed") is 1, then the recommended exposure rate of FA is 1 / 10=0.1.
[0150] The expected exposure rate of FA means the ratio of the number of FAs expected to be recommended to the total number of exposed services. The expected exposure rate can be a preset value, for example, 0.2. That is, if a total of 10 services are exposed, the number of FAs expected to be exposed is 10×0.2=2.
[0151] The exposure rate difference ΔD1 between the recommended exposure rate of FA and the desired exposure rate=the recommended exposure rate of FA−the desired exposure rate of FA.
[0152] S310: Update the service recommendation model 200 according to the difference value ΔD and the superimposed value ΔD2 of the exposure rate difference ΔD1.
[0153] Different from the second embodiment, in this embodiment, the difference ΔD is not used as the loss of the service recommendation model 200, but the superposition value ΔD2 of the difference ΔD and the exposure rate difference ΔD1 is used as the loss of the service recommendation model 200, and the service recommendation model 200 is updated according to the loss.
[0154] For example, when the exposure difference of FA is -0.1, based on the difference ΔD, 2,j (ie, the difference ΔD of each service in the second candidate service set) minus 0.1 can obtain ΔD2.
[0155] That is to say, in this embodiment, the exposure rate of the long-tail information source is used as a constraint condition to update (or "train") the service recommendation model 200. Therefore, in the recommendation results of the service recommendation model 200, a certain proportion of long-tail information source services can be exposed (as the model is improved, this proportion will gradually approach the expected exposure rate of the long-tail information source), thereby further avoiding the situation where the long-tail information source cannot be recommended by the model.
[0156] It is understandable that in other embodiments, the exposure of the long-tail information source may also be used as a constraint.
[0157] [Example 4]
[0158] This embodiment is based on the first embodiment. The difference between this embodiment and the first embodiment is that, in this embodiment, instead of directly using the output result Y' of the network unit 240 as the output result Y of the service recommendation model 200, a weight matrix is superimposed on the output result Y' of the network unit 240, and the superimposed result of the output result Y' and the weight matrix is used as the output result Y of the service recommendation model 200.
[0159] refer to Figure 7 The service recommendation method provided in this embodiment includes the following steps:
[0160] S401: The electronic device 100 determines m service sequences.
[0161] S402: The electronic device 100 determines m candidate service sets.
[0162] S403: The electronic device 100 embeds the m service sequences through the network unit 220 to obtain an embedding result matrix R.
[0163] S404: The electronic device 100 embeds the m candidate service sets through the network unit 230 to obtain an embedding result matrix X.
[0164] S405: The electronic device 100 calculates the product of the embedding result matrix X and the embedding result matrix R (ie, X×R).
[0165] The implementation details and variations of steps S401 to S405 are substantially the same as those of steps S101 to S105 in the first embodiment, so reference may be made to the description in the first embodiment and no further elaboration is given.
[0166] S406: Process the embedding result matrix R to obtain a weight matrix K (as a first weight matrix).
[0167] The processing of the embedding result matrix R may include normalization processing (ie, normalizing the elements in the matrix R), equalization processing (ie, the weight matrix K is equal to the embedding result matrix R), and the like.
[0168] In addition, as described above, the dimension of the matrix R is z×m. Wherein, z may be equal to the dimension q of each candidate service set. It can be understood that the dimension of the weight matrix K may be q×m.
[0169] S407: The electronic device 100 uses the product of the matrix X and the matrix R as the input of the network unit 230, so as to obtain the recommendation score of each service in the m candidate service sets through processing by the network unit 230.
[0170] Specifically, refer to Figure 8 , step S407 may include the following sub-steps:
[0171] S407a: The product of the matrix X and the matrix R is used as the input of the network unit 230, so as to obtain the output result Y' of the network unit 230 after being processed by the network unit 230.
[0172] Specifically, referring to the description in step S106 above, the output result Y' of the network unit 230 is {y1', y2', . . . , y m '}, where y i ' can be understood as a column vector with a dimension of q. That is, the dimension of Y' can be q×m.
[0173] S407b: Superimpose the output result Y' and the weight matrix K to obtain the recommendation score of each service in the m candidate service sets.
[0174] That is, the output result Y of the service recommendation model 200 can be obtained by adding the elements in the output result Y' and the elements in the weight matrix K one by one. As described in step S106 of the first embodiment above, the output result Y = {y1, y2, ..., y m}, where y i It can be understood as a column vector with dimension q, y i The jth element y in i,j is the recommendation score of the jth candidate service in the ith candidate service set. That is, the output result Y of the service recommendation model 200 includes the recommendation score of each service in the m candidate service sets.
[0175] In this embodiment, the weight matrix K is superimposed on the output result Y' of the network unit 230, so that the output result Y' can be adjusted, which is conducive to ensuring that the long-tail information source has a sufficient exposure rate.
[0176] It is understandable that after obtaining the output result Y, the service recommendation model 200 can be trained according to the method described in step S207 to step S209 of embodiment 2 to improve the recommendation accuracy of the service recommendation model 200. In addition, other undescribed details and variations of this embodiment can refer to the introduction of embodiment 1 and will not be repeated here.
[0177] Figure 8 The following is an exemplary architecture diagram of the service recommendation system provided by the embodiment of the present application. Figure 8 The method for determining the candidate service set in the embodiment of the present application is introduced.
[0178] refer to Figure 8 The service recommendation system includes an input part, a pre-processing part, an intent recognition part and a distribution part. Specifically, the input part is used to input events, behavior sequences, user portraits and queries. Among them, events can be events that are currently occurring or about to occur, such as meteorological events (whether it is raining), travel events (for example, flight delay events), etc.; behavior sequences can include user click sequences on services (for example, APP, FA); user portraits can include several characteristics of users, such as user gender, age, occupation, hobbies, etc.; queries can be query information input by users, such as user search records, etc.
[0179] The pre-processing part is used to convert the input information from text information into information that can be understood by the computer (for example, digital information). The intention recognition part is used to analyze the user's intention based on the input information, for example, whether the user wants to travel or watch a video.
[0180] The service retrieval unit is used to retrieve related services according to the user's intention. For example, when the user's intention is to travel, the services related to the user's intention may be taxi services, map services, weather forecast services, etc.; when the user's intention is to watch videos, the services related to the user's intention may be short video services, audio and video services, etc.
[0181] The service ranking unit is used to rank the retrieved services, for example, according to the user's previous click rate. The ranked services can be input into the service distribution unit as a candidate service set. The service distribution unit may include the service recommendation model 200 provided in the embodiment of the present application. After the service distribution unit receives the candidate service set, it can recommend the service by running the service recommendation model 200 and distribute the recommendation results.
[0182] In addition, the service recommendation system also includes a business event processing unit, a business processing unit and a service data model. Among them, the business event processing unit may include business processing rules between various parts (for example, between the input part and the intention recognition part), and the business processing unit may be used for the specific implementation of the processing rules. The service data model may include service data of various services, such as service type, service name, service function, etc.
[0183] The following introduces a comparison between some embodiments and the service recommendation method provided by this embodiment.
[0184] In some embodiments, the service recommendation method includes the following steps: calculating mutual information to evaluate the importance of channels; sorting and grouping channels according to their importance; setting an attention regularization loss function and optimizing the model according to the grouping; pruning unimportant channels; and optimizing the model again to restore the accuracy of the model.
[0185] In this embodiment, the deep neural network can be compressed to reduce the storage and computing consumption of large deep network models. At the same time, the accuracy loss caused by pruning can be reduced, and it can be better applied to mobile devices for image classification.
[0186] However, in this embodiment, the model size is reduced by model pruning, and model compression will inevitably lead to a certain degree of accuracy loss. Compared with this embodiment, this embodiment does not involve model compression, so that higher model accuracy can be achieved.
[0187] Fig. 9 1 shows a schematic diagram of the structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) connector 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0188] It is to be understood that the structure illustrated in the embodiment of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine some components, or separate some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0189] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0190] The processor can generate operation control signals based on instruction opcodes and timing signals to complete the control of instruction fetching and execution.
[0191] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, 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 cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0192] In some embodiments, the processor 110 may include one or more interfaces. The interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, and a subscriber identity module (SIM) interface.
[0193] The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through the I2C interface, so that the processor 110 communicates with the touch sensor 180K through the I2C bus interface, thereby realizing the touch function of the electronic device 100.
[0194] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple groups of I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to achieve communication between the processor 110 and the audio module 170. The PCM interface can also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. The UART interface is a universal serial data bus for asynchronous communication. The bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to achieve Bluetooth function. The MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate via a CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via a DSI interface to implement the display function of the electronic device 100.
[0195] The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0196] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0197] The USB connector 130 is a connector that complies with USB standard specifications and can be used to connect the electronic device 100 and peripheral devices. Specifically, it can be a standard USB connector (such as a Type C connector), a Mini USB connector, a Micro USB connector, etc.
[0198] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from the wired charger through the USB connector 130 .
[0199] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140 to power the processor 110, the internal memory 121, the display screen 194, the camera 193, and the wireless communication module 160.
[0200] The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0201] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0202] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0203] The modem processor may include a modulator and a demodulator. Among them, the modulator is used to modulate the low-frequency baseband signal to be sent into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to a speaker 170A, a receiver 170B, etc.), or displays an image or video through a display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.
[0204] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the frequency of the electromagnetic wave signal and performs filtering, and sends the processed signal to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, modulate the frequency of it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0205] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.
[0206] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
[0207] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0208] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0209] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0210] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0211] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0212] The video codec is used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 may play or record videos in multiple coding formats.
[0213] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0214] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.
[0215] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, 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 disk storage device, a flash memory device, etc. The processor 110 executes various functional applications and data processing of the electronic device 100 by running instructions stored in the internal memory 121 and / or instructions stored in a memory provided in the processor.
[0216] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0217] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.
[0218] The speaker 170A, also called a "speaker", is used to convert an audio signal into a sound signal. The electronic device 100 can listen to music or listen to a hands-free call through the speaker 170A. The receiver 170B, also called a "earpiece", is used to convert an audio signal into a sound signal. When the electronic device 100 receives a call or a voice message, the voice can be received by placing the receiver 170B close to the human ear.
[0219] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting his mouth close to microphone 170C to input the sound signal into microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. The headphone jack 170D is used to connect wired headphones.
[0220] Reference now Fig.10 , shown is a block diagram of an electronic device 400 according to one embodiment of the present application. The electronic device 400 may include one or more processors 401 coupled to a controller hub 403. For at least one embodiment, the controller hub 403 communicates with the processor 401 via a multi-drop bus such as a front side bus (FSB), a point-to-point interface such as a QuickPath Interconnect (QPI), or a similar connection 406. The processor 401 executes instructions that control general types of data processing operations. In one embodiment, the controller hub 403 includes, but is not limited to, a graphics & memory controller hub (GMCH) (not shown) and an input / output hub (IOH) (which can be on a separate chip) (not shown), wherein the GMCH includes a memory and a graphics controller and is coupled to the IOH.
[0221] The electronic device 400 may also include a coprocessor 402 and a memory 404 coupled to a controller hub 403. Alternatively, one or both of the memory and the GMCH may be integrated within the processor (as described in this application), with the memory 404 and the coprocessor 402 being directly coupled to the processor 401 and the controller hub 403, with the controller hub 403 being in a single chip with the IOH.
[0222] The memory 404 may be, for example, a dynamic random access memory (DRAM), a phase change memory (PCM), or a combination of the two. The memory 404 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, specifically, temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the electronic device 400 to implement the following: Figure 4A , Figure 4B , Figure 5 , Figure 6 , Figure 7 When the instructions are executed on a computer, the computer executes the service recommendation method disclosed in the embodiment of the present application.
[0223] In one embodiment, the coprocessor 402 is a special-purpose processor, such as, for example, a high-throughput Many Integrated Core (MIC) processor, a network or communication processor, a compression engine, a graphics processor, a general-purpose computing on graphics processing units (GPGPU), or an embedded processor. The optional nature of the coprocessor 402 is indicated by a dashed line in FIG. Fig.10 middle.
[0224] In one embodiment, the electronic device 400 may further include a network interface (Network Interface Controller, NIC) 406. The network interface 406 may include a transceiver for providing a radio interface for the electronic device 400, and then communicating with any other suitable device (such as a front-end module, an antenna, etc.). In various embodiments, the network interface 406 may be integrated with other components of the electronic device 400. The network interface 406 may implement the functions of the communication unit in the above-mentioned embodiments.
[0225] The electronic device 400 may further include an input / output (I / O) device 405. The I / O 405 may include: a user interface designed to enable a user to interact with the electronic device 400; a peripheral component interface designed to enable peripheral components to interact with the electronic device 400; and / or a sensor designed to determine environmental conditions and / or location information related to the electronic device 400.
[0226] It is worth noting that Fig.10 This is for illustrative purposes only. Fig.10 It is shown that the electronic device 400 includes multiple devices such as a processor 401, a controller hub 403, a memory 404, etc.; however, in actual applications, the device using the methods of the present application may include only a portion of the devices in the electronic device 400, for example, it may include only the processor 401 and the network interface 406. Fig.10 The properties of optional devices are shown with dotted lines.
[0227] Reference now Fig.11 , which is a block diagram of a system on chip (SoC) 500 according to an embodiment of the present application. Fig.11In the , similar components have the same reference numerals. In addition, the dashed boxes are optional features of more advanced SoCs. Fig.11 In the embodiment, SoC 500 includes: an interconnect unit 550 coupled to a processor 510; a system agent unit 580; a bus controller unit 590; an integrated memory controller unit 540; a group or one or more coprocessors 520, which may include integrated graphics logic, an image processor, an audio processor, and a video processor; a static random access memory (SRAM) unit 530; and a direct memory access (DMA) unit 560. In one embodiment, the coprocessor 520 includes a special-purpose processor, such as, for example, a network or communication processor, a compression engine, a general-purpose computing on graphics processing units (GPGPU), a high-throughput MIC processor, or an embedded processor.
[0228] Static random access memory (SRAM) unit 530 may include one or more tangible, non-transitory computer-readable media for storing data and / or instructions. The computer-readable storage medium stores instructions, and more specifically, stores temporary and permanent copies of the instructions. The instructions may include: when executed by at least one of the processors, causing the SoC to implement the following: Figure 4A , Figure 4B , Figure 5 , Figure 6 , Figure 7 When the instructions are executed on a computer, the computer executes the service recommendation method disclosed in the embodiment of the present application.
[0229] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.
[0230] Each method implementation mode of the present application can be implemented in the form of software, magnetic components, firmware, etc.
[0231] Program code can be applied to input instructions to perform the functions described herein and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a digital signal processor (DSP), a microcontroller, an application specific integrated circuit (ASIC), or a microprocessor.
[0232] Program code can be implemented with high-level programming language or object-oriented programming language to communicate with the processing system. When necessary, program code can also be implemented with assembly language or machine language. In fact, the mechanism described herein is not limited to the scope of any specific programming language. In either case, the language can be a compiled language or an interpreted language.
[0233] One or more aspects of at least one embodiment may be implemented by representative instructions stored on a computer-readable storage medium, which represent various logics in a processor, and when the instructions are read by a machine, the machine makes logic for performing the techniques described herein. These representations, known as "Intellectual Property (IP) cores," may be stored on tangible computer-readable storage media and provided to multiple customers or production facilities to be loaded into a manufacturing machine that actually manufactures the logic or processor.
[0234] In some cases, the instruction converter can be used to convert instructions from a source instruction set to a target instruction set. For example, the instruction converter can transform (e.g., using static binary transformation, dynamic binary transformation including dynamic compilation), deform, simulate, or otherwise convert instructions into one or more other instructions to be processed by the core. The instruction converter can be implemented in software, hardware, firmware, or a combination thereof. The instruction converter can be on the processor, outside the processor, or partially on the processor and partially outside the processor.
Claims
1. A service recommendation method, characterized in that: The method is used to recommend m different types of services on an electronic device, where m is a positive integer greater than or equal to 2. The method comprises: Determine m service sequences, wherein the i-th service sequence consists of one or more i-th type services used by the user in the first historical period, and i is a positive integer between 1 and m; Embedding the m service sequences through a first network unit in a neural network model to obtain a first embedding result matrix; Determine a second embedding result matrix, where the second embedding result matrix is obtained by embedding m candidate service sets, wherein the i-th candidate service set consists of one or more i-th type services; The input of the second network unit of the neural network model is obtained according to the first embedding result matrix and the second embedding result matrix, so as to obtain the recommendation score of each service of at least one candidate service set among the m candidate service sets through processing by the second network unit.
2. The method according to claim 1, characterized in that The determining of the second embedding result matrix comprises: Determining the m candidate service sets; The m candidate service sets are embedded through a third network unit in the neural network model to obtain a second embedding result matrix.
3. The method according to claim 1, characterized in that The step of obtaining an input of a second network unit of the neural network model according to the first embedding result matrix and the second embedding result matrix includes: The product of the second embedding result matrix and the first embedding result matrix is calculated, and the product is used as an input of the second network unit.
4. The method according to claim 1, characterized in that: The first network unit includes a first sub-network and a second sub-network; The embedding of the m service sequences by a first network unit in the neural network model to obtain a first embedding result matrix includes: Performing feature crossover on the m service sequences through the first sub-network to obtain m crossover feature vectors; The m cross feature vectors are embedded through the second sub-network to obtain the first embedding result matrix.
5. The method according to claim 4, characterized in that The second sub-network of the first network unit is an attention mechanism network.
6. The method according to claim 2, characterized in that The third network unit is an attention mechanism network.
7. The method according to claim 1, characterized in that The method further comprises: Determine a first service started by the user after the first historical period, and determine the actual usage score of each service in the m candidate service set according to the first service; Determine the difference between the actual usage score and the recommended score for each service; The neural network model is updated according to the difference.
8. The method according to claim 7, characterized in that The m different types of services include a first type of service and a second type of service, and a usage rate of the first type of service is greater than a usage rate of the second type of service; The method further comprises: determining a recommended exposure rate of the second type of service according to the recommendation scores of the respective services, and determining an exposure rate difference between the recommended exposure rate and an expected exposure rate of the second type of service; The updating of the neural network model according to the difference comprises: The neural network model is updated according to the superposition value of the difference and the exposure rate difference.
9. The method according to claim 1, characterized in that: The method further comprises: Performing a first processing on the first embedding result matrix to obtain a first weight matrix; The step of obtaining, by running the second network unit, a recommendation score of each service of at least one candidate service set among the m candidate service sets through processing by the second network unit includes: By running the second network unit, an output result of the second network unit is obtained; The output result is added to the first weight matrix to be processed by the second network unit to obtain a recommendation score for each service of at least one candidate service set among the m candidate service sets.
10. The method according to claim 9, characterized in that The first processing includes a normalization process.
11. The method according to claim 1, characterized in that: The m different types of services include a first type of service and a second type of service, the first type of service is an application, and the second type of service is an atomic service.
12. An electronic device, characterized in that: include: a memory for storing instructions executed by one or more processors of the electronic device; A processor, when the processor executes the instructions in the memory, can enable the electronic device to execute the method according to any one of claims 1 to 11.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 11.
14. A computer program product, characterized in that The program code included in the computer program product, when executed by a computer or a processor, enables the computer or the processor to execute the method according to any one of claims 1 to 11.