Sequence processing method, action prediction method, device, equipment and medium

CN122986315APending Publication Date: 2026-10-27BEIJING DAJIA INTERNET INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610976445.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-01
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

[0004]本公开提供一种序列处理方法、动作预测方法、装置、设备及介质,以至少解决相关技术中在对历史动作序列进行分析时,往往难以捕捉分散在历史动作序列中的模式特征,导致分析得到的预测先验信息存在偏差,进而导致动作预测的准确度低的问题

Benefits of technology

本公开通过从历史动作序列中采样样本子序列,并基于每个样本子序列中在前元素的历史场景和历史场景对应的历史动作,对末尾元素在相应历史场景下的动作进行预测,得到第一预测动作和预测推理信息,进而能够基于样本子序列、末尾元素的历史动作与第一预测动作的动作比较信息、预测推理信息得到预测先验信息;由于每个样本子序列可以是历史动作序列的细粒度表示,相应在对多个样本子序列进行逐个处理过程中,均能够获取到多个样本子序列各自对应的细粒度特征,使得提取得到的预测先验信息中可包括分散在历史动作序列中的细粒度特征,能够提高预测先验信息确定的准确性,进而在准确的预测先验信息的指导下进行动作预测,能够提高动作预测的准确性。区别于相关技术中直接对历史动作序列进行序列处理,难以捕捉到分散在历史动作序列中的细粒度特征的技术方案,解决了由于缺少细粒度特征使得预测先验信息存在偏差进而导致动作预测的准确度低的技术问题。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122986315A_ABST
    Figure CN122986315A_ABST
Patent Text Reader

Abstract

The present disclosure relates to a sequence processing method, an action prediction method, an apparatus, a device and a medium. The sequence processing method comprises sampling a historical action sequence of a target object to obtain a plurality of sample subsequences; predicting an action based on a first element in each sample subsequence and a historical scene in a tail element of each sample subsequence to obtain a first predicted action of the target object in the historical scene in the tail element and prediction reasoning information in the action prediction process; and extracting prior information based on each sample subsequence, a historical action in the tail element, action comparison information of the first predicted action, and the prediction reasoning information to obtain prediction prior information. The present disclosure can improve the accuracy of prediction prior information determination, and then improve the accuracy of action prediction under the guidance of accurate prediction prior information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a sequence processing method, action prediction method, apparatus, device, and medium. Background Technology

[0002] In applications such as personalized recommendations and intelligent interaction, accurate prediction of the future actions of a target object is key to improving the intelligence level of the system. For example, by deeply mining and analyzing the historical action sequences of a target object, action patterns can be extracted. In actual prediction scenarios, these action patterns can be used as prior information to assist in predicting the target object's actions in a given scenario; thus, the accuracy of the prior information prediction is closely related to the accuracy of the action prediction.

[0003] In related technologies, when analyzing historical action sequences, it is often difficult to capture the relevant features scattered in the historical action sequences, which leads to bias in the predicted prior information obtained from the analysis, and thus results in low accuracy of action prediction. Summary of the Invention

[0004] This disclosure provides a sequence processing method, action prediction method, apparatus, device, and medium to at least solve the problem in related technologies where it is often difficult to capture the pattern features scattered throughout historical action sequences during analysis, leading to biased prior information in the obtained predictions and consequently low accuracy in action prediction. The technical solution of this disclosure is as follows: According to a first aspect of the present disclosure, a sequence processing method is provided, the method comprising: The historical action sequence of the target object is sampled to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and the historical action corresponding to the historical scene. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action of the target object in the historical scene in the last element and the prediction reasoning information in the action prediction process; the first element is each element in the sample subsequence other than the last element. Prior information is extracted based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

[0005] In an exemplary embodiment, the prediction prior information includes action prior information of the target object; the action prior information characterizes the action preferences of the target object within a historical time period; The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes first inference information, the first inference information is processed based on each sample subsequence and the action comparison information to obtain the action prior information; the first inference information is inference information associated with the action preferences of the target object.

[0006] In an exemplary embodiment, the prediction prior information includes bias prior information about the target object; the bias prior information is constraint information that instructs the prediction model to avoid a preset reasoning tendency. The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes second inference information, the second inference information is processed based on each sample subsequence and the action comparison information to obtain the bias prior information; the second inference information is inference information associated with the inference tendency of the prediction model.

[0007] In an exemplary embodiment, the step of extracting prior information based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information includes: Prior information is extracted based on each sample subsequence, the action comparison information, and the prediction inference information to obtain at least one candidate prior information corresponding to each sample subsequence. The reliability of at least one of the candidate prior information is verified, and the predicted prior information is determined from the at least one of the candidate prior information based on the reliability verification result.

[0008] In an exemplary embodiment, the step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: The historical actions in the first element of each sample subsequence are rewritten to obtain the rewritten subsequence; Match at least one of the candidate prior information pieces with the rewritten subsequence to obtain a matching result; Based on the matching result, verified prior information is determined from at least one of the candidate prior information; the verified prior information does not match the rewritten subsequence. The predicted prior information is determined based on the verified prior information.

[0009] In an exemplary embodiment, the step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: The historical scene in the last element of each sample subsequence is rewritten to obtain multiple rewritten scenes; Multiple candidate scenarios are generated based on the historical scenarios in the last element and the multiple rewritten scenarios; Under the guidance of at least one of the candidate prior information, a scenario selection is performed on multiple candidate scenarios to obtain a scenario selection result corresponding to at least one of the candidate prior information; Based on the scene selection result, verified prior information is determined from at least one of the candidate prior information; the scene selection result corresponding to the verified prior information indicates that the historical scene was not selected. The predicted prior information is determined based on the verified prior information.

[0010] In an exemplary embodiment, the step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: Obtain a set of positive sample sequences that match each candidate prior information from the historical action sequence, and a set of negative sample sequences that do not match each candidate prior information; Based on each of the candidate prior information, multiple positive sample sequences in the positive sample sequence set are constrained and encoded to obtain the first sequence features corresponding to each of the multiple positive sample sequences; Based on each of the candidate prior information, multiple negative sample sequences in the negative sample sequence set are constrained and encoded to obtain the second sequence features corresponding to each of the multiple negative sample sequences; If the first distance between the first sequence features corresponding to any two positive sample sequences is less than the first preset distance, and the second distance between the first sequence feature corresponding to any positive sample sequence and the second sequence feature corresponding to any negative sample sequence is greater than or equal to the second preset distance, each candidate prior information is determined as verified information. The predicted prior information is determined based on the verified prior information.

[0011] In an exemplary embodiment, determining the predictive prior information based on the verified prior information includes: Add the verified prior information to the prior information set; If the prior information set includes a target prior information group, the predicted prior information is generated based on the target prior information group; the target prior information group is determined based on multiple semantically similar or semantically identical verified prior information in the prior information set. The method further includes: When generating the predicted prior information based on the target prior information, the target prior information group is deleted from the prior information set.

[0012] In an exemplary embodiment, the step of predicting actions based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action of the target object under the historical scene in the last element and the prediction inference information during the action prediction process includes: Action prediction is performed based on the historical scene and historical prior information in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information; the historical prior information is information used to provide guidance for the prediction of the target object's action in a given scene before the prediction prior information is generated.

[0013] In an exemplary embodiment, the step of sampling a subsequence of the historical action sequence of the target object to obtain multiple sample subsequences includes: The historical action sequence is sampled to obtain multiple sampled subsequences; each sampled subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. Action prediction is performed based on the second element in each of the sampled sub-sequences and the historical scene in the last element of each of the sampled sub-sequences to obtain the second predicted action of the target object in the historical scene in the last element and the prediction confidence of the second predicted action; the second element is each of the other elements in each of the sampled sub-sequences except the last element; The multiple sample subsequences are determined based on the prediction confidence of the multiple sample subsequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences.

[0014] In an exemplary embodiment, determining the plurality of sample sub-sequences based on the prediction confidence of the second prediction action corresponding to each of the plurality of sample sub-sequences includes: Multiple sample subsequences are determined from the multiple sampled subsequences; the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences is less than or equal to a preset confidence level.

[0015] In an exemplary embodiment, determining the plurality of sample sub-sequences based on the prediction confidence of the second prediction action corresponding to each of the plurality of sample sub-sequences includes: The sampled subsequences are sorted in ascending order of prediction confidence of the second prediction action corresponding to each of the sampled subsequences to obtain the sampled subsequences. The action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information during the action prediction process, includes: The sample subsequences are traversed in order of prediction confidence from low to high. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information.

[0016] According to a second aspect of the present disclosure, an action prediction method is provided, characterized in that the method includes: Obtain the predicted prior information corresponding to the target object and the action subsequence of the target object; the action subsequence is a subsequence of the historical action sequence of the target object, and the last element of the action subsequence is consistent with the last element of the historical action sequence; the predicted prior information is determined based on the sequence processing method of the first aspect described above. Based on the prediction prior information, the action subsequence, and the scene to be predicted, action prediction is performed to obtain the third predicted action of the target object in the scene to be predicted.

[0017] According to a third aspect of the present disclosure, a sequence processing apparatus is provided, the apparatus comprising: The subsequence sampling unit is configured to perform subsequence sampling on the historical action sequence of the target object to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. The first prediction unit is configured to perform action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information in the action prediction process; the first element is each element in the sample subsequence other than the last element. The prior information determination unit is configured to perform prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

[0018] In an exemplary embodiment, the prediction prior information includes action prior information of the target object; the action prior information characterizes the action preferences of the target object within a historical time period; The prior information determination unit is configured to execute: When the prediction inference information includes first inference information, the first inference information is processed based on each sample subsequence and the action comparison information to obtain the action prior information; the first inference information is inference information associated with the action preferences of the target object.

[0019] In an exemplary embodiment, the prediction prior information includes bias prior information about the target object; the bias prior information is constraint information that instructs the prediction model to avoid a preset reasoning tendency. The prior information determination unit is configured to execute: When the prediction inference information includes second inference information, the second inference information is processed based on each sample subsequence and the action comparison information to obtain the bias prior information; the second inference information is inference information associated with the inference tendency of the prediction model.

