Method, device, electronic device and readable storage medium for determining target item sequence

By calculating the scores of each object in the target object sequence, selecting the target item sequence with the largest total score and inversely similarity, the problem of high similarity in the target item when displaying the object sequence is solved, and the display effect and user experience are improved.

CN114722100BActive Publication Date: 2025-04-08SHANGHAI ZHENGDA XIMALAYA NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210415176.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-04-08
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

When displaying object sequences, multiple identical or similar target items are prone to appear, resulting in poor display effects and affecting user experience.

Method used

By obtaining the optional options corresponding to each object in the target object sequence, and calculating the score of the current optional options based on the local sequence of the previous object, selecting the target item sequence with the largest total score and the inverse similarity.

Benefits of technology

Improved the problems that occur in the concentrated areas of multiple identical or similar target items, improved the display effect, and improved the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114722100B_ABST
    Figure CN114722100B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and readable storage medium for determining a target item sequence, and relates to the field of computer technology. The method comprises: traversing the target object sequence, for each current optional item of the current object traversed, obtaining the current score of each current optional item according to each local sequence corresponding to the previous object, and taking the maximum total score of the optional items in the target item sequence as the goal, determining each local sequence corresponding to the current object according to each current score, and selecting the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object in the target object sequence, wherein each local sequence corresponding to the previous object includes the first optional item selected from the optional items for each object before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score. In this way, the problems arising from a plurality of identical or similar target item sets can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a method, device, electronic device and readable storage medium for determining a target item sequence. Background Art

[0002] Currently, in many scenarios, it is necessary to set the target items corresponding to each object in an object sequence, and then display each object together with its corresponding target item, so as to introduce and recommend each object. For example, for a recommended content sequence, determine the recommendation reason corresponding to each recommended content, and then display each recommended content and the corresponding recommendation reason according to the order of the recommended content in the recommended sequence. However, the target items are easy to be similar or even repeated. For example, when multiple identical or similar target items appear in succession, the display effect is not good when multiple identical or similar target items are displayed together, which affects the user experience. Summary of the invention

[0003] The embodiments of the present application provide a method, device, electronic device and readable storage medium for determining a target item sequence, which can improve the problems that occur when multiple identical or similar target items are concentrated, so as to improve the display effect and enhance the user experience.

[0004] The embodiments of the present application can be implemented as follows:

[0005] In a first aspect, the present application provides a method for determining a target item sequence, the method comprising:

[0006] Obtain at least one optional item corresponding to each object in the target object sequence;

[0007] Traverse each of the objects, and for each current optional item of the traversed current object, obtain the current score of each current optional item according to each local sequence corresponding to the previous object, and take the maximum total score of the optional items in the target item sequence as the goal, determine each local sequence corresponding to the current object according to each current score, and select the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object of the target object sequence, wherein each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score.

[0008] In a second aspect, an embodiment of the present application provides a device for determining a target item sequence, the device comprising:

[0009] A data acquisition module, used to obtain at least one optional item corresponding to each object in the target object sequence;

[0010] A processing module is used to traverse each of the objects, and for each current optional item of the traversed current object, obtain the current score of each current optional item according to each local sequence corresponding to the previous object, and take the maximum total score of the optional items in the target item sequence as the goal, determine each local sequence corresponding to the current object according to each current score, and select the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object in the target object sequence, wherein each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score.

[0011] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the target item sequence determination method described in the aforementioned embodiment.

[0012] In a fourth aspect, an embodiment of the present application provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for determining a target item sequence as described in the aforementioned embodiment is implemented.

[0013] The target item sequence determination method, device, electronic device and readable storage medium provided by the embodiment of the present application, when obtaining at least one optional item corresponding to each object in the multiple objects included in the target object sequence, traverse the objects in the target object sequence; for each current optional item of the current object traversed, obtain the current score of each current optional item according to each local sequence corresponding to the previous object, and take the maximum total score of each optional item in the target item sequence as the goal, and determine each local sequence corresponding to the current object according to each current score; when obtaining each local sequence corresponding to the last object in the target object sequence, select the target item sequence corresponding to the target object sequence from each local sequence. Wherein, each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each object before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score. In this way, the problems occurring in the concentration of multiple identical or similar target items can be improved, so as to improve the display effect and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.

[0015] Figure 1 A block diagram of an electronic device provided in an embodiment of the present application;

[0016] Figure 2 A schematic diagram of a flow chart of a method for determining a target item sequence provided in an embodiment of the present application;

[0017] Figure 3 for Figure 2 Schematic diagram of sub-steps included in step S110;

