Training methods for multi-intent prediction models and multi-intent recommendation methods

By constructing a unified sample training model under the target scenario, the problem of high human and material consumption in multi-intent recommendation is solved, and efficient and low-cost multi-intent prediction and recommendation are achieved.

CN120277246BActive Publication Date: 2026-05-26HONOR DEVICE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HONOR DEVICE CO LTD
Filing Date
2023-12-29
Publication Date
2026-05-26

Smart Images

  • Figure CN120277246B_ABST
    Figure CN120277246B_ABST
Patent Text Reader

Abstract

This application provides a multi-intent prediction model training method and a multi-intent recommendation method, relating to the field of artificial intelligence technology. The multi-intent prediction model training method locates multiple target candidate intents of users to the dimension of target scene, constructs a unified sample for multiple target candidate intents in the target scene, and trains a model using the unified sample. The resulting model can predict the probability of occurrence of multiple target candidate intents in this target scene. It eliminates the need to construct samples separately for each target candidate intent and train the model separately using the constructed samples, thereby avoiding repetitive sampling operations for different intents at the same sampling time, and avoiding multiple model trainings, which can save manpower and resources and reduce costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to training methods for multi-intent prediction models and multi-intent recommendation methods. Background Technology

[0002] Currently, AI and intelligence on the terminal side are very popular. Among them, the "service finds people" project has designed dozens or even hundreds of different user intentions, such as payment intention, subway ride intention, music listening intention, etc. To achieve multi-intention recommendation, it is necessary to build samples for each user intention and train a corresponding model. Based on the trained model, the user intention is predicted and services related to the user intention are recommended. For example, if the trained subway ride intention prediction model predicts that the user will take the subway at the current time, the service "subway ride code" related to the user intention "taking the subway" can be recommended to the user; if the trained music listening intention prediction model predicts that the user will listen to music at the current time, the service "music playback interface" related to the user intention "listening to music" can be recommended to the user.

[0003] However, user intentions are diverse. To predict and recommend based on multiple intentions, it is necessary to build samples and train corresponding models based on each user intention, which requires a lot of manpower and resources and is costly. Summary of the Invention

[0004] The multi-intent prediction model training method and multi-intent recommendation method provided in this application can save manpower and resources and reduce costs.

[0005] To achieve the above objectives, this application adopts the following technical solution:

[0006] Firstly, a multi-intent prediction model training method is provided for application in electronic devices, including:

[0007] First, based on historical user behavior events occurring in the target scenario, multiple target candidate intentions of the user are determined. These historical user behavior events occurred within the past N days. Second, based on the historical user behavior events corresponding to each target candidate intention, a training sample dataset for the target scenario is generated. Each sample in the training sample dataset includes: the sampling time corresponding to the sample data, and the labels of multiple target candidate intentions at the sampling time. If the label is the first label, it indicates that the target candidate intention occurred at the sampling time; if the label is the second label, it indicates that the target candidate intention did not occur at the sampling time. Finally, a multi-intention prediction model is trained based on the training sample dataset. The multi-intention prediction model is used to predict the occurrence probability of each target candidate intention among the multiple target candidate intentions in the target scenario.

[0008] In the embodiments of this application, by locating multiple target candidate intentions to the dimension of target scene, a unified sample is constructed for the user's multiple target candidate intentions in the target scene. A model is trained using the unified sample, and the resulting model can predict the probability of occurrence of multiple target candidate intentions in this target scene. There is no need to construct samples separately for each target candidate intention and train the model separately using the constructed samples, thereby avoiding repetitive sampling operations for different intentions at the same sampling time, and avoiding multiple model trainings, which can save manpower and resources and reduce costs.

[0009] In one possible implementation of the first aspect, the training sample dataset includes: sample data collected within a first preset time period before the occurrence of a historical user behavior event corresponding to each target candidate intent; at each sampling time, the label corresponding to the target candidate intent is the first label, and if a historical user behavior event corresponding to another target candidate intent occurs within a second preset time period after the sampling time, the label corresponding to the other target candidate intent is the first label, otherwise it is the second label.

[0010] In this embodiment, by setting the label corresponding to the target candidate intent within a first preset time period before the occurrence of the historical user behavior event corresponding to the target candidate intent as the first label, the model can learn whether the target candidate intent has occurred in advance at the first preset time period, enabling the trained model to predict whether the target candidate intent will occur in advance. The labels of other target candidate intents (excluding the target candidate intent) occurring within a second preset time period after the sampling time are set as the first label, enabling the model to learn whether other target candidate intents have occurred in advance at the second preset time period, enabling the trained model to predict whether other target candidate intents will occur in advance.

[0011] In one possible implementation of the first aspect, the training sample dataset further includes: sample data collected within a third preset time period before the occurrence of a historical user behavior event corresponding to each of the target candidate intentions, wherein the third preset time period is before the first preset time period; at each sampling time, the label corresponding to the target candidate intention is the second label; if a historical user behavior event corresponding to another target candidate intention (excluding the target candidate intention) occurs within a second preset time period after the sampling time, then the label corresponding to the other target candidate intention is the first label, otherwise it is the second label.

[0012] In this embodiment, the model learns that the target candidate intent will not occur within a third preset time period before its occurrence. After training, the model predicts that the target candidate intent will not occur within this third preset time period, avoiding premature prediction and potential user disruption. Furthermore, the labels of other target candidate intents occurring within a second preset time period after the sampling time are set as the first label, enabling the model to learn whether other target candidate intents have occurred in advance within this second preset time period. This allows the trained model to predict the occurrence of other target candidate intents in advance.

[0013] In one possible implementation of the first aspect, no historical user behavior event corresponding to any of the target candidate intentions has occurred on any of the Y days in the past N days. The training sample dataset further includes sample data collected in the target scenario on each of the Y days, wherein the label corresponding to the plurality of target candidate intentions at each sampling time is the second label, wherein Y is less than N.

[0014] In one possible implementation of the first aspect, training the multi-intent prediction model based on the training sample dataset includes: determining, for each sampling time corresponding to each sample data in the training sample dataset, the user's historical behavior sequence and / or historical spatial trajectory sequence within a fourth preset time period before the sampling time; and training the multi-intent prediction model based on the training sample dataset and the historical behavior sequence and / or historical spatial trajectory sequence within the fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

[0015] In this embodiment, considering the personalized user experience, there is generally a series of behavioral sequences and / or spatial trajectory sequences before a target candidate intent occurs. During training, the model learns the user's historical behavioral sequences and / or historical spatial trajectory sequences, which can learn more accurate behavioral patterns of the user. Thus, during prediction, the model will make a judgment by combining the user's behavioral sequences and / or spatial trajectories before the current moment. In other words, the model makes predictions from multiple dimensions such as time, behavioral sequences, and / or spatial trajectory sequences, rather than just from the single dimension of time, which can improve the accuracy of prediction.

[0016] In one possible implementation of the first aspect, training the multi-intent prediction model based on the training sample dataset and the historical behavior sequence and / or the historical spatial trajectory sequence within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset includes: hashing the historical behavior sequence and / or the historical spatial trajectory sequence within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset to obtain historical behavior sequence feature values ​​and / or historical spatial trajectory feature values; and training the multi-intent prediction model based on the training sample dataset and the historical behavior sequence feature values ​​and / or the historical spatial trajectory feature values ​​within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

[0017] In this embodiment, historical behavior sequences and / or historical spatial trajectory sequences are converted into historical behavior sequence feature values ​​and / or historical spatial trajectory feature values ​​that the model can recognize, which facilitates the model's learning of users' deep-seated behavioral patterns.

[0018] In one possible implementation of the first aspect, determining the user's historical behavior sequence within a fourth preset time period prior to the sampling time corresponding to each sample data in the training sample dataset includes: obtaining multiple historical behavior records within the fourth preset time period prior to the sampling time corresponding to each sample data in the training sample dataset, each historical behavior record including: the name of the historical user behavior event and the occurrence time of the historical user behavior event; merging the Q subsequent historical behavior records into a historical behavior sequence based on the occurrence time of the historical user behavior event, where Q is a positive integer.

[0019] In one possible implementation of the first aspect, obtaining the user's historical spatial trajectory sequence within a fourth preset time period prior to the sampling time corresponding to each sample data in the training sample dataset includes: obtaining multiple base station connection records within the fourth preset time period prior to the sampling time corresponding to each sample data in the training sample dataset, each base station connection record including: the connection time with the base station and the base station's identifier; merging P subsequent base station connection records into a historical spatial trajectory sequence based on the connection time with the base station, where P is a positive integer.

[0020] In one possible implementation of the first aspect, determining multiple target candidate intentions of a user based on historical user behavior events occurring in the target scenario includes: obtaining multiple initial candidate intentions in the target scenario; and counting the frequency of each initial candidate intention occurring in the multiple initial candidate intentions in the target scenario within a fifth preset time period.

[0021] The initial candidate intents whose frequency is greater than or equal to a preset frequency are determined as the user's target candidate intents.

