Item sequence recommendation method and device, electronic equipment and storage medium

By generating item sequences and standardizing the profile attributes of different types of items, and using a unified scoring model for scoring, the problems of model complexity and fragmentation in information flow recommendation scenarios are solved, achieving globally optimal item sequence recommendation and improving user experience and recommendation performance.

CN116578785BActive Publication Date: 2026-07-31BEIJING XIHE ELECTRONIC LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING XIHE ELECTRONIC LTD
Filing Date
2023-06-06
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

In information flow recommendation scenarios, the diversification of item types in existing technologies leads to increased model complexity, fragmented recommendation results, and an inability to achieve global optimization, thus affecting user experience and recommendation performance.

Method used

Item sequences are generated, and the profile attributes of different types of items are standardized into the same feature attributes. A unified scoring model is used to score the items, and the item sequence with the highest score is selected as the recommended sequence. Global optimization is achieved by combining sequence generation technology.

Benefits of technology

It improves recommendation efficiency, reduces the number of models, enhances user experience, achieves globally optimal item sequence recommendation, and optimizes the overall recommendation effect by comprehensively considering the characteristics of different types of items.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116578785B_ABST
    Figure CN116578785B_ABST
Patent Text Reader

Abstract

This invention relates to the field of artificial intelligence technology, and provides a method, apparatus, electronic device, and storage medium for recommending item sequences. The method includes: acquiring multiple items of various types, each item having profile attributes characterizing its features, with different types of items including different profile attributes; generating multiple item sequences based on the multiple items, each item sequence including different types of items; unifying the profile attributes of the items included in each item sequence to obtain feature attributes for each item sequence, with different types of items including the same feature attributes; inputting the feature attributes of each item sequence into a pre-trained scoring model to obtain a score for each item sequence; and selecting the item sequence with the highest score as the recommended sequence. This invention can recommend more reasonable item sequences.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and more specifically, to a method, apparatus, electronic device, and storage medium for recommending item sequences. Background Technology

[0002] Currently, most apps operate in a feed-style recommendation environment, where each item displayed on a category page occupies a specific resource slot. Depending on the context, the types of items displayed can vary considerably.

[0003] How to place items in resource slots in a reasonable sequence to achieve better recommendation results is a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide an item sequence recommendation method, apparatus, electronic device, and storage medium, which can obtain a reasonable sequence of items so as to facilitate the placement of items in resource locations according to the reasonable sequence.

[0005] The embodiments of the present invention can be implemented as follows:

[0006] In a first aspect, the present invention provides an item sequence recommendation method, the method comprising:

[0007] Obtain multiple items of various types, each of which has a profile attribute that represents its characteristics. Different types of items include different profile attributes.

[0008] Based on the multiple items, generate multiple item sequences, each item sequence including different types of items;

[0009] The image attributes of the items included in each item sequence are standardized to obtain the feature attributes of each item sequence. Different types of items include the same feature attributes.

[0010] The feature attributes of each item sequence are input into a pre-trained scoring model to obtain a score for each item sequence.

[0011] The sequence of items with the highest ratings is used as the recommended sequence.

[0012] In an optional implementation, the step of generating a sequence of multiple items based on the multiple items includes:

[0013] Select multiple target items from the multiple items, and assign each selected target item as the first item in an item sequence;

[0014] For each target item, select multiple adjacent items from the plurality of items to obtain the adjacent items of all target items;

[0015] Each of the adjacent items is re-designated as the target item, and the process of selecting multiple adjacent items from each of the multiple items to obtain the adjacent items of all target items is repeated until the number of items in each item sequence reaches a preset number.

[0016] In an optional implementation, the step of selecting multiple neighboring items for each target item from the plurality of items to obtain the neighboring items of all target items includes:

[0017] For each of the multiple items, select the candidate items adjacent to the target item to obtain a candidate item set, which includes the candidate items of all target items;

[0018] Items to be deleted are determined from the candidate item set;

[0019] The item to be deleted is removed from the candidate item set, and the remaining items in the candidate item set are considered as adjacent items to all target items.

[0020] In an optional implementation, the step of selecting candidate items adjacent to each target item from the plurality of items to obtain a candidate item set includes:

[0021] Take any one of the target items as the item to be processed, and select a first preset number of initial items from the plurality of items;

[0022] The probability of each of the initial selected items in the sequence of items to be processed to which the items to be processed belong is scored to obtain the sequence score of each of the initial selected items in the sequence of items to be processed.

[0023] According to the sequence score from high to low, a second preset number of preliminary items are selected as candidate items for the items to be processed.

[0024] The set of candidate items comprising all candidate items for the target item is called the candidate item set.

[0025] In an optional implementation, the step of unifying the image attributes of the items included in each item sequence to obtain the feature attributes of each item sequence includes:

[0026] Obtain the pre-established mapping relationship between portrait attributes and feature attributes, wherein the mapping relationship maps portrait attributes representing the same meaning of different types of items to the same feature attribute;

[0027] Based on the mapping relationship, the image attributes of each item in the item sequence are converted into corresponding feature attributes.

[0028] In an optional implementation, the scoring model includes a feature processing layer, a self-attention mechanism layer, and a scoring calculation layer. The step of inputting the feature attributes of each item sequence into the pre-trained scoring model to obtain a score for each item sequence includes:

[0029] For any target item sequence, the target item sequence is input into the feature processing layer to obtain the target sequence feature vector of the target item sequence. The target sequence feature vector includes the feature vector of the feature attribute of each item in the target item sequence.

[0030] The self-attention mechanism layer is used to process the feature vector of the target sequence to obtain the self-attention result;

[0031] The self-attention result and the pre-acquired target-related feature vector are input into the scoring calculation layer to obtain the score of the target item sequence. Finally, the score of each item sequence is obtained. The target-related feature vector is obtained by vectorizing the features that represent the relevance to the target item sequence.

[0032] In an optional implementation, the step of processing the sequence feature vector using the self-attention mechanism layer to obtain the self-attention result includes:

[0033] Determine the target feature vector of the target item from the feature vectors of the feature attributes of the items in the target item sequence;

[0034] The sequence feature vector and the target feature vector are input into the self-attention mechanism layer to obtain the self-attention result.

[0035] Secondly, the present invention provides an item sequence recommendation device, the device comprising:

[0036] The acquisition module is used to acquire multiple items of various types. Each item has a profile attribute that represents its characteristics. Different types of items include different profile attributes.

[0037] The processing module is used to generate multiple item sequences based on the multiple items, each item sequence including different types of items;

[0038] The processing module is also used to unify the image attributes of the items included in each item sequence to obtain the feature attributes of each item sequence, and different types of items include the same feature attributes.

[0039] The recommendation module is used to input the feature attributes of each item sequence into a pre-trained scoring model to obtain a score for each item sequence.

[0040] The recommendation module is also used to select the sequence of items with the highest rating as the recommended sequence.

[0041] Thirdly, the present invention provides an electronic device including a processor and a memory, the memory being used to store a program, and the processor being used to implement the item sequence recommendation method as described in any of the foregoing embodiments when executing the program.

[0042] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the item sequence recommendation method as described in any of the foregoing embodiments.

[0043] Compared with existing technologies, the embodiments of the present invention first acquire multiple items of various types, each item having a profile attribute that characterizes its features. Different types of items include different profile attributes. Then, based on the multiple items, multiple item sequences are generated, each item sequence including different types of items. Next, the profile attributes of the items included in each item sequence are unified to obtain the feature attributes of each item sequence. Different types of items include the same feature attributes. Finally, the feature attributes of each item sequence are input into a pre-trained scoring module to obtain a score for each item sequence. The item sequence with the highest score is used as the recommended sequence. The embodiments of the present invention generate item sequences, unify the profile attributes of different types of items in the item sequence to the same feature attributes, and then use a scoring model to score the item sequences. The item sequence with the highest score is used as the recommended sequence, so that the final recommended sequence is a more reasonable and globally optimal item sequence obtained by comprehensively considering the features of different types of items. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 This is a schematic diagram illustrating an item recommendation method provided in an embodiment of the present invention.

[0046] Figure 2 Provided for embodiments of the present invention Figure 1A schematic diagram illustrating the implementation scheme of the item recommendation method in China.

[0047] Figure 3 This is a schematic diagram illustrating the implementation scheme of the item sequence recommendation method provided in an embodiment of the present invention.

[0048] Figure 4 A flowchart illustrating the item sequence recommendation method provided in this embodiment of the invention.

[0049] Figure 5 An example diagram illustrating the generation of item sequences provided in an embodiment of the present invention.

[0050] Figure 6 This is an example diagram illustrating the mapping relationship between image attributes and feature attributes in an embodiment of the present invention.

[0051] Figure 7 An example diagram of a common scoring model provided in the embodiments of the present invention.

[0052] Figure 8 An example diagram of the improved scoring model provided in an embodiment of the present invention.

[0053] Figure 9 A block diagram illustrating an item sequence recommendation device provided in an embodiment of the present invention.

[0054] Figure 10 A block diagram of an electronic device provided in an embodiment of the present invention.

[0055] Icons: 10-Electronic device; 11-Processor; 12-Memory; 13-Bus; 100-Item sequence recommendation device; 110-Acquisition module; 120-Processing module; 130-Recommendation module. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0057] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0058] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0059] In the description of this invention, it should be noted that if terms such as "upper," "lower," "inner," or "outer" are used to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the product of this invention is usually placed, they are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this invention.

[0060] Furthermore, the terms "first" and "second" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.

[0061] It should be noted that, where there is no conflict, the features in the embodiments of the present invention can be combined with each other.

[0062] In information feed recommendation scenarios, each item displayed in each section occupies a resource slot. For example, various items are displayed in sequence within a preset area of ​​the page. These items can be of various types, such as audiobooks, advertising videos, and open courses. The attribute information of different types of items may vary greatly. Some attributes may be present in one type of item but not in another. For example, advertising items have attributes such as advertiser, bid, and guaranteed volume requirements, which are not present in non-advertising items. Audiobook items have attributes such as novel author, serialization days, and publisher, which are not present in advertising items.

[0063] As the business grows, the types of items become increasingly diverse. When recommending various types of items to users, such as albums, audio recordings, and advertisements, it's necessary to consider factors like guaranteed availability, limited-time offers, and special discounts, as well as the overall page display, such as layout, logo color scheme, and the overall theme of the items (e.g., the overall style of the page, whether it's humorous or suspenseful). How to display items in a logical and orderly manner is a problem that urgently needs to be solved by professionals in this field.

[0064] One solution to this problem is to arrange the resource slots on the page according to a preset method, and process specific resource slots according to fixed tasks, with the tasks being independent of each other. Please refer to... Figure 1 , Figure 1 This is a schematic diagram illustrating an item recommendation method provided in an embodiment of the present invention. Figure 1In the page, resource slots 1, 5, and 6 are fixed for displaying albums; resource slots 2 and 4 are fixed for displaying audio clips; and resource slot 3 is fixed for displaying advertisements. The entire page's recommendation task is broken down into three independent tasks, each training its own model and performing item recommendations. The recommendation results are independent of each other. That is, recommendations are made according to item type; recommendations for items of the same type are then placed in the corresponding resource slots according to a pre-set arrangement of different types of resource slots. Please refer to [reference needed]. Figure 2 , Figure 2 Provided for embodiments of the present invention Figure 1 A schematic diagram illustrating the implementation scheme of the item recommendation method in China. Figure 2 In this approach, items of different types are recalled based on user requests. For each type of recalled item, a profile is created to obtain the features required by the scoring model for that type. These features are then input into their respective scoring models for scoring. Finally, the scores from all models are merged and placed in their corresponding resource slots according to a preset order. This method has the following problems:

[0065] 1. As the number of item types increases, more scoring models need to be activated. This increase in models leads to a longer overall page recommendation time, impacting user experience.