[0018] Figure 4 for Figure 2 A schematic flow chart of the sub-steps included in step S120;

[0019] Figure 5 for Figure 4 A schematic flow chart of the sub-steps included in sub-step S123;

[0020] Figure 6 for Figure 4 A schematic flow chart of the sub-steps included in sub-step S124;

[0021] Figure 7 A block diagram of a target item sequence determination device provided in an embodiment of the present application.

[0022] Icon: 100 - electronic device; 110 - memory; 120 - processor; 130 - communication unit; 200 - item sequence determination device; 210 - data acquisition module; 220 - processing module. DETAILED DESCRIPTION

[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.

[0024] Therefore, the following detailed description of the embodiments of the present application provided in the accompanying drawings is not intended to limit the scope of the present application for which protection is sought, but merely represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0025] It should be noted that relational terms such as "first" and "second" are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0026] Currently, in scenarios such as the reason sorting of the double-column flow on the homepage and rearrangement of the bottom words of the frame, it is necessary to set the target item corresponding to each object for an object sequence, and then display each object together with its corresponding target item. However, the current method is prone to multiple identical or similar target items appearing continuously, resulting in poor display effects.

[0027] For example, in the double-column reason sorting on the home page, for a recommended content sequence that includes multiple recommended contents, it is necessary to determine the recommendation reasons corresponding to each recommended content, and then display each recommended content and the corresponding recommendation reasons according to the sorting of the recommended content in the recommended content sequence, so as to improve the user's click-through rate. Among them, the recommendation reasons are some explanations for each recommended content, which can provide users with some statistical, rating, and interactive information. In this method, due to the poor method of selecting the recommendation reasons corresponding to each recommended content, the recommendation reasons are often similar or even repeated. For example, multiple display texts such as "Subscription volume exceeds xxx" and "Your exclusive recommendation" appear in succession, which leads to poor display effect and affects the user experience.

[0028] In view of the above situation, the embodiments of the present application provide a method, device, electronic device and readable storage medium for determining a target item sequence, which can improve the problems that arise when multiple identical or similar target items are concentrated, so as to improve the display effect and enhance the user experience.

[0029] In conjunction with the accompanying drawings, some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0030] Please refer to Figure 1 , Figure 1 A block diagram of an electronic device 100 provided in an embodiment of the present application. The electronic device 100 may be, but is not limited to, a computer, a server, etc. The electronic device 100 may include a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses or signal lines.

[0031] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.

[0032] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a target item sequence determination device 200, and the target item sequence determination device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the target item sequence determination device 200 in the embodiment of the present application, that is, realizing the target item sequence determination method in the embodiment of the present application.

[0033] The communication unit 130 is used to establish a communication connection between the electronic device 100 and other communication terminals through a network, and to send and receive data through the network.

[0034] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the electronic device 100. The electronic device 100 may also include Figure 1More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.

[0035] Please refer to Figure 2 , Figure 2 The present invention provides a flowchart of a method for determining a target item sequence according to an embodiment of the present invention. The method can be applied to the electronic device 100. The specific process of determining the target item sequence is described in detail below. In this embodiment, the method can include steps S110 to S120.

[0036] Step S110: obtaining at least one optional item corresponding to each object in the target object sequence.

[0037] In this embodiment, the target object sequence is an object sequence for which corresponding target items need to be determined. The target object sequence includes multiple objects arranged in order. The object may be, but is not limited to, recommended content, objects corresponding to the bottom words in the bottom words rearrangement scenario, etc. The sorting order of the multiple objects in the target object sequence may be sorted in descending order according to the quality of the objects, so as to set corresponding target items for high-quality content first. For example, when the object is recommended content, it may be sorted from high to low according to the quality of the content; it may also be sorted in other ways. It is worth noting that the objects included in the target object sequence and the sorting order of the objects can be determined in combination with actual needs, and are not specifically limited here.

[0038] For each object in the target object sequence, at least one optional item corresponding to the object can be obtained. The at least one optional item corresponding to different objects may be completely the same, partially the same, or completely different, which can be determined in combination with actual conditions.

[0039] For example, in the recommended content sequence, the optional reasons corresponding to each recommended content may be the same or completely different, which may be determined by the actual situation. For example, if the subscription volume of multiple recommended content exceeds xxx, the optional reasons for the multiple recommended content may include the reason "the subscription volume exceeds xxx".