[0022] In one possible implementation of the first aspect, after determining multiple target candidate intentions of a user based on historical user behavior events occurring in the target scenario, the method further includes: generating a test sample dataset for the target scenario based on the historical user behavior events corresponding to each of the multiple target candidate intentions. The test sample dataset is obtained by sampling in the target scenario over the past M days at preset time intervals. Each test sample dataset includes: a sampling time and a label of the multiple target candidate intentions at the sampling time. The past M days and the past N days do not include the same day. At each sampling time, if the historical user behavior event corresponding to the target candidate intention occurs within a second preset time period after the sampling time, the label corresponding to the target candidate intention is the first label; otherwise, it is the second label. After training the multi-intention prediction model based on the training sample dataset, the method further includes: testing the multi-intention prediction model based on the test sample dataset to obtain the multi-intention prediction model that meets preset requirements.

[0023] Secondly, a multi-intent recommendation method is provided, applied to electronic devices, comprising: when it is predicted that the target scene is about to be triggered or the target scene has been detected to have been triggered, acquiring multiple target candidate intents of the user in the target scene; inputting the multiple target candidate intents into a model trained by the above method, predicting the occurrence probability of each of the multiple target candidate intents in the target scene; recommending target candidate intents to the user according to the occurrence probability of each of the multiple target candidate intents in the target scene, wherein the occurrence probability of the recommended target candidate intent is greater than or equal to a preset probability value.

[0024] Thirdly, a multi-intent recommendation method is provided, applied to electronic devices, comprising: when it is predicted that the target scene is about to be triggered or the target scene has been detected to have been triggered, acquiring multiple target candidate intents of the user in the target scene; inputting the multiple target candidate intents into a model trained by the above method, predicting the occurrence probability of each of the multiple target candidate intents in the target scene; recommending target candidate intents to the user according to the occurrence probability of each of the multiple target candidate intents in the target scene, wherein the occurrence probability of the recommended target candidate intent is greater than or equal to a preset probability value.

[0025] Fourthly, an electronic device is provided, the electronic device including a memory and a processor, the memory being used to store instructions that, when executed by the processor, cause the electronic device to perform the first aspect or any one of the methods in the first aspect, or to perform the methods of the second aspect or the third aspect.

[0026] Fifthly, a computer-readable storage medium is provided, the computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed, implement the first aspect or any one of the methods in the first aspect, or implement the method of the second aspect or the third aspect.

[0027] In a sixth aspect, a computer program product is provided, the computer program product comprising: computer program code, which, when executed by an electronic device, causes the electronic device to perform the method of the first aspect or any one of the first aspects, or to execute the method of the second aspect or the third aspect. Attached Figure Description

[0028] Figure 1 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;

[0029] Figure 2 This is a software structure block diagram of the electronic device 100 according to an embodiment of this application;

[0030] Figure 3 This is a schematic diagram of the current implementation process for multi-intent prediction;

[0031] Figure 4 This is a schematic diagram of the implementation process for multi-intent prediction provided in the embodiments of this application;

[0032] Figure 5 This is a flowchart illustrating an example of a multi-intent prediction model training method according to an embodiment of this application;

[0033] Figure 6 This is a schematic diagram of a sampling method according to an embodiment of this application;

[0034] Figure 7 This is a schematic diagram of another sampling method according to an embodiment of this application;

[0035] Figure 8 This is a flowchart illustrating another example of a multi-intent prediction model training method according to an embodiment of this application.

[0036] Figure 9 This is a flowchart illustrating another example of a multi-intent prediction model training method according to an embodiment of this application.

[0037] Figure 10 This is a flowchart illustrating another example of a multi-intent prediction model training method according to an embodiment of this application.

[0038] Figure 11 This is a schematic diagram of a mobile phone interface representing the intended target candidate in an embodiment of this application. Detailed Implementation

[0039] The technical solutions in this application will now be described with reference to the accompanying drawings.

[0040] In the description of the embodiments of this application, unless otherwise stated, " / " means "or", for example, A / B can mean A or B; "and / or" in this document is merely a description of 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, and B existing alone. In addition, in the description of the embodiments of this application, "multiple" means two or more.

[0041] Hereinafter, the terms "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 technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this embodiment, unless otherwise stated, "a plurality of" means two or more.

[0042] Currently, AI and smart technologies are gaining popularity on the terminal side. Among these, the "service-finding-people" project designs dozens or even hundreds of diverse user intents, such as payment intent, subway ride intent, music listening intent, etc. To achieve multi-intent recommendation, it's necessary to build samples for each user intent and train a corresponding model. Based on the trained model, the model predicts the user intent and recommends services related to that intent. For example... Figure 1 As shown, Model 1, trained based on samples built on the intention to listen to music, can be used to predict whether a user will listen to music at the current moment; Model 2, trained based on samples built on the intention to take the subway, can be used to predict whether a user will take the subway at the current moment; Model 3, trained based on samples built on the intention to pay, can be used to predict whether a user will pay at the current moment, and so on.

[0043] Currently, to achieve multi-intent recommendation, multiple models corresponding to multiple intents need to be trained first. Then, when recommending multiple intents to a user, these multiple models are called to make predictions, obtaining the prediction results for multiple intents at the current moment. Finally, multiple intents are recommended to the user based on the prediction results. For example, if there are multiple intents (such as payment intent, taking the subway intent, listening to music intent, driving intent, etc.), the recommendation strategy is to target these multiple intents... Figure 1 Multiple models are trained in a one-to-one correspondence manner. When recommending multiple intentions to a user, the trained models are called. If the prediction results are: payment intention and subway ride intention do not occur, while music listening intention and driving intention occur, then services related to music listening intention and driving intention are recommended to the user. For example, the playback interface of the music app and the navigation interface of the map app are displayed on the user's mobile phone desktop. The user can see the interface of the service app that may be used at the moment on the mobile phone desktop.

[0044] However, current solutions for multi-intent recommendation require constructing samples separately for each intent and training models separately using the constructed samples. Different intents have repetitive sampling operations at the same sampling time, and multiple trainings are required for multiple intents. When the number of intents is too large, a lot of manpower and resources are needed.

[0045] In view of this, embodiments of this application provide a method for training a multi-intent prediction model, such as... Figure 2 As shown, by locating multiple target candidate intentions of a user to the dimension of a target scene, a unified sample is constructed for multiple target candidate intentions within the target scene. A model is then trained using this unified sample, and the resulting model can predict multiple target candidate intentions within this target scene (e.g., ...). Figure 2 The probability of occurrence of the payment intention, subway ride intention, music listening intention, etc. shown can be obtained without constructing separate samples for each target candidate intention and training the model separately using the constructed samples. This avoids repetitive sampling operations for different intentions at the same sampling time, and avoids training the model multiple times, which can save manpower and resources and reduce costs.

[0046] The multi-intent prediction model training method provided in this application embodiment can be applied to electronic devices that can record historical user behavior events, such as mobile phones, tablets, wearable devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, and personal digital assistants (PDAs). This application embodiment does not impose any restrictions on the specific type of electronic device.

[0047] For example, Figure 3This is a schematic diagram of the structure of an example electronic device 100 provided in an embodiment of this application.

[0048] Electronic device 100 may include processor 110, external memory interface 120, internal memory 121, universal serial bus (USB) interface 130, charging management module 140, power management module 141, battery 142, antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, sensor module 180, button 190, motor 191, indicator 192, camera 193, display screen 194, and subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0049] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 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.

[0050] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0051] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0052] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0053] In some embodiments, the processor 110 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.

[0054] 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 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0055] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0056] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover 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 tuning switches.

[0057] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G / 6G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 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 150 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 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0058] 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 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0059] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLANs) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0060] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0061] Electronic device 100 implements display functions through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0062] Display screen 194 is used to display images, videos, etc. Display screen 194 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 miniature LED, a microLED, a quantum dot light-emitting diode (QLED), etc. In some embodiments, electronic device 100 may include one or N displays 194, where N is a positive integer greater than 1.

[0063] Electronic device 100 can perform shooting functions through ISP, camera 193, video codec, GPU, display 194 and application processor.

[0064] The ISP (Image Signal Processor) is used to process data fed back from the camera 193. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimization of image noise, brightness, and skin tone. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be set in the camera 193.

[0065] Camera 193 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.

[0066] Digital signal processors (DSPs) are used to process digital signals. Besides digital image signals, they can also process other digital signals. For example, when electronic device 100 selects a frequency, the DSP can perform Fourier transforms on the frequency energy.

[0067] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. Thus, electronic device 100 can play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0068] An NPU (Neural Processing Unit) is a computational processor for neural networks (NNs). By borrowing the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it can rapidly process input information and continuously learn on its own. NPUs can enable intelligent cognitive applications in electronic devices, such as image recognition, facial recognition, speech recognition, and text understanding.

[0069] The external storage interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, video, and other files can be saved on the external memory card.

[0070] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 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 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 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. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0071] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0072] Buttons 190 include a power button, volume buttons, etc. Buttons 190 can be mechanical buttons or touch-sensitive buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0073] Motor 191 can generate vibration alerts. Motor 191 can be used for incoming call vibration alerts or for touch vibration feedback. For example, different vibration feedback effects can correspond to touch operations performed on different applications (such as taking photos, playing audio, etc.). Motor 191 can also correspond to different vibration feedback effects for touch operations performed on different areas of the display screen 194. Different application scenarios (such as time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also be customized.

[0074] Indicator 192 can be an indicator light, used to indicate charging status, power changes, or to indicate messages, missed calls, notifications, etc.

[0075] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0076] The electronic device 100 can implement model training methods through GPUs, application processors, etc., such as the multi-intent prediction model training method in the embodiments of this application.

