Trial product distribution method and apparatus, computer program product, electronic device

By optimizing the sample distribution method through inverted indexes and filtering matchers, the problems of high code complexity and poor flexibility are solved, and efficient and flexible sample matching and distribution are achieved, which is suitable for high-concurrency scenarios.

CN122134415APending Publication Date: 2026-06-02BEIJING WODONG TIANJUN INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
Filing Date
2024-12-02
Publication Date
2026-06-02

Smart Images

  • Figure CN122134415A_ABST
    Figure CN122134415A_ABST
Patent Text Reader

Abstract

This disclosure relates to a method and apparatus for distributing trial products, a computer program product, and an electronic device, belonging to the field of computer technology. The method includes: acquiring a trial activity; creating distribution conditions based on an inverted index based on the trial activity; determining a filter matcher according to the distribution conditions; generating a conditional filter matching chain according to the filter matcher; acquiring user information and order information of the user who placed the order; filtering the user information and order information based on the conditional filter matching chain to obtain a target trial activity matching the user who placed the order; and distributing trial products corresponding to the target trial activity to the user who placed the order. This disclosure improves the efficiency of information matching during the distribution of trial products.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and more specifically, to a method and apparatus for dispensing samples, a computer program product, and an electronic device. Background Technology

[0002] With the booming development of e-commerce and the "Internet Plus" strategy, more and more consumers are accustomed to ordering online. Currently, e-commerce platforms are accurately matching free samples to users who have accepted sample distribution agreements when they place an order, providing services for brands to attract new customers and encourage repeat purchases.

[0003] In related technologies, accurately matching users with trial products typically involves a code-heavy approach. This involves using if-else statements to compare the user's main order information with the retrieved trial product distribution conditions, ultimately determining a trial activity that meets all distribution criteria. The products specified in this activity are then distributed as trial products along with the main order. However, this if-else approach results in high code complexity, poor flexibility, and limited scalability.

[0004] Therefore, a new method for distributing trial products is needed.

[0005] It should be noted that the information in the background section above is only used to enhance the understanding of the background of the present invention, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention

[0006] This disclosure provides a sample dispensing method, a sample dispensing device, a computer program product, and an electronic device, thereby overcoming, to at least a certain extent, the problems of high code complexity and poor flexibility in sample dispensing methods in related technologies due to limitations and defects in related technologies.

[0007] According to one aspect of this disclosure, a method for dispensing trial products is provided, comprising:

[0008] Obtain trial activities and create dispatch conditions based on inverted indexes based on the trial activities;

[0009] A filter matcher is determined based on the distribution conditions, and a conditional filter match chain is generated based on the filter matcher.

[0010] Obtain user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

[0011] In one exemplary embodiment of this disclosure, obtaining a trial activity and creating dispatch conditions based on an inverted index based on the trial activity includes:

[0012] Periodically retrieve trial activities and synchronize the retrieved trial activities to the local machine;

[0013] Obtain the distribution conditions for trial products included in the trial activity, and create distribution conditions based on the distribution conditions using an inverted index.

[0014] In one exemplary embodiment of this disclosure, the distribution conditions based on the inverted index include distribution conditions, non-distribution conditions, and distribution target group conditions; the distribution conditions include category conditions, brand conditions, order product conditions, address conditions, real-name user conditions, and member user conditions.

[0015] In one exemplary embodiment of this disclosure, creating the category conditions includes: obtaining a first constraint on the product category in the order information of the ordering user included in the trial activity, and creating the category conditions based on the first constraint.

[0016] In one exemplary embodiment of this disclosure, creating the brand conditions includes: obtaining a second constraint on the product brand in the order information of the ordering user included in the trial activity, and creating the brand conditions based on the second constraint.

[0017] In one exemplary embodiment of this disclosure, creating the order product conditions includes: obtaining a third constraint on the products in the order information of the user placing the order included in the trial activity, and creating the order product conditions based on the third constraint.

[0018] In one exemplary embodiment of this disclosure, creating the address condition includes: obtaining a fourth constraint on the delivery address in the user information of the ordering user included in the trial activity, and creating the address condition based on the fourth constraint.

[0019] In one exemplary embodiment of this disclosure, creating the real-name user conditions includes: obtaining a fifth constraint on a first user attribute in the user information of the user who placed the order, which is included in the trial activity, and creating the real-name user conditions based on the fifth constraint.