[0066] 2. It is impossible to achieve global optimization. The conversion rate of resources placed at the front will be very high, while limiting the display of positions will cause good materials to not get sufficient exposure.

[0067] 3. Information isolation between models can lead to fragmented overall recommendation results, for example... Figure 1 The album genre leans towards serious themes, while the audio genre leans towards casual themes, impacting the overall user experience. Furthermore, the forced display of content across resource slots, including the insertion of other item types across these slots, disrupts the recommendation results from the same model. For example, in the image above, resource slots 2, 3, and 4, and resource slot 3, have ads inserted, resulting in a poor user experience.

[0068] 4. Model optimization often targets a single item, but the value of the entire sequence is not the sum of the effects of individual items. To maximize the value of the sequence and achieve a win-win situation for both user experience and app recommendation results, it is necessary to reconstruct the model training process.

[0069] To address the aforementioned issues, a common optimization strategy is to employ a fragmentation approach. However, fragmentation is often a mandatory strategy, such as forcing ads to not appear consecutively, prohibiting logo-related ads from appearing consecutively, and ensuring that specific items appear at least once per page. While such strategies may solve some problems, their uncontrollability and mandatory nature, especially since fragmentation often occurs at the end of the overall recommendation process and results that do not meet requirements cannot be regenerated, essentially prevents the achievement of the globally optimal recommendation goal mentioned above.

[0070] In view of this, this embodiment provides an item sequence recommendation method, apparatus, electronic device, and storage medium. It generates item sequences based on different types of items, then uses a unified model for recommendation support, and combines sequence generation technology to change the single-point scoring optimization goal based on items to overall sequence optimization. A detailed description follows.

[0071] To gain a general understanding of the solution provided in this embodiment, please refer to... Figure 3 , Figure 3 This is a schematic diagram illustrating the implementation scheme of the item sequence recommendation method provided in an embodiment of the present invention. Figure 3 First, based on user requests, item retrieval is performed. This can be done by type or by a mixed retrieval method, where all items are retrieved regardless of type. For example, retrieval can be done uniformly using vectors, and the retrieved results can be merged before further processing. Second, according to the scenario requirements, a sorted sequence of multiple item types is generated. The number and length of the sequences can be configured based on the scenario, and the optimal sequence is selected for further processing. Next, the selected optimal sequence undergoes unified profiling, mapping different item types to a single virtual Item type domain. This aligns different item types in terms of feature dimensions, simplifying the acquisition and processing of offline and online item attribute profiles into a single workflow, thus improving efficiency. Furthermore, based on multiple specified sequences and a specified sequence length, materials are uniformly profiled and transformed, avoiding multiple query and transformation operations. Secondly, a model is constructed with the goal of achieving the optimal comprehensive score for the sequences. One implementation method is to add a sequence context attention mechanism to the item dimension to achieve global optimization at the sequence dimension. After the model scores and returns the score for each sequence, the optimal sequence is selected for subsequent display. Finally, the optimal sequence returned by the model is displayed on the interface. As one implementation method, it can be further adjusted as needed, such as removing or swapping the positions of items.

[0072] based on Figure 3 The overall solution example is described below. The item sequence recommendation method, apparatus, electronic device, and storage medium provided in this embodiment are detailed below. Please refer to [link / reference]. Figure 4 , Figure 4 This is a flowchart illustrating an example of an item sequence recommendation method provided in an embodiment of the present invention. The method includes the following steps:

[0073] Step S101: Obtain multiple items of various types. Each item has a portrait attribute that represents its characteristics. Different types of items include different portrait attributes.

[0074] In this embodiment, the multiple items include various types. For example, there are 100 items of type 1, 50 items of type 2, and 30 items of type 3. The profile attributes of the items are used to characterize the features of the items. Different types of items include different profile attributes. For example, the profile attributes of the audiobook item "Momo's Story" include author, serialization days, publisher, and audiobook identifier, and their corresponding profile attribute values ​​are Momo, 5 days, publisher A, and 111, respectively. The profile attributes of the advertising item xx product include advertiser, bid, and guaranteed quantity, and their corresponding profile attribute values ​​are company A, 100,000, and 10,000, respectively.

[0075] Step S102: Generate multiple item sequences based on multiple items, each item sequence including different types of items.

[0076] In this embodiment, the number of items in multiple item sequences is the same. The number of item sequences and the number of items in an item sequence can be determined according to the actual scenario. The types of items included in each item sequence can be the same or different. For example, the number of items in an item sequence is 5. Item sequence 1 includes 2 items of type 1, 2 items of type 2 and 1 item of type 3. Item sequence 2 includes 3 items of type 1 and 2 items of type 4.

[0077] Understandably, in the actual implementation, depending on the actual generation process and the needs of the actual scenario, the generated multiple item sequences may also include item sequences of the same type of items and item sequences of different types of items. For example, the number of items in an item sequence is 5. Item sequence 1 includes 1 item of type 1 and 4 items of type 2, while item sequence 2 includes 5 items of type 3.

[0078] Step S103: The image attributes of the items included in each item sequence are standardized to obtain the feature attributes of each item sequence. Different types of items include the same feature attributes.

[0079] In this embodiment, the feature attribute is a virtualized attribute. One implementation method is to establish a mapping relationship between the portrait attribute and the feature attribute, and to virtually map the portrait attribute to the feature attribute according to the mapping relationship. The feature attribute after the virtual mapping of the portrait attribute of different types of items is the same.

[0080] Step S104: Input the feature attributes of each item sequence into the pre-trained scoring model to obtain the score of each item sequence.

[0081] In this embodiment, since the feature attributes of different types of items in each item sequence are the same, it is possible to avoid building different scoring models according to the type of items. Instead, the feature attributes of different types of item sequences are input into the scoring model to obtain the score of each item sequence. This allows the influence between items to be considered when evaluating the item sequence and to evaluate whether the item sequence is a better sequence as a whole.