[0077] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This application embodiment uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100. It should be noted that, in this application embodiment, the operating system of the electronic device can include, but is not limited to, operating systems such as Symbian®, Android®, Windows®, Apple® (iOS), Blackberry®, and HarmonyOS; this application does not impose any limitations.

[0078] Figure 4 This is a software structure block diagram of the electronic device 100 according to an embodiment of the present invention. The layered architecture divides the software into several layers, each with a clear role and function. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0079] The application layer can include a series of application packages. For example... Figure 2 As shown, the application package can include applications such as music, maps, videos, and payment.

[0080] The application framework layer provides application programming interfaces (APIs) and a programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0081] like Figure 4 As shown, the application framework layer may include a window manager, a perception platform, a learning platform, an intent filtering module, a model training module, and an intent prediction module. The intent prediction module further includes a scene prediction module, a scene detection module, and a model inference module.

[0082] The window manager is used to manage windowed applications. It can retrieve screen size, determine the presence of a status bar, lock the screen, and capture screenshots, among other things.

[0083] The perception platform is used to perceive usage data from various applications within the application layer and identify historical user behavior events based on this data. It also identifies the start and end times or start and end events corresponding to a target scenario. When identifying historical user behavior events, data from other hardware components of the electronic device (e.g., gyroscopes, accelerometers) can be combined for fusion perception. For example, when identifying historical user behavior events corresponding to autonomous driving intentions, the connection data between the electronic device and the in-vehicle display, the angular velocity measured by the gyroscope of the electronic device, and the acceleration measured by the accelerometer can be used to jointly determine whether a historical user behavior event corresponding to an autonomous driving intention has occurred.

[0084] The learning platform is used to identify historical user behavior events by labeling and learning from the usage data of various applications, when the perception platform has not detected them. The learning platform is also used to identify the start and end times or start and end events corresponding to a target scenario through profile learning, when the perception platform has not detected the start and end times or start and end events corresponding to the target scenario.

[0085] The intent recognition module is used to determine the user's target candidate intent in the target scenario and the corresponding historical user behavior events based on the historical user behavior events identified by the perception platform or learning platform. Alternatively, it can filter out the user's target candidate intent in the target scenario based on the initial candidate intent sent from the cloud side, the correspondence between the initial candidate intent and the historical user behavior events, and the historical user behavior events identified by the perception platform or learning platform.

[0086] The model training module is used to construct a training sample dataset based on the user's target candidate intent obtained by the intent recognition module and the expected historical user behavior events corresponding to the target candidate intent, and to train the model using the training sample dataset.

[0087] In the intent prediction module, the scene prediction module is used to predict in advance whether the target scene is about to be triggered, and the scene detection module is used to detect whether the target scene has been triggered. When the scene prediction module predicts that the target scene is about to be triggered or the scene detection module detects that the target scene has been triggered, the model inference module calls the trained model to perform multi-intent prediction.

[0088] The scene prediction module combines the start and end times or start and end events of the target scene identified by the perception or learning platform to train the model for target scene prediction. This allows for advance prediction of whether a target scene is about to be triggered. For example, in a sleep scenario, intent recommendations need to be made in advance to prevent recommendations from failing when the user falls asleep. In this case, it's necessary to predict whether the target scene is about to be triggered. If the triggering is predicted, the model begins intent prediction and recommends intents to the user based on the prediction results. For other scenarios (such as commuting to or from work), advance prediction is unnecessary. The system directly detects whether these target scenes are triggered. If a triggering is detected, multiple intent predictions are performed, and intents are recommended to the user based on the prediction results.

[0089] The scene detection module determines whether a target scene has been triggered by detecting the usage data of each application. For example, it can detect whether the current time has reached the start time of the target scene. If the current time has reached the start time of the target scene, it determines that the target scene has been triggered.

[0090] The Android Runtime consists of the core libraries and the virtual machine. The Android runtime is responsible for the scheduling and management of the Android system. The core libraries consist of two parts: one part contains the functionalities that the Java language needs to call, and the other part contains the core Android libraries.

[0091] The application layer and application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and application framework layer as binary files. The virtual machine is used to perform functions such as object lifecycle management, stack management, thread management, security and exception management, and garbage collection.

[0092] System libraries can include multiple functional modules. For example: surface manager, media libraries, 3D graphics processing libraries (e.g., OpenGL ES), model libraries, and databases.

[0093] The Surface Manager is used to manage the display subsystem and provides the blending of 2D and 3D layers for multiple applications.

[0094] The media library supports playback and recording of various common audio and video formats, as well as still image files. It supports multiple audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG.

[0095] The model library is used to store models trained by the model training module in the application framework layer.

[0096] The database is used to store usage data of each application in the application layer, historical user behavior events identified by the perception platform and the learning platform, and the start and end times or start and end events corresponding to the target scenario.

[0097] The kernel layer is the layer between hardware and software. The kernel layer contains at least the display driver, camera driver, audio driver, and sensor driver.

[0098] For ease of understanding, the following embodiments of this application will be described using the following methods: Figure 2 The process of model training is illustrated using an electronic device with the structure shown as an example.

[0099] The application framework layer's perception and learning platforms obtain historical user behavior events and their occurrence times based on usage data from each application, as well as the start and end times or start and end events corresponding to the target scenario. This information is stored in the system's database. Examples of historical user behavior events include: user actions on mobile apps (e.g., opening a music app, scanning a QR code to enter a subway station), entering and exiting a home fence, entering and exiting a company fence, disconnecting from home Wi-Fi, disconnecting from company Wi-Fi, etc.

[0100] The intent recognition module is used to determine the user's target candidate intent in the target scenario and the corresponding historical user behavior events based on the historical user behavior events identified by the perception platform or learning platform. Alternatively, it can filter out the user's target candidate intent in the target scenario based on the initial candidate intent sent from the cloud side, the correspondence between the initial candidate intent and the historical user behavior events, and the historical user behavior events identified by the perception platform or learning platform.

[0101] The model training module is used to construct a training sample dataset based on the user's target candidate intent obtained by the intent recognition module and the historical user behavior events corresponding to the target candidate intent, and to train the model using the training sample dataset.

[0102] The model training module is used to construct a training sample dataset based on the user's target candidate intent obtained by the intent recognition module and the corresponding historical user behavior events, and then uses this dataset to train the model. The trained model is then stored in the model library.

[0103] During multi-intent prediction using a trained model, the scene prediction module predicts in advance whether a target scene is about to be triggered, while the scene detection module detects whether the target scene has been triggered. If the scene prediction module predicts that a target scene is about to be triggered, or if the scene detection module detects that a target scene has been triggered, the model inference module calls the trained model to perform multi-intent prediction, obtaining the occurrence probabilities of multiple target candidate intents within the target scene. Based on these probabilities, the target candidate intents to be recommended are determined. The kernel-level display driver component drives the electronic device's display screen to show services related to the target candidate intents to be recommended.

[0104] The training method for the multi-intent prediction model provided in this application will be described in detail below with reference to the accompanying drawings and application scenarios. Figure 5 This is an exemplary flowchart of a multi-intent prediction model training method.

[0105] Step S110: Based on historical user behavior events that occurred in the target scenario, determine multiple target candidate intents of the user.

[0106] In this embodiment, historical user behavior events can be learned from data created during the use of electronic device 100. For example, user operation of mobile app behavior events (e.g., opening a music app behavior event, using a subway ride code to scan and enter the station behavior event, etc.), entering and leaving home fence events, entering and leaving company fence events, disconnection from home Wi-Fi events, disconnection from company Wi-Fi events, etc.

[0107] Target scenarios can be those obtained by the perception or learning platform after learning historical user behavior events and conforming to certain patterns. These target scenarios occur within relatively fixed time periods or are preceded or followed by significant events. For example, if the target scenario is a commuting scenario, the user's commuting time is generally fixed, such as 7:30 AM to 8:30 AM. Significant events will occur before and after the corresponding time period of the commuting scenario; for example, the user leaving their home fence indicates the start of the commuting scenario, and the user arriving at their workplace fence indicates the end of the commuting scenario. Similarly, if the target scenario is an commuting scenario, the user's commuting time is also generally fixed, such as 5:30 PM to 6:30 PM. Significant events will also occur before and after the corresponding time period of the commuting scenario; for example, the user leaving their workplace fence indicates the start of the commuting scenario, and the user arriving at their home fence indicates the end of the commuting scenario.

[0108] The target scenarios learned by the perception platform or learning platform are diverse. In addition to the above-mentioned commuting scenarios to and from get off work, they may also include: sleep scenarios, dinner scenarios, etc. This embodiment does not limit them.

[0109] In this embodiment, the target candidate intent refers to the user's intention or attempt indicated by historical user behavior events. For example, if a historical user behavior event is opening a music app, then the user's intention or attempt indicated by this historical user behavior event is 'listening to music'; similarly, if a historical user behavior event is connecting to an in-vehicle display screen, then the user's intention or attempt indicated by this historical user behavior event is 'driving'. The occurrence of a historical user behavior event corresponding to the target candidate intent can characterize the occurrence of the target candidate intent. For example, the occurrence of the historical user behavior event of opening a music app can be considered as the occurrence of the intention to listen to music; similarly, the occurrence of the historical user behavior event of scanning a subway QR code to enter the station can be considered as the occurrence of the intention to take the subway.