[0020] In an exemplary embodiment, the prior information determination unit is configured to perform: Prior information is extracted based on each sample subsequence, the action comparison information, and the prediction inference information to obtain at least one candidate prior information corresponding to each sample subsequence. The reliability of at least one of the candidate prior information is verified, and the predicted prior information is determined from the at least one of the candidate prior information based on the reliability verification result.

[0021] In an exemplary embodiment, the prior information determination unit is configured to perform: The historical actions in the first element of each sample subsequence are rewritten to obtain the rewritten subsequence; Match at least one of the candidate prior information pieces with the rewritten subsequence to obtain a matching result; Based on the matching result, verified prior information is determined from at least one of the candidate prior information; the verified prior information does not match the rewritten subsequence. The predicted prior information is determined based on the verified prior information.

[0022] In an exemplary embodiment, the prior information determination unit is configured to perform: The historical scene in the last element of each sample subsequence is rewritten to obtain multiple rewritten scenes; Multiple candidate scenarios are generated based on the historical scenarios in the last element and the multiple rewritten scenarios; Under the guidance of at least one of the candidate prior information, a scenario selection is performed on multiple candidate scenarios to obtain a scenario selection result corresponding to at least one of the candidate prior information; Based on the scene selection result, verified prior information is determined from at least one of the candidate prior information; the scene selection result corresponding to the verified prior information indicates that the historical scene was not selected. The predicted prior information is determined based on the verified prior information.

[0023] In an exemplary embodiment, the prior information determination unit is configured to perform: Obtain a set of positive sample sequences that match each candidate prior information from the historical action sequence, and a set of negative sample sequences that do not match each candidate prior information; Based on each of the candidate prior information, multiple positive sample sequences in the positive sample sequence set are constrained and encoded to obtain the first sequence features corresponding to each of the multiple positive sample sequences; Based on each of the candidate prior information, multiple negative sample sequences in the negative sample sequence set are constrained and encoded to obtain the second sequence features corresponding to each of the multiple negative sample sequences; If the first distance between the first sequence features corresponding to any two positive sample sequences is less than the first preset distance, and the second distance between the first sequence feature corresponding to any positive sample sequence and the second sequence feature corresponding to any negative sample sequence is greater than or equal to the second preset distance, each candidate prior information is determined as verified information. The predicted prior information is determined based on the verified prior information.

[0024] In an exemplary embodiment, the prior information determination unit is configured to perform: Add the verified prior information to the prior information set; If the prior information set includes a target prior information group, the predicted prior information is generated based on the target prior information group; the target prior information group is determined based on multiple semantically similar or semantically identical verified prior information in the prior information set. The apparatus further includes a set update unit configured to perform: When generating the predicted prior information based on the target prior information, the target prior information group is deleted from the prior information set.

[0025] In an exemplary embodiment, the first prediction unit is configured to perform: Action prediction is performed based on the historical scene and historical prior information in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information; the historical prior information is information used to provide guidance for the prediction of the target object's action in a given scene before the prediction prior information is generated.

[0026] In one exemplary embodiment, the subsequence sampling unit is configured to perform: The historical action sequence is sampled to obtain multiple sampled subsequences; each sampled subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. Action prediction is performed based on the second element in each of the sampled sub-sequences and the historical scene in the last element of each of the sampled sub-sequences to obtain the second predicted action of the target object in the historical scene in the last element and the prediction confidence of the second predicted action; the second element is each of the other elements in each of the sampled sub-sequences except the last element; The multiple sample subsequences are determined based on the prediction confidence of the multiple sample subsequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences.

[0027] In one exemplary embodiment, the subsequence sampling unit is configured to perform: Multiple sample subsequences are determined from the multiple sampled subsequences; the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences is less than or equal to a preset confidence level.

[0028] In one exemplary embodiment, the subsequence sampling unit is configured to perform: The sampled subsequences are sorted in ascending order of prediction confidence of the second prediction action corresponding to each of the sampled subsequences to obtain the sampled subsequences. The first prediction unit is configured to execute: The sample subsequences are traversed in order of prediction confidence from low to high. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information.

[0029] According to a fourth aspect of the present disclosure, an action prediction apparatus is provided, the apparatus comprising: The information acquisition unit is configured to acquire the predicted prior information corresponding to the target object and the action sub-sequence of the target object; the action sub-sequence is a sub-sequence of the historical action sequence of the target object, and the last element of the action sub-sequence is consistent with the last element of the historical action sequence; the predicted prior information is determined based on the sequence processing method of the first aspect described above. The second prediction unit is configured to perform action prediction based on the prediction prior information, the action subsequence and the scene to be predicted, to obtain the third predicted action of the target object in the scene to be predicted.

[0030] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the instructions to implement the sequence processing method or action prediction method as described above.

[0031] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, wherein when instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the sequence processing method or the action prediction method as described above.

[0032] According to a seventh aspect of the present disclosure, a computer program product is provided, the computer program product including a computer program stored in a readable storage medium, wherein at least one processor of a computer device reads from the readable storage medium and executes the computer program, causing the device to perform the sequence processing method or action prediction method described above.

[0033] The technical solutions provided by the embodiments of this disclosure bring at least the following beneficial effects: This disclosure samples subsequences from historical action sequences and predicts the action of the last element in the corresponding historical scene based on the historical scene and the corresponding historical action of the preceding element in each subsequence. This yields a first predicted action and prediction inference information. Furthermore, it can obtain prediction prior information based on the subsequences, the comparison information between the historical action of the last element and the first predicted action, and the prediction inference information. Since each subsequence can be a fine-grained representation of the historical action sequence, each subsequence can acquire its own fine-grained features during the processing of multiple subsequences. This allows the extracted prediction prior information to include fine-grained features scattered throughout the historical action sequence, improving the accuracy of prediction prior information determination. Guided by accurate prediction prior information, action prediction accuracy is further enhanced. This differs from related technologies that directly process historical action sequences, making it difficult to capture the fine-grained features scattered throughout the historical action sequence. This solution addresses the technical problem of low action prediction accuracy due to biased prediction prior information caused by the lack of fine-grained features.

[0034] Furthermore, predictive inference information refers to the complete logical deduction chain or intermediate state trajectory generated during the action prediction process, which can represent the mapping from historical scenes and historical actions to the first predicted action. Its inference process can serve as relevant experience for action prediction. Since predictive inference information is generated by processing multiple sample sub-sequences one by one, each sample sub-sequence can be a fine-grained representation of the historical action sequence. The corresponding predictive inference information is fine-grained inference information. By summarizing and generalizing the predictive inference information, fine-grained predictive prior information can be obtained, which can be used to directly guide action prediction in similar future scenarios. Correspondingly, by constraining the predictive inference information with sample sub-sequences and action comparison information, predictive prior information that matches the historical action sequence can be obtained. There is no need to build predictive prior information from scratch, which reduces the difficulty of building predictive prior information and improves the convenience of building predictive prior information.

[0035] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0036] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.

[0037] Figure 1 This is a schematic diagram of an implementation environment according to an exemplary embodiment.

[0038] Figure 2This is a flowchart illustrating a sequence processing method according to an exemplary embodiment.

[0039] Figure 3 This is a flowchart illustrating an action prediction method according to an exemplary embodiment.

[0040] Figure 4 This is a schematic diagram of a sequence processing framework according to an exemplary embodiment.

[0041] Figure 5 This is a block diagram of a sequence processing apparatus according to an exemplary embodiment.

[0042] Figure 6 This is a block diagram of an action prediction device according to an exemplary embodiment.

[0043] Figure 7 This is a schematic diagram of an electronic device structure according to an exemplary embodiment. Detailed Implementation

[0044] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.

[0045] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0046] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties.

[0047] Please see Figure 1 The illustration shows an implementation environment provided by an embodiment of the present disclosure. The implementation environment may include at least one terminal 110 and a server 120, which can communicate with each other via a network.

[0048] Optionally, terminal 110 may include: smartphones, tablets, laptops, digital assistants, smart wearable devices, in-vehicle terminals, servers, etc. Terminal 110 has an interactive application installed and running. In this embodiment, the interactive application may be an application that provides personalized recommendations or intelligent interaction functions, such as a social application, instant messaging application, live streaming application, game application, e-commerce application, virtual reality (VR) application, augmented reality (AR) application, etc. This disclosure does not limit the specific application to these categories.

[0049] Optionally, server 120 provides background services for the interactive application installed on terminal 110. Terminal 110 can communicate with server 120 based on browser / server (B / S) mode or client / server (C / S) mode. The operating system running on terminal 110 in this embodiment may include, but is not limited to, Android, iOS, Linux, Windows, etc.

[0050] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.

[0051] Figure 2 This disclosure provides a sequence processing method, the execution entity of which can be one of the aforementioned methods. Figure 1 The server in the middle; optionally, the method may include: S210. Subsequence sampling is performed on the historical action sequence of the target object to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene; S220. Based on the historical scene in the first element and the last element of each sample subsequence, perform action prediction to obtain the first predicted action of the target object in the historical scene in the last element and the prediction reasoning information in the action prediction process; the first element is other elements in each sample subsequence except the last element; S230. Prior information is extracted based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

[0052] As can be seen from the above process, this disclosure samples sample subsequences from historical action sequences and predicts the action of the last element in the corresponding historical scene based on the historical scene of the preceding element and the historical action corresponding to the historical scene in each sample subsequence. This yields a first predicted action and prediction inference information. Furthermore, it can obtain prediction prior information based on the sample subsequence, the action comparison information between the historical action of the last element and the first predicted action, and the prediction inference information. Since each sample subsequence can be a fine-grained representation of the historical action sequence, the fine-grained features corresponding to each of the multiple sample subsequences can be obtained during the processing of multiple sample subsequences. This allows the extracted prediction prior information to include fine-grained features scattered throughout the historical action sequence, improving the accuracy of prediction prior information determination and thus improving the accuracy of action prediction. Unlike related technologies that directly process historical action sequences, making it difficult to capture the fine-grained features scattered throughout the historical action sequence, this disclosure solves the technical problem of low accuracy in action prediction due to biased prediction prior information caused by the lack of fine-grained features. Furthermore, predictive inference information refers to the complete logical deduction chain or intermediate state trajectory generated during the action prediction process, which can represent the mapping from historical scenes and historical actions to the first predicted action. Its inference process can serve as relevant experience for action prediction. Since predictive inference information is generated by processing multiple sample sub-sequences one by one, each sample sub-sequence can be a fine-grained representation of the historical action sequence. The corresponding predictive inference information is fine-grained inference information. By summarizing and generalizing the predictive inference information, fine-grained predictive prior information can be obtained, which can be used to directly guide action prediction in similar future scenarios. Correspondingly, by constraining the predictive inference information with sample sub-sequences and action comparison information, predictive prior information that matches the historical action sequence can be obtained. There is no need to build predictive prior information from scratch, which reduces the difficulty of building predictive prior information and improves the convenience of building predictive prior information.