[0082] Step S105: Select the sequence of items with the highest rating as the recommended sequence.

[0083] In this embodiment, if there are multiple item sequences with the same and highest rating, they can all be provided as recommended sequences to the administrator of the information flow platform, who can then decide which one to select as the final display sequence. Alternatively, the ratings can be arranged from high to low, and a preset number of item sequences can be selected as recommended sequences, from which the administrator determines the final display sequence. Or, the administrator can reorder the items in the recommended sequences to obtain the final display sequence.

[0084] The method provided in this embodiment of the invention generates an item sequence, processes the image attributes of different types of items in the item sequence into the same feature attributes, and then uses a scoring model to score the item sequence. The item sequence with the highest score is used as the recommended sequence, so that the final recommended sequence is a more reasonable and globally optimal item sequence that integrates the features of different types of items.

[0085] In an optional implementation, one way to generate multiple item sequences is:

[0086] First, select multiple target items from multiple items, and then set each selected target item as the first item in a sequence of items;

[0087] Secondly, select multiple adjacent items for each target item from the multiple items to obtain the adjacent items of all target items;

[0088] Third, each adjacent item is re-designated as the target item, and the process of selecting multiple adjacent items from each target item from multiple items is repeated to obtain the adjacent items of all target items until the number of items in each item sequence reaches the preset number.

[0089] In this embodiment, the preset number is the number of items in an item sequence. The preset number can be determined according to actual needs. For example, it can be determined according to the number of resource slots. Specifically, it can be equal to or greater than the number of resource slots.

[0090] It should be noted that after the number of items in each item sequence reaches the preset number, a specified number of item sequences can be selected from the generated item sequences as input for subsequent models.

[0091] To more clearly illustrate the process of generating item sequences, please refer to [link / reference]. Figure 5 , Figure 5 This is an example diagram of item sequence generation provided in an embodiment of the present invention. Figure 5 In the process, the preset number of items, i.e. the sequence length, is 3. Each time, 2 items are selected from multiple items, and the total number of items is 20. In the first step, 2 target items are selected from the 20 items. In the second step, for each target item, 2 adjacent items are selected from the 20 items. In the third step, each adjacent item is used as the target item, and 2 adjacent items are selected from the 20 items for each target item. Finally, 8 item sequences are obtained.

[0092] In this embodiment, when there are M items, and the preset number is N, the potential recommendation list is often on the order of Anm (≈mn) (e.g., m=1000, n=10). For performance reasons, it is impractical to calculate all possible sorting methods. Therefore, this embodiment provides an implementation method to obtain all adjacent items of the target item:

[0093] First, select candidate items adjacent to each target item from multiple items to obtain a candidate item set, which includes candidate items of all target items;

[0094] In this embodiment, in addition to selecting adjacent candidate items for each target item according to a pre-specified number of items, to make the selected candidate items more reasonable, this embodiment provides an implementation method for a candidate item set:

[0095] (1) Take any target item as the item to be processed, and select a first preset number of items from multiple items;

[0096] In this embodiment, the first preset number can be set according to actual needs, such as the number of items. For example, if the number of items is 100, the first preset number is set to 20.

[0097] (2) Score the probability of each initially selected item in the sequence of items to be processed to which the items to be processed belong, and obtain the sequence score of each initially selected item in the sequence of items to be processed.

[0098] In this embodiment, in order to improve the rationality of the item sequence, a scoring mechanism is provided: Sequence score = Weight A * (Item quality score + Recall coarse ranking score) - Weight B * (Sum of rule penalty scores) + Random factor score.

[0099] The item quality score and recall coarse ranking score can be directly obtained during the item recall phase and are then regularized, with the scores ranging from 0 to 1. The item quality score is related to the quality of the item itself. For example, the item quality score for an audiobook can be evaluated based on the clarity and richness of the audio content. The recall coarse ranking score depends on the recall situation. For instance, the shorter the time between listing and recall, the lower the recall coarse ranking score; otherwise, the higher the recall coarse ranking score.

[0100] The rules and penalties are set according to the scenario. Common ones include penalties for the first appearance of an advertisement and penalties for the appearance of three consecutive identical materials.

[0101] Weights A and B can also be set according to different scenarios, usually 0.5:0.5 or 0.4:0.6.

[0102] The random factor score is randomly selected from a preset candidate set and is randomly drawn each time the score is calculated to introduce a certain degree of randomness. For example, the preset candidate set is (0.05, 0.1, 0.2).

[0103] During the sequence scoring calculation, the weight A*(item quality score + recall coarse ranking score) is fixed and can be saved after the first calculation. In subsequent item sequence generation, only the weight B*(sum of rule penalty scores) + random factor score needs to be calculated, which further simplifies the calculation and helps improve performance.

[0104] (3) Select the second preset number of preliminary items as candidate items to be processed according to the sequence score from high to low.

[0105] In this embodiment, the second preset number can be set according to actual needs, such as the number of items. For example, if the number of items is 100, the first preset number is set to 20 and the second preset number is set to 10.

[0106] (4) The set of all candidate items of the target item is taken as the candidate item set.

[0107] Secondly, the items to be deleted are determined from the candidate item set;

[0108] In this embodiment, to further simplify the calculation, after determining the candidate items in the candidate item set, not all candidate items will be considered as adjacent items of the target item. Instead, the items to be deleted will be calculated according to a preset discard rate. After deleting the items to be deleted from the candidate item set, the adjacent items of the final target item will be obtained.

[0109] It should be noted that, depending on actual needs, the selection and removal of items from the candidate item set can begin either at the start of the second or third iteration of the calculation. Similar to the first and second preset numbers, the preset discard rate can be set according to requirements and the total computational workload. For example, if the first and second preset numbers are relatively small, the preset discard rate can be set smaller; conversely, a larger preset discard rate needs to be set to ensure the overall computational workload meets the requirements.

[0110] Finally, the item to be deleted is removed from the candidate item set, and the remaining items in the candidate item set are considered as adjacent items to all target items.