[0110] In this embodiment, the user's target candidate intent can be obtained in the following two ways.

[0111] In one possible implementation, when the electronic device is either off or charging, the intent recognition module learns multiple candidate intents of the user in the target scenario by learning historical user behavior events in the electronic device under the target scenario. At this time, it can also learn the historical user behavior events corresponding to each of the multiple candidate intents.

[0112] In another possible implementation, multiple target candidate intentions of the user can be determined based on historical user behavior events that occur in the target scenario, including: obtaining multiple initial candidate intentions in the target scenario; counting the frequency of each initial candidate intention among the multiple initial candidate intentions in the target scenario within a fifth preset time period; and determining the initial candidate intentions with a frequency greater than or equal to the preset frequency as the user's target candidate intentions.

[0113] In this embodiment, the cloud side learns from historical user behavior events in multiple user target scenarios to derive multiple initial candidate intentions for a group in that target scenario, as well as the corresponding historical user behavior events. The initial candidate intentions and their corresponding historical user behavior events can be stored in a list and distributed to each user's electronic device. The initial candidate intention list stores the names of multiple target scenarios, multiple initial candidate intentions corresponding to each target scenario, and the historical user behavior events corresponding to each initial candidate intention. An initial candidate intention list can be shown in Table 1 below.

[0114] Table 1:

[0115]

[0116] It is worth noting that the above initial candidate intent list is only an example. In practical applications, the initial candidate intent list may not include historical user behavior events, and the correspondence between the initial candidate intents and historical user behavior events can be stored separately.

[0117] After the electronic device obtains multiple initial candidate intentions in the target scenario and the correspondence between the initial candidate intentions and historical user behavior events from the cloud, the intention recognition module can count the frequency of each initial candidate intention in the target scenario within the fifth preset time period, and determine the initial candidate intentions with a frequency greater than or equal to the preset frequency as the user's target candidate intentions.

[0118] Specifically, when an electronic device is charging or the screen is off, the system obtains the initial candidate intent list sent from the cloud, as well as the correspondence between the initial candidate intents and historical user behavior events, and then begins the mining process.

[0119] We select historical user behavior events from the past X days and count the frequency of occurrence of each initial candidate intent in the target scenario within the initial candidate intent list for each of the past X days. Here, X is a positive integer. If a historical user behavior event corresponding to a certain initial candidate intent has occurred in the target scenario, then the initial candidate intent is considered to have occurred in the target scenario, and regardless of how many times it occurred, the frequency of that initial candidate intent is increased by 1. For example, the results of the past X days' commuting scenario are as follows: {Listening to music intent: 8, Taking the subway intent: 2, Viewing WeChat intent: 3, Driving intent: 10}. Similarly, the results of the past X days' commuting scenario are as follows: {Watching short videos intent: 7, Taking the subway intent: 4, Viewing WeChat intent: 2, Driving intent: 10}.

[0120] Assuming a preset frequency of W times, the frequency of each initial candidate intent in the target scenario over the past X days is compared with the preset frequency W to determine whether the frequency of each initial candidate intent reaches W times, i.e., whether it is greater than or equal to the preset frequency W. Here, W is a positive integer. If the frequency of a certain initial candidate intent in the target scenario over the past X days is greater than or equal to W times, it is determined that the user typically engages with this intent in that target scenario, and this initial candidate intent is identified as the user's target candidate intent. After filtering out the correspondence between user "target scenario - target candidate intent," it can be stored in list form. When recommending intents to the user in subsequent target scenarios, recommendations are made from these frequently occurring target candidate intents in those target scenarios.

[0121] It's worth noting that when the perception platform or learning platform learns the start and end times or the start and end events corresponding to the target scenario, it can also learn the temporal context of the target scenario. For example, commuting to work and commuting home only occur on weekdays, while sleep and dinner scenarios occur every calendar day. Therefore, for a target scenario with a specific time context, it's necessary to determine the time range of historical user behavior events based on the time context. For instance, for target scenarios like commuting to work and commuting home that only occur on weekdays, the time range of the past X workdays can be determined, and the frequency of each initial candidate intent in the commuting to work and commuting home scenarios can be counted based on historical user behavior events that occurred in the past X workdays. Conversely, for target scenarios like sleep and dinner scenarios that are not limited to a specific time context, the time range of the past X calendar days can be determined, and the frequency of each initial candidate intent in the sleep and dinner scenarios can be counted based on historical user behavior events that occurred in the past X calendar days.

[0122] Step S120: Generate a training sample dataset for the target scenario based on the historical user behavior events corresponding to each target candidate intent among multiple target candidate intents.

[0123] Specifically, after identifying multiple candidate intents for a user in a target scenario, a training sample dataset is generated based on the historical user behavior events corresponding to each candidate intent. The occurrence of a historical user behavior event corresponding to a candidate intent indicates the occurrence of that candidate intent. For example, if a user opens a music app, it indicates the intent to "listen to music" has occurred; similarly, if a user scans a QR code to enter a subway station, it indicates the intent to "take the subway" has occurred.

[0124] In this embodiment, each sample data in the training sample dataset includes: the sampling time corresponding to the sample data, and the labels of multiple target candidate intentions at the sampling time. If the label is the first label, it indicates that the target candidate intention occurred at the sampling time; if the label is the second label, it indicates that the target candidate intention did not occur at the sampling time. The first label can be "positive" or "1", and the second label can be "negative" or "0". The format of a sample data is shown in Table 2 below.

[0125] Table 2

[0126]

[0127] In Table 2 above, this sample data means that target candidate intent A, target candidate intent D, and target candidate intent E occurred at sampling time XX:XX:XX; target candidate intent B and target candidate intent C did not occur at sampling time XX:XX:XX. In one example, assuming the sampling time is 08:02:00, the label for the intent to listen to music is 1, the label for the intent to watch short videos is 0, the label for the intent to take the subway is 0, and the label for the intent to drive is 1, then this sample data means that at 08:02:00, the intent to listen to music and the intent to drive occurred, while the intent to watch short videos and the intent to take the subway did not occur.

[0128] For example, the training sample dataset includes: sample data collected within a first preset time period before the occurrence of the historical user behavior event corresponding to each target candidate intent; at each sampling time, the label corresponding to the target candidate intent is the first label, and if the historical user behavior event corresponding to other target candidate intents occurs within a second preset time period after the sampling time, the label corresponding to the other target candidate intents is the first label, otherwise it is the second label.

[0129] Specifically, iterate through the historical user behavior events that occurred every day over the past N days. If at least one historical user behavior event corresponding to the target candidate intent occurs within the time period corresponding to the target scenario on a given day, then for each occurring target candidate intent, sample data is obtained by sampling within a first preset time period before the occurrence of the historical user behavior event corresponding to the target candidate intent on that day. In the sample data obtained at this time, the target candidate intent is considered to have occurred at each sampling moment, and the label corresponding to the target candidate intent is the first label.

[0130] If the historical user behavior events corresponding to other target candidate intentions besides the target candidate intentions occur within the second preset time period after the sampling time, it is considered that other target candidate intentions also occur at the current sampling time, and the label corresponding to other target candidate intentions is the first label; if the historical user behavior events corresponding to other target candidate intentions do not occur within the second preset time period after the sampling time, it is considered that other target candidate intentions also do not occur at the current sampling time, and the label corresponding to other target candidate intentions is the second label.

[0131] In this embodiment, the label corresponding to the target candidate intent within a first preset time period before the occurrence of the historical user behavior event corresponding to the target candidate intent is set as the first label. This allows the model to learn whether the target candidate intent has occurred in advance within the first preset time period, enabling the trained model to predict whether the target candidate intent has occurred in advance. The labels of other target candidate intents (excluding the target candidate intent) occurring within a second preset time period after the sampling time are set as the first label. This allows the model to learn whether other target candidate intents have occurred in advance within the second preset time period, enabling the trained model to predict whether other target candidate intents have occurred in advance.

[0132] It should be noted that the duration of the first preset time period can be set according to actual needs. Assuming the duration of the first preset time period is D minutes, D minutes can be 2 minutes, 5 minutes, or 10 minutes, etc. The sampling time range of the sample data is: from the time D minutes before the occurrence time of the historical user behavior event corresponding to the target candidate intent, to the occurrence time of the historical user behavior event corresponding to the target candidate intent. The duration of the second preset time period can also be set as needed. Assuming the duration of the second preset time period is L minutes, L minutes can be 5 minutes, 10 minutes, or 15 minutes, etc. The durations of the first preset time period and the second preset time period can be the same or different; this embodiment does not impose any limitations.

[0133] It is worth noting that the sampling time is between the start and end times of the target scenario on the same day. If the time corresponding to the D minutes before the occurrence time of the historical user behavior event corresponding to the target candidate intent is earlier than the start time of the target scenario on the same day, then the sampling time range is the period from the start time of the target scenario on the same day to the occurrence time of the historical user behavior event corresponding to the target candidate intent.