[0040] As a possible implementation method, in order to avoid the large amount of calculation resulting in a slow speed in obtaining the target item sequence, Figure 3 The method shown above obtains at least one optional item corresponding to each object. Figure 3 , Figure 3 for Figure 2 Schematic diagram of sub-steps included in step S110. In this embodiment, step S110 may include sub-steps S111 to S114.

[0041] Sub-step S111, for each of the objects, obtaining at least one candidate item corresponding to the object.

[0042] Sub-step S112, determining whether the number of candidate items of the at least one candidate item corresponding to the object is greater than a preset number.

[0043] The preset number is greater than 1 and can be determined based on actual needs.

[0044] If the number of candidate items of the at least one candidate item is greater than the preset number, sub-step S113 is executed. If the number of candidate items of the at least one candidate item is not greater than the preset number, sub-step S114 is executed.

[0045] Sub-step S113, selecting the optional item from the at least one candidate item.

[0046] The number of the selected options is the preset number.

[0047] Sub-step S114: taking the at least one candidate item corresponding to the object as the optional item corresponding to the object.

[0048] In this embodiment, the target object sequence is an ordered sequence, and the objects in the target object sequence can be traversed from front to back. For the traversed objects, the following processing can be performed. For example, if the currently traversed object is object C, at least one candidate item corresponding to the object C can be obtained first. For example, in the case where object C is a recommended content, the reasons that can be used as the recommendation reasons for the recommended content can be matched according to various situations of the recommended content, and the candidate reasons for the recommended content can be obtained. Then, the number of candidate items of at least one candidate item of the object C is counted, and the number of candidate items is compared with the preset number. If the number of candidate items is greater than the preset number, it means that the number of candidate items of the object C is large. If all the candidate items corresponding to the object C are used as the optional items of the object C, it may lead to a large amount of calculation. Therefore, in the case where the number of candidate items is greater than the preset number, a part of the candidate items can be selected from the candidate items corresponding to the object C as the optional items corresponding to the object C. Among them, the number of selected optional items can be the preset number.

[0049] Optionally, as a possible implementation method, when the number of candidate items of the at least one candidate item corresponding to an object is greater than the preset number, the at least one candidate item can be sorted according to the initial score of each of the at least one candidate item to obtain a sorting result. The initial score is used to indicate the quality of the current optional item. For example, the initial score is used to indicate the quality of the reason. The better the quality of the reason, the higher the initial score of the reason. The initial score can be pre-set or obtained by other means. For example, when the optional item is a reason, the initial score of the reason can be calculated based on the online feedback of the reason, and the initial score can be click / exposure.

[0050] Then, the optional items are selected from the sorting results in descending order of the initial scores. In this way, when the number of candidate items corresponding to the at least one candidate item of an object is greater than the preset number, the candidate items with high initial scores can be intercepted as optional items according to the size of the initial scores, thereby avoiding a large amount of calculation and retaining candidates with good quality, so as to ensure the quality of the target item sequence obtained subsequently.

[0051] Step S120, traverse each of the objects, and for each current optional item of the current object traversed, obtain the current score of each current optional item according to each local sequence corresponding to the previous object, and take the maximum total score of the optional items in the target item sequence as the goal, determine each local sequence corresponding to the current object according to each current score, and select the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object of the target object sequence.

[0052] The multiple objects included in the target object sequence can be traversed according to the order of each object in the target object sequence, and the currently traversed object is used as the current object, and at least one optional item corresponding to the current object is used as the current optional item of the object. According to each local sequence corresponding to the previous object, the current score of each current optional item of the current object is obtained, and the maximum total score of the optional items in the target item sequence is taken as the goal, and according to the current score of each current optional item, each local sequence corresponding to the current object is obtained. The current score of a current optional item is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the size of the current score.

[0053] For ease of description, each local sequence corresponding to the previous object is referred to as a first local sequence below. The previous object is an object in the target object that is adjacent to the current object and located before the current object. A first local sequence includes, for each object in the target object sequence before the current object, a first option selected for each object from at least one option corresponding to each object. The number of first local sequences corresponding to the previous object may be 1 or more.

[0054] For example, the objects of the target object sequence are: A, B, C, D... Assuming that the currently traversed object is C, the previous object is B, and any local sequence corresponding to the previous object B includes: an option selected for object A from at least one option corresponding to object A, and an option selected for object B from at least one option corresponding to object B. The current score of each current option of the current object C can be calculated according to each local sequence corresponding to the previous object B.

[0055] Similarly, when the currently traversed object is D, the previous object is C, and the current scores of the current options of the current object D can be calculated according to each local sequence corresponding to the previous object C. Among them, any local sequence corresponding to object C includes: the options selected for object A from at least one option corresponding to object A, the options selected for object B from at least one option corresponding to object B, and the options selected for object C from at least one option of object C.

