Index scheduling method and apparatus, device, and medium

By building a main index and its subordinate sub-indexes in e-commerce search, and using an index scheduler to schedule target sub-indexes based on store identifiers, the problem of decreased search performance under large data volumes is solved, efficient search result return is achieved, and user experience is improved.

CN117828157BActive Publication Date: 2026-05-19BUSINESS LINE COMMERCIAL PTE LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BUSINESS LINE COMMERCIAL PTE LTD
Filing Date
2024-01-05
Publication Date
2026-05-19

AI Technical Summary

Technical Problem

In independent e-commerce search, as the amount of data increases, the index becomes larger and the number of shards also increases, which affects search performance. Traditional methods of increasing the number of shards still cannot effectively solve the problem of long search time.

Method used

By acquiring product information search requests, the index scheduler schedules target sub-indexes under the main index based on the store identifier, and builds the main index and multiple sub-indexes under it in the search engine to achieve parallel search and result ranking, thus optimizing the index scheduling process.

Benefits of technology

It enables efficient provision of a unified master index for any store search service, and accurately schedules target sub-indexes based on store identifiers, thereby improving search performance, reducing search time, and enhancing user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117828157B_ABST
    Figure CN117828157B_ABST
Patent Text Reader

Abstract

The application relates to an index scheduling method and device, equipment and a medium in the technical field of e-commerce search, the method comprising: obtaining a commodity information search request pushed by an arbitrary shop search service, the commodity information search request carrying a shop identifier and a main index; delivering the commodity information search request to a search engine, and scheduling a target slave index under the main index according to the shop identifier by an index scheduler in the search engine; searching the target slave index according to the commodity information search request by the search engine, and returning a request result; and sending the request result to the shop search service to answer the commodity information search request. The application can efficiently obtain a request result by providing a unified main index for an arbitrary shop search service, accurately scheduling a target slave index under the main index according to a shop identifier to serve a commodity information search request, and without an upstream service understanding a plurality of slave indexes to make a calling instruction to one of the slave indexes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of e-commerce search technology, and in particular to an index scheduling method and the corresponding apparatus, computer equipment, and computer-readable storage medium. Background Technology

[0002] In the realm of independent e-commerce search, product information for all online stores hosted on independent websites is stored in the same Elasticsearch index. The search performance of each shard is maintained by setting a reasonable number of shards. However, as the data volume increases, the index grows larger, the number of shards increases, and the size of each shard also increases. Due to Elasticsearch's distributed search characteristics, a complete search for product information from the same online store will search all shards in the index. As the overall data volume increases, search performance is significantly impacted, resulting in longer search times.

[0003] In traditional techniques, the number of index shards is usually increased to reduce the size of a single shard and ensure the search performance of a single shard. However, when the overall data volume is too large, the search performance is still significantly affected, the search takes a long time, and it affects the user experience of using the search service.

[0004] Given the shortcomings of traditional technologies, the applicant has long been engaged in research in related fields and has therefore taken a different approach to solve the industry problems in the field of e-commerce search technology. Summary of the Invention

[0005] The primary objective of this application is to solve at least one of the above-mentioned problems by providing an index scheduling method and corresponding apparatus, computer equipment, and computer-readable storage medium.

[0006] To achieve the various objectives of this application, the following technical solution is adopted:

[0007] An index scheduling method provided for one of the purposes of this application includes the following steps:

[0008] Obtain product information search requests pushed by any store search service, wherein the product information search requests carry store identifiers and main indexes;

[0009] The product information search request is sent to the search engine, and the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier;

[0010] The search engine searches for the target from the index based on the product information search request and returns the request results;

[0011] The request result is sent to the store search service to respond to the product information search request.

[0012] In a further embodiment, before obtaining a product information search request pushed by any store search service, the following steps are included:

[0013] In a search engine, build a primary index and multiple sub-indexes under it;

[0014] In response to the data source synchronization event, retrieve the product information of the store specified by the event and send it to the search engine;

[0015] The index scheduler in the search engine determines the secondary index under the main index as the secondary index to be written based on the store identifier of the store to which the product information belongs, and writes the product information into the secondary index to be written.

[0016] In a further embodiment, the search engine searches the target from the index based on the product information search request and returns the request results, including the following steps:

[0017] The coordinating node in the search engine forwards the product information search request to the data nodes where each shard of the target index is located.

[0018] The partial product identifiers and their scores required for the product information search request are retrieved by all shards in parallel. The data node where each shard is located returns the corresponding partial product identifiers and their scores to the coordinating node.

[0019] The coordinating node performs data operations on all partial product identifiers to produce a set of product identifiers;

[0020] The coordinating node accesses the corresponding data node based on the product identifier in the product identifier set to read the corresponding product information and form the request result.

[0021] In a further embodiment, building a primary index and multiple secondary indexes within the search engine includes the following steps:

[0022] Obtain the primary index configuration information, which includes primary index information and secondary index information. The primary index information includes the primary index name and the scheduling hash algorithm matched by the primary index and its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding names.

[0023] The configuration interface of the search engine is invoked, and the main index configuration information is passed to the configuration interface to drive it to build the main index according to the main index information and build the corresponding secondary index according to the secondary index information.

[0024] In a further embodiment, sending the request result to the store search service includes the following steps:

[0025] In each product information contained in the request result, the store search service determines the text information required for display in the search scenario;

[0026] An exposure effectiveness model is used to determine the comprehensive score for each product information based on the text information in each product information.

[0027] The product information in the request results is sorted according to the comprehensive score, and the sorted request results are sent to the store search service.

[0028] In a further embodiment, the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier, including the following steps:

[0029] The index scheduler in the search engine reads the preset main index configuration information and determines that the algorithm-specified parameter in the main index configuration information is the store identifier.

[0030] The scheduling hash algorithm in the main index configuration information is invoked to determine the target secondary index based on the parameters specified in the algorithm.

[0031] In a further embodiment, after sending the request result to the store search service to respond to the product information search request, the following steps are included:

[0032] The number of requests received by the search engine in each preset time period is determined;

[0033] When the number of requests corresponding to multiple consecutive time periods is less than a preset threshold, the sending of product information search requests to the search engine is stopped.

[0034] In response to a change in the number of sub-indexes, obtain the number of sub-indexes required by the business, and build a new primary index in the search engine and its corresponding sub-indexes for that number of sub-indexes;

[0035] Redirect the product information of the stores written to the main index to be written to the new main index, and migrate the product information of all stores in the main index to the new main index;

[0036] After the migration is complete, delete the primary index and create a new primary index with the alias of the primary index.

[0037] On the other hand, an index scheduling device provided to suit one of the purposes of this application includes a request acquisition module, a sub-index scheduling module, a result return module, and a result sending module. The request acquisition module is used to acquire a product information search request pushed by any store search service, the product information search request carrying a store identifier and a main index. The sub-index scheduling module is used to send the product information search request to a search engine, whereby the index scheduler in the search engine schedules a target sub-index under the main index according to the store identifier. The result return module is used for the search engine to search the target sub-index according to the product information search request and return the request result. The result sending module is used to send the request result to the store search service in response to the product information search request.