[0134] For example, the training sample dataset also includes: sample data collected within a third preset time period before the occurrence of the historical user behavior event corresponding to each target candidate intent, the third preset time period being before the first preset time period; at each sampling time, the label corresponding to the target candidate intent is the second label, if the historical user behavior event corresponding to other target candidate intents besides the target candidate intent occurs within the second preset time period after the sampling time, then the label corresponding to the other target candidate intents is the first label, otherwise it is the second label.

[0135] Specifically, the model iterates through historical user behavior events occurring every day over the past N days. If at least one historical user behavior event corresponding to a target candidate intent occurs within the time period corresponding to the target scenario on a given day, then for each occurring target candidate intent, sample data is obtained within a third preset time period prior to the occurrence of the historical user behavior event corresponding to that target candidate intent. In the sample data obtained at this time, it is assumed that the target candidate intent has not occurred at any sampling moment, and the label corresponding to the target candidate intent is the second label. The third preset time period is before the first preset time period, enabling the model to learn that the target candidate intent will not occur within the third preset time period prior to its occurrence. After training, the model predicts that the target candidate intent will not occur within the third preset time period prior to its occurrence, avoiding premature prediction of the target candidate intent's occurrence and thus avoiding disturbing the user.

[0136] If the historical user behavior events corresponding to other target candidate intentions besides the target candidate intentions occur within the second preset time period after the sampling time, it is considered that other target candidate intentions also occur at the current sampling time, and the label corresponding to other target candidate intentions is the first label; if the historical user behavior events corresponding to other target candidate intentions do not occur within the second preset time period after the sampling time, it is considered that other target candidate intentions also do not occur at the current sampling time, and the label corresponding to other target candidate intentions is the second label.

[0137] In this embodiment, the model learns that the target candidate intent will not occur within a third preset time period before its occurrence. After training, the model predicts that the target candidate intent will not occur within this third preset time period, avoiding premature prediction and potential user disruption. Furthermore, the labels of other target candidate intents occurring within a second preset time period after the sampling time are set as the first label, enabling the model to learn whether other target candidate intents have occurred in advance within this second preset time period. This allows the trained model to predict the occurrence of other target candidate intents in advance.

[0138] It should be noted that the duration of the third preset time period can be set according to actual needs. The duration of the third preset time period is K minutes, where K is a positive integer, and K minutes can be set to 20 minutes, 25 minutes, or 30 minutes. Assuming the duration of the third preset time period is K minutes, the sampling time range of the sample data is: from the start time of the target scenario to the time K minutes before the occurrence of the historical user behavior event corresponding to the target candidate intent.

[0139] It is worth noting that the sampling time is between the start and end times of the target scenario on the same day. If the time K minutes before the occurrence of the historical user behavior event corresponding to the target candidate intent is earlier than the start time of the target scenario on the same day, then no sampling will be performed.

[0140] For example, in each of the Y days in the past N days, no historical user behavior event corresponding to any target candidate intent has occurred. The training sample dataset also includes: sample data collected in the target scenario in each of the Y days, where the labels corresponding to multiple target candidate intents at each sampling time are second labels, and Y is less than N.

[0141] Specifically, if no historical user behavior event corresponding to any target candidate intent occurs on any of the Y days in the past N days, then sample data is collected in the target scenario on each of the Y days. At each sampling time, the labels corresponding to multiple target candidate intents are the second labels, which represent that multiple target candidate intents did not occur at that sampling time.

[0142] The following section uses the construction of a training sample dataset for a commuting scenario as an example to illustrate the process of constructing the training sample dataset.

[0143] Suppose that a user's commuting scenario includes four target candidate intentions: listening to music, taking the subway, checking WeChat, and driving.

[0144] First, determine the time window range of the sample based on the target scenario. Since the commuting scenario occurs on weekdays, the past N workdays can be used as the time window range of the sample, and historical user behavior events within the past N workdays can be selected to construct the sample dataset.

[0145] Secondly, sample data is constructed by iterating through each day within the time window.

[0146] For each day within the time window, the specific time range for sampling within each day is determined by the sampling start and end times corresponding to the target scenario or the start and end events corresponding to the target scenario. In other words, the time period corresponding to the commuting scenario within each day of the time window is determined.

[0147] See Figure 6 For each day within the time window, if no historical user behavior event corresponding to any target candidate intent occurs within the time period corresponding to the commuting scenario on a certain day, then A sample data are sampled at preset time intervals within the time period corresponding to the commuting scenario on that day. At each sampling time, the label of each target candidate intent is 0, that is, the label of each target candidate intent is the second label.

[0148] For each day within the time window, if one or more historical user behavior events corresponding to target candidate intents occur within the time period corresponding to the commuting scenario on a certain day, sample data is collected in two time periods for each target candidate intent that occurs.

[0149] (1) Collect sample data within the first preset time period before the occurrence of the historical user behavior event corresponding to each target candidate intent. For example... Figure 7 As shown, assume the first preset time period is D minutes long and the second preset time period is L minutes long. Taking a historical user behavior event corresponding to a self-driving intention occurring within the time period corresponding to a commuting scenario on a certain day as an example, B sample data are randomly sampled from the time point K minutes before the occurrence of the first historical user behavior event corresponding to the self-driving intention to the occurrence of the first historical user behavior event corresponding to the self-driving intention. At each sampling time, the label of the self-driving intention is 1. The labels of other target candidate intentions are determined by whether other target candidate intentions will occur within L minutes after the sampling time. If other target candidate intentions occur, the label of the other target candidate intentions is 1; otherwise, the label of the other target candidate intentions is 0.

[0150] (2) Sample data is collected within a third preset time period before the occurrence of the historical user behavior event corresponding to each target candidate intent. The third preset time period is before the first preset time period. For example... Figure 7 As shown, assuming the third preset time period is K minutes long, taking a historical user behavior event corresponding to a self-driving intention occurring within the time period corresponding to a commuting scenario on a certain day as an example, B sample data are randomly sampled within the time period from the start time of the commuting scenario to the time before the occurrence of the first historical user behavior event corresponding to the self-driving intention. At each sampling time, the label of the self-driving intention is 0. The labels of other target candidate intentions are determined by whether other target candidate intentions will occur within L minutes after the sampling time. If other target candidate intentions occur, the label of the other target candidate intentions is 1; otherwise, the label of the other target candidate intentions is 0.

[0151] The sample construction method in this embodiment can more accurately capture the timing of the occurrence of target candidate intent in advance, while reducing the disturbance to users caused by premature prediction.

[0152] Step 130: Train a multi-intent prediction model based on the training sample dataset.

[0153] After obtaining the training sample dataset, the model to be trained is trained based on the training sample dataset to obtain the multi-intent prediction model. The multi-intent prediction model is used to predict the probability of occurrence of each target candidate intent among multiple target candidate intents in the target scene.

[0154] It should be noted that the model to be trained can be a deep neural network model, a binary classification model, a convolutional neural network model, a long short-term memory neural network model, etc., and this embodiment does not impose any restrictions.

[0155] In this embodiment, multiple target candidate intentions of the user are located to the dimension of target scene. A unified sample is constructed for multiple target candidate intentions in the target scene. A model is trained using the unified sample. The resulting model can predict the probability of occurrence of multiple target candidate intentions in this target scene. There is no need to construct samples separately for each target candidate intention and train the model separately using the constructed samples. This avoids repetitive sampling operations for different intentions at the same sampling time, and avoids training the model multiple times, which can save manpower and resources and reduce costs.

[0156] For example, after determining multiple target candidate intentions of a user based on historical user behavior events occurring in the target scenario, the method further includes: generating a test sample dataset for the target scenario based on the historical user behavior events corresponding to each target candidate intention. The test sample dataset is obtained by sampling the target scenario over the past M days at preset time intervals. Each test sample dataset includes: the sampling time and the labels of multiple target candidate intentions at the sampling time. The past M days and the past N days do not include the same day. At each sampling time, if the historical user behavior event corresponding to the target candidate intention occurs within a second preset time period after the sampling time, the label corresponding to the target candidate intention is the first label; otherwise, it is the second label. After training the multi-intention prediction model based on the training sample dataset, the method further includes: testing the multi-intention prediction model based on the test sample dataset to obtain a multi-intention prediction model that meets preset requirements.

[0157] Specifically, after identifying multiple candidate intents for a user in a target scenario, a test sample dataset for that scenario is generated. After training the model using the training sample dataset, the trained multi-intent prediction model is tested using the test sample dataset to obtain the probability of occurrence for each candidate intent. Based on the probability of occurrence for each candidate intent and the label of each candidate intent in the test samples, the recall and precision of the test sample dataset are calculated. If both recall and precision reach preset thresholds, the multi-intent prediction model is considered to meet the preset requirements, and the model is successfully trained. The electronic device then saves the successfully trained multi-intent prediction model. If either recall or precision fails to reach the preset threshold, the multi-intent prediction model does not meet the preset requirements, and the currently trained model is discarded. After obtaining a multi-intent prediction model that meets the preset requirements, it can be used for intent prediction. Based on the prediction results, the system determines whether the user has a corresponding intent and makes recommendations.

