Effective behavior determination method, device, equipment and storage medium
By identifying and finding valid behavior sequences in the user's behavior semantic graph, the problem of recommendation bias caused by invalid behavior is solved, and the accuracy and quality of recommendations are improved.
Patent Information
- Application Number
- CN202110197562.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-02-22
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2041-02-22
AI Technical Summary
Due to the invalid behavior of the user, the recommended content is biased, which in turn reduces the user's user experience.
By obtaining the currently collected short-term behavior data, the corresponding behavior is identified in the behavior semantic graph of the corresponding user, and the first valid behavior sequence is found based on the identified behavior to determine the user's real-time recommendation result.
It improves the accuracy of short-term interest prediction, improves the quality and conversion rate of real-time recommendation results, and ensures that the recommended content more accurately reflects the user's true intentions.
Smart Images

Figure CN114969494B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing technology, and in particular, to a method, device, equipment and storage medium for determining effective behavior. Background Art
[0002] At present, real-time recommendation is widely used in various Internet applications. The specific process of real-time recommendation is to monitor the user's behavior in Internet applications in real time, predict the user's short-term interests, and recommend content that may be of interest to the user based on the short-term interests. For example, in shopping Internet applications, by monitoring the user's behavior of clicking on products, collecting products, and purchasing products, the user's short-term interests are predicted by machine learning, and products that may be of interest to the user are recommended based on the short-term interests. However, for educational Internet applications, some users lack subjective interest and desire to explore course products. At this time, the user's behavior cannot fully reflect the user's true intention. For example, the user passively shares or collects courses in order to obtain points, but the courses shared or collected are not the courses that the user is interested in or needs. At this time, this behavior can be considered invalid behavior. When predicting short-term interests based on invalid behaviors, the predicted short-term interests will be biased, which will cause the Internet application to be unable to recommend content that the user is really interested in or needs, greatly reducing the user's experience. Summary of the invention
[0003] The embodiments of the present application provide a method, apparatus, device and storage medium for determining effective behavior to solve the technical problem in the related art that the recommended content may deviate due to the invalid behavior of the user.
[0004] In a first aspect, an embodiment of the present application provides a method for determining an effective behavior, including:
[0005] Get the currently collected short-term behavior data;
[0006] According to the short-term behavior data, identifying a corresponding behavior in a behavior semantic graph of a corresponding user, the user being an executing user of the short-term behavior data;
[0007] According to the behaviors identified in the behavior semantic graph, a first valid behavior sequence is searched in the behavior semantic graph to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0008] In a second aspect, an embodiment of the present application further provides a valid behavior determination device, including:
[0009] Data collection module, used to obtain the currently collected short-term behavior data;
[0010] A behavior identification module, used to identify corresponding behaviors in a behavior semantic graph of a corresponding user according to the short-term behavior data, wherein the user is an executing user of the short-term behavior data;
[0011] The behavior search module is used to search for a first valid behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0012] In a third aspect, an embodiment of the present application further provides a valid behavior determination device, including:
[0013] one or more processors;
[0014] A memory for storing one or more programs;
[0015] When the one or more programs are executed by the one or more processors, the one or more processors implement the effective behavior determination method as described in the first aspect.
[0016] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the effective behavior determination method as described in the first aspect.
[0017] The above-mentioned effective behavior determination method, device, equipment and storage medium obtain the currently collected short-term behavior data and identify the behavior corresponding to the short-term behavior data in the corresponding behavior semantic graph. Then, according to the identified behavior in the behavior semantic graph, the first effective behavior sequence is found to determine the user's real-time recommendation result through the first effective behavior sequence. The technical means solves the technical problem that the recommended content is biased due to the invalid behavior of the user in the related technology. The behavior sequence corresponding to the effective result is described by a pre-constructed behavior semantic graph. Then, by identifying the behavior in the behavior semantic graph, the user's current behavior is recorded, and the first effective behavior sequence corresponding to the effective result is found through the identified behavior, that is, the effective short-term behavior data is determined, and then the real-time recommendation result is determined according to the first effective behavior sequence, so that the real-time recommendation result not only considers the user's short-term interests (reflected by the short-term behavior data) but also considers the user's medium-term and / or long-term interests (reflected by the behavior semantic graph), improves the accuracy of short-term interest prediction, and improves the quality and conversion rate of real-time recommendation results. In addition, since the behavior semantic graph is pre-constructed, in the embodiment, only the behavior needs to be marked in the behavior semantic graph, so that the determination method of the effective behavior sequence is simple, which is convenient for quickly screening out effective behaviors in massive short-term behavior data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1A flowchart of an effective behavior determination method provided in an embodiment of the present application;
[0019] Figure 2 A first behavior semantic graph provided in an embodiment of the present application;
[0020] Figure 3 A second behavior semantic graph provided in an embodiment of the present application;
[0021] Figure 4 A flowchart of another effective behavior determination method provided in an embodiment of the present application;
[0022] Figure 5 A schematic diagram of a behavior queue provided in an embodiment of the present application;
[0023] Figure 6 A third behavior semantic graph provided in an embodiment of the present application;
[0024] Figure 7 A flowchart of another effective behavior determination method provided in an embodiment of the present application;
[0025] Figure 8 A real-time recommendation result determination framework diagram provided in an embodiment of the present application;
[0026] Fig. 9 A fourth behavior semantic diagram provided in an embodiment of the present application;
[0027] Fig.10 A fifth behavior semantic diagram provided in an embodiment of the present application;
[0028] Fig.11 The sixth behavior semantic diagram provided by the embodiment of the present application;
[0029] Fig.12 The seventh behavior semantic diagram provided in the embodiment of the present application;
[0030] Fig.13 A flowchart of another effective behavior determination method provided in an embodiment of the present application;
[0031] Fig.14 An example flow chart of an effective behavior determination method provided in an embodiment of the present application;
[0032] Fig.15 A schematic diagram of the structure of an effective behavior determination device provided in an embodiment of the present application;
[0033] Fig.16 A schematic diagram of the structure of an effective behavior determination device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] The present application will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only the parts related to the present application, rather than all structures, are shown in the accompanying drawings.
[0035] The embodiment of the present application provides a method for determining an effective behavior, which can be executed by an effective behavior determination device, which can be implemented by software and / or hardware, and which can be composed of two or more physical entities or one physical entity. For example, the effective behavior determination device can be a computer or other device.
[0036] In the embodiment, an effective behavior determination device is integrated in a server for exemplary description, and the server is used to provide background services for the client, wherein the client is a terminal used by the user, such as a mobile phone, a tablet computer, a smart interactive tablet, etc., and an application provided by the server is installed in the client. The type of application can be set according to the actual situation. For example, the application is a K12 education application. Among them, K12 is the abbreviation of preschool education to high school education. K12 education applications can at least provide courses under different grades, subjects and knowledge points for users to learn. At this time, users can purchase courses, collect courses, share courses, etc. in K12 education applications. Correspondingly, the background service includes but is not limited to: search services, operation behavior recording services, course recommendation services, etc. In the embodiment, taking the server providing a course recommendation service as an example, how to determine the effective behavior of the user in the course recommendation service is described. It can be understood that in actual applications, the effective behavior determination device can also be independent of the server of the application. At this time, the effective behavior determination device communicates data with the server to implement the effective behavior determination method provided in the embodiment of the present application.
[0037] In the embodiment, the effective behavior determination device adopts distributed stream processing, wherein distributed stream processing is a fine-grained processing mode for dynamic data, which processes the continuously generated dynamic data based on distributed memory. Distributed stream processing has the characteristics of fast, efficient, and low latency when processing data, and plays an increasingly important role in big data processing.
[0038] Figure 1 A flowchart of an effective behavior determination method provided in an embodiment of the present application. Figure 1 , the effective behavior determination method specifically includes:
[0039] Step 110: Obtain the currently collected short-term behavior data.
[0040] Among them, behavior refers to the user behavior that the client recognizes based on the operation content when the user operates the application. It should be noted that different applications can recognize different behaviors. For example, if the application is a K12 education application, when the user operates the application, the identifiable behaviors include but are not limited to: clicking on courses, collecting courses, browsing courses, purchasing courses, trial courses, sharing courses, exiting courses, exiting the application, etc. Behavior data refers to the data generated when the behavior is recognized. In one embodiment, the behavior data includes the content of the behavior and the time when the behavior occurs. For example, if the application is a K12 education application, the behavior data includes clicking on X course (behavior content) and A date B time C minute D second (behavior occurrence time). After the client generates the behavior data, it reports it to the server so that the server can collect the behavior data.
[0041] Short-term behavior data can also be understood as behavior data collected in real time, which is the behavior data currently received by the server. In one embodiment, after the server collects the user's short-term behavior data, the effective behavior determination device obtains the short-term behavior data in the form of a data stream. Optionally, the server provides background services for multiple clients, so it can collect short-term behavior data of multiple users. Correspondingly, the effective behavior determination device can also obtain the collected short-term behavior data of multiple users using distributed stream processing, that is, the server can receive massive amounts of short-term behavior data.
[0042] In an embodiment, after obtaining the short-term behavior data, the short-term behavior data is cached and presented in the form of a queue. In an embodiment, the queue that caches the short-term behavior data is recorded as a behavior queue. In the subsequent process, the behavior queue is processed as a unit. At this time, the processing processes between different behavior queues are independent of each other, that is, multiple behavior queues can be processed at the same time. In one embodiment, a behavior queue corresponds to one user, and the behavior queue caches the short-term behavior data of the user within a certain length of time and / or the short-term behavior data of the user during this use process, wherein the use process can be the process from the user using the application to closing the application and / or the process of the user completing a set of operations. Among them, the definition rules of a set of operations can be set according to actual conditions. For example, if the application is a K12 education application, then completing a set of operations may include operations from the user clicking on the course to purchasing the course, and may also include operations from the user clicking on the course to collecting the course, and may also include operations from the user clicking on the course to trial listening to the course and then exiting the course. In one embodiment, a behavior queue corresponds to multiple users, that is, the behavior queue caches the short-term behavior data of multiple users within a certain length of time and / or caches the short-term behavior data of multiple users during their respective use. It is understandable that the certain time length mentioned above can be set according to actual conditions, and the embodiment does not limit this.
[0043] Step 120: According to the short-term behavior data, a corresponding behavior is identified in a behavior semantic graph of a corresponding user, and the user is the executing user of the short-term behavior data.
[0044] Exemplarily, behavioral semantic graphs corresponding to different categories of users are pre-constructed, and each category corresponds to a behavioral semantic graph. Among them, the behavioral semantic graph is a semantic graph that reflects the behavior of this type of user constructed based on the medium-term and / or long-term behavior data of each user under the corresponding category. Medium-term and / or long-term behavior data can be understood as the historical behavior data of the user. It should be noted that after the short-term behavior data is saved, it can be converted into historical behavior data. Historical behavior data can reflect the medium-term and / or long-term interests of the user in the current certain time period. Exemplarily, the behavior semantic graph shows the behaviors that users of this category often generate, the behavior sequence between each behavior, and the behavior results of each behavior sequence. Among them, the behavior is presented in the form of a node. In the behavioral semantic graph, a node represents a behavior, and each node is connected according to the order in which the behavior occurs. For example, if there is a browsing behavior after the click behavior, then the node corresponding to the click behavior and the node corresponding to the browsing behavior can be connected by an edge. It can be understood that the edge can be an undirected edge or a directed edge. When the edge has a direction, the direction can be the first row pointing to the behavior that occurs later. The behavior sequence is a sequence composed of multiple connected behaviors (nodes), and the behavior sequence can reflect the order in which the behavior is executed when the user operates. The behavior results of the behavior sequence include valid results and invalid results, where valid results and invalid results can be set based on actual conditions, and valid results are more valuable for user behavior analysis. For example, if the application is a K12 education application, valid results include users purchasing courses, analyzing courses, or collecting courses, etc., and invalid results include users closing and not purchasing courses, users closing and not collecting courses, users closing and not purchasing and not collecting courses, etc. A valid behavior result means that a valid result is generated after the user executes each behavior in the behavior sequence, and an invalid behavior result means that an invalid result is generated after the user executes each behavior in the behavior sequence. At this point, the behavior result can be considered as a semantic description of the behavior sequence. In one embodiment, the behavior semantic graph takes the form of a directed acyclic graph, where a directed acyclic graph refers to a directed graph without loops. For example, Figure 2 The first behavior semantic graph provided in the embodiment of the present application is a behavior semantic graph of a certain category of users under a pre-built K12 education application. Figure 2 The behaviors recorded in the behavior semantic graph include click, browse, try, collect, buy and close. The behavior sequence of each behavior can be determined according to the direction of the arrow. Each behavior sequence is a unidirectional behavior sequence. Figure 2 contains five behavior sequences, for example, "click-try-learn-collect" is one behavior sequence, and "click-try-learn-buy" is another behavior sequence. Each behavior sequence points to a node indicating the behavior result, for example, Figure 2 In the example, a "+" node indicates a valid result, and a "-" node indicates an invalid result. Figure 2 It can be seen that the "click-try-buy" behavior sequence points to a valid result, and the "click-close" behavior sequence points to an invalid result. Optionally, the nodes shown in the behavior semantic graph are mainly the actions of the behavior, such as Figure 2 In the example, "click" means clicking on a course. Optionally, the nodes shown in the behavior semantic graph may also include specific content of the behavior. In this case, each node not only records the behavior, but also records the classification of the specific content of the behavior. The classification method of the specific content is not limited in the embodiment. For example, in a K12 education application, courses are classified by grade and subject. In this case, each node also includes the grade and subject of the course. For example, Figure 3 The second behavior semantic graph provided by the embodiment of the present application. Figure 3 , which is a behavior semantic graph of a certain category of users under K12 education applications, where the node of "clicking junior high school mathematics" records the behavior "click" and the specific content category "junior high school mathematics", and the node of "clicking high school history" records the behavior "click" and the specific content category "high school history". It should be noted that Figure 3 It can be seen that in the constructed behavior semantic graph, not all nodes contain classifications of specific content, and classifications can be recorded only in nodes with the same behavior but different classifications. It is understandable that in actual applications, each node can also record other content (such as the specific content of the behavior, etc.), and the embodiment does not limit this.
[0045] Exemplarily, after obtaining the short-term behavior data, first determine the user who executes the short-term behavior data. In one embodiment, the short-term behavior data also includes the user who executes the behavior. At this time, the corresponding user can be determined based on the short-term behavior data. Afterwards, the corresponding behavior is identified in the behavior semantic graph corresponding to the user, wherein the behavior semantic graph corresponding to the user can be determined by the category to which the user belongs. It can be understood that when multiple users are cached in the behavior queue, each user corresponds to a behavior semantic graph. And when processing a new behavior queue, each user in the new behavior queue corresponds to a behavior semantic graph.
[0046] In one embodiment, in the current processing (the process of processing each short-term behavior data in the current behavior queue), if other short-term behavior data of the user has not been received before obtaining the short-term behavior data, the corresponding behavior semantic graph is first obtained according to the category to which the user belongs. At this time, each behavior in the obtained behavior semantic graph is not identified. Afterwards, it is identified in the behavior semantic graph according to the short-term behavior data. If other short-term behavior data of the user has been received before obtaining the short-term behavior data, it means that the behavior semantic graph corresponding to the user has been obtained when obtaining other short-term behavior data. At this time, it can be directly identified in the behavior semantic graph corresponding to the user. It can be understood that in the current processing, each short-term behavior data obtained will be identified in the corresponding behavior semantic graph.
[0047] In one embodiment, during identification, the user's current behavior is first determined based on the short-term behavior data, and then the node representing the behavior is searched in the behavior semantic graph, and the node is identified. For example, if the short-term behavior data includes clicking on Course X, then the node corresponding to "click" is searched in the behavior semantic graph, and the node is identified. Among them, the identification means embodiment is not limited, such as changing the node color, changing the node shape, or adding an identification to the node. Optionally, there is also a situation where the behavior corresponding to the short-term behavior data is not recorded in the behavior semantic graph. In this case, if the behavior corresponding to the short-term behavior data is not found in the behavior semantic graph, the identification in the behavior semantic graph is abandoned.
[0048] Step 130: Search for a first valid behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0049] The first valid behavior sequence refers to a complete behavior sequence whose behavior result is a valid result, and each behavior in the complete behavior sequence is identified. Among them, the complete behavior sequence refers to a behavior sequence from the initial node (the initial node is not pointed to by other nodes) to the final node (the final node points to the node representing the behavior result), for example, Figure 2 In the example, "click-try-learn-buy" is a complete behavior sequence, while "click-try-learn" is not a complete behavior sequence ("try-learn" points to "buy" and "collect"). In this case, "click-try-learn" can be determined as a semi-complete behavior sequence. The complete behavior sequence has corresponding behavior results in the behavior semantic graph.
[0050] Exemplarily, after the identification is completed, the currently identified behavior in the behavior semantic graph is determined, and it is determined whether the identified behavior can form a complete behavior sequence. If a complete behavior sequence can be formed, it is determined whether the complete behavior sequence is the first valid behavior sequence. If a complete behavior sequence cannot be formed, the aforementioned steps are repeated, that is, new short-term behavior data is obtained again, and after processing in the above manner, it is determined again whether a complete behavior sequence is obtained until a complete behavior sequence can be obtained. In one embodiment, if the behaviors identified in the behavior semantic graph can be connected into a complete behavior sequence and there is no subsequent behavior, it is determined that a complete behavior sequence is formed. Among them, the absence of subsequent behavior means that the user's short-term behavior data is no longer received subsequently. At this time, it can be confirmed that the user has ended the operation of the application. It can be understood that in actual applications, if there is a subsequent behavior after a complete behavior sequence is formed, that is, the user's short-term behavior data is received subsequently, it can be considered to be the start of a new process. At this time, the short-term behavior data is cached in a new behavior queue, and the behavior semantic graph corresponding to the user is obtained again for behavior identification.
[0051] Exemplarily, when determining whether a complete behavior sequence is the first valid behavior sequence, it is specifically determined whether the behavior result node pointed to by the complete behavior sequence in the behavior semantic graph represents a valid result. If the behavior result node pointed to by the complete behavior sequence represents a valid result, the behavior sequence is determined to be the first valid behavior sequence. If the behavior result node pointed to by the complete behavior sequence represents an invalid result, the behavior sequence is determined to be an invalid behavior sequence.
[0052] It can be understood that since the first valid behavior sequence corresponds to a valid result, the possibility that the real-time recommendation result determined according to the first valid behavior sequence is the result required by the user will increase. For example, the application is a K12 education application, referring to Figure 2, a complete behavior sequence is "click-try-learn-collect", and the effective result of this complete behavior sequence is that the user collects the course after the trial. At this time, after the short-term behavior data is marked in the behavior semantic graph, it is determined that the behavior sequence "click-try-learn-collect" is marked to form a complete behavior sequence and the complete behavior sequence points to a valid result. Therefore, the complete behavior sequence is determined as the first effective behavior sequence. At this time, according to the short-term behavior data corresponding to the first effective behavior sequence, it can be determined that the user has collected a course, and there is no other behavior after the collection. Therefore, it can be determined that the course collected by the user is the required course, that is, the user's short-term interest is predicted. At this time, the probability that the real-time recommendation result (course) obtained according to the first effective behavior sequence is needed by the user will increase. It should be noted that when making recommendations based on the first effective behavior sequence, specific reference is made to the short-term behavior sequence corresponding to the first effective behavior sequence. For example, the first effective behavior sequence is "click-try-learn-collect", and its corresponding short-term behavior data includes clicking on course A, trying to learn course A, and collecting course A. Therefore, when making recommendations, specific reference is made to clicking on course A, trying to learn course A, and collecting course A. In one embodiment, the effective behavior determination device sends the first effective behavior sequence to the downstream recommendation model of the server, so that the recommendation model determines the real-time recommendation result according to the first effective behavior sequence. Among them, the model structure and operation rule embodiment of the recommendation model are not limited, such as using a neural network framework to promote the model. In one embodiment, after obtaining the real-time recommendation result, the server feeds back the real-time recommendation result to the client for the user to view. It can be understood that the real-time recommendation result reflects the user's short-term interest prediction result obtained based on the effective short-term behavior data.
[0053] In the above, by acquiring the currently collected short-term behavior data and identifying the behavior corresponding to the short-term behavior data in the corresponding behavior semantic graph, and then finding the first valid behavior sequence according to the identified behavior in the behavior semantic graph, the technical means for determining the user's real-time recommendation result through the first valid behavior sequence solves the technical problem in the related art that the recommended content is biased due to the invalid behavior of the user, and the behavior sequence corresponding to the valid result is represented by the pre-constructed behavior semantic graph, and then the current behavior of the user is recorded by identifying the behavior in the behavior semantic graph, and the first valid behavior sequence corresponding to the valid result is found through the identified behavior, that is, the valid short-term behavior data is determined, and then the real-time recommendation result is determined according to the first valid behavior sequence, so that the real-time recommendation result not only considers the user's short-term interests (reflected by the short-term behavior data) but also considers the user's medium-term and / or long-term interests (reflected by the behavior semantic graph), thereby increasing the probability that the real-time recommendation result is the content that the user needs or is interested in. In addition, since the behavior semantic graph is pre-constructed, in the embodiment, only the behavior needs to be marked in the behavior semantic graph, so that the determination method of the valid behavior sequence is simple, which is convenient for quickly screening out valid behaviors in massive short-term behavior data.
[0054] Figure 4 A flowchart of another effective behavior determination method provided in an embodiment of the present application. The effective behavior determination method is a concretization of the above-mentioned effective behavior determination method. In the embodiment, short-term behavior data is cached in the currently processed behavior queue. The behavior queue caches short-term behavior data of multiple users, and each user corresponds to a behavior semantic graph. Moreover, the behavior semantic graph is a directed acyclic graph.
[0055] For example, there is at least one behavior queue currently being processed, and the number of users that can be cached in each behavior queue can be set according to actual conditions, or it can be left unset. The short-term behavior data of each user in the behavior queue is arranged in the order in which it is acquired. For example, Figure 5 A behavior queue diagram provided in an embodiment of the present application. Figure 5 , the behavior queue caches the short-term behavior data of three users (user1, user2 and user3), among which the short-term behavior data of user1 includes: 1 user1 ,t 2 user1 ,……,t N1 user1 . User2's short-term behavior data includes: 1 user2 ,t 2 user2 ,……,t N2 user2. User3's short-term behavior data includes: 1 user3 ,t 2 user3 ,……,t N3 user3 Among them, the specific values of N1, N2 and N3 can be the same or different. The order of obtaining each short-term behavior data in the behavior queue is: 1 user1 ,t 1 user2 ,t 2 user1 ,t 3 user1 ,t 1 user3 ……. It is understood that when the effective behavior determination device obtains short-term behavior data, it will cache the short-term behavior data in the currently processed behavior queue and mark it in the behavior semantic graph of the corresponding user. It is understood that each user corresponds to a behavior semantic graph. Figure 5 For example, the short-term behavior data of three users are currently cached, so the behavior semantic graphs of the three users will be obtained for identification. When there are users of different categories among the three users, the behavior semantic graphs corresponding to users of the same category are the same. It can be understood that after all the short-term behavior data in the behavior queue have been processed, the behavior queue can be deleted, where the processing of the short-term behavior data is completed means that all the short-term behavior data are identified in the behavior semantic graph and no short-term behavior data will be received subsequently.
[0056] Exemplary, reference Figure 4 , the effective behavior determination method specifically includes:
[0057] Step 210: Acquire the currently collected short-term behavior data.
[0058] Step 220: According to the short-term behavior data, the corresponding behavior is identified in the behavior semantic graph of the corresponding user, and the user is the executing user of the short-term behavior data.
[0059] For example, Figure 6 The third behavior semantic graph provided in the embodiment of the present application. Among them, each short-term behavior data in the behavior queue cache is sorted according to the behavior occurrence time and includes: 1 user1 ,t 1 user2 ,t 2 user1 ,t 3 user1 ,t 1 user3 ,t 2 user2 ,t N1user1 and t N3 user3 . refer to Figure 6 , which is the behavior semantic graph of user1. At this time, Figure 6 The nodes with thick borders (the subscript of t in the nodes is user1) are the behaviors of user1 that have been identified, and the nodes with thin borders are the behaviors of user1 that have not been identified. This is understandable. Figure 6 The unidentified behaviors are not specifically shown in the table, but are represented by “…”. From the behavior queue, we can see that user1’s short-term behavior data includes t 1 user1 ,t 1 user2 ,t 3 user1 and t N1 user1 , therefore, in Figure 6 The corresponding behaviors are marked in the following sections. It should be noted that in the subsequent process, only the marked nodes are referenced. For the unmarked nodes (such as Figure 6 In one embodiment, before identifying the behavior, it is necessary to first obtain the behavior semantic graph corresponding to the user. In this case, before step 220, it also includes: when the short-term behavior data is the first short-term behavior data of the corresponding user in the behavior queue, the behavior semantic graph corresponding to the user is selected from multiple pre-built behavior semantic graphs according to the category to which the user belongs.
[0060] Get the user recorded in the short-term behavior data, and then determine whether the short-term behavior data is the first short-term behavior data of the user in the behavior queue. It can be understood that when receiving short-term behavior data, if the short-term behavior data of the user does not exist in the behavior queue, it is determined that the first short-term behavior data of the user is received, and the short-term behavior data is cached in the behavior queue. After that, the category to which the user belongs is determined, and then the corresponding behavior semantic graph is obtained according to the category to which the user belongs, and then the behavior is identified in the behavior semantic graph. If the short-term behavior data of the user exists in the behavior queue, it is determined that the behavior semantic graph of the user has been obtained, so the short-term behavior data can be cached in the behavior queue, and the behavior can be directly identified in the behavior semantic graph. Or, when receiving short-term behavior data, it is determined whether the behavior semantic graph of the user has been obtained. If the behavior semantic graph of the user has not been obtained, it means that the first short-term behavior data of the user has been received. After that, the short-term behavior data is cached in the behavior queue, and the category to which the user belongs is determined, and then the corresponding behavior semantic graph is obtained according to the category to which the user belongs. If the behavior semantic graph of the user is obtained, it means that the first short-term behavior data of the user has been received. At this time, the short-term behavior data can be directly cached in the behavior queue, and the behavior can be directly identified in the behavior semantic graph.
[0061] Step 230: Determine whether a complete behavior sequence is found in the behavior identified in the behavior semantic graph. If a complete behavior sequence is found in the behavior identified in the behavior semantic graph, execute step 240; if a complete behavior sequence is not found in the behavior identified in the behavior semantic graph, return to execute step 210.
[0062] Exemplarily, after each identification, the identified behaviors in the behavior semantic graph are traversed, and according to the connection relationship of the edges in the behavior semantic graph, it is determined whether a complete behavior sequence is found, that is, a behavior sequence from the initial node (the initial node is not pointed to by other nodes) to the final node (the final node points to the node representing the behavior result) is found. If a complete behavior sequence is found, step 240 is executed, otherwise, it means that there is no complete behavior sequence at present, that is, the behavior result cannot be determined by the currently identified behavior, therefore, it is necessary to continue to obtain new short-term behavior data, that is, return to execute step 210, and identify it in the behavior semantic graph, so that the behaviors identified in the behavior semantic graph can form a complete behavior sequence.
[0063] Step 240: Determine whether the complete behavior sequence points to a valid result node. If the complete behavior sequence points to a valid result node, execute step 250. If the complete behavior sequence points to an invalid result node, execute step 260.
[0064] Exemplarily, since the behavior results of each complete behavior sequence have been shown in the behavior semantic graph, in this step, the node representing the behavior result pointed to by the complete behavior sequence is determined according to the behavior semantic graph, and it is determined whether the node represents a valid result or an invalid result. If the node represents a valid result, it is determined that the complete behavior sequence points to a valid result node, and step 250 is executed. If the node represents an invalid result, it is determined that the complete behavior sequence points to an invalid result node, and step 260 is executed. It can be understood that each complete behavior sequence can obtain a node representing its behavior result in the behavior semantic graph.
[0065] In one embodiment, there may be multiple complete behavior sequences found, and therefore, in this step, it is necessary to judge the multiple complete behavior sequences and process each complete behavior sequence respectively according to the judgment result.
[0066] Step 250: Determine the complete behavior sequence as the first valid behavior sequence, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0067] Exemplarily, if the complete behavior sequence points to a valid result node, the complete behavior sequence is determined as a first valid behavior sequence, and the real-time recommendation result of the user is determined according to the first valid behavior sequence.
[0068] Step 260: Determine the complete behavior sequence as an invalid behavior sequence, and discard the invalid behavior sequence.
[0069] Exemplarily, an invalid behavior sequence means that after the user performs each behavior in the complete behavior sequence, an invalid result is obtained, and the invalid result has little reference significance for the subsequent determination of the real-time recommendation result. Therefore, in the embodiment, when the complete behavior sequence points to an invalid result node, the complete behavior sequence is determined as an invalid behavior sequence, and the processing of the invalid behavior sequence is abandoned. Specifically, abandoning the processing of the invalid behavior sequence is discarding the invalid behavior sequence.
[0070] In the above, by acquiring the currently collected short-term behavior data, caching the short-term behavior data into the behavior queue, and identifying the behavior corresponding to the short-term behavior data in the behavior semantic graph corresponding to the user who executes the short-term behavior data, the complete behavior sequence is found according to the identified behavior in the behavior semantic graph. If the complete behavior sequence points to a valid result node, it is determined that the first valid behavior sequence is found, so as to determine the real-time recommendation result of the user through the first valid behavior sequence. If the complete behavior sequence points to an invalid result node, it is determined that the invalid behavior sequence is found, and the invalid result node is discarded. Moreover, if the complete behavior sequence is not found according to the identified behavior in the behavior semantic graph, new short-term behavior data can be re-acquired to identify it again in the behavior semantic graph until the complete behavior sequence is obtained. The technical means solves the technical problem in the related art that the recommended content is biased due to the invalid behavior of the user, and can identify valuable behaviors from a large amount of behaviors, aggregate valuable behaviors to obtain the first valid behavior sequence, and filter out worthless behaviors, that is, the short-term behavior data is pruned, avoiding the influence of worthless behaviors on the real-time recommendation results, improving the quality and conversion rate of the real-time promotion results, and reducing the amount of data processing when determining the real-time recommendation results.
[0071] On the basis of the above embodiment, in order to ensure the timeliness of the real-time recommendation results, a time limit is added. Figure 7 A flowchart of another effective behavior determination method provided in an embodiment of the present application. Figure 7 Yes Figure 6The effective behavior determination method shown is concretized. Specifically, if a complete behavior sequence is not found in the behaviors identified in the behavior semantic graph, then returning to execute the operation of obtaining the currently collected short-term behavior data includes: if a complete behavior sequence is not found in the behaviors identified in the behavior semantic graph, then obtaining a semi-complete behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph; judging whether the total cache duration of each behavior in the semi-complete behavior sequence reaches a duration threshold; if the duration threshold is not reached, returning to execute the operation of obtaining the currently collected short-term behavior data. Correspondingly, if the duration threshold is reached, the semi-complete behavior sequence is determined as the second effective behavior sequence, so as to determine the user's real-time recommendation results through the second effective behavior sequence, and the weight of the second effective behavior sequence is less than the weight of the first effective behavior sequence.
[0072] At this time, refer to Figure 7 , the effective behavior determination method specifically includes the following steps:
[0073] Step 310: Obtain the currently collected short-term behavior data.
[0074] Step 320: According to the short-term behavior data, the corresponding behavior is identified in the behavior semantic graph of the corresponding user, and the user is the executing user of the short-term behavior data.
[0075] Step 330: Determine whether a complete behavior sequence is found in the behavior identified in the behavior semantic graph. If a complete behavior sequence is found in the behavior identified in the behavior semantic graph, execute step 340; if a complete behavior sequence is not found in the behavior identified in the behavior semantic graph, return to execute step 370.
[0076] Step 340: Determine whether the complete behavior sequence points to a valid result node. If the complete behavior sequence points to a valid result node, execute step 350. If the complete behavior sequence points to an invalid result node, execute step 360.
[0077] Step 350: determine the complete behavior sequence as the first valid behavior sequence, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0078] Step 360: Determine the complete behavior sequence as an invalid behavior sequence, and discard the invalid behavior sequence.
[0079] Step 370 : According to the behaviors identified in the behavior semantic graph, obtain a semi-complete behavior sequence in the behavior semantic graph. Execute step 380 .
[0080] In one embodiment, if there are identified behaviors in the behavior semantic graph, but the identified behaviors do not constitute a complete behavior sequence, it is determined that there is a semi-complete behavior sequence in the behavior semantic graph, wherein the semi-complete behavior sequence is composed of at least one identified behavior. It is understandable that after some behaviors in a complete behavior sequence are identified, the partially identified behaviors can be determined as a semi-complete behavior sequence. Generally speaking, a semi-complete behavior sequence contains behaviors identified according to the currently collected short-term behavior data. In one embodiment, a semi-complete behavior sequence can be obtained based on the connection relationship between the behaviors identified in the behavior semantic graph, that is, when the behaviors identified in the behavior semantic graph do not constitute a complete behavior sequence, a semi-complete behavior sequence is obtained based on the identified behaviors. It is understandable that the number of semi-complete behavior sequences currently obtained can be one or more. When there are multiple semi-complete behavior sequences, each semi-complete behavior sequence can be processed separately.
[0081] Step 380: Determine whether the total cache duration of each behavior in the semi-complete behavior sequence reaches the duration threshold. If not, return to step 310; if reached, execute step 390.
[0082] Exemplarily, the duration threshold is used to impose time constraints on each behavior identified in the behavior semantic graph, and the specific time length of the duration threshold can be set according to actual conditions. In one embodiment, the total cache duration of each behavior identified in the behavior semantic graph is determined in real time, wherein the total cache duration is calculated as follows: when the first behavior in a behavior sequence in the behavior semantic graph is identified, the cache time of the corresponding short-term behavior data is obtained, and the timing is started with the cache time, wherein the cache time can be the time to cache to the behavior queue, or the time to be identified in the behavior semantic graph. After the timing starts, the current timing is counted in real time and the counted timing is used as the total cache duration. Thereafter, the total cache duration is compared with the duration threshold. If the total cache duration reaches the duration threshold, it means that each behavior identified in the behavior sequence has been cached for a long time. In order to ensure the timeliness of the real-time recommendation results, even if all behaviors in the behavior sequence are not completely identified, it will not continue to wait for new short-term behavior data, but directly process the semi-complete behavior sequence obtained based on the identified behaviors, that is, execute step 390. If the total cache duration does not reach the duration threshold, it means that the cache time of each behavior identified in the behavior sequence is short, so the process may return to step 310 to continue to obtain new short-term behavior data.
[0083] Step 390: determine the semi-complete behavior sequence as a second valid behavior sequence, so as to determine the user's real-time recommendation result through the second valid behavior sequence, and the weight of the second valid behavior sequence is less than the weight of the first valid behavior sequence.
[0084] In one embodiment, if the total cache duration of each identified behavior in a semi-complete behavior sequence reaches a duration threshold, a node indicating that the duration threshold has been reached is added to the behavior semantic graph, and the node corresponding to the last identified behavior in the semi-complete behavior sequence is pointed to the node indicating that the duration threshold has been reached. Afterwards, the semi-complete behavior sequence is determined as a second valid behavior sequence, wherein the behavior result of the second valid behavior sequence is unknown. Therefore, in the embodiment, the second valid behavior sequence is also used as a reference for the real-time recommendation result, that is, the real-time recommendation result can be determined by the second valid behavior sequence and the first valid behavior sequence, wherein the technical means for determining the real-time recommendation result by the second valid behavior sequence is the same as the technical means for determining the real-time recommendation result by the first valid behavior sequence, and will not be elaborated here. It is understandable that since the first valid behavior sequence can achieve valid results, while the second valid behavior sequence does not have a clear behavior result, that is, it is currently uncertain whether the second valid behavior sequence can achieve valid results or invalid results, therefore, in the embodiment, different weights are set for the first valid behavior sequence and the second valid behavior sequence, respectively, and the weight of the first valid behavior sequence is greater than the weight of the second valid behavior sequence, so that when obtaining real-time recommendation results, the reference of the first valid behavior sequence is greater than the reference of the second valid behavior sequence. Among them, the weight of each valid behavior sequence can be set according to the actual situation, such as 1 for the first valid behavior sequence and 0.5 for the second valid behavior sequence. It should be noted that corresponding weights can also be set for invalid behavior sequences, such as setting invalid behavior sequences to 0 to indicate that they will not be referenced by real-time search results.
[0085] As described above, by setting a time threshold, when a complete behavior sequence is not obtained, a semi-complete behavior sequence is obtained, and the total cache time of each behavior identified in the semi-complete behavior sequence is obtained. When the total cache time reaches the time threshold, the semi-complete behavior sequence is determined as the second valid behavior sequence, and then the real-time recommendation result is determined by the second valid behavior sequence. The timeliness of the real-time recommendation result can be guaranteed. In addition, setting the weight of the second valid behavior sequence lower than the weight of the first valid behavior sequence can also reasonably refer to the second valid behavior sequence and the first valid behavior sequence when determining the real-time recommendation result, thereby ensuring the rationality and effectiveness of the real-time recommendation result.
[0086] The following is an exemplary description of the effective behavior determination method provided by the embodiment of the present application. In the following examples, distributed stream processing is used. At this time, the overall architecture for determining the real-time recommendation results is as follows: Figure 8 shown. Figure 8 A real-time recommendation result determination framework diagram provided in an embodiment of the present application is described by taking the current existence of three behavior queues as an example. Figure 8, the real-time user behavior data source provides the short-term behavior data of users in each current client, and then caches the short-term behavior data in the corresponding behavior queue, and processes the short-term behavior data cached in the behavior queue based on the behavior semantic graph, that is, performs behavior identification, and then processes the short-term behavior data (that is, obtains the first valid behavior sequence or the second valid behavior sequence) to perform online prediction through the valid behavior sequence, and then obtains and stores the user's real-time recommendation results. An example based on the above framework description is as follows:
[0087] Example 1: Get short-term behavior data of clicking on course X. Then, cache the short-term behavior data into the behavior queue, and determine the user who executed the short-term behavior data to obtain the behavior semantic graph of the user. Figure 2 Afterwards, the "click" node in the behavior semantic graph is identified based on the short-term behavior data. Figure 2 becomes Fig. 9 , Fig. 9 The fourth behavior semantic graph provided in the embodiment of the present application. Afterwards, it is determined that the behaviors identified in the current behavior semantic graph do not constitute a complete behavior sequence and the total cache duration does not reach the duration threshold, so short-term behavior data continues to be acquired.
[0088] After that, the short-term behavior data of the purchase of course X is obtained, and the short-term behavior data is cached in the behavior queue. It is determined that the short-term behavior data and the previous short-term behavior data belong to the same user, and the "purchase" node in the corresponding behavior semantic graph is marked. At this time, Fig. 9 becomes Fig.10 , Fig.10 The fifth behavior semantic graph provided in the embodiment of the present application. Afterwards, it is determined that the behaviors identified in the current behavior semantic graph constitute a complete behavior sequence and no subsequent behaviors are received, and the complete behavior sequence "click-buy" is obtained. Afterwards, it is determined that the complete behavior sequence points to the node "+" representing the valid result. At this time, the complete behavior sequence is determined as the first valid behavior sequence, and the first valid behavior sequence is sent to the downstream recommendation model of the server, so that the recommendation model determines the real-time recommendation result according to the first valid behavior sequence, and the weight of the first valid behavior sequence is determined to be 1 in the process of the recommendation model determining the real-time recommendation result.
[0089] Example 2: Get the short-term behavior data of clicking on course X, and add it to the behavior semantic graph of the corresponding user (refer to Figure 2 ) is marked, at this time, Figure 2 becomes Fig. 9 Afterwards, it is determined that the behaviors identified in the current behavior semantic graph do not constitute a complete behavior sequence and the total cache duration does not reach the duration threshold, so short-term behavior data continues to be obtained.
[0090] After that, the short-term behavior data of closing the X course is obtained, and then the short-term behavior data is cached in the behavior queue, and it is determined that the short-term behavior data and the previous short-term behavior data belong to the same user, and the "close" node in the corresponding behavior semantic graph is marked. At this time, Fig. 9 becomes Fig.11 , Fig.11 The sixth behavior semantic graph provided in the embodiment of the present application. Afterwards, if it is determined that the behaviors identified in the current behavior semantic graph constitute a complete behavior sequence and no subsequent behaviors are received, the complete behavior sequence "click-close" is obtained, and then it is determined that the complete behavior sequence points to the node "-" representing an invalid result, the complete behavior sequence is determined as an invalid behavior sequence, and the invalid behavior sequence is discarded.
[0091] Example 3: Get the short-term behavior data of clicking on course X, and add it to the behavior semantic graph of the corresponding user (refer to Figure 2 ) is marked, at this time, Figure 2 becomes Fig. 9 Afterwards, it is determined that the behaviors identified in the current behavior semantic graph do not constitute a complete behavior sequence and the total cache duration does not reach the duration threshold, so short-term behavior data continues to be obtained.
[0092] After that, the short-term behavior data of the behavior content of the trial learning course X is obtained, and then the short-term behavior data is cached in the behavior queue, and it is determined that the short-term behavior data and the previous short-term behavior data belong to the same user, and the "trial learning" node in the corresponding behavior semantic graph is marked. At this time, Figure 8 becomes Fig.12 , Fig.12 The seventh behavior semantic graph provided for the embodiment of the present application. Since the user spent a lot of time on the trial learning, the effective behavior determination device did not receive other short-term behavior data of the user during this process. Therefore, it is determined that the behaviors identified in the current behavior semantic graph do not constitute a complete behavior sequence but the total cache duration reaches the duration threshold, and then the semi-complete behavior sequence "click-trial learning" is obtained. Then, a node "=" indicating that the duration threshold has been reached is added to the semi-complete behavior sequence, and the semi-complete behavior sequence is determined as the second effective behavior sequence. The second effective behavior sequence is sent to the downstream recommendation model of the server, so that the recommendation model determines the real-time recommendation result according to the second effective behavior sequence, and the weight of the second effective behavior sequence is determined to be 0.5 in the process of the recommendation model determining the real-time recommendation result.
[0093] It should be noted that in the above example, only the short-term behavior data of one user is used as an example. In actual applications, the short-term behavior data of multiple users can be cached in the behavior queue, and the behavior of other users will also be shown in the behavior semantic graph.
[0094] From the above content, it can be seen that the behavior semantic graph is a very important content in the process of determining effective behavior, so it is also very important to pre-construct an accurate behavior semantic graph. In addition to the application process of the above behavior semantic graph, the embodiment also includes a construction process of the behavior semantic graph. Fig.13 This is a flowchart of another effective behavior determination method provided in an embodiment of the present application. This embodiment describes the construction process of the behavior semantic graph based on the above embodiment. Fig.13 , the effective behavior determination method specifically includes:
[0095] Step 410: Acquire historical behavior data of multiple users, where the multiple users are divided into at least two categories.
[0096] Multiple users are all users who use the application. Multiple users can be all users who use the application, or they can be active users who use the application, and the embodiment does not limit this. Furthermore, multiple users are classified in advance to determine the category to which each user belongs, wherein the classification rules in the embodiment are not limited. For example, users of K12 educational applications can be classified according to their grade and / or preferred subjects. In the embodiment, the classification process can be executed offline by the server, and the classification results can be directly obtained in this embodiment. It can be understood that after classification, each category has an offline user portrait. For example, if a user in a certain category is in the third grade of junior high school and prefers mathematics, then the corresponding offline user portrait is a third-grade junior high school user who likes mathematics.
[0097] In one embodiment, historical behavior data of each user under each category is obtained. The historical behavior data refers to behavior data within a period of time, wherein the length of a period of time can be set according to actual conditions. It is understandable that after the server saves the short-term behavior data obtained each time, the short-term behavior data can be considered as the stored historical behavior data. The historical behavior data can reflect the user's interests within a period of time (medium-term and / or long-term).
[0098] Step 420: Mining the maximum frequent behavior sequence of the category based on historical behavior data of the same category.
[0099] Since the historical behavior data of all users in each category are processed in the same manner, in the embodiment, one category is taken as an example to describe the process of constructing the behavior semantic graph.
[0100] In one embodiment, the maximum frequent behavior sequence is mined based on the historical behavior data of all users in the current category. The maximum frequent behavior sequence can also be recorded as a maximum frequent behavior sequence pattern, which belongs to the maximum frequent item set. The maximum frequent behavior sequence may include a behavior sequence frequently performed by users of this category. The mining method of the maximum frequent behavior sequence can be set according to actual conditions. In the embodiment, the GSP algorithm is taken as an example to describe the mining process of the maximum frequent behavior sequence.
[0101] In one embodiment, the GSP algorithm is an extended algorithm of the AprioriAll algorithm in sequential pattern mining. When the maximum frequent behavior sequence pattern is mined by the GSP algorithm, the basic idea is: among all the historical behavior data of the current category, take the sequence pattern L1 with a length of 1 as the initial seed set, that is, the behavior corresponding to each historical behavior data is taken as a sequence pattern with a length of 1. At this time, there are only individual behaviors in the initial seed set; according to the seed set L1 with a length of i, i , generate a candidate sequence pattern C of length i+1 through concatenation and cutting operations i+1 Then scan the historical behavior data, calculate the support of each candidate sequence pattern (the proportion of the behavior sequence containing the candidate sequence pattern in all behavior sequences), and take the candidate sequence pattern that meets the minimum support (greater than or equal to the minimum support) as the sequence pattern L i+1 , and construct a seed set of length i+1, repeat this process until no new sequence pattern or new candidate sequence pattern is generated, and take the sequence pattern that meets the minimum support as the maximum frequent behavior sequence pattern. Among them, the minimum support can be set according to the actual situation.
[0102] The connection operation is specifically: remove the first item (i.e., behavior) in a sequence pattern S1, and remove the last item (i.e., behavior) in another sequence pattern S2. If the sequences obtained after removal are the same, then connect S1 and S2, that is, add the last item of S2 to S1 to obtain the sequence i+1, which can be a candidate sequence pattern, wherein S1 and S2 both belong to the seed set L i For example, i=3, L iIn the seed set, the sequence pattern S1 is <(1)(2)(3)>, and the sequence pattern S2 is <(2)(3)(4)>, where the * in (*) represents a specific item. After removing the first item "1" of S1 and the last item "4" of S2, the remaining sequences of the two are the same. Therefore, the last item "4" of S2 is added to S1 to obtain a candidate sequence pattern <(1)(2)(3)(4)> with a length of 4. For another example, the sequence pattern S1 is <(25)(3)>, and the sequence pattern S2 is <(5)(34)>. After removing the first item "2" of S1 and the last item "4" of S2, the remaining sequences of the two are the same. Therefore, the last item "4" of S2 is added to S1. Since "3" and "4" belong to one element in S2, "4" in S2 and "3" in S1 are classified as one element. At this time, a candidate behavior sequence pattern <(25)(34)> with a length of 4 is obtained.
[0103] The pruning operation is as follows: if a subsequence contained in a candidate sequence pattern is not a sequence pattern, the candidate sequence pattern is deleted so that all subsequences in the final candidate sequence pattern are sequence patterns. For example, the candidate sequence pattern is <(25)(34)>, where the subsequence <(2)(4)> is not a behavior sequence pattern, so the candidate sequence pattern is deleted.
[0104] In one embodiment, each candidate sequence pattern obtained according to the historical behavior data is stored in a hash tree. At this time, the specific process of the GSP algorithm is as follows: hash each item in each behavior sequence composed of the historical behavior data to determine the candidate sequence pattern that should be examined in each leaf node in the hash tree; for each candidate sequence pattern in the leaf node, the examination method is as follows: examine whether it is included in each behavior sequence. If it is included in a behavior sequence (that is, the candidate sequence pattern is a subsequence of the behavior sequence), the count value of the candidate sequence pattern is increased by 1, and then the support of the candidate sequence pattern is obtained according to the count value of the candidate sequence pattern. Among them, the process of examining whether the behavior sequence contains the candidate pattern sequence includes a forward stage and a backward stage. In the embodiment, d is used to represent the behavior sequence and s is used to represent the candidate sequence pattern. At this time, the forward stage includes: searching for a continuous sequence [X] starting from the first item in s in d. i —X j ] until time(X i )-time(X j )>maxgap, where X i is the first item of s, X j is the last item in the continuous sequence, i<j, where time(X i )-time(X j ) means Xi Occurrence time and X j The difference between the occurrence times. The occurrence time refers to the time when the behavior occurs. maxgap refers to the maximum time interval set. Its specific value can be set according to the actual situation. maxgap can also be understood as a time constraint, that is, a time constraint is added in the search for continuous sequences. When time(X i )-time(X j ) exceeds the max gap, get the current continuous sequence [X i —X j ]. If the first item of s is not found in d, then s is determined not to be a subsequence of d. The backward phase includes: in d, the occurrence of time (X j )-maxgap's project as the first project and start searching for project X again j-1 , but keep X j-2 The position of X remains unchanged (that is, to ensure j-2 Satisfy maxgap requirements), when X is found again j-1 When X j-1 If the maxgap requirement is not met, a time (X j-1 )-maxgap's item as the first item and start searching again for X j-2 , but keep X j-3 The position of remains unchanged, and the above operation is repeated until a certain item to be searched again meets the maxgap requirement or X1 (the first item in d) cannot remain unchanged, and then returns to the forward stage. j-1 And time(X j-1 )-time(X j-(i+1) )≤maxgap, if X1 remains unchanged, the forward phase should be from X j-1 Start a new search for X j-1+1 and its subsequent elements. If X1 cannot keep its position unchanged, the forward stage should re-search X1 and its subsequent elements starting from the original position of X1.
[0105] According to the above method, all the maximum frequent behavior sequence patterns under this category can be found, that is, all the maximum frequent behavior sequences can be obtained.
[0106] Step 430: Determine a sequence result of the maximum frequent behavior sequence according to the behavior result corresponding to the maximum frequent behavior sequence, where the sequence result is a first valid behavior sequence or an invalid behavior sequence.
[0107] Exemplarily, the behavior result corresponding to the maximum frequent behavior sequence is determined, wherein the behavior result can be customized (manually defined or self-defined by the device), that is, the result after each behavior in the maximum frequent behavior sequence occurs is determined to be a valid result or an invalid result according to the user's operation. Afterwards, if the maximum frequent behavior sequence is a valid result, the maximum frequent behavior sequence is determined as the first valid behavior sequence, and if the maximum frequent behavior sequence is an invalid result, the maximum frequent behavior sequence is determined as an invalid behavior sequence. At this time, the first valid behavior sequence and the invalid behavior sequence can also be considered as the sequence results of the maximum frequent behavior sequence.
[0108] Step 440: construct a behavior semantic graph corresponding to the category according to the maximum frequent behavior sequence under the same category and the corresponding sequence results.
[0109] Exemplarily, a behavior semantic graph is constructed based on the first valid behavior sequence and the invalid behavior sequence under the same category. Figure 3 , the offline user profile of the category of users is a junior high school student who prefers mathematics. Figure 3 It can be seen that "clicking on high school history" is a maximum frequent behavior sequence, but since high school history is not very helpful for the learning of junior high school students, it is an invalid behavior sequence, and when constructing the behavior semantic graph, it is pointed to the node representing the invalid result. "Clicking on junior high school mathematics-buy" is a maximum frequent behavior sequence, which is the first valid behavior sequence, and when constructing the behavior semantic graph, it is pointed to the node representing the valid result. After processing each maximum frequent behavior sequence in the above manner, the behavior semantic graph of the user of this category can be obtained.
[0110] After constructing the behavior semantic graph, save the behavior semantic graph and its category. In the application process, after obtaining short-term behavior data, you can identify the user in the corresponding behavior semantic graph according to the type of user. Optionally, the behavior semantic graph can be updated regularly, that is, regularly construct a new behavior semantic graph based on historical behavior data to replace the old behavior semantic graph.
[0111] The following is a detailed description of the effective behavior determination method. Fig.14 For an example flow chart of the effective behavior determination method provided in the embodiment of the present application, refer to Fig.14 After obtaining the short-term behavior data, the behavior semantic graph of the corresponding category is selected according to the offline user classification, and the semantic graph is identified in real time according to the short-term behavior data until the total cache duration of the behavior identified in the received complete behavior sequence or semi-complete behavior sequence exceeds the duration threshold, and the currently obtained behavior sequence is processed (confirming the first valid behavior sequence / invalid behavior sequence or obtaining the second valid behavior sequence), and the valid behavior sequence (the first valid behavior sequence or the second valid behavior sequence) is sent to the downstream (recommendation model) for processing to obtain real-time recommendation results.
[0112] As described above, by acquiring the historical behavior data of each user of different categories, and then mining the maximum frequent behavior sequence of the category based on the historical behavior data under the same category, and determining the sequence result of the maximum frequent behavior sequence to construct a corresponding behavior semantic graph through the maximum frequent behavior sequence and the corresponding sequence result, the technical solution realizes modeling according to the user's long-term and / or medium-term historical behavior data, that is, constructing a behavior semantic graph to obtain the behavior results corresponding to different behavior sequences, thereby ensuring that the behavior semantic graph can specifically mine the user's short-term interests during the application process, so as to improve the quality and conversion rate of real-time recommendation results.
[0113] Fig.15 A schematic diagram of a structure of an effective behavior determination device provided in an embodiment of the present application, referring to Fig.15 The effective behavior determination device includes a data collection module 501, a behavior identification module 502, and a behavior search module 503.
[0114] Among them, the data collection module 501 is used to obtain the short-term behavior data currently collected; the behavior identification module 502 is used to identify the corresponding behavior in the behavior semantic graph of the corresponding user according to the short-term behavior data, and the user is the executing user of the short-term behavior data; the behavior search module 503 is used to search for the first valid behavior sequence in the behavior semantic graph according to the identified behavior in the behavior semantic graph, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
[0115] On the basis of the above embodiment, the short-term behavior data is cached in the currently processed behavior queue, and also includes: a graph selection module, which is used to select a behavior semantic graph corresponding to the user from multiple pre-constructed behavior semantic graphs according to the category to which the user belongs, before identifying the corresponding behavior in the behavior semantic graph of the corresponding user based on the short-term behavior data. When the short-term behavior data is the first short-term behavior data of the corresponding user in the behavior queue, the behavior semantic graph corresponding to the user is selected according to the category to which the user belongs.
[0116] Based on the above embodiment, the behavior search module 503 includes: a complete sequence search unit, which is used to search for a complete behavior sequence in the behaviors identified in the behavior semantic graph; and a first sequence determination unit, which is used to determine the complete behavior sequence as the first valid behavior sequence if the complete behavior sequence points to a valid result node.
[0117] Based on the above embodiment, it further includes: a discarding module, which is used to determine the complete behavior sequence as an invalid behavior sequence if the complete behavior sequence points to an invalid result node, and discard the invalid behavior sequence.
[0118] Based on the above embodiment, it also includes: a return module, which is used to return to execute the operation of obtaining the currently collected short-term behavior data if a complete behavior sequence is not found in the behavior identified in the behavior semantic graph.
[0119] Based on the above embodiment, the return module includes: a semi-complete sequence acquisition unit, which is used to obtain the semi-complete behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph if the complete behavior sequence is not found in the behaviors identified in the behavior semantic graph; a duration judgment unit, which is used to judge whether the total cache duration of each behavior in the semi-complete behavior sequence reaches a duration threshold; and a return execution unit, which is used to return to execute the operation of obtaining the currently collected short-term behavior data if the duration threshold is not reached.
[0120] On the basis of the above embodiment, it also includes: a second sequence determination module, which is used to determine the semi-complete behavior sequence as a second valid behavior sequence if the duration threshold is reached, so as to determine the real-time recommendation result of the user through the second valid behavior sequence, and the weight of the second valid behavior sequence is less than the weight of the first valid behavior sequence.
[0121] Based on the above embodiment, the behavior semantic graph is a directed acyclic graph.
[0122] On the basis of the above embodiment, the behavior queue caches short-term behavior data of multiple users, and each of the users corresponds to a behavior semantic graph.
[0123] On the basis of the above embodiment, it also includes: a data acquisition module, which is used to acquire historical behavior data of multiple users, and the multiple users are divided into at least two categories; a sequence mining module, which is used to mine the maximum frequent behavior sequence of the category based on the historical behavior data under the same category; a sequence result determination module, which is used to determine the sequence result of the maximum frequent behavior sequence according to the behavior result corresponding to the maximum frequent behavior sequence, and the sequence result is a first valid behavior sequence or an invalid behavior sequence; a semantic graph construction module, which is used to construct a behavior semantic graph corresponding to the category according to the maximum frequent behavior sequence under the same category and the corresponding sequence results.
[0124] On the basis of the above embodiment, the maximum frequent behavior sequence is mined by the GSP algorithm.
[0125] The effective behavior determination device provided above can be used to execute the effective behavior determination method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
[0126] It is worth noting that in the embodiment of the above-mentioned effective behavior determination device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application.
[0127] Fig.16 This is a schematic diagram of the structure of an effective behavior determination device provided in an embodiment of the present application. Fig.16 As shown, the effective behavior determination device includes a processor 60, a memory 61, an input device 62 and an output device 63; the number of processors 60 in the effective behavior determination device can be one or more. Fig.16 A processor 60 is taken as an example. The processor 60, the memory 61, the input device 62 and the output device 63 in the effective behavior determination device can be connected via a bus or other means. Fig.16 The example of connecting through bus is taken in the following.
[0128] The memory 61 is a computer-readable storage medium that can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the effective behavior determination method in the embodiment of the present application (for example, the data acquisition module 501, the behavior identification module 502, and the behavior search module 503 in the effective behavior determination device). The processor 60 executes various functional applications and data processing of the effective behavior determination device by running the software programs, instructions and modules stored in the memory 61, that is, realizing the above-mentioned effective behavior determination method.
[0129] The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the effective behavior determination device, etc. In addition, the memory 61 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 61 may further include a memory remotely arranged relative to the processor 60, and these remote memories may be connected to the effective behavior determination device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The input device 62 can be used to receive input digital or character information and generate key signal input related to user settings and function control of the effective behavior determination device. The output device 63 can include display devices such as display screens. The effective behavior determination device can also include a communication device to communicate data with other devices.
[0131] The above-mentioned effective behavior determination device includes an effective behavior determination device, which can be used to execute any effective behavior determination method and has corresponding functions and beneficial effects.
[0132] In addition, an embodiment of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to perform relevant operations in the effective behavior determination method provided in any embodiment of the present application, and have corresponding functions and beneficial effects.
[0133] Those skilled in the art should understand that the embodiments of the present application may be provided as methods, systems, or computer program products.
[0134] Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code. The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the functions in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the functions specified in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0135] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory. The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0136] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0137] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0138] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims
1. A method for determining effective behavior, characterized in that: include: Get the currently collected short-term behavior data; According to the short-term behavior data, a corresponding behavior is identified in a behavior semantic graph of a corresponding user, the user being the executing user of the short-term behavior data, the behavior semantic graph showing behaviors frequently generated by users of a corresponding category, behavior sequences between behaviors, and behavior results of each behavior sequence, wherein the behavior results include valid results and invalid results; According to the behaviors identified in the behavior semantic graph, a first valid behavior sequence is searched in the behavior semantic graph to determine the real-time recommendation result of the user through the first valid behavior sequence.
2. The effective behavior determination method according to claim 1, characterized in that: The short-term behavior data is cached in the currently processed behavior queue; Before identifying the corresponding behavior in the behavior semantic graph of the corresponding user according to the short-term behavior data, the method further includes: When the short-term behavior data is the first short-term behavior data of the corresponding user in the behavior queue, a behavior semantic graph corresponding to the user is selected from a plurality of pre-constructed behavior semantic graphs according to the category to which the user belongs.
3. The effective behavior determination method according to claim 1, characterized in that: The searching for a first valid behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph comprises: Searching for a complete behavior sequence in the behaviors identified in the behavior semantic graph; If the complete behavior sequence points to a valid result node, the complete behavior sequence is determined as the first valid behavior sequence.
4. The effective behavior determination method according to claim 3, characterized in that: Also includes: If the complete behavior sequence points to an invalid result node, the complete behavior sequence is determined to be an invalid behavior sequence, and the invalid behavior sequence is discarded.
5. The effective behavior determination method according to claim 3, characterized in that: Also includes: If a complete behavior sequence is not found in the behaviors identified in the behavior semantic graph, the process returns to execute the operation of obtaining the currently collected short-term behavior data.
6. The effective behavior determination method according to claim 5, characterized in that: If a complete behavior sequence is not found in the behaviors identified in the behavior semantic graph, returning to execute the operation of obtaining the currently collected short-term behavior data includes: If a complete behavior sequence is not found in the behaviors identified in the behavior semantic graph, obtaining a semi-complete behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph; Determine whether the total cache duration of each behavior in the semi-complete behavior sequence reaches a duration threshold; If the duration threshold is not reached, the operation of obtaining the currently collected short-term behavior data is returned.
7. The effective behavior determination method according to claim 6, characterized in that: Also includes: If the duration threshold is reached, the semi-complete behavior sequence is determined as a second valid behavior sequence to determine the real-time recommendation result of the user through the second valid behavior sequence, and the weight of the second valid behavior sequence is less than the weight of the first valid behavior sequence.
8. The effective behavior determination method according to claim 1, characterized in that: The behavior semantic graph is a directed acyclic graph.
9. The effective behavior determination method according to claim 2, characterized in that: The behavior queue caches short-term behavior data of multiple users, and each of the users corresponds to a behavior semantic graph.
10. The effective behavior determination method according to claim 1, characterized in that: Also includes: Acquire historical behavior data of a plurality of users, where the plurality of users are divided into at least two categories; Mining the maximum frequent behavior sequence of the category based on the historical behavior data under the same category; Determine a sequence result of the maximum frequent behavior sequence according to the behavior result corresponding to the maximum frequent behavior sequence, wherein the sequence result is a first valid behavior sequence or an invalid behavior sequence; According to the maximum frequent behavior sequence under the same category and the corresponding sequence results, a behavior semantic graph corresponding to the category is constructed.
11. The effective behavior determination method according to claim 10, characterized in that: The maximum frequent behavior sequence is mined by the GSP algorithm.
12. An effective behavior determination device, characterized in that: include: Data collection module, used to obtain the currently collected short-term behavior data; A behavior identification module, used to identify corresponding behaviors in a behavior semantic graph of a corresponding user according to the short-term behavior data, wherein the user is an executing user of the short-term behavior data, and the behavior semantic graph shows behaviors frequently generated by users of the corresponding category, behavior sequences between behaviors, and behavior results of each behavior sequence, wherein the behavior results include valid results and invalid results; The behavior search module is used to search for a first valid behavior sequence in the behavior semantic graph according to the behaviors identified in the behavior semantic graph, so as to determine the real-time recommendation result of the user through the first valid behavior sequence.
13. An effective behavior determination device, characterized in that: include: one or more processors; A memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the effective behavior determination method as described in any one of claims 1-11.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the effective behavior determination method as described in any one of claims 1 to 11 is implemented.
Citation Information
Patent Citations
Intelligent service matching recommendation method and device based on machine learning algorithm, equipment and storage medium
CN111046297A