[0038] In a further embodiment, before the request acquisition module, the system includes: a first index construction submodule, used to construct a main index and multiple sub-indexes under it in the search engine; an event response submodule, used to respond to a data source synchronization event, acquire the product information of the store specified by the event and send it to the search engine; and an index writing submodule, used by the index scheduler in the search engine to determine the sub-index under the main index as the sub-index to be written based on the store identifier of the store to which the product information belongs, and to write the product information into the sub-index to be written.

[0039] In a further embodiment, the result return module includes: a request forwarding submodule, used by the coordinating node in the search engine to forward the product information search request to the data nodes where all shards of the target index are located; an identifier return submodule, used by all shards to search in parallel for the partial product identifiers and their scores required for the product information search request, and the data node where each shard is located returns the corresponding partial product identifiers and their scores to the coordinating node; a set generation submodule, used by the coordinating node to perform data operations on all partial product identifiers to generate a set of product identifiers; and a result composition submodule, used by the coordinating node to access the corresponding data nodes and read the corresponding product information to compose the request result based on the product identifiers in the set of product identifiers.

[0040] In a further embodiment, the index construction submodule includes: an information acquisition submodule, used to acquire main index configuration information, the main index configuration information including main index information and secondary index information, the main index information including the main index name and the scheduling hash algorithm matched by the main index and its specified parameters, the secondary index information including the number of secondary indexes and their corresponding names; and an interface call submodule, used to call the search engine's configuration interface, passing the main index configuration information to the configuration interface to drive it to construct the main index according to the main index information and the corresponding secondary indexes according to the secondary index information.

[0041] In a further embodiment, the result sending module includes: an information determination submodule, used to determine the text information required for display in the search scenario by the store search service in each product information contained in the request result; a rating determination submodule, used to determine the comprehensive rating corresponding to each product information based on the text information in each product information using an exposure effectiveness model; and a result sending submodule, used to sort the product information in the request result according to the comprehensive rating and send the sorted request result to the store search service.

[0042] In a further embodiment, the sub-index scheduling module includes: a configuration reading sub-module, used to read preset main index configuration information by the index scheduler in the search engine, and determine the store identifier as the algorithm-specified parameter in the main index configuration information; and a sub-index determination sub-module, used to call the scheduling hash algorithm in the main index configuration information to determine the target sub-index according to the algorithm-specified parameter.

[0043] In a further embodiment, after the result sending module, the system includes: a total quantity determination submodule, used to determine the number of requests received by the search engine in each preset time period; a stop sending submodule, used to stop sending product information search requests to the search engine when the number of requests corresponding to multiple consecutive time periods is less than a preset threshold; a second index construction submodule, used to respond to a subindex quantity change event, obtain the number of subindexes required for the business, and construct a new main index in the search engine and its corresponding subindexes of the same number of subindexes; an information migration submodule, used to redirect the product information of stores written in the main index to be written in the new main index, and migrate the product information of all stores in the main index to the new main index; and an alias setting submodule, used to delete the main index after the migration is completed, and create a new alias for the main index as the main index name of the main index.

[0044] In another aspect, a computer device provided for one of the purposes of this application includes a central processing unit and a memory, the central processing unit being used to invoke and run a computer program stored in the memory to perform the steps of the index scheduling method described in this application.

[0045] In another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores, in the form of computer-readable instructions, a computer program implemented according to the described indexing and scheduling method, which, when invoked by a computer, performs the steps included in the method.

[0046] The technical solution of this application has many advantages, including but not limited to the following aspects:

[0047] This application obtains product information search requests pushed by any store search service. These requests carry a store identifier and a main index. The product information search request is then sent to a search engine. The search engine's index scheduler schedules target sub-indexes under the main index based on the store identifier. The search engine then searches the target sub-indexes according to the product information search request, returns the request result, and sends the result back to the store search service to respond to the product information search request. Therefore, this approach provides a unified main index for any store search service, accurately schedules target sub-indexes under the main index to serve product information search requests based on store identifiers, and efficiently obtains the request result. Upstream services do not need to understand the calling relationships between multiple sub-indexes in the search engine's underlying layer and the product information search request to instruct the target sub-index among multiple sub-indexes for the request. Attached Figure Description

[0048] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0049] Figure 1 The network architecture of the e-commerce platform exemplified in this application;

[0050] Figure 2 This is a flowchart illustrating a typical embodiment of the index scheduling method of this application;

[0051] Figure 3 This is a schematic diagram illustrating the process of writing product information to the main index and its multiple sub-indexes in the constructed search engine, as described in an embodiment of this application.

[0052] Figure 4 This is a schematic diagram illustrating the multi-shard parallel search process using a secondary index under a primary index in an embodiment of this application.

[0053] Figure 5 This is a schematic diagram illustrating the process of constructing the main index and its multiple sub-indexes in a search engine according to an embodiment of this application;

[0054] Figure 6 This is a schematic diagram illustrating the process of sorting the request results and sending them to the store search service in an embodiment of this application;

[0055] Figure 7 This is a schematic diagram illustrating the process of determining the target from the index in an embodiment of this application;

[0056] Figure 8 This is a schematic diagram illustrating the process of expanding or shrinking the main index in an embodiment of this application;

[0057] Figure 9 This is a schematic block diagram of the index scheduling device of this application;

[0058] Figure 10 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation

[0059] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0060] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0061] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0062] like Figure 1 In the network architecture shown, the e-commerce platform 82 is deployed on the Internet to provide corresponding services to its users. Similarly, the devices 80 of the merchant users and the devices 81 of the consumer users of the e-commerce platform 82 are also connected to the Internet to use the services provided by the e-commerce platform.

[0063] An exemplary e-commerce platform 82 provides supply and demand matching of products and / or services to the general public through the Internet infrastructure. In e-commerce platform 82, products and / or services are provided as commodity information. For the sake of simplicity, the concepts of commodity and product are used in this application to refer to the products and / or services in e-commerce platform 82. Specifically, these may be physical products, digital products, tickets, service subscriptions, other offline services, etc.

[0064] In reality, various entities can access e-commerce platform 82 as users and utilize its online services to participate in the business activities facilitated by the platform. These entities can be natural persons, legal persons, or social organizations. Corresponding to the two types of entities in business activities—merchants and consumers—e-commerce platform 82 has two corresponding categories of users: merchant users and consumer users. Entities involved in the product distribution chain in business activities, including manufacturers, sellers, retailers, and logistics providers, can all use online services on e-commerce platform 82 as merchant users. Similarly, consumers in business activities, including actual or potential consumers, can use online services on e-commerce platform 82 as consumer users. In actual business activities, the same entity can operate as both a merchant user and a consumer user; this should be interpreted flexibly.

[0065] The infrastructure used to deploy the e-commerce platform 82 mainly includes the backend architecture and frontend devices. The backend architecture runs various online services through a service cluster, including middleware or frontend services for the platform, services for consumers, and services for merchants, to enrich and improve its service functions. The frontend devices mainly cover the terminal devices used by users as clients to access the e-commerce platform 82, including but not limited to various mobile terminals, personal computers, and point-of-sale devices. For example, merchant users can use their terminal device 80 to enter product information for their online stores or use the interfaces opened by the e-commerce platform to generate their product information; consumer users can use their terminal device 81 to access the webpage of the online store implemented by the e-commerce platform 82, trigger the shopping process by clicking the shopping button provided on the webpage, and call various online services provided by the e-commerce platform 82 during the shopping process to achieve the purpose of placing an order.

