Business query method, device and equipment and computer readable storage medium
By converting the scope of the product pool into rule information, and using the rule engine to establish the relationship between goods and business, the problems of low efficiency and poor consistency of product participation in promotional activities in e-commerce platforms are solved, and fast and real-time query results return are achieved.
Patent Information
- Application Number
- CN202410122665.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-29
- Publication Date
- 2025-07-29
AI Technical Summary
When querying promotional activities that products participate in in e-commerce platforms in the prior art, there are problems such as time-consuming, poor data consistency, poor cache update performance and system abnormalities during cold start-up, especially in large-scale promotional activities, it is difficult to achieve rapid query.
The scope information of the product pool is defined as rule information, and the association relationship between the product pool and the business is established through the rule engine. The rule engine is used to query the rule information of the product matching, and the business information of the product participating in combination with the relationship is determined, which avoids cache dependence and improves query efficiency and data consistency.
It realizes efficient and fast product participation in business query, reduces system maintenance costs, improves query timeliness and data real-timeness, and avoids the problems of user timeout waiting and data inconsistency.
Smart Images

Figure CN120386803A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and more specifically, to a method, apparatus, device, and computer-readable storage medium for business query. Background Art
[0002] With the rapid development of the Internet and e-commerce, e-commerce has accounted for an increasingly high proportion in people's daily lives. As an important means to increase the sales volume of goods, promotions have been more and more widely applied. Nowadays, large-scale promotions have become the norm for the operation of e-commerce platforms of all sizes and merchants settled in. A single promotion activity may involve a large number of goods, and hundreds or thousands of promotion activities may be involved in a day. Therefore, for users, how to quickly query the promotion activities participated by goods is an urgent problem to be solved. Summary of the Invention
[0003] This application provides a method, apparatus, device, and computer-readable storage medium for business query, which can achieve quick query of goods participating in business.
[0004] In a first aspect, a method for business query is provided, including:
[0005] Obtain the attribute information of the goods to be queried;
[0006] According to the attribute information of the goods to be queried, determine the target rule information matched by the goods to be queried, where the target rule information includes at least one rule information, each rule information corresponds to a goods pool, and the rule information is used to define the scope of goods included in the goods pool;
[0007] Obtain the association relationship between the rule information and the business information, where each business information is used to identify a business, and the business information associated with a rule information indicates that the goods pool corresponding to the rule information can participate in the business identified by the business information;
[0008] According to the target rule information and the association relationship, determine the target business information participated by the goods to be queried.
[0009] In a second aspect, a business query apparatus is provided, and the business query apparatus includes functional modules for executing the method in the first aspect or its various implementation manners above.
[0010] In some implementation manners, the business query apparatus includes:
[0011] A first obtaining unit, configured to obtain the attribute information of the goods to be queried;
[0012] A first determination unit, configured to determine target rule information matched by the commodity to be queried according to the attribute information of the commodity to be queried, where the target rule information includes at least one rule information, each rule information corresponds to a commodity pool, and the rule information is used to define the scope of commodities included in the commodity pool;
[0013] A second acquisition unit, configured to acquire the association relationship between the rule information and the service information;
[0014] A second determination unit, configured to determine target service information participated by the commodity to be queried according to the target rule information and the association relationship.
[0015] In a third aspect, an embodiment of the present application provides a computer device, including: a processor and a memory, where the memory is used to store a computer program, and the processor is used to call and run the computer program stored in the memory to execute the method in the first aspect.
[0016] In some implementation manners, the computer device is used to execute the following steps:
[0017] Acquire the attribute information of the commodity to be queried;
[0018] According to the attribute information of the commodity to be queried, determine target rule information matched by the commodity to be queried, where the target rule information includes at least one rule information, each rule information corresponds to a commodity pool, and the rule information is used to define the scope of commodities included in the commodity pool;
[0019] Acquire the association relationship between the rule information and the service information, where each service information is used to identify a service, and the service information associated with a rule information indicates that the commodity pool corresponding to the rule information can participate in the service identified by the service information;
[0020] According to the target rule information and the association relationship, determine target service information participated by the commodity to be queried.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, used to store a computer program, and the computer program enables a computer device to execute the method in the first aspect.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, including computer program instructions, and the computer program instructions enable a computer device to execute the method in the first aspect.
[0023] In a sixth aspect, an embodiment of the present application provides a computer program, and the computer program enables a computer device to execute the method in the first aspect.
[0024] Therefore, in the embodiments of the present application, the scope of the product pool can be defined as the rule information of the product pool. Thus, the association relationship between the product pool and the participating services can be reflected as the association relationship between the service information and the rule information. In this way, when it is necessary to query the services participated by a product, the target rule information matched by the product can be determined according to the attribute information of the product to be queried, that is, the target product pool to which the product belongs. Then, according to the target rule information and in combination with this association relationship, the target service information participated by the product to be queried can be determined, thereby enabling efficient and rapid reverse query. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 is a schematic diagram of an application scenario provided by an embodiment of the present application.
[0026] Figure 2 is a schematic diagram of a service system provided by an embodiment of the present application.
[0027] Figure 3 is a schematic diagram of a forward query scenario and a reverse query scenario.
[0028] Figure 4 is a schematic diagram of realizing reverse query through forward query.
[0029] Figure 5 is a schematic diagram of a service query method provided by an embodiment of the present application.
[0030] Figure 6 is a schematic diagram of a storage solution for service information and rule information provided by an embodiment of the present application.
[0031] Figure 7 is a schematic diagram of another storage solution for service information and rule information provided by an embodiment of the present application.
[0032] Figure 8 is a schematic flowchart of a service query method provided by an embodiment of the present application.
[0033] Figure 9 is a schematic architecture diagram of a rule engine provided by an embodiment of the present application.
[0034] Figure 10 is a schematic diagram of a matching algorithm of a matching node provided by an embodiment of the present application.
[0035] Figure 11 is a schematic diagram of a rule matching process according to a specific example.
[0036] Figure 12 is a schematic block diagram of a service query device provided by an embodiment of the present application.
[0037] Figure 13This is a schematic block diagram of a computer device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0039] It should be understood that in the embodiments of the present application, "B corresponding to A" means that B is associated with A. In one implementation, B can be determined based on A. However, it should also be understood that determining B based on A does not mean determining B based solely on A; B can also be determined based on A and / or other information.
[0040] In this application, unless otherwise specified, "at least one" means one or more, and "plurality" means two or more. Furthermore, "and / or" describes the association between related objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the related objects are in an "or" relationship.
[0041] It should be understood that the first, second, etc. descriptions appearing in the embodiments of the present application are only for illustration and distinction of the description objects, and there is no order. They do not represent any special limitation on the number of devices in the embodiments of the present application, and cannot constitute any limitation on the embodiments of the present application.
[0042] It should also be understood that the specific features, structures, or characteristics associated with the embodiments in the specification are included in at least one embodiment of the present application. In addition, these specific features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0043] It should be noted that the data involved in this application (such as user data, product data, business data, etc.), including but not limited to data used for processing, storage, and display, are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. In addition, the rule engine involved in the embodiments of this application and the matching algorithm involved in the rule engine are all obtained with full authorization.
[0044] In addition, the terms "include" and "have" and any variations thereof are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or device.
[0045] The embodiments provided by the present application will be described in detail below with reference to the accompanying drawings.
[0046] Figure 1 A schematic diagram of an application scenario of an embodiment of the present application is shown.
[0047] As Figure 1 shown, the application scenario may include a business system 10 and a rule engine 20, and the business system 10 and the rule engine 20 are communicatively connected, for example, communicatively connected by wire or wireless means.
[0048] In some scenarios, the business system may be an e-commerce system, which can implement functions such as object (e.g., users using the e-commerce system) management, commodity management, price management, and promotion management. For example, object management: operations such as object registration, login, and personal information. Objects can view information such as their own orders, delivery addresses, and evaluations through the system. The commodity management: settings such as commodity release, editing, listing and delisting, classification, tags, and attributes, which facilitate users to browse and filter commodities. Promotion management: The e-commerce system can support multiple promotion methods, such as full reduction, discount, gift, coupon, red envelope, etc. The system can provide a flexible promotion rule setting function so that merchants can set promotion rules according to different activity requirements.
[0049] The rule engine 20 can provide services for the business system 10. For example, at least one rule corresponding to the business system is stored in the rule engine 20, and the rule engine 20 can provide services for the business system based on the at least one rule.
[0050] In some embodiments, the rule engine 20 may be deployed in the business system 10, or may be independent, and the present application does not make any limitation thereto.
[0051] In some implementation manners, the rule engine 20 may include a data storage system for storing at least one rule.
[0052] Optionally, the rule engine 20 may further include a configuration terminal, and the configuration terminal provides a human-computer interaction unit of the rule engine, for example, for staff to configure business rules.
[0053] Refer to Figure 2 , Figure 2 A schematic diagram of a business system provided by an embodiment of the present application is shown.
[0054] As Figure 2 shown, the business system may include a terminal 102 and a server 104. Among them, the terminal 102 communicates with the server 104 through a network. Optionally, the terminal 102 may include an application (APP) front end, and the server 104 includes an APP background server.
[0055] In some implementations, the terminal 102 refers to a type of device that has rich human-computer interaction methods, the ability to access the Internet, usually runs various operating systems, and has strong processing capabilities. The terminal 102 can be a smart phone, a tablet computer, a portable laptop, a desktop computer, a wearable device, a smart TV, a vehicle-mounted device, or other terminal devices, but is not limited thereto.
[0056] Optionally, in the embodiments of the present application, an application program, such as a shopping APP, is installed in the terminal 102.
[0057] In some implementations, the server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms. When there are multiple servers, at least two servers are used to provide different services, and / or at least two servers are used to provide the same service, such as providing the same service in a load balancing manner. The embodiments of the present application do not limit this.
[0058] Exemplarily, the network can be a wireless or wired network such as an enterprise intranet (Intranet), the Internet, Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth, Wi-Fi, or a call network.
[0059] In some implementations, the server 104 is provided with a visual interface for operators or developers to configure services on the visual interface, such as configuring a product pool or a promotion activity.
[0060] In some implementations, the rule engine can be a component embedded in the server 104. For example, the rule engine can receive a query request sent by a business system, make a business decision based on the query request according to business rules, and return a query result to the business system.
[0061] In some other implementations, the rule engine and the server 104 can be independent.
[0062] Optionally, the rule engine may be a component written in languages such as Java and Python.
[0063] Optionally, as Figure 2 shown, a data storage system 106 may also be included. The data storage system 106 may store data required by the server 104, such as attribute information of products on an e-commerce platform. The data storage system may be set up separately, integrated on the server 104, deployed on the cloud or other devices, and the embodiments of the present application do not limit this.
[0064] It should be understood that Figure 1 and Figure 2 are only illustrative and do not specifically limit the application scenarios of the embodiments of the present application.
[0065] In some scenarios, the business system needs to provide users with query services for products or activities / coupons.
[0066] As Figure 3 shown, the following query scenarios may exist:
[0067] Querying all products participating in Activity X is called forward query:
[0068] Querying all activities that Product Y participates in is called reverse query.
[0069] In the related art, reverse query is usually implemented by means of batch forward query. For example, by traversing all activity lists and then querying the activities that a product participates in through a search engine (such as Elasticsearch (ES)) based on the association relationship between the activity identity (ID) and the product ID. That is, using forward query to implement reverse query, after obtaining the query result, the query result can be written into the cache for the next query.
[0070] Figure 4 Shows a process of implementing reverse query based on forward query.
[0071] First, the user triggers a query request, which is used to request the activities / coupons participated by the product. The search module in the server queries the activities / coupons participated by the product in the cache (such as Redis). If the activities / coupons participated by the product to be queried are stored in the cache, it is a hit and the query result is returned. Otherwise, if the information about the activities / coupons participated by the product in the cache is lost or invalid, the product to be queried is added to the message queue (such as Kafka), and the async handler is used to query the activities / coupons participated by the product to be queried, and then the query result is written back to the cache. Specifically, the search module traverses all the activity / coupon lists to determine whether the product ID exists under the activity / coupon ID. If it exists, it means the product participates in the activity / coupon, and the product ID and the participated activity / coupon ID are added to the cache. Specifically, all the activity / coupon lists are traversed through a search engine (such as ES) to query the activities / coupons participated by the product.
[0072] The cache invalidation and update mechanism is as follows:
[0073] When any one of the product pool, activities, coupons, or product alliance information (or rather, the full product data) is updated, a cache update message will be triggered, resulting in the invalidation of the relevant data in the cache. [[ID=⑧]]
[0074] Exemplarily, the full product data may include but is not limited to at least one of the following:
[0075] Product attribute information, such as product identification, name, description, classification, brand, model, affiliated merchant, rule attributes (such as size, color, weight, etc.).
[0076] Product price information, such as the selling price, promotional price, membership price of the product, etc.
[0077] Product inventory information, such as the inventory quantity or inventory status of the displayed product.
[0078] Product sales data, such as the sales volume and sales amount of the product.
[0079] Product evaluation information, such as user evaluations of the product, order sharing, etc.
[0080] Product after-sales service information: such as return and exchange policies, warranty policies, etc.
[0081] Shopping cart information, such as which products the user adds to the shopping cart, the quantity in the shopping cart, etc.
[0082] Payment information, used to record the user's payment status and payment method.
[0083] Order information, which is used to record the order status, shipping status, logistics information, etc. of the user.
[0084] Product promotion information, such as the activities the product participates in or coupons.
[0085] Operators can manage products. For example, the full data of products and activities can be stored in a database (such as a DB). Based on the product ID, the full data of the product can be obtained, and based on the activity ID, the detailed information of the activity can be obtained.
[0086] However, there are the following problems with the above query scheme:
[0087] 1. The performance of offline cache update is poor, and there is a problem of scale diffusion.
[0088] Specifically, since there is no fast index from product ID to activity / coupon ID, it is necessary to traverse all the activity / coupon ID lists to determine which activities / coupons the product participates in.
[0089] In this case, as the scale of the activity / coupon ID list expands, the time-consuming of the entire traversal process will increase linearly. Therefore, the time-consuming of adopting this query scheme is relatively long.
[0090] 2. There will be system exceptions during cold start
[0091] Since the data update in the cache depends on the query request of the end user to trigger, when the product goes online, the first user's cold start will inevitably not be able to obtain the activity / coupon information of the product by reading the cache. Or, due to the long query time-consuming problem, it may cause the user to timeout and not wait for the activity / coupon information of the product.
[0092] 3. The real-time performance of data update is poor
[0093] Before the data update in the cache is completed, all query requests obtain invalid old data.
[0094] 4. It is difficult to ensure data consistency.
[0095] Specifically, since the cache invalidation update mechanism is that when any one of the product pool, activities, coupons, and product information changes, it will trigger cache invalidation. However, due to the long cache invalidation link, it is difficult to ensure the consistency between the read data and the actual data. For example, if a cache update message is triggered, this cache update message will enter the message queue and wait to be consumed. In this case, if the cache is read, there will be a problem that the read data is inconsistent with the actual data.
[0096] In view of this, an embodiment of the present application provides a service query method, which can define the scope information of the product pool as the rules of the product pool. In this way, the association relationship between the product pool and the services involved can be reflected as the association relationship between the rules and the services. Thus, when establishing the association relationship between a service (such as an activity / coupon) and the product pool, the association relationship between the service (such as an activity / coupon) and the rules can be established. Therefore, when it is necessary to query the services (such as activities / coupons) participated by a product, the rules matched by the product (i.e., the product pool to which the product belongs) can be queried using a rule engine, and then combined with the association relationship between the service (such as an activity / coupon) and the rules, the list of services (such as activities / coupons) participated by the product can be obtained.
[0097] To facilitate the understanding of the technical solutions of the embodiments of the present application, the technical solutions of the present application will be described in detail below through specific embodiments. The following related technologies can be arbitrarily combined with the technical solutions of the embodiments of the present application as optional solutions, and they all belong to the protection scope of the embodiments of the present application. The embodiments of the present application include at least some of the following contents.
[0098] Each embodiment of the present application provides a service query method, which can be executed by a terminal or a server, or can be jointly executed by a terminal and a server; hereinafter, the case where the service query method is executed by the server will be taken as an example for description. For example, the server can be the server of a service system, for example, the server of the service system executes by calling a rule engine.
[0099] Combined Figure 5 , a service query method provided by an embodiment of the present application will be described.
[0100] As Figure 5 shown, the method 200 may include at least some of the following contents:
[0101] S201, obtain the attribute information of the product to be queried.
[0102] In some embodiments, the obtaining of the attribute information of the product to be queried includes:
[0103] Receive a query request (or, a reverse query request) from a terminal user, where the query request is used to query the service information participated by the target product, and the query request includes the attribute information of the product to be queried.
[0104] For example, the service system includes a terminal and a server. As Figure 2 shown, an APP front-end is installed on the terminal, and the user can send the query request to the server of the service system by operating the APP front-end. Further, the server can send the attribute information of the product to be queried to the rule engine.
[0105] Exemplarily, the attribute information of the commodity may include but is not limited to at least one of the following:
[0106] Commodity identifier, name, description, classification, brand, model, merchant to which it belongs, rule attributes (such as size, color, material, weight, etc.). Among them, the commodity identifier may be information that can uniquely identify the identity of the commodity. For example, it may be the barcode, QR code, or commodity code of the commodity.
[0107] S202. According to the attribute information of the commodity to be queried, determine the target rule information matched by the commodity to be queried. Among them, the target rule information includes at least one rule information, and each rule information corresponds to a commodity pool. The rule information is used to define the scope of the commodities included in the commodity pool.
[0108] In the embodiments of the present application, a commodity pool corresponds to a rule information, and this rule information is used to define the scope of the commodities included in the commodity pool. That is, the scope information of the commodity pool can be converted into the rule information of the commodity pool, so that the commodity pool to which the commodity belongs can be determined by using a rule engine.
[0109] For example, a commodity pool can be represented by a rule identifier (rule ID), and this rule identifier can be used to indicate the scope of the commodities included in the commodity pool. For example, which commodities are included or not included in this commodity pool.
[0110] Exemplarily, the rule information is used to indicate at least one of the following:
[0111] The categories of the commodities included in the commodity pool;
[0112] The categories of the commodities not included in the commodity pool;
[0113] The merchants corresponding to the commodities included in the commodity pool;
[0114] The merchants corresponding to the commodities not included in the commodity pool;
[0115] The identifiers of the commodities included in the commodity pool;
[0116] The identifiers of the commodities not included in the commodity pool.
[0117] For example, the rule information corresponding to the first commodity pool may be: the commodity category is category A, and the merchants include merchant 1. This rule information can be indicated by rule ID1.
[0118] Again, for example, the rule information corresponding to the second commodity pool may be: the merchant is merchant 3, and the commodity with commodity identifier = AAA is not included. That is, all commodities of merchant 3 except the commodity with commodity identifier AAA are included in this second commodity pool. This rule information can be indicated by rule ID2.
[0119] In some embodiments, S202 may include:
[0120] Based on the attribute information of the product to be queried, determine the target rule information matched by the product to be queried through the rule engine.
[0121] Therefore, in the embodiments of the present application, the range information of the product pool can be converted into the rule information of the product pool, and the rule engine is further used to query the target rule information matched by the product to be queried, that is, the information of the product pool to which the product to be queried belongs.
[0122] In some embodiments, the method 200 further includes:
[0123] Obtain the product pool configuration information, where the product pool configuration information includes the range information of the product pool;
[0124] Convert the range information of the product pool into the rule information corresponding to the product pool;
[0125] Write the rule information corresponding to the product pool into the rule engine.
[0126] In some implementation manners, the server of the business system has a visual configuration interface for configuring the product pool. For example, configure the categories of the products included in the product pool, or the categories of the products not included in the product pool. Also, for example, configure the identifiers of the products included in the product pool, or the identifiers of the products not included in the product pool, etc.
[0127] In some specific embodiments, when constructing the product pool, the operation or development personnel can input the product pool configuration information on the visual configuration interface of the server.
[0128] In some embodiments, when the range information of the product pool changes, the business system can also update the rule information in the rule engine.
[0129] In some embodiments, the method 200 further includes:
[0130] Obtain the product pool configuration adjustment information, where the product pool configuration adjustment information includes the range adjustment information of the product pool;
[0131] Convert the range adjustment information of the product pool into the rule adjustment information corresponding to the product pool;
[0132] Update the rule information corresponding to the product pool in the rule engine according to the rule adjustment information of the product pool.
[0133] For example, when it is necessary to change the configuration of the product pool, the operation or development personnel can adjust the scope of the product pool on the visual configuration interface of the server. For example, add products in category B to the first product pool. Another example is to change the merchants in the first product pool from including merchant 1 to including merchant 1 and merchant 2. Further, the scope adjustment information of the product pool can be converted into the rule adjustment information of the product pool. Then, update the rule information corresponding to the product pool according to the rule adjustment information corresponding to the product pool.
[0134] For example, the rule information corresponding to the first product pool before adjustment is: the product category is category A, and the merchants include merchant 1. The rule information corresponding to the first product pool after adjustment is: the product category includes category A and category B, and the merchants include merchant 1 and merchant 2.
[0135] In some embodiments, the business system can implement forward and reverse queries of the business through a unified interface. Among them, the forward query is used to query the products participating in the business, and the reverse query is used to query the business that the product participates in.
[0136] For example, when receiving a forward query request from a terminal user, a search engine (such as ES) can be called to obtain the forward query result. When receiving a reverse query request from the user, a rule engine can be called to obtain the reverse query result. For example, the forward query request includes information about the business to be queried, such as the activity ID or coupon ID, etc. The reverse query request can include the attribute information of the product to be queried. In this way, it is equivalent to hiding the implementation details of the forward or reverse query. When the implementation details of the forward or reverse query change, as long as the declaration and definition of the interface remain unchanged, the external caller does not need to modify, reducing the maintenance cost.
[0137] S203, obtain the association relationship between the rule information and the business information.
[0138] In some embodiments, each piece of business information is used to identify a business. For example, the business information can be a business identifier (business ID). Among them, the business information associated with a piece of rule information indicates that the product pool corresponding to the rule information can participate in the business identified by the business information. For example, a piece of rule information can be associated with one or more pieces of business information. That is, a product pool can participate in one or more businesses.
[0139] In some embodiments, the business information can include but is not limited to activity information or coupon information.
[0140] For example, the activity information can be an activity identifier (activity ID), which is used to identify the specific activity content.
[0141] Another example is that the coupon information can be a coupon identifier (coupon ID), which is used to identify the specific coupon content.
[0142] For example, the activity information may include, but is not limited to, amount reduction, discount, free shipping, gift, upsell, combined offers, and various other coupon or red envelope rules, etc.
[0143] For example, the coupon information may include, but is not limited to, cash coupons, full reduction coupons, discount coupons, flash sale coupons, category coupons, brand coupons, store coupons, platform coupons, etc.
[0144] In some embodiments of the present application, the method 200 further includes:
[0145] Obtaining business configuration information, where the business configuration information includes business information and rule information corresponding to the product pool that can participate in the business information;
[0146] Based on the business configuration information, constructing the association relationship;
[0147] Writing the association relationship into the rule engine.
[0148] For example, when constructing a business (such as an activity or a coupon), an operator or developer can input business configuration information on the visual configuration interface of the server. For example, configuring the created activity information and the product pool information that can participate in the activity. Exemplarily, the activity ID is 1 and the rule ID is 1. The activity ID1 represents a full reduction activity, and the product pool corresponding to the rule ID1 is the aforementioned first product pool. Based on the business configuration information, an association relationship between the business information and the rule information corresponding to the product pool can be established, that is, the association relationship includes the association of activity ID1 with rule ID1, and further writing this association relationship into the rule engine.
[0149] In some embodiments of the present application, the method 200 further includes:
[0150] Obtaining business configuration adjustment information, where the business configuration adjustment information is used to adjust the content of the business information or the rule information corresponding to the product pool that can participate in the business information;
[0151] According to the business configuration adjustment information, updating the association relationship in the rule engine.
[0152] For example, when updating a business (such as updating the activity participated in by the product pool, or updating the product pool corresponding to the activity), an operator or developer can make adjustments to the business configuration on the visual configuration interface of the server. For example, adjusting the activity information or the product pool that can participate in the activity. Then, according to the business configuration adjustment information, update the association relationship in the rule engine.
[0153] Exemplarily, change the activity ID participated by the first commodity pool from activity ID1 to activity ID2, where activity ID2 represents a discount activity. Then the updated association relationship may include activity ID2 associated with rule ID1 (corresponding to the first commodity pool).
[0154] Exemplarily, change the commodity pool participating in activity ID1 from the first commodity pool to the second commodity pool, where the rule ID corresponding to the second commodity pool is rule ID2. Then the updated association relationship may include activity ID1 associated with rule ID2 (corresponding to the second commodity pool).
[0155] In some implementation manners, the rule information and the service information may be stored in a secondary index manner. For example, the rule ID and the service ID may be stored in different fields (such as arrays).
[0156] Taking the service ID as the activity ID as an example, as Figure 6 shown, the rule ID and the activity ID are stored in different fields. For example, the rule ID is stored in the rule array, and the activity ID is stored in the activity array, where Figure 6 Ri in represents the rule ID. In this way, after the rule engine queries at least one rule matched by the commodity, it is further necessary to obtain the activities associated with the at least one rule from another array, so as to know the activities participated by the commodity.
[0157] In some other implementation manners, the rule information and the service information are stored in a primary index manner. For example, the rule ID and the associated service ID may be stored in the same field.
[0158] Taking the service ID as the activity ID as an example, as Figure 7 shown, the rule ID and the activity ID are stored in the same field. For example, the activity IDs associated with the rule ID are all stored in the rule array, where Figure 7 Ri in represents the rule ID. In this way, after the rule engine queries at least one rule matched by the commodity, the activities associated with the at least one rule are obtained from the array storing the at least one rule at the same time, so as to know the activities participated by the commodity. Thereby, the query efficiency can be improved.
[0159] S204. Determine the target service information participated by the to-be-query commodity according to the target rule information and the association relationship.
[0160] In some implementation manners, S204 may include:
[0161] The rule engine determines the target activity information participated by the to-be-query commodity according to the target rule information and the association relationship.
[0162] Therefore, in the embodiments of the present application, an association relationship between service information and rule information can be established. For example, an association relationship between a service ID and a rule ID can be established. Since the product pool can be defined by rules, the association relationship between service information and rule information is equivalent to the association relationship between service information and the product pool.
[0163] That is to say, to determine which service a product belongs to is equivalent to determining which rule (i.e., the product pool) a product belongs to. Therefore, when using a rule engine to perform a reverse lookup on a product, it is not necessary to use a cache (such as Redis) to build a service list (such as an activity list or a coupon list). Only the rule recall ability of the rule engine is used to recall the rules matched by the product, and further combined with this association relationship, the service participated by the product can be determined, which can achieve efficient and fast reverse lookup, improve the timeliness of reverse lookup, and at the same time reduce costs. Since no cache is used, the problem of data inconsistency introduced by multiple storages is also reduced.
[0164] Moreover, when the first user wants to query the service information participated by the product when the product goes online, since the rule engine can be used to achieve fast reverse lookup of the product, the problem that the user cannot obtain the service information participated by the product due to timeout is avoided.
[0165] Moreover, when the association relationship between the product pool or between the product pool and service information is updated, only the rule information or the association relationship in the rule engine needs to be updated, and there is no problem of multi-link dependence, and the real-time performance of reverse lookup is high.
[0166] In some embodiments of the present application, the method 200 further includes:
[0167] Sending the query result of the product to be queried to the end user, where the query result of the product to be queried includes the target service information participated by the product to be queried.
[0168] For example, after querying the target service information participated by the product to be queried through the rule engine, the rule engine can return the target service information participated by the product to be queried to the service system. Specifically, the rule engine returns the query result to the server of the service system. Further, the server can return the query result to the end user.
[0169] In some specific embodiments, the service information is activity information or coupon information, and the query result may include a list of target activity IDs or a list of target coupons participated by the product to be queried.
[0170] Combined Figure 8 , the specific process of the product reverse lookup method in the embodiments of the present application will be described. As Figure 8 shown, it may include at least some of the following steps:
[0171] S501, the server of the business system obtains the product pool configuration information, which includes the scope information of the product pool.
[0172] For example, the server of the business system has a visual configuration interface. When building a product pool, the operation or development personnel can configure the product pool on the visual configuration interface of the server. For example, when building the first product pool, it is configured that the first product pool includes products in category A, and the merchants of the products include merchant 1. That is, the first product pool includes products in category A of merchant 1.
[0173] S502, convert the scope information of the product pool into the rule information of the product pool.
[0174] For example, the rule information of the first product pool can be category = A, merchant = merchant 1.
[0175] S503, write the rule information of the product pool into the rule engine.
[0176] S504, the server of the business system obtains the business configuration information, which includes business information and the rule information corresponding to the product pool that can participate in the business information.
[0177] For example, the server of the business system has a visual configuration interface. When building a business (such as an activity), the operation or development personnel can configure the business on the visual configuration interface of the server. For example, when building the first business, the first business is configured as a full reduction activity, and the product pool participating in the first business is the first product pool.
[0178] S505, according to the business configuration information, build the association relationship between the business information and the rule information. For example, if the first business is associated with the first product pool, then the business ID of the first business is associated with the rule ID corresponding to the first product pool.
[0179] S506, write the association relationship between the business information and the rule information into the rule engine.
[0180] For example, write the business information into the field of the associated rule information. In this way, after querying the rules that the product matches, the business that the product participates in can be known from this field, which can improve the query efficiency.
[0181] S507, the terminal of the business system sends a query request to the server of the business system, where the query request includes the attribute information of the product to be queried.
[0182] For example, the business system is an e-commerce system, and the user can send the query request through the e-commerce APP installed on the terminal.
[0183] S508, the server of the business system sends the query request to the rule engine.
[0184] S509. The rules engine determines the matching target rule information based on the attribute information of the product to be queried.
[0185] S510. Based on the correlation between the target rule information, business information, and rule information, determine the target business information that the product to be queried participates in.
[0186] For example, use the business information associated with the target rule information as the target business information that the product to be queried participates in.
[0187] S511. The rules engine returns the query result to the server of the business system. The query result includes the target business information that the product to be queried participates in.
[0188] S512. The server of the business system returns the query result to the terminal of the business system. The query result includes the target business information that the product to be queried participates in.
[0189] In some embodiments, the business system can also adjust the product pool.
[0190] For example, the above steps further include:
[0191] The server of the business system obtains product pool configuration adjustment information, and the product pool configuration adjustment information includes range adjustment information of the product pool;
[0192] Convert the range adjustment information of the product pool into rule adjustment information corresponding to the product pool;
[0193] Update the rule information corresponding to the product pool in the rules engine according to the rule adjustment information of the product pool.
[0194] In some embodiments, the business system can also adjust the correlation between the product pool and the business.
[0195] For example, the above steps further include:
[0196] The server of the business system obtains business configuration adjustment information, and the business configuration adjustment information is used to adjust the content of business information or the rule information corresponding to the product pool that can participate in the business information;
[0197] Update the correlation in the rules engine according to the business configuration adjustment information.
[0198] For example, when updating the business (such as updating the activity participated in by the product pool, or updating the product pool corresponding to the activity), the operation or development personnel can adjust the business configuration on the visual configuration interface of the server. For example, adjust the activity information or the product pool that can participate in the activity. Then update the correlation in the rules engine according to the business configuration adjustment information.
[0199] The following describes, in conjunction with Figure 9 , the architecture of a rule engine provided by this application. As Figure 9 shown, the rule engine may include: a configuration terminal, a full - volume rule index construction module, an incremental rule index construction module, a full - volume rule index storage module, an incremental rule index storage module, a data storage system, and n matching nodes, where n is a positive integer.
[0200] Among them, the configuration terminal is the human - machine interaction unit of the rule engine, and is used for staff to configure the business - related information required by the rule engine. For example, configure at least one of the following:
[0201] Full - volume data - related information, such as the source of full - volume data, the total data volume, the update mechanism, etc.;
[0202] Incremental data - related information, such as the source of incremental rule data, the daily updated data volume;
[0203] Whether sorting is required;
[0204] Processing parameters, such as the peak value of the number of requests processed per second (Queries Per Second, QPS), the number of machines required, or rather, the number of matching nodes required.
[0205] In some implementation manners, the full - volume data may come from an external storage system, or may also come from the business messages of the business system, such as rule write messages and association relationship write messages. Among them, the rule write message can be used to write rule information into the rule engine, and the association relationship write message is used to write the association relationship between rule information and business information into the rule engine. Optionally, the external storage system may be deployed on the cloud, on the server of the business system, or on other servers.
[0206] In some implementation manners, the incremental data may come from the business messages of the business system, such as rule write messages and association relationship write messages. Among them, the rule write message can be used to write rule information into the rule engine, and the association relationship write message is used to write the association relationship between rule information and business information into the rule engine.
[0207] Among them, the full - volume rule index construction module can be used to construct indexes corresponding to all rules, such as including a forward index and an inverted index. The incremental rule index construction module can be used to construct indexes corresponding to incremental rules, such as including a forward index and an inverted index. Among them, the forward index can use the rule ID as the index value and the rule data (i.e., the specific rule conditions) as the index item. The inverted index can use the rule data (i.e., the specific rule conditions) as the index value and the rule ID as the index item.
[0208] Among them, the full - volume rule index storage module is used to store the indexes corresponding to all rules, such as forward indexes and inverted indexes. The incremental rule index storage module is used to store the indexes corresponding to incremental rules, such as forward indexes and inverted indexes. Optionally, the full - volume rule index storage module and the incremental rule index storage module can be deployed on the cloud, for example, implemented through Cloud Object Storage (COS).
[0209] Among them, the data storage system can be used to store the original data of the rule document. For example, the rule data corresponding to the rule index (such as the rule ID), such as the specific rule content.
[0210] Among them, the matching node is used to provide the ability of online real - time rule matching to obtain the matching rules.
[0211] In some embodiments of the present application, the business system can call the rule engine through business messages.
[0212] For example, the business system can send business messages to the rule engine. For example, message A is used to write rule A to the rule engine, message B is used to write rule B to the rule engine, and message C is used to write rule C to the rule engine. Among them, rule A can be the rule corresponding to commodity pool A, rule B can be the rule corresponding to commodity pool B, and rule C can be the rule corresponding to commodity pool C.
[0213] In some embodiments, the rule engine receives business messages through a message queue (such as kafka), and then constructs rule indexes through the full - volume index construction module and the incremental index construction module, and further stores the constructed rule indexes into the full - volume rule index storage module and the incremental rule index storage module respectively.
[0214] In some embodiments, the data storage system can also obtain rule data from an external memory. For example, obtain the rule data of rule A, rule B, and rule C from the cloud. Specifically, for example, obtain the rule data of rule A, rule B, and rule C from the cloud through the full - volume rule document import tool.
[0215] In some embodiments, the matching node can perform matching based on the attribute information of the commodity to be queried in combination with the rule indexes obtained from at least one of the full - volume rule index storage module, the incremental rule index storage module, and the real - time rule index queue (such as kafka) to obtain the rules matched by the commodity to be queried.
[0216] Figure 10 It is a schematic diagram of the matching algorithm of a matching node provided by an embodiment of the present application.
[0217] Among them, the matching node may include at least one of a real-time forward and reverse rule index storage module, an hourly forward and reverse rule index storage module, and a full-rights forward and reverse rule index storage module.
[0218] The real-time forward and reverse rule index storage module may be used to obtain rule indexes in real time from a real-time rule index queue (such as kafka). The hourly forward and reverse rule index storage module may regularly import incremental rule indexes from the incremental rule index storage module on an hourly basis. The full-volume forward and reverse rule index storage module may import full-volume rule indexes from the full-volume rule index storage module.
[0219] When the matching service is started, the matching node may import the full-volume rule indexes stored in the full-volume rule index storage module and the incremental rule indexes stored in the incremental rule index storage module into memory for reverse index reconstruction.
[0220] For example, flatbuffs can be used to achieve the import of second-level indexes, and the index update can adopt a double-buffer mode to improve the import speed and reliability.
[0221] When the matching service is started, the matching node may also start consuming the data stream in the real-time rule index queue to build a real-time forward and reverse index.
[0222] Then, calculate the above three types of reverse data, further aggregate them to obtain a reverse index, and then obtain a forward index based on the reverse index. Further, the forward index may be used as the query result.
[0223] In some embodiments, if sorting or paging of the query result is configured, the query result may also be sorted or paged.
[0224] Furthermore, the rule engine may send the query result to the business system.
[0225] It should be understood that the above matching algorithm is only an example. In other embodiments, it may also be configured to match according to one or more of the full-volume rule index, the incremental rule index, and the real-time rule index. For example, it can be configured through a terminal to determine which rule index to match according to.
[0226] In some embodiments of the present application, the rule engine may provide the rule recall ability to support Boolean expressions, or may also support other types of expressions, such as conditional expressions, logical expressions, etc.
[0227] Hereinafter, taking the Boolean expression as an example, the design principle of the rule engine will be described.
[0228] The algorithm principle of the rule engine is as follows: For a compound proposition where multiple propositions hold simultaneously, it can be transformed into a compound proposition where at least one of the multiple propositions holds. That is, p∧(q∨r) can be transformed into (p∧q)∨(p∧r).
[0229] Based on the above formula, it can be determined that the rule matching process is a process of finding matching OR nodes according to the attribute information of the commodity.
[0230] Combined with Figure 11 specific examples to illustrate the specific rule matching process.
[0231] In this example, Rule 101 corresponds to: category ID = A, store ID = X, and commodity ID ranges from 1 to 100. The location ID (localID) of this Rule 101 is 0.
[0232] Then this Rule 101 can be split into three conditions: category ID = category A, store ID = X, 1 ≤ commodity ID ≤ 100. These three conditions are distinguished by different token identifiers (tokenID). For example, category ID = category A corresponds to tokenID = 0, store ID = X corresponds to tokenID = 1, and 1 ≤ commodity ID ≤ 100 corresponds to tokenID = 2.
[0233] The AND node that meets these three conditions is represented by a Conjunction ID. Since this AND node corresponds to three conditions, the number of conditions is 3, denoted as Size = 3, localID = 0.
[0234] If the attributes of the commodity to be queried are: category = A, store ID = X, commodity ID = 66.
[0235] First, perform token identifier mapping.
[0236] For this example, it can be determined that the tokenID array corresponding to the conditions for which the commodity attributes match is [0, 1, 2].
[0237] Then, according to the tokenID array, determine the Conjunction ID of the AND node corresponding to the matching conditions.
[0238] In this example, it can be determined that this tokenID array [0, 1, 2] is mapped to Conjunction ID: 0, 0, 0;
[0239] Further, according to the Conjunction ID of this AND node, determine the localID of the target OR node, which is the upper-level node of this AND node.
[0240] In this example, since the AND node has no upper-level node, it can be considered that the localID of the AND node is the target OR node. Then, based on the localID of the AND node being 0, the target rule is obtained as Rule 101, and this Rule 101 is the rule matched by the product to be queried.
[0241] In summary, in the embodiments of the present application, the range information of the product pool can be used as the rule information of the product pool to establish the association relationship between the service information and the rule information, which is equivalent to establishing the association relationship between the service information and the product pool. Further, the rule engine is used to perform a reverse query on the services participated by the product. In this way, it is not necessary to use a cache (such as Redis) to construct a service list (such as an activity list or a coupon list). Only the rule recall ability of the rule engine is used to recall the rules matched by the product, and further combined with this association relationship, the services participated by the product can be determined, which can achieve efficient and fast reverse query, improve the timeliness of reverse query, and at the same time reduce costs, which is beneficial to not using a cache and also reduces the data inconsistency problem introduced by multiple storages.
[0242] Moreover, when the first user wants to query the service information participated by the product when the product goes online, since the rule engine can be used to achieve fast reverse query of the product, the problem of the cold start caused by the user not being able to obtain the service information participated by the product due to timeout is avoided.
[0243] In addition, when the association relationship between the product pool or between the product pool and the service information is updated, only the rule information or the association relationship in the rule engine needs to be updated, and there is no problem of multi-link dependency, which improves the real-time performance of product reverse query.
[0244] The specific implementation manners of the present application have been described in detail above with reference to the accompanying drawings. However, the present application is not limited to the specific details in the above implementation manners. Within the scope of the technical concept of the present application, various simple modifications can be made to the technical solutions of the present application, and these simple modifications all belong to the protection scope of the present application. For example, in the various specific technical features described in the above specific implementation manners, they can be combined in any suitable manner without contradiction. To avoid unnecessary repetition, the present application does not further explain various possible combination manners. Another example is that any combination can be made between various different implementation manners of the present application as long as it does not violate the idea of the present application, and it should also be regarded as the content disclosed by the present application.
[0245] It should also be understood that in various method embodiments of the present application, the magnitudes of the sequence numbers of the above processes do not imply the order of execution, and the order of execution of each process should be determined according to its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. It should be understood that these sequence numbers can be interchanged under appropriate circumstances, so that the embodiments of the present application described can be implemented in an order other than those illustrated or described.
[0246] Above, in combination with Figures 5 to 11 , the method embodiments of the present application have been described in detail. Below, in combination with Figures 12 to 13 , the apparatus embodiments of the present application will be described in detail.
[0247] Figure 12 FIG. is a schematic block diagram of a service query apparatus 700 according to an embodiment of the present application. As Figure 12 shown, the service query apparatus 700 includes:
[0248] A first acquisition unit 710, configured to acquire attribute information of a commodity to be queried;
[0249] A first determination unit 720, configured to determine target rule information matched by the commodity to be queried according to the attribute information of the commodity to be queried, where the target rule information includes at least one rule information, each rule information corresponds to a commodity pool, and the rule information is used to define the scope of commodities included in the commodity pool;
[0250] A second acquisition unit 730, configured to acquire the association relationship between rule information and service information;
[0251] A second determination unit 740, configured to determine target service information participated by the commodity to be queried according to the target rule information and the association relationship.
[0252] In some implementation manners, the first determination unit 720 is further configured to:
[0253] Determine, through a rule engine, target rule information matched by the commodity to be queried based on the attribute information of the commodity to be queried.
[0254] In some implementation manners, the service query apparatus 700 further includes:
[0255] A processing unit, configured to acquire commodity pool configuration information, where the commodity pool configuration information includes range information of the commodity pool;
[0256] Convert the range information of the commodity pool into rule information corresponding to the commodity pool;
[0257] Write the rule information corresponding to the commodity pool into the rule engine.
[0258] In some implementations, the service query device 700 further includes:
[0259] a processing unit, configured to obtain merchandise pool configuration adjustment information, where the merchandise pool configuration adjustment information includes range adjustment information of the merchandise pool;
[0260] convert the range adjustment information of the merchandise pool into rule adjustment information corresponding to the merchandise pool;
[0261] update the rule information corresponding to the merchandise pool in the rule engine according to the rule adjustment information of the merchandise pool.
[0262] In some implementations, the service query device 700 further includes:
[0263] a processing unit, configured to obtain service configuration information, where the service configuration information includes service information and rule information corresponding to a merchandise pool that can participate in the service information;
[0264] construct the association relationship based on the service configuration information;
[0265] write the association relationship into the rule engine.
[0266] In some implementations, the service query device 700 further includes:
[0267] a processing unit, configured to obtain service configuration adjustment information, where the service configuration adjustment information is used to adjust the service content corresponding to the service information or the rule information corresponding to a merchandise pool that can participate in the service information;
[0268] update the association relationship in the rule engine according to the service adjustment information.
[0269] In some implementations, the second determination unit 740 is further configured to:
[0270] determine, by the rule engine based on the target rule information and the association relationship, target service information participated by the merchandise to be queried, where the target service information is service information associated with the target rule information.
[0271] In some implementations, both the rule information and the service information associated with the rule information are stored in a first field, and the second obtaining unit 730 is specifically configured to:
[0272] obtain the association relationship between the rule information and the service information from the first field.
[0273] In some implementations, the first obtaining unit 710 is specifically configured to:
[0274] Receive a query request from an end user, where the query request is used to query business information participated by the product to be queried, and the query request includes attribute information of the product to be queried.
[0275] In some implementation manners, the business query device further includes:
[0276] A communication unit, configured to return a business query result of the product to be queried to the end user, where the business query result of the product to be queried includes target business information participated by the product to be queried.
[0277] In some implementation manners, the rule information is used to indicate at least one of the following:
[0278] Categories of products included in the product pool;
[0279] Categories of products not included in the product pool;
[0280] Merchants corresponding to products included in the product pool;
[0281] Merchants corresponding to products not included in the product pool;
[0282] Identifications of products included in the product pool;
[0283] Identifications of products not included in the product pool.
[0284] In some implementation manners, the business information includes activity information or coupon information.
[0285] It should be noted that the functions of the various modules in the business query device 700 in the embodiments of the present application can be correspondingly referred to the specific implementation manners of any embodiment in the above method embodiments, and will not be elaborated here.
[0286] Each unit in the above business query device 700 can be implemented in whole or in part by software, hardware, and their combination. The above units can be embedded in the processor in the computer device in a hardware form or be independent of the processor, or can be stored in the memory in the computer device in a software form, so that the processor can call and execute the operations corresponding to the above units.
[0287] For example, the service query device 700 can be integrated into a terminal or server that has a memory, is equipped with a processor, and has computing capabilities, or the service query device 700 is the terminal or server. The terminal can be devices such as a smart phone, a tablet computer, a laptop computer, a smart TV, a smart speaker, a wearable smart device, a personal computer (PC), etc. The terminal can also include a client, which can be a video client, a browser client, an instant messaging client, etc. The server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.
[0288] Optionally, the present application also provides a computer device, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.
[0289] Figure 13 It is a schematic structural diagram of the computer device provided by the embodiment of the present application. As Figure 13 shown, the computer device 800 can include: a communication interface 801, a memory 802, a processor 803, and a communication bus 804. The communication interface 801, the memory 802, and the processor 803 communicate with each other through the communication bus 804. The communication interface 801 is used for the device 800 to communicate with external devices. The memory 802 can be used to store software programs and modules. The processor 803 runs the software programs and modules stored in the memory 802, such as the software programs for the corresponding operations in the foregoing method embodiments.
[0290] Optionally, the processor 803 can call the software programs and modules stored in the memory 802 to perform the following operations:
[0291] Obtain the attribute information of the commodity to be queried;
[0292] According to the attribute information of the commodity to be queried, determine the target rule information matched by the commodity to be queried, where the target rule information includes at least one rule information, each rule information corresponds to a commodity pool, and the rule information is used to define the range of commodities included in the commodity pool;
[0293] Obtain the association relationship between the rule information and the service information;
[0294] Determine the target service information participated by the commodity to be queried according to the target rule information and the association relationship.
[0295] Optionally, the computer device 800 can be integrated, for example, in a terminal or a server that has a memory and is equipped with a processor and has computing capabilities, or the computer device 800 is the terminal or the server.
[0296] The present application also provides a computer-readable storage medium for storing a computer program. The computer-readable storage medium can be applied to the computer device, and the computer program enables the computer device to execute the corresponding processes in the above-mentioned various methods in the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0297] The present application also provides a computer program product, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, enabling the computer device to execute the corresponding processes in the above-mentioned various methods in the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0298] The present application also provides a computer program, which includes computer instructions stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, enabling the computer device to execute the corresponding processes in the above-mentioned various methods in the embodiments of the present application. For the sake of brevity, it will not be elaborated here.
[0299] It should be understood that the processor in the embodiments of the present application may be an integrated circuit chip with signal processing capabilities. In the implementation process, the steps of the above method embodiments can be completed by the integrated logic circuit in the hardware of the processor or instructions in the form of software. The above-mentioned processor may be a general-purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. It can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in combination with the embodiments of the present application can be directly embodied as being executed and completed by the hardware decoding processor, or executed and completed by a combination of the hardware and software modules in the decoding processor. The software module may be located in a mature storage medium in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory, or an electrically erasable programmable memory, a register, etc. This storage medium is located in the memory, and the processor reads the information in the memory and combines its hardware to complete the steps of the above method.
[0300] It can be understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchlink dynamic random access memory (SLDRAM), and direct rambus random access memory (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0301] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Skilled professionals can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present application.
[0302] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the systems, devices, and units described above can refer to the corresponding processes in the foregoing method embodiments, and will not be described herein again.
[0303] In several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling, direct coupling, or communication connection to each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0304] In the embodiments of the present application, the term "module" or "unit" refers to a computer program with a predetermined function or a part of a computer program, which works together with other related parts to achieve a predetermined goal, and can be fully or partially implemented by using software, hardware (such as a processing circuit or a memory), or a combination thereof. Similarly, a processor (or multiple processors or memories) can be used to implement one or more modules or units. In addition, each module or unit can be a part of an overall module or unit that includes the function of the module or unit.
[0305] The units described as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0306] In addition, in the embodiments of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0307] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to enable a computer device (which can be a personal computer, a server) to execute all or part of the steps of the methods described in the various embodiments of the present application. The foregoing storage medium includes: various media such as USB flash drives, mobile hard disks, ROM, RAM, magnetic disks, or optical discs that can store program codes.
[0308] The above are only specific embodiments of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present application can easily think of changes or substitutions, which should all be covered within the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A business query method, characterized in that, Including: Obtain the attribute information of the commodity to be queried; Determine the target rule information matched by the commodity to be queried according to the attribute information of the commodity to be queried, wherein the target rule information includes at least one rule information, each rule information corresponds to a commodity pool, and the rule information is used to define the scope of commodities included in the commodity pool; Obtain the association relationship between the rule information and the service information, wherein each service information is used to identify a service, and the service information associated with a rule information indicates that the commodity pool corresponding to the rule information can participate in the service identified by the service information; Determine the target service information participated by the commodity to be queried according to the target rule information and the association relationship.
2. The method according to claim 1, wherein The determining the target rule information matched by the commodity to be queried according to the attribute information of the commodity to be queried includes: Determine the target rule information matched by the commodity to be queried through a rule engine based on the attribute information of the commodity to be queried.
3. The method according to claim 2, wherein The method further includes: Obtain commodity pool configuration information, where the commodity pool configuration information includes the scope information of the commodity pool; Convert the scope information of the commodity pool into the rule information corresponding to the commodity pool; Write the rule information corresponding to the commodity pool into the rule engine.
4. The method according to claim 3, wherein The method further includes: Obtain commodity pool configuration adjustment information, where the commodity pool configuration adjustment information includes the scope adjustment information of the commodity pool; Convert the scope adjustment information of the commodity pool into the rule adjustment information corresponding to the commodity pool; Update the rule information corresponding to the commodity pool in the rule engine according to the rule adjustment information of the commodity pool.
5. The method according to any one of claims 2-4, characterized in that, The method further includes: Obtain service configuration information, where the service configuration information includes service information and the rule information corresponding to the commodity pool that can participate in the service information; Construct the association relationship based on the service configuration information; Write the association relationship into the rule engine.
6. The method according to claim 5, characterized in that, The method further includes: Obtain service configuration adjustment information, where the service configuration adjustment information is used to adjust the service content corresponding to the service information or the rule information corresponding to the commodity pool that can participate in the service information; Update the association relationship in the rule engine according to the service adjustment information.
7. The method according to any one of claims 1-4, characterized in that, Both the rule information and the service information associated with the rule information are stored in the first field. The obtaining the association relationship between the rule information and the service information includes: Obtain the association relationship between the rule information and the service information from the first field.
8. The method according to any one of claims 1-4, characterized in that The determining the target service information participated by the commodity to be queried according to the target rule information and the association relationship includes: Use the service information associated with the target rule information as the target service information participated by the commodity to be queried.
9. The method according to any one of claims 1-4, characterized in that, The obtaining the attribute information of the commodity to be queried includes: Receive a query request from a terminal user, where the query request is used to query the service information participated by the commodity to be queried, and the query request includes the attribute information of the commodity to be queried.
10. The method according to claim 9, characterized in that, The method further includes: Return the business query result of the product to be queried to the end user, where the business query result of the product to be queried includes the target business information participated by the product to be queried.
11. The method according to any one of claims 1 to 4, characterized in that The rule information is used to indicate at least one of the following: The categories of the products included in the product pool; The categories of the products not included in the product pool; The merchants corresponding to the products included in the product pool; The merchants corresponding to the products not included in the product pool; The identifiers of the products included in the product pool; The identifiers of the products not included in the product pool.
12. The method according to any one of claims 1-4, characterized in that, The business information includes activity information or coupon information.
13. A service query device, characterized in that, including: A first acquisition unit for acquiring the attribute information of the product to be queried; A first determination unit for determining the target rule information matched by the product to be queried according to the attribute information of the product to be queried, where the target rule information includes at least one rule information, and each rule information corresponds to a product pool, and the rule information is used to define the scope of the products included in the product pool; A second acquisition unit for acquiring the association relationship between the rule information and the business information, where each business information is used to identify a business, and the business information associated with a rule information indicates that the product pool corresponding to the rule information can participate in the business identified by the business information; A second determination unit for determining the target business information participated by the product to be queried according to the target rule information and the association relationship.
14. A computer device, characterized in that, The computer device includes a processor and a memory, and a computer program is stored in the memory. The processor is used to execute the business query method according to any one of claims 1-12 by calling the computer program stored in the memory.
15. A computer-readable storage medium, characterized in that, For storing a computer program, the computer program causes the computer device to execute the method according to any one of claims 1 to 12.