Method and computing device for pallet system computing based on rule engine
Through the pallet system calculation method based on the rules engine, the problems of market changes and user demand response difficulties in local fresh food e-commerce operations are solved, and the data access expansion and personalized operation strategy of the pallet system are realized, which improves the Personnel and goods matching degree and operation increment.
Patent Information
- Application Number
- CN202410712186.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-03
- Publication Date
- 2024-11-26
AI Technical Summary
In the operation of local fresh food e-commerce, the existing technology is difficult to respond quickly to market changes and user needs, resulting in low matching between operation strategies and user needs, and the original offline processing of goods, resulting in the operation strategy being unable to be reflected in the product collection in a timely manner. , lack of flexibility and timeliness.
Using the pallet system calculation method based on the rules engine, pallet data recall and grouping calculation are carried out by querying pallet meta information and grouping rules, to realize flexible rule selection of goods, and to support online grouping of goods of multiple data sources. , providing personalized operational strategies and the ability to respond quickly to market changes.
It realizes the data access expansion of the pallet system, reduces the development cycle of incremental cargo rules, supports personalized operation strategies, improves the matching degree of people and goods and the increment of operations, and meets the user needs in different scenarios.
Smart Images

Figure CN119027146A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of e-commerce, and in particular to a method and a computing device for calculating a pallet system based on a rule engine. Background Art
[0002] Fresh products have become one of the core operations on e-commerce platforms because they meet the high-frequency daily needs of consumers. Especially in the field of localized fresh products, due to fierce market competition, highly refined operation strategies are needed to quickly respond to market changes and meet the segmented needs of regional users. With supply as the core, operations that meet users' localized fresh product needs, in order to quickly respond to market changes and user demand changes and capture business opportunities, operations need to be based on the perspective of goods and combine different pallets based on user needs to meet user needs in different scenarios. Summary of the invention
[0003] The present invention aims to provide a method and computing device for pallet system calculation based on rule engine, which can realize flexible rule selection of commodities to realize online grouping function, so that data access of pallet system has good scalability. It effectively reduces the development cycle of incremental grouping rules, so that the operation strategy of pallet can quickly change accordingly to the market.
[0004] According to one aspect of the present invention, a method for calculating a pallet system based on a rule engine is provided, the method comprising:
[0005] Querying pallet meta information, wherein the pallet meta information includes grouping rules;
[0006] Query the pallet data source according to the cargo grouping rules;
[0007] Recalling pallet data according to the pallet data source;
[0008] Cargo grouping calculation is performed based on the result of the cargo pallet data recall;
[0009] A commodity list is obtained by calculating according to the group of commodities.
[0010] According to some embodiments, the grouping rule is a set operation rule directly derived from the data source.
[0011] According to some embodiments, the pallet data source is a set of commodities used for rule-based selection of pallets, and a pallet can only select the pallet data source, and the pallet data source specifies a sort order and is used in combination with a cutoff quantity.
[0012] According to some embodiments, recalling pallet data based on the pallet data source includes: circling through existing fields, obtaining externally generated data sets and / or obtaining dynamic data sets.
[0013] According to some embodiments, circling by existing fields is a direct recall on existing fields;
[0014] The externally generated data set is connected to the external system through an offline table;
[0015] The dynamic data set cannot be accessed through offline labeled data cascade.
[0016] According to some embodiments, the grouping rules are also used to translate the pallet data into a pallet data source when storing.
[0017] According to some embodiments, the pallet data source has customized filtering conditions;
[0018] For product attributes that have been generated offline, they can be directly spliced into the online query as query conditions for dynamic filtering.
[0019] According to some embodiments, the pallet data is sorted by default using an algorithm; and / or
[0020] The pallet data is sorted as per requirement using custom developed fields.
[0021] According to another aspect of the present invention, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the computer program executes any of the above methods.
[0022] According to another aspect of the present invention, there is provided a computing device, comprising:
[0023] Processor; and
[0024] A memory storing a computer program, which, when executed by the processor, enables the processor to execute any of the methods described above.
[0025] According to another aspect of the present invention, there is provided a non-transitory computer-readable storage medium having computer-readable instructions stored thereon, and when the instructions are executed by a processor, the processor is caused to execute any of the above methods.
[0026] According to an embodiment of the present invention, by querying pallet meta information, the pallet meta information includes grouping rules and querying the grouping rules, the pallet data is recalled according to the grouping rules, and grouping calculations are performed according to the recall results to obtain a list of goods. The present invention provides a flexible online grouping capability based on multiple data sources, supports many typical circle product logics, mines needs from user behavior, and matches needs by placing preset pallets in shopping guide scenarios to stimulate purchase decisions to place orders.
[0027] According to some embodiments, the method of the present invention can closely integrate the search and push capabilities and improve the online product grouping capabilities. The product tray system provides the ability to flexibly group products online based on multiple data sources and supports many typical product grouping logics.
[0028] According to some embodiments, from the perspective of the platform, building lists, card insertion and other pallet positions provide more opportunities for operational penetration. This solution can achieve flexible rule selection of goods through an online grouping solution based on a rule engine to realize the online grouping function. It provides strong support for the operation to achieve a more personalized pallet operation strategy, thereby achieving better matching of people and goods and bringing incremental operations.
[0029] According to some embodiments, common pallet data source access methods are summarized and defined from a technical perspective, so that the data access of the pallet system has good scalability, effectively reducing the development cycle of incremental grouping rules, and allowing the pallet operation strategy to respond quickly to market changes.
[0030] It is to be understood that the foregoing general description and the following detailed description are exemplary only and are not restrictive of the invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below.
[0032] Figure 1 A flow chart of a method for pallet system calculation based on a rule engine according to an example embodiment is shown.
[0033] Figure 2 A schematic diagram showing the overall data flow according to an example embodiment.
[0034] Figure 3 A schematic diagram illustrating a data source access decision link according to an example embodiment.
[0035] Figure 4 A schematic diagram illustrating a data source access link for an external static pallet according to an example embodiment.
[0036] Figure 5 A schematic diagram showing an external KKV data source access link according to an example embodiment.
[0037] Figure 6 A schematic diagram illustrating an online link for a pallet according to an example embodiment is shown.
[0038] Figure 7 A block diagram of a computing device is shown according to an example embodiment. DETAILED DESCRIPTION
[0039] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that the present invention will be comprehensive and complete and fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0040] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present invention. However, those skilled in the art will appreciate that the technical solution of the present invention can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known methods, devices, implementations or operations are not shown or described in detail to avoid blurring various aspects of the present invention.
[0041] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0042] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0043] It should be understood that although the terms first, second, third, etc. may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another component. Therefore, the first component discussed below can be referred to as the second component without departing from the teachings of the present inventive concept. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more.
[0044] The user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0045] Those skilled in the art will appreciate that the drawings are merely schematic diagrams of example embodiments, and the modules or processes in the drawings are not necessarily necessary for implementing the present invention, and therefore cannot be used to limit the protection scope of the present invention.
[0046] In order to quickly respond to market changes and user demand changes and capture business opportunities, operation operations need to combine different pallets based on the perspective of goods and user needs to meet user needs in different scenarios. In the process of capturing user needs through pallets, there are currently two major challenges. The first is the close integration of operation strategy and recommendation strategy. With the rapid evolution of market demand and the complexity and variability of commodity supply, it is often difficult to fully match the operation strategy with the actual needs of users. The existing operation means usually use the form of "crowd + commodity pool" for coarse-grained delivery. Due to the coarse-grained delivery of commodity pools, this operation means is often unsatisfactory. The second is to flexibly and quickly combine different pallets. The rapid evolution of market demand and the complexity and variability of commodity supply also mean the variability and timeliness requirements of pallet operations. The original method of selecting products first and then delivering them means that operations often process the candidate set of commodities offline and then deliver them to the front desk, making it impossible for many strategies to be reflected in the commodity set in a timely manner.
[0047] To this end, the present invention proposes a method for calculating a pallet system based on a rule engine. Through an online grouping solution based on a rule engine, flexible rule selection of commodities can be implemented to realize the online grouping function. It provides strong support for the operation to implement a more personalized pallet operation strategy, thereby achieving better matching of people and goods and bringing incremental operations. From a technical point of view, the common pallet data source access methods are summarized and defined, so that the data access of the pallet system has good scalability. It effectively reduces the development cycle of incremental grouping rules, so that the pallet operation strategy can respond quickly to market changes.
[0048] Before describing the embodiments of the present invention, some terms or concepts involved in the embodiments of the present invention are explained.
[0049] Pallet: refers to a collection of goods calculated according to certain rules, which can usually be used as a data source for e-commerce recommendation scenarios.
[0050] Pallet data source: A collection of goods, which are the basic elements that make up a pallet.
[0051] Commodity grouping rules: The set operation rules between pallet data sources are the basic elements that make up the pallet.
[0052] Pallet system: refers to a system for managing pallets, which is used to store and manage pallet information and provide online pallet product query services.
[0053] Rule engine: refers to a software component that dynamically parses and calculates expressions when the program is running to implement various operations, logical judgments or data processing.
[0054] Recall: In the field of technology and products, especially in recommendation systems, "recall" refers to the process of screening out items that may be relevant or meet the needs from a large number of candidate sets. The recall engine has high stability and high performance, supports multiple types of recall methods, such as feature-based (X2I) recall, vector recall, etc., and has flexible filtering and configuration strategies, can accelerate iteration efficiency, and support real-time data updates. "Recall" here is a technical term, which means the mechanism of finding potential matches from a large data set.
[0055] Exemplary embodiments of the present invention are described below with reference to the accompanying drawings.
[0056] Figure 1 A flow chart of a method for pallet system calculation based on a rule engine according to an example embodiment is shown.
[0057] See also Figure 1 , at S101, query the pallet meta information.
[0058] The pallet system provides the ability to combine different sets of goods. The product set belongs to the goods selected according to certain rules. The rules here can be simple rules, such as those that can be easily identified through a certain field, such as tags, categories, product pool IDs, etc.; they can also be dynamic. The meaning of dynamic is that they cannot be calculated through simple static rules, such as the goods "bought by users". The goods purchased by each user are different; there is another scenario where the product set is connected to an external system, such as goods selected by complex rules. This external data source can be converted into a certain product field through an offline data link, which is a case of static data.
[0059] According to some embodiments, the pallet system is divided into two parts: offline circle selection and online query. Offline circle selection refers to the data processing process in the background. When merchants prepare goods for listing, analyze sales data or conduct inventory counts, they operate on the local database or exported data set. This operation is circle selection. Select a specific set of goods for batch editing or analysis without real-time networking. For example, use Excel or professional data analysis tools to perform offline analysis of historical sales data while disconnecting from the real-time data connection of the e-commerce platform to determine which goods should form a new promotional pallet.
[0060] Online query directly corresponds to the process of real-time data retrieval through the front-end or back-end management system of the e-commerce platform. Merchants or customers can search or filter products directly on the e-commerce website, and the platform will immediately retrieve and display relevant information from the database, such as product details, inventory status, price, etc. For merchants, this also includes logging into their management backend to view product sales, customer behavior analysis, inventory levels, etc. in real time, so as to make business decisions quickly.
[0061] According to some embodiments, the pallet types include externally generated data sets and dynamic data sets that can be selected through existing fields of the search engine.
[0062] Recall is the process of "querying out docs through certain conditions" defined in the search recommendation job. Here, doc is a product record in the product table. In the product search scenario, search engine recall is the process of searching in the search engine after the query conditions for product search are spliced together. The pallet types that can be circled through the existing fields of the search engine can be directly recalled on the existing fields. No special processing is required on the data link, such as IC tagging. IC is the product center. The reading and writing of product data must go through IC. Product tagging is a common means of product management. IC provides tagging services. Jobs can manage products by tagging products on IC.
[0063] The pallet type of the externally generated data set can be directly recalled without fields, and is connected to the external system through an offline table. The pallet data link of the externally generated data set is processed through an external open data processing service, and is connected to the big data ETL platform after unified processing, and an item_batch_tag is issued to each data source to identify the data type.
[0064] Open data processing services can serve the storage and calculation of batch structured data, and can provide solutions for massive data warehouses and analytical modeling services for big data. The big data ETL platform is used in scenarios such as search, advertising, and recommendation. It has PB-level data processing capabilities and second-level real-time performance. It provides data input for online systems in scenarios such as search, and strengthens the end-to-end service capabilities of offline to online products. It is an important link in the chain of scenarios such as search.
[0065] For example, when the algorithm produces incubated new products, the rules for incubating new products have a complex calculation logic, which is produced by the algorithm and accessed through the open data processing service offline table.
[0066] The pallet type of a dynamic data set is when some data cannot be accessed through offline labeling, such as data related to human behavior patterns. The data link of a dynamic data set requires customized data link development, which is divided into online and offline. For example, obtain the products that users have bought, and make recommendations for "frequently bought new" products, and "frequently bought new" products that users have bought. For example, through the basic feature service, the basic feature service can provide a unified feature service interface, so that the operator can use it as needed, and the existing features do not need to be repeatedly developed. The basic feature service can record the user's session mechanism state features at the time of the request, and flow back to the offline message queue or open data processing service table for real-time training feedback. At the same time, the basic feature service can also realize feature sharing, and the newly added features can be easily used by other scenes to maximize the feature value.
[0067] The basic feature service can access a variety of features, including user behavior data, long-term preference features (such as static features such as age, gender, purchasing power, etc.), and real-time features of calculated users. The basic feature service requests user features and trigger-item data, and then requests the recall engine based on the trigger-item and user features (such as user tags) as recall conditions to perform recall and rough sorting. Then, the user features and the recall engine recall results are passed to RTP at the same time for fine sorting and scoring. Commonly used basic feature service features include user exposure, clicks, and purchase sequences. From the purchase sequence, the products purchased by the user can be parsed, which can be used as a grouping condition for online grouping. The value of the basic feature service lies in that it provides a unified feature service interface, which can reduce repeated development and improve work efficiency. At the same time, it can also realize feature sharing and maximize feature value.
[0068] To this end, the pallet meta-information includes grouping rules, which are set operation rules directly from the data source. The grouping rules describe how the pallets are composed, and are represented by set operations on the data source. According to some embodiments, the pallet grouping rules need to comply with the grammatical rules of SPELS (Spring Expression Language), using or to represent a union, and to represent an intersection, and not to represent a difference. The data source ID or other pallet IDs are involved in the operation within the rule, and the pallet ID should be translated into the data source when storing. Circular references are not allowed in rule expressions.
[0069] In S103, the pallet data source is queried according to the cargo grouping rules.
[0070] According to some embodiments, the data source is stored in a table format, and the data source table (item_batch_datasource) includes a data source id, a data source code, a data source type, customized filter conditions filters, sorting information order, a truncation quantity limit, and extended information ext_info.
[0071] Among them, a semantic data source code will be consumed in the expression. It should be noted that the data source code must comply with the naming rules of the variable, otherwise the Spel parsing will report an error. Different data source types have different implementations in the downstream parsing logic. For the product attributes that have been produced offline, they can be directly spliced into the dynamic filtering as query conditions during online queries. Multiple values can be used to represent in, and different keys are in an intersection relationship. IN is the inclusion relationship between elements and sets. For example, if the set x = (a, b), then a in x, c not in x. Keys, such as tags (labels), poolIds (product pool identifiers), etc., represent different filtering conditions. Different filtering condition calculations are AND operations in logical operations.
[0072] According to some embodiments, the data source table is retrieved through static and kkv. Static means that this is a data source selected by product attributes, and the selection conditions are set in the filter. The same kv is represented by multiple values in, and different kvs are and relationships, where kv refers to key and value, and the filter uses the json format. kkv is a table structure of a graph database, such as the IGraph graph database, which can specify a scenario with dynamic query conditions, such as products purchased by users, and userid is a dynamic field.
[0073] According to some embodiments, the data source can specify sorting to prevent the candidate set from being too large during memory calculation, which affects performance. This needs to be used in conjunction with the truncation limit. The SQL query needs to specify the number of results to be returned, and the limit is a parameter that specifies the number of results. Because it is an online grouping, online calculation is required, which consumes performance and requires limiting the number of groupings, so a limit needs to be specified.
[0074] In S105, the pallet data is recalled according to the pallet data source.
[0075] According to some embodiments, the data recall method of the pallet type that can be circled by the existing fields of the search engine is search engine recall, through tag filtering, poolIds filtering. According to some embodiments, the data recall method of the pallet type of the externally generated data set is search engine recall, through item_batch_tag filtering. According to some embodiments, the data recall method of the pallet type of the dynamic data set is cascade query, the first step is to customize a recall of a set of goods according to the job requirements, and further perform other fixed rule filtering by itemId through the search engine, such as inventory, prohibited sale, etc.
[0076] PoolIds is the concept of product circle. There is a product circle system in the operation. Product circle means to circle a collection of products according to certain rules (circle product labels, or excel import, etc.). This collection of products is called a product pool. Each product pool has an id, namely poolId. Each product can be circled by multiple product pools. Therefore, there is a field called poolIds on the product, which is multi-valued and means the product pool associated with a certain product.
[0077] According to some embodiments, the pallets are stored in a table format, and the pallet table contains a data source id, a pallet code code, a name for display name, a rule rule, a rule rule_expand without a pallet id, a sort order, a truncation quantity limit, and extended information ext_info.
[0078] The rule itself can participate in the calculation, and the combination of rules can be composed of pallet data sources or rule ids. The rule rule_expand without pallet id is an expression that translates the pallet ids in the original rule into data sources. If the sorting order of the inventory data is not filled in, the default is algorithm sorting. If the sorting is specified, the engine needs to have this sorting field. Custom development is generally required when adding a sorting field.
[0079] Let's take an example of circle selection. Circle the "fruit good reviews" tray, and the rule is "fruit and good reviews". First, configure the fruit data source (static_1), configure the static type data source, and fill in the multi-value category filter in the filter; then configure the good review data source (static_2). The good review data source needs to be developed offline, and BatchTags defines a new enumeration for good reviews (good_review). Through the open data processing service offline task, count the qualified products and add them to BatchTags, configure the static type data source, and fill in the itemBatchTags filter condition in the filter, which is good_review; then configure the tray, and the rule is #static_1and#static_2.
[0080] In S107, the cargo grouping calculation is performed based on the result of the cargo pallet data recall.
[0081] According to some embodiments, the obtained pallet data recall results are used to screen out eligible commodities.
[0082] Through the calculation of grouping, we ensure that the recommended product categories are diverse and meet the diversified shopping needs of users. Through intelligent combination, we can increase the order value and encourage users to purchase higher-value product combinations. According to the personalized information such as the user's historical purchase records and browsing behavior, we can adjust the combination content to make it closer to the user's preferences and achieve personalized customization. Calculate the cost-effectiveness ratio of different combination schemes and select the most economical and effective grouping strategy. After the calculation is completed, the obtained grouping scheme needs to be implemented in actual operations, and then its effect is tracked and evaluated, such as conversion rate, customer satisfaction, inventory turnover speed and other indicators, so as to continuously optimize the grouping algorithm and strategy. When combining goods, it is also necessary to consider the inventory status and the convenience of logistics distribution, such as giving priority to recommending goods with sufficient inventory and easy to pack and ship.
[0083] Commodity group calculation relies on advanced data analysis technology, inventory management system and deep understanding of market and user behavior, aiming to improve sales efficiency, customer experience and operational benefits.
[0084] In S109, a commodity list is obtained according to the commodity group calculation.
[0085] According to some embodiments, after obtaining the product list, it can be filtered according to specific filtering rules. In addition, customized sorting is an important part of optimizing product display and improving user experience.
[0086] Filtering rules include but are not limited to checking saleability rules, inventory status, checking product status, defining price ranges, comprehensive sales and user reviews, etc. Remove products with inventory below the preset threshold to ensure that recommended products can be supplied immediately; exclude products that have been removed from the shelves, discontinued or inactive; set price ranges based on the consumption capacity of the target customer group to filter out products with too high or too low prices; sales and reviews: retain products with high sales and high reviews to enhance the credibility and attractiveness of recommendations.
[0087] Customized sorting includes but is not limited to user preference sorting, promotional activity priority, new product recommendation, sales ranking and diversity ranking. Based on the user's browsing, purchase history and interaction data, the machine learning algorithm is used to predict the user's interests and put the products that are more in line with personal preferences in the front; the products participating in the current promotion activities are put in advance to promote the sales of the promotional products. According to the marketing strategy, sometimes newly launched products are placed in the front to increase exposure; combined with the cost and selling price of the product, the sorting is optimized to maximize the overall profit or the value of the unit pallet; sorting by sales volume of the product, popular products usually attract more purchases; in order to provide more abundant choices, diversity factors can be added to the sorting to ensure a wide coverage of product types.
[0088] Figure 2 A schematic diagram showing the overall data flow according to an example embodiment.
[0089] See also Figure 2 , Figure 2 The overall data flow of the embodiment is shown. According to some embodiments, the external commodity pool relationship table dispatches the commodity relationship through the open data processing service to form a commodity-commodity pool label relationship table, and the commodity-commodity pool label relationship and other information of the original saro data element are passed to the mmc-item-saro module. Through the search engine, the commodity collection and the pallet meta information of the pallet information table are assembled into pallets, and then the information of the commodities in the pallet is displayed to the user in the foreground scene.
[0090] The entire process transmits and integrates data, organizing product information from different sources into a consistent form to facilitate subsequent management and use.
[0091] Figure 3 A schematic diagram illustrating a data source access decision link according to an example embodiment.
[0092] See also Figure 3 , Figure 3 The flow of the data source access decision link is shown and the logical judgment process is described, mainly focusing on whether the data set is fixed and how to process the data.
[0093] Determine whether the data set is fixed. If not, develop an online recall link. If it is fixed, determine whether it can be circled through the existing index. If it can be circled through all existing pallet items, there is no need to develop an offline link. Otherwise, it is uniformly accessed by the open data processing service and an additional merge input is added.
[0094] Examples of data sets that are fixed or can be selected through existing indexes include product labels, product pool labels associated with products, etc. The characteristic is that they can be written to products through offline calculations as a property of the product. However, "products purchased by users" is not a fixed data set because each person has purchased different products.
[0095] In the open data processing service (offline link), a general access SQL was developed. The processing flow in this SQL is to process and merge multiple data channels and then output them. Union is an operation in SQL that merges two data channels into one. When adding a data source to access, additional development is required on the existing link to connect the newly added data source in the union operation, that is, "add one channel to merge input."
[0096] The process shows how to decide whether to develop a new link and how to process the data according to the data set. If the data set is fixed, it can be used directly; if not, it is necessary to consider developing a new link.
[0097] Figure 4 A schematic diagram illustrating a data source access link for an external static pallet according to an example embodiment.
[0098] See also Figure 4 , describes how to obtain information from multiple data sources and merge them into a result table.
[0099] External Table 1 and External Table 2 are two external data sources that provide initial data. External Table 1 and External Table 2 respectively send tag+select, select specific records from the external table, and assign a tag. The single data source intermediate table is where the selected records are placed in a separate intermediate table. Because an itemId has only one tag, each record in each intermediate table is associated with a tag.
[0100] Merge two single data source intermediate tables together to form a different data source merge table. In this table, an itemId still has only one tag, and a tag is a record. There will be multiple records for an itemId in the table. Merge tags to generate a tag merge table. Merge tags from different data source merge tables so that an itemId can have multiple tag values. Perform a leftjoin operation on the tag merge table, the full product table, and the table after sorting the fields of external table 1 and external table 2 to obtain the result table.
[0101] ItemId is the primary key of the product, tag and rankScore are the attributes of the product. Tag means the label (for reference) issued to each newly added static pallet, and rankScore is the ranking score. This process is an example of two-way external data access. It includes the preprocessing of external data, issuing tags to each data channel, and then merging tags according to the product dimension (multi-valued after merging), and then performing a table join operation (left join) to add the ranking score to the product table. The result table contains a multi-value tag field (indicating which data source the product is in) and a ranking field.
[0102] The goal of the entire process is to obtain information from multiple data sources and merge the information into an ordered result table, where each product may have multiple tag values.
[0103] Figure 5 A schematic diagram showing an external KKV data source access link according to an example embodiment.
[0104] See also Figure 5 , Figure 5 The process of accessing the external KKV data source link is shown, and how to obtain information from multiple data sources and perform fusion query on the information is described.
[0105] Data source 1 and data source 2 provide the initial data. The data selected from data source 1 and data source 2 are merged to generate a new open data processing service merge table. Offline data synchronization is performed on the open data processing service merge table to obtain graph database data to ensure data consistency and integrity. At the same time, the pallet data source can directly query the graph database to obtain graph database data.
[0106] The graph database can provide online graph query engine services. The open data processing service produces the data source of the graph database. The open data processing service accesses multiple data sources and processes them into a unified format for consumption by the graph database. The graph database provides online query services, and the storage format is the kkv table.
[0107] Figure 6 A schematic diagram illustrating an online link for a pallet according to an example embodiment is shown.
[0108] See also Figure 6 , Figure 6 The interactive process of the pallet online link is shown, and the process of determining the pallet commodities is described based on a series of rules and data.
[0109] The external system inputs the pallet code, and the pallet system passes the pallet code information to the graph database, which returns the pallet combination rules; the pallet system obtains static pallet data from the search engine and dynamic pallet data from other storage structures based on the pallet combination rules; after the pallet system obtains the static pallet data and dynamic pallet data, it calculates the pallet products according to the rules, filters the rules, and again obtains the pallet products that meet the display rules from the search engine; the pallet system sorts and completes the obtained pallet products, and then transmits the filtered pallet product information to the external system and displays it to the user.
[0110] According to some embodiments, first, the pallet meta-information is queried according to the pallet code, including the pallet grouping rules, etc.; according to the grouping rules, the required data sources are parsed and concurrent recall is performed; according to the grouping rules, grouping calculations are performed to obtain products that meet the grouping rules; fixed filtering rules are filtered, such as only selling, prohibited selling, inventory, etc.
[0111] The following example illustrates this.
[0112] Step 1: Query the pallet meta information.
[0113] According to the pallet code passed as a parameter, query the corresponding pallet metadata. Assume that the following data is returned:
[0114] {
[0115] "code":"user_bought_new_item",
[0116] "rule":"#user_bought and#new_item"
[0117] }
[0118] In this configuration, the pallet code is user_bought_new_item, the semantics is "bought and new", and the grouping rule is the intersection of the user's purchased items and new items. There are two data sources, the codes are user_bought and new_item.
[0119] Step 2: Query the pallet data source.
[0120] Continue to query the configuration, query according to the two parsed data source codes, and get two configurations:
[0121] {
[0122] "code":"user_bought",
[0123] "type":"kkv"
[0124] }
[0125] This configuration means "user has purchased", and type is a customized one with customized data recall logic.
[0126] {
[0127] "code":"new_item",
[0128] "type":"static",
[0129] "filters":{
[0130] "item_batch_tags":"new_item"
[0131] }
[0132] }
[0133] This configuration means that new products are accessed through the offline open data processing service, the type is static, and can be selected by configuring recall rules, that is, the content in filters, and selected according to the pallet label.
[0134] Step three: Conduct a pallet recall.
[0135] According to the type of the two data sources, different subgraphs are routed to recall the pallet data. user_bought means "user has bought", and the data is recalled using the graph database. The format is kkv, where pk is the userid and sk is the itemId of the purchased product. new_item means new products, and is recalled using fixed query conditions. The query condition specified by the data source is item_batch_tags = new_item. It should be noted that the data source will not filter sales rules during the recall stage.
[0136] Step 4: Carry out cargo grouping calculations.
[0137] The spel rule calculation for each itemid is performed based on the results of the concurrent recall. In a certain data set, the corresponding variable is set to true, and the Boolean value of the expression indicates whether the item is included in the pallet.
[0138] / / Calculate the grouping logic of an itemid
[0139] StandardEvaluationContext context=new StandardEvaluationContext();
[0140] / / This item is purchased by the user, set to true
[0141] context.setVariable("user_bought",true);
[0142] / / This item is new, set to false
[0143] context.setVariable("new_item",false);
[0144] / / Configuration group rules
[0145] String exp1="#user_bought and#new_item";
[0146] / / Calculate the expression result. If it is true, the product is in the tray.
[0147] new SpelExpressionParser().parseExpression(exp1).getValue(context,Boolean.cla ss));
[0148] Step 5: Filter and customize the sorting based on saleable rules.
[0149] The group calculation obtains a list of itemIds, which are then filtered based on the saleable rules in the search engine.
[0150] Figure 7 A block diagram of a computing device is shown according to an example embodiment.
[0151] like Figure 7 As shown, computing device 30 includes processor 12 and memory 14. Computing device 30 may also include bus 22, network interface 16, and I / O interface 18. Processor 12, memory 14, network interface 16, and I / O interface 18 may communicate with each other via bus 22.
[0152] The processor 12 may include one or more general-purpose CPUs (Central Processing Units, processors), microprocessors, or application-specific integrated circuits, etc., for executing relevant program instructions. According to some embodiments, the computing device 30 may also include a high-performance graphics card (GPU) 20 for accelerating the processor 12.
[0153] The memory 14 may include a machine system readable medium in the form of a volatile memory, such as a random access memory (RAM), a read-only memory (ROM) and / or a cache memory. The memory 14 is used to store one or more programs including instructions and data. The processor 12 can read the instructions stored in the memory 14 to execute the above-mentioned method according to the embodiment of the present invention.
[0154] The computing device 30 may also communicate with one or more networks via the network interface 16. The network interface 16 may be a wireless network interface.
[0155] The bus 22 may include an address bus, a data bus, a control bus, etc. The bus 22 provides a path for exchanging information between components.
[0156] It should be noted that, in the specific implementation process, the computing device 30 may also include other components necessary for normal operation. In addition, those skilled in the art may understand that the above device may only include components necessary for implementing the embodiments of this specification, and need not include all components shown in the figure.
[0157] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above method when executed by a processor. The computer-readable storage medium may include, but is not limited to, any type of disk, including a floppy disk, an optical disk, a DVD, a CD-ROM, a microdrive, and a magneto-optical disk, a ROM, a RAM, an EPROM, an EEPROM, a DRAM, a VRAM, a flash memory device, a magnetic card or an optical card, a nanosystem (including a molecular memory IC), a network storage device, a cloud storage device, or any type of medium or device suitable for storing instructions and / or data.
[0158] An embodiment of the present invention also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute part or all of the steps of any method recorded in the above method embodiments.
[0159] Those skilled in the art can clearly understand that the technical solution of the present invention can be implemented with the help of software and / or hardware. "Unit" and "module" in this specification refer to software and / or hardware that can independently complete or cooperate with other components to complete specific functions, where the hardware can be, for example, a field programmable gate array, an integrated circuit, etc.
[0160] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0161] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0162] In the several embodiments provided by the present invention, it should be understood that the disclosed devices can be implemented in other ways. For example, the device embodiments described above are only schematic, such as the division of units, which is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some service interfaces, and the indirect coupling or communication connection of devices or units can be electrical or other forms.
[0163] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0164] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0165] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable memory. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product, which is stored in a memory and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.
[0166] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0167] The exemplary embodiments of the present invention are specifically shown and described above. It should be understood that the present invention is not limited to the detailed structures, configurations or implementations described herein; on the contrary, the present invention is intended to cover various modifications and equivalent configurations included in the spirit and scope of the appended clauses.
Claims
1. A method for calculating a pallet system based on a rule engine, characterized in that: include: Querying pallet meta information, wherein the pallet meta information includes grouping rules; Query the pallet data source according to the cargo grouping rule; Recalling pallet data according to the pallet data source; Cargo grouping calculation is performed based on the result of the cargo pallet data recall; A commodity list is obtained by calculating according to the group of commodities.
2. The method according to claim 1, characterized in that The grouping rules are set operation rules directly derived from the data source.
3. The method according to claim 1, characterized in that: The pallet data source is a set of commodities used for rule selection of pallets. The pallet only selects the pallet data source. The pallet data source specifies the sorting and is used in combination with the cutoff quantity.
4. The method according to claim 1, characterized in that: The pallet data is recalled according to the pallet data source, including: circling through existing fields, querying externally generated data sets and / or querying dynamic data sets.
5. The method according to claim 4, characterized in that Circle selection through existing fields is a direct recall on existing fields; The externally generated data set is connected to the external system through an offline table; The dynamic data set cannot be accessed through offline labeled data cascade.
6. The method according to claim 2, characterized in that The grouping rules are also used to translate the pallet data into the pallet data source when storing.
7. The method according to claim 5, characterized in that The pallet data source has customized filtering conditions; For product attributes that have been generated offline, they can be directly spliced into the online query as query conditions for dynamic filtering.
8. The method according to claim 1, characterized in that The pallet data is sorted by algorithm by default; and / or The pallet data is sorted as per requirement using custom developed fields.
9. A computer program product, characterized in that The method comprises a computer program, which implements the method according to any one of claims 1 to 8 when being executed by a processor.
10. A computing device, characterized in that include: processor; as well as A memory storing a computer program, which, when executed by the processor, enables the processor to perform the method according to any one of claims 1 to 9.