[0053] The steps of the sequence processing method and the corresponding technical effects are described in detail below with reference to embodiments.

[0054] For step S210, the historical action sequence of the target object is sampled to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and the historical action corresponding to the historical scene.

[0055] In this embodiment, the target object can be an object capable of performing corresponding actions in a given scenario. Different objects may perform the same or different actions in the same scenario. The historical action sequence of the target object can be a sequence obtained by sorting the historical action records of the target object within a historical time period based on the chronological order of action execution time. Each historical action record may include a historical scenario and the historical action corresponding to the historical scenario. One element in the historical action sequence corresponds to one historical action record. For example, the historical action sequence is Ht: (s0,a0)→(s1,a1)→(s2,a2)→(s3,a3)……, where the action time corresponding to (s0,a0) is earlier than (s1,a1), the action time corresponding to (s1,a1) is earlier than (s2,a2), the action time corresponding to (s2,a2) is earlier than (s3,a3), and so on; where si represents the scenario and ai represents the action in the corresponding scenario.

[0056] In one example, multiple sample subsequences can be obtained by randomly sampling historical action sequences; alternatively, diversity-based coverage sampling can be used to ensure that the sampled subsequences cover different historical time periods and different scene categories. For multiple sample subsequences, the number of elements contained in different sample subsequences can be the same or different.

[0057] In an optional embodiment, the sample subsequence can be a subsequence extracted from the historical action sequence, and the elements in the corresponding sample subsequence are in consecutive positions in the historical action sequence; for example, if the historical action sequence is Ht: (s0,a0)→(s1,a1)→(s2,a2)→(s3,a3)……, the corresponding sample subsequence can be: (s1,a1)→(s2,a2)→(s3,a3).

[0058] In another optional embodiment, each element in the sample subsequence can also be obtained by sampling the historical action sequence multiple times. The positions of each element in the corresponding sample subsequence in the historical action sequence are not continuous, but the temporal order of each element in the sample subsequence is consistent with the temporal order of each element in the historical action sequence. For example, if the historical action sequence is Ht: (s0,a0)→(s1,a1)→(s2,a2)→(s3,a3)→(s4,a4)……, the corresponding sample subsequence can be: (s0,a0)→(s2,a2)→(s4,a4), or (s0,a0)→(s1,a1)→(s4,a4).

[0059] In this embodiment, the scene can refer to the environmental information of the target object or the object it faces, and the action can be a positive feedback operation, negative feedback operation, neutral feedback operation, etc., performed by the target object in the corresponding scene.

[0060] In the field of content delivery, historical scenarios can include content of different themes and different display formats. Content themes can include lifestyle, technology, music, sports, parenting, etc., and content display formats can include text, audio, video, etc. Corresponding historical actions can include positive feedback such as likes, favorites, forwards, and comments, as well as negative feedback such as disinterest and reports.

[0061] In the e-commerce field, historical scenarios can include products under different product categories and products from different brands. Product categories can include clothing, electronic products, food, home decoration, shoes, bags, etc., and product brands can include brand A, brand B, etc.; corresponding historical actions can include adding to favorites, adding to cart, purchasing, skipping, etc.

[0062] For step S220, action prediction is performed based on the first element in each sample subsequence and the historical scene in the last element of each sample subsequence to obtain the first predicted action of the target object in the historical scene in the last element and the prediction reasoning information in the action prediction process; the first element is each of the other elements in each sample subsequence except the last element.

[0063] Optionally, action prediction is performed based on the first element in each sample subsequence and the historical scene in the last element of each sample subsequence. That is, the first element in each sample subsequence is used as the prediction basis, which can represent the historical action features of the target object. The historical scene in the last element of each sample subsequence is used as the scene to be predicted. The action of the target object in the scene to be predicted is predicted to obtain the first predicted action and the prediction reasoning information in the action prediction process.

[0064] Predictive inference information refers to the complete logical deduction chain or intermediate state trajectory generated by the system during the user behavior prediction process, representing the mapping from the input historical scene and historical actions to the first predicted action. It not only includes the final action prediction result but also encompasses the feature associations, context parsing paths, and computational processes of intent evolution upon which that prediction result is derived. Predictive inference information records the thought process of "why this prediction is made," and this explicit reasoning process makes the prediction process highly interpretable.

[0065] The number of first elements can be one or more; for example, a sample subsequence can be: (s0,a0) → (s1,a1) → (s2,a2), where (s0,a0) and (s1,a1) are the first elements and (s2,a2) are the last elements. Correspondingly, (s0,a0) and (s1,a1) can be used as the basis for prediction to predict the first predicted action a2' of the target object in scene s2.

[0066] In this embodiment, the prediction of the target object's actions in the scene to be predicted based on historical scenes and historical actions can be achieved through a large language model; all large language models that can achieve action prediction in related technologies can be applied to this disclosure, and will not be described in detail here.

[0067] In an optional embodiment, the target object may correspond to historical prior information; accordingly, the step of predicting actions based on the historical scenes in the first element and the last element of each sample subsequence to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information during the action prediction process includes: Action prediction is performed based on the historical scene and historical prior information in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information; the historical prior information is information used to provide guidance for the prediction of the target object's action in a given scene before the prediction prior information is generated.

[0068] The historical prior information is information used to guide the prediction of the target object's actions in a given scenario before the prediction prior information is generated; that is, the prior information used to guide the prediction of the target object's actions is constantly updated. It can be updated at preset time intervals, or it can be updated when the increment of the target object's action sequence meets a preset increment.

[0069] Accordingly, within this prior information update cycle, when predicting the action of the last element in each sample subsequence, a comprehensive prediction can be made by combining the historical prior information corresponding to the target object, so as to predict the action in the corresponding historical scenario under the guidance of the historical prior information.

[0070] In this embodiment, since the sample subsequence is relatively short, by introducing historical prior information, it is possible to predict actions based on stable historical prior information, weaken the interference of short-term random actions, effectively suppress recency bias, make the prediction logic fit the user's historical action preferences, and improve the accuracy of predicting the actions of the last element in the sample subsequence.

[0071] For step S230, prior information is extracted based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

[0072] Predictive reasoning information is not only used to indicate the basis for generating the first predictive action, but also serves as the data foundation for prior information. The system can extract predictive patterns and deductive logic with universal laws from the predictive reasoning information and transform them into predictive prior information.

[0073] In one optional embodiment, the action comparison information between the historical action and the first predicted action in the last element can characterize the matching between the actual action in the historical scene and the predicted action in the historical scene in the last element. If there is a deviation between the actual action and the predicted action, a constraint update operation can be performed on the prediction inference information based on the sample subsequence, and then prediction prior information can be obtained based on the prediction inference information after the constraint update operation. The constraint update operation may include at least one operation such as backtracking the prediction inference information, locating the erroneous derivation step, and correcting or supplementing the corresponding step. If there is no deviation between the actual action and the predicted action, there is no need to perform a constraint update operation on the prediction inference information; the prediction inference information can be directly determined as prediction prior information, or prediction prior information can be obtained by summarizing and generalizing the prediction inference information. That is, the action comparison information can serve as the basis for determining whether to perform a constraint update operation on the prediction inference information.

[0074] Predictive prior information can be used to guide subsequent action prediction tasks. When encountering scenarios that are highly similar to historical experience in the future, with the guidance of predictive prior information, the prediction model no longer needs to perform lengthy and time-consuming low-level feature extraction and basic logic derivation for the scenario to be predicted. Instead, it can directly call upon historical experience, thereby facilitating efficient action prediction in the scenario to be predicted.

[0075] In one optional embodiment, prior information is extracted based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element of each sample subsequence, and the prediction inference information corresponding to each sample subsequence, so as to obtain at least one piece of prior information corresponding to each sample subsequence; then, information fusion is performed based on the at least one piece of prior information corresponding to each of the multiple sample subsequences to obtain the prediction prior information.

[0076] This disclosure samples subsequences from historical action sequences and predicts the action of the last element in the corresponding historical scene based on the historical scene and the corresponding historical action of the preceding element in each subsequence. This yields a first predicted action and prediction inference information. Furthermore, it can obtain prediction prior information based on the subsequences, the comparison information between the historical action of the last element and the first predicted action, and the prediction inference information. Since each subsequence can be a fine-grained representation of the historical action sequence, the fine-grained features corresponding to each subsequence can be obtained during the processing of multiple subsequences. This allows the extracted prediction prior information to include fine-grained features scattered throughout the historical action sequence, improving the accuracy of prediction prior information determination and thus improving the accuracy of action prediction. Unlike related technologies that directly process historical action sequences, making it difficult to capture the fine-grained features scattered throughout the historical action sequence, this disclosure solves the technical problem of low accuracy in action prediction due to biased prediction prior information caused by the lack of fine-grained features. Furthermore, predictive inference information refers to the complete logical deduction chain or intermediate state trajectory generated during the action prediction process, which can represent the mapping from historical scenes and historical actions to the first predicted action. Its inference process can serve as relevant experience for action prediction. Since predictive inference information is generated by processing multiple sample sub-sequences one by one, each sample sub-sequence can be a fine-grained representation of the historical action sequence. The corresponding predictive inference information is fine-grained inference information. By summarizing and generalizing the predictive inference information, fine-grained predictive prior information can be obtained, which can be used to directly guide action prediction in similar future scenarios. Correspondingly, by constraining the predictive inference information with sample sub-sequences and action comparison information, predictive prior information that matches the historical action sequence can be obtained. There is no need to build predictive prior information from scratch, which reduces the difficulty of building predictive prior information and improves the convenience of building predictive prior information.