[0066] In some embodiments, the e-commerce platform 82 may be implemented via a processing facility including a processor and memory, which stores a set of instructions that, when executed, cause the e-commerce platform 82 to perform the e-commerce and support functions as described in this application. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, fixed computing platform, or other computing platform, and may provide electronic components, merchant devices, payment gateways, application developers, marketing channels, transportation providers, customer devices, point-of-sale devices, etc., for the e-commerce platform 82.

[0067] E-commerce platform 82 can provide online services such as cloud computing services, Software as a Service (SaaS), Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Desktop as a Service (DaaS), Hosted Software as a Service, Mobile Backend as a Service (MBaaS), and Information Technology Management as a Service (ITMaaS). In some embodiments, the various functional components of e-commerce platform 82 can be implemented to operate on various platforms and operating systems. For example, for an online store, its administrator user enjoys the same or similar functions regardless of whether it is on iOS, Android, HomonyOS, or a web page.

[0068] E-commerce platform 82 enables merchants to create their own independent websites to run their online stores. It provides merchants with corresponding business management engine instances, allowing them to establish, maintain, and operate one or more online stores across these independent websites. The business management engine instance can be used for content management, task automation, and data management for one or more online stores. It can be configured through interfaces or built-in components to support various specific business processes in the online store, supporting business activities. Independent websites are the infrastructure of e-commerce platform 82, which offers cross-border services. Merchants can maintain their online stores relatively independently and centrally based on these independent websites. Independent websites typically have dedicated domain names and storage space, and different independent websites are relatively independent. E-commerce platform 82 can provide standardized or customized technical support for a large number of independent websites, allowing merchants to customize a business management engine instance that suits their needs and use it to maintain one or more online stores.

[0069] Online stores can be configured and maintained in the backend by merchant users logging into their Business Management Engine instance as administrators. Supported by the various online services provided by the e-commerce platform 82's infrastructure, merchant users can configure various functions within their online stores and view various data as administrators. For example, merchant users can manage various aspects of their online stores, such as viewing recent online store activities, updating the online store's product catalog, managing orders, recent visit activity, and total order activity. Merchant users can also view more detailed information about their business and visitors to their online store by obtaining reports or metrics, such as displaying a sales summary of the merchant's overall business, specific sales and engagement data from promotional sales and marketing channels, etc.

[0070] E-commerce platforms 82 can provide communication facilities and associated merchant interfaces for electronic communication and marketing. For example, they can utilize electronic messaging aggregation facilities to collect and analyze communication interactions between merchants, consumers, merchant devices, customer devices, point-of-sale devices, etc., aggregating and analyzing communications to increase the potential for product sales. For instance, a consumer may have product-related questions, which could lead to a dialogue between the consumer and the merchant (or an automated processor-based agent representing the merchant), where the communication facilities handle the interaction and provide the merchant with analysis on how to increase the probability of a sale.

[0071] In some embodiments, applications suitable for installation on terminal devices can be provided to serve the access needs of different users, enabling various users to access the e-commerce platform 82 by running the application on their terminal devices. Examples include the merchant backend module of online stores within the e-commerce platform 82. During the process of conducting business activities through these functions, the e-commerce platform 82 can implement various functions related to business activities as middleware or online services and expose corresponding interfaces. Then, toolkits corresponding to the interface access functions are embedded into the application to achieve functional expansion and task completion. The business management engine can include a series of basic functions and expose these functions to online services and / or applications via APIs. Online services and applications use the corresponding functions by remotely calling the corresponding APIs.

[0072] With the support of various components of the Business Management Engine instance, the e-commerce platform 82 can provide online shopping functionality, enabling merchants to connect with customers in a flexible and transparent manner. Consumers can select items online, create orders, provide delivery addresses in the orders, and complete payment confirmation. Merchants can then review and fulfill or cancel orders. The review component included with the Business Management Engine instance ensures compliant use of business processes, guaranteeing that orders are suitable for fulfillment before actual execution. Orders may sometimes be fraudulent and require verification (e.g., ID checks). Payment methods that require merchants to wait to ensure receipt of funds can mitigate this risk, and so on. Order risks may arise from fraud detection tools submitted by third parties through order risk APIs, etc. Before fulfillment, merchants may need to obtain or wait to receive payment information to mark the order as paid before preparing to deliver the product. Such situations can all be subject to appropriate review. The review process can be implemented by the fulfillment component. Merchants can leverage fulfillment components to review and adjust operations, and trigger related fulfillment services. These include: manual fulfillment services, used when merchants select and pack products into boxes, purchase shipping labels and enter tracking numbers, or simply mark items as fulfilled; custom fulfillment services, which can define email notifications; API fulfillment services, which can trigger third-party applications to create fulfillment records; legacy fulfillment services, which can trigger custom API calls from the Commerce Management Engine to third parties; and gift card fulfillment services, which can generate and activate gift cards. Merchants can use an order printer application to print shipping documents. The fulfillment process can be executed once items are packed and ready for shipment, tracked, delivered, and verified by the consumer.

[0073] It can be seen that the services provided by e-commerce platforms are based on products, and the corresponding product data is the foundational data of these platforms. Providing product information through this data and mining and utilizing it are fundamental to various technical services. This includes using user transaction data and product data from the e-commerce platform to provide basic services for the operation of a real-time streaming data processing system. Therefore, the real-time streaming data processing system of this application can run on any one or more servers within the e-commerce platform's cluster, enabling the use of various product data provided by the e-commerce platform to achieve various functions.

[0074] The index scheduling method of this application can be programmed into a computer program product and deployed on a client or server for execution. For example, in an exemplary application scenario of this application, it can be deployed on the server of an e-commerce customer service platform. In this way, the method can be executed by human-computer interaction with the process of the computer program product through a graphical user interface by accessing the interface opened after the computer program product is run.

[0075] Please see Figure 2 The index scheduling method of this application, in its typical embodiment, includes the following steps:

[0076] Step S1100: Obtain a product information search request pushed by any store search service, wherein the product information search request carries a store identifier and a main index;

[0077] The e-commerce platform service in this application serves multiple independent websites, each with a corresponding individual online store. Each online store is created, operated, and maintained by a specific merchant user. For example, the merchant user lists products for sale on the online store, enters product information, and submits this product information, linked to the online store, to the e-commerce platform's server. The online stores primarily provide buyers with product display, store search services, adding items to their cart, placing orders, logistics and delivery, after-sales service, customer service, and more.

[0078] It is understood that when the store search service provided by any store is used, a product information search request will be triggered, and the index to be accessed by the request needs to be specified. Therefore, this application provides a primary index name that indicates the index to be accessed by the product information search request corresponding to any store search service. The primary index stores the product information of all online stores through all its subordinate indexes, and all product information of each online store is stored in one subordinate index.

[0079] The product information includes all textual information describing the product, such as product title, product details text, product tags, product category, product price, product parameters, product sales volume, product reviews, etc.

[0080] Buyers on the e-commerce platform can access any of the independent websites on their client devices and shop in the online stores of those independent websites. During the shopping process, to quickly find the product information they need, buyers can use the store search service provided by the online stores, providing corresponding search text. The client device is then triggered to generate a product information search request containing the search text, carrying the store identifier of the online store and the index name of the primary index to be accessed. The store identifier is used to identify an online store and distinguish it from other online stores. The specific identifier can be flexibly set by those skilled in the art; for example, it can use the SHA-256 hash algorithm or any other algorithm that ensures uniqueness and consistency. The store name set by each merchant to distinguish their online store from other online stores is used as the input parameter of the algorithm to generate the store identifier corresponding to that store name.

