Service pushing method, model training method and electronic equipment
By employing cloud-based collaborative training and personalized adaptation, the problem of insufficient accuracy in predicting user intent has been solved, improving the precision of service push and user experience, especially when the processing capabilities on the device side are limited.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2026-04-07
AI Technical Summary
In existing technologies, the accuracy of user intent prediction is insufficient, resulting in poor service push accuracy and user experience. This is especially true when the processing capabilities on the device side are limited, leading to low training efficiency and limited accuracy.
A cloud-based collaborative training scheme is adopted to train a general intent prediction model using historical device event data of a group of users. A lightweight model is obtained through distillation and deployed on the device side. Personalized adaptation is performed by combining the personal device event data collected on the device side to form a personalized intent prediction model, thereby improving the prediction accuracy.
It enables personalized adaptation to user behavior habits on the device side, improves the accuracy of intent prediction and the precision of service delivery, and enhances user satisfaction.
Smart Images

Figure CN121814837A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a service pushing method, a model training method and an electronic device. BACKGROUND
[0002] With the development of machine learning technology, machine learning has been widely applied to solve problems in various technical fields. As an application of machine learning, user intention prediction can predict the user's intention through collected user behavior data, so as to make corresponding decisions, such as pushing corresponding services. Therefore, how to accurately predict the user's intention has become a problem to be solved. SUMMARY
[0003] Embodiments of the present application provide a service pushing method, a model training method and an electronic device, which are used to accurately predict the intention based on the behavior patterns of group users, so as to accurately push services.
[0004] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0005] In the first aspect, a service pushing method applied to an electronic device is provided. In the case of meeting the condition (or the trigger condition corresponding to the preset scene) of triggering intention prediction, the electronic device can input first event data into a first intention prediction model, so that the first intention prediction model determines a first feature based on the first event data in combination with the behavior habits of multiple users. The first event data is generated based on user behavior.
[0006] Then, the electronic device can input the first feature and second event data into a second intention prediction model, so that the second intention prediction model performs intention prediction based on the second event data and the first feature in combination with the behavior habits of the user of the electronic device, obtains and outputs an intention prediction result.
[0007] Then, the electronic device can push corresponding services based on the intention prediction result.
[0008] In this application, when the conditions for triggering intent prediction are met, indicating that the electronic device needs to perform intent prediction, the electronic device can input first event data into a first intent prediction model. This allows the first intent prediction model to determine a first feature corresponding to the first event data based on the behavioral habits of a group of users. Subsequently, the electronic device can input the first feature and second event data into a second intent prediction model. This allows the second intent prediction model to perform intent prediction based on the second event data and the behavioral habits of the electronic device's users. The determined intent prediction result achieves collaborative prediction between the first and second intent prediction models, thereby integrating the behavioral habits of the group of users and adapting them to the individual behavioral habits of users on the electronic device side. This ensures the accuracy of intent prediction, thereby guaranteeing the accuracy of service delivery and a high-quality user experience.
[0009] Optionally, the second event data may overlap with the first event data. For example, the second event data and the first event data may contain the same event data. Or, the second event data and the first event data may contain event data whose occurrence time overlaps.
[0010] In one possible implementation, the intent prediction result includes the predicted intent and / or the probability corresponding to the predicted intent. After obtaining the intent prediction result, the electronic device, for each predicted intent, can determine whether the conditions for triggering service push corresponding to that predicted intent are met. If the conditions are met, it indicates that the user of the electronic device is more likely to use the service corresponding to the predicted intent; therefore, the electronic device can continue to push the service corresponding to that predicted intent. If the conditions are not met, it indicates that the user of the electronic device is less likely to use the service corresponding to the predicted intent; therefore, the electronic device can choose not to push the service corresponding to that predicted intent, thereby avoiding unnecessary service pushes.
[0011] The conditions for triggering the service push include one or more of the following: determining that the user of the electronic device is a user of the service corresponding to the predicted intent; determining that the user of the electronic device is a regular user of the service corresponding to the predicted intent; or determining that the probability of the predicted intent is greater than the probability threshold corresponding to the predicted intent.
[0012] In one possible design approach, the conditions for triggering the service push include determining that the user of the electronic device is a regular user of the service corresponding to the predicted intent. Accordingly, the electronic device determines whether the user is a regular user of the service corresponding to the predicted intent. Optionally, the electronic device can determine whether the user is a regular user of the service corresponding to the predicted intent based on the precision and recall rate of the predicted intent. Here, precision represents the ratio of the number of times the service corresponding to the predicted intent is pushed to the total number of times the service corresponding to the predicted intent is pushed. Recall represents the ratio of the number of times the service corresponding to the predicted intent is pushed to the total number of times the service corresponding to the predicted intent is used. Based on this, the precision and recall rate of the predicted intent are used to measure whether the user of the electronic device is a regular user of the predicted intent.
[0013] In one possible design approach, the probability threshold corresponding to the predicted intent is determined based on the usage frequency of the service corresponding to the predicted intent. Based on this, the probability threshold is dynamically adapted to avoid unnecessary service pushes.
[0014] In one possible design approach, the conditions for triggering intent prediction include the trigger conditions corresponding to the morning news scenario. Correspondingly, the intent prediction result includes the news intent.
[0015] Electronic devices can predict intent when the triggering conditions corresponding to the morning news scenario are met, in order to determine whether the morning news service needs to be pushed.
[0016] The triggering conditions for the morning news scenario include one or more of the following: the current time belongs to the preset time period corresponding to the morning news scenario; the target event corresponding to the morning news scenario is collected; the sleep end time is reached; the current time belongs to the time point corresponding to the timed trigger; or the historical occurrence time of the morning news scenario is reached. The target event corresponding to the morning news scenario indicates that, when the target event occurs, the electronic device has the potential to run the service corresponding to the morning news scenario.
[0017] In one possible design approach, the aforementioned first feature can represent the behavioral characteristics of a group of users related to the predicted news intent and / or the probability corresponding to the news intent output by the first intent prediction model.
[0018] Optionally, since the first intent prediction model can predict intent based on the first event data to obtain at least one predicted intent, the first feature may further include each predicted intent output by the first intent prediction model and its corresponding probability. The predicted intent includes news intent.
[0019] In one possible design approach, the aforementioned first intent prediction model is trained on a general intent prediction model based on first historical event data from multiple users, allowing the general intent prediction model to learn the behavioral habits of multiple users. The first historical event data is generated based on users' historical behavior. Based on this, the first intent prediction model can be based on a group of users.
[0020] The second intent prediction model is trained on an individual intent prediction model based on second historical event data from electronic devices and second features corresponding to third historical event data. This allows the individual intent prediction model to learn the user's behavioral habits based on the second historical event data and the second features. The second features are determined by the first intent prediction model based on the third historical event data and the behavioral habits of multiple users. There is overlap between the second and third historical event data. Based on this, the individual intent prediction model is personalized and adapted to the user's behavioral habits on the electronic device, thus determining the intent prediction model for personalized videos on the electronic device—the personalized intent prediction model.
[0021] Secondly, this application provides a model training method applied to electronic devices. The electronic devices can input third historical event data of the electronic devices into a first intent prediction model, so that the first intent prediction model can determine a second feature based on the third historical event data and the behavioral habits of multiple users.
[0022] Subsequently, the electronic device can train an individual intent prediction model based on the second feature and the second historical event data. This model, combined with the second feature, learns the user's behavioral habits. The second historical data and the third historical event data overlap, such as corresponding event data with the same occurrence time.
[0023] Subsequently, the electronic device can obtain a second intent prediction model based on the trained individual intent prediction model. This second intent prediction model is used to predict intent based on the event data of the electronic device.
[0024] In one possible design approach, the process of training an individual intent prediction model based on the second feature and second historical event data can include:
[0025] The electronic device can perform bucketing processing on the second historical event data based on a preset bucketing time to obtain at least one sample sequence. Each sample sequence includes at least one second historical event data.
[0026] Subsequently, for each sample sequence, the electronic device determines the label corresponding to the sample sequence. The label corresponding to the sample sequence represents information about the intended event that will actually occur in the future, given that the preceding event is the event indicated by the sample sequence.
[0027] Then, the electronic device can input each sample sequence, as well as the second feature and label corresponding to each sample sequence, into the individual intent prediction model to train the individual intent prediction model.
[0028] Based on this, electronic devices can add corresponding labels to training samples based on user behavior patterns, thereby achieving automatic and accurate label addition and ensuring training effectiveness.
[0029] In one possible design approach, the electronic device can train an individual intent prediction model when certain conditions for triggering training are met. This avoids consuming the device's resources during training, thus ensuring a better user experience. The conditions for triggering training include one or more of the following: the electronic device is in an idle state, the electronic device is in a black-screen state, or the electronic device is charging.
[0030] Thirdly, this application provides an electronic device, which includes a memory and one or more processors; the memory and the processors are coupled; the memory is used to store computer program code, which includes computer instructions; when the processor executes the computer instructions, the electronic device performs the service push method or model training method as described above.
[0031] Fourthly, this application provides a chip, the chip including a communication interface and at least one processor:
[0032] The communication interface is used for inputting and / or outputting signaling or data;
[0033] The at least one processor is used to execute a computer program to implement the service push method or model training method described above.
[0034] Fifthly, this application provides a computer-readable storage medium including computer instructions that, when executed on an electronic device, cause the electronic device to perform the service push method or model training method described above.
[0035] Sixthly, this application provides a computer program product that, when run on an electronic device, causes the electronic device to execute the service push method or model training method described above.
[0036] It is understood that the beneficial effects achieved by the method described in the second aspect, the electronic device described in the third aspect, the chip described in the fourth aspect, the computer-readable storage medium described in the fifth aspect, and the computer program product described in the sixth aspect can be referred to the beneficial effects in the first aspect and any of its possible design embodiments, and will not be repeated here. Attached Figure Description
[0037] Figure 1A A schematic diagram illustrating the generation of a device event, provided as an embodiment of this application;
[0038] Figure 1B A schematic diagram of an intent mapping provided for an embodiment of this application;
[0039] Figure 2 A schematic diagram illustrating a user behavior provided in an embodiment of this application;
[0040] Figure 3 A schematic diagram of an intent prediction process provided for an embodiment of this application;
[0041] Figure 4 A schematic diagram illustrating model determination provided for an embodiment of this application;
[0042] Figure 5 A schematic diagram of an intent prediction process provided in this application embodiment. Figure 2 ;
[0043] Figure 6A A schematic diagram of a service push scenario provided in an embodiment of this application;
[0044] Figure 6B This application provides an illustration of a service push scenario. Figure 2 ;
[0045] Figure 6C This application provides an illustration of a service push scenario. Figure 3 ;
[0046] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0047] Figure 8 A flowchart illustrating a service push method provided in this application embodiment;
[0048] Figure 9 A schematic diagram of the training process for an intent prediction model provided in this application embodiment;
[0049] Figure 10 A schematic diagram of a device event provided for an embodiment of this application;
[0050] Figure 11 A schematic diagram of a model structure provided for an embodiment of this application;
[0051] Figure 12 A schematic diagram of a model structure provided for an embodiment of this application. Figure 2 ;
[0052] Figure 13 A schematic diagram of a model structure provided for an embodiment of this application. Figure 3 ;
[0053] Figure 14 A schematic diagram of a model structure provided for an embodiment of this application. Figure 4 ;
[0054] Figure 15 A flowchart illustrating a service push method provided in this application embodiment. Figure 2 ;
[0055] Figure 16 A schematic diagram of sequence features provided in an embodiment of this application;
[0056] Figure 17 A schematic diagram of the training process for an intent prediction model provided in this application embodiment. Figure 2 ;
[0057] Figure 18 This is a schematic diagram of a label provided in an embodiment of this application. Detailed Implementation
[0058] To facilitate a clear description of the technical solutions in the embodiments of this application, the terms "exemplary" or "for example" are used in the embodiments of this application to indicate examples, illustrations, or explanations. Any embodiment or design scheme described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a specific manner. In the embodiments of this application, "at least one" refers to one or more, and "more" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. In the embodiments of this application, "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "multiple" means two or more.
[0059] To facilitate understanding of the solutions described in the embodiments of this application, a brief introduction to some of the technical names involved in this application will be given below.
[0060] Device events are events that describe device information collected by electronic devices. Device events can reflect user behavior. Specifically, during the use of an electronic device, user actions cause changes to the device's window content, network status, geographical location, motion status, etc., generating device events. One device event represents one occurring event. For example... Figure 1AAs shown, device events include window content change events, network status change events, geolocation change events, and motion status change events. Specifically, window content change events include third-party application events, such as the start or shutdown of a third-party application process, system application events, such as the start or shutdown of a system application process, and screen-on / off events. Network status change events (referred to as network events) include Wi-Fi status events, such as Wi-Fi access, Wi-Fi disconnection, Wi-Fi auto-connection on, and Wi-Fi auto-connection off, as well as cellular mobile network (such as 4G, 5G) and Bluetooth status events. Geolocation change events include: being in an elevator, being in a train car, being on a street, being in a restaurant, etc. Motion status change events (referred to as motion status events) include: walking, running, standing still, jumping, climbing stairs, etc.
[0061] Intent events: These are normalized device events corresponding to the same intent type, that is, unifying similar different device events into the same type of event. For example, device events include the device event corresponding to opening novel application 1 at time 1 and the device event corresponding to opening novel application 2 at time 2. Both of these events correspond to the novel / reading intent; therefore, both of these device events are normalized into novel / reading intent events (e.g., ...). Figure 1B As shown in the image, novel / reading intent events were collected at time 1 and at time 2. It's understandable that intent events are still device events and can still reflect user behavior.
[0062] Intent refers to a user's actual or potential needs. Intent is a classifier that categorizes user needs into different types, with different needs corresponding to different intent types. Fundamentally, the intent predicted by an electronic device enables it to infer the actions a user wants to perform or the services they need in the coming period—that is, to predict which device events the device will perform in the near future, thus allowing the device to decide how to push services.
[0063] Base station: The base station usually refers to a public mobile communication base station, which is a radio transceiver station set up by the network side of the mobile communication system to complete the transmission of radio signals between the network and mobile terminals.
[0064] Sector: A sector is a wireless signal coverage area emitted by a base station that covers a certain geographical area. It is a division of the wireless signal coverage area of the base station. Each sector uses one or more carrier frequencies with specific frequency points (carrier frequency refers to the frequency of the carrier that the base station has available, for example: N carriers, N=1, 3, 6, ...) to complete the coverage.
[0065] Cell: Also known as a cellular cell, ideally hexagonal in shape, it refers to the area covered by a base station or a portion of a base station (sector antenna) in a cellular mobile communication system, within which mobile stations can reliably communicate with the base station via a wireless channel. A cell is a logical concept under a sector; multiple cells can be defined within a single sector based on different carrier frequencies and scrambling codes; a single sector can correspond to multiple cells.
[0066] Geo-fencing is a virtual geographical boundary enclosed by a virtual fence. A geofence can include a geographical area covered by multiple preset base station cells and / or multiple preset wireless signals (e.g., Bluetooth, Wi-Fi). A geofence can be of any shape, such as a circle or a square. It should be noted that a geofence is not necessarily limited by the coverage area of Wi-Fi and / or Bluetooth signals; it can also be a geographical area defined by latitude and longitude. In this way, the mobile terminal can also determine whether it has entered a certain geographical area using the Global Positioning System (GPS). However, generally, the geofence described in this application is limited by the coverage area of Wi-Fi and / or Bluetooth signals. Therefore, compared to determining whether a mobile terminal has entered a certain geographical area using GPS, determining whether the mobile terminal has entered a certain geographical area using the identifiers of Wi-Fi and / or Bluetooth signals is more cost-effective.
[0067] The technical names involved in the embodiments of this application have been introduced above. The technical solutions involved in the embodiments of this application will be introduced below.
[0068] The process of users using electronic devices (such as mobile phones) generally follows a pattern. Taking the time from when a user wakes up until they arrive at work as an example, the process of a user using electronic devices is as follows: Figure 2As shown. First, upon reaching the user's set wake-up time, the electronic device's alarm rings to remind the user to get up. Then, the user watches short videos using a short video app or browses news using a news app. The user checks the weather using a weather app. Next, the user leaves home, and the electronic device leaves the home's geofence. After leaving home, the user connects Bluetooth headphones to the electronic device. Then, the user opens the electronic device's music app to play music using the Bluetooth headphones. Next, the user arrives at a subway station, and the electronic device's location is either the subway station or it enters the subway station's geofence. Then, the user opens the subway ride code to pay for transportation. Next, upon arriving at a subway station near the company, the user opens the subway station, and the electronic device leaves the subway station's geofence. Next, the user enters the company's geofence and opens the electronic device's check-in service to clock in. Next, when buying breakfast, the user opens the electronic device's payment app (i.e., an app with payment functionality) to use its payment functions, such as opening a payment code or scanning a QR code to pay. Finally, the user arrives at the company, and the electronic device connects to the company's Wi-Fi.
[0069] To better serve users, intent prediction models can be trained using user behavior data on electronic devices, i.e., device event data. This allows the intent prediction model to learn user behavior patterns, enabling it to predict user intent and accurately provide the services they need. These behavior patterns can be understood as the user's usage patterns. For example, as mentioned above... Figure 2 The example shown illustrates the process from when a user wakes up until they arrive at the office. After the alarm rings, the electronic device, based on a trained intent prediction model and user usage patterns, predicts that the user's next intention is to read news. The device can then offer a morning news service, pushing news to the user so they can quickly browse the news without having to launch the news app, thus reducing hassle. Furthermore, if the device predicts the user's next intention is to watch short videos, it can push short video services, such as displaying a quick access link for the service, or pre-loading short video apps. This pre-loaded app significantly reduces the time it takes for the device to launch short videos when the alarm rings, thus shortening the user's waiting time.
[0070] In some embodiments, the intent prediction model described above is deployed directly on the electronic device, i.e., on the edge. The electronic device records user behavior data, that is, collects device events. The electronic device then uses this device event data as training sample 1. Subsequently, the electronic device uses this training sample 1 to train the intent prediction model, so that the trained intent prediction model can be used for intent prediction. In one case, there are multiple intent prediction models, and different intent prediction models are used to predict corresponding types of intents. For example, see... Figure 3 The intent prediction model includes a payment intent prediction model and a music listening intent prediction model. Electronic devices use collected payment events to train the payment intent prediction model, which then predicts whether a user has a payment intent. If the model predicts a payment intent, it pushes a payment code. Here, a payment event represents a device event indicating that the electronic device has performed a payment action.
[0071] Furthermore, electronic devices use collected music playback events to train a music listening intent prediction model. This trained model then predicts whether a user intends to listen to music, and if so, launches the music application. It is understood that when training the music intent prediction model, training sample 1 can include not only payment events but also device events collected within a period prior to the payment event. Similarly, when training the payment intent prediction model, training sample 1 can include not only music playback events but also device events collected within a period prior to the music playback event.
[0072] In another scenario, there is only one intent prediction model. This model can predict different categories of intents, essentially integrating the intent prediction models corresponding to the different intent types described above into a single model. For example, this model can predict payment intent and music listening intent.
[0073] However, training sample 1 relies solely on individual user device events, limiting the learning ability of the intent prediction model and impacting its training efficiency and accuracy. For instance, a user might open a subway QR code upon arriving at a subway station, but the number of times a user rides the subway each day is limited, say twice. It would take a considerable amount of time to collect enough device events reflecting this behavior to learn the intent prediction model's pattern of opening the QR code at subway stations, resulting in prolonged training time and low training efficiency. Similarly, if user A rarely performs a certain action, their electronic device collects few device events related to that action, making it difficult for the intent prediction model to predict the corresponding intent. For example, if user A has never worn Bluetooth headphones before, training sample 1 used to train the intent prediction model does not include device events related to playing music with Bluetooth headphones. Therefore, after user A's electronic device is first connected to the Bluetooth headset, the intent prediction model does not have prior knowledge of the behavioral patterns of using the Bluetooth headset to play music. As a result, the intent prediction model does not need to predict that the user has the intention to listen to music, which limits the prediction of intent and reduces the accuracy of the intent prediction model in predicting intent.
[0074] In addition, due to the limitations of the processing power of electronic devices (i.e., the device side), the size of the model deployed on the device side is limited. Therefore, the training accuracy of the intent prediction model on the device side is limited, which affects the accuracy of intent prediction in the intent prediction mode.
[0075] Therefore, to address the above problems, this application provides a cloud-based collaborative training solution. For example... Figure 4 As shown, firstly, the cloud utilizes historical device event data from a group of users—that is, different users—to train a general intent prediction model. This allows the general intent prediction model to learn common behavioral patterns of the group of users, capturing common usage patterns and obtaining a target general intent prediction model. Then, the cloud can distill this target general intent prediction model to obtain a lightweight predictor suitable for edge deployment. To further improve the model's prediction accuracy, such as... Figure 4As shown, electronic devices can input personal device event data collected at the device side into a distilled target general intent prediction model to obtain corresponding inference results. Then, the electronic device can input the inference results and personal device event data into a smaller model (such as a tree model) to train an initial personalized prediction model, achieving personalized adaptation and obtaining a target intent prediction model. This target intent prediction model can also serve as a personalized intent prediction model, which can more accurately predict the user's intent at the device side. After obtaining the personalized intent prediction model, the electronic device can use it in conjunction with the distilled target intent prediction model to perform inference, obtaining intent prediction results. This allows the electronic device to accurately provide corresponding services based on the intent prediction results, improving user satisfaction. The intent prediction results include the predicted intent.
[0076] Using the timeframe from when a user wakes up until they arrive at the company as an example, this section describes the process of using a personalized intent prediction model for intent prediction. Figure 5 As shown, after the alarm clock rings in the morning, the electronic device collects alarm clock event data and inputs this data into a personalized intent prediction model. The personalized intent prediction model outputs intent prediction result 1. Intent prediction result 1 includes the predicted intent 1. Intent 1 includes news intent, weather check intent, and short video intent. Afterwards, the electronic device runs a morning news service, pushing news hotspots (such as...) Figure 6A The top 10 trending news searches shown are displayed, and electronic devices push weather information (such as...). Figure 6A (See weather alert 11). Afterwards, the user views relevant news hotspots through news trending topics 10 and checks the weather through weather alert 11. Similarly, after collecting event data from other devices, the electronic device can input this event data into a personalized intent prediction model, so that the model can provide corresponding services based on the intent prediction results. For example, after the electronic device disconnects from its home Wi-Fi, it leaves its home's geofence. The electronic device inputs the geofence-leaving event data into the personalized intent prediction model. The personalized intent prediction model outputs intent prediction result 2. Intent prediction result 2 includes the predicted intent... Figure 2 The meaning of this prediction Figure 2This includes intents related to subway travel, driving, and ride-hailing. The electronic device pushes subway service, driving service, and ride-hailing service offers. Then, the electronic device connects to Bluetooth headphones. The collected Bluetooth connection event data is input into a personalized intent prediction model to obtain the intent to listen to music. Based on this intent, the electronic device can pre-launch a music application, allowing the user to directly play music and reducing waiting time. Next, the electronic device enters the geofence of a subway station. The geofence event data is input into the personalized intent prediction model to obtain the subway intent. The electronic device can then push subway ride codes (such as...) Figure 6B As shown, the YOYO suggestion pushes the subway ride code 12, enabling subway service notifications. When a user needs to scan the code, they can click on the subway ride code 12, and the electronic device displays as shown below. Figure 6B The subway transit code 13 shown is used for quick display of the subway transit code. Afterwards, the electronic device leaves the subway station's geofence. Then, the electronic device enters the company's geofence, and the event data of entering the company's geofence is input into the personalized intent prediction model to obtain the check-in intent and payment intent. The electronic device then pushes check-in services (e.g., providing...) Figure 6C The quick access entry 14 for the check-in application shown allows users to quickly launch the application and complete check-ins, as well as push payment services (e.g., providing...). Figure 6C The quick access entry 15 for the payment code and the quick access entry 16 for the scan function of Application 1, as shown, allow users to click on the quick access entry 15 when they want to pay with the payment code, and the electronic device will display the payment code of Application 1. Alternatively, users can click on the quick access entry 16 for the scan function when they want to pay with the scan code, and the electronic device will activate the scan function of Application 1 to achieve quick scan.
[0077] It should be understood that the above Figures 6A-6C The example shown is just one instance of a predictive intent-based push service; other methods, such as... Figure 6A The top 10 trending news searches shown is just one example of a news push service; news pushes can also be achieved through methods such as preloading news apps. For example, Figure 6A The weather alert shown in Figure 11 is just one example; weather services can also be pushed through methods such as preloading weather apps.
[0078] For example, the electronic device may be a mobile phone, wearable device (such as a smartwatch or smart bracelet), tablet computer, desktop computer, laptop computer, handheld computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, as well as mobile terminals such as cellular phone, personal digital assistant (PDA), and media player. The embodiments of this application do not impose any special restrictions on the specific form of the electronic device.
[0079] For example, Figure 7 A schematic diagram of the structure of electronic device 200 is shown. For example... Figure 7 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 211, a power management module 212, a battery 213, an antenna 1, an antenna 2, a mobile communication module 240, a wireless communication module 250, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, a headphone jack 270D, a sensor module 280, buttons 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.
[0080] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0081] Processor 210 may include one or more processing units, such as an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU). These different processing units may be independent devices or integrated into one or more processors.
[0082] The controller can be the nerve center and command center of the electronic device 200. The controller can generate operation control signals based on the instruction opcode and timing signals to control the fetching and execution of instructions.
[0083] The processor 210 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. This memory can store instructions or data that the processor 210 has just used or that are used repeatedly. If the processor 210 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.
[0084] In some embodiments, the processor 210 may include one or more interfaces. Interfaces 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, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0085] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 200. In other embodiments of this application, the electronic device 200 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.
[0086] The charging management module 211 receives charging input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 211 receives charging input from the wired charger via a USB interface 230. In some wireless charging embodiments, the charging management module 211 receives wireless charging input via the wireless charging coil of the electronic device 200. While charging the battery 213, the charging management module 211 can also supply power to the electronic device via the power management module 212.
[0087] The wireless communication function of electronic device 200 can be implemented through antenna 1, antenna 2, mobile communication module 240, wireless communication module 250, modem processor, and baseband processor.
[0088] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 200 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with a tuning switch.
[0089] The mobile communication module 240 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 200. The mobile communication module 240 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 240 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 240 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 240 may be housed in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 240 and at least some modules of the processor 210 may be housed in the same device.
[0090] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates 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 processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through an audio device (not limited to speaker 270A, receiver 270B, etc.) or displays images or videos through the display screen 294. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 210 and may be housed in the same device as the mobile communication module 240 or other functional modules.
[0091] The wireless communication module 250 can provide solutions for wireless communication applications on the electronic device 200, including wireless local area networks (WLAN) (such as wireless fidelity (WIFI) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 250 can be one or more devices integrating at least one communication processing module. The wireless communication module 250 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 210. The wireless communication module 250 can also receive signals to be transmitted from processor 210, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.
[0092] Electronic device 200 implements display functions through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 210 may include one or more GPUs, which execute program instructions to generate or modify display information.
[0093] The display screen (or screen) 294 is used to display images, videos, etc. The display screen 294 includes a display panel. The display panel may be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLED, a Micro-OLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include one or N displays 294, where N is a positive integer greater than 1.
[0094] The external storage interface 220 can be used to connect an external storage card, such as a Micro SD card, to expand the storage capacity of the electronic device 200.
[0095] Internal memory 221 can be used to store computer executable program code, which includes instructions. Processor 210 executes various functional applications and data processing of electronic device 200 by running the instructions stored in internal memory 221. Internal memory 221 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 200 (such as audio data, phonebook, etc.). Furthermore, internal memory 221 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc.
[0096] Electronic device 200 can implement audio functions such as music playback and recording through audio module 270, speaker 270A, receiver 270B, microphone 270C, headphone jack 270D, and application processor.
[0097] Button 290 includes a power button, volume buttons, etc. Button 290 can be a mechanical button or a touch button.
[0098] Indicator 292 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.
[0099] The sensor module 280 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, accelerometers, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, etc.
[0100] As mentioned earlier, during the use of the aforementioned electronic devices, user behavior causes changes in the window content, network status, geographical location, motion status, and device status, generating device events. Device events, ordered chronologically, reflect user behavior patterns, i.e., usage patterns. However, due to the limited nature of individual user device event data, and considering that behavioral patterns may be general (e.g., most users habitually browse news after an alarm rings, or open a subway QR code to ride the subway after entering a subway area), to improve training efficiency, the cloud can train a general intent prediction model using device event data from a group of users. This allows the general intent prediction model to discover common behavioral patterns among the group's users, resulting in a target general intent prediction model capable of accurate intent prediction. Simply put, there may be causal relationships between device events; some device events may lead to others. The general intent prediction model discovers these causal relationships, enabling the target general intent prediction model to predict the resulting events on the electronic device based on the causal events that have already occurred, outputting the intent prediction result. Subsequently, the cloud can simplify the general target intent prediction model to obtain a target intent prediction model, thereby improving prediction speed. The cloud can then deploy this target intent prediction model on the electronic device side, enabling the device to use it for reasoning and output the predicted intent. This provides a reference for the electronic device, allowing it to offer push services related to the predicted intent, enabling users to quickly access these services.
[0101] The following is combined Figure 8 This section describes the process by which electronic devices use a target intent prediction model to perform inference in order to provide the aforementioned morning news service.
[0102] S301, Electronic devices receive target intent prediction models sent from the cloud. These target intent prediction models are used to predict user intent based on learned behavioral patterns of a group of users. The target intent prediction model includes a mapping layer, a change module, an intent attention network layer, and a prediction layer 1.
[0103] Among them, such as Figure 8As shown, the target intent prediction model includes an embedding layer, a transformer block, an intent attention network layer, and a prediction layer 1. The embedding layer, transformer block, intent attention network layer, and prediction layer 1 are connected sequentially.
[0104] The embedding layer maps device event data into an initial vector of predefined dimension 1, representing the meaning of the device event data numerically. The device event data includes the device event itself and its corresponding spatiotemporal information. The spatiotemporal information includes the time and location of the event.
[0105] For example, the embedding layer maps device events to initial vectors of a preset dimension of 2, so as to represent the device event using the initial vectors corresponding to the device events. The embedding layer converts the occurrence time of the device event into an initial vector of a preset dimension of 3, so as to represent the occurrence time using the initial vectors. And the embedding layer maps the occurrence location of the device event to an initial vector of a preset dimension of 4, so as to represent the occurrence location using the initial vectors.
[0106] Subsequently, the embedding layer determines the initial vector corresponding to the device event data based on the initial vector corresponding to the device event, the initial vector corresponding to the occurrence time of the device event, and the initial vector corresponding to the occurrence location of the device event. This can be achieved by concatenating the initial vectors corresponding to the device event, the occurrence time, and the occurrence location, or by adding these three initial vectors together.
[0107] Optionally, the occurrence time can include the moment of occurrence and the date of occurrence. The date of occurrence can be calculated on a weekly basis, such as the first day of the week, or it can include weekdays (Monday to Friday) and non-weekdays (Saturday and Sunday). Accordingly, the embedding layer maps the moment of occurrence to an initial vector corresponding to the moment of occurrence, and maps the date of occurrence to an initial vector corresponding to the date of occurrence.
[0108] Among them, preset dimension 2, preset dimension 3, and preset dimension 4 can be the same or different. However, generally speaking, preset dimension 2, preset dimension 3, and preset dimension 4 are the same.
[0109] In addition, preset dimension 1 can be the same as or different from preset dimension 2, preset dimension 3, and preset dimension 4.
[0110] Optionally, the above-mentioned location indicates the identifier of the community, or the location indicates specific latitude and longitude, etc.
[0111] Specifically, the embedding layer can first convert device event data into identifiers according to preset conversion rules, and then map these identifiers to the corresponding initialization vectors of the device event data. For example, the preset conversion rules define identifiers for different device events, such as the identifier 2 for an alarm clock ringing event and the identifier 5 for a geofence event entering a subway station. In addition, the preset conversion rules can also define how to map the occurrence time to identifiers, and how to map the occurrence location to identifiers.
[0112] In some embodiments, the embedding layer can perform bucketing of occurrence times according to preset conversion rules to map occurrence times to identifiers. For example, a day (i.e., 24 hours) can be divided into 30-minute intervals to obtain 48 intervals, in order to determine the interval to which the occurrence time belongs and the identifier corresponding to the interval to which the occurrence time belongs.
[0113] The above article introduced the role of the embedding layer. The following article will continue to introduce the content about the change module.
[0114] The transformation module processes the initial vector corresponding to the device event data to obtain vector 1 with a preset dimension of 5. Compared to the initial vector, vector 1 better expresses the correlation between device events and their corresponding spatiotemporal information, and it more accurately represents the device event data. For example, the transformation module can modify the initial vector corresponding to the device event data based on learned user behavior patterns, such as the historical behavior before and after the device event data within those patterns, i.e., the historical device event data situation. This modification ensures that vector 1 accurately reflects the specific behavior corresponding to the device event data.
[0115] For example, when an app launches, its name might be "Name A," but Name A could have other meanings, such as being a fruit name. Correspondingly, the device event data for this app launch is mapped by the embedding layer to "Name A" of type "fruit name," such as (1,1,1). However, after correction by the transformation module, the vector 1 corresponding to this device event data (such as (1,2,1)) can express the app launch, thus ensuring the accuracy of intent prediction.
[0116] For example, the aforementioned preset intents include one or more of the following intent types: long video intent, music listening intent, photo taking intent, weather check intent, note taking intent, exercise intent, shopping intent, meeting intent, audio-visual editing intent, food delivery intent, novel / reading intent, express delivery intent, ride-hailing intent, driving intent, subway intent, news intent, short video intent, game intent, learning and education intent, audiobook & podcast intent, and renting / buying a house intent. Of course, the intent types listed here are merely examples; the specific intents included in the preset intents can be set according to needs, and this application does not limit them. For instance, the intent types listed here do not include short video intent and news intent, but include entertainment intent; simply put, entertainment intent includes short video intent and news intent.
[0117] In summary, the initial vector corresponding to the device event data output by the above embedding layer is essentially randomly initialized, and it may not accurately represent the true meaning of the corresponding device event data. Therefore, it is necessary to use the change module to further correct this initial vector.
[0118] The behavioral patterns of the group of users learned by the aforementioned change module can be learned during the training phase. For details, please refer to the following description of the training process of the general intent prediction model using historical device event data.
[0119] The preset dimension 5 is less than the preset dimension 1 mentioned above. In other words, the change module will perform dimensionality reduction processing on the initial vector corresponding to the device event data.
[0120] The above has introduced the role of the change module. The following will continue to introduce the content about the intent attention network layer.
[0121] The aforementioned intent attention network layer is used to calculate the similarity between vector 1 corresponding to the device event data output by the change module and the target intent prediction vector corresponding to each preset intent, thereby determining the probability corresponding to each preset intent and outputting the probability corresponding to each preset intent. The target intent prediction vector corresponding to the preset intent is obtained by training the initial intent prediction vector corresponding to the preset intent based on historical device event data. For details, please refer to the following description of the training process of the general intent prediction model using historical device event data.
[0122] The role of the intention attention network layer has been introduced above. The following section will continue with the content about prediction layer 1.
[0123] Prediction layer 1 is used to filter the probabilities corresponding to each preset intent based on the output of the intent attention network layer, to obtain the intent prediction result. The intent prediction result may include the predicted intent. Optionally, the intent prediction result may include the predicted intent and the probability corresponding to each predicted intent. The probability corresponding to the predicted intent represents the probability that the predicted intent will occur. The higher the probability that the predicted intent will occur, the higher the probability that the user behavior corresponding to the predicted intent will appear.
[0124] The above describes the model deployed on the device side. After deploying this model, electronic devices will push corresponding services after collecting device event data. The following uses the collection of an alarm clock ringing event as an example to illustrate the service push process.
[0125] S302. When the alarm clock rings, the electronic device collects alarm clock ringing event data. The alarm clock ringing event data includes the alarm clock ringing event and the corresponding spatiotemporal information.
[0126] The spatiotemporal information corresponding to the alarm ringing event includes the time and location of the alarm ringing event. The alarm ringing event may include user identifier us_id, data item number item_type_id, event collection time event_time, event content content, data item event item_event, and event collection date event_datatime, etc.
[0127] The user identifier us_id is used to distinguish different users. That is, the user identifier us_id of the device events corresponding to the same user is the same, while the user identifier us_id of the device events corresponding to different users is different.
[0128] The item number (item_type_id) refers to the number of each device event. The item number (item_type_id) is different for different device events.
[0129] The data item event (item_event) represents the specific event type of the device event, as shown below. Figure 10 The types shown include screen on / off, geofence trigger (leaving the geofence, entering the geofence), application opening, application opening and exiting, subway QR code (i.e., subway ride code) opening, and motion status.
[0130] The event content is unique to device events of different event types. The event content includes multiple fields and their corresponding values, meaning it contains multiple feature data items. The number and specific values of the feature data may differ between different event content types.
[0131] The event acquisition time (event_time) represents the time when the device event was acquired, that is, the time when the device event occurred. The event acquisition time can be the same as or different from the occurrence time of the corresponding device event.
[0132] The event collection date (event_datatime) represents the date on which the device event was collected. The event collection time can be the same as or different from the occurrence time of the corresponding device event.
[0133] It is understood that the fields, i.e. data items, included in the alarm clock ringing event listed above are only one example of the data items included in a device event. A device event may include only some of the data items listed above, or it may include more data items. This application does not limit this.
[0134] The above provides a brief overview of alarm clock ringing events, which are the components of device events. For more details on device events, please refer to the section on historical device events discussed during the training phase.
[0135] S303. When the electronic device determines that the alarm clock ringing event is a preset triggering event, it inputs the alarm clock ringing event data into the target intent prediction model.
[0136] Among them, the preset trigger event refers to the device event that triggers the target intent prediction model to predict intent.
[0137] In this embodiment, after collecting device event data, such as alarm clock ringing event data, the electronic device determines whether the alarm clock ringing event belongs to a preset trigger event. If the alarm clock ringing event belongs to a preset trigger event, indicating that reasoning needs to be performed using the target intent prediction model, the electronic device inputs the alarm clock ringing event data into the target intent prediction model for intent prediction.
[0138] In addition, if the alarm ringing event is not a preset trigger event, it indicates that there is no need to use the target intent prediction model for reasoning. In this case, the electronic device can continue to collect device event data without inputting the alarm ringing event into the target intent prediction model.
[0139] It should be noted that the above-mentioned determination of whether the alarm ringing event belongs to the preset trigger event is only one example of the triggering conditions for the electronic device to use the target intent prediction model to predict intent. The electronic device can also determine whether to use the target intent prediction model to predict intent through other triggering conditions, such as the current time falling within the preset triggering time period corresponding to the intent that the target intent prediction model can predict, the time fence corresponding to the triggering intent, timed triggering, the current time falling within the historical behavior occurrence time, etc. For specific triggering conditions, please refer to the relevant introduction to the triggering conditions corresponding to the morning report intent (or alternatively described as the morning report scenario) below.
[0140] When the current time falls within a fixed trigger time, the intent prediction model is used to predict the intent. In other words, when the electronic device meets preset trigger conditions, the currently collected device event data is input into the target intent prediction model. These preset trigger conditions include either the device event in the currently collected device event data being a preset trigger event, or the current time falling within a preset trigger time.
[0141] In some embodiments, when a preset triggering condition is met, the electronic device can not only input the currently collected device event data (such as the alarm clock ringing event data mentioned above) into the target intent prediction model, but also input the device event data within a time period 1 before the currently collected device event data into the target intent prediction model.
[0142] Optionally, the device event data within a duration of 1 preceding the currently collected device event data can be read from a cache queue. After collecting device event data, the electronic device can insert the device event data into the event cache queue. The cache queue is checked if the time difference between the event collection time of the device event data at the head of the queue and the event collection time of the device event data at the tail of the queue is greater than a duration of 1. Here, the device event data at the head of the queue refers to the earliest inserted device event data, and the device event data at the tail of the queue refers to the latest inserted device event data.
[0143] Optionally, after a device event is collected, the electronic device can perform a cleaning process on the device event. This cleaning process may include removing unnecessary field information from the device event, and / or discarding the device event if it is deemed unnecessary, thereby avoiding interference from irrelevant field information or irrelevant device events with the intended prediction. The unnecessary fields refer to information about fields other than the preset fields corresponding to the event type of the device event (i.e., fields and field values, i.e., feature data). The unnecessary device event refers to the device event corresponding to the preset event type. The specific process for cleaning device events can be found in the process of cleaning historical device events described below.
[0144] In some embodiments, after collecting a device event (such as the alarm clock ringing event mentioned above), the electronic device can determine whether it needs to map the device event to an intent event. After mapping the device event to an intent event, the electronic device can input the intent event into the target intent prediction model. The process by which the electronic device determines whether it needs to map the device event to an intent event can be referred to the mapping process of relevant intent events in the training phase below.
[0145] S304. The embedding layer in the target intent prediction model maps the alarm ringing event data into the initial vector corresponding to the alarm ringing event data, and outputs the initial vector corresponding to the alarm ringing event data.
[0146] The process of mapping alarm ringing event data into corresponding initial vectors can be referred to in the previous section on mapping device event data into corresponding initial vectors in the embedding layer, and will not be repeated here.
[0147] S305. The block module in the target intent prediction model processes the initial vector corresponding to the alarm ringing event data to obtain vector 1 corresponding to the alarm ringing event, and outputs vector 1 corresponding to the alarm ringing event. This vector 1 represents the specific meaning of the alarm ringing event data.
[0148] For example, the processing in S305 above includes correlation processing and / or correction processing to adjust the initial vector corresponding to the alarm ringing event data. Taking the processing including correlation processing and correction processing as an example, the block module performs comprehensive processing on the initial vector based on the alarm ringing event and the spatiotemporal information corresponding to the alarm ringing event, so as to enhance the correlation between the alarm ringing event and the spatiotemporal information corresponding to the alarm ringing event.
[0149] Furthermore, the block module corrects the initial vector corresponding to the alarm ringing event based on the learned group behavior patterns, such as the historical behaviors before and after the alarm ringing event (i.e., behaviors that occurred before the alarm ringing and behaviors that occurred after the alarm ringing). In simple terms, it uses the historical device events before and after the alarm ringing event to correct the alarm ringing event so that vector 1 can more accurately represent the alarm ringing event.
[0150] S306. The Intent Attention Network layer obtains the probability of each preset intent based on the similarity between the vector 1 corresponding to the alarm clock ringing event and the target intent prediction vector corresponding to the preset intent, and outputs the probability of each preset intent.
[0151] In S306, the probability corresponding to the preset intention represents the probability that the preset intention will occur at the next moment in the event of an alarm clock event.
[0152] In the inference phase, the process by which the intent attention network layer determines the probability of the preset intent based on vector 1 and the target intent prediction vector can be found in the section below on determining the probability of the preset intent by the intent attention network layer during the training phase.
[0153] S307. Prediction layer 1 outputs intention prediction result 1 based on the probability corresponding to each preset intention.
[0154] The intention prediction result 1 may include the predicted intention 1 mentioned above. This predicted intention 1 represents a preset intention with a probability greater than a preset probability 1. For example, for each preset intention, prediction layer 1 can determine whether the probability corresponding to that preset intention is greater than the preset probability 1. If the probability corresponding to the preset intention is greater than the preset probability 1, prediction layer 1 can use that preset intention as the predicted intention 1. If the probability corresponding to the preset intention is less than or equal to the preset probability 1, prediction layer 1 will not use that preset intention as the predicted intention 1.
[0155] Optionally, the intent prediction result 1 may further include the predicted intent 1 and the probability corresponding to each predicted intent 1. The probability corresponding to the predicted intent 1 represents the probability that the predicted intent 1 may occur, so the electronic device can further determine whether to provide the corresponding service based on the probability corresponding to the predicted intent 1. For example, if the probability corresponding to the predicted intent 1 is greater than a preset probability value 2, it indicates that the predicted intent 1 has a high probability of occurring, and the electronic device can provide the corresponding service based on the predicted intent 1, improving the accuracy of service push. If the probability corresponding to the predicted intent 1 is less than or equal to the preset probability value, it indicates that the predicted intent 1 has a low probability of occurring, and the electronic device may not provide the service corresponding to the predicted intent 1, avoiding providing unnecessary services, reducing the resource consumption of unnecessary services on the electronic device, and avoiding interference with the user.
[0156] For example, intention prediction result 1 includes news intention, weather check intention, and short video intention, with a probability of 0.5 for news intention, 0.4 for weather check intention, and 0.2 for short video intention. The electronic device determines that the probability of news intention and weather check intention are both greater than the preset probability value 2, and the probability of short video intention is less than the preset probability value 2. Therefore, the electronic device provides news services (such as morning news) and weather services, but not short video services.
[0157] S308. The electronic device recommends corresponding services based on the intent prediction result 1 output by the target intent prediction model and in combination with preset recommendation rules.
[0158] Since the target intent prediction model in this application outputs the intent, rather than the specific launch of XX application / XX interface, the electronic device needs to use preset recommendation rules to push the service corresponding to the predicted intent 1.
[0159] In one scenario, preset recommendation rules indicate recommended services based on user habits. For example, if the predicted intent 1 includes a payment intent, and the electronic device has applications with payment functionality installed, then the electronic device can determine the user's frequently used applications with payment functionality based on the user's habits, and prioritize displaying the payment code (or payment code) corresponding to those applications to facilitate user use.
[0160] In another scenario, preset recommendation rules indicate application-based priority recommendation services. Taking the predicted intent 1, which includes a payment intent, as an example, different applications with payment functions have corresponding priorities. An electronic device has applications A and B installed, both of which have payment functions. Application A has a higher priority than application B; therefore, the electronic device can prioritize recommending the payment code corresponding to application A. The application priorities are set by the user or by the electronic device manufacturer based on business needs; this application does not restrict these settings.
[0161] In some embodiments, electronic devices can push services to users through one or more push formats, providing quick access to services and ensuring that information effectively reaches users. For example, push formats include cards, icons, capsules, etc. Taking a payment service as an example, cards and capsules can display text content related to the payment service (such as displaying key information about the payment service) or graphic icons (identifying graphic icons related to the payment service, such as the icon of a payment application).
[0162] Optionally, the aforementioned cards can be displayed on the main interface, the -1 screen, the always-on display (AOD) interface, the lock screen, the notification bar, and other application interfaces. It should be understood that the AOD interface refers to the interface displayed on an electronic device with AOD enabled after the screen is locked or turned off. Cards displayed on the AOD interface can be called AOD cards, and users can view information pushed by the electronic device through these cards when the device is locked.
[0163] The aforementioned graphic icons can display graphic symbols related to the payment service. For example, the icon could be an application icon that provides payment services.
[0164] The capsules described above can be displayed on any display interface. Optionally, the capsules may include status bar capsules and floating capsules.
[0165] In other embodiments, the electronic device may also preload the application corresponding to the predicted intent 1 to enable service push and shorten the time users wait for the application to start.
[0166] It is understandable that during the inference phase, the operations performed by the target intent prediction model in the electronic device, such as the operations performed by the mapping layer, change module, intent attention network layer, and prediction layer 1 in the target intent prediction model, are actually still operations performed by the electronic device.
[0167] The preceding section introduced the process of reasoning using a target intent prediction model. This target intent prediction model is obtained by training a general intent prediction model. The training process of the aforementioned general intent prediction model can be executed in the cloud. The following section will further describe the cloud-based training process of the general intent prediction model. For example, ... Figure 9 As shown, the training process can be as follows:
[0168] S401. For each electronic device in electronic devices 1-N, the electronic device performs cleaning processing on the collected historical device events to obtain the cleaned historical device events corresponding to the electronic device.
[0169] For example, the above cleaning process may include: the electronic device discarding the historical device events corresponding to the preset event type in the historical device events (in other words, retaining the required historical device events), and / or removing information fields other than the preset fields corresponding to the event type of the historical device event in the historical device events (in other words, retaining the required fields), to obtain the cleaned historical device events, thereby reducing the processing volume in the cloud and reducing the impact of irrelevant time or fields on training.
[0170] For example, such as Figure 10 The subway fence trigger events shown in the multiple historical device events include city and station fields. However, user behavior at subway stations is generally consistent across all subway stations, not specific to any particular station. For example, a user opening the subway QR code after entering a subway station is a common action at any subway station, not just at a specific one. Therefore, the city field can be removed from the subway fence trigger events. It should be understood that... Figure 10 Each row of data in the table represents a historical device event.
[0171] In some embodiments, the aforementioned historical device events refer to historical device events collected by the electronic device before the deployment of the aforementioned target intent prediction model. The collection of these historical device events is triggered by the cloud. The cloud sends a sampling task to the electronic device, which describes the sampling object. For example, if the sampling object is a network state change event, then the electronic device only collects network state change events. Alternatively, the sampling task also describes the start and end times of the sampling task. Upon receiving the sampling task, the electronic device collects device events at the start time of the sampling task and stops collecting device events at the end time of the sampling task. Alternatively, the collection of historical device events is automatically triggered by the electronic device. The electronic device can trigger the collection of event streams and the sending of event streams to the cloud within a preset time period, such as the period after network connection, the sleep period, the charging and screen-off period, or the user's rest period (e.g., 2:00-5:00).
[0172] The aforementioned historical device events were determined based on log records.
[0173] S402. For each cleaned historical device event corresponding to the electronic device, if the name of the application in the cleaned historical device event belongs to a preset name set, the electronic device maps the cleaned historical device event to an intent event.
[0174] The preset name set includes one or more preset application names. Each preset name set has a corresponding intent, that is, a corresponding intent type. For example, in this embodiment, the electronic device can determine whether the application name in the cleaned historical device events belongs to any preset name set. If it does, it indicates that the cleaned historical device event can be mapped to an intent event corresponding to the intent type of the preset name set to which the application name belongs, thus achieving intent mapping. This intent event also represents user behavior, that is, it is also a specific device event, but different device events are normalized into one type of device event. For example, compared to a historical device event indicating opening application 1, the intent event obtained by mapping the intent of this historical device event has different field values from the data item event of the historical device event, while the rest of the content can be the same. For example, the historical device event indicates opening application 1, while this intent event indicates a short video intent.
[0175] Additionally, if the application name in the cleaned historical device event does not belong to all preset name sets, the electronic device does not need to map the cleaned historical device event to an intent event.
[0176] Optionally, the name of the application can be the application's package name (packName), such as... Figure 10The application shown has the package name "com.XX".
[0177] It should be noted that if the cleaned historical device event does not have an application name, the electronic device can determine whether to map the cleaned historical device event as an intent event based on the fact that the application name of the cleaned historical device event does not belong to all preset name sets.
[0178] In some embodiments, mapping cleaned historical device events to intent events by application name is only one possible implementation of mapping cleaned historical device events to intent events. Other implementations can also be used to map cleaned historical device events to intent events, such as mapping the cleaned historical device events to intent events corresponding to the intent type corresponding to the preset field when the cleaned historical device events include preset fields.
[0179] In this embodiment, the electronic device normalizes similar historical device events to map them to intent events, thereby increasing the accumulation speed of device events corresponding to similar intent types. This, in turn, improves the accumulation speed of training sample 1 when using historical device events as training sample 1. Furthermore, since intents better align with general behavioral patterns, it facilitates the learning of user behavior patterns by the general intent prediction model. For example, regardless of whether a user opens "XX Novel" or "XX Reading," it essentially means opening a novel / reading application, enabling the general intent prediction model to learn that the user has a need to open the novel / reading application.
[0180] S403. The electronic device sends historical event data to the cloud. This historical event data includes historical events and their corresponding spatiotemporal information. Historical events include the aforementioned intent events and cleaned historical device events that were not mapped to intent events.
[0181] The spatiotemporal information corresponding to the aforementioned historical events includes the time and location of the events. For descriptions of the events and their locations, please refer to the preceding text.
[0182] In this embodiment of the application, as described above, for each cleaned historical device event, if the name of the application in the cleaned historical device event belongs to any preset name set, the cleaned historical device event is mapped to an intent event, and the electronic device can treat the intent event as a historical event. If the name of the application in the cleaned historical device event does not belong to all preset name sets, it is not necessary to map the cleaned historical device event to an intent event, and the electronic device can directly treat the cleaned historical device event as a historical event.
[0183] Optionally, the aforementioned historical event data may also include only intent event data, or only cleaned historical device event data that has not been mapped to intent events. In other words, all cleaned historical device event data has not been mapped to intent event data.
[0184] It should be noted that the historical device event cleaning process described in S401 above is an optional step. The operation performed on the cleaned device events is changed to directly operating on the historical device events. For example, mapping the cleaned historical device events to intent events is changed to mapping the historical device events to intent events. Accordingly, the historical events include the intent. Furthermore, mapping historical device events to intent events is also an optional step.
[0185] S404, The cloud uses historical event data sent by various electronic devices as training samples 1.
[0186] Among them, training sample 1 in S404 can also be called the overall training sample or the group training sample.
[0187] S405. The cloud inputs training sample 1 into the general intent prediction model to train the general intent prediction model and obtain the target general intent prediction model. The target general intent prediction model is used for intent prediction.
[0188] In this embodiment, during the training phase, the cloud uses training sample 1 (or first historical event data) to train a general intent prediction model. This allows the model to learn the correlation between historical events and spatiotemporal information in training sample 1, as well as the causal relationships between historical events, thereby learning the behavioral patterns of a group of users. This enables the trained general intent prediction model to predict user intent based on these behavioral patterns. After training, if the prediction accuracy of the trained general intent prediction model does not meet the requirements, the cloud can continue training the model using training sample 1 until the prediction accuracy meets the requirements. Afterward, the cloud can use the general intent prediction model with the required prediction accuracy as the target general intent prediction model.
[0189] Specifically, the cloud can determine whether the prediction accuracy of the general intent prediction model meets the requirements using a loss function. If the loss function value is less than a preset loss value of 1, the cloud determines that the prediction accuracy of the general intent prediction model meets the requirements. However, if the loss function value is greater than or equal to the preset loss value of 1, the cloud determines that the prediction accuracy of the general intent prediction model does not meet the requirements.
[0190] Alternatively, since the prediction of intent is essentially a classification problem, the loss function mentioned above can be the cross-entropy function.
[0191] The training phase of the general intent prediction model has been briefly introduced above. Below, we will use an example from training sample 1 above, where the number of historical event data (i.e., the number of historical events) is 30, each historical event includes the historical event, its location, time, and date, and the number of preset intents is 10, to illustrate this. Figure 11 This section provides a detailed introduction to this training phase.
[0192] First, for each of the 30 historical event data points, the embedding layer in the general intent prediction model converts the historical event data into an initial vector, resulting in a sequence of initial vectors. Then, the embedding layer outputs the initial vectors corresponding to each of the 30 historical event data points. The process of mapping historical event data to initial vectors is similar to the process of mapping device events to initial vectors described earlier, and will not be repeated here.
[0193] Subsequently, the aforementioned 30 initial vectors serve as input to the change module in the general intent prediction model. Based on these 30 initial vectors, the change module learns the associations between historical events and their location, time, and date of occurrence, as well as the causal relationships (i.e., correlations) between historical events, thereby learning the behavioral patterns of the user group. Furthermore, for each initial vector, the change module adjusts it to obtain the corresponding historical sequence (historyembedding), which is the historical sequence of the historical event data corresponding to that initial vector. This historical sequence is equivalent to vector 1 described above.
[0194] Each historical sequence has 128 dimensions. Here, 128 can be understood as the preset dimension 2 mentioned above. After obtaining the vector 1 corresponding to each historical event data, the transformation module outputs 30 historical sequences, which the intent attention network layer uses to continue learning the behavioral patterns of the group of users.
[0195] The above-mentioned adjustment process can refer to the changes in the module described above for dimensionality reduction, correction, and integration (i.e., correlation).
[0196] Optionally, the aforementioned change module can employ the GPT-2 model to leverage the knowledge and reasoning capabilities of a large model to learn group behavior patterns.
[0197] Subsequently, the aforementioned 30 historical sequences serve as input to the intent attention network layer. The intent prediction vector calculates the similarity between the 30 historical sequences and the intent prediction vector corresponding to each of the 10 preset intents, and determines the probability corresponding to each preset intent based on the similarity. Preset intents are pre-defined intents, encompassing all types of intents that the general intent prediction model can output. The initial value of the intent prediction vector (intent embedding) is a randomly initialized vector, a process similar to the process described above of mapping the aforementioned historical event data to initial vectors through the embedding layer. There is a one-to-one correspondence between preset intents and intent prediction vectors; the intent prediction vector corresponding to each preset intent represents the specific meaning of that preset intent.
[0198] Subsequently, the aforementioned prediction layer 1 outputs an intent prediction result based on the probability corresponding to the preset intent. This result is then used by the cloud to calculate the loss function value 1, and the parameters in the general intent prediction model are updated through backpropagation based on the loss function value 1, thereby training the intent prediction model. For example, if the loss function value 1 is greater than or equal to the preset loss value 1, the cloud updates the intent prediction vector corresponding to the preset intent, making the intent prediction vector more accurately represent the corresponding preset intent, thus training the intent attention network layer.
[0199] In addition, if the loss function value 1 is less than the preset loss value 1, it indicates that the training of the general intent prediction model can end. Accordingly, the trained intent prediction vector corresponding to the preset intent can be used as the target intent prediction vector corresponding to the preset intent.
[0200] In some embodiments, such as Figure 12 As shown, the aforementioned intent attention network layer can sequentially include an outproduct layer, a contact layer, a PReLU activation function layer, and a linear layer. The outproduct layer is used to capture the correlation between group user behavior and the preset intent. Specifically, during the training phase, the outproduct layer captures the relationship between historical sequences and the intent prediction vector, thereby capturing the correlation between historical user behavior and the preset intent.
[0201] The contact layer concatenates the device event-corresponding vector 1 and the inner product vector between the device event-corresponding vector and the intent prediction vector, thereby combining different feature information into the device event-corresponding vector 1 and enhancing its expressive power. Specifically, during the training phase, the contact layer concatenates the historical sequence and the inner product vector between the historical sequence and the intent prediction vector to form a feature vector containing more information, enhancing the expressive power of the historical sequence.
[0202] The PRelu layer is used to average the feature vectors corresponding to device events to obtain activation features.
[0203] Linear layers are used to map activation features to the output space.
[0204] To better understand the role of each layer in the intent attention network, let's take the training phase as an example, where the number of preset intents is 10, the intent prediction vector corresponding to each preset intent is 128-dimensional, and the historical sequence is also 128-dimensional. Figure 12 This section describes the operations performed in each layer of the intention attention network.
[0205] The cloud inputs all intent prediction vectors (128*10) and historical sequences (30*128) corresponding to all historical device event data into the out product layer. The out product layer calculates the inner product (30*128)*(128*10) between each historical sequence and each intent prediction vector to calculate the similarity between each historical sequence and each intent prediction vector, resulting in an inner product vector C of dimension 30*10 between the historical sequence and the intent prediction vector. Here, Cij in the inner product vector C represents the similarity between the i-th historical sequence and the j-th intent prediction vector.
[0206] Next, the cloud layer concatenates the inner product vector C with the historical sequences through a concatenation layer. That is, for each historical sequence, the inner product between the historical sequence and the corresponding intent prediction vector is concatenated to obtain 30 feature vectors (30*(128+10)). Then, the cloud layer inputs the 30 feature vectors into the PRuelu layer.
[0207] The PRelu layer calculates the mean of 30 feature vectors. Simply put, for each column, it calculates the average of the sums of the elements corresponding to that column in the 30 feature vectors, obtains a 1*138 dimensional activation feature, and outputs the 1*138 dimensional activation feature.
[0208] Next, the cloud inputs the 1*138 dimensional activation features into the Linear layer. The Linear layer calculates the inner product between the activation features and the weight vectors corresponding to each preset intent, i.e., (1*138)*(138*10), to obtain the probability (1*10) corresponding to each preset intent. Each element in 1*10 represents the probability corresponding to each preset intent.
[0209] As can be seen from the above, the weight vector corresponding to each preset intent is 138-dimensional, and the initial value of the weight vector corresponding to the preset intent can be randomly generated, similar to the intent prediction vector corresponding to the preset intent.
[0210] In some embodiments, the aforementioned change module may be a reused conventional model structure (such as...) Figure 13 As shown, training can be performed in the conventional manner. Alternatively, to enable the change module to better learn the sequential relationships between historical events, it can be trained through event reconstruction. For example, the event reconstruction layer in the intent prediction model can reconstruct the masked historical sequence corresponding to a historical event and return the reconstructed historical sequence to the change module. The change module compares the reconstructed historical sequence corresponding to the historical event with the actual historical sequence corresponding to the historical event to update the change module, aiding its training and enhancing the learning of the conversion pattern from device events to intents.
[0211] For example, such as Figure 14 As shown, after the mapping layer outputs initial vectors corresponding to 30 historical event data, the cloud layer masks 10 of these 30 initial vectors. Then, the cloud layer inputs the 10 masked initial vectors and 20 complete initial vectors (i.e., the 20 unmasked initial vectors) into the transformation module. The transformation module adjusts the 10 masked initial vectors and 20 complete initial vectors to obtain 10 masked historical sequences and 20 complete historical sequences, and outputs them. Next, the event reconstruction layer, based on the sequential relationship between the 10 masked historical sequences and the 20 complete historical sequences, restores the 10 masked historical sequences to obtain 10 restored historical sequences, and returns these 10 restored historical sequences to the transformation module.
[0212] Next, the transformation module compares the historical sequences corresponding to the 10 initial vectors (i.e., the actual historical sequences) with the 10 reconstructed historical sequences. If they are inconsistent, the transformation module can update its own parameters to more accurately adjust the masked initial vectors, enabling the event reconstruction layer to accurately reconstruct the historical sequences and allowing the general intent prediction model to understand the correlation before and after the event. If they are consistent, the transformation module does not need to be updated.
[0213] The transformation module compares the historical sequence corresponding to the 10 initial vectors with the restored historical sequence corresponding to the 10 initial vectors to determine whether the transformation module needs to be trained further. This is equivalent to calculating the loss function.
[0214] It should be noted that during the training phase, the operations performed by the general intent prediction model are actually executed in the cloud. Optionally, the cloud can be a device with high processing power, such as a server.
[0215] Understandably, if the time difference between the collection times of two consecutive events in the aforementioned historical device events is greater than a duration of 2, it indicates a low correlation between the two events, meaning a low probability of a causal relationship. Correspondingly, during the inference phase, when collecting the preceding event, the electronic device inputs that preceding event into the target intent prediction model. The target intent prediction model outputs a null value, indicating no intent.
[0216] It should be noted that the use of vectors corresponding to historical event data (such as the initial vector mentioned above) as a sequence is merely for ease of description. A sequence can also refer to data composed of event data. For example, the event data collected from a user for one day can be considered as a sequence (or event sequence).
[0217] In some embodiments, after training a general intent prediction model to obtain a target general intent prediction model, the cloud can directly use this target general intent prediction model as the target intent prediction model. Alternatively, to improve prediction speed, the cloud can distill the target general intent prediction model to simplify it. The distilled target general intent prediction model is a lightweight prediction model, suitable for deployment on the edge. This distilled target intent prediction model can be used as the target intent prediction model. Simply put, the cloud can streamline a large model (i.e., the target general intent prediction model) into a smaller model (the target intent prediction model), thereby reducing the resources occupied by the model on electronic devices. This ensures both the accuracy and speed of the target general intent prediction model in predicting intent.
[0218] Optionally, the above distillation can be teacher-student distillation. The above target general intent prediction model can be understood as the teacher model, and the distilled target general intent prediction model can be the student model. The student model can learn fine-grained information from the output of the teacher model, as well as learn basic classification ability.
[0219] The above describes the scenario where the target intent prediction model is a general model deployed in the cloud (i.e., a general target intent prediction model or a distilled general target intent prediction model). Since there may still be differences between individual user behavior models and group user behavior patterns, to improve intent prediction accuracy, electronic devices can, after deploying a general model, utilize both the general model and the personalized intent prediction model collaboratively for intent prediction. This allows the electronic device to leverage both the behavioral habits of group users and individual user behavior for intent prediction, ensuring accuracy. The following section continues with the example of a morning news report, combining... Figure 15 This paper introduces the process of using a general model and a personalized intent prediction model in synergy for intent prediction.
[0220] S501. When the triggering conditions corresponding to the morning report scenario are met, the electronic device acquires target device event data 1. Target device event data 1 includes target device event 1 and its corresponding spatiotemporal information.
[0221] For example, when the triggering conditions corresponding to the morning news scenario are met, indicating that the user may intend to check the news, the electronic device can determine whether to provide the morning news service. The electronic device can read target device event data 1 from a preset location. This target device event data 1 may include device event data collected when and / or before the triggering conditions are met. Specifically, "before the triggering conditions are met" could refer to a specific time period 1 or a specific number 1 of device event data collected before the triggering conditions are met. For example, target device event data 1 could be device event data collected by the electronic device within 30 minutes before the triggering conditions for the morning news scenario are met, or 30 device event data collected before the triggering conditions for the morning news scenario are met.
[0222] Optionally, the triggering conditions for the aforementioned morning news scenario may include at least one of the following: the current time belongs to a preset time period corresponding to the morning news scenario; a specific event corresponding to the morning news scenario has been collected (such as an alarm clock ringing); the user has reached their bedtime (such as the alarm clock time set by the user, or the time the user woke up within a previous period of time (such as the time when the screen was first turned on, the time when the screen was first unlocked, etc., which are time zones determined by a combination of factors)); the current time belongs to the time point corresponding to the timed trigger; or the current time belongs to the historical occurrence time of the morning news scenario. The specific event corresponding to the morning news scenario (or the target event) indicates that the electronic device has the potential to run the morning news service when the target event occurs.
[0223] Taking the trigger conditions for the morning news scenario as an example, where the current time falls within the preset time period corresponding to the morning news scenario and the sleep end time (or sleep end time) has arrived, and this preset time period is from 5 AM to 12 PM, the electronic device can determine that the trigger conditions for the morning news scenario are met if the current time is between 5 AM and 12 PM and the sleep end time has arrived. In other words, the time that triggers the sleep end time for the morning news scenario is t_start. If t_start is between 5 AM and 12 PM, the electronic device can determine that the trigger conditions for the morning news scenario are met. Here, t_start can have an initial value, such as 8 AM.
[0224] Taking the triggering conditions for the morning news scenario as an example, the current time belongs to the preset time period corresponding to the morning news scenario, and the current time belongs to the time point corresponding to the timed trigger, which is from 5 o'clock to 12 o'clock, and the timed trigger is the hour t_hour. If the current time is the hour between 5 o'clock and 12 o'clock (e.g., 5 o'clock, 6 o'clock, 7 o'clock, ..., 12 o'clock), the electronic device can determine that the triggering conditions corresponding to the morning news scenario are met, so as to realize the determination of the time to predict the triggering intention of the morning news from the scenario dimension.
[0225] The triggering conditions for the morning news scenario include the current time falling within the preset time period corresponding to the morning news scenario, the time fence corresponding to the morning news scenario being triggered, and the current time falling within the time point corresponding to the timed trigger. The preset time period is from 5:00 to 12:00, and the timed trigger is the hour. Therefore, when the current time is the hour between (t_start, 12:00), the electronic device can determine that the triggering conditions corresponding to the morning news scenario are met, so as to realize the determination of the time to predict the triggering intention of the morning news from the hourly triggering dimension.
[0226] Optionally, the process of determining whether the current time belongs to the historical morning news scenario can include: if the electronic device obtains historical data (e.g., the previous 30 days) and the earliest time the electronic device reads the news within the preset time period (e.g., 5 am to 12 pm) corresponding to the morning news scenario is t0, then the historical morning news scenario occurrence time t0' = max(t0-30min, t_start) can be determined from the behavioral trigger dimension to predict the morning news intention.
[0227] In some embodiments, as can be seen from the triggering conditions corresponding to the above-mentioned morning news scenario, the time for triggering the morning news intent prediction can be determined from different dimensions. The electronic device can use this time as the trigger time set T, such as T being {t_start, t_hour, t0'}, and register the corresponding time fence. Thus, when the time fence corresponding to the morning news scenario is triggered, the personalized intent prediction model is used to predict the intent.
[0228] Furthermore, the personalized intent prediction model described above can be used not only to predict early morning intents but also other intents. Each intent (i.e., preset intent) can have a corresponding number; for example, the number of the early morning intent is 0, and other preset intents can be 1, ..., N. N represents the number of preset intents that the personalized intent prediction model can output. The number of preset intents that the personalized intent prediction model can output is generally the same as the number of preset intents that the general model can output. Of course, they can also be different.
[0229] Therefore, the triggering conditions corresponding to other preset intentions (such as the triggering conditions corresponding to the evening news scenario, etc.) can refer to the triggering conditions corresponding to the morning news scenario mentioned above.
[0230] Correspondingly, the set of trigger times corresponding to all preset intentions can be {t_start, t_hour, t0', t1', ..., tN'}. Intention prediction can be performed as long as the current time belongs to the set of trigger times corresponding to all preset intentions.
[0231] In some embodiments, the target device event data 1 described above may be obtained from an event flow table. For example, an electronic device may subscribe to the types of device events it needs to collect from an event list, i.e., subscribe to event items. Then, when the electronic device senses that a subscribed event item has occurred, it stores the corresponding device event data in the event flow table. Additionally, the electronic device may include other data tables that can include all the data collected by the electronic device, allowing the electronic device to retrieve the required data from these tables as needed.
[0232] Optionally, the electronic device can also obtain target device event data 1 from the event flow table and its dependency table. For example, the event flow table may include target device event 1, and the dependency table of the event flow table may include the spatiotemporal information corresponding to target device event 1.
[0233] In some embodiments, after the electronic device collects the target device event data 1, it can perform cleaning processing to reduce the impact of irrelevant event data on the intended prediction.
[0234] In some embodiments, after obtaining target device event data 1, the electronic device performs intent mapping on the target device event data 1, which is capable of intent mapping, to obtain the corresponding intent event. Accordingly, the operation performed on target device event 1 below can be replaced by describing the operation performed on the intent event corresponding to target device event 1. For example, S502 below can be replaced by describing the input of target event data 1 (or first event data) into the general model. Here, target event data 1 includes target device event data 1 that is not mapped to an intent event and the intent event obtained by mapping target device event data 1.
[0235] S502, The electronic device inputs the target device event data 1 into the general model, so that the general model determines feature 1 based on the target device event data 1 and the learned behavior habits of the group users.
[0236] In this embodiment, the electronic device inputs target device event data 1 into a general model (or a first intent prediction model) for inference based on the target device event data 1. This inference process can be referred to above. Figure 8The relevant content is introduced, but without the need to output corresponding prediction results. For example, a general model can determine feature 1 corresponding to target device event data 1 based on target device event data 1 and the learned behavioral patterns of the group of users. Feature 1 (or the first feature) represents the behavioral characteristics of the group of users within the time period related to the occurrence of target device event data 1 (such as the occurrence time or event collection time mentioned above), that is, the characteristics of the event data of the group of users within the relevant time period of the occurrence of target device event data 1.
[0237] The time related to the occurrence of target device event data 1 can include the time when target device event data 1 occurred and the time before that time, such as 90 minutes. Alternatively, the time related to the occurrence of target device event data 1 can include the time bucket in which target device event data 1 is located.
[0238] Optionally, feature 1 may be vector 1 corresponding to the event data output by the change module in the general model described above, or the initial vector output by the embedding layer. Of course, it may also be other vectors obtained by the general model. This application does not limit it.
[0239] Based on the above, feature 1 can be a behavioral characteristic of a group of users related to the target device event data 1, such as the characteristics of the event data of the group of users. For example, the general model described above can determine the characteristics of device events of group users within the time bucket where the target device event data 1 is located.
[0240] In some embodiments, feature 1 may include features used to predict various preset intentions. Alternatively, since the electronic device meets the triggering conditions corresponding to the morning news scenario, the user is more likely to have the intention to check the news, and the electronic device can predict the probability corresponding to the morning news intention. Accordingly, to reduce processing load, the general model can output only feature 1 related to the morning news intention. For example, after obtaining the event data within the relevant time period of the target device event data 1, the general model can filter the event data related to the morning news intention based on the behavioral habits of the group of users, and then use the features of the filtered event data as feature 1. For example, music playback event data is obviously unrelated to the morning news intention. If the event data within the relevant time period of the target device event data 1 includes the music playback event data, then the general model can determine feature 1 without using the music playback event data.
[0241] Optionally, the general model can also filter event data related to the early reporting intent from the target device event data 1 based on the behavioral habits of the group of users, thereby reducing the data processing volume of the general model.
[0242] In other embodiments, feature 1 may also be the intent prediction result obtained by a general model based on the target event data 1. This intent prediction result may include the predicted intent and / or the corresponding confidence level. Based on this, the personalized intent prediction model can combine the prediction results of the general model, that is, perform intent prediction based on the behavioral habits of the group of users and the behavioral habits of individual users, ensuring the accuracy of intent prediction. In summary, feature 1 may include the aforementioned behavioral features and / or the intent prediction result output by the general model.
[0243] It should be noted that the above example uses event data filtering to illustrate the process of determining feature 1, which is relevant to the early warning intent. Alternatively, after obtaining features for predicting various preset intents, the general model can process feature 1 through specific network layers to ensure that feature 1 is only relevant to the early warning intent. This network layer can be the layer following the layer that outputs feature 1, or it can be the last network layer of the general model after prediction layer 1.
[0244] In some embodiments, before inputting the target device event data 1 into the general model, the electronic device can determine whether the general model has already been loaded. If not, the electronic device loads the general model. After the general model is loaded for the first time, the electronic device can keep it resident in memory, thereby improving the efficiency of intent prediction.
[0245] In some embodiments, the electronic device can directly input the target device event data 1 into the general model, as described above. Alternatively, to improve prediction, the electronic device first calculates the input features of the general model based on the target device event data 1. Then, the electronic device can input the input features of the general model into the general model.
[0246] For example, the process of calculating the input features of the general model based on the target device event data 1 may include: based on the preset bucketing time 1 and the spatiotemporal information corresponding to the target device event 1, the electronic device can bucket the target device event 1 to obtain at least one event sequence 1 (or event sequence feature). Each event sequence 1 includes at least one target device event 1. The occurrence time of the target device event 1 in each event sequence 1 belongs to a bucket (or time bucket), thereby enabling the electronic device to predict the service that the user may use in the future (the next moment, or within a future period). For example, if the preset bucketing time 1 is 30 minutes, then the time difference between the target device events 1 in the event sequence 1 is less than or equal to 30 minutes.
[0247] Subsequently, for each event sequence 1, the electronic device combines event sequence 1 with sequence association feature 1 to obtain feature 1. For example, sequence association feature 1 represents the temporal characteristics of the target device event 1 in event sequence 1, such as whether the occurrence time is a weekday, a day of the week, or the hour. Additionally, sequence association feature 1 can also include the location characteristics of the target device event 1, such as whether a geofence is triggered and the specific geofence it is located in. It can be understood that the sequence association feature 1 corresponding to event sequence 1 can be determined based on the spatiotemporal information corresponding to the target device event 1 in event sequence 1.
[0248] For example, such as Figure 16 As shown, the number of target device events 1 is 10 (namely target device events 1a, 1b, ..., 1g), which belong to an event sequence 1. Feature 1 also includes the time feature 1 corresponding to the event sequence, such as the weekday and hour. Other types of time features can also be included, such as the month and the day of the month.
[0249] In some embodiments, the electronic device may also directly bucket the target device event 1 based on a preset bucketing time 1 and the spatiotemporal information corresponding to the target device event. Accordingly, the event sequence 1 may include at least one target device event data 1. Alternatively, the electronic device may not need to determine the sequence association feature 1 corresponding to the event sequence 1.
[0250] S503. The electronic device constructs feature 2 based on the target device event data 1.
[0251] The process of constructing feature 2 by the electronic device can refer to the process of determining feature 1. For example, based on the preset bucketing time 2 and the spatiotemporal information corresponding to the target device event 1, the electronic device can bucket the target device event 1 to obtain at least one event sequence 2. Each event sequence 2 includes at least one target device event 2. The occurrence time of the target device event 2 in each event sequence 2 belongs to one bucket, thereby enabling the electronic device to predict the service that the user may use in the next moment or in a future period. Then, for each event sequence 2, the electronic device combines the event sequence 2 with the sequence association feature 2 to obtain feature 2.
[0252] Generally speaking, the preset binning time 2 can be the same as the preset binning time 1 mentioned above. In other words, the input features of the general model mentioned above can also be used as feature 2.
[0253] It should be noted that the above-described determination of feature 2 based on target device event data 1 is only an example. Feature 2 can also be determined based on target device event data 2, where target device event data 2 intersects with target device event data 1. This could be due to the presence of identical event data, the same occurrence time, overlap, or the inclusion of partially or completely identical event items. In general, target event data 2 (or second event data) only needs to share common content with target event data 1. Target event data 2 is determined based on target device event data 2; the specific determination process can be referenced from the previously described process for determining event data (such as target event data 1).
[0254] S504. The electronic device splices feature 1 and feature 2 together to obtain the spliced feature.
[0255] Among them, the splicing features have both the behavioral characteristics of group users and the behavioral characteristics of individual users on the device side. This enables the personalized intent prediction model to make intent prediction based on the behavioral characteristics of individual users and the behavioral characteristics of group users, that is, the behavioral habits of group users, thus ensuring the accuracy of intent prediction.
[0256] It should be noted that the above concatenation is only one possible implementation of combining feature 1 and feature 2. Electronic devices can also combine feature 1 and feature 2 in other ways, such as weighted summation. Accordingly, electronic devices can input the combined features (i.e., combined features) into the personalized intent prediction model. Of course, electronic devices can also directly input feature 1 and feature 2 into the personalized intent prediction model; this application does not limit this.
[0257] S505. The electronic device inputs the splicing features into the personalized intent prediction model, so that the personalized intent prediction model can predict intent based on the splicing features and combined with personalized behavioral habits, and obtain intent prediction result 2.
[0258] The intention prediction result 2 may include the predicted intention and / or the probability (or confidence level) corresponding to the predicted intention.
[0259] In some embodiments, the intent prediction result 2 includes a preset number of predicted intents. For example, after obtaining the confidence levels corresponding to each preset intent, the personalized intent prediction model (or the second intent prediction model) can sort the preset intents in ascending order of confidence level, and then select a preset number of preset intents with higher confidence levels as predicted intents, in descending order. It should be noted that the confidence levels corresponding to the preset intents obtained by the personalized intent prediction model may not include the confidence levels corresponding to all preset intents that the personalized intent prediction model may output.
[0260] For example, the aforementioned preset quantity is the integer corresponding to half the number of preset intentions. Each preset intention has a corresponding number. Then, the personalized intention prediction model can sort the preset intention numbers in ascending order of confidence. Then, the electronic device can use the preset number of preset intentions with higher confidence as the predicted intention number, in descending order of confidence. Specifically, the code for predicting the intention can be: `[top_list] = [np.argsort(i) [=int(len(i)*0.5):] for i y_pred]`. Here, `np.argsor()` is used to sort the preset intention identifiers in ascending order of confidence. `(len(i)*0.5)` is used to determine half the number of preset intentions. `y_pred` represents the preset intention obtained by the personalized intention prediction model.
[0261] Here, the number of the preset intent is the index of the preset intent name. After obtaining the number of the predicted intent, the personalized intent prediction model can look up the corresponding predicted intent name through the number. Accordingly, the predicted intent included in the above prediction result can be the name of the predicted intent.
[0262] In other embodiments, the prediction result can be a predicted intent (i.e., a preset intent) with a probability greater than a preset probability of 1. Optionally, the prediction result may also include predicted intents with a probability greater than a preset probability of 1 and their corresponding probabilities. For example, {'short video intent': 0.04540267 (indicating probability), 'payment': 0.118095756 (indicating probability), 'novel reading': 0.0011240591 (indicating probability), 'long video': 0.00027467133 (indicating probability)}.
[0263] In other embodiments, since the electronic device meets the triggering conditions corresponding to the morning news scenario, the user is more likely to view the news. Therefore, the electronic device can use a personalized model to predict the probability of the morning news intention occurring. Accordingly, the prediction result can include the probability corresponding to the morning news intention.
[0264] In some embodiments, the electronic device may directly input the target device event data 1 into the personalized prediction model without first determining feature 2 based on the target device event data 1 and then inputting feature 2 into the personalized prediction model.
[0265] S506. Based on the intent prediction result 2 output by the target intent prediction model, the electronic device recommends corresponding services in combination with preset recommendation rules.
[0266] For example, after obtaining intent prediction result 2, the electronic device can directly output service recommendations based on this intent prediction result 2. In some embodiments, to avoid unnecessary service recommendations, the electronic device can first determine whether the user is a regular user. If the user is a regular user, the electronic device can recommend services. If not, the electronic device can recommend corresponding services. Specifically, for each predicted intent, the electronic device can determine whether the user is a regular user corresponding to that predicted intent. If not, the electronic device can not push corresponding services based on the predicted intent, avoiding unnecessary service recommendations and preventing users from being disturbed by recommending unnecessary services. If the user is a regular user, the electronic device can recommend corresponding services based on the predicted intent.
[0267] In one implementation, the electronic device can determine whether its user is a regular user corresponding to the predicted intent by measuring the precision and recall rate of the predicted intent. For example, the electronic device can... The formula is used to calculate the regularity value corresponding to the predicted intent. Here, F1 represents the regularity value corresponding to the predicted intent. Prediction represents the hit rate (or accuracy), which is the ratio of the number of times the service recommendation corresponding to the predicted intent was hit (or described as the number of times the service corresponding to the predicted intent was pushed) to the total number of times the service corresponding to the predicted intent was recommended (or described as the number of times the service corresponding to the predicted intent was pushed). Recall represents the recall rate, which is the ratio of the number of hits among the service recommendations corresponding to the predicted intent to the total number of times the service was used by the user of the electronic device (or described as the total number of times the service corresponding to the predicted intent was used).
[0268] Subsequently, if the regularity value is less than a preset regularity threshold, it indicates that the user's predicted intent lacks regularity. Therefore, the electronic device can determine that the user is not a regular user corresponding to the predicted intent. If the regularity value is greater than or equal to the preset regularity threshold, the electronic device can determine that the user is a regular user corresponding to the predicted intent, meaning that the user's use of the service corresponding to the predicted intent is regular. Based on this, when the user using the electronic device is a non-regular user corresponding to the preset intent, the electronic device cannot effectively learn the user's behavioral pattern regarding the preset intent, resulting in low accuracy and recall. Therefore, the F1 score can accurately measure whether a user is a regular user, thereby enabling accurate service recommendations and personalized recommendations. Of course, other methods can also be used to determine whether the user of the electronic device is a regular user corresponding to the predicted intent based on the accuracy and recall of the predicted intent. For example, if the accuracy of the predicted intent is greater than an accuracy threshold and the recall is greater than a recall threshold, the electronic device can determine that the user of the electronic device is a regular user corresponding to the predicted intent.
[0269] In another implementation, the electronic device can determine that a user is a regular user of the predicted intent if, within the past M days, the user has used the service corresponding to the predicted intent at least L times during a preset trigger time period. Otherwise, the electronic device can determine that the user is not a regular user of the predicted intent. For example, if the predicted intent is a morning news app, the electronic device can determine the number of times the user used a news app (i.e., an app that allows browsing news) between 5 AM and 12 PM in the 30 days prior to the current time. If this number is greater than L times, the user is determined to be a regular user of the morning news app, meaning the user has a habit of reading the news in the morning.
[0270] In another implementation, an electronic device can determine that a user is a regular user of the predicted intent if, within a preset trigger time period corresponding to the predicted intent over the past M days, the user has used a service related to that predicted intent more than or equal to R times. Taking the predicted intent as an example of a morning news alert, services related to the morning news alert could include weather services (such as using a weather app) and calendar services (such as using a calendar app). If the electronic device determines that the user has used the weather service more than or equal to R times, it indicates that the user has a habit of checking the weather in the morning, and the user is more likely to read the news in the morning. Therefore, the electronic device can determine that the user is a regular user of the morning news alert. Similarly, if the electronic device determines that the user has used the calendar service more than or equal to R times, it indicates that the user has a habit of checking the calendar in the morning, and the user is more likely to read the news in the morning. Therefore, the electronic device can determine that the user is a regular user of the morning news alert.
[0271] In another implementation, the electronic device can determine whether the user is a regular user corresponding to the predicted intent based on the user type tag. Taking the predicted intent as an example of a morning news intention, if the user type tag is a commuting habit user (such as a user who commutes by car or taxi), the user is likely to view the news during their commute. Therefore, the electronic device can determine that the user is a regular user corresponding to the morning news intention.
[0272] Optionally, for each predicted intent in intent prediction result 2, if the user is not the regular user corresponding to the predicted intent, the electronic device may not recommend the corresponding service.
[0273] Alternatively, if the user is not a regular user (or regular user) corresponding to the predicted intent, the electronic device can also determine whether the user is a user of the service corresponding to the predicted intent. If so, the electronic device can still recommend the service corresponding to the predicted intent. If not, the electronic device will not recommend the service corresponding to the predicted intent.
[0274] Optionally, the electronic device can determine whether its user is a user of the service corresponding to the predicted intent by judging whether the usage conditions corresponding to the predicted intent are met. If the conditions are met, the user is a user of the service corresponding to the predicted intent; otherwise, the user is not. Taking the predicted intent as an early morning news intent as an example, the usage conditions corresponding to the early morning news intent may include whether the user has viewed news within the preset trigger time period corresponding to the early morning news intent (i.e., an early morning news intent event occurred within the preset trigger time period corresponding to the early morning news intent), whether the user is a commuter, whether the user has viewed the weather within the preset trigger time period corresponding to the early morning news intent, and whether the user has viewed the schedule within the preset trigger time period corresponding to the early morning news intent.
[0275] In other embodiments, for each predicted intent in intent prediction result 2, the electronic device can determine whether the predicted intent is greater than a threshold corresponding to the predicted intent. If it is greater, it indicates that the user uses the service corresponding to the predicted intent frequently, and the electronic device can push the service corresponding to the predicted intent. If it is less than or equal to, it indicates that the user uses the service corresponding to the predicted intent frequently, and the electronic device may not push the service corresponding to the predicted intent.
[0276] The thresholds for each predicted intent can be the same, such as 0.5 for all of them. In other words, the thresholds for each preset intent are identical. Furthermore, considering that different users use the service corresponding to different preset intents at different frequencies, for each preset intent, the electronic device can determine the threshold based on the usage frequency of the service corresponding to that preset intent. For example, the usage frequency of the service corresponding to the preset intent represents the number of times the user used the service corresponding to the preset intent in the previous q days.
[0277] For example, the threshold corresponding to the preset intent indicates that, when recommending services based on this threshold, the precision and recall of the preset intent are optimal (or greater than the corresponding value). Electronic devices can dynamically search for the threshold corresponding to the preset intent by iterating from 0.01 to 0.99 based on historical event data and predicted data. For instance, the higher the usage frequency of the service corresponding to the preset intent, the higher the probability of that preset intent being matched; therefore, the threshold corresponding to the preset intent can be adjusted higher. Conversely, the lower the usage frequency of the service corresponding to the preset intent, the lower the probability of that preset intent being matched; therefore, the threshold corresponding to the preset intent can be adjusted lower.
[0278] However, the threshold needs to be adjusted based on the difference between expectations and reality. For example, if the personalized intent prediction model pushes the morning news service 10 times within a certain period, but the user only uses the service 5 times during that time, the threshold corresponding to the news intent needs to be adjusted higher so that the electronic device can more accurately filter out the five times that need to be pushed, avoiding unnecessary pushes. Similarly, if the personalized intent prediction model pushes the morning news service 10 times, but the user only uses the service 20 times during that time, the electronic device can adjust the threshold corresponding to the news intent lower to ensure timely pushes.
[0279] Based on this, the threshold for matching users' personalities is determined, thereby further realizing personalized recommendations and ensuring the generalization of intent.
[0280] Alternatively, electronic devices can directly find the threshold (or probability threshold) corresponding to the usage frequency of the service corresponding to the preset intent, and use it as the threshold corresponding to the preset intent.
[0281] Based on the above description of whether to push services, for each predicted intent in the intent prediction results output by the personalized intent prediction model, the electronic device can push the service corresponding to the predicted intent if the conditions for triggering service push corresponding to the predicted intent are met.
[0282] The triggered service push corresponding to the predicted intent includes one or more of the following: determining that the user on the client side is a user of the service corresponding to the predicted intent; determining that the user on the client side is a regular user of the service corresponding to the predicted intent; or determining that the probability of the predicted intent is greater than a probability threshold corresponding to the predicted intent.
[0283] In some embodiments, the process of an electronic device predicting intent using a personalized intent prediction model has been described above. This personalized intent prediction model is trained from a smaller model. However, due to the time required for training, the prediction accuracy of the smaller model remains low until training is complete, and it cannot yet be used as a personalized intent prediction model. In other words, the personalized intent prediction model is not yet effective, and therefore the electronic device cannot use it for intent prediction. Instead, the electronic device can use a general model to predict intent. Accordingly, after inputting the target device event data 1 into the general model, the general model can output intent prediction result 3. The electronic device can then recommend corresponding services based on this intent prediction result 3. The process by which the general model determines intent prediction result 3 is similar to the process described above where the target intent prediction model determines intent prediction result 1.
[0284] Alternatively, the personalized intent prediction model obtained by training a small model as described above can be used as a reference. Figure 17 The content introduced. (Image) Figure 17 As shown, the training process may include:
[0285] S601. The electronic device obtains end-side device event data from the event flow table. The end-side device event data includes end-side device events and their corresponding spatiotemporal information.
[0286] For example, the electronic device can also read the required end-device event data from the event flow table and its dependency table. For instance, similar to the above, the electronic device can read end-device events from the event flow table and read the spatiotemporal information corresponding to the end-device events from the dependency table of the event flow table.
[0287] In some embodiments, similar to the preceding description, after obtaining the edge device event data, the electronic device can perform cleaning processing on the edge device event data to improve the speed of training small models. Additionally, the electronic device can also perform intent mapping on the edge device event data.
[0288] The implementation process of S601 can refer to the implementation process of S401 described above. The aforementioned end-device events can be incremental, i.e., new samples; in other words, the end-device events are different from the historical device events collected by the electronic device used to train the general intent prediction model.
[0289] S602. The electronic device performs bucketing on the end-side device event data based on the preset bucketing time 3 and the spatiotemporal data corresponding to the end-side device events, and obtains at least one sample event sequence.
[0290] S603. For each sample event sequence, the electronic device combines the sample event sequence with its corresponding sequence association feature 2 to obtain the feature 3 corresponding to the sample event sequence.
[0291] The implementation process of S602-S603 can be referred to the bucketing process introduced above, and will not be repeated here.
[0292] S604. For each feature 3, the electronic device determines the label corresponding to feature 3. The label corresponding to feature 3 represents the intended event that will actually occur in the future when the preceding event is the device event corresponding to feature 3.
[0293] For example, an electronic device can determine device event data that occurs after feature 3 (at the next moment or within a future period of time), and perform intent mapping on the device event data to obtain the corresponding intent event, thereby obtaining the label corresponding to feature 3.
[0294] Optionally, the label corresponding to feature 3 can also represent the intent identifier corresponding to the future actual intent event, such as intent number or intent name. For example, such as... Figure 18 The label corresponding to feature 3 shown is "early report intent". Additionally, as... Figure 18 As shown, the number of labels corresponding to a feature 3 can be one or more. The number of end-device events included in the sample event sequences can be the same or different, and this application does not limit this.
[0295] Specifically, if the preset bucketing time 3 is 1 hour, the electronic device can count the number of intent events that occurred in the time bucket corresponding to feature 3 within a previous period (e.g., the previous day, 3 days, or 7 days). For each intent event, if the number is greater than a specific value (e.g., 0 or other positive integers), the electronic device can use the intent event or its corresponding identifier as the label corresponding to feature 3. Additionally, the electronic device can determine other data as needed, such as determining the user's sleep / wake time (i.e., sleep / wake time fence) based on the time bucket (e.g., 8 AM) of the first screen-on or screen-off event within a previous period (e.g., from 5 AM to 12 PM). Furthermore, the accuracy and recall of a predicted intent can be determined using event data (or event sequence features, sequence association features) such as the total number of times the service corresponding to the predicted intent was used within a previous period.
[0296] S605. The electronic device inputs each feature 3 into the general model so that the general model, based on each feature 3 and combined with the learned behavioral habits of the group users, obtains the sample feature 1 corresponding to each feature 3.
[0297] In this context, the sample feature 1 (or second feature) corresponding to feature 3 represents the behavioral characteristics of the group of users within the time period related to the time feature in feature 3. For example, sample feature 1 represents the behavioral characteristics of the group of users between 10:00 and 11:00 on weekends.
[0298] For a detailed introduction to sample feature 1, please refer to the previous introduction to feature 1, which will not be repeated here.
[0299] S606. For each feature 3, the electronic device concatenates feature 3 with the sample feature 1 corresponding to feature 3 to obtain the concatenated sample feature corresponding to feature 3.
[0300] In this embodiment, the electronic device can use feature 3 as a general model sample feature (similar to the general model input feature described above) and a small model sample feature (similar to feature 2 described above), respectively. Furthermore, the implementation process of S606 can refer to the implementation process of S504 described above, and will not be repeated here.
[0301] The above describes the process of constructing training samples for the small model. The following section will introduce the process of using these training samples to train the small model to obtain a personalized intent prediction model.
[0302] S607. For each feature 3, the electronic device inputs the spliced sample features corresponding to feature 3 and the label corresponding to feature 3 into the small model to train the small model.
[0303] The sample table consists of the spliced sample features corresponding to each feature 3 and the labels corresponding to each feature 3. The electronic device can load this sample table so that the small model can learn the correlation between events based on the spliced sample features and labels corresponding to feature 3, combined with the behavioral habits of the group of users. This allows the model to learn the behavioral habits of the end-users and achieve personalized adaptation of behavioral habits. This avoids the situation where the event data of the end-users is relatively scattered, which prevents the electronic device from learning the behavioral habits of the end-users well. This enables personalized enhancement of the end-user model and achieves accurate prediction of intent.
[0304] In some embodiments, during the training of the small model, the general model described above can also output corresponding intent prediction results based on the training samples. The intent prediction results output by the general model can include the predicted intent and its corresponding confidence level (or probability). Accordingly, the sample feature 1 corresponding to feature 3 described above can be this intent prediction result, thereby enabling the small model to learn the correlation between events during training by combining the intent prediction results determined by the general model based on the group of users, realizing the learning of individual behavioral patterns, and thus achieving fine-tuning of the small model, making the small model more personalized and adaptable to the client side. In general, sample feature 1 can include the intent prediction results or behavioral features (i.e., vectors) output by the general model.
[0305] It should be noted that, similar to target event data 1 and target event data 2 mentioned above, feature 3, determined based on the terminal device event data (which can be referred to as terminal device event data 1), is used as an input parameter for the general model as an example. That is, the electronic device can determine feature 4 based on terminal device event data 2. Terminal device event data 2 and terminal device event data 1 have an intersection. Then, the electronic device can input feature 4 into the general model to obtain sample feature 1. In other words, the electronic device can determine the aforementioned feature 3 based on terminal event data 1 (or second historical event data) and determine sample feature 1 based on terminal event data 2 (or third historical event data). Here, terminal event data 1 is determined based on terminal device event data 1, and terminal event data 2 is determined based on terminal device event data 2.
[0306] S608, Electronic device calculates loss function value 2.
[0307] For example, the loss function value 2 can be obtained through the cross-entropy function.
[0308] S609. When the loss function value 2 is less than the preset loss value 2, the electronic device will use the trained small model as the personalized intent prediction model.
[0309] S610. If the loss function value 2 is greater than or equal to the preset loss value 2, the electronic device returns to S601.
[0310] In this embodiment, after a training session, the electronic device can determine whether the prediction accuracy of the small model meets the requirements by judging whether the loss function value 2 corresponding to the small model is less than the preset loss value 2, thereby determining whether to stop training. If it is less than the preset loss value 2, it indicates that the small model has learned the user's behavior habits well and can accurately predict the user's intention. In this case, the electronic device can stop training the small model and use it as a personalized intention prediction model.
[0311] If the value is greater than or equal to the value, it indicates that the small model cannot accurately predict the intent. The electronic device can update the parameters of the small model and continue training the small model.
[0312] In this embodiment, considering the potential differences between individual user behavior patterns and group user behavior patterns, using only a general model to predict intent may result in inaccurate predictions due to mismatches between the predicted intent and the user's behavioral habits. Therefore, to improve accuracy, the electronic device can deploy a general model on the device side, collaborating with smaller, personalized models to predict intent. This enables the operation of a behavioral intent prediction engine that combines the behavior habits of the group users with personalized behavior habits, ensuring better intent prediction performance. Furthermore, it improves the accuracy and recall of the predicted intent.
[0313] In some embodiments, the structure of the above-mentioned small model can be set according to requirements, such as the tree model structure mentioned above, or other lightweight model structures. This application does not limit it.
[0314] In some embodiments, the training process of the small model by the aforementioned electronic device can be carried out during the idle time of the electronic device, or under other conditions, such as charging or when the screen is off. In other words, the electronic device can train the small model when the conditions for triggering training are met. The conditions for triggering training include one or more of the following: the electronic device is in an idle state, the electronic device is in a black-screen state, or the electronic device is in a charging state.
[0315] Of course, electronic devices can also train small models after deploying a general model, and this application does not limit this.
[0316] It is understandable that after a general model is deployed on an electronic device, the operations performed by both the general model and the personalized model are actually performed by the electronic device.
[0317] Furthermore, the numbering of the steps mentioned above does not represent the actual execution order of the steps, and this application does not impose any restrictions on the execution order of the steps.
[0318] In some embodiments, the structure of the general intent prediction model described above is merely an example, and other types of classification models may also be used; this application does not limit them. Correspondingly, the training process of the general intent prediction model described above is also merely an example.
[0319] It should be noted that the collection, storage, use, processing, transmission, provision, and disclosure of user personal information involved in the technical solutions disclosed in this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals. Furthermore, the personal information (such as user behavioral data) used in the technical solutions of this application is limited to information for which separate consent has been obtained, including but not limited to notifying and reminding users to read the relevant user agreement (notification) and sign the agreement (authorization) which includes authorization of relevant user information before users use the function.
[0320] In some embodiments, this application provides a computer-readable storage medium including computer instructions that, when executed by an electronic device, cause the electronic device to perform the method performed by the electronic device as described above.
[0321] In some embodiments, this application provides a computer-readable storage medium including computer instructions that, when executed on a server, cause the server to perform the server-executed method as described above.
[0322] In some embodiments, this application provides a computer program product that, when run on an electronic device, causes the electronic device to perform the method performed by the electronic device as described above.
[0323] In some embodiments, this application provides a computer program product that, when run on a server, causes the server to execute the server-executed method as described above.
[0324] In some embodiments, this application provides a chip including a communication interface and at least one processor: the communication interface for inputting and / or outputting signaling or data; and at least one processor for executing a computer program to implement the method described above.
[0325] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0326] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.
[0327] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0328] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0329] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this application, essentially or in other words, the parts that contribute to the prior art, or all or part of the technical solutions, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0330] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A service push method, characterized in that, Applied to electronic devices, the method includes: When the conditions for triggering intent prediction are met, the first event data is input into the first intent prediction model, so that the first intent prediction model determines the first feature based on the first event data and the behavioral habits of multiple users; the first event data is generated based on user behavior. The first feature and the second event data are input into the second intent prediction model, so that the second intent prediction model predicts intent based on the first feature and the second event data, combined with the user's behavioral habits of the electronic device, and obtains the intent prediction result; the second event data and the first event data have an intersection; Based on the intent prediction results, the corresponding service is pushed.
2. The method according to claim 1, characterized in that, The intent prediction result includes the predicted intent and / or the probability corresponding to the predicted intent; Before pushing the corresponding service based on the intent prediction result, the method further includes: Determine if the conditions for triggering service push are met; wherein the conditions for triggering service push include one or more of the following: determining that the user of the electronic device is a user of the service corresponding to the predicted intent, determining that the user of the electronic device is a regular user of the service corresponding to the predicted intent, or determining that the probability corresponding to the predicted intent is greater than the probability threshold corresponding to the predicted intent.
3. The method according to claim 2, characterized in that, The conditions for triggering the service push include determining that the user of the electronic device is a regular user of the service corresponding to the predicted intent; The method further includes: Based on the accuracy and recall corresponding to the predicted intent, it is determined that the user of the electronic device is a regular user of the service corresponding to the predicted intent. Wherein, the accuracy rate represents the ratio of the number of times the service corresponding to the predicted intent is pushed to the total number of times the service corresponding to the predicted intent is pushed; the recall rate represents the ratio of the number of times the service corresponding to the predicted intent is pushed to the total number of times the service corresponding to the predicted intent is used.
4. The method according to claim 2 or 3, characterized in that, The probability threshold corresponding to the predicted intent is determined based on the usage frequency of the service corresponding to the predicted intent.
5. The method according to any one of claims 1 to 4, characterized in that, The conditions for triggering intent prediction include the triggering conditions corresponding to the morning news scenario; the intent prediction result includes news intent. The triggering conditions for the morning news scenario include one or more of the following: the current time belongs to a preset time period corresponding to the morning news scenario, a target event corresponding to the morning news scenario is collected, the sleep end time is reached, the current time belongs to the time point corresponding to the timed trigger, or the historical occurrence time of the morning news scenario is reached; wherein, the target event corresponding to the morning news scenario indicates that when the target event occurs, the electronic device has the possibility of running the service corresponding to the morning news scenario; The step of pushing corresponding services based on the intent prediction result includes: Based on the aforementioned news intent, a morning news service is pushed out.
6. The method according to claim 5, characterized in that, The first feature represents the behavioral features of multiple users and / or the probability corresponding to the news intent, which are related to the prediction of the news intent, output by the first intent prediction model.
7. The method according to any one of claims 1 to 6, characterized in that, The first intent prediction model is obtained by training a general intent prediction model based on the first historical event data of multiple users, so that the general intent prediction model learns the behavioral habits of the multiple users based on the first historical event data of the multiple users. The first set of historical event data is generated based on users' historical behavior; The second intent prediction model is trained on an individual intent prediction model based on the second historical event data of the electronic device and the second feature corresponding to the third historical event data, so that the individual intent prediction model learns the user's behavioral habits of the electronic device based on the second historical event data and the second feature; wherein, the second feature is determined by the first intent prediction model based on the third historical event data and the behavioral habits of multiple users; the second historical event data and the third historical event data have an intersection.
8. A model training method, characterized in that, Applied to electronic devices, the method includes: The third historical event data of the electronic device is input into the first intent prediction model, so that the first intent prediction model determines the second feature based on the third historical event data and the behavioral habits of multiple users; Based on the second feature and the second historical event data, an individual intention prediction model is trained so that the individual intention prediction model learns the user's behavioral habits of the electronic device based on the second historical event data and the second feature; wherein, the second historical data and the third historical event data have an intersection; Based on the trained individual intent prediction model, a second intent prediction model is obtained; wherein, the second intent prediction model is used to predict intent based on the event data of the electronic device.
9. The method according to claim 8, characterized in that, The step of training an individual intent prediction model based on the second feature and the second historical event data includes: Based on a preset bucketing time, the second historical event data is bucketed to obtain at least one sample sequence; wherein each sample sequence includes at least one piece of the second historical event data; For each sample sequence, a label corresponding to the sample sequence is determined; wherein, the label corresponding to the sample sequence represents information about the intended event that will actually occur in the future, given that the preceding event is the event indicated by the sample sequence. Each sample sequence, along with its corresponding second feature and label, is input into the individual intent prediction model to train the model.
10. The method according to claim 8 or 9, characterized in that, Before inputting the third historical event data of the electronic device into the first intent prediction model, the method further includes: The electronic device is determined to meet the conditions for triggering training; wherein the conditions for triggering training include one or more of the following: the electronic device is in an idle state, the electronic device is in a black screen state, or the electronic device is in a charging state.
11. An electronic device, characterized in that, The electronic device includes a memory and one or more processors; the memory and the processors are coupled; the memory is used to store computer program code, the computer program code including computer instructions; when the processor executes the computer instructions, the electronic device performs the service push method as described in any one of claims 1 to 7, or the model training method as described in any one of claims 8 to 10.
12. A computer-readable storage medium, characterized in that, It includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the service push method as described in any one of claims 1 to 7, or the model training method as described in any one of claims 8 to 10.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the service push method as described in any one of claims 1 to 7, or the model training method as described in any one of claims 8 to 10.