Activity sequencing method and apparatus
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2022-08-10
- Publication Date
- 2026-08-07
AI Technical Summary
[0003]随着支付客户端合作银行不断增多、营销活动种类不断增多,现有排序算法固化了各个排序因子,无法满足后续快速迭代,新增或者修改一种排序算法适配新活动种类,都需要改造与重新开发,涉及开发与测试回归工作量都很大,无法实现排序算法的快速开发与迭代
[0023]本说明书一个实施例实现了一种活动排序方法及装置,其中,该方法包括确定目标对象的待展示活动集合,以及所述待展示活动集合对应的目标项目的排序规则;解析所述排序规则,获得排序节点,并根据所述排序节点生成预设格式的字符串;根据代码动态配置管理组件将所述字符串生成排序树,并根据所述排序树对所述待展示活动集合中的待展示活动进行排序。
Smart Images

Figure CN115220732B_ABST
Abstract
Description
Technical Field
[0001] The embodiments in this specification relate to the field of computer technology, and in particular to an activity sorting method. Background Technology
[0002] Bank marketing campaigns are a product of collaboration between banks and payment clients, reaching users directly to their devices. These campaigns attract users to link specific bank cards and encourage them to make payments using those cards. For payment clients, this increases card linking, transaction volume, and user engagement. For banks, it boosts card activity and cash flow. Both banks and payment clients can achieve a win-win situation through these marketing campaigns. Currently, multiple bank marketing campaigns are displayed in various scenarios on payment clients (such as utility bill payments and mobile phone top-ups), raising the issue of the order in which these campaigns are displayed.
[0003] As the number of banks partnering with payment clients continues to increase and the types of marketing activities become more diverse, the existing ranking algorithms have fixed various ranking factors, which cannot meet the needs of rapid iteration. Adding or modifying a ranking algorithm to adapt to new types of activities requires transformation and redevelopment, which involves a large amount of development, testing, and regression work, making it impossible to achieve rapid development and iteration of ranking algorithms.
[0004] Of course, the same technical issues also apply to the disclosure of product marketing activities between merchants and product sales platforms, or between other target groups and their partner platforms. Summary of the Invention
[0005] In view of this, embodiments of this specification provide an active sorting method. One or more embodiments of this specification also relate to an active sorting apparatus, an active sorting system, a computing device, a computer-readable storage medium, and a computer program, to address the technical deficiencies existing in the prior art.
[0006] According to a first aspect of the embodiments of this specification, an activity sorting method is provided, comprising:
[0007] Determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed;
[0008] The sorting rules are parsed to obtain sorting nodes, and a string in a preset format is generated based on the sorting nodes;
[0009] The code dynamic configuration management component generates a sorting tree from the string and sorts the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0010] According to a second aspect of the embodiments of this specification, an active sorting apparatus is provided, comprising:
[0011] The determination module is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed;
[0012] The generation module is configured to parse the sorting rules, obtain sorting nodes, and generate a string in a preset format based on the sorting nodes;
[0013] The sorting module is configured to generate a sorting tree from the string based on the code-driven configuration management component, and to sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0014] According to a third aspect of the embodiments of this specification, an active sorting apparatus is provided, comprising:
[0015] The determination module is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed;
[0016] The generation module is configured to parse the sorting rules, obtain sorting nodes, and generate a string in a preset format based on the sorting nodes;
[0017] The sorting module is configured to generate a sorting tree from the string based on the code-driven configuration management component, and to sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0018] According to a fourth aspect of the embodiments of this specification, a computing device is provided, comprising:
[0019] Memory and processor;
[0020] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the above-described activity sorting method.
[0021] According to a fifth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions that, when executed by a processor, implement the steps of the above-described activity sorting method.
[0022] According to a sixth aspect of the embodiments of this specification, a computer program is provided, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described activity sorting method.
[0023] One embodiment of this specification implements an activity sorting method and apparatus. The method includes determining a set of activities to be displayed for a target object, and a sorting rule for the target items corresponding to the set of activities to be displayed; parsing the sorting rule to obtain sorting nodes, and generating a string in a preset format based on the sorting nodes; generating a sorting tree from the string using a code dynamic configuration management component, and sorting the activities to be displayed in the set of activities to be displayed based on the sorting tree.
[0024] Specifically, the activity sorting method parses the sorting rules to obtain sorting nodes, and then combines the sorting nodes into a tree structure according to preset requirements. The sorting tree is then generated by the code dynamic configuration management component and pushed out in the form of a string in a preset format. This allows the activity to be sorted quickly through the sorting tree. Furthermore, the sorting tree is configurable through the code dynamic configuration management component, and online modifications take effect immediately without the need for online code changes. In the future, when it is necessary to adjust the tree structure of the sorting tree, rapid iterative adjustments can be made. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of an activity sorting system provided in one embodiment of this specification;
[0026] Figure 2 This is a flowchart illustrating an activity sorting method provided in one embodiment of this specification;
[0027] Figure 3 This is a schematic diagram of a tree structure in an active sorting method provided in one embodiment of this specification;
[0028] Figure 4 This is a flowchart illustrating the processing procedure of an activity sorting method provided in one embodiment of this specification;
[0029] Figure 5 This is a schematic diagram of the structure of an active sorting device provided in one embodiment of this specification;
[0030] Figure 6 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0031] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0032] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0033] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0034] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0035] Bank marketing campaigns: Payment clients that partner with banks display various bank card-binding bonuses, payment discounts, and other promotions to users. These bank marketing campaigns can guide users to bind their bank cards to the payment client and use their bank cards for payments and purchases.
[0036] Sort tree: Each sorting method is abstracted into a node, and then the nodes are combined into a tree structure, forming the overall sort tree.
[0037] Leaf node: A node in a sorted tree that has no child nodes is called a leaf node.
[0038] DRM: Distributed Resource Management, a type of middleware that enables dynamic configuration management of business code.
[0039] In practical applications, activities ranked higher in the search results tend to attract more user attention and have a higher click-through rate. However, determining the overall order of activities—which activities come first and which come last—to maximize the overall click-through rate requires a ranking algorithm. Existing ranking algorithms, however, have fixed ranking factors, making them unsuitable for rapid iteration. Adding or modifying ranking requirements, or adapting the algorithm to new activity types, necessitates modifying and redeveloping existing algorithms, resulting in significant development, testing, and regression testing workloads.
[0040] For example, traditional sorting is based on specific sorting factors, such as the face value of promotional offers, the time a user has bound this type of bank card, or manual placement, and is a fixed combination of one or more sorting factors. For instance, if a sorting rule is currently formed by combining X sorting factors, changing this combination scheme in the future requires code changes, testing to ensure no problems, and then going live, which is costly in terms of manpower and time and slow to take effect.
[0041] Machine learning ranking, which uses machine learning algorithms to rank activities—for example, building an algorithm model to identify users' preference for using a certain bank card for payment and prioritizing activities using that bank card—is problematic. This approach suffers from high algorithmic model complexity, difficulty in controlling model training time and accuracy, and incompatibility with changes in ranking factors (such as changing from user preference to discount amount). The algorithm needs to be relearned or may become unusable, resulting in high change costs and poor performance.
[0042] Based on this, an active sorting method is provided in this specification. One or more embodiments of this specification also relate to an active sorting apparatus, an active sorting system, a computing device, a computer-readable storage medium, and a computer program, which will be described in detail in the following embodiments.
[0043] See Figure 1 , Figure 1 A schematic diagram of an activity sorting system provided according to an embodiment of this specification is shown.
[0044] Specifically, the activity sorting system provided in this embodiment includes a terminal 102 and a server 104, wherein:
[0045] The terminal 102 is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed.
[0046] The sorting rules are parsed to obtain sorting nodes, and a string in a preset format is generated based on the sorting nodes.
[0047] The string is pushed to the server 104 by calling the code dynamic configuration management component;
[0048] The server 104 is configured to parse the string, generate a sorting tree, and send the sorting tree to the terminal 102.
[0049] The terminal 102 is also configured to sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0050] In this context, the target audience can be understood as banks, merchants, enterprises, etc.; the activities to be displayed can be understood as marketing activities that the target audience will showcase through a partner platform (such as a payment platform, a product sales platform, or a recruitment platform). For example, if the target audience is a bank, the activities to be displayed could be understood as card-binding activities, payment discount activities, etc. If the target audience is a merchant, the activities to be displayed could be understood as product discount activities, promotional activities, etc. The specific implementation of the embodiments in this specification is relative to the partner platform side of the target audience. For example, the bank's partner platform, the payment platform, will sort the marketing activities of various banks according to the activity sorting method provided in the embodiments of this specification and then expose them to the corresponding target users, achieving a win-win situation.
[0051] Furthermore, the default format can be understood as a hierarchical JOSN format; the code dynamic configuration management component can be understood as a DRM component.
[0052] This article will provide a detailed introduction using the example of a bank as the target audience and a bank marketing campaign as the activity to be showcased.
[0053] In specific implementation, terminal 102 receives or obtains one or more bank marketing activities to be displayed to users, as well as the sorting rules of the target items corresponding to the bank marketing activities (such as utility payment items or mobile phone recharge items on the payment platform, i.e., the items to be displayed in the bank marketing activities). For example, the sorting rules are as follows: the marketing activities are first displayed according to the user's card binding time, and then the card-binding activities are sorted in reverse order according to the user's card binding time, that is, the activities corresponding to the most recently bound cards are sorted first. Next, the activities for those without cards are sorted according to the amount of the discount, and those with the same discount amount are sorted in reverse order according to the activity time.
[0054] Terminal 102 parses the sorting rule to obtain sorting nodes. For example, if four sorting nodes are obtained: whether a card has been bound, the card binding time, the discount amount, and the activity time, then the obtained sorting nodes are combined into a tree structure according to the product requirements and application scenarios of the target project. A JSON string is then generated according to this tree structure. Finally, the DRM component is called to push this JSON string to server 104.
[0055] After receiving the JSON string, server 104 parses the JSON string using parsing code, generates a corresponding sorting tree based on the parsing result, and returns the sorting tree to terminal 102. Terminal 102 can then sort multiple bank marketing activities based on the sorting tree.
[0056] In another implementation, terminal 102 can send multiple bank marketing activities to be sorted to server 104. Server 104 can then sort the multiple bank marketing activities according to the generated sorting tree and return the final sorting result to terminal 102. The specific implementation is as follows:
[0057] The server 104 is also configured as follows:
[0058] The terminal 102 receives the set of activities to be displayed and sorts the activities in the set of activities to be displayed according to the sorting tree.
[0059] The activity sorting system provided in this specification abstracts sorting rules into sorting nodes, and then combines sorting nodes into a sorting tree. This tree structure enables the sorting algorithm for bank marketing activities to be rapidly expanded, with no coupling between sorting factors. Furthermore, through DRM push, online modifications to the sorting tree take effect in real time, enabling rapid development and agile iteration of the sorting algorithm.
[0060] See Figure 2 , Figure 2 A flowchart of an activity sorting method according to an embodiment of this specification is shown, which specifically includes the following steps.
[0061] Step 202: Determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed.
[0062] Specifically, this activity sorting method can be applied to the terminal side of the activity sorting system described in the above embodiments. However, the actual application scenarios and target objects of this activity sorting method vary; for example, if the activity sorting method is applied to the sorting scenario of bank marketing activities, the target object can be understood as the bank; if the activity sorting method is applied to the sorting scenario of product marketing activities, the target object can be understood as the merchant.
[0063] When the target audience is a bank, the set of activities to be displayed can be understood as a collection of bank marketing activities, such as payment promotions and discount activities. When the target audience is a merchant, the set of activities to be displayed can be understood as a collection of product marketing activities, such as discount promotions and promotions. The target projects can be understood as the projects within the set of activities to be displayed that are yet to be shown, such as utility bill payment projects or mobile phone top-up projects on payment platforms partnered with banks; or fresh produce projects or top-up center projects on product sales platforms partnered with merchants.
[0064] For ease of understanding, the following examples all use banks as the target and bank marketing activities as examples for detailed explanation.
[0065] In specific implementation, determining the set of activities to be displayed for the target objects, and the sorting rules for the target items corresponding to the set of activities to be displayed, can be understood as follows: the payment platform terminal cooperating with the bank receives or obtains a set of bank marketing activities from one or more banks, and the sorting rules for the target items corresponding to the set of bank marketing activities. For example, the sorting rules for utility payment items are as follows: first, activities are displayed according to the user's already bound card; then, activities with bound cards are sorted in reverse order of the user's card binding time, that is, activities corresponding to the most recently bound card are sorted first; second, activities without bound cards are sorted according to the amount of the discount; and activities with the same discount amount are sorted in reverse order of the activity time, etc.
[0066] In practical applications, the target projects corresponding to the set of activities to be displayed are different, and the sorting rules set for the target projects for the set of activities to be displayed are also different. The specific settings are based on the actual application, and the embodiments in this specification do not impose any limitations on this.
[0067] Step 204: Parse the sorting rules to obtain sorting nodes, and generate a string in a preset format based on the sorting nodes.
[0068] Specifically, after determining the sorting rule, it can be parsed to obtain the sorting node corresponding to the rule. Then, a string with a preset format is generated based on the sorting node. Subsequently, a corresponding sorting tree can be generated based on this string to sort multiple bank marketing activities. The specific implementation method is as follows:
[0069] The step of generating a string in a preset format based on the sorting nodes includes:
[0070] The sorted nodes are combined into a tree structure according to preset requirements, and the root node, child nodes and / or leaf nodes of the tree structure are determined.
[0071] A string in a preset format is generated based on the hierarchical relationship of the root node, the child nodes, and / or the leaf nodes in the tree structure.
[0072] The preset requirements can be set according to the product design and application scenarios of the target project, and this specification does not impose any limitations on them. Continuing with the previous example, the preset requirements can be: using the sorting node "whether the card has been bound" as the first-level node, the sorting node "card binding time and discount amount" as the second-level node, and the sorting node "activity time" as the third-level node.
[0073] Furthermore, the root node, child nodes, and / or leaf nodes of a tree structure can be understood as the root node and child nodes of the tree structure; the root node and leaf nodes of the tree structure; the root node, child nodes, and leaf nodes of the tree structure; for example, the root node can be understood as the first-level node of the tree structure, the child node can be understood as the second-level node of the tree structure associated with the root node, and the leaf node can be understood as the third-level node of the tree structure associated with the child node, and the leaf node does not have a lower-level child node.
[0074] Specifically, based on the preset requirements, the sorted nodes are combined into a tree structure, and the root node, child nodes, and / or leaf nodes of the tree structure are determined; and based on the hierarchical relationship of the root node, child nodes, and / or leaf nodes in the tree structure, a string in a preset format is generated.
[0075] See Figure 3 , Figure 3 A schematic diagram of a tree structure in an active sorting method provided according to an embodiment of this specification is shown.
[0076] Continuing with the previous example, after combining the sorting structure into a tree structure according to the preset requirements, see the schematic diagram of the tree structure. Figure 3 In this tree structure, the sorting node "whether the card has been bound" is the root node of the first level, the sorting nodes "card binding time sorting, discount amount sorting" are the child nodes of the second level, and the sorting node "activity time sorting" is the leaf node of the third level.
[0077] After determining the root node, child nodes, and leaf nodes of the tree structure, a pre-formatted string with a hierarchical relationship, such as a JOIN string, can be generated based on the hierarchical relationship of the root node, child nodes, and leaf nodes in the tree structure. Subsequently, a sorting tree that enables quicksort of the activities can be generated based on this JOIN string.
[0078] In practical applications, the JSON string refers to the JSON object itself. Because JavaScript is a weakly typed language, it cannot directly transmit objects or arrays. Therefore, the JSON format string was introduced for data transmission. In the embodiments of this specification, the corresponding JSON string can be output based on the hierarchical relationship between the root node and leaf nodes of the tree structure, which is used by the server for identification, parsing, and generation of the sorted tree. Of course, in other coding language environments, the string corresponding to that coding language environment can also be output based on the hierarchical relationship between the root node, child nodes, and leaf nodes of the tree structure; this embodiment of the specification does not impose any limitations on this.
[0079] Step 206: Generate a sorting tree from the string using the code dynamic configuration management component, and sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0080] Specifically, after generating the corresponding string based on the sorting node, the string can be used by the code dynamic configuration management component to generate a sorting tree for subsequent activity sorting. This code dynamic configuration management component can be understood as the DRM component described in the above embodiment, enabling dynamic configuration management of business code. That is, during code execution, the tree structure can be pushed in real time to generate a sorting tree, thereby quickly implementing activity sorting changes without modifying the online code. The specific implementation method is as follows:
[0081] The step of generating a sorted tree from the string based on the code dynamic configuration management component includes:
[0082] The string is pushed to the server by calling the code dynamic configuration management component, and the sorting tree generated and returned by the server after parsing the string is received.
[0083] The code dynamic configuration management component can be deployed on local terminals, remote terminals, or servers.
[0084] In practical applications, the terminal pushes a string to the server by calling the DRM component. After receiving the string, the server parses it using parsing code and generates a corresponding sorting tree based on the parsing results, and then returns the sorting tree to the terminal. After receiving the sorting tree generated by the server after parsing the string, the terminal can sort the activities to be displayed according to the sorting tree.
[0085] In practice, since the sorting tree is a tree structure, and a tree structure includes multiple levels, the process of sorting the activities to be displayed according to the sorting tree involves traversing the tree level by level. The final sorting process is then accurately completed based on the traversal results. The specific implementation method is as follows:
[0086] The step of sorting the activities to be displayed in the set of activities to be displayed according to the sorting tree includes:
[0087] The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and a hierarchical traversal is performed in the sorting tree. The activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
[0088] In practical applications, there may be multiple activities to be displayed. Therefore, each level of the sorting tree may contain multiple activities to be displayed. To ensure that the sorting of activities at each level is simple and fast, and to prevent sorting errors, a queue or stack structure can be used to implement the hierarchical traversal of the activities in the sorting tree. The specific implementation method is as follows:
[0089] The step of inputting the activities to be displayed from the set of activities to be displayed into the sorting tree, performing a hierarchical traversal in the sorting tree, and sorting the activities to be displayed from the set of activities to be displayed according to the traversal results includes:
[0090] Input the activities to be displayed from the set of activities to be displayed into the sorting tree;
[0091] Based on the queue structure or stack structure, a hierarchical traversal is performed in the sorting tree, and the activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
[0092] Specifically, the sorting tree is generated from the string output by a hierarchical tree structure. Therefore, the structure of this sorting tree is the same as that of a tree structure composed of sorted nodes, both including a root node, child nodes, and leaf nodes. When traversing the activities to be displayed according to this sorting tree, the process first traverses the root node, and then traverses the child nodes sequentially according to their levels, thus accurately and quickly sorting the activities to be displayed. The specific implementation method is as follows:
[0093] The sorting tree includes a root node and child nodes;
[0094] Accordingly, the step of inputting the activities to be displayed from the set of activities to be displayed into the sorting tree, performing a hierarchical traversal in the sorting tree, and sorting the activities to be displayed from the set of activities to be displayed according to the traversal results includes:
[0095] The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and the root node of the sorting tree is traversed.
[0096] If the root node is determined to be a branch node, the activities to be displayed in the set of activities to be displayed are branched to the child nodes of the sorting tree for traversal, and the activities to be displayed corresponding to the child nodes are obtained.
[0097] The activities to be displayed corresponding to the child nodes are sorted according to the sorting rules.
[0098] See also Figure 3 ,by Figure 3In this context, "whether a card has been bound" is the root node a, and "card binding time sorting and discount amount sorting" are the child nodes b and c.
[0099] First, input the activities to be displayed from the set of activities to be displayed into a sorting tree. Traverse the root node 'a' of the sorting tree. If it is determined that the root node 'a' is a splitting node, split the activities to be displayed from the set of activities to be displayed to child nodes 'b' and 'c'. After traversing child nodes 'b' and 'c', obtain the activities to be displayed corresponding to child node 'b' and child node 'c'. Finally, sort the activities to be displayed corresponding to child node 'b' according to the sorting rules corresponding to child node 'b'. Similarly, sort the activities to be displayed corresponding to child node 'c' according to the sorting rules corresponding to child node 'c'.
[0100] In the embodiments of this specification, after receiving the generated sorting tree, the activities to be displayed in the set of activities to be displayed are input into the sorting tree. The activities to be displayed are sorted hierarchically by the root node and child nodes of the sorting tree. This tree structure sorting method improves the sorting efficiency and accuracy of the activities to be displayed.
[0101] Of course, in practical applications, child nodes may have corresponding leaf nodes. In such cases, the activities to be displayed, sorted by child nodes, will also flow into the corresponding leaf nodes. Based on the sorting rules of the leaf nodes, their order will be updated to further ensure the accuracy of the sorting of the activities to be displayed. The specific implementation method is as follows:
[0102] The sorting tree also includes leaf nodes;
[0103] Accordingly, after sorting the activities to be displayed corresponding to the child nodes according to the sorting rules corresponding to the child nodes, the process further includes:
[0104] If a child node has a corresponding leaf node and the child node is not the branching node, the order of the activities to be displayed corresponding to the child node is updated according to the leaf node corresponding to the child node.
[0105] Continuing with the previous example, if child node c has a corresponding leaf node d, after sorting the activities to be displayed according to child node c, we enter leaf node d for traversal. Leaf node d will update the order of the activities to be displayed according to its own sorting rules to ensure the accuracy of the sorting of the activities to be displayed corresponding to leaf node d.
[0106] If the root node is not a branch node, the activities to be displayed can be sorted directly according to the sorting rules corresponding to the root node. The specific implementation method is as follows:
[0107] The step of inputting the activities to be displayed from the set of activities to be displayed into the sorting tree, and traversing the root node of the sorting tree, further includes:
[0108] If it is determined that the root node is not a branch node, the activities to be displayed in the set of activities to be displayed are sorted according to the sorting rules corresponding to the root node.
[0109] For example, if the root node is node b in the above embodiment, then the activities to be displayed in the set of activities to be displayed can be sorted directly according to the sorting rule "card binding time sorting" corresponding to node b. If node b has a lower-level child node, then the activities to be displayed with the same card binding time need to be sorted again according to the sorting rule corresponding to the lower-level child node.
[0110] Similarly, this splitting node solution also applies to child nodes. That is, child nodes may also have splitting situations. If a child node in the sorting tree has a splitting situation, the processing method of the root node can be referred to to achieve accurate sorting of the activities to be displayed.
[0111] Still with Figure 3 Taking this as an example, we will provide a detailed introduction to the traversal process of the collection of activities to be displayed in the sorting tree.
[0112] First, the set of activities to be displayed is input into a sorting tree. At this point, the root node 'a' (whether a card has been bound) enters the queue. If the queue is not empty, the head of the queue is dequeued, i.e., 'a' is dequeued. The sorting rule of node 'a' is executed: based on whether the user has bound a card, the activities to be displayed in the set are distributed to child nodes 'b' and 'c'. At this point, child nodes 'b' and 'c' enter the queue, and child node 'b' is dequeued. The sorting rule of child node 'b' is executed: sorted according to the card binding time. The activity priority of each activity to be displayed in child node 'b' can be set as follows: priority level << 32 + sorting result. For example, if the activity sorting results i, ii, and iii of the activities to be displayed all have a priority level of 1, then the activity priorities of the activities to be displayed are 1<<32+2, 1<<32+1, and 1<<32+0. In practical applications, in addition to calculating the numerical value (priority level <<32 + sorting result), the activity priority setting of the activities to be displayed corresponding to this child node can also be directly sorted from high to low according to the priority level of the child nodes. That is, the activity list corresponding to the child node with the higher priority level is given priority, and the activities in each list are output in order without numerical calculation.
[0113] After child node b is executed, child node c is removed from the list, and the sorting rule for child node c is executed: sorted by discount amount. The activity priority of each activity to be displayed in child node c can be referred to the method of child node b, and will not be repeated here. For example, the activity priority of each activity to be displayed in the list of activities to be displayed can be calculated according to the above calculation method, and then sorted according to the activity priority of each activity to be displayed. Alternatively, it can be sorted directly according to the node priority of each child node. For example, if the node priority of child node b is 1 and the node priority of child node c is 2, then it can be determined that the activity list corresponding to child node c is ranked before the activity list of child node b. Therefore, the sorted activities to be displayed in the activity list corresponding to child node c are also ranked before the sorted activities to be displayed in the activity list corresponding to child node b.
[0114] Then, leaf node d enters the queue, leaf node d is dequeued, and the sorting rule of leaf node d is executed: sort according to the activity time and calculate the activity priority; specifically, the activities to be displayed in the activity list corresponding to child node c are sorted and then updated in order according to the sorting rule of leaf node d, that is, "activities to be displayed with the same discount are sorted in reverse order of activity time".
[0115] Finally, the marketing activities are sorted from highest to lowest priority value, with the highest value listed first, thus completing the marketing activity sorting process.
[0116] The activity sorting method provided in this specification parses the sorting rules to obtain sorting nodes, and combines the sorting nodes into a tree structure according to preset requirements. The sorting tree is then generated by the code dynamic configuration management component and pushed out in the form of a string in a preset format. This allows activities to be sorted quickly through the sorting tree. Furthermore, the sorting tree is configurable through the code dynamic configuration management component, and online modifications take effect immediately without the need for online code changes. When the tree structure of the sorting tree needs to be adjusted in the future, rapid iterative adjustments can be made.
[0117] Furthermore, after sorting the activities to be displayed in the set of activities to be displayed, when a target user triggers an action on a target item, the corresponding activities to be displayed can be recommended to that target user in sequence, improving the user experience. The specific implementation method is as follows:
[0118] After sorting the activities to be displayed in the set of activities to be displayed according to the sorting tree, the method further includes:
[0119] If the target user's triggered action on the target project is determined, the user attribute information of the target user is obtained;
[0120] Based on the user attribute information, determine the association between the target user and the target object;
[0121] Based on the association and the sorting tree, a list of activities to be displayed corresponding to the target user is determined.
[0122] Furthermore, after determining the list of activities to be displayed corresponding to the target users, these activities can be presented to the target users in sequence to improve their exposure and conversion rates. The specific implementation method is as follows:
[0123] After determining the list of activities to be displayed corresponding to the target user, the method further includes:
[0124] The activities to be displayed in the activity list corresponding to the target user are recommended and displayed to the target user in order.
[0125] The following is in conjunction with the appendix Figure 4 Taking the application of the activity sorting method provided in this specification in the sorting scenario of bank marketing activities as an example, the activity sorting method will be further explained. Among them, Figure 4 The present specification shows a flowchart of an activity sorting method according to an embodiment, which includes the following steps.
[0126] Step 402: The sorting method is abstracted into atomic tree nodes.
[0127] The sorting method can be understood as the sorting rules in the above embodiments; the tree node can be understood as the sorting node in the above embodiments.
[0128] Specifically, abstracting the sorting method into atomic tree nodes can be understood as analyzing the sorting rules and determining the corresponding sorting nodes.
[0129] Step 404: Combine the sorting tree nodes into a sorting tree according to the marketing scenario.
[0130] Specifically, combining tree nodes into a sorted tree based on the marketing scenario can be understood as combining tree nodes into a tree structure based on the marketing scenario, then calling the DRM component to push the tree structure to the server to generate the sorted tree, and then receiving the sorted tree generated by the server.
[0131] Step 406: The activity list is traversed through the sorted tree.
[0132] The activity list includes several bank marketing campaigns that are yet to be sorted.
[0133] Specifically, the activity list enters the sorting tree for traversal. This can be understood as multiple bank marketing activities in the activity list entering the sorting tree and being sorted after passing through each node in the sorting tree.
[0134] Step 408: Each node processes the corresponding activity list.
[0135] Specifically, once the activity list enters the sorting tree, each node in the sorting tree processes its corresponding activity list. The following steps provide a detailed explanation of the specific implementation methods at each node of the sorting tree after the activity list enters the sorting tree.
[0136] Step 410: Determine whether to perform traffic splitting. If yes, proceed to step 412; otherwise, proceed to step 416.
[0137] Specifically, when the activity list enters the sorting tree, at each node of the sorting tree, it is necessary to determine whether the node needs to be split. If so, the node splitting is performed, and each node processes the corresponding activity list. After the processing is completed, it continues to return to step 408 to process the next node, until all nodes have been traversed and the process ends. If not, the sorting process is performed, that is, the bank marketing activities in the activity list are sorted according to the sorting rules corresponding to the node.
[0138] Step 412: Node traffic splitting.
[0139] Step 414: Pass the activity list to other child nodes.
[0140] Step 416: Perform sorting.
[0141] Step 418: Determine if it is a leaf node. If yes, proceed to step 420; otherwise, proceed to step 414.
[0142] After traversing the node, it is necessary to determine whether the node is a leaf node. If it is, it means that there is no next child node under the node, so the priority of each activity is calculated and sorted. If not, it means that there is a next child node under the node. At this time, the activity list corresponding to the next node is processed. After processing is completed, it continues to return to step 408 to process the next node until all nodes have been traversed and the process ends.
[0143] Step 420: Calculate the priority of each activity.
[0144] Step 422: Sort the activity list in ascending order of activity priority from highest to lowest.
[0145] The activity sorting method provided in this specification is applied to the sorting scenario of bank marketing activities. By parsing the sorting method, tree nodes are obtained, and the tree nodes are combined into a tree structure according to the marketing scenario. The sorting tree is then generated by the code dynamic configuration management component through a preset format string. This allows bank marketing activities to be quickly sorted through the sorting tree. Furthermore, the sorting tree is configurable through the code dynamic configuration management component, and online modifications take effect immediately without the need for online code changes. When the tree structure of the sorting tree needs to be adjusted in the future, rapid iterative adjustments can be achieved.
[0146] Corresponding to the above method embodiments, this specification also provides embodiments of an active sorting device. Figure 5 A schematic diagram of an active sorting device according to one embodiment of this specification is shown. Figure 5 As shown, the device includes:
[0147] The determination module 502 is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed;
[0148] The generation module 504 is configured to parse the sorting rules, obtain sorting nodes, and generate a string in a preset format based on the sorting nodes;
[0149] The sorting module 506 is configured to generate a sorting tree from the string based on the code dynamic configuration management component, and sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
[0150] Optionally, the generation module 504 is further configured to:
[0151] The sorted nodes are combined into a tree structure according to preset requirements, and the root node, child nodes and / or leaf nodes of the tree structure are determined.
[0152] A string in a preset format is generated based on the hierarchical relationship of the root node, the child nodes, and / or the leaf nodes in the tree structure.
[0153] Optionally, the sorting module 506 is further configured to:
[0154] The string is pushed to the server by calling the code dynamic configuration management component, and the sorting tree generated and returned by the server after parsing the string is received.
[0155] Optionally, the sorting module 506 is further configured to:
[0156] The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and a hierarchical traversal is performed in the sorting tree. The activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
[0157] Optionally, the sorting module 506 is further configured to:
[0158] Input the activities to be displayed from the set of activities to be displayed into the sorting tree;
[0159] Based on the queue structure or stack structure, a hierarchical traversal is performed in the sorting tree, and the activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
[0160] Optionally, the sorting tree includes a root node and child nodes;
[0161] Accordingly, the sorting module 506 is further configured as follows:
[0162] The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and the root node of the sorting tree is traversed.
[0163] If the root node is determined to be a branch node, the activities to be displayed in the set of activities to be displayed are branched to the child nodes of the sorting tree for traversal, and the activities to be displayed corresponding to the child nodes are obtained.
[0164] The activities to be displayed corresponding to the child nodes are sorted according to the sorting rules.
[0165] Optionally, the sorting tree also includes leaf nodes;
[0166] Accordingly, the device further includes:
[0167] The sorting update module is configured as follows:
[0168] If a child node has a corresponding leaf node and the child node is not the branching node, the order of the activities to be displayed corresponding to the child node is updated according to the leaf node corresponding to the child node.
[0169] Optionally, the device further includes:
[0170] The traffic splitting module is configured as follows:
[0171] If it is determined that the root node is not a branch node, the activities to be displayed in the set of activities to be displayed are sorted according to the sorting rules corresponding to the root node.
[0172] Optionally, the device further includes:
[0173] The user display module is configured as follows:
[0174] If the target user's triggered action on the target project is determined, the user attribute information of the target user is obtained;
[0175] Based on the user attribute information, determine the association between the target user and the target object;
[0176] Based on the association and the sorting tree, a list of activities to be displayed corresponding to the target user is determined.
[0177] Optionally, the device further includes:
[0178] The recommendation module is configured as follows:
[0179] The activities to be displayed in the activity list corresponding to the target user are recommended and displayed to the target user in order.
[0180] The activity sorting device provided in this embodiment parses the sorting rules to obtain sorting nodes, and combines the sorting nodes into a tree structure according to preset requirements. The sorting tree is then generated by the code dynamic configuration management component through a preset format string, enabling activities to be quickly sorted through the sorting tree. Furthermore, the sorting tree is configurable through the code dynamic configuration management component, and online modifications take effect immediately without the need for online code changes. When the tree structure of the sorting tree needs to be adjusted in the future, rapid iterative adjustments can be achieved.
[0181] The above is a schematic scheme of an active sorting device according to this embodiment. It should be noted that the technical solution of this active sorting device and the technical solution of the active sorting method described above belong to the same concept. For details not described in detail in the technical solution of the active sorting device, please refer to the description of the technical solution of the active sorting method described above.
[0182] Figure 6 A structural block diagram of a computing device 600 according to one embodiment of this specification is shown. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.
[0183] The computing device 600 also includes an access device 640, which enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0184] In one embodiment of this specification, the above-described components of the computing device 600 and Figure 6 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 6 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0185] The computing device 600 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 600 can also be a mobile or stationary server.
[0186] The processor 620 is configured to execute the following computer-executable instructions, which, when executed by the processor, implement the steps of the above-described activity sorting method.
[0187] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the activity sorting method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the activity sorting method described above.
[0188] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the above-described activity sorting method.
[0189] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the above-described active sorting method belong to the same concept. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described active sorting method.
[0190] An embodiment of this specification also provides a computer program, wherein when the computer program is executed in a computer, it causes the computer to perform the steps of the above-described activity sorting method.
[0191] The above is an illustrative example of a computer program according to this embodiment. It should be noted that the technical solution of this computer program and the technical solution of the activity sorting method described above belong to the same concept. Details not described in detail in the technical solution of the computer program can be found in the description of the technical solution of the activity sorting method described above.
[0192] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0193] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0194] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0195] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0196] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. An activity sorting method, comprising: Determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed; The sorting rules are parsed to obtain sorting nodes, and a string in a preset format is generated based on the sorting nodes. The generation of the string includes: combining the sorting nodes into a tree structure according to preset requirements, determining the root node, child nodes, and / or leaf nodes of the tree structure, and generating the string based on the hierarchical relationship of the root node, the child nodes, and / or the leaf nodes in the tree structure. The code dynamic configuration management component generates a sorting tree from the string and sorts the activities to be displayed in the set of activities to be displayed according to the sorting tree.
2. The activity sorting method according to claim 1, wherein generating a sorting tree from the string based on the code dynamic configuration management component includes: The string is pushed to the server by calling the code dynamic configuration management component, and the sorting tree generated and returned by the server after parsing the string is received.
3. The activity sorting method according to claim 1, wherein sorting the activities to be displayed in the set of activities to be displayed according to the sorting tree includes: The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and a hierarchical traversal is performed in the sorting tree. The activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
4. The activity sorting method according to claim 3, wherein the step of inputting the activities to be displayed from the set of activities to be displayed into the sorting tree, performing a hierarchical traversal in the sorting tree, and sorting the activities to be displayed from the set of activities to be displayed according to the traversal results includes: Input the activities to be displayed from the set of activities to be displayed into the sorting tree; Based on the queue structure or stack structure, a hierarchical traversal is performed in the sorting tree, and the activities to be displayed in the set of activities to be displayed are sorted according to the traversal results.
5. The activity sorting method according to claim 3, wherein the sorting tree includes a root node and child nodes; Accordingly, the step of inputting the activities to be displayed from the set of activities to be displayed into the sorting tree, performing a hierarchical traversal in the sorting tree, and sorting the activities to be displayed from the set of activities to be displayed according to the traversal results includes: The activities to be displayed in the set of activities to be displayed are input into the sorting tree, and the root node of the sorting tree is traversed. If the root node is determined to be a branch node, the activities to be displayed in the set of activities to be displayed are branched to the child nodes of the sorting tree for traversal, and the activities to be displayed corresponding to the child nodes are obtained. The activities to be displayed corresponding to the child nodes are sorted according to the sorting rules.
6. The activity sorting method according to claim 5, wherein the sorting tree further includes leaf nodes; Accordingly, after sorting the activities to be displayed corresponding to the child nodes according to the sorting rules corresponding to the child nodes, the process further includes: If a child node has a corresponding leaf node and the child node is not the branching node, the order of the activities to be displayed corresponding to the child node is updated according to the leaf node corresponding to the child node.
7. The activity sorting method according to claim 5, further comprising, after inputting the activities to be displayed from the set of activities to be displayed into the sorting tree and traversing the root node of the sorting tree: If it is determined that the root node is not a branch node, the activities to be displayed in the set of activities to be displayed are sorted according to the sorting rules corresponding to the root node.
8. The activity sorting method according to claim 1, further comprising, after sorting the activities to be displayed in the set of activities to be displayed according to the sorting tree: If the target user's triggered action on the target project is determined, the user attribute information of the target user is obtained; Based on the user attribute information, determine the association between the target user and the target object; Based on the association and the sorting tree, a list of activities to be displayed corresponding to the target user is determined.
9. An active sorting device, comprising: The determination module is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed; The generation module is configured to parse the sorting rules, obtain sorting nodes, and generate a string in a preset format based on the sorting nodes. The generation of the string includes: combining the sorting nodes into a tree structure according to preset requirements, determining the root node, child nodes, and / or leaf nodes of the tree structure, and generating the string based on the hierarchical relationship of the root node, the child nodes, and / or the leaf nodes in the tree structure. The sorting module is configured to generate a sorting tree from the string based on the code-driven configuration management component, and to sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
10. An activity sequencing system, comprising a terminal and a server, wherein: The terminal is configured to determine the set of activities to be displayed for the target object, and the sorting rules for the target items corresponding to the set of activities to be displayed. The sorting rules are parsed to obtain sorting nodes, and a string in a preset format is generated based on the sorting nodes. The generation of the string includes: combining the sorting nodes into a tree structure according to preset requirements, determining the root node, child nodes, and / or leaf nodes of the tree structure, and generating the string based on the hierarchical relationship of the root node, child nodes, and / or leaf nodes within the tree structure. The string is pushed to the server by calling the code-driven configuration management component. The server is configured to parse the string, generate a sorting tree, and send the sorting tree to the terminal. The terminal is also configured to sort the activities to be displayed in the set of activities to be displayed according to the sorting tree.
11. The activity sorting system according to claim 10, wherein the server is further configured as follows: The system receives the set of activities to be displayed sent by the terminal and sorts the activities in the set of activities to be displayed according to the sorting tree.
12. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions, which, when executed by the processor, implement the steps of the activity sorting method according to any one of claims 1 to 8.
13. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the active sorting method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Method and system for processing tree -type structure data
CN101236550A
Activity rule building method and device, computer system and medium
CN109271160A