[0020] In one exemplary embodiment of this disclosure, creating the membership user conditions includes: obtaining a sixth constraint on the second user attribute in the user information of the user who placed the order, which is included in the trial activity, and creating the membership user conditions based on the sixth constraint.

[0021] In one exemplary embodiment of this disclosure, the step of determining a filter matcher based on the dispatch conditions and generating a conditional filter matching chain based on the filter matcher includes:

[0022] Generate an abstract class for conditional filter matchers, and use the dispatch conditions as parameters of the abstract class for conditional filter matchers to obtain filter matcher classes corresponding to each dispatch condition;

[0023] Specify any of the filter matcher classes as a head matcher class, specify the next filter matcher class in the head matcher class, and specify the next filter matcher class in each of the filter matcher classes.

[0024] In one exemplary embodiment of this disclosure, the step of obtaining user information and order information of the user who placed the order, and filtering the user information and order information based on the conditional filtering matching chain to obtain a target trial activity matching the user who placed the order, includes:

[0025] Input the user information and the order information into the abstract class of the condition filter matcher;

[0026] The user information and the order information are filtered sequentially by the filter matcher included in the conditional filtering matching chain to obtain the target dispatch conditions corresponding to the user who placed the order.

[0027] Based on the target distribution conditions, determine the target trial activities corresponding to the target distribution conditions.

[0028] According to one aspect of this disclosure, a sample dispensing device is provided, comprising:

[0029] The distribution condition generation module is used to obtain trial activities and create distribution conditions based on inverted indexes based on the trial activities;

[0030] The matching chain establishment module is used to determine a filtering matcher based on the dispatch conditions and generate a conditional filtering matching chain based on the filtering matcher.

[0031] The trial product distribution module is used to obtain user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering and matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

[0032] According to one aspect of this disclosure, a computer storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the sample dispensing method described in any of the exemplary embodiments above.

[0033] According to one aspect of this disclosure, an electronic device is provided, comprising:

[0034] A processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the sample dispensing method according to any of the exemplary embodiments described above by executing the executable instructions.

[0035] This disclosure provides a method for distributing trial products, which involves: acquiring trial activities; creating distribution conditions based on inverted indexes based on the trial activities; determining a filter matcher according to the distribution conditions; generating a conditional filter matching chain according to the filter matcher; acquiring user information and order information of the user who placed the order; filtering the user information and order information based on the conditional filter matching chain to obtain a target trial activity that matches the user who placed the order; and distributing trial products corresponding to the target trial activity to the user who placed the order. On the one hand, after acquiring a trial activity, distribution conditions are created based on the trial activity. These conditions are then used to determine a filter matcher, which generates a conditional filtering matching chain. This chain is then used to filter user information and order information of users who have placed orders. This solves the problem of comparing user order information with trial distribution conditions using if-else statements in related technologies, reducing code complexity and improving information matching efficiency. On the other hand, when there are many ongoing trial activities, the corresponding distribution conditions also increase, which can significantly impact matching performance. By establishing an inverted index for distribution conditions, high performance and high availability are ensured in high-concurrency scenarios. Furthermore, when a new trial activity is added, only new distribution conditions need to be added to the distribution conditions based on the trial activity, resulting in minimal modifications and improved scalability.

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

[0037] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention. It is obvious that the drawings described below are merely some embodiments of the invention, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.

[0038] Figure 1 The flowchart illustrates a sample dispensing method according to an exemplary embodiment of the present disclosure.

[0039] Figure 2The flowchart illustrates a method for obtaining a trial activity and creating inverted index-based dispatch conditions based on the trial activity, according to an example embodiment of the present disclosure.

[0040] Figure 3 The flowchart illustrates a method for determining a filter matcher based on the dispatch conditions and generating a conditional filter matching chain based on the filter matcher, according to an exemplary embodiment of the present disclosure.

[0041] Figure 4 The flowchart illustrates a method for filtering user information and order information based on the conditional filtering matching chain according to an example embodiment of the present disclosure to obtain a target trial activity matching the user who placed the order.

[0042] Figure 5 The diagram schematically illustrates a sample dispensing apparatus according to an exemplary embodiment of the present disclosure.

[0043] Figure 6 An electronic device for implementing a sample dispensing method according to an exemplary embodiment of the present invention is illustrated schematically. Detailed Implementation

[0044] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided to make the invention more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a full understanding of embodiments of the invention. However, those skilled in the art will recognize that the technical solutions of the invention may be practiced with one or more of these specific details omitted, or other methods, components, apparatus, steps, etc., may be employed. In other instances, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the invention.

