Article selection method, device and equipment and computer readable storage medium
By separately synthesizing and filtering the tag tables of commodities, products and stores, the problem of long push time caused by low tag timeliness and large data volume in the existing technology is solved, and a more efficient product selection process is achieved.
Patent Information
- Application Number
- CN202310195472.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-24
- Publication Date
- 2024-08-27
AI Technical Summary
In the existing technology, the production cycles and timeliness of SKU, SPU and store labels are different. When synthesizing wide tables, the task links are complex, resulting in reduced label timeliness. In addition, the large amount of data results in a long push to the database, which affects Product selection efficiency.
Use separate label tables for commodities, products, and stores to reduce label fields, improve label timeliness, and use filtering conditions to select target products that meet product selection requirements in the label table set.
It effectively reduces the dependence and complexity between multi-dimensional data in the label processing process, improves the overall timeliness of labels, shortens the transmission time of label tables, and improves product selection efficiency.
Smart Images

Figure CN118552271A
Abstract
Description
Technical Field
[0001] The present application relates to the field of e-commerce technology, and relates to but is not limited to a product selection method, device, equipment and computer-readable storage medium. Background Art
[0002] In offline supermarkets and online platforms, various promotional activities are usually held at different times to increase sales. Product selection is to help merchants choose the products that can best achieve their goals.
[0003] One method of selecting products in the related art is to uniformly label the smallest stock keeping unit (SKU), the standardized product unit (SPU) and the store on the SKU to form a wide table with thousands of labels (corresponding to the fields in the database), and then select the target product from the wide table based on the product selection conditions. This product selection method has the following defects: Since the production cycle and timeliness of the SKU, SPU and store labels are different, it is necessary to wait for a large number of upstream label production tasks to be executed before synthesizing the wide table, and the task chain is long and complex; moreover, due to the complex associated logic, the task of synthesizing the wide table often takes a long time to complete, resulting in reduced label timeliness; in addition, in order to support product selection, the wide label table needs to be pushed to the database used to process the product selection logic. Due to the large amount of data and the large number of fields, it takes a long time to push it, resulting in reduced label timeliness. Summary of the invention
[0004] In view of this, embodiments of the present application provide a product selection method, device, equipment and computer-readable storage medium.
[0005] The technical solution of the embodiment of the present application is implemented as follows:
[0006] The present application provides a product selection method, the method comprising:
[0007] Obtaining product selection requirements and a label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to a data source;
[0008] Determine filtering conditions according to the multiple product selection tags, wherein the filtering conditions include commodity filtering conditions, product filtering conditions, and store filtering conditions;
[0009] According to the screening condition, target commodities meeting the product selection requirements are screened out in the label table set.
[0010] In some embodiments, obtaining a tag table set includes:
[0011] Search the commodity label table, product label table and store label table from the database to obtain the search results;
[0012] When the search result indicates that the target label table is not stored in the database, generating an acquisition task for acquiring the target label, the target label table including at least one of the following: a commodity label table, a product label table, and a store label table;
[0013] Execute the acquisition task to obtain the target tag corresponding to the target tag table;
[0014] The target label is added to the corresponding target label table to obtain a label table set.
[0015] In some embodiments, executing the acquisition task to obtain the target tag corresponding to the target tag table includes:
[0016] Get data sources and tagging rules;
[0017] According to the marking rule, marking processing is performed on the data source to obtain marked data;
[0018] Performing synthesis processing on the labeled data corresponding to the same target label to obtain synthesized data of the target label;
[0019] The synthetic data of the target tag is pushed to the database to obtain the target tag corresponding to the target tag table.
[0020] In some embodiments, determining the screening conditions according to the multiple product selection tags includes:
[0021] Filtering a target identifier from the multiple product selection tags, where the target identifier is one of the following: a commodity identifier, a product identifier, and a store identifier;
[0022] The target identifiers are concatenated to obtain corresponding screening conditions.
[0023] In some embodiments, the step of filtering out target products that meet the product selection requirements in the label table set according to the filtering condition includes:
[0024] According to the store screening condition and the product screening condition, a target store set including a target store is screened out in the store tag table and the product tag table;
[0025] According to the product screening condition and the commodity screening condition, a target product set including a target product is screened out in the product label table and the commodity label table;
[0026] According to the commodity screening condition, the target store set and the target product set, target commodities meeting the selection requirements are screened out in the commodity label table.
[0027] In some embodiments, the step of filtering out a target store set including a target store from the store tag table and the product tag table according to the store filtering condition and the product filtering condition includes:
[0028] According to the store screening condition, a first store set is screened out in the store tag table;
[0029] According to the product screening condition, a second store set is screened out in the product tag table;
[0030] Target stores that exist in both the first store set and the second store set are screened out to form a target store set.
[0031] In some embodiments, the step of filtering out a target product set including a target product from the product label table and the commodity label table according to the product screening condition and the commodity screening condition includes:
[0032] Filtering out a first product set in the product tag table according to the product screening condition;
[0033] Filtering out a second product set in the product tag table according to the product screening condition;
[0034] Target products that exist in both the first product set and the second product set are screened out to form a target product set.
[0035] The present application provides a product selection device, the device comprising:
[0036] An acquisition module is used to acquire product selection requirements and a label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to the data source;
[0037] A determination module, used to determine screening conditions according to the multiple product selection tags, wherein the screening conditions include commodity screening conditions, product screening conditions and store screening conditions;
[0038] The screening module is used to screen out target products that meet the product selection requirements in the label table set according to the screening conditions.
[0039] In some embodiments, the acquisition module is further used to:
[0040] A search unit, used to search the commodity label table, the product label table and the store label table from the database to obtain the search result;
[0041] a generating unit, configured to generate an acquisition task for acquiring a target tag when the search result indicates that the target tag table is not stored in the database, wherein the target tag table includes at least one of the following: a commodity tag table, a product tag table, and a store tag table;
[0042] An execution unit, configured to execute the acquisition task and obtain a target tag corresponding to the target tag table;
[0043] The adding unit is used to add the target label to the corresponding target label table to obtain a label table set.
[0044] In some embodiments, the execution unit is further configured to:
[0045] Get data sources and tagging rules;
[0046] According to the marking rule, marking processing is performed on the data source to obtain marked data;
[0047] Performing synthesis processing on the labeled data corresponding to the same target label to obtain synthesized data of the target label;
[0048] The synthetic data of the target tag is pushed to the database to obtain the target tag corresponding to the target tag table.
[0049] In some embodiments, the determining module includes:
[0050] A filtering unit, configured to filter out a target identifier from the plurality of product selection tags, wherein the target identifier is one of the following: a commodity identifier, a product identifier, and a store identifier;
[0051] The splicing unit is used to splice the target identifiers to obtain corresponding screening conditions.
[0052] In some embodiments, the screening module comprises:
[0053] A first screening unit, configured to screen a target store set including a target store in the store tag table and the product tag table according to the store screening condition and the product screening condition;
[0054] A second screening unit, configured to screen out a target product set including a target product in the product label table and the commodity label table according to the product screening condition and the commodity screening condition;
[0055] The third screening unit is used to screen out target commodities that meet the product selection requirements in the commodity label table according to the commodity screening conditions, the target store set and the target product set.
[0056] In some embodiments, the first screening unit is further used to:
[0057] According to the store screening condition, a first store set is screened out in the store tag table;
[0058] According to the product screening condition, a second store set is screened out in the product tag table;
[0059] Target stores that exist in both the first store set and the second store set are screened out to form a target store set.
[0060] In some embodiments, the second screening unit is further used to:
[0061] Filtering out a first product set in the product tag table according to the product screening condition;
[0062] Filtering out a second product set in the product tag table according to the product screening condition;
[0063] Target products that exist in both the first product set and the second product set are screened out to form a target product set.
[0064] An embodiment of the present application provides an electronic device, including:
[0065] Processor; and
[0066] a memory for storing a computer program executable on the processor;
[0067] Among them, when the computer program is executed by the processor, the steps of the above-mentioned product selection method are implemented.
[0068] An embodiment of the present application provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the steps of the above-mentioned product selection method.
[0069] The product selection method provided in the embodiment of the present application first uses the product selection device to obtain the product selection requirements and the label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to the data source, and there is no need to synthesize the wide label table, so that the label timeliness is greatly improved, and compared with the synthesized wide label table, the separately synthesized label table of the three dimensions of commodity, product, and store can reduce nearly half of the label fields, so that the time for transmitting the label table will be greatly shortened, further improving the label timeliness; then the product selection device determines the three different dimensions of screening conditions including commodity screening conditions, product screening conditions, and store screening conditions according to the multiple product selection labels; and then, according to the screening conditions, the target commodity that meets the product selection requirements is screened out in the label table set. The product selection method provided in the embodiment of the present application can effectively reduce the dependency and complexity between multidimensional data in the label processing process by separately synthesizing label tables of different dimensions, thereby improving the overall timeliness of the label. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In the drawings, which are not necessarily drawn to scale, like reference numerals may describe similar components in different views.The drawings generally illustrate, by way of example and not limitation, various embodiments discussed herein.
[0071] Figure 1 A schematic diagram of the network architecture of the product selection system provided in the embodiment of the present application;
[0072] Figure 2 A schematic diagram of an implementation flow of the product selection method provided in an embodiment of the present application;
[0073] Figure 3 A schematic diagram of an implementation flow of the step of obtaining a label table set in the product selection method provided in an embodiment of the present application;
[0074] Figure 4 A schematic diagram of an implementation flow of the step of screening target commodities in the product selection method provided in an embodiment of the present application;
[0075] Figure 5 A schematic diagram of an implementation flow of the label processing, synthesis and push process in the product selection method provided in an embodiment of the present application;
[0076] Figure 6 A schematic diagram of an implementation flow of a label selection process in a product selection method provided in an embodiment of the present application;
[0077] Figure 7 A schematic diagram of the composition structure of a product selection device provided in an embodiment of the present application;
[0078] Figure 8A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0079] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of this application.
[0080] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0081] In the following description, the terms "first\second\third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0082] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0083] Before further describing the embodiments of the present application in detail, the nouns and terms involved in the embodiments of the present application are explained as follows.
[0084] Product selection means determining your own niche market, that is, selecting products based on the preferences of a specific group of people and then confirming a product after multi-faceted research and analysis.
[0085] A wide table, literally speaking, is a database table with more fields, usually a database table that associates indicators, dimensions, and attributes related to a business topic.
[0086] SKU (Stock Keeping Unit) is the basic unit for measuring inventory in and out, which can be in units of pieces, boxes, pallets, etc. SKU is a necessary method for logistics management of large chain supermarket distribution centers. It has now been extended to the abbreviation of product unified numbering, and each product has a unique SKU number.
[0087] Standardized Product Unit (SPU) is the smallest unit of commodity information aggregation. It is a set of reusable and easily searchable standardized information that describes the characteristics of a product. In layman's terms, commodities with the same attribute values and characteristics can be called an SPU.
[0088] The current tag-based product selection solution is to uniformly tag SKU, SPU and store tags onto SKU, forming a wide table with thousands of tags (corresponding to fields in the database) to support product selection. This product selection method has the following defects: Since the production cycle and timeliness of SKU, SPU and store tags are different, it is necessary to wait for a large number of upstream tag production tasks to be executed before synthesizing the wide table, and the task chain is long and complex; moreover, due to the complex associated logic, the task of synthesizing the wide table often takes a long time to complete, resulting in reduced tag timeliness; in addition, in order to support product selection, the wide tag table needs to be pushed to the database used to process the product selection logic. Due to the large amount of data and many fields, it takes a long time to push it, resulting in reduced tag timeliness.
[0089] In order to solve the above defects, the embodiment of the present application provides a new type of label-based product selection solution. The method provided by the embodiment of the present application is described below in conjunction with the device for implementing the embodiment of the present application. First, the product selection system provided by the embodiment of the present application is described. Figure 1 , Figure 1 A schematic diagram of the network architecture of the product selection system provided in the embodiment of the present application is shown in FIG. Figure 1 As shown, the product selection system includes at least one terminal 100, a server 200 and a network 300. The terminal 100 is connected to the server 200 via the network 300, and the network 300 can be a wide area network or a local area network, or a combination of the two, and a wireless link is used to realize data transmission.
[0090] In some embodiments, the terminal 100 can be a laptop, a tablet computer, a desktop computer, a smart phone, a dedicated messaging device, a portable gaming device, a smart speaker, a smart watch, etc., or any device that can install an application. The server 200 can be an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server. The network 300 can be a wide area network or a local area network, or a combination of the two. The terminal 100 and the server 200 can be directly or indirectly connected via wired or wireless communication, which is not limited in the embodiments of the present application.
[0091] In the application scenario of the product selection system architecture, when a user needs to select products, he / she inputs product selection requirements on the terminal 100 . The terminal 100 generates a request message for product selection according to the product selection requirements and sends the generated request message to the server 200 .
[0092] After receiving the request message sent by the terminal 100, the server 200 parses it to obtain the product selection requirements, which include multiple product selection labels; obtains a label table set including a commodity label table, a product label table and a store label table, wherein the commodity label table, the product label table and the store label table are synthesized separately according to the data source; then determines the filtering conditions according to the multiple product selection labels, and the filtering conditions include commodity filtering conditions, product filtering conditions and store filtering conditions; according to the filtering conditions, filters out the target commodities that meet the product selection requirements in the label table set; finally, sends the target commodities to the terminal 100, so that the terminal 100 can place the target commodities.
[0093] The product selection method provided in the embodiment of the present application can effectively reduce the dependency and complexity between multidimensional data in the label processing process by separately synthesizing label tables of different dimensions, thereby improving the overall timeliness of the labels.
[0094] The following describes the product selection method provided by the embodiment of the present application. In some embodiments, the product selection method provided by the embodiment of the present application can be Figure 1 The server-side implementation of the network architecture shown, Figure 2 A schematic diagram of an implementation flow of the product selection method provided in the embodiment of the present application will be combined with Figure 2 The steps shown are explained.
[0095] Step S201, obtaining product selection requirements and label table set.
[0096] The embodiment of the present application can be executed by the product selection device in the server. When the user needs to select products, the user enters the product selection requirements on the product selection interface output by the terminal. The terminal generates a request message for selecting products according to the product selection requirements and sends the generated request message to the server. After receiving the request message sent by the terminal, the product selection device in the server parses it to obtain the product selection requirements, which include multiple product selection tags.
[0097] After receiving the product selection request, the product selection device obtains the label table set from the database. If the label table set is not stored in the database in advance, it is necessary to generate labels in real time according to the data source. Figure 3 To obtain the tag table set, follow these steps:
[0098] Step S301, searching the commodity label table, product label table and store label table from the database to obtain the search result.
[0099] Step S302, determining whether the search result is successful.
[0100] When the search result is a successful search, it indicates that the database stores a commodity label table, a product label table, and a store label table, and obtains a label table set, and then the process proceeds to step S202; when the search result is a failed search, it indicates that the database table does not store a commodity label table and / or a product label table and / or a store label table, and then the process proceeds to step S303.
[0101] Step S303: Generate an acquisition task for acquiring a target tag.
[0102] The target tag table here includes at least one of the following: a commodity tag table, a product tag table, and a store tag table. When the commodity tag table is not stored in the database, the acquisition task is used to acquire commodity tags; when the product tag table is not stored in the database, the acquisition task is used to acquire product tags; when the store tag table is not stored in the database, the acquisition task is used to acquire store tags; when the commodity tag table and the product tag table are not stored in the database, the acquisition task is used to acquire commodity tags and product tags; when the product tag table and the store tag table are not stored in the database, the acquisition task is used to acquire product tags and store tags; when the commodity tag table and the store tag table are not stored in the database, the acquisition task is used to acquire commodity tags and store tags; when the commodity tag table, the product tag table, and the store tag table are not stored in the database, the acquisition task is used to acquire commodity tags, product tags, and store tags.
[0103] Step S304, executing the acquisition task to obtain the target tag corresponding to the target tag table.
[0104] In some embodiments, the target tag corresponding to the target tag table can be obtained through the following steps: obtaining the data source and marking rules; marking the data source according to the marking rules to obtain marked data; synthesizing the marked data corresponding to the same target tag to obtain synthetic data of the target tag; pushing the synthetic data of the target tag to the database to obtain the target tag corresponding to the target tag table.
[0105] Step S305: Add the target tag to the corresponding target tag table to obtain a tag table set.
[0106] Taking the task of obtaining commodity labels and product labels as an example, the product selection device obtains a data source and a marking rule, and the marking rule is used to mark the information in the data source that meets the marking rule to produce a label. Then the product selection device performs marking processing on the data source according to the marking rule to obtain marking data, and the marking data includes marking data corresponding to the commodity label and marking data corresponding to the product label; the product selection device performs synthesis processing on the marking data corresponding to the commodity label to obtain synthetic data of the commodity label, pushes the synthetic data of the commodity label to the database, and adds it to the commodity label table as a commodity label to obtain a commodity label table; the product selection device performs synthesis processing on the marking data corresponding to the product label to obtain synthetic data of the product label, pushes the synthetic data of the product label to the database, and adds it to the product label table as a product label to obtain a product label table.
[0107] In the embodiment of the present application, in order to support product selection, the synthetic data of the target label needs to be pushed by the synthesis unit to a database suitable for processing the product selection logic to form a target label table.
[0108] Hive is a data warehouse tool based on Hadoop, which is used for data extraction, transformation and loading. It is a mechanism for storing, querying and analyzing large-scale data stored in Hadoop. The hive data warehouse tool can map structured data files to a database table, and provides SQL query functions, which can convert SQL statements into MapReduce tasks for execution. It is suitable for statistical analysis of data warehouses. ClickHouse, whose full name is Click Stream, DataWareHouse, is an open source columnar storage database (DBMS, DatabaseManagement System) for online analytical processing and query MPP architecture. It can use SQL queries to generate analytical data reports in real time. In actual applications, tags can be pushed from Hive to ClickHouse, a database suitable for processing product selection logic.
[0109] In the embodiment of the present application, the commodity label table, product label table and store label table are synthesized separately according to the data source, and there is no need to synthesize the wide label table, which greatly improves the timeliness of the label. Moreover, compared with the synthesized wide label table, the separately synthesized label table of the three dimensions of commodity, product and store can reduce nearly half of the label fields, so that the time for transmitting the label table will be greatly shortened, further improving the timeliness of the label.
[0110] Step S202, determining filtering conditions based on multiple product selection tags.
[0111] In an embodiment of the present application, the screening conditions can be determined according to the following steps: filtering out target identifiers from multiple product selection labels; and concatenating the target identifiers to obtain corresponding screening conditions.
[0112] The screening conditions here include commodity screening conditions, product screening conditions and store screening conditions; the target identifier is one of the following: commodity identifier, product identifier and store identifier. When determining the commodity screening conditions, all commodity identifiers are selected from multiple selection tags, and all commodity identifiers are spliced to obtain the commodity screening conditions.
[0113] Step S203: Filter out target products that meet the product selection requirements in the label table set according to the screening conditions.
[0114] In one implementation, target products that meet the product selection requirements can be selected from the tag table set according to Figure 4 The following steps are shown to achieve this:
[0115] Step S401, based on the store screening condition and the product screening condition, a target store set including the target store is screened out from the store tag table and the product tag table.
[0116] First, according to the store screening conditions, the first store set is screened out in the store tag table; then according to the product screening conditions, the second store set is screened out in the product tag table; finally, the target stores that exist in both the first store set and the second store set are screened out to form a target store set.
[0117] In one implementation, the first store set can be filtered out according to "SELECT shop_id FROM store tag table WHERE store filtering condition", and the second store set can be filtered out according to "SELECT spu_id FROM product tag table WHERE product filtering condition", and finally the intersection of the first store set and the second store set is calculated to obtain the target store.
[0118] In actual applications, the first filtered store set can be directly inserted into the store record table according to "INSERT INTO store record table SELECT shop_id FROM store tag table WHERE store filtering condition", and then the second filtered store set can be inserted into the store record table according to "INSERT INTO store record table SELECT shop_id FROM product tag table WHERE product filtering condition GROUP BY shop_id". Finally, according to "SELECT shop_id FROM store record table GROUP BY shop_id HAVING count(*)=2", the target stores that exist in both the first store set and the second store set can be filtered out from the store record table to form a target store set.
[0119] Step S402: Filter out a target product set including the target product in the product tag table and the commodity tag table according to the product screening condition and the commodity screening condition.
[0120] First, according to the product screening conditions, the first product set is screened out in the product label table; then according to the product screening conditions, the second product set is screened out in the product label table; finally, the target products that exist in both the first product set and the second product set are screened out to form a target product set.
[0121] In one implementation, the first product set can be filtered out according to "SELECT spu_id FROM product tag table WHERE product filtering condition", and the second product set can be filtered out according to "SELECT spu_id FROM product tag table WHERE product filtering condition", and finally the intersection of the first product set and the second product set is calculated to obtain the target product.
[0122] In actual applications, the first filtered product set can be directly inserted into the product record table according to "INSERT INTO product record table SELECT spu_id FROM product label table WHERE product filtering condition", and then the second filtered product set can be inserted into the product record table according to "INSERT INTO product record table SELECT spu_id FROM product label table WHERE product filtering condition GROUP BY spu_id". Finally, according to "SELECT spu_id FROM product record table GROUP BY spu_id HAVING count(*)=2", the target products that exist in both the first product set and the second product set are filtered out from the product record table to form a target product set.
[0123] Step S403, based on the product screening conditions, the target store set and the target product set, screen out target products that meet the product selection requirements in the product tag table.
[0124] In actual applications, you can filter out target products that meet the selection requirements from the product tag table based on "SELECT sku_id FROM product tag table WHERE product screening condition AND spu_id in target product set AND shop_id in target shop set".
[0125] The product selection method provided in the embodiment of the present application first uses the product selection device to obtain the product selection requirements and the label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to the data source, and there is no need to synthesize the wide label table, so that the label timeliness is greatly improved, and compared with the synthesized wide label table, the separately synthesized label table of the three dimensions of commodity, product, and store can reduce nearly half of the label fields, so that the time for transmitting the label table will be greatly shortened, further improving the label timeliness; then the product selection device determines the three different dimensions of screening conditions including commodity screening conditions, product screening conditions, and store screening conditions according to the multiple product selection labels; and then, according to the screening conditions, the target commodity that meets the product selection requirements is screened out in the label table set. The product selection method provided in the embodiment of the present application can effectively reduce the dependency and complexity between multidimensional data in the label processing process by separately synthesizing label tables of different dimensions, thereby improving the overall timeliness of the label.
[0126] The following is an explanation of an exemplary application of the embodiments of the present application in a practical application scenario.
[0127] The existing tag-based product selection solution is to uniformly add SKU, SPU and store tags to SKU, forming a wide table with thousands of tags (corresponding to fields in the database) to support product selection. This tag-based product selection solution has the following defects:
[0128] 1) The label production cycle and timeliness of SKUs, SPUs, and stores are different. Before synthesizing the wide table, a large number of upstream label production tasks need to be performed, and the task chain is long and complex;
[0129] 2) After a large number of label production tasks are completed, the task of synthesizing a wide table is executed. Due to the complex associated logic, the task of synthesizing a wide table often takes a long time to complete, resulting in reduced label timeliness;
[0130] 3) In order to support product selection, the wide label table needs to be pushed from Hive to ClickHouse, a database suitable for processing product selection logic. However, due to the large amount of data and many fields, it takes a long time to complete the push, resulting in reduced label timeliness.
[0131] To solve the above problems, the embodiment of the present application provides a new label-based product selection processing solution: SKU, SPU and store are separated, and labels are synthesized, pushed and stored independently, so that the SKU label table (corresponding to the product label table in the above text) only needs to maintain the labels of its own dimension, as well as the SPU and store to which it belongs. It is not necessary to add all SPU labels and store labels to the SKU label for maintenance, but to separately maintain the SPU label table (corresponding to the product label table in the above text) and the store label table. This not only solves the problem that the SKU label processing task needs to wait for both the SPU label and the store label, but also decomposes and simplifies the wide table synthesis logic and the push product selection database, making it easy to maintain, convenient for parallel execution of tasks, and improving efficiency and the timeliness of labels.
[0132] The product selection solution provided in the embodiment of the present application is introduced in detail below. The product selection solution provided in the embodiment of the present application mainly consists of three parts, namely label processing and synthesis, label push and label selection. Figure 5 A schematic diagram of an implementation flow of the label processing and synthesis process and the label push process in the product selection method provided in the embodiment of the present application, such as Figure 5 As shown, when label processing and synthesis is performed, label synthesis tasks and label push tasks are performed on SKU, SPU and store respectively, and label tables are stored respectively.
[0133] 1) Label processing and synthesis
[0134] The SKU tag table (corresponding to the product tag table mentioned above) is processed and synthesized separately. All SPU tags and store tags are no longer redundantly added to the SKU tag table. Only the SPU (spu_id) and store (shop_id) to which the SKU belongs are retained in the SKU tag table, and the SPU tag table (corresponding to the product tag table mentioned above) and store tag table are maintained separately. In this way, there is no need to wait for all SPU tags and all store tags to be available before executing the task of synthesizing the wide table, and the processing logic of the associated SPU tags and store tags can be reduced.
[0135] The SKU label table is processed and synthesized separately. The fields of the SKU label table are shown in Table 1 below:
[0136] Table 1 SKU label table fields
[0137] sku_id spu_id shop_id sku label 1 sku label 2 sku label 3 …… sku label
[0138] As shown in Table 1, the SKU label table only stores the spu_id of the SPU to which it belongs and the shop_id of the store, and no longer stores detailed SPU labels and store labels.
[0139] The SPU label table is processed and synthesized separately, and the fields of the SPU label table are shown in Table 2 below:
[0140] Table 2 SPU label table fields
[0141] spu_id spu label 1 spu tag 2 spu label 3 …… spu label n
[0142] The store tag table is processed and synthesized separately, and the store tag table fields are shown in Table 3 below:
[0143] Table 3 Store tag table fields
[0144] shop_id Shop Tag 1 Shop Tag 2 Shop Tag 3 …… Shop Tags
[0145] Taking SKU label as an example, perform the upstream task of SKU label: according to the label marking rules, combined with the SKU label table fields shown in Table 1, label the data source, identify the product sku_id, the spu_id of the SPU to which the product belongs, the shop_id of the store to which it belongs, and the n labels of the product: sku label 1, sku label 2, sku label 3, ..., sku label n, and obtain the SKU label; continue to identify the next product until the execution is completed, and obtain the SKU labels of all products; then perform the SKU label synthesis task. Similarly, perform the SPU label synthesis task and the store label synthesis task.
[0146] 2) Tag push
[0147] It usually only takes tens of minutes to push the SPU tag table, and a few minutes to push the store tag table. However, due to the large amount of data and many fields, it takes several hours to push the SKU tag table. Figure 5 As shown, in the embodiment of the present application, the above three independent tasks are still executed during push. Since the SKU, SPU and store labels are processed and synthesized separately, the SKU label table can reduce the number of label fields by nearly half, which greatly shortens the time for pushing the SKU label table, thereby greatly improving the timeliness of the label.
[0148] Figure 6 A schematic diagram of an implementation flow of the label selection process in the product selection method provided in the embodiment of the present application. In the original product selection method, after synthesizing the wide table form, only one filtering is required during product selection to select all SKUs that meet the condition requirements. However, in the embodiment of the present application, after separating the SPU label and the store label from the wide table, the SPU label and the store label in the product selection strategy need to be processed in the following steps before all SKUs that meet the requirements are selected.
[0149] Step 1: According to the store tags obtained by product selection strategy analysis, filter out the shop_id that meets the requirements in the store tag table and add the results to the store record table;
[0150] SQL: INSERT INTO shop record table SELECT shop_id FROM shop tag table WHERE shop filter condition.
[0151] Step 2: According to the SKU tags obtained by product selection strategy analysis, filter out the shop_ids that meet the conditions and remove duplicates in the SKU tag table, and add the results to the store record table;
[0152] SQL: INSERT INTO shop record table SELECT shop_id FROM SKU tag table WHERE SKU filter condition GROUP BY shop_id.
[0153] Step 3: Take the intersection of the shop_ids obtained in step 1 and step 2 (i.e., shop_id appears twice) to get the set of shop_ids;
[0154] SQL: SELECT shop_id FROM shop record table GROUP BY shop_id HAVING count(*)=2.
[0155] Step 4: Process the SPU label in the same way as the previous three steps to obtain a set of spu_ids;
[0156] SQL: INSERT INTO SPU record table SELECT spu_id FROM SPU tag table WHERE SPU filter condition;
[0157] INSERT INTO SPU record table SELECT spu_id FROM SKU tag table WHERE SKU filter condition GROUP BY spu_id;
[0158] SELECT spu_id FROM SPU record table GROUP BY spu_id HAVING count(*)=2.
[0159] Step 5. Add the following filter conditions to the filter conditions formed by the SKU tags obtained by parsing the product selection strategy: shop_id in (shop_id set in step 3) and spu_id in (spu_id set in step 4), and then execute it in the SKU tag table to obtain the products that meet the strategy requirements.
[0160] SQL: SELECT sku_id FROM SKU tag table WHERE SKU filter condition AND spu_id in (SPU with number equal to 2) AND shop_id in (shop with number equal to 2).
[0161] The embodiment of the present application can effectively reduce the complexity of label processing and synthesis by decomposing the wide label table into labels of three dimensions: SKU, SPU, and store, thereby improving the timeliness of the label as a whole. When a label of a new dimension (such as a brand) appears, it is still only necessary to add and maintain an affiliated brand to the SKU. Label tables of different dimensions can be parsed and processed in parallel, and ultimately used for product selection, which can improve the overall efficiency of product selection. Under the premise of not reducing the timeliness of the label, the complexity of product selection processing is not increased.
[0162] Based on the foregoing embodiments, the embodiments of the present application provide a product selection device, and the modules included in the device and the units included in the modules can be implemented by a processor in a computer device; of course, they can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU, Central Processing Unit), a microprocessor (MPU, Microprocessor Unit), a digital signal processor (DSP, Digital Signal Processing) or a field programmable gate array (FPGA, Field Programmable Gate Array), etc.
[0163] The present application embodiment further provides a product selection device, Figure 7 A schematic diagram of the composition structure of a product selection device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the product selection device 700 includes:
[0164] An acquisition module 701 is used to acquire product selection requirements and a label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to a data source;
[0165] A determination module 702 is used to determine a screening condition according to the multiple product selection tags, wherein the screening condition includes a commodity screening condition, a product screening condition and a store screening condition;
[0166] The screening module 703 is used to screen out target products that meet the product selection requirements in the label table set according to the screening conditions.
[0167] In some embodiments, the acquisition module 701 includes:
[0168] A search unit, used to search the commodity label table, the product label table and the store label table from the database to obtain the search result;
[0169] a generating unit, configured to generate an acquisition task for acquiring a target tag when the search result indicates that the target tag table is not stored in the database, wherein the target tag table includes at least one of the following: a commodity tag table, a product tag table, and a store tag table;
[0170] An execution unit, configured to execute the acquisition task and obtain a target tag corresponding to the target tag table;
[0171] The adding unit is used to add the target label to the corresponding target label table to obtain a label table set.
[0172] In some embodiments, the execution unit is further configured to:
[0173] Get data sources and tagging rules;
[0174] According to the marking rule, marking processing is performed on the data source to obtain marked data;
[0175] Performing synthesis processing on the labeled data corresponding to the same target label to obtain synthesized data of the target label;
[0176] The synthetic data of the target tag is pushed to the database to obtain the target tag corresponding to the target tag table.
[0177] In some embodiments, the determining module 702 includes:
[0178] A filtering unit, configured to filter out a target identifier from the plurality of product selection tags, wherein the target identifier is one of the following: a commodity identifier, a product identifier, and a store identifier;
[0179] The splicing unit is used to splice the target identifiers to obtain corresponding screening conditions.
[0180] In some embodiments, the screening module 703 includes:
[0181] A first screening unit, configured to screen a target store set including a target store in the store tag table and the product tag table according to the store screening condition and the product screening condition;
[0182] A second screening unit, configured to screen out a target product set including a target product in the product label table and the commodity label table according to the product screening condition and the commodity screening condition;
[0183] The third screening unit is used to screen out target commodities that meet the product selection requirements in the commodity label table according to the commodity screening conditions, the target store set and the target product set.
[0184] In some embodiments, the first screening unit is further used to:
[0185] According to the store screening condition, a first store set is screened out in the store tag table;
[0186] According to the product screening condition, a second store set is screened out in the product tag table;
[0187] Target stores that exist in both the first store set and the second store set are screened out to form a target store set.
[0188] In some embodiments, the second screening unit is further used to:
[0189] Filtering out a first product set in the product tag table according to the product screening condition;
[0190] Filtering out a second product set in the product tag table according to the product screening condition;
[0191] Target products that exist in both the first product set and the second product set are screened out to form a target product set.
[0192] It should be noted here that the description of the above product selection device embodiment is similar to the above method description and has the same beneficial effects as the method embodiment. For technical details not disclosed in the product selection device embodiment of this application, those skilled in the art should refer to the description of the method embodiment of this application for understanding.
[0193] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM, Read Only Memory), a disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0194] Accordingly, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the product selection method provided in the above embodiment are implemented.
[0195] The present application embodiment provides an electronic device for selecting products. Figure 8 A schematic diagram of a composition structure of an electronic device provided in an embodiment of the present application, according to Figure 8 The exemplary structure of the electronic device 800 shown can foresee other exemplary structures of the electronic device 800, so the structure described here should not be regarded as limiting. For example, some components described below can be omitted, or components not described below can be added to meet the special needs of certain applications.
[0196] Figure 8 The electronic device 800 shown includes: a processor 801, at least one communication bus 802, a user interface 803, at least one external communication interface 804 and a memory 805. The communication bus 802 is configured to realize the connection and communication between these components. The user interface 803 may include a display screen, and the external communication interface 804 may include a standard wired interface and a wireless interface. The processor 801 is configured to execute the program of the product selection method stored in the memory to implement the steps in the product selection method provided in the above embodiment.
[0197] The description of the above electronic device and storage medium embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the electronic device and storage medium embodiments of the present application, please refer to the description of the method embodiments of the present application for understanding.
[0198] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0199] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0200] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units 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 can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0201] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; 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 present embodiment.
[0202] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0203] A person of ordinary skill in the art can understand that: all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0204] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks or optical disks.
[0205] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A product selection method, It is characterized in that The method comprises: Obtaining product selection requirements and a label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to a data source; Determine filtering conditions according to the multiple product selection tags, wherein the filtering conditions include commodity filtering conditions, product filtering conditions, and store filtering conditions; According to the screening condition, target commodities meeting the product selection requirements are screened out in the label table set.
2. The method according to claim 1, It is characterized in that Get the tag table set, including: Search the commodity label table, product label table and store label table from the database to obtain the search results; When the search result indicates that the target label table is not stored in the database, generating an acquisition task for acquiring the target label, the target label table including at least one of the following: a commodity label table, a product label table, and a store label table; Execute the acquisition task to obtain the target tag corresponding to the target tag table; The target label is added to the corresponding target label table to obtain a label table set.
3. The method according to claim 2, It is characterized in that The executing the acquisition task to obtain the target tag corresponding to the target tag table includes: Get data sources and tagging rules; According to the marking rule, marking processing is performed on the data source to obtain marked data; Performing synthesis processing on the labeled data corresponding to the same target label to obtain synthesized data of the target label; The synthetic data of the target tag is pushed to the database to obtain the target tag corresponding to the target tag table.
4. The method according to claim 1, It is characterized in that Determining the screening conditions according to the multiple product selection tags includes: Filtering a target identifier from the multiple product selection tags, where the target identifier is one of the following: a commodity identifier, a product identifier, and a store identifier; The target identifiers are concatenated to obtain corresponding screening conditions.
5. The method according to claim 1, It is characterized in that The step of filtering out target commodities that meet the selection requirements in the label table set according to the filtering condition includes: According to the store screening condition and the product screening condition, a target store set including a target store is screened out in the store tag table and the product tag table; According to the product screening condition and the commodity screening condition, a target product set including a target product is screened out in the product label table and the commodity label table; According to the commodity screening condition, the target store set and the target product set, target commodities meeting the selection requirements are screened out in the commodity label table.
6. The method according to claim 5, It is characterized in that The step of filtering out a target store set including a target store in the store tag table and the product tag table according to the store screening condition and the product screening condition includes: According to the store screening condition, a first store set is screened out in the store tag table; According to the product screening condition, a second store set is screened out in the product tag table; Target stores that exist in both the first store set and the second store set are screened out to form a target store set.
7. The method according to claim 5, It is characterized in that The step of screening out a target product set including a target product in the product label table and the commodity label table according to the product screening condition and the commodity screening condition includes: Filtering out a first product set in the product tag table according to the product screening condition; Filtering out a second product set in the product tag table according to the product screening condition; Target products that exist in both the first product set and the second product set are screened out to form a target product set.
8. A product selection device, It is characterized in that The device comprises: An acquisition module is used to acquire product selection requirements and a label table set, wherein the product selection requirements include multiple product selection labels, and the label table set includes a commodity label table, a product label table, and a store label table, wherein the commodity label table, the product label table, and the store label table are synthesized separately according to the data source; A determination module, used to determine a screening condition according to the multiple product selection tags, wherein the screening condition includes a commodity screening condition, a product screening condition and a store screening condition; The screening module is used to screen out target products that meet the product selection requirements in the label table set according to the screening conditions.
9. An electronic device, It is characterized in that include: processor; as well as a memory for storing a computer program executable on the processor; Wherein, when the computer program is executed by a processor, the steps of the product selection method described in any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, It is characterized in that Computer executable instructions are stored, and the computer executable instructions are configured to execute the steps of the product selection method described in any one of claims 1 to 7.