[0056] The above process is repeated until each local sequence corresponding to the last object in the target object sequence is obtained, in which case a local sequence can be determined from the local sequence corresponding to the last object as the target item sequence. The target item sequence includes target options selected for each object in the target object sequence.

[0057] Optionally, in the process of obtaining the target item sequence based on the above method, a dynamic programming algorithm (such as a Viterbi algorithm or other dynamic programming algorithms) may be used to obtain the target item sequence, a greedy algorithm may be used to obtain the target item sequence, or other algorithms may be used to obtain the target item sequence.

[0058] For example, when the current scores of the current optional items of the current object are obtained, the current optional item corresponding to the maximum current score among the current scores can be directly used as the optional item selected for the current object, and then the next object can be used as the new current object, and the current score and selection actions can be repeatedly calculated until the local sequence corresponding to the last object in the target object sequence is obtained. At this time, the local sequence corresponding to the last object can be directly used as the target item sequence.

[0059] Assuming there is a sequence of fixed length N, and each state of the sequence has M optional labels, the Viterbi algorithm can find a set of globally optimal label matching solutions. It is essentially a dynamic programming with a computational complexity of N*M*M.

[0060] It is worth noting that, when at least one optional item corresponding to an object is obtained, the local sequence corresponding to the object can be determined based on the at least one optional item corresponding to the object. It is also possible to traverse after obtaining the optional items corresponding to all objects in the target object sequence to obtain the local sequence corresponding to each object. The specific execution order can be set according to actual needs.

[0061] Please refer to Figure 4 , Figure 4 for Figure 2 Schematic diagram of the flow of sub-steps included in step S120. In this embodiment, step S120 may include sub-steps S121 to S124.

[0062] Sub-step S121, for a traversed current optional item, for each of the first partial sequences, calculate the similarity between the current optional item and each of the first optional items to be analyzed in the first partial sequence.

[0063] For the current optional item currently traversed, each first local sequence corresponding to the previous object is traversed. For a first local sequence currently traversed, calculate the similarity between the current optional item and each first optional item to be analyzed in the first local sequence. Among them, the first distance between the position and the end position of each first optional item to be analyzed in the first local sequence is less than a preset distance. The preset distance can be determined according to actual needs. For example, it is set to 3, which is used to indicate that the last three first optional items in the first local sequence are selected as the optional items to be analyzed. In this way, it can be avoided that the similarity of adjacent target optional items is very high.

[0064] Sub-step S122, obtaining target similarity according to the calculated similarity.

[0065] When the similarity between the current optional item and each first optional item to be analyzed in the first partial sequence is obtained, an average similarity can be calculated based on the similarity as the target similarity, or the maximum similarity among the similarities can be used as the target similarity, etc. The target similarity is used to indicate the similarity between at least one first optional item to be analyzed and the current optional item.

[0066] Sub-step S123, determining a first coefficient of the current optional item in the first local sequence according to the target similarity.

[0067] The first coefficient is anti-correlated with the target similarity. Optionally, an anti-correlation function related to the first coefficient and the target similarity can be set according to actual needs, and then based on the anti-correlation function and the target similarity, the first coefficient of the current option in the first local sequence is calculated.

[0068] As a possible implementation, Figure 5 The first coefficient is calculated by the method shown. Figure 5 , Figure 5 for Figure 4 Schematic diagram of the flow of sub-steps included in sub-step S123. In this embodiment, sub-step S123 may include sub-steps S1231 to S1233.

[0069] Sub-step S1231, determining whether the target similarity is greater than a preset similarity.

[0070] When the target similarity is greater than the preset similarity, sub-step S1232 is executed.

[0071] Sub-step S1232, attenuating the first preset coefficient, and using the attenuated value as the first coefficient.

[0072] When the target similarity is not greater than the preset similarity, sub-step S1233 is executed.

[0073] Sub-step S1233: using the first preset coefficient as the first coefficient.

[0074] The preset similarity is a threshold value for determining the need for coefficient attenuation. The size of the preset similarity can be set in combination with demand, for example, it can be set to 0.5. The first preset coefficient is the initial value before the preset attenuation. The first preset coefficient is greater than 0. It can be set in combination with actual demand. For example, the first preset coefficient can be set to 1. In the case where the target similarity is greater than the preset similarity and attenuation is determined, the specific attenuation size can be determined according to the attenuation relationship set based on actual demand. The first coefficient obtained after attenuation can be greater than or equal to 0.