[0045] Furthermore, the accompanying drawings are merely illustrative of the invention and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and therefore repeated descriptions of them will be omitted. Some block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software, in one or more hardware modules or integrated circuits, or in different network and / or processor devices and / or microcontroller devices.

[0046] With the booming development of e-commerce and the "Internet Plus" strategy, more and more consumers are accustomed to ordering online. Currently, e-commerce platforms have a business scenario where, when a user places an order, free samples are precisely matched to users who have accepted a sample distribution agreement. These samples can then be ordered together with the main order and distributed, providing services for brands to attract new customers and encourage repeat purchases.

[0047] To accurately distribute trial products to users, merchants typically create a trial campaign, specifying the trial products to be distributed and setting various distribution conditions. Current solutions often use a code-heavy approach to precisely match a user with a trial product, employing if-else statements to compare the user's main order information with the retrieved trial product distribution conditions. The final result is a trial campaign that meets all distribution conditions, and the product specified in that campaign is then distributed as a trial product along with the user's main order.

[0048] The above method has the following drawbacks. First, the complexity of the code using if-else statements depends on the number of distribution rules set by the merchant. The more rules there are, the higher the code complexity, resulting in poor readability. Second, it lacks flexibility and is not conducive to expansion. The priority order of conditions cannot be flexibly adjusted, and the amount of code modification is large when adding new trial activities, resulting in poor scalability. Third, the number of trial activities currently being distributed and the number of distribution conditions corresponding to each trial activity will affect the matching performance of trial products. The more conditions there are, the slower the matching will be. In high-traffic scenarios, this may become a performance bottleneck and may even affect the user's order placement process in severe cases.

[0049] Based on one or more of the above-mentioned problems, this example embodiment first provides a method for distributing trial products, referring to... Figure 1 As shown, the method of distributing trial products may include the following steps:

[0050] Step S110. Obtain the trial activity and create a dispatch condition based on the inverted index based on the trial activity;

[0051] Step S120. Determine a filter matcher based on the distribution conditions, and generate a conditional filter matching chain based on the filter matcher;

[0052] Step S130. Obtain the user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

[0053] The above-described method for distributing trial products involves: acquiring trial activities; creating distribution conditions based on inverted indexes based on the trial activities; determining a filter matcher based on the distribution conditions; generating a conditional filter matching chain based on the filter matcher; acquiring user information and order information of the user who placed the order; filtering the user information and order information based on the conditional filter matching chain to obtain target trial activities that match the user who placed the order; and distributing trial products corresponding to the target trial activities to the user who placed the order. On the one hand, after acquiring a trial activity, distribution conditions are created based on the trial activity. These conditions are then used to determine a filter matcher, which generates a conditional filtering matching chain. This chain is then used to filter user information and order information of users who have placed orders. This solves the problem of comparing user order information with trial distribution conditions using if-else statements in related technologies, reducing code complexity and improving information matching efficiency. On the other hand, when there are many ongoing trial activities, the corresponding distribution conditions also increase, which can significantly impact matching performance. By establishing an inverted index for distribution conditions, high performance and high availability are ensured in high-concurrency scenarios. Furthermore, when a new trial activity is added, only new distribution conditions need to be added to the distribution conditions based on the trial activity, resulting in minimal modifications and improved scalability.

[0054] The following provides a detailed explanation and description of each step involved in the sample dispensing method of the present disclosure example embodiment.

[0055] In step S110, a trial activity is obtained, and a dispatch condition based on an inverted index is created based on the trial activity.

[0056] Trial activities are created by merchants and can be configured with one or more distribution conditions, which serve as the filtering criteria for distributing trial products. Merchants create trial activities and corresponding distribution conditions. After receiving the distribution conditions, the merchant's server saves them to a MySQL database. A scheduled task for pushing the activity distribution conditions cache periodically queries the MySQL database for the distribution conditions of trial activities currently being distributed and stores these conditions in a Redis remote cache. A scheduled task for pulling the activity distribution conditions cache periodically retrieves the cached distribution conditions information of trial activities currently being distributed from the Redis remote cache and saves it locally. When storing the distribution conditions of trial activities in the MySQL database, an inverted index structure can be used to store the distribution conditions.

[0057] refer to Figure 2 As shown, obtaining a trial activity and creating dispatch conditions based on an inverted index based on the trial activity includes:

[0058] Step S210. Periodically obtain trial activities and synchronize the obtained trial activities to the local machine;

[0059] Step S220. Obtain the sample distribution conditions included in the trial activity, and create distribution conditions based on the inverted index based on the sample distribution conditions.

[0060] The following will further explain and illustrate steps S210 and S220. Specifically, the distribution conditions for the trial activity are periodically retrieved from a remote location, and distribution conditions based on an inverted index are created based on these retrieved conditions. An inverted index is a data structure used for fast document searching and retrieval. An inverted index typically consists of two main parts: a keyword dictionary and an inverted list. The keyword dictionary stores all occurrences of keywords and their corresponding unique identifiers, while the inverted list records relevant information for each keyword.

[0061] In this example embodiment, when the issuance conditions of the trial activity in the local cache expire, the issuance conditions of the trial activity can be queried from the MySQL database using an operational method, and cached information can be built and pushed to the Redis remote cache. Then, a scheduled task is waited to fetch the latest remote cache information to the local device. In this application, frequent remote access is avoided through local caching, reducing network overhead and latency, and improving system performance and response speed.

[0062] In this example embodiment, the distribution conditions based on the inverted index include distribution conditions, non-distribution conditions, and distribution target group conditions; the distribution conditions include category conditions, brand conditions, order product conditions, address conditions, real-name user conditions, and member user conditions.

[0063] Distribution conditions, or positive conditions configured, allow trial activities that meet these conditions to be matched with users who place orders. The corresponding products are then distributed to users as trial items. Distribution conditions include category conditions (CATE), brand conditions (BRAND), order product conditions (SKU), address conditions (ADDRESS), real-name user conditions (REAL_NAME_USER), and membership user conditions (VIP_USER). Upon receiving a trial activity, specific conditions are created based on the constraints within the trial activity.

[0064] The creation of the category conditions includes: obtaining a first constraint on the product category in the order information of the user who placed the order included in the trial activity, and creating the category conditions based on the first constraint.

[0065] Specifically, the category condition (CATE) constrains the category of the ordered goods. Only if the category of the ordered goods meets the category condition of the trial activity can the order be matched with that trial activity. When creating the category condition, the first constraint on the category of the goods in the order included in the trial activity is obtained, and the category condition is created based on this first constraint. Under the category condition, it is specified according to the category ID, listing the trial activities that assign specific categories in the format of

CATE_Category ID

"CATE_1100":[10001,10003]

CATE_ALL

[0066] The creation of the brand conditions includes: obtaining a second constraint on the product brand in the order information of the user who placed the order, which is included in the trial activity, and creating the brand conditions based on the second constraint.

[0067] Specifically, the brand condition (BRAND) constrains the brand of the ordered goods. Only if the brand of the ordered goods meets the brand condition of the trial activity can the order be matched with the trial activity. After obtaining the trial activity, the brand condition is created based on the second constraint on the brand of the ordered goods included in the trial activity. Under the brand condition, it is specified according to the brand ID, and the usage activities of the specific brand are listed in the format of

BRAND_brand ID

【"BRAND_1001":

[10002] 】 means that the ID of the trial activity with brand ID 1001 is 10002. Similarly, the format

BRAND_ALL

[0068] The creation of the order product conditions includes: obtaining the third constraint on the products in the order information of the user who placed the order included in the trial activity, and creating the order product conditions based on the third constraint.

[0069] Specifically, the order product conditions (SKU) directly restrict the products on the order, meaning that only if the product IDs on the order meet the order product conditions can the order match the trial activity. After obtaining the trial activity, the order product conditions are created based on the third constraint on the products in the order included in the trial activity. The order product conditions list the trial activities that dispatch the specified product ID in the format of

SKU_product ID

"SKU_10000111":[10003,10004,10005]

SKU_ALL

[0070] Creating the address conditions includes: obtaining a fourth constraint on the shipping address from the user information of the user who placed the order, as included in the trial activity, and creating the address conditions based on the fourth constraint.

[0071] Specifically, the address condition restricts the order's shipping address; only trial activities that meet the delivery address requirement can be matched. Address conditions are created based on the restrictions on the order user's shipping address included in the obtained trial activities. An address condition can be

"ADDRESS_1":[10010,10012]

"ADDRESS_ALL":[10004,10005]

[0072] The process of creating the real-name user conditions includes: obtaining the fifth constraint of the first user attribute in the user information of the user who placed the order included in the trial activity, and creating the real-name user conditions based on the fifth constraint.