[0111] To illustrate the overall process of generating an item sequence, this embodiment provides an example of such a process:

[0112] Assuming the recall pool contains 100 mixed items of different types, multiple item sequences of length 5 need to be generated. Finally, the 50 sequences with the highest scores are selected and input into the scoring model for ranking. The process is as follows:

[0113] Because the sequence length is 5, 5 iterations are required. In each iteration, items are selected according to the above steps, a sequence score is calculated using the formula for the selected items, and then some items are randomly discarded according to a preset discard rate. Finally, the item sequence is obtained, and a sequence association relationship is established with the corresponding items before and after it.

[0114] With 10 items selected each time and a sampling rate of 20, starting from the second iteration, the preset discard rate is set to 70%. The calculation process is as follows:

[0115] First iteration: For 100 items, 20 items are randomly sampled, and scores are calculated and assigned using a formula. The 10 items with the highest scores (K=10) are selected as the result of the first iteration.

[0116] Second iteration: Based on the 10 items from the first iteration, perform the following calculations for each item:

[0117] The item is excluded from the 100 recall pools. 20 items are randomly sampled. Based on the preconditions of the first item, a formula is used to score them. The 10 items with the highest scores (K=10) are selected as the iteration result for this item.

[0118] After calculating the 10 items sequentially, the second position will theoretically generate 10*10 items, with each set of 10 items having a sequence relationship with the items in the previous position. Of these 100 items, 70 are randomly discarded (a 70% discard rate). Therefore, the second iteration generates a total of 30 items at position 2, producing 30 sequences of length 2.

[0119] Third iteration: Based on the 30 items generated in the second iteration, repeat the calculations similar to those in the second iteration. After completion, a total of 90 items are generated at position 3, producing 90 sequences of length 3.

[0120] This process is repeated until the fifth iteration, with each iteration generating (10, 30, 90, 270, 810) candidate items and sequences for corresponding positions. Finally, based on 810 sequences of length 5, the sum of the scores calculated in each iteration is used to obtain the 50 sequences with the highest scores.

[0121] In actual operation of this process, parameters such as the item sequence scoring formula, K, sampling recall, preset discard rate, and the calculation method of the item sequence score will be flexibly specified according to the needs of the scenario and the calculation time, and an intermediate state will be taken.

[0122] After obtaining the generated item sequence, since an item sequence includes different types of items, the following technical obstacles will be encountered when using a pre-trained scoring model to score each generated item sequence: (1) Different types of items often have different profiles. For example, advertising items have profile attributes such as advertiser, bid, and quantity requirements; audiobook albums have profiles such as novel author and serialization days. This will cause inconsistencies in specific profile attributes and inconsistent lengths of item profile attributes. (2) In the model building stage, if the specific profiles and their number are inconsistent, they cannot be processed according to the sequence, increasing model complexity or even making it impossible to build the corresponding model. (3) In the profile feature acquisition stage, the storage locations of different profile features are inconsistent. If the specific profile attributes are acquired according to each item type in the sequence, the acquisition complexity will increase and performance will be reduced. (4) Different items often have many common parts in their profile attributes, such as ID and name. In actual implementation, it is necessary to consider the balance between storage reuse and acquisition cost.

[0123] To address the aforementioned technical obstacles, this embodiment also requires standardizing the image attributes of items in the item sequence. This embodiment provides a standardized processing method:

[0124] First, obtain the pre-established mapping relationship between portrait attributes and feature attributes. The mapping relationship maps portrait attributes that represent the same meaning for different types of items to the same feature attribute.

[0125] Secondly, based on the mapping relationship, the image attributes of each item in the item sequence are converted into corresponding feature attributes.

[0126] In this embodiment, different types of portrait attributes may be different, but there may be cases where some portrait attributes are different but represent the same meaning. For such portrait attributes, they can be virtualized into a single feature attribute. For example, the portrait attribute for album type includes album ID, the portrait attribute for advertisement type includes advertisement ID, and the portrait attribute for blog type includes blog ID. Although the three have different names, they all represent the identifier of the corresponding item. Therefore, these three can be virtualized into a single feature attribute: the identifier attribute, establishing a mapping relationship between the portrait attributes representing the identifier of each type and this identifier attribute. Please refer to... Figure 6 , Figure 6 This is an example diagram illustrating the mapping relationship between image attributes and feature attributes in an embodiment of the present invention. Figure 6 There are three item types: Item A, Item B, and Item C. Each type has a variable number of image attributes. White indicates that the image attributes have the same meaning as other image attributes. For Item A, the images other than white are unique attributes of Item A; for Item B, the images other than white are unique attributes of Item B; and for Item C, the images other than white are unique attributes of Item C. The unified feature attributes include white images and the unique attributes of each item type. That is, for image attributes with consistent meanings, the mapping relationship between each image attribute and its corresponding feature attribute is saved. For image attributes with inconsistent meanings, only the valid mapping relationship is saved; other types of image attributes directly return default values ​​without additional image attribute lookups, further improving performance.

[0127] When selecting attributes for mixed-type profiles, instead of basing the selection on multiple item types, a subset of virtual feature attributes is chosen and scored using a rating model. This ensures that when mixing sequences of multiple item types, the names, meanings, and numbers of feature attributes are consistent across all item types.

[0128] For example, Figure 6 The three item types and their image attributes are as follows:

[0129] Item A is an album with 6 profile attributes: ID, name, category, total number of clicks, album logo, and album description. The last two are unique to album-type items.

[0130] Item B is an Ads product with 6 profile attributes: ID, Name, Advertiser ID, Ad Bid, and Guaranteed Frequency. The last three attributes are unique to Ads products.

[0131] Item C is a podcast. It has four profile attributes: ID, Name, Category, and Number of Followers. The last one is unique to podcast items.

[0132] The table structure of the image attributes of item C is shown in Table 1 below:

[0133] Table 1

[0134] Podcast.ID name category Number of users 1 A society 2000 2 B news 5000 … C Leisure 10000