[0075] In a possible implementation, the target similarity is the maximum similarity among the obtained similarities, the preset similarity is 0.5, the first preset coefficient is 1, and the first coefficient can be obtained in the following manner:

[0076] simDecayCoefficient=min(1,1+(0.5-maxPrevNeighborSim)×2)

[0077] Among them, simDecayCoefficient represents the first coefficient, and its value range is [0,1], and maxPrevNeighborSim represents the target similarity. The larger the target similarity maxPrevNeighborSim is, the greater the decay is, and the smaller the first coefficient simDecayCoefficient is.

[0078] Sub-step S124, obtaining the current score of the current optional item in the first local sequence according to the first coefficient.

[0079] For the current optional item currently traversed, the current score of the current optional item under the first local sequence can be obtained according to the current optional item and a first local sequence. The current score of the current optional item under the first local sequence represents the score of the current optional item when the optional items selected for the object before the current object are as shown in the first local sequence. As a possible implementation method, the first coefficient can be directly used as the current score of the current optional item under the first local sequence.

[0080] For the current optional item and other first partial sequences, the above sub-steps S121 to S124 are repeated to obtain the current scores of the current optional item in other first partial sequences. In this way, the current scores of the current optional item in each first partial sequence can be obtained. The number of current scores of one current optional item is the same as the number of the first partial sequences.

[0081] Please refer to Figure 6 , Figure 6 for Figure 4 Schematic diagram of the flow of sub-steps included in sub-step S124. In this embodiment, sub-step S124 may include sub-steps S1241 to S1242.

[0082] Sub-step S1241, obtaining the second coefficient corresponding to the current optional item in the first local sequence.

[0083] Wherein, when the category to which the current optional item belongs is not included in the category to which the optional item belongs in the first local sequence, the second coefficient is the second preset coefficient. When the category to which the current optional item belongs is included in the category to which the optional item belongs in the first local sequence, the second coefficient is the value obtained by attenuating the second preset coefficient based on the attenuation value, and the attenuation value is inversely correlated with the second distance, and the second distance is the distance between the last occurrence position of the category to which the current optional item belongs in the category to which the optional item belongs in the first local sequence and the end position of the first local sequence. The second preset coefficient is greater than 0, and the specific value of the second preset coefficient can be set in combination with actual needs, such as, for example, set to 1. The second distance is positively correlated with the attenuation value, and the specific relationship can be set in combination with actual needs. Wherein, the optional items in a category are similar, and the specific similarity can be determined in combination with actual needs. For example, optional items with the same meaning can be used as optional items of the same category, for example, the reason copy with the same meaning can be used as the reason copy of the same category (or the same template).

[0084] For example, a first partial sequence includes optional items belonging to categories 2, 3, and 1 in sequence. If the category of the current optional item is 1, it can be determined that the second distance is 0, and the second coefficient corresponding to the current optional item is small. If the category of the current optional item is 4, that is, the category of the optional items in the first partial sequence does not include the category of the current optional item, the second coefficient is the second preset coefficient.

[0085] The second coefficient may be obtained from a maintained attenuation dictionary, or may be calculated according to the first partial sequence when the second coefficient corresponding to the current optional item is needed. The attenuation dictionary may record the category of the optional items used in each first partial sequence of the previous object and the second coefficient corresponding to the category. After a category is used, the second coefficient will be updated. The second coefficient may be greater than or equal to 0.

[0086] For example, when the second preset coefficient is 1, and the first local sequence indicates that the category of the optional item at the current end position is the category of the current optional item, the second coefficient of the current optional item in the first local sequence can be determined to be 0.01, so as to try to ensure that the category of the current optional item will not appear next time, that is, the category of the target optional item corresponding to the current object in the target item sequence is not the category of the optional item. When the second coefficient of an optional item in a local sequence is less than 1, and the category of the optional item is not the category of the optional item that is newly selected as the object in each subsequent optional item, the coefficient is increased by 0.1 until it increases to 1.

[0087] For example, if a current option is selected as the option of the currently traversed object C, the second coefficient corresponding to the option is attenuated to 0.001. If, when selecting the option of the next object D of object C, the option of the same category as the current option is not selected, the second coefficient 0.001 can be increased by 0.1, and the updated second coefficient 0.101 is obtained.

[0088] Sub-step S1242, calculating the current score according to the first coefficient and the second coefficient.

[0089] Optionally, as a possible implementation manner, the product of the first coefficient and the second coefficient may be used as the current score of the current optional item in the first local sequence.