[0077] In an optional embodiment, during the processing of multiple sample subsequences one by one, fine-grained features corresponding to each sample subsequence can be obtained. The fine-grained features corresponding to each sample subsequence may include fine-grained action features, which may be the action features of the target object implied in the corresponding sample subsequence. Accordingly, the prediction prior information includes the action prior information of the target object. The action prior information represents the action preference of the target object in the historical time period. The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes first inference information, the first inference information is processed based on each sample subsequence and the action comparison information to obtain the action prior information; the first inference information is inference information associated with the action preferences of the target object.

[0078] Optionally, if there is a discrepancy between the actual action in the historical scene represented by the action comparison information and the predicted action in the historical scene represented by the last element, a constraint update operation can be performed on the first inference information based on the sample subsequence, and then the action prior information can be obtained based on the first inference information after the constraint update operation. If there is no discrepancy between the actual action and the predicted action, there is no need to perform a constraint update operation on the first inference information; the action prior information can be directly determined based on the first inference information, or it can be obtained by summarizing and generalizing the first inference information. That is, the action comparison information can serve as the basis for determining whether to perform a constraint update operation on the first inference information.

[0079] The first inference information is inference information related to the action preferences of the target object. The corresponding first inference information may include inference steps such as action preference mining and action preference extraction. Action preference mining may capture the scattered and concrete action preferences of the target object from the first element of the sample subsequence. Action preference extraction may summarize and classify the scattered and concrete action preferences mined by the action preference mining step into action preference rules or preference labels.

[0080] In one example, taking the scenario of a product and actions such as purchasing, adding to favorites, and skipping as examples, the corresponding sample subsequence is as follows: (Buy headphones from brand A) → (Add to favorites for brand A laptop) → (Skip laptop from brand B). The first element includes: (Headphones of Brand A, purchased) and (Laptop of Brand A, collected). Based on (Headphones of Brand A, purchased) and (Laptop of Brand A, collected), it is predicted that the target user's first predicted action in the scenario of using a laptop of Brand B is to purchase. The first inference information includes: "The sample subsequence shows that the target object has purchased headphones of Brand A and collected laptops of Brand A, thus the target object likes electronic products, therefore the predicted action in the scenario of using a laptop of Brand B is to purchase."

[0081] The statement "The sample subsequence shows that the target object has purchased headphones of brand A and collected laptops of brand A" in the first inference information corresponds to the action preference mining step, while "The target object likes electronic products" corresponds to the action preference extraction step. However, the target object's actual action in the brand B laptop scenario is skipping, while the predicted action is purchasing. This discrepancy between the actual and predicted actions necessitates a constraint update operation on the first inference information. Based on the sequence (Headphones of brand A, purchase) → (Laptops of brand A, collect) → (Laptops of brand B, skip), it can be deduced that the target object's actual action in the brand B laptop scenario is skipping. This means the target object does not like all brands of electronic products. Therefore, the first inference information after the constraint update operation includes "The target object's liking of electronic products is too vague and needs to be modified to 'The target object likes electronic products of brand A'." Furthermore, action prior information can be generated based on "The target object likes electronic products of brand A."

[0082] Action prediction in related technologies often relies on lengthy real-time logical deduction of the current context. In this embodiment, since the first inference information is generated during the processing of multiple sample subsequences one by one, each sample subsequence can be a fine-grained representation of a historical action sequence. Accordingly, the first inference information is fine-grained action inference information, which may include fine-grained action features of the target object. Thus, the fine-grained action prior information obtained based on the first inference information can provide prediction guidance during the action prediction process. On the one hand, it can improve the accuracy of action prediction, and on the other hand, it can avoid the problem of needing to perform real-time logical deduction, thereby reducing inference latency and computational resource consumption.

[0083] In another optional embodiment, the fine-grained features corresponding to each sample subsequence further include fine-grained bias features. The fine-grained bias features can be the prediction bias present in the prediction model during the prediction of the action of the last element in the historical scene of the corresponding sample subsequence. Correspondingly, the prediction prior information includes the bias prior information of the target object. The bias prior information is constraint information that instructs the prediction model to avoid preset reasoning tendencies. The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes second inference information, the second inference information is processed based on each sample subsequence and the action comparison information to obtain the bias prior information; the second inference information is inference information associated with the inference tendency of the prediction model.

[0084] Optionally, if there is a discrepancy between the actual action in the historical scene represented by the action comparison information and the predicted action in the historical scene represented by the last element, a constraint update operation can be performed on the second inference information based on the sample subsequence, and then biased prior information can be obtained based on the second inference information after the constraint update operation. If there is no discrepancy between the actual action and the predicted action, there is no need to perform a constraint update operation on the second inference information; the action prior information can be directly determined based on the second inference information, or it can be obtained by summarizing and generalizing the second inference information. That is, the action comparison information can serve as the basis for determining whether to perform a constraint update operation on the second inference information.

[0085] The second inference information is inference information associated with the inference tendency of the prediction model, which can reflect the prediction preference or prediction habit of the prediction model in the process of action prediction.

[0086] In one example, taking the scenario of products and actions such as purchasing, adding to favorites, adding to cart, and skipping as examples, the corresponding sample subsequence is as follows: (Add to favorites for laptop brand A) → (Skip laptop brand B) → (Purchase laptop brand A). The first element includes: (A brand laptop, favorite) and (B brand laptop, skip). Based on (A brand laptop, favorite) and (B brand laptop, skip), it is predicted that the target user is on the A brand laptop, and the first predicted action is to skip. The second inference information includes "The target user skipped the B brand laptop in the previous step, so the same action will be taken in the future, so the prediction is to skip".

[0087] The target's actual action in the scenario of a laptop of brand A is to purchase, while the predicted action is to skip. This discrepancy between the actual and predicted actions necessitates a constraint update operation on the second inference information. Based on the sequence (laptop of brand A, add to favorites) → (laptop of brand B, skip) → (laptop of brand A, purchase), we know that the target's actual action in the scenario of a laptop of brand A is to purchase. The prediction model overemphasizes the previous step and needs to add measures to avoid recency bias. Therefore, the first inference information after the constraint update operation includes "overemphasis on the previous step, need to add measures to avoid recency bias," and biased prior information can then be generated based on this "overemphasis on the previous step, need to add measures to avoid recency bias."

[0088] In this embodiment, since the second inference information is generated during the processing of multiple sample subsequences one by one, each sample subsequence can be a fine-grained representation of a historical action sequence. During the action prediction process of the sample subsequence, the prediction model may expose the fine-grained prediction bias of the prediction model. Accordingly, the second inference information can be fine-grained bias inference information. The bias prior information obtained based on the fine-grained bias inference information can provide prediction guidance during the action prediction process, avoid the prediction bias of the prediction model during the prediction process, and thus improve the accuracy of action prediction.

[0089] In an optional embodiment, the step of extracting prior information based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information includes: Prior information is extracted based on each sample subsequence, the action comparison information, and the prediction inference information to obtain at least one candidate prior information corresponding to each sample subsequence. The reliability of at least one of the candidate prior information is verified, and the predicted prior information is determined from the at least one of the candidate prior information based on the reliability verification result.

[0090] Optionally, the processing results obtained directly from information processing based on each sample subsequence, action comparison information, and prediction inference information may not be high-quality prior information. Therefore, it is necessary to verify the reliability of the processing results and determine the prior information that passes the reliability verification as the prediction prior information. The reliability verification of candidate prior information can be achieved through a large language model.

[0091] The reliability verification in this embodiment may include support verification and generalization verification of the candidate prior information. Support verification verifies whether the candidate prior information only supports the corresponding candidate verification information. If it does, the candidate prior information passes the support verification; otherwise, it fails. Generalization verification verifies whether the candidate prior information is over-specialized to the corresponding sample subsequence. If it is over-specialized, the candidate prior information fails the generalization verification; otherwise, it passes.

[0092] It should be noted that there is no restriction on the execution order of the supporting verification and generalization verification of the candidate prior information. It is possible to perform supporting verification on the candidate prior information first, and then perform generalization verification on the candidate prior information that has passed the supporting verification; or it is possible to perform generalization verification on the candidate prior information first, and then perform supporting verification on the candidate prior information that has passed the generalization verification.

[0093] In this embodiment, a self-censorship mechanism can be used to verify the reliability of candidate prior information and determine the prediction prior information from the candidate prior information based on the reliability verification results. As a result, the reliability of the prediction prior information is high, and action prediction can be performed under the guidance of reliable prediction prior information, thereby improving the accuracy of action prediction.

[0094] In an optional embodiment, action rewriting of historical actions in a sample subsequence can be used to achieve supporting verification of candidate prior information; correspondingly, the step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from at least one of the candidate prior information based on the reliability verification result, includes: The historical actions in the first element of each sample subsequence are rewritten to obtain the rewritten subsequence; Match at least one of the candidate prior information pieces with the rewritten subsequence to obtain a matching result; Based on the matching result, verified prior information is determined from at least one of the candidate prior information; the verified prior information does not match the rewritten subsequence. The predicted prior information is determined based on the verified prior information.

[0095] In this embodiment, candidate actions in different scenarios may include purchasing, adding to favorites, adding to cart, skipping, etc. Correspondingly, rewriting historical actions can involve rewriting the current historical action in the first element into other actions among the candidate actions. Accordingly, a rewritten sub-sequence can be obtained based on the historical scenario in the first element and the rewritten actions. When there are multiple first elements, rewriting historical actions in the first elements can involve rewriting historical actions in at least one element within the first element; that is, it can involve rewriting the historical actions of one element or multiple elements.

[0096] For each sample subsequence, since actions can be rewritten for different elements of the first element, or actions for the same element can be rewritten into different actions, each sample subsequence can correspond to one or more rewritten subsequences.