[0081] The e-commerce platform's server receives and responds to the product information search request, obtaining the request and the store identifier and main index it carries.

[0082] Step S1200: The product information search request is sent to the search engine, and the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier;

[0083] The search engine is implemented using Elasticsearch, a full-text search engine based on Lucene, also known as a distributed search engine. It is developed in Java and is open source, featuring distributed HTTP Web and frameless JSON document support.

[0084] The server selects any node in the search engine cluster as a coordinating node and establishes a connection with that coordinating node, sending the product information search request to that coordinating node. This connection can be established via a network protocol (such as HTTP or TCP) so that the server can communicate and interact with the coordinating node in the search engine cluster.

[0085] The search engine's coordinating node receives the product information search request. Then, the coordinating node invokes the index scheduler to read the main index configuration information based on the index name and store identifier carried in the request. It determines that the algorithm-specified parameter in the main index configuration information is the store identifier. Then, it invokes the scheduling hash algorithm in the main index configuration information, using the algorithm-specified parameter as input, to determine the target sub-index. The scheduling hash algorithm can be a hash modulo algorithm or a consistent hash algorithm. In one embodiment, the hash modulo algorithm is used specifically as hash(store_id)%num, where store_id is the store identifier and num is the number of sub-indexes under the main index.

[0086] Step S1300: The search engine searches the target index according to the product information search request and returns the request result;

[0087] Furthermore, the coordinating node broadcasts the product information search request to all nodes where the target index resides, treating these nodes as data nodes. Each data node on a local machine performs a search based on the search text in the product information search request and constructs a priority queue with a matching document size of from + size. Then, each data node returns all product identifiers in its priority queue, along with the score value corresponding to each product identifier, to the coordinating node. The coordinating node receives all product identifiers and performs one or more data operations such as merging, sorting, and pagination on all product identifiers based on their scores, producing a set of product identifiers. The coordinating node then accesses the data node that submitted the product identifier based on the product identifiers in the set, and reads the product information of the corresponding product identifier from the data node to form the request result.

[0088] It is understood that the score is a quantified numerical value representing the relevance between the corresponding product information and the search text in the product information search request. A higher score corresponds to a higher relevance, and a lower score corresponds to a lower relevance.

[0089] The product identifier is used to refer to a product information and distinguish it from other product information. The specific design can be flexibly modified by those skilled in the art. For example, the SHA-256 hash algorithm or any other algorithm that ensures uniqueness and consistency can be used, with the product information as the input parameter of the algorithm, thereby generating the product identifier corresponding to the product information.

[0090] Step S1400: Send the request result to the store search service to respond to the product information search request.

[0091] After the server receives the search engine's response, it ranks the product information within the results to attract buyers' interest. Specifically, this involves retrieving product reviews for each product, determining the number of positive and negative reviews, and the total number of reviews. It also retrieves the sales volume, price, and rating for each product, identifying the highest sales volume, the highest price, and the highest rating. Furthermore, based on these metrics, a recommendation rating is calculated for each product using a specific formula. An example formula is shown below.

[0092]

[0093] Wherein, Recommend Score is the recommendation rating for a single product information, a is the number of positive reviews for the product information, b is the number of negative reviews for the product information, c is the total number of comments for the product information, d is the score value for the product information, e is the sales volume for the product information, f is the price for the product information, and MaxD, MaxE, and MaxE are the maximum score value, maximum sales volume, and maximum value, respectively.

[0094] As can be seen, the recommendation rating comprehensively considers each product's price, sales volume, relevance to the search text, and the degree of positiveness of the product's reviews, which can accurately reflect the overall quality of the product to a certain extent, helping to attract buyers and increase the likelihood of purchase.

[0095] Based on the recommendation ratings of each product in the request results, from highest to lowest, all product information is sorted, and the server sends the sorted request results to the client using the store search service.

[0096] As can be seen from the typical embodiments of this application, the technical solution of this application has many advantages, including but not limited to the following aspects:

[0097] This application obtains product information search requests pushed by any store search service. These requests carry a store identifier and a main index. The product information search request is then sent to a search engine. The search engine's index scheduler schedules target sub-indexes under the main index based on the store identifier. The search engine then searches the target sub-indexes according to the product information search request, returns the request result, and sends the result back to the store search service to respond to the product information search request. Therefore, this approach provides a unified main index for any store search service, accurately schedules target sub-indexes under the main index to serve product information search requests based on store identifiers, and efficiently obtains the request result. Upstream services do not need to understand the calling relationships between multiple sub-indexes in the search engine's underlying layer and the product information search request to instruct the target sub-index among multiple sub-indexes for the request.

[0098] Please see Figure 3 In a further embodiment, before step S1100, obtaining the product information search request pushed by any store search service, the following steps are included:

[0099] Step S1000: Build the main index and its multiple sub-indexes in the search engine;

[0100] Obtain the primary index configuration information, which includes primary index information and secondary index information. The primary index information includes the primary index name and the scheduling hash algorithm matched by the primary index and its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding names.

[0101] Exemplary examples are as follows:

[0102] text_index{"_follow":{"suffix":"text_index_hash","num":4,"function":"storeHashFunc","routeKey":"store_id"},"mappings":{"properties":{"id":{"type":"integer"},"store_id":{"type":"integer"}}}}

[0103] Where: `text_index` is the primary index name; `"function":"storeHashFunc"` specifies the scheduling hash algorithm as `storeHashFunc`, which can be either a hash modulo algorithm or a consistent hash algorithm, and can be set as needed; `"routeKey":"store_id"` specifies the algorithm parameter for the scheduling hash algorithm, which is the store identifier; `"suffix":"text_index_hash"` specifies the prefix for the secondary index as `text_index_hash`; `"num":4` sets the number of secondary indices to 4; `"id":{"type":"integer"}` specifies that the data type of the secondary index corresponding to the subindex `id` is integer; `"store_id":{"type":"integer"}` specifies that the data type of the store identifier is integer.

[0104] The Kibana Dev tools are used as the configuration interface for the search engine. The primary index configuration information is executed using the "PUT" method, which builds the primary index and its multiple secondary indexes. For ease of understanding and demonstration, executing the primary index configuration information in the above example will generate a primary index named `text_index`, and four secondary indexes named `test_index_hash0`, `test_index_hash1`, `test_index_hash2`, and `test_index_hash3`.

[0105] By using the Kibana Dev tools, you can directly interact with Elasticsearch, execute queries, manage indexes, and perform other operations.

[0106] Step S1010: Respond to the data source synchronization event, obtain the product information of the store specified by the event, and send it to the search engine;

[0107] The data source is a database that stores product information for all stores. This database can be implemented using any of the following databases: MySQL, PostgreSQL, MongoDB, etc. When the server receives product information entered and submitted by a merchant user for products listed in their online store, it associates this product information with the corresponding product identifier and the store identifier of the online store, and stores it in the data source.