[0073] Specifically, the real-name user condition (REAL_NAME_USER) restricts the user attributes of orders; only users who meet the real-name requirement can receive trial products. Upon receiving a trial activity, the trial user condition is created based on the real-name user constraints included in the activity. The real-name user condition can be

"REAL_NAME_YES":[10009,10011]

REAL_NAME_ALL

[0074] The creation of the member user conditions includes: obtaining the sixth constraint of the second user attribute in the user information of the user who placed the order in the trial activity, and creating the member user conditions based on the sixth constraint.

[0075] Specifically, the VIP_USER condition restricts the user attributes of orders, ensuring that only VIP users can receive the trial products. After obtaining the trial activity, VIP_USER conditions can be created based on the constraints on VIP users included in the trial activity. Created VIP_USER conditions can be:

"VIP_YES":[10004,10006]

"VIP_ALL":[10007,10009]

[0076] In this example embodiment, the "not issuing" condition, which is the reverse of the configured condition, prevents trial activities that meet this condition from being matched by users. The "not issuing" condition includes six items: category condition (CATE), brand condition (BRAND), order product condition (SKU), address condition (ADDRESS), real-name user condition (REAL_NAME_USER), and VIP user condition (VIP_USER). Conversely, if the "not issuing" condition is met, the activities listed under that condition cannot be issued.

[0077] In this example embodiment, the distribution audience condition (CROWDS_STRATEGY) is a separate condition indicating whether the trial activity targets a specific user group. The

HAS_CROWDS

NO_CROWDS

username:[activity ID1, activity ID2]

"user_1":[10004,10006]

[0078] In step S120, a filter matcher is determined according to the distribution conditions, and a conditional filter match chain is generated according to the filter matcher.

[0079] The filter matcher is used to implement the filtering function corresponding to the distribution conditions. In this example embodiment, refer to... Figure 3 As shown, determining a filter matcher based on the distribution conditions and generating a conditional filter matching chain based on the filter matcher includes:

[0080] Step S310. Generate an abstract class for conditional filter matcher, and use the dispatch conditions as parameters of the abstract class for conditional filter matcher to obtain filter matcher classes corresponding to each dispatch condition;

[0081] Step S320. Specify any of the filter matcher classes as a head matcher class, specify the next filter matcher class in the head matcher class, and specify the next filter matcher class in each of the filter matcher classes.

[0082] The following will further explain and illustrate steps S310 and S320. Specifically, firstly, an abstract class (Matcher) for conditional filter matchers is defined. This abstract class contains an attribute (nextMatcher) that points to the next matcher of the current conditional matcher, and also contains a matching method that receives user attribute information (userInfo), order attribute information (orderInfo), and local cache information of trial activity distribution conditions (cache) as input parameters. Then, the distribution conditions are used as parameters of the abstract class for conditional filter matchers to obtain filter matcher classes corresponding to each distribution condition. Specifically, this may include category conditional filter matcher classes, brand conditional filter matcher classes, order product conditional filter matcher classes, address conditional filter matcher classes, real-name user conditional filter matcher classes, and member user conditional filter matcher classes. Among the multiple filter matcher classes, any filter matcher class can be designated as the head matcher class. After designating it as the head matcher class, the next filter matcher class of that head matcher class can be specified, ultimately generating a conditional filter matching chain.

[0083] In step S130, user information and order information of the user who placed the order are obtained, and the user information and order information are filtered based on the conditional filtering matching chain to obtain the target trial activity that matches the user who placed the order, and the trial products corresponding to the target trial activity are distributed to the user who placed the order.

[0084] In this example embodiment, after generating the conditional filtering matching chain, refer to Figure 4 As shown, the user information and order information of the user who placed the order are obtained. Based on the conditional filtering matching chain, the user information and order information are filtered to obtain target trial activities that match the user who placed the order, including:

[0085] Step S410. Input the user information and the order information into the abstract class of the condition filter matcher;

[0086] Step S420. The user information and the order information are filtered sequentially by the filter matcher included in the conditional filtering matching chain to obtain the target dispatch conditions corresponding to the user who placed the order;

[0087] Step 430. Determine the target trial activity corresponding to the target distribution conditions based on the target distribution conditions.

