List data processing method and system based on multiple scenes and electronic equipment
By generalized the screening conditions of the screening conditions in the list of the list data table, the problem of low scalability and increased code complexity caused by the design of the list data table design is solved. Difficulty.
Patent Information
- Application Number
- CN202411347914.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-26
- Publication Date
- 2025-01-21
AI Technical Summary
Existing list data table design leads to problems such as low scalability, confusion in database design and increased code complexity.
Adopting the screening conditions based on the JSON field type type, generalization of the screening field through the JSON field type is avoided to avoid the needs of new data table fields.
A user -side query can be achieved without adding data table fields in a variety of scenarios, reducing the difficulty of database maintenance, and improving the user experience and satisfaction.
Smart Images

Figure CN119336961A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and specifically to a list data processing method, system and electronic device based on multiple scenarios. Background Art
[0002] With the popularization and development of the Internet, the amount of information has exploded. Lists, as an effective form of information organization, can not only help users quickly find content of interest, but also stimulate market competition and innovation.
[0003] In order to allow users to quickly search or locate the content they want, in addition to publishing various types of lists (such as sales rankings, popularity rankings, and praise rankings, etc.), it is usually also supported to further filter the stores, products, and people on the lists. For example, in the field of local life services, geographic location filtering is often added (users can freely choose the business district or administrative district where they are located), category filtering (for example, under the sales ranking, you can further filter categories such as bars, escape rooms, and KTVs), label filtering (for example, the dinner ranking can further filter couples dating, business banquets, family and friends gatherings, etc.), price filtering, and so on.
[0004] The filtering mechanism can be further explained. For example, there is a food review list with 100 merchants on the list. After the user enters the list page, he can further narrow the scope within these 100 merchants through filtering items such as cuisine (such as Sichuan cuisine, local cuisine, etc.) and business district to get what he wants.
[0005] As mentioned above, at the product level, there are various types of lists (sales list, positive review list, etc.) and various screening conditions (geographic location screening, category screening, etc.). In terms of technical implementation, there are two core steps: list generation and list query. List production means generating the list in advance through tasks (task scheduling is generally daily), and completing the update and storage of list table data through data collection, rule calculation, etc. List query mainly provides an API interface for the user side, and returns page data to the user side by retrieving the list table, assembling display content, etc. The focus is on the design of the list table. The list type can be distinguished by the rank_type field, but the screening conditions are generally implemented by adding new columns to the data table. For example, the design of a store list table is generally:
[0006] id: primary key id;
[0007] rank_type: list type, such as sales ranking, positive review ranking, etc.
[0008] shop_id: store id;
[0009] score: score, calculated based on the list rules;
[0010] gene_date: the time when the list was created, day / month / year is acceptable;
[0011] city: the city where the store is located, used for filtering;
[0012] area: the business district where the store is located, used for screening;
[0013] Category: the category of the store, such as restaurant, KTV, bath, etc., used for filtering;
[0014] tag: store tag, used for filtering;
[0015] update_time: record update time;
[0016] create_time: record creation time.
[0017] The table design of the above filter items will lead to the following problems:
[0018] Low scalability: When there is a new filtering condition, a new column needs to be added to the data table and the relevant application layer code needs to be modified;
[0019] Chaotic database design: As the number of field columns increases, the database design becomes chaotic. Multiple fields may express the same or similar information, resulting in data redundancy and inconsistency.
[0020] Increased code complexity: Application code may need to be frequently modified to accommodate new fields, causing the code base to become increasingly complex and difficult to understand and maintain. Summary of the invention
[0021] The purpose of the present invention is to provide a list data processing method, system and electronic device based on multiple scenarios, which provides users with a new way to filter the contents of various forms, solves the problems of low scalability, chaotic database design and increased code complexity caused by table design of filtering items, thereby reducing the difficulty of database maintenance.
[0022] To achieve the above object, the present invention provides the following technical solutions:
[0023] In a first aspect, the present application provides a method for processing list data based on multiple scenarios, the method comprising:
[0024] Responding to the list-related data request message sent by the user, determining the list table corresponding to the requested list-related table data;
[0025] Feeding back the list table to the front-end list page, and obtaining a list table query request generated by the list content and list filter items selected by the user through the front-end list page;
[0026] Define the filter conditions according to the list content and list filter items selected in the list table query request;
[0027] The list table is queried based on the screening condition, and the list content requested for the search is obtained by screening the list table.
[0028] Optionally, the list table corresponding to the list-related table data of the determination request includes:
[0029] Create a list generation task and traverse all merchants participating in the list task;
[0030] Get the merchant's indicator data, including star rating and number of positive reviews;
[0031] According to the predefined ranking rules, the scores of each merchant's index data are calculated and arranged in descending order according to the scores; and a preset number of merchant information is selected in order from high to low according to the scores and stored in the database to generate a ranking table;
[0032] The list table includes: list table fields corresponding to each merchant information;
[0033] The list table fields include: ID primary key, list type, store id, score, list production time, filter item filter_1, filter item filter_2, filter item filter_3, filter item filter_4, update time and creation time.
[0034] Optionally, the list-related table data includes: a list table of at least one list type;
[0035] The list types are defined according to different application scenarios, including business categories, product types, and service areas.
[0036] Optionally, the creating list generation task further includes:
[0037] Add the list generation task to the queue for multi-threaded processing, and automatically start the task after the thread is created.
[0038] Optionally, feeding back the list table to the front-end list page includes:
[0039] Determine whether the user who requests to query the list is visiting the front-end list page for the first time; if so, for the first query request, search the list based on the list type and list creation time to obtain the filter items and list content of the first query request; otherwise, directly return all the filter items and list content of the list and display them on the front-end list page.
[0040] Optionally, defining a filtering condition according to the list content and list filtering items selected in the list table query request includes:
[0041] The list content and list filter items selected in the list table query request are used as the list table filter fields;
[0042] Based on the JSON field type of SQL, the list table screening field is generalized and processed into a standardized format that is unified with the JSON field type;
[0043] The JSON fields include: filter item type, filter item display name, and parameter value of the filter item in the system; the filter item types include: business district, service category, price, and label;
[0044] When a new filter item type is added, the filter condition is obtained by assigning a value to the filter item type.
[0045] Optionally, querying the list table based on the screening condition and screening the list table to obtain the list content requested for the query includes:
[0046] According to the list type of the list table query request, the corresponding list table in the database is called, and the list content matching the filter item type and value in the filter condition is searched in the list table.
[0047] In a second aspect, the present application provides a list data processing system based on a complex scenario, the system comprising:
[0048] A response analysis module, used to respond to a list-related data request message sent by a user and determine the list table corresponding to the requested list-related table data;
[0049] An acquisition module is used to feed back the list table to the front-end list page, and to acquire the list table query request generated by the list content and list filter items selected by the user through the front-end list page;
[0050] A definition module is used to define filtering conditions according to the list content and list filtering items selected in the list table query request;
[0051] The screening module is used to query the list table based on the screening conditions, and to filter the list table to obtain the list content requested for the query.
[0052] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any one of the methods described in the first aspect when executing the computer program.
[0053] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any one of the methods described in the first aspect.
[0054] The beneficial effects of the present invention are embodied in:
[0055] The above-provided method, system and electronic device for processing list data based on multiple scenarios include responding to the list-related data request message sent by the user, determining the list table corresponding to the requested list-related table data; feeding back the list table to the front-end list page, and obtaining the list table query request generated by the list content and list filter items selected by the user through the front-end list page; defining the filter conditions according to the list content and list filter items selected in the list table query request; querying the list table based on the filter conditions, and filtering the list table to obtain the requested list content. This makes the relevant functions and content more clear and complete for the user, improving the user experience and satisfaction. The above scheme can realize user-side query in the face of various scenarios without adding new data table fields.
[0056] According to the above-mentioned list data processing method based on multiple scenarios, the generalization of the filter field is realized through the JSON field type of the MySQL database. That is, when there is a new filter condition, there is no need to add a field with a specific meaning to the database table field, but a new type value can be agreed upon. The problem of low scalability, chaotic database design, and increased code complexity caused by the table design of the filter items is solved, thereby reducing the difficulty of database maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following is a brief introduction to the drawings required for the specific embodiments or the description of the prior art. In all the drawings, similar elements or parts are generally identified by similar reference numerals. In the drawings, the elements or parts are not necessarily drawn according to the actual scale.
[0058] Figure 1 A flowchart of a list data processing method based on multiple scenarios provided by the present invention;
[0059] Figure 2 A flowchart of a list generation task creation method provided by the present invention;
[0060] Figure 3 A flowchart of the interaction between the user terminal and the front-end display interface provided by the present invention;
[0061] Figure 4 A schematic diagram of the structure of the list data processing system based on multiple scenarios provided by the present invention;
[0062] Figure 5 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION
[0063] 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. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0064] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. The singular forms "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0065] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0066] It should be understood that although the terms first, second, third, etc. may be used to describe in the embodiments of the present application, these descriptions should not be limited to these terms. These terms are only used to distinguish the descriptions. For example, without departing from the scope of the embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first.
[0067] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0068] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity 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 commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0069] It should be particularly noted that any symbols and / or numbers in the specification that are not marked in the accompanying drawings are not drawing marks.
[0070] The embodiments of the present application provide a method, system and electronic device for processing list data based on multiple scenarios, which are mainly used in various types of terminal devices. The method can be applied to a terminal, a server, or a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. Among them, the terminal can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, etc. The above-mentioned method, system and electronic device for processing list data based on multiple scenarios provided by the embodiments of the present application can solve the problems of low scalability, confusing database design and increased code complexity caused by the table design based on filter items in the prior art.
[0071] Reference Figure 1 , an embodiment of the present invention provides a method for processing list data based on multiple scenarios, the method comprising:
[0072] S11 responds to the list-related data request message sent by the user, and determines the list table corresponding to the requested list-related table data;
[0073] S12 feeds the list table back to the front-end list page, and obtains a list table query request generated by the list content and list filter items selected by the user through the front-end list page;
[0074] S13 defines a filtering condition according to the list content and list filtering items selected in the list table query request;
[0075] S14 queries the list table based on the screening condition, and filters the list table to obtain the list content requested for the search.
[0076] In the above embodiment, the list table corresponding to the list-related table data requested in step S11 includes:
[0077] Create a list generation task and traverse all merchants participating in the list task;
[0078] Get the merchant's indicator data, including star rating and number of positive reviews;
[0079] According to the predefined ranking rules, the scores of each merchant's index data are calculated and arranged in descending order according to the scores; and a preset number of merchant information is selected in order from high to low according to the scores and stored in the database to generate a ranking table;
[0080] The list table includes: list table fields corresponding to each merchant information;
[0081] The list table fields include: ID primary key, list type, store id, score, list production time, filter item filter_1, filter item filter_2, filter item filter_3, filter item filter_4, update time and creation time.
[0082] In the above embodiment, the list-related table data in step S11 includes: a list table of at least one list type;
[0083] The list types are defined according to different application scenarios, including business categories, product types, and service areas.
[0084] In the above embodiment, after creating the list generation task, the following steps are also included:
[0085] Add the list generation task to the queue for multi-threaded processing, and automatically start the task after the thread is created.
[0086] In the above embodiment, step S12 of feeding back the list table to the front-end list page includes:
[0087] Determine whether the user who requests to query the list is visiting the front-end list page for the first time; if so, for the first query request, search the list based on the list type and list creation time to obtain the filter items and list content of the first query request; otherwise, directly return all the filter items and list content of the list and display them on the front-end list page.
[0088] In the above embodiment, step S13 defines the filtering conditions according to the list content and list filtering items selected in the list table query request, including:
[0089] The list content and list filter items selected in the list table query request are used as the list table filter fields;
[0090] Based on the JSON field type of SQL, the list table screening field is generalized and processed into a standardized format that is unified with the JSON field type;
[0091] The JSON fields include: filter item type, filter item display name, and parameter value of the filter item in the system; the filter item types include: business district, service category, price, and label;
[0092] When a new filter item type is added, the filter condition is obtained by assigning a value to the filter item type.
[0093] The above embodiment implements the generalization of the filter field through the JSON field type of the MySQL database. That is, when there is a new filter condition, no new fields with specific meanings are added to the database table fields, such as the city field city and the category field category, but generalization is implemented through the JSON field type, and the JSON content is specifically:
[0094] {
[0095] "type":"", / / The type of filter item, such as business district, service category, price, label, etc.
[0096] "name":"", / / The display name of the filter item (for users)
[0097] "value":"" / / The parameter value of this filter item in the system
[0098] }.
[0099] When a new filter item type is added, there is no need to create a new field in the list table. Just agree on a new type value.
[0100] In addition, based on user experience and other considerations, the default list filtering conditions will not exceed 4, so add filter_1, filter_2, filter_3, and filter_4 columns as filtering columns in the list data table. Then the list table design becomes:
[0101] ●id: primary key id;
[0102] ·rank_type: list type, such as sales ranking, positive review ranking, etc.;
[0103] shop_id: store id, or product_id, etc., can be designed based on the listed entity;
[0104] score: score, calculated based on the list rules;
[0105] ·gene_date: the time when the list was created, day / month / year is acceptable;
[0106] filter_1: filter item 1 information, used for filtering;
[0107] filter_2: filter item 2 information, used for filtering;
[0108] filter_3: filter item 3 information, used for filtering;
[0109] filter_4: filter item 4 information, used for filtering;
[0110] update_time: record update time;
[0111] create_time: records the creation time.
[0112] When querying, for example, if you need to retrieve filter item 1, you can use the MySQL syntax JSON_EXTRACT(filter_1,'$.type')='xx'and JSON_EXTRACT(filter_1,'$.value')='xx' to query. This SQL indicates a constrained retrieval of the type and value of the filter item.
[0113] In this embodiment, step S14 queries the list table based on the screening conditions, and the list content obtained by screening the list table to obtain the requested query includes:
[0114] According to the list type of the list table query request, the corresponding list table in the database is called, and the list content matching the filter item type and value in the filter condition is searched in the list table.
[0115] In order to make the technical solution and advantages of the present disclosure clearer, the content of the solution is described below with a specific case:
[0116] Suppose a food review list is generated, updated on a daily basis, and the page filter condition is the business district (taking Shanghai as an example,
[0117] Business districts include Lujiazui, Xujiahui, etc.), and cuisines (hot pot, Cantonese cuisine, Sichuan cuisine, etc.).
[0118] First create a list generation task, such as Figure 2 ; The main purpose is to generate the list-related table data in advance. Execute as follows:
[0119] Step S101, traverse merchants and obtain merchant-related indicator data, such as rating star rating, number of positive reviews, etc.;
[0120] Step S102, calculating the merchant score according to the business rules;
[0121] Step S103, sort in descending order by score, take the top N merchants and store them in the MySQL list table. The list table fields include: ID primary key, list type, store id, score, list generation time, filter_1, filter_2, filter_3, filter_4, update time, creation time.
[0122] Then the table data may be:
[0123]
[0124] The filter_1 column stores the information about the business district to which the store belongs. type=03 indicates the business district type, and value is the value of the business district in the system; for example, 11 indicates Lujiazui and 12 indicates Xujiahui. The filter_2 column stores the information about the cuisine served by the store. type=30 indicates the cuisine type, and value is the value of the cuisine in the system; for example, 11 indicates hot pot and 12 indicates Sichuan cuisine.
[0125] In addition, since the food review list has only two filter items, filter_3 and filter_4 in the list table are empty.
[0126] After the relevant data of the list is generated, the interactive steps of the list page (user end) are as follows: Figure 3 .
[0127] Step S201: The user enters the food review ranking page for the first time. The front end sends a request:
[0128] {
[0129] "rankType":"002",
[0130] "filter1":null,
[0131] "filter2":null,
[0132] "filter3":null,
[0133] "filter4":null
[0134] }, where rankType:002 indicates that the list type is a food review list, filter1, filter2, filter3, and filter4 indicate the filter conditions. Since this is the first time the user enters, the filter item request is empty.
[0135] The server receives the request from the front-end and returns the list filter items and list content for page display.
[0136] Among them. The filter items can be determined through the configuration center and other methods to determine which filters the list supports. For the list content requested for the first time, the server query list table sql is:
[0137] select*from rank_table where rank_type='002'AND gene_date='2024-08-15'order by score desc. At this time, there is no filter item search involved, only the list type and list creation time search. The gene_date server can default to the current date. After getting the shopid list, call the store display service to assemble and return the display information (such as store name, average price, store pictures, etc.).
[0138] Step S202, after the page displays the obtained filter items, the user can manually adjust the filter items for further filtering, for example, filtering the business district as Lujiazui and the cuisine as hot pot (as mentioned above, the food praise list supports business district and cuisine filtering).
[0139] The front end sends the following request:
[0140] {
[0141] "rankType":"002",
[0142] "filter1":{"type":"03","value":"11"},
[0143] "filter2":{"type":"30","value":"11"},
[0144] "filter3":null,
[0145] "filter4":null
[0146] }, where rankType represents the food review list, filter1 is the business district type filter and its value is Lujiazui, filter2 is the cuisine type filter and its value is hot pot, and since there are only two filters in this list, filter3 and filter4 are empty.
[0147] Step S203, the server parses the filter items according to the front-end request and queries the list table with the following sql:
[0148] select*from rank_table where rank_type='002'AND gene_date='2024-08-15'AND JSON_EXTRACT(filter_1,'$.type')='03'and JSON_EXTRACT(filter_1,'$.value')='11'AND JSON_EXTRACT(filter_2,'$.type')='30'and JSON_EXTRACT(filter_2,'$.value')='11'order by score desc. Similarly, after getting the shop id list, call the store display service to assemble and return the display information.
[0149] Similarly, if the user only filters the cuisine among the two filter items (business district and cuisine), the request sent by the front end may be:
[0150] {
[0151] "rankType":"002",
[0152] "filter1":null,
[0153] "filter2":{"type":"30","value":"12"},
[0154] "filter3":null,
[0155] "filter4":null
[0156] }, where rankType represents the food review list. If the business district is not filtered, filter1 is null, filter2 is the cuisine type filter and the value is Sichuan cuisine. Since the list has only two filters, filter3 and filter4 are empty.
[0157] Based on the request, the server queries the list table sql as follows:
[0158] select*from rank_table where rank_type='002'AND gene_date='2024-08-15'AND JSON_EXTRACT(filter_2,'$.type')='30'and JSON_EXTRACT(filter_2,'$.value')='12'order by score desc. After getting the shopid list, call the store display service to assemble and return the display information.
[0159] For the method steps disclosed in the above embodiments, the method steps are described as a series of action combinations for the purpose of simple description, but those skilled in the art should know that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, some steps can be performed in other orders 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 involved are not necessarily required by the embodiments of the present invention.
[0160] Based on the same inventive concept, the embodiment of the present application also provides a list data processing system based on complex scenarios for implementing the above-mentioned list data processing method based on complex scenarios. The implementation solution for solving the problem provided by the system is similar to the implementation solution recorded in the above-mentioned method, so the specific limitations in one or more embodiments of the list data processing system based on complex scenarios provided below can be found in the above limitations on the above-mentioned list data processing method based on complex scenarios, and will not be repeated here. It can be understood that the above description of its method is also applicable to the description of the system.
[0161] In one embodiment, a list data processing system based on complex scenarios is also provided. The embodiments of the present invention are described below in conjunction with the accompanying drawings. Figure 4 As shown, the system specifically includes:
[0162] The response analysis module 210 is used to respond to the list-related data request message sent by the user and determine the list table corresponding to the requested list-related table data;
[0163] The acquisition module 220 is used to feed back the list table to the front-end list page, and obtain the list table query request generated by the list content and list filter items selected by the user through the front-end list page;
[0164] A definition module 230, used to define a filtering condition according to the list content and list filtering items selected in the list table query request;
[0165] The screening module 240 is used to query the list table based on the screening conditions, and to filter the list table to obtain the list content requested for the query.
[0166] It is worth noting that although only some basic functional modules are disclosed in the embodiments of the present invention, it does not mean that the composition of the present system is limited to the above basic functional modules. On the contrary, what the present embodiment wants to express is that on the basis of the above basic functional modules, those skilled in the art can arbitrarily add one or more functional modules in combination with the prior art to form an infinite number of embodiments or technical solutions. In other words, the present system is open rather than closed. Just because the present embodiment only discloses individual basic functional modules, it cannot be considered that the protection scope of the claims of the present invention is limited to the disclosed basic functional modules. At the same time, for the convenience of description, the above devices are described in terms of functions and are described separately in various units and modules. Of course, when implementing the present invention, the functions of each unit and module can be implemented in the same or one or more software and / or hardware.
[0167] In one embodiment, the present invention provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the steps of the method described in the second aspect are implemented.
[0168] In one embodiment, the present invention further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method described in the second aspect are implemented.
[0169] like Figure 5 As shown, the present invention also provides an electronic device, including: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; a computer program is stored in the memory, and when the computer program is executed by the processor, the processor executes the steps of the list data processing method based on a complex scenario.
[0170] Figure 5 Schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. Figure 5 The electronic device provided in the embodiment of the present invention includes: one or more processors 310 and a storage device 320; the processor 310 in the electronic device may be one or more, Figure 5 A processor 310 is taken as an example; the storage device 320 is used to store one or more programs; the one or more programs are executed by the one or more processors 310, so that the one or more processors 310 implement the method for list data processing based on complex scenarios as described in any one of the embodiments of the present invention.
[0171] The electronic device may further include: an input device 330 and an output device 340 .
[0172] The processor 310, storage device 320, input device 330 and output device 340 in the electronic device can be connected via a bus or other means. Figure 5 The example of connecting through bus is taken in the following.
[0173] The storage device 320 in the electronic device is a computer-readable storage medium that can be used to store one or more programs, which can be software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the method for processing node setting conflicts provided in the embodiment of the present invention. The processor 310 executes various functional applications and data processing of the electronic device by running the software programs, instructions, and modules stored in the storage device 320, that is, implements the method for list data processing based on complex scenarios in the above method embodiment.
[0174] The storage device 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the electronic device, etc. In addition, the storage device 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the storage device 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0175] The input device 330 may be used to receive input digital or character information and generate key signal input related to user settings and function control of the electronic device. The output device 340 may include a display device such as a display screen.
[0176] The present invention also provides a computer-readable storage medium storing a computer program executable by an electronic device. When the computer program runs on the electronic device, the electronic device executes the steps of a list data processing method based on a complex scenario.
[0177] Specifically, the computer storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0178] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for processing list data based on multiple scenarios, characterized in that: The method comprises: Responding to the list-related data request message sent by the user, determining the list table corresponding to the requested list-related table data; Feeding back the list table to the front-end list page, and obtaining a list table query request generated by the list content and list filter items selected by the user through the front-end list page; Define the filter conditions according to the list content and list filter items selected in the list table query request; The list table is queried based on the screening condition, and the list content requested for the search is obtained by screening the list table.
2. The method according to claim 1, characterized in that The list table corresponding to the list-related table data of the determination request includes: Create a list generation task and traverse all merchants participating in the list task; Get the merchant's indicator data, including star rating and number of positive reviews; According to the predefined ranking rules, the scores of each merchant's index data are calculated and arranged in descending order according to the scores; and a preset number of merchant information is selected in order from high to low according to the scores and stored in the database to generate a ranking table; The list table includes: list table fields corresponding to each merchant information; The list table fields include: ID primary key, list type, store id, score, list production time, filter item filter_1, filter item filter_2, filter item filter_3, filter item filter_4, update time and creation time.
3. The method according to claim 2, characterized in that The list-related table data includes: a list table of at least one list type; The list types are defined according to different application scenarios, including business categories, product types, and service areas.
4. The method according to claim 2, characterized in that: The task of creating the list generation also includes: Add the list generation task to the queue for multi-threaded processing, and automatically start the task after the thread is created.
5. The method according to claim 1, characterized in that Feeding back the list table to the front-end list page includes: Determine whether the user who requests to query the list is visiting the front-end list page for the first time; if so, for the first query request, search the list based on the list type and list creation time to obtain the filter items and list content of the first query request; otherwise, directly return all the filter items and list content of the list and display them on the front-end list page.
6. The method according to claim 1, characterized in that Defining the filtering conditions according to the list content and list filtering items selected in the list table query request includes: The list content and list filter items selected in the list table query request are used as the list table filter fields; Based on the JSON field type of SQL, the list table screening field is generalized and processed into a standardized format that is unified with the JSON field type; The JSON fields include: filter item type, filter item display name, and parameter value of the filter item in the system; the filter item types include: business district, service category, price, and label; When a new filter item type is added, the filter condition is obtained by assigning a value to the filter item type.
7. The method according to claim 1, characterized in that The querying of the list table based on the screening condition and the screening of the list table to obtain the list content requested for the query include: According to the list type of the list table query request, the corresponding list table in the database is called, and the list content matching the filter item type and value in the filter condition is searched in the list table.
8. A list data processing system based on complex scenarios, characterized in that: The system comprises: A response analysis module, used to respond to a list-related data request message sent by a user and determine the list table corresponding to the requested list-related table data; An acquisition module is used to feed back the list table to the front-end list page, and to acquire the list table query request generated by the list content and list filter items selected by the user through the front-end list page; A definition module is used to define filtering conditions according to the list content and list filtering items selected in the list table query request; The screening module is used to query the list table based on the screening conditions, and to filter the list table to obtain the list content requested for the query.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.