[0097] Optionally, during the matching process between candidate prior information and the rewritten subsequence, it can be determined whether the candidate prior information can support the rewritten subsequence. If it can, it means that the candidate prior information matches both the sample subsequence and the rewritten subsequence, thus the candidate prior information is not truly based on the sample subsequence. If it cannot, it means that the candidate prior information matches the sample subsequence but not the rewritten subsequence, thus the candidate prior information is based on the sample subsequence, and the candidate prior information is determined to have passed the support verification. Furthermore, by performing support verification on the candidate prior information, the candidate prior information that passes the support verification is determined as verified prior information. Verified prior information matches the sample subsequence but does not match the rewritten subsequence.

[0098] In one example, the sample subsequence is: (Buy headphones from brand A) → (Add to favorites for brand A laptop) → (Skip laptop from brand B). By rewriting the first elements: (Headphones of Brand A, Purchase) and (Laptop of Brand A, Collection), the resulting rewritten subsequence is: (Headphones of Brand A, add to favorites) → (Laptop of Brand A, skip) → (Laptop of Brand B, ?). Candidate prior information may include: 1. Decrease the prior probability of brand B laptops and increase the prior probability of brand A laptops; 2. The target audience may already own a personal computer and therefore will not purchase it; 3. The target audience prefers brand A's electronic products, but not all electronic products; For candidate prior information 1, it can support the sample subsequence, but it cannot support the rewritten subsequence, so candidate prior information 1 passes the verification. Candidate prior information 2 can support both the sample subsequence and the rewritten subsequence, so candidate prior information 2 failed the verification. For candidate prior information 3, it can support the sample subsequence, but it cannot support the rewritten subsequence. All candidate prior information 1 passes the verification.

[0099] In this embodiment, in order to identify candidate prior information that lacks support, the sample subsequence can be rewritten based on a large language model to significantly change the potential action pattern of the sample subsequence. Then, the rewritten subsequence with the changed potential action pattern is matched with the candidate prior information obtained based on the sample subsequence to determine the verification result of the candidate prior. The verified candidate prior information should be able to support the sample subsequence but not the prior information of the rewritten subsequence. Thus, the verified prior information has the support for the action pattern of the target object. Therefore, action prediction can be performed under the guidance of the supporting prior information, which can improve the accuracy of action prediction for the target object.

[0100] In another optional embodiment, the generalization verification of candidate prior information can be achieved by rewriting historical scenes in the sample subsequence; correspondingly, the reliability verification of at least one of the candidate prior information, and the determination of the predicted prior information from at least one of the candidate prior information based on the reliability verification result, includes: The historical scene in the last element of each sample subsequence is rewritten to obtain multiple rewritten scenes; Multiple candidate scenarios are generated based on the historical scenarios in the last element and the multiple rewritten scenarios; Under the guidance of at least one of the candidate prior information, a scenario selection is performed on multiple candidate scenarios to obtain a scenario selection result corresponding to at least one of the candidate prior information; Based on the scene selection result, verified prior information is determined from at least one of the candidate prior information; the scene selection result corresponding to the verified prior information indicates that the historical scene was not selected. The predicted prior information is determined based on the verified prior information.

[0101] In this embodiment, to identify candidate prior information with insufficient generalization, the historical scene of the last element in the sample subsequence, i.e., the scene to be predicted, can be rewritten based on a large language model to obtain multiple rewritten scenes. The rewritten scene can be a scene of the same category as the scene to be predicted but with different fine-grained attributes, thus forming multiple candidate scenes based on the scene to be predicted and the rewritten scenes. The number of rewritten scenes can be determined based on the actual implementation.

[0102] For each candidate prior information, multiple candidate scenarios can be selected under the guidance of the candidate prior information to obtain the scenario selection result; when selecting a scenario, one scenario can be selected from multiple candidate scenarios.

[0103] For each scenario selection result corresponding to a candidate prior information, if the scenario selection result indicates that no historical scenario was selected, it means that the candidate prior information cannot unambiguously guide the selection of a historical scenario, that is, the candidate prior information has high generalization, and it can be determined that the candidate prior information has passed the verification and is identified as verified prior information; if the scenario selection result indicates that a historical scenario was selected, it means that the candidate prior information can unambiguously guide the selection of a historical scenario, the candidate prior information is over-specialized to the sample subsequence, and thus the candidate prior information has low generalization, and it can be determined that the candidate prior information has not passed the verification.

[0104] In one example, generalization validation is performed based on the supporting validation results, and the sample subsequence is as follows: (Buy headphones from brand A) → (Add to favorites for brand A laptop) → (Skip laptop from brand B). Rewriting the historical context of the last element yields the following rewritten contexts: Laptops from brand C, laptops from brand D, tablets from brand B, and mobile phones from brand B; The corresponding candidate scenarios include: Laptops from brand B, laptops from brand C, laptops from brand D, tablets from brand B, and mobile phones from brand B. Supported and validated candidate prior information includes: 1. Decrease the prior probability of brand B laptops and increase the prior probability of brand A laptops; 3. The target audience prefers brand A's electronic products, but not all electronic products; For candidate prior information 1, it can directly guide the selection of historical scenario: B brand laptops, thus the generalization is low and it fails the generalization verification. For candidate prior information 3, it cannot directly guide the selection of the historical scenario: B brand laptops, thus the generalization is high and passes the generalization verification.

[0105] In this embodiment, in order to identify candidate prior information that lacks generalization, the historical scene of the last element in the sample subsequence can be rewritten based on the large language model. By verifying whether the candidate prior information can guide the selection of the historical scene without any doubt, the verified candidate prior information should not be able to directly guide the selection of the historical scene. Thus, it has been verified that the prior information is not a specialization of the historical scene and has generalization. Therefore, under the guidance of the generalized prior information, action prediction can be performed, which can improve the accuracy and stability of action prediction of the target object in the scene that has never been encountered before.

[0106] In another optional embodiment, the reliability verification of candidate prior information can also be achieved through a contrastive learning method; correspondingly, the step of verifying the reliability of at least one of the candidate prior information and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result includes: Obtain a set of positive sample sequences that match each candidate prior information from the historical action sequence, and a set of negative sample sequences that do not match each candidate prior information; Based on each of the candidate prior information, multiple positive sample sequences in the positive sample sequence set are constrained and encoded to obtain the first sequence features corresponding to each of the multiple positive sample sequences; Based on each of the candidate prior information, multiple negative sample sequences in the negative sample sequence set are constrained and encoded to obtain the second sequence features corresponding to each of the multiple negative sample sequences; If the first distance between the first sequence features corresponding to any two positive sample sequences is less than the first preset distance, and the second distance between the first sequence feature corresponding to any positive sample sequence and the second sequence feature corresponding to any negative sample sequence is greater than or equal to the second preset distance, each candidate prior information is determined as verified information. The predicted prior information is determined based on the verified prior information.

[0107] Optionally, the reliability of candidate prior information can be verified by constructing a set of positive sample sequences and a set of negative sample sequences. The candidate prior information is used to characterize the positive and negative samples respectively. The candidate prior information with high reliability can reduce the feature distance between positive samples and increase the feature distance between positive and negative samples. The reliability of the candidate prior information is determined by the strength of the sample discrimination ability.

[0108] The positive sample sequence set may include multiple positive sample sub-sequences obtained from historical action sequences, each positive sample sub-sequence matching the candidate prior information; the negative sample sequence set may include multiple negative sample sub-sequences obtained from historical action sequences, each negative sample sub-sequence not matching the candidate prior information; furthermore, the negative sample sequence set may also include multiple constructed negative sample sequences, each constructed negative sample sequence not matching the candidate prior information.

[0109] Furthermore, under the constraints of candidate prior information, features can be extracted from multiple positive sample sequences and constrained encoding can be performed on multiple negative sample sequences to generate corresponding sequence features. Constrained encoding can amplify the weights of key features corresponding to candidate prior information and weaken the weights of irrelevant and interfering features.

[0110] When constraining positive and negative samples based on candidate prior information, if the feature distance within positive samples is generally small, the clustering effect of samples of the same type is outstanding; and the feature distance between positive and negative sample groups is significantly large, the two types of samples form a clear separation in the feature space, meaning the candidate prior information can efficiently distinguish between positive and negative samples. This indicates that the candidate prior information has reliable data support and excellent discriminative performance, and passes the reliability verification. If the constrained encoding fails to achieve effective clustering, and the samples are randomly distributed, then the candidate prior information fails the reliability verification.

[0111] In one example, the candidate prior information is "the target object has a long-term preference for electronic products of brand A", and the corresponding construction of the positive sample sequence set is as follows: Data matching electronic products of brand A can be selected from the target object's historical action sequence. This includes sequences such as collection, adding to cart, and purchasing of electronic products of brand A as a positive sample sequence set. The positive sample sequences are combined with the candidate prior information semantically and conform to the target object's real action pattern. That is, the positive sample sequence set supports the pattern that "the target object has a long-term preference for electronic products of brand A". For the construction of the set of negative sample sequences: The negative sample sequence sets selected from the target object's historical action sequences include actions such as adding to favorites, shopping cart, and purchasing other brands of electronic products, clothing, and kitchen and bathroom products. These negative sample sequences violate the preference patterns of the target object described by the candidate prior information.

[0112] Under the constraints of candidate prior information, during the constraint encoding of positive and negative samples, the feature weights of the A brand dimension and the electronic product dimension are increased, while the weights of irrelevant categories are compressed. If the first distance between the sequence features of any two positive sample sequences related to all A brands is less than the first preset distance, and the distance between the sequence features of any positive sample sequence and the sequence features of any negative sample sequence is greater than the second preset distance, it indicates that the sequence features of the positive sample sequences are clustered together, and the sequence features of the negative sample sequences are far away from the sequence features of the positive sample sequences, that is, the sequence features of the negative sample sequences are far away from the cluster center. This indicates that the candidate prior information has passed the reliability verification. Otherwise, it is determined that the candidate prior information has not passed the reliability verification.

[0113] By using a contrastive learning method to verify the reliability of candidate prior information, the reliability verification is completed based on the quantitative index of sample feature distance. The data feature distribution is used as the evaluation criterion to eliminate the judgment error caused by human experience and subjective judgment, and to objectively evaluate the candidate prior information, thereby improving the reliability of the screened prior information.