[0108] It is understood that the server can deploy Flink as a connector to the data source, thereby enabling Flink to execute CDC tasks to synchronize all product information in the data source to the search engine. Specifically, when the data source changes, it responds to the data source synchronization event and records the corresponding changes through triggers or binlogs pre-attached to the data source. The connector uses Debezium to capture the corresponding changed product information in the data source and selects any node in the search engine cluster as a coordinating node. The connector establishes a connection with the coordinating node, thereby sending the changed product information, carrying the default configured primary index name, to the coordinating node. Subsequently, the search engine synchronizes the changed product information, ensuring that the product information in the search engine and the product information in the data source remain consistent to a certain extent in real time.

[0109] Step S1020: The index scheduler in the search engine determines the secondary index under the main index as the secondary index to be written based on the store identifier of the store to which the product information belongs, and writes the product information into the secondary index to be written.

[0110] The coordinating node receives the product information and then calls the index scheduler to read the main index configuration information of the main index based on the store identifier of the store to which the product information belongs and the main index name of the main index carried in the product information. It determines that the algorithm-specified parameter in the main index configuration information is the store identifier. Then, it calls the scheduling hash algorithm in the main index configuration information, taking the algorithm-specified parameter as input, to determine the corresponding secondary index as the secondary index to be written, and writes the product information into the secondary index to be written. For ease of understanding and demonstration, the hash algorithm used is the hash modulo algorithm hash(store_id) % num. Based on a certain store_id, the hash value is calculated to be 3, and then modulo is taken with num, which is 4, resulting in a final value of 3. Therefore, the secondary index with index 3, i.e., the secondary index name test_index_hash3, is the secondary index to be written.

[0111] When the coordinating node writes the product information into the write-to-slave index, and the write-to-slave index is divided into multiple shards, specifically, the coordinating node obtains the product identifier of the product information, calls a hash modulo algorithm using the product identifier as the algorithm's specified parameter, determines the shard belonging to the primary shard in the write-to-slave index as the target primary shard, and writes the product information into the target primary shard. Then, if the target primary shard has a corresponding shard belonging to a replica shard, the product information is synchronized to the replica shard, ensuring that the product information in the replica shard is, to a certain extent, identical in real-time to the product information in the target primary shard. The hash modulo algorithm is hash(product_id) % shard_num, where product_id is the product identifier and shard_num is the number of shards in the write-to-slave index.

[0112] This embodiment discloses the construction of the main index and its subordinate sub-indexes of the search engine, synchronizing the changed product information in the data source to the corresponding sub-index to be written to the store identifier. On the one hand, ensuring that product information of the same store identifier (i.e., the same store) is written to the same corresponding sub-index to be written is beneficial to improving the full search performance of all product information of the same store. On the other hand, during the search engine read and write process, the index scheduler schedules the sub-indexes under the main index according to the same main index configuration information, which can ensure the consistency of read and write.

[0113] Please see Figure 4 In a further embodiment, step S1300, where the search engine searches the target from the index according to the product information search request and returns the request result, includes the following steps:

[0114] Step S1310: The coordinating node in the search engine forwards the product information search request to the data nodes where all the shards of the target index are located.

[0115] The coordinating node broadcasts the product information search request to all the nodes where the target is located from the index, and uses these nodes as data nodes.

[0116] Step S1320: All shards search in parallel to find the partial product identifiers and their scores required for the product information search request. The data node where each shard is located returns the corresponding partial product identifiers and their scores to the coordination node.

[0117] Each shard's local data node performs a search based on the search text in the product information search request and constructs a priority queue with a matching document size of from + size. Then, each shard's data node returns all product identifiers in its priority queue, along with the score value corresponding to each product identifier, to the coordinating node.

[0118] Step S1330: The coordinating node performs data operations on all partial product identifiers to produce a product identifier set;

[0119] The coordinating node receives all product identifiers and performs one or more data operations such as merging, sorting, and pagination on all product identifiers based on the score value of each product identifier, producing a set of product identifiers.

[0120] Step S1340: The coordinating node accesses the corresponding data node based on the product identifier in the product identifier set to read the corresponding product information and form a request result.

[0121] The coordinating node invokes a hash modulo algorithm, using the product identifiers in the product identifier set as specified parameters to determine the shard corresponding to each product identifier. For each shard, the coordinating node accesses the data node where that shard resides and forwards the corresponding product identifier to that data node. Simultaneously, the local data node of each shard performs a search based on the corresponding product identifier, and then each data node returns its searched product information to the coordinating node. The coordinating node receives all the product information to form the request result.

[0122] The hash modulo algorithm is hash(product_id) % shard_num, where product_id is the product identifier and shard_num is the number of shards to be written to the index.

[0123] For determining the shard corresponding to each product identifier, each shard is specifically a shard belonging to the primary shard and one of all shards belonging to the replica shards corresponding to the shard belonging to the primary shard. This can be implemented using any one of the round-robin algorithm, the least connection number algorithm, or the random algorithm to ensure load balancing of read data.

[0124] In this embodiment, the coordinating node in the search engine schedules the target to perform a search in parallel on its respective data node based on the product information search request, across all shards in the index. This generates a set of product identifiers from the data returned by these data nodes. The coordinating node then schedules the shard corresponding to each product identifier in this set, and performs a search in parallel on its respective data node based on the corresponding product identifier. The returned data from these data nodes constitutes the request result. Therefore, by leveraging multi-shard parallel search, the request result can be obtained efficiently.

[0125] Please see Figure 5 In a further embodiment, step S1000, constructing the main index and its multiple subordinate indexes in the search engine, includes the following steps:

[0126] Step S1001: Obtain the primary index configuration information, which includes primary index information and secondary index information. The primary index information includes the primary index name and the scheduling hash algorithm matched by the primary index and its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding secondary index names.

[0127] Exemplary examples are as follows:

[0128] text_index{"_follow":{"suffix":"text_index_hash","num":4,"function":"storeHashFunc","routeKey":"store_id"},"mappings":{"properties":{"id":{"type":"integer"},"store_id":{"type":"integer"}}}}

[0129] Where: `text_index` is the primary index name; `"function":"storeHashFunc"` specifies the scheduling hash algorithm as `storeHashFunc`, which can be either a hash modulo algorithm or a consistent hash algorithm, and can be set as needed; `"routeKey":"store_id"` specifies the algorithm parameter for the scheduling hash algorithm, which is the store identifier; `"suffix":"text_index_hash"` specifies the prefix for the secondary index as `text_index_hash`; `"num":4` sets the number of secondary indices to 4; `"id":{"type":"integer"}` specifies that the data type of the secondary index corresponding to the subindex `id` is integer; `"store_id":{"type":"integer"}` specifies that the data type of the store identifier is integer.

[0130] Step S1002: Call the configuration interface of the search engine, pass the main index configuration information to the configuration interface, so as to drive it to build the main index according to the main index information and build the corresponding secondary index according to the secondary index information.

[0131] The Kibana Dev tools are used as the configuration interface for the search engine. The primary index configuration information is executed using the "PUT" method, which builds the primary index and its multiple secondary indexes. For ease of understanding and demonstration, executing the primary index configuration information in the above example will generate a primary index named `text_index`, and four secondary indexes named `test_index_hash0`, `test_index_hash1`, `test_index_hash2`, and `test_index_hash3`.

[0132] By using the Kibana Dev tools, you can directly interact with Elasticsearch, execute queries, manage indexes, and perform other operations.