[0088] The following will further explain and illustrate steps S410-S430. Specifically, user information and order information are input into the abstract class of the conditional filter matcher. User information may include user name, user real-name identifier, and member user identifier. Order information includes order number, order product ID, order product brand ID, order product primary category ID, order product secondary category ID, order product tertiary category ID, order provincial delivery address ID, order city-level delivery address ID, order district / county-level delivery address ID, and order township / village-level delivery address ID. After inputting user information and order information into the conditional filter matcher abstract class, the filter matcher in the conditional filter matcher chain sequentially filters the user information and order information to obtain the target distribution conditions that the user meets. Based on the target distribution conditions, the target trial activity is determined.

[0089] After identifying the target trial activity, the trial products for the target trial activity will be distributed to users along with the products ordered by the users.

[0090] It should be noted that before filtering user information and order information of users who place orders through the filter matcher in the conditional filtering matching chain, you can first match by the "no distribution" condition and the distribution target group condition. If neither the "no distribution" condition nor the distribution target group condition can match, then use the filter matcher in the conditional filtering matching chain to match.

[0091] The sample distribution method provided in this exemplary embodiment has at least the following advantages: On the one hand, by establishing distribution conditions based on an inverted index, the required data cache item can be quickly located through keywords or identifiers, avoiding the overhead of global search or traversal, and ensuring high performance and high availability in high-concurrency scenarios; on the other hand, the distribution conditions for trial activities can be dynamically added or modified, and the matching order of the distribution conditions for trial activities can be flexibly controlled through the condition filtering matching chain, thereby improving scalability.

[0092] This disclosure also provides a sample dispensing device, as illustrated in the example embodiments. Figure 5As shown, it may include: a distribution condition generation module 510, a matching chain establishment module 520, and a trial product distribution module 530. Wherein:

[0093] The dispatch condition generation module 510 is used to obtain trial activities and create dispatch conditions based on inverted indexes based on the trial activities;

[0094] The matching chain establishment module 520 is used to determine a filtering matcher according to the dispatch conditions and generate a conditional filtering matching chain according to the filtering matcher.

[0095] The trial product distribution module 530 is used to obtain user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

[0096] The specific details of each module in the above-mentioned sample dispensing device have been described in detail in the corresponding sample dispensing method, so they will not be repeated here.

[0097] In one exemplary embodiment of this disclosure, the dispatch condition generation module includes:

[0098] The activity acquisition module is used to periodically acquire trial activities and synchronize the acquired trial activities to the local machine;

[0099] The condition generation module is used to obtain the trial product distribution conditions included in the trial activity, and create distribution conditions based on the inverted index based on the trial product distribution conditions.

[0100] In one exemplary embodiment of this disclosure, the distribution conditions based on the inverted index include distribution conditions, non-distribution conditions, and distribution target group conditions; the distribution conditions include category conditions, brand conditions, order product conditions, address conditions, real-name user conditions, and member user conditions.

[0101] In one exemplary embodiment of this disclosure, creating the category conditions includes: obtaining a first constraint on the product category in the order information of the ordering user included in the trial activity, and creating the category conditions based on the first constraint.

[0102] In one exemplary embodiment of this disclosure, creating the brand conditions includes: obtaining a second constraint on the product brand in the order information of the ordering user included in the trial activity, and creating the brand conditions based on the second constraint.

[0103] In one exemplary embodiment of this disclosure, creating the order product conditions includes: obtaining a third constraint on the products in the order information of the user placing the order included in the trial activity, and creating the order product conditions based on the third constraint.

[0104] In one exemplary embodiment of this disclosure, creating the address condition includes: obtaining a fourth constraint on the delivery address in the user information of the ordering user included in the trial activity, and creating the address condition based on the fourth constraint.

[0105] In one exemplary embodiment of this disclosure, creating the real-name user conditions includes: obtaining a fifth constraint on a first user attribute in the user information of the user who placed the order, which is included in the trial activity, and creating the real-name user conditions based on the fifth constraint.

[0106] In one exemplary embodiment of this disclosure, creating the membership user conditions includes: obtaining a sixth constraint on the second user attribute in the user information of the user who placed the order, which is included in the trial activity, and creating the membership user conditions based on the sixth constraint.

[0107] In one exemplary embodiment of this disclosure, the matching chain establishment module includes:

[0108] The first matcher class determination module is used to generate an abstract class of conditional filter matcher, and to use the dispatch conditions as parameters of the abstract class of conditional filter matcher to obtain the filter matcher class corresponding to each dispatch condition.