[0114] In one optional embodiment, the reliability of candidate prior information can be verified based on prediction accuracy. Specifically, the candidate prior information is converted into prior auxiliary information and integrated into the online prediction process; the historical prediction accuracy with and without the participation of the candidate prior information is statistically analyzed in segments, and the difference in accuracy before and after integration is calculated; if the accuracy improves, the candidate prior information is determined to have passed the reliability verification; if the accuracy remains the same or decreases, the candidate prior information is determined to have failed the reliability verification.

[0115] In another optional embodiment, the reliability verification of candidate prior information can be achieved through voting by multiple large language models. Specifically, the multiple large language models can be models with different parameter architectures. Each model independently and completely evaluates the rationality of the candidate prior information based on the historical action sequence of the target object, and outputs supporting or rejecting opinions respectively. The voting results of each model are summarized. If the number of supporting votes is greater than or equal to the preset number of votes, the candidate prior information is determined to have passed the reliability verification. If the number of supporting votes is less than the preset number of votes, the candidate prior information is determined to have failed the reliability verification.

[0116] In an optional embodiment, determining the predictive prior information based on the verified prior information includes: Add the verified prior information to the prior information set; If the prior information set includes a target prior information group, the predicted prior information is generated based on the target prior information group; the target prior information group is determined based on multiple semantically similar or semantically identical verified prior information in the prior information set. The method further includes: When generating the predicted prior information based on the target prior information, the target prior information group is deleted from the prior information set.

[0117] Optionally, verified candidate information that has passed reliability verification can be added to the prior information set to facilitate subsequent consensus judgment. Consensus judgment is used to determine whether the prior information set contains multiple prior information that are semantically similar or identical. If they exist, it means that these multiple prior information have reached a consensus, indicating that the corresponding prior information has objectivity and universality.

[0118] Therefore, target prior information groups can be detected based on preset update conditions. Specifically, semantic similarity can be calculated for each prior information in the prior information set, and the target prior information group can be determined based on the semantic similarity calculation results. The preset update conditions can be: predicting the action of the last element in a preset number of sample subsequences; the number of prior information items in the prior information combination reaches a preset number; the recent actual prediction accuracy of the target object decreases; or each verified prior information item is added to the prior information set.

[0119] When the prior information set includes a target prior information group, the prediction prior information can be determined directly based on multiple prior information items in the target prior information group; alternatively, multiple prior information items in the target prior information group can be fused to obtain fused prior information, and then the prediction prior information can be determined based on the fused prior information.

[0120] Furthermore, prior information can be deduplicated based on multiple prior information items in the target prior information group and historical prior information. If there is prior information in the historical prior information that is identical to prior information in the target prior information group, the identical prior information can be deduplicated, and the predicted prior information can be determined based on the deduplicated prior information. Historical prior information is information used to guide the prediction of the target object's actions in a given scenario before the predicted prior information is generated.

[0121] For each piece of prior information in the target prior information group that has been adopted, it can be deleted from the prior information set, while the prior information that has not been adopted can continue to be retained in the prior information set.

[0122] In this embodiment, when multiple candidate prior information pieces with similar or identical semantics exist in the prior information set, it indicates that these multiple prior information pieces have reached a consensus. The corresponding prior information possesses objectivity and universality, aligning with the target object's long-term stable real action preferences. Therefore, action prediction based on the generated predictive prior information can improve the accuracy of action prediction. Furthermore, when generating predictive prior information based on each verified prior information piece in the target prior information group, the corresponding prior information can be deleted from the prior information set. This avoids redundant calculations during subsequent prior information semantic similarity calculations, reducing computational resource consumption, and also reduces the number of prior information pieces in the prior information set, alleviating storage pressure.

[0123] In an optional embodiment, sample subsequences can be filtered based on the prediction confidence corresponding to the subsequences; correspondingly, the sampling of the historical action sequence of the target object yields multiple sample subsequences, including: The historical action sequence is sampled to obtain multiple sampled subsequences; each sampled subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. Action prediction is performed based on the second element in each of the sampled sub-sequences and the historical scene in the last element of each of the sampled sub-sequences to obtain the second predicted action of the target object in the historical scene in the last element and the prediction confidence of the second predicted action; the second element is each of the other elements in each of the sampled sub-sequences except the last element; The multiple sample subsequences are determined based on the prediction confidence of the multiple sample subsequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences.

[0124] In an optional embodiment, the sampled subsequence can be a subsequence directly extracted from the historical action sequence, where each element in the corresponding sampled subsequence is in a continuous position in the historical action sequence; for example, if the historical action sequence is Ht: (s0,a0)→(s1,a1)→(s2,a2)→(s3,a3)……, the corresponding sampled subsequence can include: (s0,a0)→(s1,a1)→(s2,a2), (s1,a1)→(s2,a2)→(s3,a3), etc.

[0125] Optionally, action prediction is performed based on the second element in each sampled subsequence and the historical scene in the last element of each sampled subsequence. That is, the first element in each sampled subsequence is used as the prediction basis, which can represent the historical action features of the target object. The historical scene in the last element of each sampled subsequence is used as the scene to be predicted. The action of the target object in the scene to be predicted is predicted to obtain the second predicted action and the prediction confidence of the second predicted action. The prediction confidence of the second predicted action can be used to characterize the difficulty of predicting the action in the historical scene in the last element. The lower the prediction confidence, the higher the prediction difficulty; conversely, the higher the prediction confidence, the lower the prediction difficulty.

[0126] The second prediction confidence level corresponding to the last element in each sampled subsequence can be used as the second prediction confidence level for each sampled subsequence; thus, sample subsequences can be selected from multiple sampled subsequences based on the second prediction actions corresponding to each of the multiple sampled subsequences.

[0127] In this embodiment, by determining the prediction confidence level corresponding to each sampled subsequence, the prediction difficulty of each sampled subsequence can be characterized. Then, based on the prediction confidence level, sample subsequences are selected from the sampled subsequences. This enables flexible selection of sample subsequences based on the prediction difficulty of the sampled subsequences. Using the prediction confidence level as the basis for sample selection ensures that the selected sample subsequences are all within the same prediction difficulty range, which facilitates the standardization of sample difficulty.

[0128] In an optional embodiment, determining the plurality of sample subsequences based on the prediction confidence of the plurality of sample subsequences and the prediction confidence of the second prediction action corresponding to each of the plurality of sample subsequences includes: Multiple sample subsequences are determined from the multiple sampled subsequences; the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences is less than or equal to a preset confidence level.

[0129] Optionally, the preset confidence level can be determined based on the actual implementation situation; sample subsequences with a prediction confidence level less than or equal to the preset confidence level are sample subsequences with relatively high prediction difficulty.

[0130] Sample subsequences with lower prediction confidence, i.e. more difficult to predict, usually incorporate more complex action patterns of the target object and / or are prone to causing prediction bias in the prediction model. Accordingly, processing based on sample subsequences with higher prediction difficulty can obtain prediction prior information, which can improve the anti-interference performance of prediction prior information and its adaptability to complex scenarios, thereby improving the accuracy of action prediction.

[0131] In another optional embodiment, determining the plurality of sample subsequences based on the prediction confidence of the plurality of sample subsequences and the prediction confidence of the second prediction action corresponding to each of the plurality of sample subsequences includes: The sampled subsequences are sorted in ascending order of prediction confidence of the second prediction action corresponding to each of the sampled subsequences to obtain the sampled subsequences. The action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information during the action prediction process, includes: The sample subsequences are traversed in order of prediction confidence from low to high. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information.

[0132] Optionally, multiple sample subsequences are obtained by sorting multiple sample subsequences in descending order of confidence. Accordingly, when processing multiple sample subsequences, multiple sample subsequences can be traversed in ascending order of confidence, that is, traversing directly from the first sample subsequence of multiple sample subsequences until the last sample subsequence of multiple sample subsequences.

[0133] In this embodiment, the sample subsequences with lower prediction difficulty are processed first, which can quickly form basic and stable prior information. On this basis, sample subsequences with higher prediction difficulty are gradually introduced. The progressive learning strategy encourages focusing on simple samples with high confidence in the early stage, which is equivalent to automatically filtering out low-confidence noise interference in the early stage, effectively improving the stability of prior information extraction. On the basis of existing prior information, deep prior information is continuously built and consolidated, so as to more effectively deal with difficult prediction scenarios.

[0134] This embodiment also provides an action prediction method, which can be executed by a server. Please refer to [link to relevant documentation]. Figure 3 The method may include: S310. Obtain the prediction prior information corresponding to the target object and the action sub-sequence of the target object; the action sub-sequence is a sub-sequence of the historical action sequence of the target object, and the last element of the action sub-sequence is consistent with the last element of the historical action sequence; the prediction prior information is determined based on the above sequence processing method. S320. Based on the prediction prior information, the action subsequence and the scene to be predicted, perform action prediction to obtain the third predicted action of the target object in the scene to be predicted.

[0135] Optionally, the action subsequence may include multiple elements, each corresponding to the most recent historical action records closest to the current prediction time. This allows for prediction of the target object's actions in the scene to be predicted, guided by prior prediction information and based on the known most recent historical action records. In other words, the target object's third predicted action in the scene to be predicted can be predicted based on the prior prediction information and the most recent historical action records. This differs from related technologies that directly use the entire historical action sequence of the target object as prediction input, leading to inaccurate action prediction results. In this embodiment, sample subsequences are sampled from the historical action sequence, and based on the historical scene of the preceding element in each sample subsequence and the corresponding historical scene... Historical actions are used to predict the actions of the last element in the corresponding historical scenario, resulting in a first predicted action and prediction inference information. This allows for the generation of prediction prior information based on sample subsequences, comparisons between the historical actions of the last element and the first predicted action, and prediction inference information. Since each sample subsequence can be a fine-grained representation of the historical action sequence, processing multiple sample subsequences individually yields their respective fine-grained features. This ensures that the extracted prediction prior information includes fine-grained features scattered throughout the historical action sequence, improving the accuracy of prediction prior information determination. Guided by accurate prediction prior information, action prediction accuracy is further enhanced.