[0133] This embodiment discloses the process of constructing a primary index and its multiple secondary indexes in a search engine based on the primary index configuration.

[0134] Please see Figure 6 In a further embodiment, step S1400, sending the request result to the store search service, includes the following steps:

[0135] Step S1410: Determine that in each product information contained in the request result, the store search service provides the text information required for display in the search scenario;

[0136] The server can build a mapping relationship between each store search service and its corresponding search scenario, as well as the fields in the product information to be displayed in that search scenario. This allows the server to know the search scenario corresponding to the store search service and the fields in the product information to be displayed in that search scenario when it receives a product information search request from a store search service.

[0137] The text information is composed of the text corresponding to the field in each product information contained in the request result.

[0138] Step S1420: Using the exposure effectiveness model, determine the comprehensive score corresponding to each product information based on the text information in each product information;

[0139] The exposure effectiveness model is pre-trained to a convergent state, and learns to predict the click-through rate of the text information provided by the store search service in the product information for display in the search scenario, and the click-through purchase rate of the purchase made by the buyer after the text information is exposed in the search scenario.

[0140] The exposure effectiveness model is a dual-tower model in terms of model structure, which includes a shared input layer, a click-through rate (CTR) prediction tower, and a click-through rate (CTR) prediction tower. The shared input layer can be a text feature extraction layer that can be implemented using BERT. The CTR prediction tower can be implemented using DeepFM, and the CTR prediction tower can be implemented using DeepFM. The parameters of the CTR prediction tower and the CTR prediction tower are not shared and need to be learned independently.

[0141] Specifically, the training process of the exposure effectiveness model involves obtaining a training set, which includes multiple training samples and a supervision label for each training sample. The training samples are the text information provided by the store search service in the product information for display in a search scenario. The supervision label is a click-through rate (CTR) indicating whether the text information corresponding to the training sample is clicked by more than a first preset number of buyers using the store search service after exposure (e.g., a CTR of 1 if more than the first preset number, and 0 if less than the first preset number). It also includes a click-through purchase rate indicating whether the text information corresponding to the training sample is clicked by more than a second preset number of buyers who then purchase the corresponding product (e.g., a click-through purchase rate of 1 if more than the second preset number, and 0 if less than the second preset number). Different training samples correspond to different text information. The first and second preset numbers can be set as needed.

[0142] A single training sample and its supervision label from the training set are input into the exposure performance model. The shared input layer of the exposure performance model extracts shared features from the click-through rate (CTR) prediction tower and the click-to-purchase (CPC) prediction tower. Then, the CTR prediction tower extracts CTR features based on the shared features and maps the CTR features to a preset binary classification system. This determines the positive class (where the exposure will be clicked by the buyer) and the negative class (where the exposure will not be clicked by the buyer), and the probability of being mapped to the positive class is used as the predicted CTR. Similarly, the CPC prediction model extracts CPC features based on the shared features and maps the CPC features to a preset binary classification system. This determines the positive class (where the exposure will be purchased by the buyer) and the negative class (where the exposure will not be purchased by the buyer), and the probability of being mapped to the positive class is used as the predicted CPC. The preset cross-entropy loss function is invoked to calculate the cross-entropy loss values ​​of the predicted click-through rate and predicted click-to-purchase rate based on the supervision labels of the training samples. When the cross-entropy loss value reaches a preset threshold, it indicates that the exposure effectiveness model has been trained to a convergent state, and the training of the exposure effectiveness model can be terminated. When the cross-entropy loss value does not reach the preset threshold, it indicates that the exposure effectiveness model has not converged. Therefore, gradient updates are performed on the model based on the cross-entropy loss value. Typically, the weight parameters of each part of the model are corrected through backpropagation to make the model further approach convergence. Then, other training samples are called to iteratively train the exposure effectiveness model until the model is trained to a convergent state.

[0143] It is easy to understand that the text information in each product information in the request result is used as the input of the exposure performance model trained to convergence, to obtain the click-through rate and click-to-purchase rate corresponding to each product information, and the comprehensive score of the product information is obtained by multiplying the click-through rate by the click-to-purchase rate.

[0144] Step S1430: Sort the product information in the request results according to the comprehensive score, and send the sorted request results to the store search service.

[0145] Based on the comprehensive rating of each product in the request results, from highest to lowest, all product information is sorted, and the server sends the sorted request results to the client using the store search service.

[0146] In this embodiment, the comprehensive score corresponding to each product information in the request results is determined by using an exposure effectiveness model. Based on this, all product information is sorted, and the sorted request results are sent to the store search service. This can attract buyer users who use the product search service to a certain extent, which is conducive to promoting product transactions.

[0147] Please see Figure 7In a further embodiment, step S1200, where the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier, includes the following steps:

[0148] Step S1210: The index scheduler in the search engine reads the preset main index configuration information and determines that the algorithm-specified parameter in the main index configuration information is the store identifier;

[0149] The primary index configuration information includes primary index information and secondary index information. The primary index information includes the primary index name and the scheduling hash algorithm matched by the primary index and its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding secondary index names.

[0150] Assign the algorithm-specified parameter in the main index configuration information to the store identifier.

[0151] Step S1220: Invoke the scheduling hash algorithm in the main index configuration information to determine the target secondary index according to the parameters specified in the algorithm.

[0152] In one embodiment, the scheduling hash algorithm is a hash modulo algorithm, specifically hash(store_id)%num, where store_id is the store identifier and num is the number of sub-indexes under the main index.

[0153] To facilitate understanding of the illustrative example, the hash modulo algorithm is executed. The hash value is calculated based on a certain store_id, which is 2. Then, the modulo is taken with num, which is 10. The final result is 2. Then, the sub-index with index 2 is the target sub-index.

[0154] This embodiment reveals the working principle of the index scheduler, ensuring that the corresponding target is accurately scheduled from the index based on the store identifier.

[0155] Please see Figure 8 In a further embodiment, after step S1400, which involves sending the request result to the store search service to respond to the product information search request, the following steps are included:

[0156] Step S1500: Determine the number of requests received by the search engine in each preset time period;

[0157] In one embodiment, a monitoring dashboard can be created in Kibana, and a request counter can be added to this dashboard to count the total number of requests received by the search engine up to the current time. At each preset time period, the corresponding total number of requests counted by the monitoring dashboard is retrieved. If the current time period is the first time period, the number of requests received in the first time period is the total number of requests in that first time period. If the current time period is not the first time period, the total number of requests in the current time period is subtracted from the total number of requests in the previous time period to obtain the number of requests received in the current time period. The time period can be set as needed, for example, to 30 minutes. Based on this, the number of requests received by the cluster in each time period can be determined.

[0158] Step S1510: When the number of requests corresponding to multiple consecutive time periods is less than a preset threshold, stop sending product information search requests to the search engine;

[0159] When the number of requests for multiple consecutive time periods is less than a preset threshold, it indicates that the current search engine cluster is processing a relatively small number of search requests for an extended period. In this case, stopping the distribution of product information search requests to the search engine will only affect the user experience of a very small number of buyers. Therefore, it is appropriate to stop distributing product information search requests to the search engine at this time. The preset threshold can be set as needed by those skilled in the art based on the information disclosed herein.

[0160] Step S1520: Respond to the sub-index quantity change event, obtain the sub-index quantity required by the business, and build the new primary index in the search engine and its corresponding sub-indexes of the same quantity.