[0135] One representation of the mapping relationship is shown in Table 2:

[0136] Table 2

[0137]

[0138] Figure 6 In this context, Album.ID, Ads.ID, and Podcast.ID, which have the same meaning, are uniformly represented by ID, and a mapping relationship between the two is established. For the unique image attribute Album.Logo, it is represented by Logo, and a default value of "" is set for other types of items that do not have this image attribute. Other image attributes are similar and will not be described in detail.

[0139] The mapping method provided in this embodiment uses feature attributes for all items when multiple types of items are mixed. The length of the feature attributes is fixed and aligned. If a new item type is added, only the mapping relationship needs to be updated. Thus, the image attributes and number of different types of items are unified without increasing storage costs or acquisition methods, thereby reducing the model construction cost of long sequence multi-item mixed arrangement.

[0140] In this embodiment, a commonly used scoring model is an item-type model, that is, scoring items of the same item type. For example, for items in the recall pool, the model is used to score each item sequentially, obtaining the click probability of each item, sorting them from high to low, and then inserting them into the designated resource slots according to the sequence. A commonly used scoring model takes the complete profile of an item as input and outputs its click probability score. Please refer to... Figure 7 , Figure 7 This is an example diagram of a common scoring model provided in the embodiments of the present invention. Figure 7 In this model, the scoring system includes a vector processing layer, a pooling layer, a target-attention layer, and a multilayer perceptron (MLP structure). The system uses profile features ft11–ft14 for items of the same type and profile features ft21–ft26 related to the user and context. All profile features are vectorized by the vector processing layer to obtain feature vectors emb. ft11–ft14 are then input into the pooling layer for pooling. The pooled result is multiplied by the pooled / concatenated result of ft21–ft26, or other calculations are performed. The calculated result is then input into the model's multilayer perceptron to obtain the estimated click-through rate of the item.

[0141] Since this embodiment scores items that include different types of items, therefore, Figure 7 The scoring model cannot be directly adapted; the embodiments of the present invention are adapted to... Figure 7 The scoring model has been improved; please refer to [the relevant documentation]. Figure 8 , Figure 8 This is an example diagram of the improved scoring model provided in an embodiment of the present invention. Figure 8 The improved rating model includes a feature processing layer, a self-attention mechanism layer, and a rating calculation layer. The feature processing layer vectorizes the feature attributes of each item in the item sequence to obtain the sequence feature vector. The self-attention mechanism layer processes the sequence feature vector to obtain the self-attention result. The rating calculation layer includes a target attention layer and a multilayer perceptron. The target attention layer performs a dot product or other calculations on the self-attention result and the pooled result of user and context-related feature vectors to obtain the rating score for the item sequence. User and context-related features include, but are not limited to, the time of user clicks and the app entry point for the user's page. Because it utilizes both the sequence feature vector of the item sequence and the user and context-related feature vectors, the rating model considers various factors such as the relevance of items, user, and context when rating the item sequence, ultimately making the recommended item sequence more reasonable.

[0142] based on Figure 8 The scoring model provided in this embodiment offers a method for obtaining a score for each item sequence. This embodiment uses any target item sequence from the generated item sequence as an example for illustration:

[0143] First, for any target item sequence, the target item sequence is input into the feature processing layer to obtain the target sequence feature vector of the target item sequence. The target sequence feature vector includes the feature vector of the feature attribute of each item in the target item sequence.

[0144] Secondly, the self-attention mechanism layer is used to process the feature vector of the target sequence to obtain the self-attention result;

[0145] In this embodiment, the relevant weights of the feature vector of each item in the self-attention mechanism layer are all related to the feature vectors of other items in the item sequence.

[0146] Finally, the self-attention results and the pre-acquired target-related feature vectors are input into the scoring calculation layer to obtain the score of the target item sequence. The final score of each item sequence is obtained. The target-related feature vectors are obtained by vectorizing the features that represent the relevance to the target item sequence.

[0147] In an optional implementation, to make fuller use of the feature vectors of each item in the item sequence and the relationships between them, a self-attention mechanism layer is used to process the sequence feature vectors to obtain the self-attention result.

[0148] (1) Determine the target feature vector of the target item from the feature vectors of the feature attributes of the items in the target item sequence;

[0149] (2) Input the sequence feature vector and the target feature vector into the self-attention mechanism layer to obtain the self-attention result.

[0150] In this embodiment, the sequence feature vector input to the self-attention mechanism layer can be the pooling result after pooling, and the target feature vector can be directly input to the self-attention mechanism layer without pooling. The target feature vector can be determined from the feature vectors of items in the target item sequence according to the user's needs. For example, if the sequence feature vector includes vector 1, vector 2, and vector 3, and the target feature vector is vector 3, then the input to the self-attention mechanism layer is the pooling result of vector 1, the pooling result of vector 2, the pooling result of vector 3, and vector 3.

[0151] It should also be noted that the improved rating model changes the optimization loss function used during training from the common binary classification cross-entropy to regression MSE, which represents the overall score of an item sequence, i.e., the ListReward score. The rating score of its training samples is calculated by summing user actions such as clicks, views, and continued traffic during the display of the sequence; a higher score indicates a better sequence quality and a more reasonable sequence.

[0152] To perform the corresponding steps in the above embodiments and various possible implementations, an implementation of an item sequence recommendation device is given below. Please refer to... Figure 9 , Figure 9 This is a block diagram of the item sequence recommendation device 100 provided in an embodiment of the present invention. It should be noted that the item sequence recommendation device 100 provided in this embodiment has the same basic principle and technical effects as those in the above embodiments; however, for the sake of brevity, some details are not mentioned in this embodiment.

[0153] The item sequence recommendation device 100 includes an acquisition module 110, a processing module 120, and a recommendation module 130.

[0154] The acquisition module 110 is used to acquire multiple items of various types. Each item has a portrait attribute that represents its characteristics. Different types of items include different portrait attributes.

[0155] The processing module 120 is used to generate multiple item sequences based on multiple items, each item sequence including different types of items.