[0158] In this embodiment, when constructing the test sample dataset, the time window range of the samples is first determined. Taking the commuting scenario as an example, since the commuting scenario occurs on weekdays, the past M workdays can be used as the time window range of the samples. Historical user behavior events within the past M workdays are selected to construct the sample dataset. The past M days and the past N days do not include the same day. Secondly, training sample data is constructed by iterating through each day within the time window. For the time period corresponding to the target scenario on each workday, sampling is performed at preset time intervals. At each sampling moment, the label of each target candidate intent is determined by whether the target candidate intent will occur within L minutes of that sampling moment. If the target candidate intent occurs, the label of the target candidate intent is 1; otherwise, the label of the target candidate intent is 0. In this embodiment, sampling at preset time intervals is to achieve the effect of simulating real-time inference. The preset time interval can be set as needed.

[0159] This application also provides a method for training a multi-intent prediction model, such as... Figure 8 As shown, it includes:

[0160] Step S210: Based on historical user behavior events that occurred in the target scenario, determine multiple target candidate intents of the user.

[0161] Step S220: Generate a training sample dataset for the target scenario based on the historical user behavior events corresponding to each target candidate intent among multiple target candidate intents.

[0162] Step S230: For each sample data in the training sample dataset, determine the user's historical behavior sequence and / or historical spatial trajectory sequence within the fourth preset time period before the sampling time.

[0163] Step S240: Train a multi-intent prediction model based on the training sample dataset, the historical behavior sequence and / or historical spatial trajectory sequence within the fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

[0164] Specifically, considering the personalized user experience, there is usually a series of behavioral sequences and / or spatial trajectory sequences before a target candidate intent occurs. During training, the model learns the user's historical behavioral sequences and / or historical spatial trajectory sequences, which can learn more accurate behavioral patterns of the user. Thus, when making predictions, the model will make judgments by combining the user's behavioral sequences and / or spatial trajectories before the current moment. In other words, the model makes predictions from multiple dimensions such as time, behavioral sequences, and / or spatial trajectory sequences, rather than just from the time dimension, which can improve the accuracy of predictions.

[0165] For example, for each sample data point in the training sample dataset, determining the user's historical behavior sequence within a fourth preset time period before the sampling time includes: for each sample data point in the training sample dataset, obtaining multiple historical behavior records within the fourth preset time period before the sampling time, each historical behavior record including: the name of the historical user behavior event and the occurrence time of the historical user behavior event; merging the Q subsequent historical behavior records into a historical behavior sequence based on the occurrence time of the historical user behavior event, where Q is a positive integer.

[0166] In this embodiment, a historical behavior sequence is determined for each sampling time corresponding to each sample data in the training sample dataset.

[0167] For each sample data point, based on the sampling time, multiple historical behavior records are determined according to historical user behavior events within a fourth preset time period prior to the sampling time. Each historical behavior record includes: the name of the historical user behavior event and the time when the historical user behavior event occurred. The Q subsequent historical behavior records are then merged into a single historical behavior sequence based on the time when the historical user behavior event occurred, where Q is a positive integer.

[0168] In one example, the occurrence time of historical user behavior events is extracted, and historical user behavior events whose occurrence time falls within a fourth preset time period of the sampling time are selected. Assuming the duration of the fourth preset time period is H minutes, the occurrence time of the historical user behavior events must be within the first H minutes of the sampling time. Implementably, H minutes can be set according to actual needs, such as 30 minutes, 40 minutes, etc.

[0169] A dictionary is created to store the name key of the filtered historical user behavior events and the occurrence time value of the historical user behavior events. For historical user behavior events that occur multiple times within the fourth preset time period, only the last record that meets the condition (i.e. the record with the latest occurrence time) is taken.

[0170] The dictionary contains multiple keys and corresponding values ​​for each key. The dictionary is sorted according to the occurrence time of the values. The last Q keys representing historical user behavior events are determined. If Q is 5, the last 5 keys are ordered as last_1_event, last_2_event, last_3_event, last_4_event, and last_5_event. If no such key exists, 'NULL' is used. Here, Q is a positive integer and is an adjustable parameter that can be set according to actual needs; for example, Q can be 5 or 6. The last 5 historical behavior records are merged into a single historical behavior sequence based on the occurrence time of the historical user behavior events. The merging is performed according to the order of the occurrence times of the historical user behavior events, thus obtaining the user's historical behavior sequence at the sampling time.

[0171] By performing the above operations for each sampling time corresponding to each sample data, the user's historical behavior sequence at each sampling time can be obtained.

[0172] For example, for each sample data in the training sample dataset, the historical spatial trajectory sequence of the user within a fourth preset time period before the sampling time is obtained, including: for each sample data in the training sample dataset, multiple base station connection records within a fourth preset time period before the sampling time are obtained, each base station connection record includes: the connection time with the base station and the base station's identifier code; and P subsequent base station connection records are merged into a historical spatial trajectory sequence based on the connection time with the base station, where P is a positive integer.

[0173] In this embodiment, for each sample data sampling time, a historical spatial trajectory sequence is generated based on multiple base station connection records within a fourth preset time period prior to the sampling time.

[0174] For each sample data point at the sampling time, the cellid identifiers of the base station received by the electronic device during a fourth preset time period prior to the sampling time are summarized. For multiple cellid identifiers that appear repeatedly within the fourth preset time period, only the last record (i.e., the record with the latest occurrence time) is retained, while the others are deleted. Assuming the fourth preset time period is H minutes long, the connection time between the electronic device and the base station must be within H minutes before the sampling time. Implementably, H minutes can be set according to actual needs, such as 30 minutes, 40 minutes, etc.

[0175] The P base station connection records occurring within the H minutes prior to the sampling time are sorted according to the order of their connection times with the base stations. If P is 10, the cellids of the last 10 base stations are arranged in order of their connection times as last_1_cell, last_2_cell, last_3_cell, last_4_cell, last_5_cell, last_6_cell, last_7_cell, last_8_cell, last_9_cell, and last_10_cell. If none are found, 'NULL' is used. Then, the cellids of the last 10 base stations are merged together to obtain the historical spatial trajectory sequence at that sampling time.

[0176] By performing the above operations for each sampling time corresponding to each sample data, the user's historical spatial trajectory sequence at each sampling time can be obtained.

[0177] For example, a multi-intent prediction model is trained based on the training sample dataset and the historical behavior sequence and / or historical spatial trajectory sequence within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset. This includes: hashing the historical behavior sequence and / or historical spatial trajectory sequence within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset to obtain historical behavior sequence feature values ​​and / or historical spatial trajectory feature values; and training the multi-intent prediction model based on the training sample dataset and the historical behavior sequence feature values ​​and / or historical spatial trajectory feature values ​​within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

[0178] Specifically, after obtaining the historical behavior sequence and / or historical spatial trajectory sequence within the fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset, the historical behavior sequence and / or historical spatial trajectory sequence are first hashed to obtain the historical behavior sequence feature value and / or historical spatial trajectory feature value. By converting the historical behavior sequence and / or historical spatial trajectory sequence into historical behavior sequence feature value and / or historical spatial trajectory feature value that the model can recognize, it is convenient for the model to learn the deep-seated behavioral patterns of users.

[0179] The input to the hash processing is a sequence of historical behaviors and / or a sequence of historical spatial trajectories. The output is an R-dimensional embedding vector. R can be set according to actual needs. For example, if R is set to 5, the output will be a 5-dimensional embedding vector.

[0180] In the hashing process, each element in the historical behavior sequence and / or historical spatial trajectory sequence is first converted into an integer T using a hash method. Then, this integer T is used to perform a modulo operation on the dimension value R of the preset output vector, yielding a remainder G. The remainder G also represents the index position of the R-dimensional vector. For example, if R is 5, the index positions of the R-dimensional vector can be represented as 0, 1, 2, 3, 4. The remainder G modulo 5 also yields remainders of 0, 1, 2, 3, 4, with a one-to-one correspondence between the remainder and the index position. After determining the remainder, the index position is determined. The remainder is then assigned to the index position according to a preset method: remainder G ≥ 0, then the value is 1; remainder G < 0, then the value is -1. The remainder G is then superimposed at the corresponding index positions after being assigned a remainder according to the preset method. This process of taking the remainder for each element in a historical behavior sequence and superimposing the values ​​at the corresponding index positions yields an R-dimensional embedding vector corresponding to that historical behavior sequence.

[0181] After performing the above hashing process on each historical behavior sequence and / or each historical spatial trajectory sequence, an R-dimensional embedding vector is obtained for each historical behavior sequence and / or each historical spatial trajectory sequence.

[0182] It should be noted that during the training of the multi-intent prediction model based on the training sample dataset, the sampling time corresponding to each sample data in the training sample dataset must first be converted into a time-based feature. The model learns based on these time-based features. Time-based features include, but are not limited to: current hour segment, day of the week, time difference features, and hour-minute cross features. Specifically, the current hour segment is defined as follows: the day is divided into time periods, for example, dividing the day into 12 hour segments starting from 0:00, with each two-hour segment represented by a number from 1 to 12. The current hour segment is determined based on the sampling time. The day of the week is represented by numbers from 1 to 7, from Monday to Sunday. After determining the date to which the sampling time belongs, the number indicates the day of the week. The time difference feature is the time difference between the sampling time and the time of occurrence of a historical user behavior event that the user is interested in. This historical user behavior event can be a historical user behavior event corresponding to the user's target candidate intent, or it can be other historical user behavior events. The hour-minute cross feature is the feature obtained by concatenating the hour and minute values ​​of the sampling time after converting them into strings.