[0109] The second matcher class determination module is used to specify any of the filter matcher classes as a head matcher class, specify the next filter matcher class in the head matcher class, and specify the next filter matcher class in each of the filter matcher classes.

[0110] In one exemplary embodiment of this disclosure, the sample distribution module includes:

[0111] The user information acquisition module is used to input the user information and the order information into the condition filter matcher abstract class;

[0112] The target distribution condition determination module is used to sequentially filter the user information and the order information through the filter matcher included in the condition filtering matching chain to obtain the target distribution conditions corresponding to the ordering user.

[0113] The target activity determination module is used to determine the target trial activity corresponding to the target distribution conditions based on the target distribution conditions.

[0114] It should be noted that although several modules or units of the device for performing actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the present invention, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0115] Furthermore, although the steps of the method in this invention are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in that specific order, or that all the steps shown must be performed to achieve the desired result. Additional or alternative steps may be omitted, multiple steps may be combined into one step, and / or a step may be broken down into multiple steps.

[0116] In an exemplary embodiment of the present invention, an electronic device capable of implementing the above-described method is also provided.

[0117] Those skilled in the art will understand that various aspects of the present invention can be implemented as systems, methods, or program products. Therefore, various aspects of the present invention can be specifically implemented in the following forms: entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuits,” “modules,” or “systems.”

[0118] The following reference Figure 6 To describe an electronic device 600 according to this embodiment of the present invention. Figure 6 The electronic device 600 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of the present invention.

[0119] like Figure 6 As shown, the electronic device 600 is manifested in the form of a general-purpose computing device. The components of the electronic device 600 may include, but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including storage unit 620 and processing unit 610), and a display unit 640.

[0120] The storage unit stores program code that can be executed by the processing unit 610, causing the processing unit 610 to perform the steps described in the "Exemplary Methods" section of this specification according to various exemplary embodiments of the present invention. For example, the processing unit 610 can perform actions such as... Figure 1The steps shown are as follows: S110: Obtain trial activities and create distribution conditions based on inverted indexes based on the trial activities; S120: Determine a filter matcher according to the distribution conditions and generate a conditional filter matching chain according to the filter matcher; S130: Obtain user information and order information of the ordering user, filter the user information and order information based on the conditional filter matching chain to obtain target trial activities that match the ordering user and distribute trial products corresponding to the target trial activities to the ordering user.

[0121] Storage unit 620 may include a readable medium in the form of a volatile storage unit, such as random access memory (RAM) 6201 and / or cache memory 6202, and may further include a read-only memory (ROM) 6203.

[0122] Storage unit 620 may also include a program / utility 6204 having a set (at least one) program module 6205, such program module 6205 including but not limited to: operating system, one or more application programs, other program modules and program data, each or some combination of these examples may include an implementation of a network environment.

[0123] Bus 630 can represent one or more of several types of bus structures, including a memory cell bus or memory cell controller, a peripheral bus, a graphics acceleration port, a processing unit, or a local bus using any of the various bus structures.

[0124] Electronic device 600 can also communicate with one or more external devices 700 (e.g., keyboard, pointing device, Bluetooth device, etc.), and with one or more devices that enable a user to interact with electronic device 600, and / or with any device that enables electronic device 600 to communicate with one or more other computing devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 650. Furthermore, electronic device 600 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 660. As shown, network adapter 660 communicates with other modules of electronic device 600 via bus 630. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) systems, tape drives, and data backup storage systems.

[0125] Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solutions according to the embodiments of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, portable hard drive, etc.) or on a network, including several instructions to cause a computing device (such as a personal computer, server, terminal device, or network device, etc.) to execute the method according to the embodiments of the present invention.

[0126] In exemplary embodiments of the present invention, a computer-readable storage medium is also provided, on which a program product capable of implementing the methods described above is stored. In some possible embodiments, various aspects of the present invention may also be implemented as a program product comprising program code that, when the program product is run on a terminal device, causes the terminal device to perform the steps of the various exemplary embodiments of the present invention described in the "Exemplary Methods" section above.

[0127] According to embodiments of the present invention, a program product for implementing the above-described method may employ a portable compact disc read-only memory (CD-ROM) and include program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium containing or storing a program that may be used by or in conjunction with an instruction execution system, apparatus, or device.

[0128] The program product may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0129] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting programs for use by or in conjunction with an instruction execution system, apparatus, or device.

[0130] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF (Radio Frequency), etc., or any suitable combination thereof.