[0090] As another possible implementation, the current score can be calculated based on the first coefficient, the second coefficient and the initial score of the current optional item. The initial score is used to represent the quality of the current optional item. For example, the product of the first coefficient, the second coefficient and the initial score of the current optional item is used as the current score. In this way, the target item sequence can be determined by combining the quality of the optional items and the requirement that the same or similar optional items should not appear in a concentrated manner, taking into account the quality scores and diversity of the optional items.

[0091] For a current optional item and a first partial sequence, the above process is performed to obtain the current score of the current optional item under the first partial sequence. Repeat the above process to obtain the current score of the current optional item under each first partial sequence, and then obtain the current score of each current optional item under each first partial sequence.

[0092] As a possible implementation, based on the Viterbi algorithm, the first local sequence corresponding to the previous object can be obtained, and the current scores of the current options of the current object under the first local sequences can be obtained, and then the second local sequence corresponding to the current object can be obtained based on the obtained current scores. Then, the next object is updated as the current object, and the second local sequence corresponding to the current object is used as the first local sequence corresponding to the new previous object.

[0093] When obtaining the target item sequence based on the Viterbi algorithm, displayScore may be defined as the optimization target, and the iterative formula used is:

[0094]

[0095] calcDisplayScore(i,j) is used to calculate the displayScore. The calculation formula of displayScore is:

[0096] displayScore = fineRankScore × simDecayCoefficient × templateDecayCoefficient, where step represents the currently traversed object (i.e., the current object), i represents the i-th option of the current object, dp[step][i] represents the total score of the i-th local sequence corresponding to the current object, dp[step-1][j] represents the total score of the j-th local sequence corresponding to the previous object, calcDisplayScore(i,j) represents the current score of the i-th option of the current object in the j-th local sequence; fineRankScore represents the initial score of the option, simDecayCoefficient represents the first coefficient, and templateDecayCoefficient represents the second coefficient.

[0097] In this way, when iterating to the last object in the target object sequence in the above manner, at least one local sequence corresponding to the last object can be obtained. When there are multiple local sequences, the local sequence with the largest total score can be selected as the target item sequence.

[0098] Optionally, the objects in the target object sequence are sorted in descending order of object quality. Thus, by iterating from front to back using dynamic programming, better objects can be given priority and a global optimal solution can be finally obtained.

[0099] The target item sequence determination method provided in the embodiment of the present application can be applied to similar scenarios such as rearrangement and fragmentation of recommendations and rearrangement of bottom words in a frame. The following is an example of the target item sequence determination method using the scenario of rearrangement and fragmentation of recommendation reasons as an example. In this scenario, a content sequence is used as a target object sequence, and the content sequence includes multiple content to be recommended sorted from high to low in terms of content quality.

[0100] The scattering strategy used has an optimization goal, which considers both good and bad reasons and suppresses repeated display of adjacent and similar content. Because the content with the highest ranking is displayed first, in the practice of dynamic programming, the local optimal solution is expanded from front to back to ensure that better content is given priority, and finally the cycle is ended to obtain a set of global optimal solutions.

[0101] Based on the above considerations, when determining the reasons for recommending each content to be recommended, the following three factors are considered: the reason score, the similarity attenuation coefficient, and the reason template attenuation coefficient. Among them, the reason score (denoted as fineRankScore) can be determined by online feedback. The more positive the online feedback, the higher the score. The similarity attenuation coefficient (denoted as simDecayCoefficient) is calculated by the current reason copy and several neighboring copies corresponding to the current local optimal solution, and the maximum similarity is determined. Since it is hoped that the current copy is not similar to any neighboring copy, the higher the maximum similarity with the neighboring copy, the smaller the simDecayCoefficient. The reason template attenuation coefficient (denoted as templateDecayCoefficient) refers to the coefficient of the template where the current copy is located. If the template has appeared before, the coefficient will decay, and the closer the last appearance state is to the current state, the greater the attenuation and the smaller the value. A template can include multiple reasons with the same meaning. In summary, displayScore can be defined as the optimization goal, and the iterative formula is as follows:

[0102]

[0103] The displayScore can be calculated by the function calcDisplayScore(i,j). The calculation formula of displayScore is:

[0104] displayScore=fineRankScore×simDecayCoefficient×templateDecayCoefficient

[0105] Among them, simDecayCoefficient is calculated based on the maximum similarity between the current candidate reason of the current content and the reciprocal n neighboring reasons in the local optimal solution corresponding to the previous content. The value range is [0,1] and the formula is:

[0106] simDecayCoefficient=min(1,1+(0.5-maxPrevNeighborSim)×2)

[0107] Among them, maxPrevNeighborSim represents the maximum similarity between the current candidate reason and the last n neighboring reasons in the local optimal solution corresponding to the previous content.

[0108] templateDecayCoefficient can be obtained directly from the maintained template decay dictionary. The template decay dictionary records the templates used in the current local optimal solution and updates their decay coefficients. The decay coefficient of the most recently used template is 0.001 (to ensure that it will not appear again next time). The coefficients of other templates that have appeared in the loop increase by 0.1 each time, and the maximum coefficient is 1 (indicating that a certain template has never appeared in the current local optimal solution and will not decay).

[0109] Assume that the ordered content sequence of the target object sequence is: A, B, C, D...

[0110] STEP 1: Determine the ordered content sequence for which recommendation reasons need to be set, and traverse each content from front to back for the content sequence (hereinafter referred to as the traversal state, outer loop). That is, traverse the content in the order of A→B→C→D...

[0111] STEP 2: Find all candidate reasons corresponding to the current content (status). If the reason data of all candidate reasons corresponding to the current content exceeds the preset number, the initial score of each reason is sorted from large to small, and the preset number of reasons are selected as optional reasons.

[0112] STEP 3: Traverse each optional reason corresponding to the current state to find the optimal path based on the current state.

[0113] STEP 4: Fix an optional reason for the current state, traverse the local optimal solution of the previous state, calculate displayScore and iterate to obtain dp[step][i], that is, update the local optimal solution.

[0114] Among them, in STEP 3, after obtaining dp[step][i] corresponding to an optional reason of the current state, the same processing can be performed for other optional reasons of the current state.

[0115] STEP5: Update the template attenuation dictionary, the n neighboring reason documents corresponding to the current local optimal solution, and other important intermediate process information, and write them together with the local optimal solution into the dp table.

[0116] STEP6: Repeat the previous process until the outer loop ends and a complete dp table is obtained.

[0117] STEP 7: According to the dp table, reproduce the best solution from back to front and finally get the global optimal solution.

[0118] In this way, duplication of recommendation reasons for adjacent and similar content can be avoided as much as possible, and the diversity of reasons can be taken into account, and the reason coverage rate can be close to 100%.

[0119] In order to execute the corresponding steps in the above embodiments and various possible methods, an implementation method of the target item sequence determination device 200 is given below. Optionally, the target item sequence determination device 200 can adopt the above Figure 1 The device structure of the electronic device 100 is shown. Figure 7 , Figure 7 A block diagram of a target item sequence determination device 200 provided in an embodiment of the present application. It should be noted that the basic principle and technical effects of the target item sequence determination device 200 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the above-mentioned embodiments. The target item sequence determination device 200 may include: a data acquisition module 210 and a processing module 220.

[0120] The data acquisition module 210 is used to obtain at least one optional item corresponding to each object in the target object sequence.

[0121] The processing module 220 is used to traverse each of the objects, and for each current optional item of the traversed current object, obtain the current score of each current optional item according to each local sequence corresponding to the previous object, and take the maximum total score of the optional items in the target item sequence as the goal, determine each local sequence corresponding to the current object according to each current score, and select the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object in the target object sequence. Wherein, each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score.

[0122] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory 110 shown in the figure may be fixed in the operating system (OS) of the electronic device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.

[0123] An embodiment of the present application also provides a readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the target item sequence determination method is implemented.

[0124] In summary, the embodiment of the present application provides a method, device, electronic device and readable storage medium for determining a target item sequence. When obtaining at least one optional item corresponding to each of the multiple objects included in the target object sequence, the objects in the target object sequence are traversed; for each current optional item of the current object traversed, the current score of each current optional item is obtained according to each local sequence corresponding to the previous object, and the total score of each optional item in the target item sequence is maximized as the goal, and each local sequence corresponding to the current object is determined according to each current score; when obtaining each local sequence corresponding to the last object in the target object sequence, the target item sequence corresponding to the target object sequence is selected from each local sequence. Wherein, each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score. In this way, the problems occurring in the concentration of multiple identical or similar target items can be improved, so as to improve the display effect and enhance the user experience.

[0125] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.

[0126] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.