[0183] For example, during the training of a multi-intent prediction model based on a training sample dataset, frequency class features can be determined based on the sampling time corresponding to each sample data in the training sample dataset, and the model can also learn based on the frequency class features.

[0184] Frequency-based features include, but are not limited to: the frequency of historical user behavior events of interest to the user in the past F minutes since the sampling time; the frequency of historical user behavior events of interest to the user in the past S hours since the sampling time; and the frequency of historical user behavior events of interest to the user in the past J days since the sampling time. The historical user behavior events of interest to the user can be those corresponding to the user's target candidate intent, or other historical user behavior events. Based on these frequency-based features, the model can learn the degree of correlation between the target candidate intent occurring in the target scenario and the historical user behavior events of interest to the user.

[0185] like Figure 9 The illustration shows a multi-intent recommendation method according to an embodiment of this application, applied to an electronic device, specifically including:

[0186] Step S310: Predict whether the target scene is about to be triggered or detect whether the target scene has already been triggered. If it is predicted that the target scene is about to be triggered or detected that the target scene has already been triggered, execute step S320; otherwise, return to step S310.

[0187] Step S320: Determine if a valid model exists. If a valid model exists, proceed to step S330; otherwise, proceed to step S360 (recommend multiple preset target candidate intents).

[0188] In this embodiment, a correspondence between target scenes and models can be pre-set. By searching this correspondence, it can be determined whether there is a usable model in the target scene. If a valid model exists, step S330 is executed. If no valid model exists, an intent can be recommended to the user according to a pre-set strategy process, for example, recommending multiple preset target candidate intents.

[0189] Step S330: Obtain multiple target candidate intents of the user in the target scenario.

[0190] Because the time period in which the target scenario occurs is relatively fixed, or because significant events occur before or after this time period, the target scenario can be determined to have been triggered either by detecting that the current time has reached the start time of the target scenario, or by detecting that a significant event has occurred before the time period in which the target scenario occurs. If the target scenario is determined to have been triggered, multiple candidate intents of the user within that target scenario are obtained.

[0191] Step S340: Input multiple target candidate intentions into the model trained by the multi-intention prediction model training method to predict the probability of occurrence of each target candidate intention among multiple target candidate intentions in the target scene.

[0192] The multiple target candidate intentions of the user in the target scenario are input into the multi-intent prediction model trained by the multi-intent prediction model training method described in any of the above embodiments, and the occurrence probability of each target candidate intention among the multiple target candidate intentions in the target scenario is predicted.

[0193] Step S350: Recommend target candidate intents to the user based on the probability of occurrence of each target candidate intent among multiple target candidate intents in the target scenario. The probability of occurrence of the recommended target candidate intents is greater than or equal to a preset probability value.

[0194] For example, assuming the target scenario is a commuting scenario, multiple target candidate intentions in this scenario include: listening to music, driving, watching short videos, and taking the subway. The model trained according to the method described in the above embodiments predicts that the probability of the listening to music intention is 70%, the driving intention is 80%, the watching short videos intention is 30%, and the taking the subway intention is 20% in the commuting scenario. Assuming a preset probability value of 50%, when the probability of a target candidate intention is greater than or equal to 50%, the target candidate intention is recommended to the user. Therefore, in the commuting scenario, the target candidate intentions recommended to the user are listening to music and driving.

[0195] like Figure 10 The illustration shows another multi-intent recommendation method according to an embodiment of this application, applied to an electronic device, specifically including:

[0196] Step S410: Predict whether the target scene is about to be triggered or detect whether the target scene has already been triggered. If it is predicted that the target scene is about to be triggered or detected that the target scene has already been triggered, execute step S420; otherwise, return to step S410.

[0197] Step S420: Determine if a valid model exists. If a valid model exists, proceed to step S430; otherwise, proceed to step S460 (recommend multiple preset target candidate intents).

[0198] In this embodiment, a correspondence between target scenes and models can be pre-set. By searching this correspondence, it can be determined whether there is a usable model in the target scene. If a valid model exists, step S430 is executed. If no valid model exists, an intent can be recommended to the user according to a pre-set strategy process, for example, recommending multiple preset target candidate intents.

[0199] Step S430: When the target scene is detected to be triggered, obtain multiple target candidate intentions of the user in the target scene, as well as the user's historical behavior sequence and / or historical spatial trajectory sequence within the sixth preset time period before the current time.

[0200] Since the time period in which the target scenario occurs is relatively fixed, or there are significant events occurring before or after this time period, the target scenario can be determined to be triggered either when the current time reaches the start time of the target scenario, or when a significant event occurring before the time period of the target scenario is detected. If the target scenario is determined to be triggered, multiple candidate user intents within the target scenario are obtained, along with the user's historical behavior sequence and / or historical spatial trajectory sequence within a sixth preset time period prior to the current time. The sixth preset time period can be set as needed, for example, its duration could be 3 minutes, 5 minutes, etc.

[0201] Step S440: Input multiple target candidate intentions, historical behavior sequences and / or historical spatial trajectory sequences into the model trained by the multi-intention prediction model training method to predict the probability of occurrence of each target candidate intention among multiple target candidate intentions in the target scene.

[0202] Considering the personalized user experience, there is usually a series of behavioral sequences and / or spatial trajectory sequences before a target candidate intent occurs. During training, the model learns the user's historical behavioral sequences and / or historical spatial trajectory sequences, which can learn more accurate behavioral patterns. Thus, during prediction, the model will make a judgment by combining the user's historical behavioral sequences and / or historical spatial trajectory sequences within the current moment and the sixth preset time period before the current moment. In other words, the model makes predictions from multiple dimensions such as time, behavioral sequences, and / or spatial trajectory sequences, rather than just from the time dimension, which can improve prediction accuracy.

[0203] Step S450: Recommend target candidate intents to the user based on the probability of occurrence of each target candidate intent among multiple target candidate intents in the target scenario. The probability of occurrence of the recommended target candidate intents is greater than or equal to a preset probability value.

[0204] For example, assuming the target scenario is a commuting scenario, multiple target candidate intentions in this scenario include: listening to music, driving, watching short videos, and taking the subway. The model trained according to the method described in the above embodiments predicts that the probability of the listening to music intention is 70%, the driving intention is 80%, the watching short videos intention is 30%, and the taking the subway intention is 20% in the commuting scenario. Assuming a preset probability value of 50%, when the probability of a target candidate intention is greater than or equal to 50%, the target candidate intention is recommended to the user. Therefore, in the commuting scenario, the target candidate intentions recommended to the user are listening to music and driving.

[0205] Figure 11This is a schematic diagram of a recommendation interface that presents users with potential target intents. For example, when an electronic device is locked, services related to the target intents to be recommended can be displayed in message notifications on the lock screen. Figure 11 In example (a), the music app's playback interface 501 and the navigation app's navigation interface 502 are displayed in the message notification. After the user clicks the message notification and unlocks the device, the electronic device can directly jump to the application interface corresponding to the service related to the target candidate intent to be recommended. For instance, when the electronic device is unlocked, the service related to the target candidate intent to be recommended can be displayed as a floating notification at the top of the main screen interface. Figure 11 In section (b), the music app's playback interface 601 and the navigation app's navigation interface 602 are displayed in the message notification at the top of the main screen. After the user clicks the message notification, the electronic device can directly jump to the application interface corresponding to the service related to the target candidate intent to be recommended. For example, when the electronic device is unlocked, the app related to the target candidate intent to be recommended can be displayed floating in the message notification at the top of the main screen. Figure 11 In step (c), the music app 701 and the navigation app 702 are displayed in the message notification at the top of the main screen interface. This embodiment does not limit the specific display method of the intended target candidate.

[0206] It should be understood that the above examples are provided to help those skilled in the art understand the embodiments of this application, and are not intended to limit the embodiments of this application to the specific values ​​or scenarios illustrated. Those skilled in the art can obviously make various equivalent modifications or changes based on the above examples, and such modifications or changes also fall within the scope of the embodiments of this application.

[0207] The electronic device provided in this embodiment is used to execute the above-described multi-intent prediction model training method or the above-described multi-intent recommendation method, and therefore can achieve the same effect as the above-described implementation method.

[0208] When using integrated units, the electronic device may further include a processing module, a storage module, and a communication module. The processing module is used to control and manage the operation of the electronic device. The storage module supports the execution of stored program code and data. The communication module supports communication between the electronic device and other devices.

[0209] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.

[0210] In one embodiment, when the processing module is a processor and the storage module is a memory, the electronic device involved in this embodiment can be a device having... Figure 3 The device with the structure shown.

[0211] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the above-described related method steps to implement the multi-intent prediction model training method or the multi-intent recommendation method in the above embodiments.

[0212] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to implement the multi-intent prediction model training method or the multi-intent recommendation method described in the above embodiments.

[0213] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory. The memory is used to store computer execution instructions. When the apparatus is running, the processor can execute the computer execution instructions stored in the memory to cause the chip to execute the multi-intent prediction model training method in the above-described method embodiments.

[0214] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.