[0161] It is understandable that when the current number of slave indexes is redundant or insufficient, a slave index number change event is responded to. For slave index redundancy, the slave index number after reducing the current number of slave indexes is obtained, which is the number of slave indexes required by the business, and can be reduced as needed; for slave index insufficiency, the slave index number after expanding the current number of slave indexes is obtained, which is the number of slave indexes required by the business, and can be expanded as needed.

[0162] Configure the primary index for the new primary index. This primary index configuration includes the new primary index information and its secondary index information. The new primary index information includes the new primary index name and the scheduling hash algorithm matched with it, along with its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding names. An example is provided below: The number of secondary indexes required by the business is increased from the current 4 to 10.

[0163] text_index_new{"_follow":{"suffix":"text_index_new_hash","num":10,"function":"storeHashFunc","routeKey":"store_id"},"mappings":{"properties":{"id":{"type":"integer"},"store_id":{"type":"integer"}}}}

[0164] Where: `text_index_new` is the name of the new primary index; `"function":"storeHashFunc"` specifies the scheduling hash algorithm as `storeHashFunc`, which can be either a hash modulo algorithm or a consistent hash algorithm, and can be set as needed; `"routeKey":"store_id"` specifies the store identifier as the parameter for the scheduling hash algorithm; `"suffix":"text_index_hash"` specifies the prefix for the secondary index as `text_index_new_hash`; `"num":10` sets the number of secondary indices to 10; `"id":{"type":"integer"}` specifies that the data type of the secondary index corresponding to the index `id` is integer; `"store_id":{"type":"integer"}` specifies that the data type of the store identifier is integer.

[0165] The Kibana Dev tools are used as the configuration interface for the search engine. The new primary index configuration information is executed using the "PUT" method, which builds the corresponding new primary index and its multiple sub-indexes. For ease of understanding and demonstration, executing the above example of new primary index configuration information will generate a new primary index named `text_index_new`, and ten sub-indexes named `text_index_new_hash0`, `text_index_new_hash1`, `text_index_new_hash2`, `text_index_new_hash3`...`text_index_new_hash9`, and `text_index_new_hash10`.

[0166] Step S1530: Redirect the product information of the stores written to the main index to be written to the new main index, and migrate the product information of all stores in the main index to the new main index;

[0167] When responding to a data source synchronization event, the primary index name of the primary index carrying the default configuration in the product information is replaced with the new primary index name of the new primary index. As a result, the index scheduler can then read the new primary index configuration information based on the new primary index name and determine the corresponding secondary index in the new primary index as the index to be written based on the store identifier of the product information.

[0168] The Kibana Dev tools are invoked, and a migration script is executed within it to migrate product information from all stores in the primary index to the new primary index. Those skilled in the art can implement the migration script themselves. An exemplary migration script is as follows:

[0169] POST_reindex{"source":{"index":text_index"},"dest":{"index":"text_index_new"}}

[0170] Step S1540: Delete the primary index after the migration is completed, and create a new primary index with the alias of the primary index name.

[0171] After all store product information in the primary index has been migrated to the new primary index, the primary index is deleted. Kibana Dev tools are then invoked, and an alias creation script is executed within it to create an alias for the new primary index named after the primary index. Those skilled in the art can implement this alias creation script themselves. An exemplary example of an alias creation script is as follows:

[0172] PUT / text_index_new / _alias / text_index

[0173] Those skilled in the art should know that when the store search service is used to trigger the generation of a product information search request, the request still carries the name of the primary index of the primary index. However, in reality, the index scheduler will regard the primary index name as an alias of the new primary index, thereby knowing to read the new primary index configuration of the new primary index and executing the scheduling of the corresponding secondary indexes under the new index.

[0174] In this embodiment, by constructing a new primary index and its subordinate indexes, the product information of stores written to the primary index is redirected to be written to the new primary index. Furthermore, the product information of all stores in the primary index is migrated to the new primary index. After the migration is complete, the primary index is deleted, and the alias of the new primary index is created as the primary index name. Therefore, the upstream store search service can seamlessly update the primary index to the new index according to business needs.

[0175] Please see Figure 9This application provides an index scheduling device to fulfill one of its objectives. This device is a functional embodiment of the index scheduling method of this application. On another level, the index scheduling device to fulfill one of its objectives includes a request acquisition module 1100, a secondary index scheduling module 1200, a result return module 1300, and a result sending module 1400. The request acquisition module 1100 is used to acquire any product information search request pushed by a store search service. The product information search request carries a store identifier and a main index. The secondary index scheduling module 1200 is used to send the product information search request to a search engine, where the index scheduler in the search engine schedules the target secondary index under the main index according to the store identifier. The result return module 1300 is used for the search engine to search the target secondary index according to the product information search request and return the request result. The result sending module 1400 is used to send the request result to the store search service in response to the product information search request.

[0176] In a further embodiment, before the request acquisition module 1100, the module includes: a first index construction submodule, used to construct a main index and multiple sub-indexes under it in the search engine; an event response submodule, used to respond to a data source synchronization event, acquire the product information of the store specified by the event and send it to the search engine; and an index writing submodule, used by the index scheduler in the search engine to determine the sub-index under the main index as the sub-index to be written based on the store identifier of the store to which the product information belongs, and to write the product information into the sub-index to be written.

[0177] In a further embodiment, the result return module 1300 includes: a request forwarding submodule, used by the coordinating node in the search engine to forward the product information search request to the data nodes where all shards of the target index are located; an identifier return submodule, used by all shards to search in parallel for the partial product identifiers and their scores required for the product information search request, and each data node where a shard is located returns the corresponding partial product identifiers and their scores to the coordinating node; a set generation submodule, used by the coordinating node to perform data operations on all partial product identifiers to generate a set of product identifiers; and a result composition submodule, used by the coordinating node to access the corresponding data nodes and read the corresponding product information to compose the request result based on the product identifiers in the set of product identifiers.

[0178] In a further embodiment, the index construction submodule includes: an information acquisition submodule, used to acquire main index configuration information, the main index configuration information including main index information and secondary index information, the main index information including the main index name and the scheduling hash algorithm matched by the main index and its specified parameters, the secondary index information including the number of secondary indexes and their corresponding names; and an interface call submodule, used to call the search engine's configuration interface, passing the main index configuration information to the configuration interface to drive it to construct the main index according to the main index information and the corresponding secondary indexes according to the secondary index information.

[0179] In a further embodiment, the result sending module 1400 includes: an information determination submodule, used to determine the text information required for display in the search scenario by the store search service in each product information contained in the request result; a rating determination submodule, used to determine the comprehensive rating corresponding to each product information based on the text information in each product information using an exposure effectiveness model; and a result sending submodule, used to sort the product information in the request result according to the comprehensive rating and send the sorted request result to the store search service.

[0180] In a further embodiment, the sub-index scheduling module 1200 includes: a configuration reading sub-module, used to read preset main index configuration information by the index scheduler in the search engine and determine the store identifier as the algorithm specified parameter in the main index configuration information; and a sub-index determining sub-module, used to call the scheduling hash algorithm in the main index configuration information to determine the target sub-index according to the algorithm specified parameter.

[0181] In a further embodiment, after the result sending module 1400, the module includes: a total quantity determination submodule, used to determine the number of requests received by the search engine in each preset time period; a stop sending submodule, used to stop sending product information search requests to the search engine when the number of requests corresponding to multiple consecutive time periods is less than a preset threshold; a second index construction submodule, used to respond to a subindex quantity change event, obtain the number of subindexes required for the business, and construct a new main index in the search engine and its corresponding subindexes of the same number of subindexes; an information migration submodule, used to redirect the product information of the stores written in the main index to be written in the new main index, and migrate the product information of all stores in the main index to the new main index; and an alias setting submodule, used to delete the main index after the migration is completed, and create a new alias for the main index as the main index name of the main index.

[0182] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 10The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store control information sequences. When the computer-readable instructions are executed by the processor, they enable the processor to implement an index scheduling method. The processor of the computer device provides computing and control capabilities, supporting the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When these computer-readable instructions are executed by the processor, they enable the processor to execute the index scheduling method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0183] In this embodiment, the processor is used to execute... Figure 9 The system defines the specific functions of each module and its submodules. The memory stores the program code and various data required to execute these modules or submodules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / submodules in the index scheduling device of this application. The server can call the server's program code and data to execute the functions of all submodules.

[0184] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the index scheduling method of any embodiment of this application.

[0185] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0186] In summary, this application, on the one hand, provides a unified master index for any store search service, accurately scheduling target sub-indexes under the master index to serve product information search requests based on store identifiers. This efficiently yields the request results without requiring upstream services to understand the call relationships between multiple sub-indexes in the underlying search engine and product information search requests, thus instructing the target sub-index among multiple sub-indexes to be called for the request. On the other hand, it allows upstream services to seamlessly scale up or down the number of sub-indexes in the master index according to business needs.