[0136] In one alternative embodiment, the prediction prior information can be represented in natural language; it can also be organized into structured key-value pairs for easy retrieval and updating; the prediction prior information can also be vectorized and stored as an embedded vector for retrieval via similarity; and "counterexample experience" can be added to the prediction prior information to specifically record typical scenarios of prediction failure in history.

[0137] The following is a specific example illustrating the implementation process of this disclosure. Please refer to [link / reference]. Figure 4 It may include: 1. Process the sample subsequences to obtain the predicted actions and predictive inference information. Taking a single sample subsequence as an example: (1) in, The historical scene and historical action (real action label) of the last element in the sample subsequence. Given the historical action sequence up to step t, For sample subsequences, It is the first element in the sample subsequence, and This ensures that the evolution of prior information remains consistent with the temporal order of the target object's historical action sequence; For the historical prior information of the target object, This is the first prediction action generated by the large language model under the guidance of historical prior information. This refers to the predictive inference information of the large language model during the prediction of the first predicted action.

[0138] 2. Constrain the predictive inference information to obtain candidate prior information. Once the sample subsequence has been processed, candidate prior information can be obtained based on the sample subsequence, the action comparison information between historical actions and the first predicted action, and the prediction inference information.

[0139] 3. Verify the reliability of the candidate prior information to obtain the verified prior information. Supporting verification of candidate prior information: (2) in To rewrite the subsequence, For candidate prior information, The historical scene and historical action (real action label) of the last element in the sample subsequence. Indicating in candidate prior information This still holds true for rewriting subsequences.

[0140] LLM is used to rewrite the action patterns of sample subsequences, significantly altering their underlying action patterns. Then, it is determined whether the candidate prior information still holds true for the rewritten subsequence. If it still holds true, the candidate prior information is not truly based on the sample subsequence and needs to be deleted; if it does not hold true, the candidate prior information is based on the sample subsequence and passes the support verification.

[0141] Perform generalization verification on candidate prior information: (3) in For m rewritten scenarios, This indicates that if based on candidate prior information It can unambiguously guide the selection of the authentic historical scene from the rewritten scene and the authentic historical scene. .

[0142] LLM is used to rewrite the predicted scenarios of sample subsequences, generating rewritten scenarios that are of the same category as the real historical scenarios but have different fine-grained attributes, forming a single-choice task. Then, it is determined whether the candidate prior information can unambiguously guide the selection of the real historical scenario. If it can, it means that the candidate prior information is over-specialized to the current sample subsequence and fails the generalization test; if not, it passes the generalization test.

[0143] 4. Add the verified candidate information to the prior information set. (4) in, The i-th candidate prior information generated for LLM reflection, where n is the number of candidate prior information items generated in a single iteration, and P is the set of prior information items. This involves adding verified prior information that has passed reliability verification to the prior information set.

[0145] 5. Generate predictive prior information based on the verified prior information that forms a consensus from the prior information set.

[0146] LLM is used to perform consensus-driven adjustments on the prior information set, adopting multiple verified prior information pieces with semantic similarity or identity to achieve stable evolution of prediction prior information. After adjustment, multiple verified prior information pieces that have been adopted can be removed from the prior information set, while unadopted verified prior information pieces are retained in the prior information set for continued accumulation in subsequent iterations.

[0147] Let's take the e-commerce scenario as an example: Input: Multiple "Product Scenario - Action" records of the target object within the past M months. The current scenario is a product page of a certain brand of laptops. The user action (purchase / favorite / skip) needs to be predicted.

[0148] Processing flow: 1. Existing experience trial: Sample practice data is collected from historical sequences. For example, sample one's target is "B brand laptop product page - skip", and sample two's target is "A brand headphone product page - purchase". LLM makes predictions based on historical prior information. It incorrectly predicts "add to favorites" for sample one and "skip" for sample two.

[0149] 2. Reflective candidate prior information generation: Through reflection, it was found that "the user likes electronic products" in Sample 1 was too broad and should be revised to "the user prefers Apple electronic products"; in Sample 2, the model focused too much on the previous step behavior and needs to be supplemented with the bias prompt experience of "avoiding recency bias".

[0150] 3. Self-censorship: The candidate prior information generated by reflection is subjected to supporting and generalizing reviews in sequence. Candidate prior information that is over-specialized to the current sample or is not truly based on the sample is filtered out, and the candidate prior information that passes the review is added to the prior information set.

[0151] 4. Consensus-based experience adjustment: Triggered every T rounds, only multiple pieces of prior information that have reached consensus from the set of prior information are adopted. Ultimately, the action prior information is updated to "This user prefers Apple electronic products", and the bias prior information is updated to "Avoid recency bias".

[0152] Formal prediction: When predicting the current action on the laptop product page of brand A, LLM accurately predicts "purchase" based on updated prediction prior information and the last k historical records.

[0153] This disclosure proposes transforming long historical action sequences from a burden requiring compression into a proactively usable practice resource. By inducing behavioral patterns from labeled historical fragments through pre-practice and identifying model biases, it opens a new paradigm in long-range behavior prediction. It proposes a dual-experience memory structure composed of action pattern experience and biased cueing experience, simultaneously addressing the two core challenges of difficulty in inducing potential behavioral patterns and inherent cognitive biases within the model. A three-step iterative framework is designed: existing experience trial, reflective prior information generation, and consensus-based experience adjustment, enabling the stable evolution of experience memory along with user behavior sequences. Supportive review is constructed through historical sequence perturbation, and generalization review is constructed through scenario rewriting, filtering unreliable candidate prior information from two complementary dimensions to ensure the overall quality of experience memory. It can adapt to any large language model without modifying LLM parameters, and each user possesses independent experience memory that evolves with their behavior, exhibiting high personalization and scalability. By decoupling long sequence induction from short context prediction, the prediction stage only requires short suffixes plus experience memory as input, significantly reducing inference costs.

[0154] It should be noted that any of the methods in this embodiment can be combined based on the actual implementation situation and have corresponding beneficial effects, which will not be elaborated here.

[0155] Figure 5 This is a block diagram of a sequence processing apparatus according to an exemplary embodiment. (Refer to...) Figure 5 The device includes: Subsequence sampling unit 510 is configured to perform subsequence sampling on the historical action sequence of the target object to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. The first prediction unit 520 is configured to perform action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information in the action prediction process; the first element is each of the other elements in each sample subsequence besides the last element. The prior information determination unit 530 is configured to perform prior information extraction based on each of the sample subsequences, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

[0156] In an exemplary embodiment, the prediction prior information includes action prior information of the target object; the action prior information characterizes the action preferences of the target object within a historical time period; The prior information determination unit is configured to execute: When the prediction inference information includes first inference information, the first inference information is processed based on each sample subsequence and the action comparison information to obtain the action prior information; the first inference information is inference information associated with the action preferences of the target object.

[0157] In an exemplary embodiment, the prediction prior information includes bias prior information about the target object; the bias prior information is constraint information that instructs the prediction model to avoid a preset reasoning tendency. The prior information determination unit is configured to execute: When the prediction inference information includes second inference information, the second inference information is processed based on each sample subsequence and the action comparison information to obtain the bias prior information; the second inference information is inference information associated with the inference tendency of the prediction model.

[0158] In an exemplary embodiment, the prior information determination unit is configured to perform: Prior information is extracted based on each sample subsequence, the action comparison information, and the prediction inference information to obtain at least one candidate prior information corresponding to each sample subsequence. The reliability of at least one of the candidate prior information is verified, and the predicted prior information is determined from the at least one of the candidate prior information based on the reliability verification result.

[0159] In an exemplary embodiment, the prior information determination unit is configured to perform: The historical actions in the first element of each sample subsequence are rewritten to obtain the rewritten subsequence; Match at least one of the candidate prior information pieces with the rewritten subsequence to obtain a matching result; Based on the matching result, verified prior information is determined from at least one of the candidate prior information; the verified prior information does not match the rewritten subsequence. The predicted prior information is determined based on the verified prior information.

[0160] In an exemplary embodiment, the prior information determination unit is configured to perform: The historical scene in the last element of each sample subsequence is rewritten to obtain multiple rewritten scenes; Multiple candidate scenarios are generated based on the historical scenarios in the last element and the multiple rewritten scenarios; Under the guidance of at least one of the candidate prior information, a scenario selection is performed on multiple candidate scenarios to obtain a scenario selection result corresponding to at least one of the candidate prior information; Based on the scene selection result, verified prior information is determined from at least one of the candidate prior information; the scene selection result corresponding to the verified prior information indicates that the historical scene was not selected. The predicted prior information is determined based on the verified prior information.

[0161] In an exemplary embodiment, the prior information determination unit is configured to perform: Obtain a set of positive sample sequences that match each candidate prior information from the historical action sequence, and a set of negative sample sequences that do not match each candidate prior information; Based on each of the candidate prior information, multiple positive sample sequences in the positive sample sequence set are constrained and encoded to obtain the first sequence features corresponding to each of the multiple positive sample sequences; Based on each of the candidate prior information, multiple negative sample sequences in the negative sample sequence set are constrained and encoded to obtain the second sequence features corresponding to each of the multiple negative sample sequences; If the first distance between the first sequence features corresponding to any two positive sample sequences is less than the first preset distance, and the second distance between the first sequence feature corresponding to any positive sample sequence and the second sequence feature corresponding to any negative sample sequence is greater than or equal to the second preset distance, each candidate prior information is determined as verified information. The predicted prior information is determined based on the verified prior information.

[0162] In an exemplary embodiment, the prior information determination unit is configured to perform: Add the verified prior information to the prior information set; If the prior information set includes a target prior information group, the predicted prior information is generated based on the target prior information group; the target prior information group is determined based on multiple semantically similar or semantically identical verified prior information in the prior information set. The apparatus further includes a set update unit configured to perform: When generating the predicted prior information based on the target prior information, the target prior information group is deleted from the prior information set.

[0163] In an exemplary embodiment, the first prediction unit is configured to perform: Action prediction is performed based on the historical scene and historical prior information in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information; the historical prior information is information used to provide guidance for the prediction of the target object's action in a given scene before the prediction prior information is generated.