[0131] Program code for performing the operations of this invention can be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java and C++, and conventional procedural programming languages ​​such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).

[0132] Furthermore, the above figures are merely illustrative of the processes included in the method according to exemplary embodiments of the present invention, and are not intended to be limiting. It is readily understood that the processes shown in the above figures do not indicate or limit the temporal order of these processes. Additionally, it is readily understood that these processes may be executed synchronously or asynchronously, for example, in multiple modules.

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

Claims

1. A method for distributing trial products, characterized in that, include: Obtain trial activities and create dispatch conditions based on inverted indexes based on the trial activities; A filter matcher is determined based on the distribution conditions, and a conditional filter match chain is generated based on the filter matcher. Obtain user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

2. The method according to claim 1, characterized in that, The process of obtaining a trial activity, and creating dispatch conditions based on an inverted index, includes: Periodically retrieve trial activities and synchronize the retrieved trial activities to the local machine; Obtain the distribution conditions for trial products included in the trial activity, and create distribution conditions based on the distribution conditions using an inverted index.

3. The method according to claim 2, characterized in that, The distribution conditions based on the inverted index include distribution conditions, non-distribution conditions, and distribution target group conditions; the distribution conditions include category conditions, brand conditions, order product conditions, address conditions, real-name user conditions, and member user conditions.

4. The method according to claim 3, characterized in that, Creating the category conditions includes: obtaining a first constraint on the product category in the order information of the user who placed the order, which is included in the trial activity, and creating the category conditions based on the first constraint.

5. The method according to claim 3, characterized in that, Creating the brand conditions includes: obtaining a second constraint on the product brand in the order information of the user who placed the order, which is included in the trial activity, and creating the brand conditions based on the second constraint.

6. The method according to claim 3, characterized in that, Creating the order product conditions includes: obtaining a third constraint on the products in the order information of the user who placed the order, which is included in the trial activity, and creating the order product conditions based on the third constraint.

7. The method according to claim 3, characterized in that, Creating the address conditions includes: obtaining a fourth constraint on the delivery address in the user information of the user who placed the order, which is included in the trial activity, and creating the address conditions based on the fourth constraint.

8. The method according to claim 3, characterized in that, Creating the real-name user conditions includes: obtaining the fifth constraint of the first user attribute in the user information of the user who placed the order included in the trial activity, and creating the real-name user conditions based on the fifth constraint.

9. The method according to claim 3, characterized in that, Creating the membership user conditions includes: obtaining the sixth constraint of the second user attribute in the user information of the user who placed the order included in the trial activity, and creating the membership user conditions based on the sixth constraint.

10. The method according to claim 1, characterized in that, The step of determining a filter matcher based on the distribution conditions and generating a conditional filter matching chain based on the filter matcher includes: Generate an abstract class for conditional filter matchers, and use the dispatch conditions as parameters of the abstract class for conditional filter matchers to obtain filter matcher classes corresponding to each dispatch condition; Specify any of the filter matcher classes as a head matcher class, specify the next filter matcher class in the head matcher class, and specify the next filter matcher class in each of the filter matcher classes.

11. The method according to claim 10, characterized in that, The process of obtaining user information and order information of the user who placed the order, and filtering the user information and order information based on the conditional filtering matching chain to obtain target trial activities matching the user who placed the order, includes: Input the user information and the order information into the abstract class of the condition filter matcher; The user information and the order information are filtered sequentially by the filter matcher included in the conditional filtering matching chain to obtain the target dispatch conditions corresponding to the user who placed the order. Based on the target distribution conditions, determine the target trial activities corresponding to the target distribution conditions.

12. A sample dispensing device, characterized in that, include: The distribution condition generation module is used to obtain trial activities and create distribution conditions based on inverted indexes based on the trial activities; The matching chain establishment module is used to determine a filtering matcher based on the dispatch conditions and generate a conditional filtering matching chain based on the filtering matcher. The trial product distribution module is used to obtain user information and order information of the user who placed the order, filter the user information and order information based on the conditional filtering and matching chain, obtain the target trial activity that matches the user who placed the order, and distribute the trial products corresponding to the target trial activity to the user who placed the order.

13. A computer storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processing unit, it implements the sample dispensing method according to any one of claims 1-11.

14. An electronic device, characterized in that, include: Processing unit; as well as A storage unit for storing the executable instructions of the processing unit; The processing unit is configured to execute the sample dispensing method according to any one of claims 1-11 by executing the executable instructions.