[0215] Through the above description of the embodiments, those skilled in the art will 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.

[0216] 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 apparatus, 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 apparatuses or units may be electrical, mechanical, or other forms.

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

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

[0219] 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, in essence, or 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 of 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.

[0220] It should be understood that the above description is merely to help those skilled in the art better understand the embodiments of this application, and is not intended to limit the scope of the embodiments of this application. Based on the examples given above, those skilled in the art can obviously make various equivalent modifications or changes. For example, some steps in the various embodiments of the above detection method may be unnecessary, or new steps may be added. Alternatively, any combination of two or more of the above embodiments may be used. Such modifications, changes, or combinations also fall within the scope of the embodiments of this application.

[0221] It should also be understood that the above description of the embodiments of this application focuses on highlighting the differences between the various embodiments. Any similarities or differences not mentioned can be referred to each other. For the sake of brevity, they will not be repeated here.

[0222] It should also be understood that the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0223] It should also be understood that in the embodiments of this application, "pre-setting" or "pre-defining" can be achieved by pre-saving the corresponding code, table or other means that can be used to indicate relevant information in the device (e.g., including electronic devices), and this application does not limit the specific implementation method.

[0224] It should also be understood that the methods, situations, categories, and classifications of embodiments in this application are for the convenience of description only and should not constitute a special limitation. Various methods, categories, situations, and features in embodiments can be combined without contradiction.

[0225] It should also be understood that, in the various embodiments of this application, unless otherwise specified or in case of logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced by each other, and the technical features in different embodiments can be combined to form new embodiments according to their inherent logical relationships.

[0226] Finally, it should be noted that 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 method for training a multi-intent prediction model, characterized in that, Applied to electronic devices, the method includes: Based on historical user behavior events that occurred in the target scenario, multiple target candidate intentions of the user are determined. The historical user behavior events occurred in the past N days, wherein the time period of the target scenario is fixed or there are significant events before and after the time period of the scenario. Based on the historical user behavior events corresponding to each of the plurality of target candidate intentions, a training sample dataset for the target scenario is generated. Each sample data in the training sample dataset includes: the sampling time corresponding to the sample data, and the label of the plurality of target candidate intentions at the sampling time. If the label is a first label, it indicates that the target candidate intention occurred at the sampling time; if the label is a second label, it indicates that the target candidate intention did not occur at the sampling time. A multi-intent prediction model is trained based on the training sample dataset. The multi-intent prediction model is used to predict the probability of occurrence of each of the multiple target candidate intents in the target scenario.

2. The multi-intent prediction model training method according to claim 1, characterized in that, The training sample dataset includes: sample data collected within a first preset time period before the occurrence of the historical user behavior event corresponding to each of the target candidate intentions; At each sampling time, the label corresponding to the target candidate intent is the first label. If the historical user behavior event corresponding to other target candidate intents besides the target candidate intent occurs within a second preset time period after the sampling time, the label corresponding to the other target candidate intents is the first label; otherwise, it is the second label.

3. The multi-intent prediction model training method according to claim 2, characterized in that, The training sample dataset also includes: sample data collected within a third preset time period before the occurrence of the historical user behavior event corresponding to each of the target candidate intentions, wherein the third preset time period is before the first preset time period; At each sampling time, the label corresponding to the target candidate intent is the second label. If the historical user behavior event corresponding to other target candidate intents besides the target candidate intent occurs within a second preset time period after the sampling time, the label corresponding to the other target candidate intents is the first label; otherwise, it is the second label.

4. The multi-intent prediction model training method according to claim 2 or 3, characterized in that, In each of the Y days within the past N days, no historical user behavior event corresponding to any of the target candidate intents has occurred. The training sample dataset also includes sample data collected in the target scenario on each of the Y days. At each sampling time, the label corresponding to the plurality of target candidate intents is the second label, wherein Y is less than N.

5. The multi-intent prediction model training method according to claim 1, characterized in that, The process of training a multi-intent prediction model based on the training sample dataset includes: For each sample data point in the training sample dataset, determine the user's historical behavior sequence and / or historical spatial trajectory sequence within a fourth preset time period prior to the sampling time. The multi-intent prediction model is trained based on the training sample dataset, the historical behavior sequence and / or the historical spatial trajectory sequence within the fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

6. The multi-intent prediction model training method according to claim 5, characterized in that, The step of training the multi-intent prediction model based on the training sample dataset, the historical behavior sequence and / or the historical spatial trajectory sequence within a fourth preset time period prior to the sampling time corresponding to each sample data in the training sample dataset, includes: Hash the historical behavior sequence and / or the historical spatial trajectory sequence within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset to obtain the historical behavior sequence feature value and / or the historical spatial trajectory feature value. The multi-intent prediction model is trained based on the training sample dataset and the historical behavior sequence feature values ​​and / or historical spatial trajectory feature values ​​within a fourth preset time period before the sampling time corresponding to each sample data in the training sample dataset.

7. The multi-intent prediction model training method according to claim 5 or 6, characterized in that, The step of determining the user's historical behavior sequence within a fourth preset time period prior to each sampling time corresponding to a sampling time in the training sample dataset includes: For each sample data point in the training sample dataset, multiple historical behavior records within the fourth preset time period prior to the sampling time are obtained. Each historical behavior record includes: the name of the historical user behavior event and the time when the historical user behavior event occurred. Based on the occurrence time of the historical user behavior events, the Q subsequent historical behavior records are merged into a historical behavior sequence, where Q is a positive integer.

8. The multi-intent prediction model training method according to claim 5 or 6, characterized in that, The step of obtaining the user's historical spatial trajectory sequence within a fourth preset time period prior to each sampling time corresponding to a sampling time in the training sample dataset includes: For each sample data in the training sample dataset, at the sampling time corresponding to each sample data, multiple base station connection records within the fourth preset time period before the sampling time are obtained. Each base station connection record includes: the connection time with the base station and the base station's identification code. Based on the connection time with the base station, the P subsequent base station connection records are merged into a historical spatial trajectory sequence, where P is a positive integer.

9. The multi-intent prediction model training method according to any one of claims 1 to 3, characterized in that, The step of determining multiple target candidate intents of a user based on historical user behavior events occurring in the target scenario includes: Obtain multiple initial candidate intents in the target scenario; Statistically determine the frequency of each initial candidate intent among the multiple initial candidate intents in the target scenario within the fifth preset time period; The initial candidate intents whose frequency is greater than or equal to a preset frequency are determined as the user's target candidate intents.

10. The multi-intent prediction model training method according to any one of claims 1 to 3, characterized in that, After determining multiple target candidate intentions of the user based on historical user behavior events occurring in the target scenario, the process further includes: Based on the historical user behavior events corresponding to each of the plurality of target candidate intents, a test sample dataset for the target scenario is generated. The test sample dataset is obtained by sampling the target scenario over the past M days at preset time intervals. Each test sample dataset includes: the sampling time and the label of the plurality of target candidate intents at the sampling time. The past M days and the past N days do not include the same day. At each sampling time, if the historical user behavior event corresponding to the target candidate intent occurs within a second preset time period after the sampling time, the label corresponding to the target candidate intent is the first label; otherwise, it is the second label. After training the multi-intent prediction model based on the training sample dataset, the process further includes: The multi-intent prediction model is tested based on the test sample dataset to obtain a multi-intent prediction model that meets the preset requirements.

11. A multi-intent recommendation method, characterized in that, Applied to electronic devices, including: When it is predicted that the target scenario is about to be triggered or the target scenario has been detected, multiple target candidate intentions of the user in the target scenario are obtained. The plurality of target candidate intentions are input into the model trained by the method of any one of claims 1 to 4, 9 and 10 above, to predict the probability of occurrence of each of the plurality of target candidate intentions in the target scenario; Based on the probability of occurrence of each of the multiple target candidate intentions in the target scenario, a target candidate intention is recommended to the user, wherein the probability of occurrence of the recommended target candidate intention is greater than or equal to a preset probability value.

12. A multi-intent recommendation method, characterized in that, Applied to electronic devices, including: When it is predicted that the target scenario is about to be triggered or the target scenario has been detected, multiple target candidate intentions of the user under the target scenario are obtained, as well as the user's historical behavior sequence and / or historical spatial trajectory sequence within a sixth preset time period before the current time. The plurality of target candidate intentions, the historical behavior sequence and / or the historical spatial trajectory sequence are input into the model trained by the method of any one of claims 5 to 8 above, and the probability of occurrence of each of the plurality of target candidate intentions in the target scene is predicted; Based on the probability of occurrence of each of the multiple target candidate intentions in the target scenario, a target candidate intention is recommended to the user, wherein the probability of occurrence of the recommended target candidate intention is greater than or equal to a preset probability value.

13. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory being used to store instructions that, when executed by the processor, cause the electronic device to perform the multi-intent prediction model training method as described in any one of claims 1 to 10, or to perform the multi-intent recommendation method as described in claim 11 or 12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, the computer program including program instructions, which, when executed, implement the multi-intent prediction model training method as described in any one of claims 1 to 10, or the multi-intent recommendation method as described in claim 11 or 12.

15. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the multi-intent prediction model training method as described in any one of claims 1 to 10, or to perform the multi-intent recommendation method as described in claim 11 or 12.