[0127] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0128] The above description is only an optional embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for determining a target item sequence, characterized in that: The method comprises: Obtain at least one optional item corresponding to each object in the target object sequence; Traversing each of the objects, for each current optional item of the traversed current object, obtaining the current score of each current optional item according to each local sequence corresponding to the previous object, and taking the maximum total score of the optional items in the target item sequence as the goal, determining each local sequence corresponding to the current object according to each current score, and selecting the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object in the target object sequence, wherein each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes the first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score; The step of obtaining the current score of each of the current optional items according to each local sequence corresponding to the previous object includes: For a current optional item traversed, for each of the first local sequences, calculating the similarity between the current optional item and each first optional item to be analyzed in the first local sequence, wherein a first distance between a position and an end position of the first optional item to be analyzed in the first local sequence is less than a preset distance; According to the calculated similarity, the target similarity is obtained; Determine, according to the target similarity, a first coefficient of the current optional item in the first local sequence, wherein the first coefficient is inversely correlated with the target similarity; The current score of the current optional item in the first local sequence is obtained according to the first coefficient, wherein the number of the current scores of the current optional item is the same as the number of the first local sequences.

2. The method according to claim 1, characterized in that Determining the first coefficient of the current optional item in the first local sequence according to the target similarity includes: Determining whether the target similarity is greater than a preset similarity; When the target similarity is greater than the preset similarity, attenuating the first preset coefficient, and using the attenuated value as the first coefficient; When the target similarity is not greater than the preset similarity, the first preset coefficient is used as the first coefficient.

3. The method according to claim 1, characterized in that The step of obtaining the current score of the current optional item in the first local sequence according to the first coefficient includes: Obtaining a second coefficient corresponding to the current optional item in the first local sequence, wherein when the category to which the current optional item belongs is not included in the category to which the optional items of the first local sequence belong, the second coefficient is a second preset coefficient; when the category to which the current optional item belongs is included in the category to which the optional items of the first local sequence belong, the second coefficient is a value obtained by attenuating the second preset coefficient based on an attenuation value, the attenuation value is inversely correlated with a second distance, and the second distance is a distance between the last occurrence position and the end position of the category to which the current optional item belongs in the category to which the optional items of the first local sequence belong; The current score is calculated based on the first coefficient and the second coefficient.

4. The method according to claim 3, characterized in that The calculating the current score according to the first coefficient and the second coefficient includes: The current score is calculated according to the first coefficient, the second coefficient and the initial score of the current optional item, wherein the initial score is used to represent the quality of the current optional item.

5. The method according to claim 1, characterized in that The obtaining of at least one optional item corresponding to each object in the target object sequence includes: For each of the objects, obtaining at least one candidate item corresponding to the object; Determining whether the number of candidate items of the at least one candidate item corresponding to the object is greater than a preset number; In the case that the number of the candidate items is greater than the preset number, selecting the optional items from the at least one candidate item, wherein the number of the selected optional items is the preset number; When the number of the candidate items is not greater than the preset number, the at least one candidate item corresponding to the object is used as the optional item corresponding to the object.

6. The method according to any one of claims 1 to 5, characterized in that: The objects in the target object sequence are sorted in descending order of object quality, and / or the target item sequence is obtained based on a dynamic programming algorithm.

7. A target item sequence determination device, characterized in that: The device comprises: A data acquisition module, used to obtain at least one optional item corresponding to each object in the target object sequence; A processing module, for traversing each of the objects, and for each current optional item of the traversed current object, obtaining a current score of each current optional item according to each local sequence corresponding to the previous object, and taking the maximum total score of the optional items in the target item sequence as the goal, determining each local sequence corresponding to the current object according to each current score, and selecting the target item sequence corresponding to the target object sequence from each local sequence corresponding to the last object in the target object sequence, wherein each local sequence corresponding to the previous object is a first local sequence, and the first local sequence includes a first optional item selected from the optional items for each of the objects before the current object, and the current score is determined according to the similarity between the current optional item and the first optional item, and the similarity is inversely correlated with the current score; Wherein, the processing module is specifically used for: for a current optional item traversed, for each of the first local sequences, calculating the similarity between the current optional item and each first optional item to be analyzed in the first local sequence, wherein the first distance between the position and the end position of the first optional item to be analyzed in the first local sequence is less than a preset distance; obtaining a target similarity based on the calculated similarity; determining a first coefficient of the current optional item in the first local sequence based on the target similarity, wherein the first coefficient is inversely correlated with the target similarity; obtaining a current score of the current optional item in the first local sequence based on the first coefficient, wherein the number of current scores of a current optional item is the same as the number of the first local sequences.

8. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the target item sequence determination method described in any one of claims 1-6.

9. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for determining a target item sequence as described in any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Object recommendation method, apparatus, medium, and equipment

    CN109101563A

  • Method and device for determining recommendation object

    CN110111167A