[0187] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those in the open-source operations, methods, and processes of this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

[0188] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. An index scheduling method, characterized in that, Includes the following steps: Obtain product information search requests pushed by any store search service, wherein the product information search requests carry store identifiers and main indexes; The product information search request is sent to the search engine, and the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier. This includes: the index scheduler in the search engine reads the preset main index configuration information, determines the store identifier as the algorithm specified parameter in the main index configuration information; and calls the scheduling hash algorithm in the main index configuration information to determine the target sub-index according to the algorithm specified parameter. The search engine searches the target index based on the product information search request and returns the request results. This process includes: a coordinating node in the search engine forwards the product information search request to the data nodes where each shard of the target index resides; all shards search in parallel to retrieve the required product identifiers and their scores for the product information search request, and each data node where a shard resides returns the corresponding product identifiers and their scores to the coordinating node; the coordinating node performs data operations on all the product identifiers to generate a product identifier set; and the coordinating node accesses the corresponding data nodes based on the product identifiers in the product identifier set to read the corresponding product information and form the request results. The request result is sent to the store search service to respond to the product information search request.

2. The index scheduling method according to claim 1, characterized in that, Before obtaining product information search requests pushed by any store search service, the following steps are included: In a search engine, build a primary index and multiple sub-indexes under it; In response to the data source synchronization event, retrieve the product information of the store specified by the event and send it to the search engine; The index scheduler in the search engine determines the secondary index under the main index as the secondary index to be written based on the store identifier of the store to which the product information belongs, and writes the product information into the secondary index to be written.

3. The index scheduling method according to claim 2, characterized in that, Building a primary index and its multiple sub-indexes in a search engine includes the following steps: Obtain the primary index configuration information, which includes primary index information and secondary index information. The primary index information includes the primary index name and the scheduling hash algorithm matched by the primary index and its specified parameters. The secondary index information includes the number of secondary indexes and their corresponding names. The configuration interface of the search engine is invoked, and the main index configuration information is passed to the configuration interface to drive it to build the main index according to the main index information and build the corresponding secondary index according to the secondary index information.

4. The index scheduling method according to claim 1, characterized in that, Sending the request result to the store search service includes the following steps: In each product information contained in the request result, the store search service determines the text information required for display in the search scenario; An exposure effectiveness model is used to determine the comprehensive score corresponding to each product information based on the text information in each product information. The exposure effectiveness model is pre-trained to a convergent state and learns the ability to predict the click-through rate and click-to-buy rate of the text information in the product information after it is exposed in the search. The product information in the request results is sorted according to the comprehensive score, and the sorted request results are sent to the store search service.

5. The index scheduling method according to claim 1, characterized in that, After sending the request result to the store search service to respond to the product information search request, the process includes the following steps: The number of requests received by the search engine in each preset time period is determined; When the number of requests corresponding to multiple consecutive time periods is less than a preset threshold, the sending of product information search requests to the search engine is stopped. In response to a change in the number of sub-indexes, obtain the number of sub-indexes required by the business, and build a new primary index in the search engine and its corresponding sub-indexes for that number of sub-indexes; Redirect the product information of the stores written to the main index to be written to the new main index, and migrate the product information of all stores in the main index to the new main index; After the migration is complete, delete the primary index and create a new primary index with the alias of the primary index.

6. An index scheduling device, characterized in that, include: The request acquisition module is used to acquire product information search requests pushed by any store search service, wherein the product information search requests carry store identifiers and main indexes; The index scheduling module is used to send the product information search request to the search engine, where the index scheduler in the search engine schedules the target sub-index under the main index according to the store identifier. This includes: the index scheduler in the search engine reading preset main index configuration information, determining the store identifier as the algorithm-specified parameter in the main index configuration information, and calling the scheduling hash algorithm in the main index configuration information to determine the target sub-index according to the algorithm-specified parameter. The result return module is used by the search engine to search the target index according to the product information search request and return the request result. This includes: a coordinating node in the search engine forwarding the product information search request to the data nodes where each shard of the target index resides; all shards searching in parallel to find the required partial product identifiers and their scores for the product information search request, with each data node returning the corresponding partial product identifiers and their scores to the coordinating node; the coordinating node performing data operations on all the partial product identifiers to produce a product identifier set; and the coordinating node accessing the corresponding data nodes based on the product identifiers in the product identifier set to read the corresponding product information and form the request result. The result sending module is used to send the request result to the store search service in response to the product information search request.

7. The index scheduling device according to claim 6, characterized in that, Before the request acquisition module, the system includes: a first index construction submodule, used to construct a main index and multiple sub-indexes under it in the search engine; an event response submodule, used to respond to a data source synchronization event, acquire the product information of the store specified by the event and send it to the search engine; and an index writing submodule, used by the index scheduler in the search engine to determine the sub-index under the main index as the sub-index to be written based on the store identifier of the store to which the product information belongs, and to write the product information into the sub-index to be written.

8. The index scheduling device according to claim 6, characterized in that, The result return module includes: a request forwarding submodule, used by the coordinating node in the search engine to forward the product information search request to the data nodes where each shard of the target index is located; an identifier return submodule, used by all shards to search in parallel for the partial product identifiers and their scores required for the product information search request, and each data node where a shard is located returns the corresponding partial product identifiers and their scores to the coordinating node; a set generation submodule, used by the coordinating node to perform data operations on all partial product identifiers to generate a set of product identifiers; and a result composition submodule, used by the coordinating node to access the corresponding data nodes and read the corresponding product information to compose the request result based on the product identifiers in the set of product identifiers.

9. A computer device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 5, which, when invoked by a computer, executes the steps included in the corresponding method.