[0164] In one exemplary embodiment, the subsequence sampling unit is configured to perform: The historical action sequence is sampled to obtain multiple sampled subsequences; each sampled subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. Action prediction is performed based on the second element in each of the sampled sub-sequences and the historical scene in the last element of each of the sampled sub-sequences to obtain the second predicted action of the target object in the historical scene in the last element and the prediction confidence of the second predicted action; the second element is each of the other elements in each of the sampled sub-sequences except the last element; The multiple sample subsequences are determined based on the prediction confidence of the multiple sample subsequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences.

[0165] In one exemplary embodiment, the subsequence sampling unit is configured to perform: Multiple sample subsequences are determined from the multiple sampled subsequences; the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences is less than or equal to a preset confidence level.

[0166] In one exemplary embodiment, the subsequence sampling unit is configured to perform: The sampled subsequences are sorted in ascending order of prediction confidence of the second prediction action corresponding to each of the sampled subsequences to obtain the sampled subsequences. The first prediction unit is configured to execute: The sample subsequences are traversed in order of prediction confidence from low to high. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information.

[0167] Please see Figure 6 It shows a block diagram of an action prediction device, with reference to Figure 6 The device includes: The information acquisition unit 610 is configured to acquire the predicted prior information corresponding to the target object and the action subsequence of the target object; the action subsequence is a subsequence of the historical action sequence of the target object, and the last element of the action subsequence is consistent with the last element of the historical action sequence; the predicted prior information is determined based on the sequence processing method of the first aspect described above. The second prediction unit 620 is configured to perform action prediction based on the prediction prior information, the action subsequence and the scene to be predicted, to obtain the third predicted action of the target object in the scene to be predicted.

[0168] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0169] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc. When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is able to perform any of the methods described above.

[0170] In an exemplary embodiment, a computer program product is also provided, the computer program product including a computer program stored in a readable storage medium, and at least one processor of a computer device reading from the readable storage medium... Figure 7 This is a block diagram illustrating an electronic device for sequence processing or action prediction according to an exemplary embodiment. The electronic device may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, this electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements a sequence processing method or an action prediction method. Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present disclosure and does not constitute a limitation on the electronic device to which the present disclosure is applied. A specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0171] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0172] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A sequence processing method, characterized in that, The method includes: The historical action sequence of the target object is sampled to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and the historical action corresponding to the historical scene. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action of the target object in the historical scene in the last element and the prediction reasoning information in the action prediction process; the first element is each element in the sample subsequence other than the last element. Prior information is extracted based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

2. The method according to claim 1, characterized in that, The prediction prior information includes the action prior information of the target object; the action prior information represents the action preferences of the target object within a historical time period. The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes first inference information, the first inference information is processed based on each sample subsequence and the action comparison information to obtain the action prior information; the first inference information is inference information associated with the action preferences of the target object.

3. The method according to claim 1 or 2, characterized in that, The prediction prior information includes bias prior information about the target object; the bias prior information is constraint information that instructs the prediction model to avoid preset reasoning tendencies; The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: When the prediction inference information includes second inference information, the second inference information is processed based on each sample subsequence and the action comparison information to obtain the bias prior information; the second inference information is inference information associated with the inference tendency of the prediction model.

4. The method according to claim 1, characterized in that, The prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information yields the prediction prior information, including: Prior information is extracted based on each sample subsequence, the action comparison information, and the prediction inference information to obtain at least one candidate prior information corresponding to each sample subsequence. The reliability of at least one of the candidate prior information is verified, and the predicted prior information is determined from the at least one of the candidate prior information based on the reliability verification result.

5. The method according to claim 4, characterized in that, The step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: The historical actions in the first element of each sample subsequence are rewritten to obtain the rewritten subsequence; Match at least one of the candidate prior information pieces with the rewritten subsequence to obtain a matching result; Based on the matching result, verified prior information is determined from at least one of the candidate prior information; the verified prior information does not match the rewritten subsequence. The predicted prior information is determined based on the verified prior information.

6. The method according to claim 4, characterized in that, The step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: The historical scene in the last element of each sample subsequence is rewritten to obtain multiple rewritten scenes; Multiple candidate scenarios are generated based on the historical scenarios in the last element and the multiple rewritten scenarios; Under the guidance of at least one of the candidate prior information, a scenario selection is performed on multiple candidate scenarios to obtain a scenario selection result corresponding to at least one of the candidate prior information; Based on the scene selection result, verified prior information is determined from at least one of the candidate prior information; the scene selection result corresponding to the verified prior information indicates that the historical scene was not selected. The predicted prior information is determined based on the verified prior information.

7. The method according to claim 4, characterized in that, The step of performing reliability verification on at least one of the candidate prior information, and determining the predicted prior information from the at least one candidate prior information based on the reliability verification result, includes: Obtain a set of positive sample sequences that match each candidate prior information from the historical action sequence, and a set of negative sample sequences that do not match each candidate prior information; Based on each of the candidate prior information, multiple positive sample sequences in the positive sample sequence set are constrained and encoded to obtain the first sequence features corresponding to each of the multiple positive sample sequences; Based on each of the candidate prior information, multiple negative sample sequences in the negative sample sequence set are constrained and encoded to obtain the second sequence features corresponding to each of the multiple negative sample sequences; If the first distance between the first sequence features corresponding to any two positive sample sequences is less than the first preset distance, and the second distance between the first sequence feature corresponding to any positive sample sequence and the second sequence feature corresponding to any negative sample sequence is greater than or equal to the second preset distance, each candidate prior information is determined as verified information. The predicted prior information is determined based on the verified prior information.

8. The method according to any one of claims 5-7, characterized in that, Determining the predictive prior information based on the verified prior information includes: Add the verified prior information to the prior information set; If the prior information set includes a target prior information group, the predicted prior information is generated based on the target prior information group; the target prior information group is determined based on multiple semantically similar or semantically identical verified prior information in the prior information set. The method further includes: When generating the predicted prior information based on the target prior information, the target prior information group is deleted from the prior information set.

9. The method according to claim 1, characterized in that, The action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information during the action prediction process, includes: Action prediction is performed based on the historical scene and historical prior information in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information; the historical prior information is information used to provide guidance for the prediction of the target object's action in a given scene before the prediction prior information is generated.

10. The method according to claim 1, characterized in that, The process of sampling subsequences from the historical action sequence of the target object yields multiple sample subsequences, including: The historical action sequence is sampled to obtain multiple sampled subsequences; each sampled subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. Action prediction is performed based on the second element in each of the sampled sub-sequences and the historical scene in the last element of each of the sampled sub-sequences to obtain the second predicted action of the target object in the historical scene in the last element and the prediction confidence of the second predicted action; the second element is each of the other elements in each of the sampled sub-sequences except the last element; The multiple sample subsequences are determined based on the prediction confidence of the multiple sample subsequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences.

11. The method according to claim 10, characterized in that, The step of determining the multiple sample sub-sequences based on the prediction confidence of the multiple sample sub-sequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample sub-sequences includes: Multiple sample subsequences are determined from the multiple sampled subsequences; the prediction confidence of the second prediction action corresponding to each of the multiple sample subsequences is less than or equal to a preset confidence level.

12. The method according to claim 10, characterized in that, The step of determining the multiple sample sub-sequences based on the prediction confidence of the multiple sample sub-sequences and the prediction confidence of the second prediction action corresponding to each of the multiple sample sub-sequences includes: The sampled subsequences are sorted in ascending order of prediction confidence of the second prediction action corresponding to each of the sampled subsequences to obtain the sampled subsequences. The action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information during the action prediction process, includes: The sample subsequences are traversed in order of prediction confidence from low to high. Action prediction is performed based on the historical scene in the first element and the last element of each sample subsequence to obtain the first predicted action and the prediction inference information.

13. A motion prediction method, characterized in that, The method includes: Obtain the prediction prior information corresponding to the target object and the action subsequence of the target object; the action subsequence is a subsequence of the historical action sequence of the target object, and the last element of the action subsequence is consistent with the last element of the historical action sequence; the prediction prior information is determined based on the sequence processing method according to any one of claims 1-12; Based on the prediction prior information, the action subsequence, and the scene to be predicted, action prediction is performed to obtain the third predicted action of the target object in the scene to be predicted.

14. A sequence processing apparatus, characterized in that, The device includes: The subsequence sampling unit is configured to perform subsequence sampling on the historical action sequence of the target object to obtain multiple sample subsequences; each sample subsequence includes multiple elements, and each element includes a historical scene and a historical action corresponding to the historical scene. The first prediction unit is configured to perform action prediction based on the historical scene in the first element and the last element of each sample subsequence, to obtain the first predicted action of the target object in the historical scene in the last element and the prediction inference information in the action prediction process; the first element is each element in the sample subsequence other than the last element. The prior information determination unit is configured to perform prior information extraction based on each sample subsequence, the action comparison information between the historical action and the first predicted action in the last element, and the prediction inference information to obtain prediction prior information; the prediction prior information is used to provide guidance for predicting the action of the target object in the scene to be predicted.

15. A motion prediction device, characterized in that, The device includes: The information acquisition unit is configured to acquire the predicted prior information corresponding to the target object and the action sub-sequence of the target object; the action sub-sequence is a sub-sequence of the historical action sequence of the target object, and the last element of the action sub-sequence is consistent with the last element of the historical action sequence; the predicted prior information is determined based on the sequence processing method according to any one of claims 1-12. The second prediction unit is configured to perform action prediction based on the prediction prior information, the action subsequence and the scene to be predicted, to obtain the third predicted action of the target object in the scene to be predicted.

16. An electronic device, characterized in that, include: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the sequence processing method as described in any one of claims 1 to 12, or the action prediction method as described in claim 13.

17. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the sequence processing method as described in any one of claims 1 to 12, or the action prediction method as described in claim 13.

18. A computer program product, characterized in that, The computer program product includes a computer program stored in a readable storage medium, wherein at least one processor of a computer device reads from the readable storage medium and executes the computer program, causing the device to perform the sequence processing method as described in any one of claims 1 to 12, or the action prediction method as described in claim 13.