[0156] The processing module 120 is also used to unify the image attributes of the items included in each item sequence to obtain the feature attributes of each item sequence. Different types of items include the same feature attributes.

[0157] The recommendation module 130 is used to input the feature attributes of each item sequence into the pre-trained rating model to obtain the rating score of each item sequence.

[0158] The recommendation module 130 is also used to select the sequence of items with the highest rating as the recommended sequence.

[0159] In an optional implementation, the processing module 120 is specifically used to: select multiple target items from multiple items, and take each selected target item as the first item in an item sequence; select multiple adjacent items from each target item from multiple items to obtain the adjacent items of all target items; take each adjacent item as a target item again, and repeat the steps of selecting multiple adjacent items from each target item from multiple items to obtain the adjacent items of all target items, until the number of items in each item sequence reaches a preset number.

[0160] In an optional implementation, the processing module 120 is specifically used to select multiple adjacent items from multiple items for each target item, and when obtaining the adjacent items of all target items, it is specifically used to: select candidate items from multiple items for each target item, and obtain a candidate item set, the candidate item set including the candidate items of all target items; determine the item to be deleted from the candidate item set; delete the item to be deleted from the candidate item set, and the remaining items in the candidate item set are the adjacent items of all target items.

[0161] In an optional implementation, the processing module 120 is specifically used to select candidate items adjacent to each target item from multiple items to obtain a candidate item set. Specifically, it is used to: take any target item as the item to be processed, select a first preset number of preliminary items from multiple items; score the probability of each preliminary item in the item to be processed sequence to which the item to be processed belongs, and obtain the sequence score of each preliminary item in the item to be processed sequence; select a second preset number of preliminary items as candidate items for the item to be processed in descending order of sequence score; and take the set of candidate items of all target items as the candidate item set.

[0162] In an optional implementation, the processing module 120 is further configured to: obtain a pre-established mapping relationship between portrait attributes and feature attributes, wherein the mapping relationship maps portrait attributes representing the same meaning of different types of items to the same feature attribute; and convert the portrait attributes of each item in the item sequence into the corresponding feature attribute according to the mapping relationship.

[0163] In an optional implementation, the scoring model includes a feature processing layer, a self-attention mechanism layer, and a score calculation layer. The recommendation module 130 is specifically used for: for any target item sequence, inputting the target item sequence into the feature processing layer to obtain the target sequence feature vector of the target item sequence, the target sequence feature vector including the feature vector of the feature attribute of each item in the target item sequence; using the self-attention mechanism layer to process the target sequence feature vector to obtain the self-attention result; inputting the self-attention result and the pre-acquired target-related feature vector into the score calculation layer to obtain the score of the target item sequence, and finally obtaining the score of each item sequence. The target-related feature vector is obtained by vectorizing the features representing the relevance to the target item sequence.

[0164] In an optional implementation, the recommendation module 130, when processing the sequence feature vector using the self-attention mechanism layer to obtain the self-attention result, specifically performs the following: determining the target feature vector of the target item from the feature vectors of the feature attributes of the items in the target item sequence; and inputting the sequence feature vector and the target feature vector into the self-attention mechanism layer to obtain the self-attention result.

[0165] This embodiment also provides a block diagram of an electronic device 10, please refer to... Figure 10 , Figure 10 This is a block diagram of an electronic device 10 provided in an embodiment of the present invention. The electronic device 10 includes a processor 11, a memory 12, and a bus 13. The processor 11 and the memory 12 are connected via the bus 13.

[0166] Processor 11 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed through integrated logic circuits in the hardware of processor 11 or through software instructions. Processor 11 can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an On-Premises Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.

[0167] Memory 12 is used to store programs, for example Figure 9 The item sequence recommendation device 100 in the present invention includes at least one software function module that can be stored in the memory 12 in the form of software or firmware. After receiving the execution instruction, the processor 11 executes the program to implement the item sequence recommendation method in the embodiment of the present invention.

[0168] The memory 12 may include high-speed random access memory (RAM) or non-volatile memory. Optionally, the memory 12 may be a storage device built into the processor 11 or a storage device independent of the processor 11.

[0169] Bus 13 can be an ISA bus, PCI bus, or EISA bus, etc. Figure 10 It is indicated by a single double-headed arrow, but does not mean that there is only one bus or one type of bus.

[0170] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the item sequence recommendation method as described in any of the foregoing embodiments.

[0171] In summary, embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for recommending item sequences. The method includes: acquiring multiple items of various types, each item having a profile attribute characterizing its features, with different types of items including different profile attributes; generating multiple item sequences based on the multiple items, each item sequence including different types of items; unifying the profile attributes of the items included in each item sequence to obtain feature attributes for each item sequence, with different types of items including the same feature attributes; inputting the feature attributes of each item sequence into a pre-trained scoring model to obtain a score for each item sequence; and selecting the item sequence with the highest score as the recommended sequence. Compared with the prior art, the item sequence recommendation method, device, electronic device and storage medium provided in this embodiment have at least the following advantages: (1) Automatically generate item sequences including different types of items, and then unify the image attributes of the items in the item sequence into feature attributes before inputting them into the scoring model for scoring. The scheme of using multiple scoring models for different types of materials is transformed into using a unified scoring model for recommendation, which simplifies the complexity of the scoring model; (2) When generating item sequences, on the one hand, weight A, weight B, item quality score, recall coarse ranking score, rule penalty score and random factor score are adopted to make the evaluation of item sequences more reasonable. On the other hand, a portion of items are extracted in each iteration, and a preset discard probability is set as needed. The sequence is discarded according to the preset discard probability to meet the requirements of online computation and ensure that the overall computation meets the performance requirements; (3) Using mapping relationship, the different image attributes of different types are unified into feature attributes, so that the feature attributes of different types are unified in length and dimension, so as to facilitate subsequent input into the scoring model for processing. The feature attributes themselves do not need to occupy storage space, which reduces space occupation. When there is a new type, only the corresponding mapping relationship needs to be supplemented, which improves the convenience of maintenance.

