Method for processing behavioral events, service push method, device and server
By segmenting user behavior event sequences and extracting neural network features, the problem of high algorithm complexity in traditional modeling methods is solved, and more efficient user representation sequence acquisition and personalized service push is achieved.
Patent Information
- Application Number
- CN202210650876.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-10
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-06-10
AI Technical Summary
The traditional modeling method has high algorithm complexity when obtaining data characteristics of user behavior data, resulting in inefficiency.
By segmenting the event sequence, using neural network to extract the event subsequence feature to obtain user characterization sequences, reducing the complexity of feature extraction.
It effectively reduces the complexity of obtaining user characterization sequences, improves the efficiency and accuracy of feature extraction, and supports more efficient user portraits and personalized service push.
Smart Images

Figure CN115017992B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular, to a method for processing behavior events, a method for service push, a device, and a server. Background Art
[0002] With the development of communication technology, intelligent terminals are widely used. Generally, user behavior data can be obtained through the operations of users on the terminals, and the user behavior data can be used to profile users, which helps to provide personalized services for users.
[0003] In traditional technologies, when profiling users using user behavior data, mainly a modeling method is adopted to analyze the behavior data sequence composed of user behavior data to obtain data features, analyze the dependency relationship of the behavior data sequence according to the data features, and then profile users according to the dependency relationship.
[0004] However, when obtaining data features using traditional modeling methods, there is a problem of relatively high algorithm complexity. Summary of the Invention
[0005] Embodiments of the present application provide a method for processing behavior events, a method for service push, a device, and a server, which can reduce the algorithm complexity of obtaining data features of a behavior data sequence.
[0006] In a first aspect, embodiments of the present application provide a method for processing behavior events, including:
[0007] Segmenting an event sequence to obtain a plurality of event subsequences; the event sequence is a sequence generated according to user behavior events within a preset time period;
[0008] Inputting the plurality of event subsequences into a first network for feature extraction to obtain a feature sequence, and inputting the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavior events; both the first network and the second network are neural networks for processing sequence data.
[0009] In a second aspect, embodiments of the present application provide a method for service push, including:
[0010] Obtaining a user representation sequence by using the method described in the first aspect;
[0011] Determining the dependency relationship between events in the event sequence according to the user representation sequence;
[0012] Determining a target service according to the dependency relationship and pushing the target service to a user terminal.
[0013] In a third aspect, an embodiment of the present application provides a processing device for behavior events, including:
[0014] A segmentation module, configured to segment an event sequence to obtain a plurality of event subsequences; the event sequence is a sequence generated based on user behavior events within the preset time period;
[0015] A processing module, configured to input the plurality of event subsequences into a first network for feature extraction to obtain a feature sequence, and input the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavior event; both the first network and the second network are neural networks for processing sequence data.
[0016] In a fourth aspect, an embodiment of the present application provides a service push device, including:
[0017] An acquisition module, configured to acquire a user representation sequence by using the method described in the first aspect;
[0018] A determination module, configured to determine the dependency relationship between events in the event sequence according to the user representation sequence;
[0019] A push module, configured to determine a target service according to the dependency relationship and push the target service to a user terminal.
[0020] In a fifth aspect, an embodiment of the present application provides a server, including a memory and a processor. When a computer program stored in the memory is executed by the processor, the processor is caused to execute the steps of the method for processing behavior events described in the first aspect and the steps of the service push method described in the second aspect.
[0021] In a sixth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for processing behavior events described in the first aspect and the steps of the service push method described in the second aspect are implemented.
[0022] In a seventh aspect, an embodiment of the present application provides a computer program product, including a computer program. When the computer program is executed by a processor, the steps of the method for processing behavior events described in the first aspect and the steps of the service push method described in the second aspect are implemented.
[0023] The processing method, service push method, device and server for the above-mentioned behavior events segment the event sequence to obtain multiple event subsequences, input the multiple event subsequences into the first network for feature extraction, and input the obtained feature sequence into the second network for feature extraction, so as to obtain the user representation sequence corresponding to the user behavior event. In the process of obtaining the user representation sequence in this embodiment, since the event sequence is segmented, the first network no longer extracts features from the entire event sequence, but extracts features from multiple event subsequences segmented from the entire event sequence. And since the first network is a neural network for processing sequence data, it effectively reduces the complexity of obtaining the feature sequence. In addition, since the feature sequence obtained by extracting features from multiple event subsequences through the first network is much shorter than the length of the event sequence, when the feature sequence is input into the second network for feature extraction to obtain the user representation sequence, since the second network is a neural network for processing sequence data, the complexity of obtaining the user representation sequence based on the feature sequence and the second network is much lower than the complexity of directly extracting features from the entire event sequence through the second network. Therefore, through the above processing process, the complexity of obtaining the user representation sequence is effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0025] Figure 1 It is an application environment diagram of the processing method for behavior events in an embodiment;
[0026] Figure 2 It is a flowchart of the processing method for behavior events in an embodiment;
[0027] Figure 3 It is a schematic diagram of a user's operation on a terminal in an embodiment;
[0028] Figure 4 It is a schematic diagram of a user's operation on a terminal in another embodiment;
[0029] Figure 5 It is a schematic diagram of a user's operation on a terminal in another embodiment;
[0030] Figure 6 It is a flowchart of the processing method for behavior events in another embodiment;
[0031] Figure 7Schematic diagram of the network structures of the first network and the second network provided for one embodiment;
[0032] Figure 8 Schematic diagram for encoding and processing an event subsequence in one embodiment;
[0033] Figure 9 Flowchart of the method for processing behavior events in another embodiment;
[0034] Figure 10 Flowchart of the method for processing behavior events in another embodiment;
[0035] Figure 11 Flowchart of the method for processing behavior events in another embodiment;
[0036] Figure 12 Schematic diagram of the network structures of the first network and the second network provided for one embodiment;
[0037] Figure 13 Flowchart of the service push method in one embodiment;
[0038] Figure 14 Block diagram of the structure of the behavior event processing device in one embodiment;
[0039] Figure 15 Block diagram of the structure of the behavior event processing device in one embodiment;
[0040] Figure 16 Block diagram of the structure of the behavior event processing device in one embodiment;
[0041] Figure 17 Block diagram of the structure of the service push device in one embodiment;
[0042] Figure 18 Internal structure diagram of a computer device in one embodiment. Detailed implementation manners
[0043] In order to make the objectives, technical solutions and advantages of the present application clearer and more understandable, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The method for processing behavior events provided by the embodiments of the present application can be applied to, for example Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store user behavior events, event sequences, etc. that the server 104 can store. The data storage system can be integrated on the server 104, or can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, Internet of Things devices, and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, etc. The portable wearable devices can be smart watches, smart bracelets, etc. The server 104 can be implemented by an independent server or a server cluster composed of multiple servers.
[0045] In one embodiment, as Figure 2 shown, a method for processing behavior events is provided. Taking the server in Figure 1 as an example, the method includes the following steps:
[0046] S201, segment the event sequence to obtain multiple event subsequences; the event sequence is a sequence generated according to user behavior events within a preset time period.
[0047] It should be noted that the user behavior events in this embodiment refer to interactive behavior events generated by a user's operations on the terminal. Optionally, the operations that the user performs on the terminal can be operations such as sliding an application window, browsing a page, clicking on a page, posting a post, starting an application (APP), closing an APP, etc. Exemplarily, the operations that the user performs on the terminal can be, for example, Figure 3 the "switching switch" operation clicked by the user on the terminal page as shown in Figure 4 , or can be the "text message editing" operation triggered by the user on the terminal page as shown in Figure 5 ; and for another example, it can also be the "login" operation clicked by the user on the terminal page as shown in
[0048] Optionally, the preset time period in this embodiment can be one hour, one day, one week, one month, one year, etc. Exemplarily, the event sequence in this embodiment can be a sequence generated by user behavior events within one hour, or a sequence generated by user behavior events within one week, or alternatively, a sequence generated by user behavior events within one month. Optionally, in this embodiment, the server can divide the event sequence according to a preset segmentation period to obtain multiple event subsequences; or, it can also divide the event sequence non-periodically to obtain multiple event subsequences, as long as the above-mentioned event subsequences are obtained. Optionally, each obtained event subsequence can include one or more user behavior events. Taking the above event sequence as a sequence generated by user behavior events within one week, optionally, the server can divide the event sequence with a day as the segmentation period to obtain multiple event subsequences; or, it can also divide the event sequence non-periodically to obtain multiple event subsequences. The segmentation method of the event sequence in this embodiment is not limited.
[0049] It should be noted that the above event sequence is a sequence generated according to user behavior events within a preset time period, and multiple user behavior events will be generated within the preset time period. Therefore, the generated event sequence includes multiple user behavior events. In this way, when the event sequence is divided, each obtained event subsequence also includes one or more user behavior events. However, it can be understood that the number of user behavior events included in each event subsequence is less than the number of user behavior events included in the event sequence. For example, the event sequence generated according to user behavior events within a preset time period includes M user behavior events, and each event subsequence obtained by dividing this event sequence includes N user behavior events, where N is less than M.
[0050] S202, input the multiple event subsequences into a first network for feature extraction to obtain a feature sequence, and input the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavior event; both the first network and the second network are neural networks for processing sequence data.
[0051] Among them, the user representation sequence is the feature sequence of user behavior events. Further, the obtained user representation sequence can be input into downstream tasks, and the downstream tasks can perform other processing based on the user representation sequence. For example, in downstream tasks, the user representation sequence can be analyzed to determine the dependency relationships between user behavior events in the event sequence, so that the user's preferences can be inferred based on the dependency relationships between user behavior events. Additionally, information such as the services the user prefers to use and the order of using services can be determined based on the inferred user preferences. Optionally, in downstream tasks, a neural network model obtained through a supervised training method can be used to analyze the user representation sequence, or a neural network model obtained through an unsupervised training method can be used to analyze the user representation sequence to determine the dependency relationships between user behavior events in the event sequence.
[0052] Exemplarily, the first network and the second network for processing sequence data in this embodiment can be any one of a long short-term memory network and a self-attention network. Optionally, the network structures of the first network and the second network can be the same or different. For example, both the first network and the second network can be long short-term memory networks, or both the first network and the second network can be self-attention networks. Or, the first network can be a long short-term memory network and the second network can be a self-attention network, or the first network can be a self-attention network and the second network can be a long short-term memory network. This application embodiment does not impose any restrictions. Further, as an optional implementation manner, when the network structures of the first network and the second network are the same and the parameters of the first network and the second network are different, the expression capabilities of the first network and the second network can be enhanced.
[0053] Optionally, in this embodiment, the first network can include multiple sub-networks or can include one network. If the first network includes multiple sub-networks, multiple event sub-sequences can be respectively input into corresponding sub-networks for feature extraction to obtain a feature sequence. If the first network is one, multiple event sub-sequences can be sequentially input into the same network for feature extraction to obtain a feature sequence. Optionally, in the scenario where the first network includes multiple sub-networks, the network parameters of the multiple sub-networks can be the same or different.
[0054] It can be understood that each event sub-sequence includes multiple events, and the first network can perform feature extraction on each event in the event sub-sequence. Therefore, the obtained feature sequence includes the feature sequences corresponding to each event in the event sub-sequence. Optionally, in this embodiment, the feature sequences in the feature sequence can be simultaneously input into the second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event, or the feature sequences in the feature sequence can be sequentially input into the second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event.
[0055] It is understandable that since both the first network and the second network are neural networks for processing sequential data, their complexity in performing processing operations such as feature extraction is related to the length of the sequential data being processed. The complexity of the first network and the second network in performing feature extraction on the sequential data can be represented by O(sequence length n ), where, optionally, n is a positive integer not less than 2.
[0056] Taking the example that both the first network and the second network are self-attention networks, when they perform feature extraction on an event sequence of length T, their complexity is O(T 2 ). If the event sequence is segmented into N event subsequences (assuming the length of each event subsequence is T / N), then the complexity of the first network in performing feature extraction on each event subsequence will be O(T 2 / N 2 ). Since there are a total of N event subsequences, the complexity of the first network in performing feature extraction on all event subsequences is O(T 2 / N). Additionally, since the length of the obtained feature sequence is N, the complexity of the second network in performing feature extraction on the feature sequence is O(N 2 ), but N is much smaller than T. Therefore, the complexity of the second network in performing feature extraction on the feature sequence can be ignored. That is to say, the complexity of finally obtaining the user representation sequence corresponding to the user behavior event using this method is O(T 2 / N), which is reduced by N times compared to the complexity of O(T 2 ) when performing feature extraction on an event sequence of length T. Further, it can be seen from the above derivation process that the finer the segmentation of the event sequence, the more the complexity of finally obtaining the user representation sequence corresponding to the user behavior event is reduced.
[0057] In the above method for processing behavior events, since the event sequence is segmented, the first network no longer performs feature extraction on the entire event sequence, but on multiple event subsequences segmented from the entire event sequence. And since the first network is a neural network for processing sequential data, it effectively reduces the complexity of obtaining the feature sequence. Additionally, since the first network performs feature extraction on multiple event subsequences, the length of the obtained feature sequence is much smaller than the length of the event sequence. When the feature sequence is input into the second network for feature extraction to obtain the user representation sequence, since the second network is a neural network for processing sequential data, the complexity of obtaining the user representation sequence based on the feature sequence and the second network is much smaller than the complexity of performing feature extraction on the entire event sequence by the second network. Therefore, through the above processing process, the complexity of obtaining the user representation sequence is effectively reduced.
[0058] Figure 6 It is a flowchart of a method for processing behavioral events in another embodiment. Figure 7 It is a schematic diagram of the network structures of the first network and the second network provided by an embodiment of the present invention. This embodiment relates to an optional implementation process of how a server obtains a user representation sequence through the first network and the second network in a scenario where the first network includes multiple first sub-networks. As Figure 6 shown, the method includes:
[0059] S301, segment the event sequence to obtain multiple event subsequences.
[0060] S302, input the multiple event subsequences into multiple first sub-networks for feature extraction to obtain a feature sequence; wherein, one first sub-network corresponds to inputting one or more event subsequences.
[0061] In this embodiment, the number of multiple first sub-networks may be the same as the number of multiple event subsequences, or may be less than the number of multiple event subsequences. For example, one first sub-network may correspond to one event subsequence, or one first sub-network may correspond to multiple event subsequences. Exemplarily, assuming there are 10 event subsequences, if the first network includes 10 first sub-networks, these 10 event subsequences can be respectively input into the corresponding first sub-networks for feature extraction to obtain a feature sequence; if the first network includes 5 first sub-networks, then two event subsequences can be input into each first sub-network, and the input event subsequences are subjected to feature extraction through these 5 first sub-networks to obtain the above-mentioned feature sequence; if the first network includes 6 first sub-networks, then one event subsequence can be input into the first sub-network, two event subsequences can be input into the second sub-network, three event subsequences can be input into the third network, one event subsequence can be input into the fourth sub-network, one event subsequence can be input into the fifth network, and two event subsequences can be input into the sixth sub-network, and the input event subsequences are subjected to feature extraction through these 6 first sub-networks to obtain the above-mentioned feature sequence. It can be understood that in the scenario where the number of first sub-networks is less than the number of multiple event subsequences, the number of event subsequences input into each first sub-network is not limited to the above exemplary description, and the number of event subsequences input into each first sub-network in this embodiment is not limited.
[0062] Optionally, as an alternative implementation of this embodiment, the parameters of the multiple first sub-networks included in the first network are the same. It should be noted here that if the parameters of the multiple first networks included in the first network are different, more storage space of the server will be occupied when inputting multiple event subsequences into multiple first sub-networks for feature extraction. When the parameters of the multiple first sub-networks included in the first network are the same, the storage space occupied by the server will be relatively reduced.
[0063] S303. Input the feature sequence into the second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event.
[0064] In the method for processing behavior events provided by the embodiment of the present invention, since the first network includes multiple first sub-networks, and one first sub-network corresponds to inputting one or more event subsequences, the input event subsequences can be processed in parallel by multiple first sub-networks to quickly obtain the feature sequence, reducing the time to obtain the feature sequence and improving the efficiency of obtaining the feature sequence. Furthermore, the waiting duration for the second network to wait for the input of the feature sequence is shortened, and the efficiency of obtaining the user representation sequence through the second network is further improved.
[0065] Figure 8 It is a schematic diagram for encoding and processing the event subsequence provided in this embodiment. Figure 9 It is a schematic flowchart of the method for processing behavior events in another embodiment. In Figure 8 In the shown scenario, based on the above embodiments, this embodiment relates to the specific process of obtaining the feature sequence through the first network. Optionally, the above S302 may include the following steps:
[0066] S401. Perform encoding processing on the event subsequence to obtain the vector sequence corresponding to the event subsequence.
[0067] Among them, the encoding processing refers to the processing process of converting the event subsequence into a vector sequence. Generally, the event subsequence includes the category information of the behavior event and the floating-point information of the behavior event. Exemplarily, the category information of the behavior event may be literal information such as the identifier of the behavior event and the category of the behavior event; the floating-point information of the behavior event may be digital information such as the occurrence time of the behavior event, the event interval between adjacent behavior events, and the duration of the behavior event. As an alternative implementation, the type information of the behavior event and the floating-point information of the behavior event in the event subsequence can be respectively encoded to obtain the vector sequence corresponding to the event subsequence. Optionally, the encoding processing in this embodiment may be embedding layer encoding processing, and the embedding layer may be located inside the first sub-network or outside the first sub-network.
[0068] Optionally, in this embodiment, the server may perform encoding processing on the event subsequence through the following steps to obtain a vector sequence corresponding to the event subsequence:
[0069] Step A: Perform first encoding processing on the category information of the behavior events in the event subsequence to obtain a first vector corresponding to the event subsequence.
[0070] Optionally, the first encoding processing may be embedding encoding processing. That is, the server may perform embedding encoding processing on the category information of the behavior events in the event subsequence to obtain a first vector corresponding to the event subsequence.
[0071] Step B: Perform second encoding processing on the floating-point information of the behavior events in the event subsequence to obtain a second vector corresponding to the event subsequence.
[0072] Optionally, the server may perform second encoding processing on the floating-point information of the behavior events in the event subsequence through any one of the following processing methods to obtain a second vector corresponding to the event subsequence.
[0073] Method 1: Determine the target bin corresponding to the floating-point information of the behavior events in the event subsequence according to the value of the floating-point information and the value range of each bin, and determine the vector of the target bin as the second vector.
[0074] Method 2: Determine the second vector according to the floating-point information of the behavior events in the event subsequence and the unit vector. Optionally, the product of the floating-point information of the behavior events in the event subsequence and the unit vector may be determined as the second vector.
[0075] Method 3: Perform normalization processing on the floating-point information and determine it as the second vector.
[0076] It should be noted that when the server performs second encoding processing on the floating-point information of the behavior events in the same event subsequence, the same processing method is adopted, and different processing methods may be adopted when performing second encoding processing on the floating-point information of the behavior events in different event subsequences.
[0077] Step C: Obtain a vector sequence corresponding to the event subsequence according to the first vector and the second vector.
[0078] Optionally, the server may add vectors with the same dimensions in the first vector and the second vector to obtain a vector sequence corresponding to the event subsequence; or, the server may splice vectors with different dimensions in the first vector and the second vector to obtain a vector sequence corresponding to the event subsequence; or, the server may add vectors with the same dimensions in the first vector and the second vector and splice vectors with different dimensions in the first vector and the second vector to obtain a vector sequence corresponding to the event subsequence. It should be noted that if vectors with different dimensions in the first vector and the second vector are spliced, the spliced vector sequence may also be processed by a fully connected network into a sequence with the same vector dimension as that processed by the first network, so as to obtain a vector sequence corresponding to the event subsequence.
[0079] Exemplarily, the process of encoding an event subsequence to obtain a vector sequence corresponding to the event subsequence may be as Figure 8 shown. For the category information of the behavior events in the event subsequence, Figure 8 for the category information of the events in Figure 8 , the square groups formed by behavior units represent the category information of the behavior events corresponding to the same ID. For the discrete binning of floating-point information, the square groups formed by behavior units represent the vectors corresponding to the same bin. For example, the server may perform a first encoding process on the category information corresponding to ID2, and the first vector obtained is the vector represented by the row of square groups corresponding to ID2; for the floating-point information of the behavior events in the event subsequence, for example, the server may determine that the target bin corresponding to the floating-point information is bin 5 according to the value of the floating-point information and the value range of each bin, and determine the vector represented by the row of square groups corresponding to this bin 5 as the second vector. Or, for the floating-point information of the behavior events in the event subsequence (for example, Figure 8 shown duration t), the server may also multiply the floating-point information of the behavior events in the event subsequence by Figure 8 shown unit vector to determine the second vector corresponding to the event subsequence. Further, the obtained first vector and second vector are spliced head to tail to obtain a spliced vector sequence. As Figure 8 shown, after splicing the above first vector and second vector head to tail, a vector sequence formed by 12 squares is obtained, and then the spliced vector sequence is processed by a fully connected network into a vector sequence with the same dimension as the vector sequence processed by the first sub-network. For example, if the first sub-network can process a vector sequence with a length of 4 squares, then the vector sequence formed by 12 squares can be linearly transformed to obtain a vector sequence formed by
[0080] S402. Input the vector sequence into the first sub-network for semantic feature extraction to obtain a semantic feature sequence corresponding to the event subsequence.
[0081] As an alternative implementation, the first sub-network can be used to extract semantic features from the input vector sequence to obtain semantic feature vectors corresponding to each event in the event subsequence, and the semantic feature vectors corresponding to each event are aggregated to obtain a semantic feature sequence corresponding to the event subsequence. Optionally, the aggregation process performed on the semantic feature vectors corresponding to each event can be maximization, minimization, or averaging.
[0082] S403. Obtain a feature sequence according to the semantic feature sequence corresponding to each event subsequence.
[0083] Optionally, the server can combine the semantic feature sequences corresponding to each event subsequence according to the chronological order of each event subsequence to obtain the above-mentioned feature sequence.
[0084] In this embodiment, by encoding the event subsequence, the event subsequence can be uniformly processed, making the obtained vector sequence corresponding to the event subsequence more unified. Therefore, when the unified vector sequence is input into the first sub-network, the complexity of the first sub-network for extracting semantic features from the input vector sequence can be reduced, the efficiency of obtaining the semantic feature sequence corresponding to the event subsequence can be improved, and then the feature sequence can be quickly obtained according to the semantic feature sequence corresponding to each event subsequence. Since the efficiency of obtaining the feature sequence is improved, the efficiency of inputting the obtained feature sequence into the second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event is further improved.
[0085] In addition, since the event subsequence includes the category information of the behavior event and the floating-point information of the behavior event, by performing a first encoding process on the category information of the behavior event, a first vector corresponding to the event subsequence can be obtained, and by performing a second encoding process on the floating-point information of the behavior event, a second vector corresponding to the event subsequence can be obtained. The vector sequence corresponding to the event subsequence obtained according to the first vector and the second vector contains both the category information of the behavior event and the floating-point information of the behavior event, that is, two different types of information are integrated into the vector sequence, making the information contained in the vector sequence corresponding to the event subsequence relatively rich.
[0086] Figure 10 It is a schematic flowchart of a processing method for behavior events in another embodiment. This embodiment relates to the specific process of obtaining the user representation sequence through the second network. Optionally, the above-mentioned "inputting the feature sequence into the second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event" may include the following steps:
[0087] S501: Input the feature sequence into the second network to extract semantic features, and obtain a semantic feature vector corresponding to the feature sequence.
[0088] S502 , performing aggregation processing on the semantic feature vectors corresponding to the feature sequence to obtain a user representation sequence.
[0089] It should be noted that, for the descriptions in S501-S502 above, reference may be made to the relevant descriptions in S402 above, and the effects are similar, so this embodiment will not be repeated here.
[0090] The above embodiment mainly introduces the process of obtaining a feature sequence. Through the above process, multiple event subsequences are input into the first network for feature extraction to obtain a feature sequence. The process of the above embodiment involves the process of obtaining multiple event subsequences based on the event sequence. Therefore, the following Figure 11 The embodiment introduces the process of obtaining an event subsequence in an optional manner. Figure 11 FIG. 1 is a flow chart of a method for processing a behavior event in another embodiment. Based on the above embodiment, as an optional implementation of the above S301, it specifically includes:
[0091] S601 : Segment the event sequence according to a preset segmentation period to obtain a plurality of candidate subsequences.
[0092] Optionally, the preset segmentation period may be a day, a week, or a month, etc. Optionally, the server may segment the event sequence according to the length of the preset segmentation period to obtain multiple candidate subsequences.
[0093] S602: Preprocess each candidate subsequence to obtain each event subsequence.
[0094] Optionally, the preprocessing performed on each candidate subsequence in this embodiment may be to eliminate abnormal user behavior events in the candidate subsequence, or, if the length of the candidate subsequence is greater than a preset length threshold, truncate the sequence portion of the candidate subsequence that is greater than the length threshold, or, if the length of the candidate subsequence is less than the preset length threshold, pad the candidate subsequence so that the length of the candidate subsequence is equal to the preset length threshold.
[0095] In this embodiment, the server can quickly divide the event sequence into multiple candidate subsequences according to a preset division period, and then pre-process each candidate subsequence, so as to make the obtained event subsequences more accurate and unified, thereby ensuring the accuracy and uniformity of the obtained event subsequences.
[0096] In the scenario of preprocessing each candidate subsequence described above, the preprocessing performed may be to truncate the sequence part in the candidate subsequence that is greater than a preset length threshold. In one embodiment, the above S602 includes: determining whether to truncate the candidate subsequence according to the length of the candidate subsequence and the preset length threshold to obtain an event subsequence.
[0097] Optionally, the server may determine whether to truncate the candidate subsequence according to the difference between the length of the candidate subsequence and the preset length threshold, or may also determine whether to truncate the candidate subsequence according to the ratio of the length of the candidate subsequence to the preset length threshold. Optionally, if the difference between the length of the candidate subsequence and the preset length threshold is greater than 0, it indicates that the length of the candidate subsequence is greater than the preset length threshold, and then the sequence part in the candidate subsequence that is greater than the preset length threshold can be truncated to obtain the above event subsequence; for another example, if the ratio of the length of the candidate subsequence to the preset length threshold is greater than l, it indicates that the length of the candidate subsequence is greater than the preset length threshold, and then the sequence part in the candidate subsequence that is greater than the preset length threshold can be truncated to obtain the above event subsequence.
[0098] In this embodiment, the process by which the server determines whether to truncate the candidate subsequence according to the length of the candidate subsequence and the preset length threshold is relatively fast and accurate, and can quickly and accurately determine whether to truncate the candidate subsequence, thereby improving the efficiency and accuracy of obtaining the event subsequence.
[0099] In some scenarios, it is possible that the obtained candidate subsequence is empty, and then the server may add a preset virtual event to the empty candidate subsequence. In one embodiment, the above S602 includes: if the candidate subsequence is empty, adding a preset virtual event to the candidate subsequence to obtain an event subsequence; where the category information of the virtual event is a fixed identifier, and the floating-point information of the virtual event is 0.
[0100] Optionally, in some scenarios, the user may not operate on the terminal for a long time and there is no interaction behavior event with the terminal. Then, the candidate subsequence obtained by the server may not include user behavior events, that is, the obtained candidate subsequence is empty. Then the server may add a preset virtual event with the category information being a fixed identifier and the floating-point information being 0 to the candidate subsequence, and determine the candidate subsequence added with the preset virtual event as the above event subsequence.
[0101] In this embodiment, if the candidate subsequence obtained by the server is empty, by adding a preset virtual event to the candidate subsequence, it can be ensured that the obtained event subsequence includes user behavior events, ensuring the richness of the obtained event subsequence.
[0102] For the convenience of understanding by those skilled in the art, the method for processing behavioral events provided by the present disclosure will be introduced in detail by taking the first network as including multiple first sub-networks, with one first sub-network corresponding to one event subsequence, as Figure 12 shown, the method may include:
[0103] S1. According to a preset segmentation period, segment the event sequence to obtain multiple event subsequences S0, S1, ……, S N ; where the event sequence is a sequence generated according to user behavioral events within a preset time period.
[0104] S2. Perform a first encoding process on the category information of the behavioral events in the event subsequences S0, S1, ……, S N to obtain a first vector corresponding to the event subsequence, perform a second encoding process on the floating-point information of the behavioral events in the event subsequence to obtain a second vector corresponding to the event subsequence, and obtain a vector sequence corresponding to the event subsequence according to the first vector and the second vector.
[0105] S3. Input the vector sequence into the first sub-network for semantic feature extraction to obtain a semantic feature vector corresponding to each event in the event subsequence, and perform an aggregation process on each semantic feature vector to obtain a semantic feature sequence.
[0106] S4. According to the time order of each event subsequence, combine the semantic feature sequences corresponding to each event subsequence to obtain feature sequences O0, O1, ……, O N .
[0107] S5. Input the feature sequences O0, O1, ……, O N into the second network for feature extraction to obtain a user representation sequence corresponding to the user behavioral events.
[0108] Next, taking the first network and the second network both being self-attention networks and inputting multiple event subsequences into the corresponding first network for feature extraction as an example, the process of obtaining the user representation sequence is described as follows. Please continue to refer to Figure 12 , first, segment the event sequence to obtain event subsequences S0, S1, ……, S N , input the obtained event subsequence S0 into the corresponding self-attention network for feature extraction to obtain a feature sequence O0 corresponding to the event subsequence S0, input the obtained event subsequence S1 into the corresponding self-attention network for feature extraction to obtain a feature sequence O1 corresponding to the event subsequence S1, and so on, to obtain event subsequences S0, S1, ……, S N corresponding feature sequences O0, O1, ……, O N , and the obtained feature sequences O0, O1, ……, ON Input it into the second network (self-attention network) for feature extraction to obtain the user representation sequence E corresponding to the user behavior event.
[0109] Further, taking the first network and the second network as self-attention networks as an example, the following takes the input of multiple event subsequences into the first network for feature extraction to obtain the feature sequence as an example to illustrate the construction method of the self-attention network in this embodiment:
[0110] a) Assume that the input multiple event subsequences are X ∈ R T×d , and the learnable network parameters of the self-attention network include W q ∈ R d×d , W k ∈ R d×d , W v ∈ R d×d . Among them, R represents real values, T represents the length of the event subsequence, and d represents the dimension of the event subsequence. Then, Q = XW q , K = XW k , V = XW v .
[0111] b) Split Q, K, and V into N h heads. Then, for the h-th head
[0112]
[0113] c) Combine the calculation results of each head to obtain:
[0114] MultiHead(X) = Concat(head1, head2,..., head Nh )W 0
[0115] In the formula, W 0 is the learnable parameter of the self-attention network.
[0116] d) Define the calculation of the feed-forward neural network (Feed Forward Neural Networks, FFN) to obtain:
[0117] FFN(x) = max(0, xW1 + b)W2 + b2,
[0118] In the formula, W1 ∈ R d×d , b1 ∈ R d , W2 ∈ R d×d , b2 ∈ R d are the learnable parameters of the self-attention network.
[0119] e) The output O of the self-attention network is obtained through layer normalization processing and residual operation as follows: H' = LayerNorm(MultiHead(X) + X), O = FFN(H') + H'.
[0120] Further, f) multiple feature fusions can be performed by stacking multiple layers of layer normalization processing and residual operation, and the output of the last layer is taken as the feature sequence of the final output of the self-attention network.
[0121] Optionally, in this embodiment, the structures of the first network and the second network are the same, but the parameters of the first network and the second network are different. The different parameters can enhance the expression capabilities of the first network and the second network.
[0122] It should be noted that the construction method of the second network is the same as that of the first network. For the construction method of the second network, reference can be made to the above description, and details will not be repeated in this embodiment.
[0123] It should be noted that for the descriptions in S1 - S5 above, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar. Details will not be repeated in this embodiment.
[0124] In one embodiment, as Figure 13 shown, a service push method is provided. Taking the method applied to the Figure 1 server as an example, the method includes the following steps:
[0125] S701, obtaining the user representation sequence by using the above method for processing behavioral events.
[0126] It should be noted that for the descriptions in this embodiment, reference can be made to the relevant descriptions in the above embodiments, and the effects are similar. Details will not be repeated in this embodiment.
[0127] S702, determining the dependency relationships between events in the event sequence according to the user representation sequence.
[0128] In this embodiment, the server determines the dependency relationships between events in the event sequence within a preset time period according to the obtained user representation sequence. For example, the dependency relationship can be the dependency relationship of the occurrence times of each event, or the dependency relationship of the sequence of occurrence of each event, etc.
[0129] Optionally, in the downstream task, a neural network model obtained by a supervised training method can be used to analyze the user representation sequence, or a neural network model obtained by an unsupervised training method can be used to analyze the user representation sequence to determine the dependency relationships between individual user behavior events in the event sequence.
[0130] S703. Determine the target service according to the dependency relationship and push the target service to the user terminal.
[0131] Optionally, the server may determine the user's usage preference according to the dependency relationship between the events in the event sequence, determine the corresponding target service according to the user's usage preference, and then push the target service to the user terminal through the communication connection with the user terminal, so that a personalized service closer to the user's preference can be provided for the user according to the target service.
[0132] Exemplarily, after the server obtains the above dependency relationship, if the operation performed by the user on the terminal is to browse a page, the server may infer module A in the browser that the user may click according to the above dependency relationship, obtain the relevant information of module A in the browser, and push the relevant information of module A in the browser to the user terminal for direct display. For another example, if the operation performed by the user on the terminal is to start an application, and the server infers according to the above dependency relationship that the user will first view the messages pushed in the application after starting the application, the server may, after detecting that the user starts the application, form a list of the messages pushed in the application and push it to the user terminal.
[0133] In this embodiment, by adopting the above method for processing behavioral events, the server can obtain the user representation sequence of the event sequence generated by the user's behavioral events within a preset time period, so that it can accurately determine the dependency relationship between the events in the event sequence according to the user representation sequence, and then accurately determine the target service according to the dependency relationship between the events in the event sequence, and push the target service to the user terminal, so that the user terminal can provide a more personalized service that fits the user's preference according to the target service, making the human-computer interaction more intelligent.
[0134] It should be understood that although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily sequential, but can be executed alternately or alternately with at least a part of other steps or steps or stages in other steps.
[0135] Based on the same inventive concept, an embodiment of the present application further provides a processing device for behavioral events for implementing the processing method of the behavioral events involved above. The solution provided by this device for solving problems is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the processing device for behavioral events provided below can refer to the limitations on the processing method of behavioral events in the above text, and will not be elaborated here.
[0136] In one embodiment, as Figure 14 shown, a processing device for behavioral events is provided, including: a segmentation module 10 and a processing module 11, where:
[0137] The segmentation module 10 is used to segment the event sequence to obtain multiple event subsequences; the event sequence is a sequence generated based on user behavioral events within a preset time period.
[0138] The processing module 11 is used to input the multiple event subsequences into a first network for feature extraction to obtain a feature sequence, and input the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavioral event; both the first network and the second network are neural networks for processing sequence data.
[0139] Optionally, the network structures of the first network and the second network are the same.
[0140] Optionally, both the first network and the second network are self-attention networks.
[0141] Optionally, the parameters of the first network and the second network are different.
[0142] Optionally, the user behavioral event includes at least one piece of information such as the identifier of the user behavioral event, the category of the user behavioral event, the occurrence time of the user behavioral event, the time interval between adjacent user behavioral events, and the duration of the user behavioral event.
[0143] The processing device for behavioral events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effect are similar, and will not be elaborated here.
[0144] On the basis of the above embodiment, as Figure 15 shown, optionally, the above first network includes multiple first sub-networks, and the above processing module 11 includes: a first processing unit 111, where:
[0145] The first processing unit is used to input the multiple event subsequences into multiple first sub-networks for feature extraction to obtain a feature sequence; where one first sub-network corresponds to inputting one or more event subsequences.
[0146] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0147] Based on the above embodiment, optionally, the first processing unit 111 is configured to input each event subsequence into a corresponding first sub-network for feature extraction to obtain a feature sequence; where one first sub-network corresponds to one event subsequence.
[0148] Optionally, the parameters of the above multiple first sub-networks are the same.
[0149] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0150] Based on the above embodiment, optionally, the first processing unit 111 is configured to perform encoding processing on the event subsequence to obtain a vector sequence corresponding to the event subsequence; input the vector sequence into the first sub-network for semantic feature extraction to obtain a semantic feature sequence corresponding to the event subsequence; and obtain a feature sequence according to the semantic feature sequence corresponding to each event subsequence.
[0151] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0152] Based on the above embodiment, optionally, the first processing unit 111 is configured to input the vector sequence into the first sub-network for semantic feature extraction to obtain semantic feature vectors corresponding to each event in the event subsequence; and perform aggregation processing on the semantic feature vectors to obtain a semantic feature sequence.
[0153] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0154] Based on the above embodiment, optionally, the first processing unit 111 is configured to combine the semantic feature sequences corresponding to each event subsequence according to the time sequence of each event subsequence to obtain a feature sequence.
[0155] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0156] Based on the above embodiments, optionally, the first processing unit 111 is configured to perform a first encoding process on the category information of the behavior events in the event subsequence to obtain a first vector corresponding to the event subsequence; perform a second encoding process on the floating-point information of the behavior events in the event subsequence to obtain a second vector corresponding to the event subsequence; and obtain a vector sequence corresponding to the event subsequence according to the first vector and the second vector.
[0157] Optionally, the performing a second encoding process on the floating-point information of the behavior events in the event subsequence to obtain a second vector corresponding to the event subsequence includes any one of the following: determining a bin corresponding to the floating-point information and determining the vector of the bin as the second vector; determining the second vector according to the floating-point information and a unit vector; and performing a normalization process on the floating-point information to determine the second vector.
[0158] The processing device for behavior events provided in this embodiment can execute the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0159] Based on the above embodiments, optionally, the first processing unit 111 is configured to perform a fusion operation on the first vector and the second vector to obtain a vector sequence corresponding to the event subsequence; the fusion operation includes adding vectors with the same dimension in the first vector and the second vector, and / or concatenating vectors with different dimensions in the first vector and the second vector.
[0160] The processing device for behavior events provided in this embodiment can execute the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0161] Based on the above embodiments, as Figure 16 shown, optionally, the above splitting module 10 includes: a splitting unit 101 and a second processing unit 102, where:
[0162] The splitting unit 101 is configured to split the event sequence according to a preset splitting period to obtain a plurality of candidate subsequences.
[0163] The second processing unit 102 is configured to perform preprocessing on each candidate subsequence to obtain each event subsequence.
[0164] The processing device for behavior events provided in this embodiment can execute the above method embodiments, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0165] Based on the above embodiments, optionally, the second processing unit 102 is configured to determine whether to perform a truncation process on the candidate subsequence according to the length of the candidate subsequence and a preset length threshold to obtain an event subsequence.
[0166] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0167] Based on the above embodiment, optionally, the second processing unit 102 is configured to, if the length of the candidate subsequence is greater than the length threshold, truncate the sequence part of the candidate subsequence that is greater than the length threshold to obtain an event subsequence.
[0168] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0169] Based on the above embodiment, optionally, the second processing unit 102 is configured to, if the candidate subsequence is empty, add a preset virtual event to the candidate subsequence to obtain an event subsequence; wherein, the category information of the virtual event is a fixed identifier, and the floating-point information of the virtual event is 0.
[0170] The processing device for behavior events provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0171] Each module in the above processing device for behavior events can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0172] Based on the same inventive concept, the embodiment of the present application also provides a service push device for implementing the above-mentioned service push method. The implementation solution for solving the problem provided by this device is similar to the implementation solution described in the above method. Therefore, the specific limitations in one or more embodiments of the service push device provided below can refer to the limitations on the service push method in the above text, which will not be elaborated here.
[0173] In one embodiment, as Figure 17 shown, a service push device is provided, including: an acquisition module 20, a determination module 21, and a push module 22, where:
[0174] The acquisition module 20 is configured to obtain a user representation sequence by using the above-mentioned behavior event processing method.
[0175] The determination module 21 is configured to determine the dependency relationship between events in the event sequence according to the user representation sequence.
[0176] The push module 22 is configured to determine a target service according to the dependency relationship and push the target service to the user terminal.
[0177] The service push device provided in this embodiment can execute the above method embodiment, and its implementation principle and technical effects are similar, which will not be elaborated here.
[0178] Each module in the above service push device can be implemented in whole or in part by software, hardware, and their combination. The above modules can be embedded in the processor in the computer device in hardware form or be independent of it, or be stored in the memory in the computer device in software form, so that the processor can call and execute the operations corresponding to the above modules.
[0179] In one embodiment, a computer device is provided. This computer device can be a server, and its internal structure diagram can be as Figure 18 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, the processor, the memory, and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the event sequence generated according to the user behavior events within a preset time period, the user representation sequence corresponding to the user behavior data, and the dependency relationship between the events in the event sequence. The input / output interface of the computer device is used to exchange information between the processor and external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it realizes a method for processing behavior events and a service push method.
[0180] Those skilled in the art can understand that Figure 18 the structure shown in
[0181] is only a block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0182] The embodiments of the present application also provide a computer program product including instructions. When it runs on a computer, it enables the computer to execute the processing method of behavior events and the service push method.
[0183] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data need to comply with the relevant laws, regulations, and standards of relevant countries and regions.
[0184] Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to a memory, database, or other medium used in the embodiments provided by the present application can include at least one of non-volatile and volatile memories. Non-volatile memories can include read-only memory (ROM), magnetic tapes, floppy disks, flash memories, optical memories, high-density embedded non-volatile memories, resistive random access memories (ReRAM), magnetoresistive random access memories (MRAM), ferroelectric random access memories (FRAM), phase change memories (PCM), graphene memories, etc. Volatile memories can include random access memory (RAM) or external cache memories, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc. The databases involved in the embodiments provided by the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided by the present application can be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, data processing logics based on quantum computing, etc., and are not limited thereto.
[0185] The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity of description, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, it should be considered as the scope described in this specification.
[0186] The above-described embodiments merely represent several implementation manners of the present application. The description thereof is relatively specific and detailed, but it should not be construed as a limitation to the scope of the patent of the present application. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present application, several modifications and improvements can still be made, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.
Claims
1. A method for processing behavioral events, characterized in that, Including: Segmenting an event sequence to obtain multiple event subsequences; The event sequence is a sequence generated based on user behavior events within a preset time period; Inputting the multiple event subsequences into a first network for feature extraction to obtain a feature sequence, and inputting the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavior event; both the first network and the second network are neural networks for processing sequence data.
2. The method according to claim 1, wherein The first network includes multiple first sub-networks, and the step of inputting the multiple event subsequences into the first network for feature extraction to obtain a feature sequence includes: Inputting the multiple event subsequences into the multiple first sub-networks for feature extraction to obtain the feature sequence; wherein, one of the first sub-networks corresponds to inputting one or more event subsequences.
3. The method according to claim 2, characterized in that, The step of inputting the multiple event subsequences into the multiple first sub-networks for feature extraction to obtain the feature sequence includes: Inputting each of the event subsequences into a corresponding first sub-network for feature extraction to obtain the feature sequence; wherein, one first sub-network corresponds to one event subsequence.
4. The method according to claim 2 or 3, characterized in that The parameters of the multiple first sub-networks are the same.
5. The method according to claim 3, characterized in that The step of inputting each of the event subsequences into a corresponding first sub-network for feature extraction to obtain the feature sequence includes: Performing encoding processing on the event subsequence to obtain a vector sequence corresponding to the event subsequence; Inputting the vector sequence into the first sub-network for semantic feature extraction to obtain a semantic feature sequence corresponding to the event subsequence; Obtaining the feature sequence according to the semantic feature sequence corresponding to each event subsequence.
6. The method according to claim 5, wherein The step of inputting the vector sequence into the first sub-network for semantic feature extraction to obtain a semantic feature sequence corresponding to the event subsequence includes: Inputting the vector sequence into the first sub-network for semantic feature extraction to obtain semantic feature vectors corresponding to each event in the event subsequence; Performing aggregation processing on the semantic feature vectors to obtain the semantic feature sequence.
7. The method according to claim 5 or 6, characterized in that The step of obtaining the feature sequence according to the semantic feature sequence corresponding to each event subsequence includes: Combining the semantic feature sequences corresponding to each event subsequence according to the time order of each event subsequence to obtain the feature sequence.
8. The method according to claim 5 or 6, characterized in that, The step of performing encoding processing on the event subsequence to obtain a vector sequence corresponding to the event subsequence includes: Performing first encoding processing on the category information of the behavior events in the event subsequence to obtain a first vector corresponding to the event subsequence; Performing second encoding processing on the floating-point information of the behavior events in the event subsequence to obtain a second vector corresponding to the event subsequence; Obtaining the vector sequence corresponding to the event subsequence according to the first vector and the second vector.
9. The method according to claim 8, wherein The step of performing second encoding processing on the floating-point information of the behavior events in the event subsequence to obtain a second vector corresponding to the event subsequence includes any one of the following: Determine the target bin corresponding to the floating-point information according to the value of the floating-point information and the value range of each bin, and determine the vector of the target bin as the second vector; Determine the second vector according to the floating-point information and the unit vector; Perform normalization processing on the floating-point information to determine the second vector.
10. The method according to claim 9, wherein The obtaining the vector sequence corresponding to the event subsequence according to the first vector and the second vector includes: Perform a fusion operation on the first vector and the second vector to obtain the vector sequence corresponding to the event subsequence; the fusion operation includes adding vectors with the same dimension in the first vector and the second vector, and / or concatenating vectors with different dimensions in the first vector and the second vector.
11. The method according to any one of claims 1-3, characterized in that, The inputting the feature sequence into a second network for feature extraction to obtain the user representation sequence corresponding to the user behavior event includes: Input the feature sequence into the second network for semantic feature extraction to obtain the semantic feature vector corresponding to the feature sequence; Perform an aggregation process on the semantic feature vectors corresponding to the feature sequence to obtain the user representation sequence.
12. The method according to claim 1, wherein The segmenting the event sequence to obtain a plurality of event subsequences includes: Segment the event sequence according to a preset segmentation period to obtain a plurality of candidate subsequences; Perform preprocessing on each of the candidate subsequences to obtain each of the event subsequences.
13. The method according to claim 12, wherein The performing preprocessing on each of the candidate subsequences to obtain each of the event subsequences includes: Determine whether to perform truncation processing on the candidate subsequence according to the length of the candidate subsequence and a preset length threshold to obtain the event subsequence.
14. The method according to claim 13, characterized in that, The determining whether to perform truncation processing on the candidate subsequence according to the length of the candidate subsequence and a preset length threshold to obtain the event subsequence includes: If the length of the candidate subsequence is greater than the length threshold, truncate the sequence part of the candidate subsequence that is greater than the length threshold to obtain the event subsequence.
15. The method according to claim 12, characterized in that, The performing preprocessing on each of the candidate subsequences to obtain each of the event subsequences includes: If the candidate subsequence is empty, add a preset virtual event to the candidate subsequence to obtain the event subsequence; wherein, the category information of the virtual event is a fixed identifier, and the floating-point information of the virtual event is 0.
16. The method according to any one of claims 1 to 3, characterized in that The network structures of the first network and the second network are the same.
17. The method according to claim 16, wherein Both the first network and the second network are self-attention networks.
18. The method according to claim 17, characterized in that, The parameters of the first network and the second network are different.
19. The method according to claim 1, characterized in that, The user behavior event includes at least one piece of information such as the identifier of the user behavior event, the category of the user behavior event, the occurrence time of the user behavior event, the time interval between adjacent user behavior events, and the duration of the user behavior event.
20. A service push method, characterized in that Including: Obtain the user representation sequence by using the method according to any one of claims 1-19; Determine the dependency relationship between events in the event sequence according to the user representation sequence; Determine the target service according to the dependency relationship and push the target service to the user terminal.
21. A processing device for behavioral events, characterized in that, Including: A splitting module, configured to split an event sequence to obtain multiple event subsequences; The event sequence is a sequence generated according to user behavior events within a preset time period; A processing module, configured to input the multiple event subsequences into a first network for feature extraction to obtain a feature sequence, and input the feature sequence into a second network for feature extraction to obtain a user representation sequence corresponding to the user behavior data; both the first network and the second network are neural networks for processing sequence data.
22. A service push device, characterized in that, including: An obtaining module, configured to obtain a user representation sequence by using the method according to any one of claims 1-19; A determining module, configured to determine the dependency relationship between events in the event sequence according to the user representation sequence; A pushing module, configured to determine a target service according to the dependency relationship and push the target service to a user terminal.
23. A server, comprising a memory and a processor, wherein a computer program is stored in the memory, characterized in that, When the computer program is executed by the processor, the processor is caused to execute the steps of the method according to any one of claims 1 to 20.
24. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 20 are implemented.
Citation Information
Patent Citations
Sequence recommendation method, device and equipment based on self-attention mechanism
CN110008409A
Product information pushing method and apparatus, device, and storage medium
WO2021189976A1