[0172] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An item sequence recommendation method characterized by, The method includes: Obtain multiple items of various types, each of which has a profile attribute that represents its characteristics. Different types of items include different profile attributes. Based on the multiple items, generate multiple item sequences, each item sequence including different types of items; Obtain the pre-established mapping relationship between portrait attributes and feature attributes. The mapping relationship maps portrait attributes representing the same meaning of different types of items to the same feature attribute. According to the mapping relationship, the portrait attributes of each item in the item sequence are converted into corresponding feature attributes to obtain the feature attributes of each item sequence. Different types of items include the same feature attributes. The feature attributes of the item sequence include the same feature attribute mapped from portrait attributes with the same meaning and the unique portrait attributes of each type. The feature attributes of each item sequence are input into a pre-trained scoring model to obtain a score for each item sequence. The score is determined based on the item quality score, recall coarse ranking score, rule penalty score, and random factor score. The item quality score is related to the quality of the item itself. The recall coarse ranking score is determined based on the time between the item being listed and being recalled. The rule penalty score is determined based on the position of the advertised item in the item sequence and the number of times similar items appear consecutively in the item sequence. The scoring model includes a feature processing layer, a self-attention mechanism layer, and a scoring calculation layer. The sequence of items with the highest ratings will be used as the recommended sequence. The step of inputting the feature attributes of each item sequence into a pre-trained scoring model to obtain a score for each item sequence includes: For any target item sequence, the target item sequence is input into the feature processing layer to obtain the target sequence feature vector of the target item sequence. The target sequence feature vector includes the feature vector of the feature attribute of each item in the target item sequence. Determine the target feature vector of the target item from the feature vectors of the feature attributes of the items in the target item sequence; The sequence feature vector and the target feature vector are input into the self-attention mechanism layer to obtain the self-attention result; The self-attention result and the pre-acquired target-related feature vector are input into the scoring calculation layer to obtain the score of the target item sequence. Finally, the score of each item sequence is obtained. The target-related feature vector is obtained by vectorizing the features that represent the relevance to the target item sequence.

2. The item sequence recommendation method according to claim 1, wherein The step of generating multiple item sequences based on the multiple items includes: Select multiple target items from the multiple items, and assign each selected target item as the first item in an item sequence; For each target item, select multiple adjacent items from the plurality of items to obtain the adjacent items of all target items; Each of the adjacent items is re-designated as the target item, and the process of selecting multiple adjacent items from each of the multiple items to obtain the adjacent items of all target items is repeated until the number of items in each item sequence reaches a preset number.

3. The item sequence recommendation method according to claim 2, wherein The step of selecting multiple neighboring items for each target item from the plurality of items to obtain the neighboring items of all target items includes: For each of the multiple items, select the candidate items adjacent to the target item to obtain a candidate item set, which includes the candidate items of all target items; Items to be deleted are determined from the candidate item set; The item to be deleted is removed from the candidate item set, and the remaining items in the candidate item set are considered as adjacent items to all target items.

4. The item sequence recommendation method according to claim 3, wherein The step of selecting candidate items adjacent to each target item from the plurality of items to obtain a candidate item set includes: Take any one of the target items as the item to be processed, and select a first preset number of initial items from the plurality of items; The probability of each of the initial selected items in the sequence of items to be processed to which the items to be processed belong is scored to obtain the sequence score of each of the initial selected items in the sequence of items to be processed. According to the sequence score from high to low, a second preset number of preliminary items are selected as candidate items for the items to be processed. The set of candidate items comprising all candidate items for the target item is called the candidate item set.

5. An article sequence recommendation device characterized by comprising: The device includes: The acquisition module is used to acquire multiple items of various types. Each item has a profile attribute that represents its characteristics. Different types of items include different profile attributes. The processing module is used to generate multiple item sequences based on the multiple items, each item sequence including different types of items; The processing module is also used to obtain a pre-established mapping relationship between portrait attributes and feature attributes. The mapping relationship maps portrait attributes representing the same meaning of different types of items to the same feature attribute. According to the mapping relationship, the portrait attributes of each item in the item sequence are converted into corresponding feature attributes to obtain the feature attributes of each item sequence. Different types of items include the same feature attribute. The feature attributes of the item sequence include the same feature attribute mapped from portrait attributes with the same meaning and the unique portrait attributes of each type. The recommendation module is used to input the feature attributes of each item sequence into a pre-trained scoring model to obtain a score for each item sequence. The score is determined based on the item quality score, the recall coarse ranking score, the rule penalty score, and the random factor score. The item quality score is related to the quality of the item itself. The recall coarse ranking score is determined based on the time between the item being listed and being recalled. The rule penalty score is determined based on the position of the advertised item in the item sequence and the number of times similar items appear consecutively in the item sequence. The scoring model includes a feature processing layer, a self-attention mechanism layer, and a score calculation layer. The recommendation module is also used to select the sequence of items with the highest rating as the recommended sequence; The recommendation module is specifically used for: for any target item sequence, inputting the target item sequence into the feature processing layer to obtain the target sequence feature vector of the target item sequence, the target sequence feature vector including the feature vector of the feature attribute of each item in the target item sequence; determining the target feature vector of the target item from the feature vector of the feature attribute of the item in the target item sequence; inputting the sequence feature vector and the target feature vector into the self-attention mechanism layer to obtain the self-attention result; inputting the self-attention result and the pre-acquired target-related feature vector into the scoring calculation layer to obtain the score of the target item sequence, and finally obtaining the score of each item sequence, wherein the target-related feature vector is obtained by vectorizing the feature representing the relevance to the target item sequence.

6. An electronic device, comprising: It includes a processor and a memory, the memory being used to store a program, and the processor being used to implement the item sequence recommendation method as described in any one of claims 1-4 when executing the program.

7. A computer-readable storage medium, characterized in that, It stores a computer program that, when executed by a processor, implements the item sequence recommendation method as described in any one of claims 1-4.