Commodity search method and device, computer equipment and storage medium

By determining the field and data range to be searched, and using the preset system to obtain target product information, it ensures the data consistency of the same product identification under different systems, solves the problem of search results not matching the request, and improves the quality and performance of product search.

CN118747237AActive Publication Date: 2024-10-08BEIJING YOUZHUJU NETWORK TECH CO LTD

Patent Information

Application Number
CN202410822614.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-24
Publication Date
2024-10-08
Estimated Expiration
2044-06-24

AI Technical Summary

Technical Problem

Under different systems, the search field data for the same product may be different, causing the search results to be inconsistent with the product search request.

Method used

By determining the field to be searched and the corresponding field data range, and using the preset product search system and product attribute system to obtain the target product identification and name, ensure that the data comes from the same field database and ensure the consistency of the search results.

Benefits of technology

It improves the quality and performance of product search results, ensures that search results are consistent with product search requests, and solves the problem of inconsistent search results caused by data differences under different systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118747237A_ABST
    Figure CN118747237A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses a commodity searching method and device, computer equipment and a storage medium. The invention provides a commodity searching method which comprises the following steps: determining a to-be-searched field and a corresponding field data range according to a received commodity searching request; according to first field data of a plurality of commodity identifiers in a to-be-searched field in a preset commodity search system, determining a target commodity identifier of which the first field data is in a field data range; a target commodity name corresponding to the target commodity identifier and second field data under the to-be-searched field are obtained through a preset commodity attribute system, and the second field data and the first field data are the same and both come from the same preset field database; and sending the target commodity identifier, the target commodity name and the second field data as a search result to respond to the commodity search request. Therefore, the obtained search result is consistent with the commodity search request, so that the quality of the search result can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a commodity search method, device, computer equipment and storage medium. Background Art

[0002] In the related art, when performing a product search for a received product search request, it is necessary to combine multiple systems for determination. However, since the field data corresponding to the same search field for the same product in different systems may be different, the search results may not match the product search request. Summary of the invention

[0003] In view of this, the present disclosure provides a product search method, apparatus, computer device and storage medium to solve the problem that search results do not match product search requests.

[0004] In a first aspect, the present disclosure provides a commodity search method, the method comprising:

[0005] Determine the fields to be searched and the corresponding field data range according to the received product search request;

[0006] Determine, according to the first field data of a plurality of commodity identifiers under the to-be-searched field in the preset commodity search system, a target commodity identifier whose first field data is within the field data range;

[0007] The target product name corresponding to the target product identifier and the second field data under the to-be-searched field are obtained through the preset product attribute system, wherein the second field data is the same as the first field data and both are derived from the same preset field database, and the field database includes the field data of multiple product identifiers under multiple search fields;

[0008] The target product identifier, the target product name, and the second field data are sent as search results in response to the product search request.

[0009] In a second aspect, the present disclosure provides a commodity search device, the device comprising:

[0010] An identification module, used to determine the fields to be searched and the corresponding field data range according to the received product search request;

[0011] A first search module, used to determine a target commodity identifier whose first field data is within a field data range according to first field data of multiple commodity identifiers under a to-be-searched field in a preset commodity search system;

[0012] A second search module is used to obtain the target product name corresponding to the target product identifier and second field data under the field to be searched through a preset product attribute system, wherein the second field data is the same as the first field data and is derived from the same preset field database, and the field database includes field data of multiple product identifiers under multiple search fields;

[0013] The sending module is used to send the target product identifier, the target product name and the second field data as the search result to respond to the product search request.

[0014] In a third aspect, the present disclosure provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, computer instructions are stored in the memory, and the processor executes the product search method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0015] In a fourth aspect, the present disclosure provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the commodity search method of the first aspect or any corresponding embodiment thereof.

[0016] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the commodity search method of the first aspect or any corresponding embodiment thereof.

[0017] The commodity search method provided by the present disclosure can ensure that the field data corresponding to the same commodity identification in different systems are the same for the same search field. Further, when a commodity search is performed based on the obtained field to be searched and the corresponding field data range, the obtained search results can be made consistent with the commodity search request, thereby helping to improve the quality of the search results and facilitating the improvement of commodity search performance. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the specific embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1 is a flowchart of a commodity search method according to an embodiment of the present disclosure;

[0020] Figure 2 is a flowchart of a field data synchronization method based on a field database according to an embodiment of the present disclosure;

[0021] Figure 3 is a schematic diagram of the architecture of a field updating device according to an embodiment of the present disclosure;

[0022] Figure 4 is a schematic diagram of a registration interface according to an embodiment of the present disclosure;

[0023] Figure 5 is another schematic diagram of a registration interface according to an embodiment of the present disclosure;

[0024] Figure 6 is another schematic diagram of a registration interface according to an embodiment of the present disclosure;

[0025] Figure 7 is a flowchart of a commodity search method according to an embodiment of the present disclosure;

[0026] Figure 8 is a structural block diagram of a commodity search device according to an embodiment of the present disclosure;

[0027] Fig. 9 It is a schematic diagram of the hardware structure of the computer device of the embodiment of the present disclosure. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, rather than all the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present disclosure.

[0029] In the related art, when searching for goods based on a received product search request, it is necessary to combine multiple systems for determination. Due to the business isolation between different systems, the field data corresponding to the same search field for the same product in different systems may be different, which will cause the search results to be inconsistent with the product search request. For example: If the product search request is to obtain Class A goods with a price between 0 and 50 yuan, but one of the systems changes the price of product b under Class A from 55 yuan to 49 yuan due to business updates, and the price of product b in other systems is greater than 50 yuan, then product b will not be included in the search results, which is inconsistent with the product search request.

[0030] In view of this, the embodiment of the present disclosure provides a commodity search method. After receiving a commodity search request, the to-be-searched field and the corresponding field data range that need to be searched are determined to perform a targeted search. According to the first field data of multiple commodity identifiers under the to-be-searched field in the preset commodity search system, the target commodity identifier whose first field data is within the field data range is determined, and then the target commodity name corresponding to the target commodity identifier and the second field data under the to-be-searched field are obtained through the preset commodity attribute system. Among them, the second field data is the same as the first field data, and both are derived from the same preset field database. The field database includes the field data of multiple commodity identifiers under multiple search fields, and thus can ensure that the same commodity identifier has the same field data corresponding to the same search field under different systems. Sending the target commodity identifier, the target commodity name and the second field data as the search result in response to the commodity search request can ensure that the sent search result is consistent with the commodity search request, thereby helping to improve the commodity search performance.

[0031] According to an embodiment of the present disclosure, an embodiment of a product search method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0032] In this embodiment, a commodity search method is provided, which can be used in the above-mentioned computer equipment, such as a computer, a server, etc. Figure 1 is a flowchart of a commodity search method according to an embodiment of the present disclosure. Figure 1 As shown, the process includes the following steps:

[0033] Step S101: Determine the fields to be searched and the corresponding field data range according to the received product search request.

[0034] Among them, a product search request refers to a request initiated by a user on an e-commerce platform or a search engine to search for a specific product. For example, a product search request may be generated based on relevant keywords or screening conditions entered by the user in a search box.

[0035] After receiving a product search request, in order to clarify the product search direction, the product search request is parsed to obtain the search keywords and filter conditions entered by the user, and then the fields to be searched and the corresponding field data range are determined from the obtained search keywords and filter conditions, so that when a targeted search is performed later, the search results obtained can meet the user's needs. Among them, the fields to be searched and the corresponding field data range depend on the actual product search request obtained and are not limited here.

[0036] In some examples, the fields to be searched may include, but are not limited to, any one or more of the following fields: product name, product category, product price, product attributes, etc. If the field to be searched is a product name, the corresponding field data range may be all product names containing the product name. If the field to be searched is a product price, the corresponding field data range may be a specific price range. For example: between 50 and 100 yuan. If the field to be searched is a product attribute, the corresponding field data range may be a specific color, material, size, etc.

[0037] Step S102, determining a target commodity identification whose first field data is within a field data range according to first field data of a plurality of commodity identifications under a to-be-searched field in a preset commodity search system.

[0038] In order to determine the products that meet the field data range under the field to be searched, screening is performed through a preset product search system. In the preset product search system, multiple search fields and the first field data corresponding to multiple products under each search field are stored. In order to facilitate data maintenance and management, the corresponding products are represented by product identifiers in the product search system. For example, the product identifier can be the stock keeping unit (SKU), unique code (ID) or product code of the product, which is not limited here.

[0039] Through the field to be searched, the search range of the target product identification can be clearly determined in the product search system, and then combined with the field data range, the product identification whose first field data is within the field data range can be quickly screened under the field to be searched, and then the target product identification can be obtained. For example: if the field to be searched is the price of a certain fruit, and the field range data is between 20-90 yuan, then the product identification of a certain fruit price between 20-90 yuan is searched through the product search system, and then the product identification of a certain fruit price between 20-90 yuan is used as the target trademark identification.

[0040] Step S103: obtaining the target product name corresponding to the target product identifier and the second field data under the field to be searched through the preset product attribute system.

[0041] The preset commodity attribute system stores commodity attribute information corresponding to multiple commodity identifiers. The commodity attribute information includes, but is not limited to, the commodity name corresponding to the commodity identifier, the second field data under different search fields, and other attribute information. The second field data is the same as the first field data, and both are derived from the same preset field database, which includes the field data of multiple commodity identifiers under multiple search fields.

[0042] Since for the same search field, the second field data corresponding to the target product identifier in the product attribute system is the same as the first field data corresponding to the product search system, in order to facilitate users to understand the attribute information of the target product corresponding to each target product identifier, it is obtained from the preset product attribute system to obtain the target product name corresponding to the target product identifier and the second field data under the field to be searched.

[0043] Step S104: sending the target product identifier, the target product name and the second field data as search results in response to the product search request.

[0044] Among them, sending the target product identifier, target product name and second field data as search results to the e-commerce platform or search engine will help the e-commerce platform or search engine to display them in a targeted manner on the display interface, so that users can quickly understand the target products that meet the product search request and the corresponding product attributes, thereby improving product search performance.

[0045] The product search method provided in this embodiment can ensure that the field data corresponding to the same product identifier in different systems is the same for the same search field. Further, when searching for products based on the obtained fields to be searched and the corresponding field data range, the obtained search results can be made consistent with the product search request, thereby helping to improve the quality of the search results and facilitating the improvement of product search performance.

[0046] In this embodiment, a field data synchronization method based on a field database is provided, which can be used in the above-mentioned computer devices, such as computers, servers, etc. Figure 2 is a flow chart of a field data synchronization method based on a field database according to an embodiment of the present disclosure, such as Figure 2 As shown, the process includes the following steps:

[0047] Step S201, obtaining the field data to be updated under multiple search fields of the current product identification.

[0048] Among them, in order to ensure that the field data synchronized to the product search system and the product attribute system are the latest valid field data, for the same product identifier, the field data to be updated under multiple search fields is obtained, so that the consistency of the data can be guaranteed during subsequent updates, which helps to improve the search accuracy of the target product identifier.

[0049] In some optional implementations, the above step S201 includes:

[0050] Step a1, responding to the received data update task, determining the target data source corresponding to the data update task.

[0051] Among them, in order to ensure the data security of the field database, after receiving the data update task, the target data source corresponding to the data update task is determined so that the field data to be updated can be acquired in a targeted manner, thereby ensuring the effectiveness of acquiring the field data to be updated, and avoiding data anomalies in the field database caused by confusion or erroneous updates of irrelevant field data, thereby helping to improve the data security and accuracy of the field database.

[0052] Step a2: acquiring the to-be-updated field data of the current product identifier under the multiple search fields from the target data source.

[0053] Among them, through the target data source, the current product identifier and the corresponding search field whose field data has changed can be clearly identified, thereby improving the acquisition effectiveness when acquiring the field data to be updated.

[0054] The acquired field data to be updated includes the field data whose data has changed and the current field data whose data has not changed. Therefore, when the field data of the current product identification is updated, the consistency between the data can be guaranteed to avoid inconsistency with the data in the target data source.

[0055] In some optional implementations, if the target data source is a batch task data source, the above step a2 includes:

[0056] Step a21, obtaining a first data update file from a batch task data source;

[0057] Step a22, performing stream data conversion on each sub-data update file in a parallel processing manner to obtain field data to be updated corresponding to at least one product identifier under the corresponding search field;

[0058] Step a23, determining the field data to be updated under multiple search fields for the current product identifier according to the field data to be updated corresponding to at least one product identifier under each search field.

[0059] Specifically, if the target data source is a batch task data source, it indicates that the field data under multiple search fields need to be updated in batches. Therefore, a first data update file is obtained from the batch task data source. The first data update file includes sub-data update files corresponding to multiple search fields. That is, different sub-data update files correspond to different search fields.

[0060] In order to improve the efficiency of data acquisition, each sub-data update file is converted into stream data through parallel processing to unify the format of multiple field data to be updated under the same search field, filter out redundant data in the sub-data update file, reduce the difficulty of data update, and then obtain the field data to be updated corresponding to at least one product identification under the corresponding search field.

[0061] Since each sub-data update file only contains the data to be updated under the corresponding search field of at least one product identifier, in order to ensure data consistency, data integration is performed based on the field data to be updated under different search fields for each product identifier, and then the field data to be updated under multiple search fields for the current product identifier is obtained.

[0062] In some other optional implementations, if the target data source is a stream task data source, the above step a2 includes:

[0063] Step a24, continuously obtaining multiple second data update files from the stream task data source;

[0064] Step a25, performing stream data conversion on the second data update file to obtain field data to be updated corresponding to at least one product identifier under the corresponding search field.

[0065] Specifically, if the target data source is a stream task data source, it indicates that the data update task currently being executed is a real-time update task, and the second data update file can be directly obtained from the stream task data source. However, since the data to be updated under the current search field of the current product identifier in the second data update file, in order to ensure that the field data in the field database is consistent with the field data in the stream task data source, multiple second data update files are continuously obtained so that when the field data of the same product identifier is subsequently updated, the field data under multiple search fields can be combined for update. Among them, different second data update files correspond to different search fields.

[0066] The second data update file is subjected to stream data conversion to filter out redundant data in the second data update file, reduce the difficulty of data update, and thereby obtain the field data to be updated corresponding to at least one commodity identification under the corresponding search field.

[0067] Step S202, lock the commodity attribute system and the commodity search system through a preset distributed lock, and during the locking process, write the field data to be updated into the commodity search system and the commodity attribute system respectively to update the field data of the current commodity identifier under multiple search fields.

[0068] In order to ensure the consistency of data update, the commodity attribute system and the commodity search system are locked by a preset distributed lock before the field data to be updated is written into the commodity search system and the commodity attribute system, respectively, to avoid data inconsistency caused by concurrent updates during the data update process. Distributed locks can be implemented based on shared distributed lock services (such as ZooKeeper, Redis, etc.), thereby ensuring that only one thread can access and modify data during the entire update process.

[0069] Step S203, in response to completion of writing the field data to be updated, releasing the distributed lock.

[0070] Among them, the response to the completion of writing the field data to be updated indicates that the synchronous update has been completed, and then the distributed lock is released so that other threads can obtain the distributed lock to perform other data operations, thereby avoiding data conflicts and confusion caused by concurrent updates between different threads, thereby ensuring the performance and reliability of the field database.

[0071] The field data synchronization method based on the field database provided in this embodiment can support the field database to obtain the field data to be updated from multiple target data sources, and synchronously write the obtained field data to be updated into the product search system and the product attribute system, which can ensure that the field data of each product identifier in the product attribute system and the product search system under different search fields are the same, so as to ensure that when the product search is performed subsequently, the search results obtained can be guaranteed to be consistent with the received product search request, which is conducive to improving the product search performance.

[0072] In some optional implementations, the system for locking product attributes and the system for searching products include:

[0073] Step b1, determining the intermediate transfer storage area corresponding to the field data to be updated of the current search field according to the preset update priority of the current search field;

[0074] Step b2, according to the update cycle of the intermediate transfer area, lock the commodity attribute system and the commodity search system, so that during the locking process, the field data to be updated of the current search field is written into the commodity search system and the commodity attribute system respectively through the intermediate transfer area.

[0075] Specifically, to ensure that the field data in the commodity attribute system and the commodity search system can be updated in a timely manner, the corresponding preset update priority is pre-configured for different search fields. Different preset update priorities correspond to different update cycle frequencies. For example: real-time update, update every 3 days or update every month.

[0076] After determining to update the field data under the current search field, the intermediate transfer area corresponding to the field data to be updated of the current search field is determined according to the preset update priority of the current search field, so as to cache the field data to be updated of at least one product identification under the current search field through the intermediate transfer area.

[0077] Since the update cycle frequencies of different intermediate transfer storage areas are different, in the process of synchronizing the field data to be updated, the product attribute system and the product search system are locked alternately according to the update cycle of each intermediate transfer storage area to ensure that the field data to be updated in each intermediate transfer storage area can be effectively written into the product attribute system and the product search system, thereby ensuring consistency with the data in the target data source.

[0078] In some optional examples, the preset update priority includes a first priority or a second priority, the intermediate transfer area includes a first transfer area or a second transfer area, the first priority corresponds to the first transfer area, the second priority corresponds to the second transfer area, and the first update cycle frequency of the first transfer area is lower than the second update cycle frequency of the second transfer area.

[0079] As one or more specific application embodiments of the embodiments of the present disclosure, in order to ensure that the second field data of each product identifier under multiple search fields in the product attribute system is consistent with the first field data of each product identifier under multiple search fields in the product search system, the following can be used: Figure 3 The field update device shown synchronizes field data. The field update device includes: multiple batch flow modules, a first flow database, a transfer module, a field database, a first transfer area, a second transfer area and a distributed lock. Different batch flow modules are used to perform flow data conversion on the field data to be updated corresponding to different search fields. The first flow database is used to manage the data that has completed the flow data conversion, and store and query it through the transfer module. The field database is used to store the field data to be updated under multiple search fields for multiple commodity identifiers. The first transfer area is used to store the field data to be updated corresponding to the search field with a preset update priority of the first priority. The second transfer area is used to store the field data to be updated corresponding to the search field with a preset update priority of the second priority. The distributed lock is used to lock the commodity attribute system and the commodity search system for data when updating the commodity attribute system and the commodity search system, so as to avoid interference from other threads. The commodity search system includes a search engine system and a vector engine system. The search engine system is used to perform direct search according to the keywords corresponding to the field to be searched. The vector engine system is used to perform associated search according to the keywords corresponding to the field to be searched.

[0080] By synchronizing field data through the field updating device, it is possible to ensure that the field data of each product identifier under different search fields in the product attribute system, search engine system, and vector engine system can be uniformly updated and always remain consistent, thereby building a data path between unified multi-source data and multi-product systems, thereby effectively solving the problem of search results not matching product search requests.

[0081] In some optional implementation scenarios, in order to enable the field updating device to autonomously perform synchronous updating of field data, a mapping relationship between the field updating device and each target data source and each commodity system is established in advance through the background, including:

[0082] First, register the target data source information in the background interface. Figure 4 As shown, the mapping relationship between the field update device and each target data source can be established by registering a table. If the target data source is kafka (an open source distributed stream processing platform), fill in the topic name when filling in the table name, and then the data parser can be configured according to the actual data format in the corresponding data source. For example: if the data format inside is json format, configure JsonParser. When configuring the data source field type: if it is json data, give a data sample for the commodity system to automatically derive each field name and field type, and manually correct the derivation type; if it is pb data format, upload the pb file. The same field can exist in multiple data sources, but the field registered in the data format can only exist in one virtual table. When the table status is in effect, the commodity system can read the real data, otherwise it will stop reading.

[0083] Secondly, register the system information of the product attribute system, search engine system, and vector engine system respectively. Different product systems are configured with different system attributes. Figure 5 As shown, when configuring each commodity system, it is necessary to configure all field names and field types corresponding to each commodity system to ensure that the field data of each commodity identifier under different search fields can be updated uniformly and remain consistent. When the commodity system is in effect, the device will write data to the commodity system, otherwise it will stop writing.

[0084] Finally, configure the field mapping relationship. Figure 6 As shown, create a new mapping relationship on the field mapping page, select a field in the data source table, configure the preset update priority for it, and configure it to the three commodity systems mentioned above at the same time to ensure that the three commodity systems are in a binding relationship. When the mapping relationship is in effect, it will be written to the three commodity systems at the same time. When it is stopped, the writing will stop at the same time to ensure the consistency of online data.

[0085] In some other optional implementation scenarios, during the data update process, when the target data source system is hive, the field update device will start a batch flow module when a new partition is generated in the corresponding hive table. This module is implemented by the spark framework and will first read the entire hive table content and then write it to the kafka stream database through the kafka client interface.

[0086] Field update For each Kafka stream database, there will be a Kafka to tbase transfer module, which will run all the time and write the field data in Kafka to the tbase large wide table database in real time. The transfer module is implemented by Flink, which obtains the entire binary information by subscribing to Kafka messages. By using the data source field parser and field enumeration information in the controller, the real data of each field is parsed out. If there are unknown fields, they are discarded, and then written to tbase in real time using the tbase client. When writing to tbase, each column name is in the format of "data source name_data source field name". This format can solve the problem of which source table the field comes from. When the field name changes, it can be quickly supported without the need to clean up old data.

[0087] Through the priority configuration in the field mapping, the controller will configure the corresponding message change receiver for each search field of the tbase large wide table database. When multiple search fields are updated at the same time, they will be merged into a multi-column message body and sent to the corresponding Kafka, thereby reducing the number of message bodies.

[0088] For each message change receiver kakfa, the field update device will be equipped with a transfer module for the value search field, which will run all the time. The transfer module is implemented by flink, and obtains one or to-be-updated field data by subscribing to kafka messages. The controller will send down the field mapping relationship, and the transfer module will send the search field value to multiple commodity systems at the same time according to the mapping relationship. In order to ensure that multiple systems are updated at the same time, this module will use zookeeper as a distributed lock to ensure that the same commodity in the three commodity systems is updated synchronously through only one transfer module, and the distributed lock will be released only when the data of the three commodity systems are updated. This allows other modules to obtain the lock of the commodity and continue to update other value search fields.

[0089] In some optional implementation scenarios, such as Figure 7 As shown, the process of searching for products can be as follows:

[0090] The commodity search request input by the user is obtained through the front-end commodity platform, and then the commodity platform sends the commodity search request to the back-end server to determine the field to be searched and the corresponding field data range through the server. Take the field to be searched and the corresponding field data range as an example of a certain brand of goods with a price greater than 50. The goods of a certain brand with a price greater than 50 are sent to the search engine system and the vector engine system respectively through the commodity search system to determine the target commodity identifier. After the commodity search system obtains the target commodity identifier, it sends it to the server. The server then sends the obtained target commodity identifier to the commodity attribute system to obtain the commodity attribute information corresponding to the target commodity identifier, and then obtains the target commodity name corresponding to the target commodity identifier and the second field data (corresponding commodity price) under the field to be searched. Finally, the target commodity identifier, target commodity name and corresponding commodity price are sent to the commodity platform as search results to respond to the commodity search request.

[0091] In this embodiment, a commodity search device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0092] This embodiment provides a commodity search device, such as Figure 8 As shown, including:

[0093] Identification module 801, used to determine the fields to be searched and the corresponding field data range according to the received product search request;

[0094] The first search module 802 is used to determine the target commodity identification whose first field data is within the field data range according to the first field data of multiple commodity identifications under the to-be-searched field in the preset commodity search system;

[0095] The second search module 803 is used to obtain the target product name corresponding to the target product identifier and the second field data under the field to be searched through the preset product attribute system, the second field data is the same as the first field data, and both are derived from the same preset field database, and the field database includes the field data of multiple product identifiers under multiple search fields;

[0096] The sending module 804 is used to send the target product identifier, the target product name and the second field data as the search result in response to the product search request.

[0097] In some optional implementations, the device for synchronizing field data in the field database includes:

[0098] An acquisition module is used to acquire the field data to be updated under multiple search fields of the current product identifier;

[0099] The synchronization module is used to lock the commodity attribute system and the commodity search system through a preset distributed lock, and during the locking process, write the field data to be updated into the commodity search system and the commodity attribute system respectively, so as to update the field data of the current commodity identifier under multiple search fields;

[0100] The control module is used to respond to the completion of writing the field data to be updated and release the distributed lock.

[0101] In some optional implementations, the synchronization module includes:

[0102] A first processing unit, configured to determine an intermediate transfer storage area corresponding to the field data to be updated of the current search field according to a preset update priority of the current search field;

[0103] The locking unit is used to lock the commodity attribute system and the commodity search system according to the update cycle of the intermediate transfer area, so that during the locking process, the field data to be updated of the current search field is written into the commodity search system and the commodity attribute system respectively through the intermediate transfer area.

[0104] In some optional embodiments, the preset update priority includes a first priority or a second priority, the intermediate transfer area includes a first transfer area or a second transfer area, the first priority corresponds to the first transfer area, the second priority corresponds to the second transfer area, and the first update cycle frequency of the first transfer area is lower than the second update cycle frequency of the second transfer area.

[0105] In some optional implementations, the acquisition module includes:

[0106] A second processing unit, configured to respond to the received data update task and determine a target data source corresponding to the data update task;

[0107] The third processing unit is used to obtain the to-be-updated field data of the current product identification under the multiple search fields from the target data source.

[0108] In some optional implementations, if the target data source is a batch task data source, the third processing unit includes:

[0109] A first execution unit is used to obtain a first data update file from a batch task data source, where the first data update file includes sub-data update files corresponding to a plurality of search fields;

[0110] The second execution unit is used to perform stream data conversion on each sub-data update file in a parallel processing manner to obtain field data to be updated corresponding to at least one product identifier under the corresponding search field;

[0111] The third execution unit is used to determine the to-be-updated field data of the current product identifier under the multiple search fields according to the to-be-updated field data corresponding to at least one product identifier under each search field.

[0112] In some optional implementations, if the target data source is a stream task data source, the third processing unit includes:

[0113] A fourth execution unit, configured to continuously obtain a plurality of second data update files from the stream task data source, wherein different second data update files correspond to different search fields;

[0114] The fifth execution unit is used to perform stream data conversion on the second data update file to obtain the field data to be updated corresponding to at least one product identification under the corresponding search field.

[0115] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0116] The product search device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0117] The present disclosure also provides a computer device having the above Figure 8 The product search device shown.

[0118] See also Fig. 9 , Fig. 9 is a schematic diagram of a computer device provided by an optional embodiment of the present disclosure, such as Fig. 9As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.

[0119] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0120] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0121] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0122] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0123] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.

[0124] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.

[0125] The embodiments of the present disclosure also provide a computer-readable storage medium. The above-mentioned method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0126] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0127] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to the computer device, application, server, storage medium or other software or hardware that performs the operation of the technical solution of the present disclosure according to the prompt message.

[0128] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the computer device.

[0129] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0130] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.

[0131] Although the embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A commodity search method, characterized in that: The method comprises: Determine the fields to be searched and the corresponding field data range according to the received product search request; Determine, according to the first field data of the plurality of commodity identifiers under the to-be-searched field in the preset commodity search system, a target commodity identifier whose first field data is within the field data range; Acquire the target product name corresponding to the target product identifier and second field data under the field to be searched through a preset product attribute system, wherein the second field data is the same as the first field data and both are derived from the same preset field database, and the field database includes field data of the multiple product identifiers under multiple search fields; The target product identifier, the target product name, and the second field data are sent as search results in response to the product search request.

2. The method according to claim 1, characterized in that The method for synchronizing field data in the field database includes: Obtain the field data to be updated under the multiple search fields of the current product identification; The commodity attribute system and the commodity search system are locked by a preset distributed lock, and during the locking process, the field data to be updated are written into the commodity search system and the commodity attribute system respectively, so as to update the field data of the current commodity identifier under the multiple search fields; In response to completion of writing the field data to be updated, the distributed lock is released.

3. The method according to claim 2, characterized in that The system for locking the commodity attributes and the commodity search system include: Determine, according to a preset update priority of a current search field, an intermediate transfer storage area corresponding to the field data to be updated of the current search field; According to the update cycle of the intermediate transfer storage area, the commodity attribute system and the commodity search system are locked, so that during the locking process, the to-be-updated field data of the current search field are written into the commodity search system and the commodity attribute system respectively through the intermediate transfer storage area.

4. The method according to claim 3, characterized in that The preset update priority includes a first priority or a second priority, the intermediate transfer area includes a first transfer area or a second transfer area, the first priority corresponds to the first transfer area, the second priority corresponds to the second transfer area, and the first update cycle frequency of the first transfer area is lower than the second update cycle frequency of the second transfer area.

5. The method according to claim 2, characterized in that: The step of obtaining the field data to be updated under the multiple search fields of the current product identifier includes: In response to the received data update task, determining a target data source corresponding to the data update task; The to-be-updated field data of the current commodity identification under the multiple search fields is obtained from the target data source.

6. The method according to claim 5, characterized in that If the target data source is a batch task data source, obtaining the to-be-updated field data of the current commodity identifier under the multiple search fields from the target data source includes: Acquire a first data update file from the batch task data source, wherein the first data update file includes sub-data update files corresponding to a plurality of search fields; By means of parallel processing, stream data conversion is performed on each sub-data update file to obtain field data to be updated corresponding to at least one product identifier under the corresponding search field; According to the to-be-updated field data corresponding to at least one product identifier under each search field, the to-be-updated field data of the current product identifier under the multiple search fields are determined.

7. The method according to claim 5, characterized in that If the target data source is a stream task data source, extracting the to-be-updated field data of the current commodity identifier under the multiple search fields from the data update file includes: Continuously acquiring multiple second data update files from the stream task data source, where different second data update files correspond to different search fields; The second data update file is subjected to stream data conversion to obtain field data to be updated corresponding to at least one commodity identification under the corresponding search field.

8. A commodity search device, characterized in that: The device comprises: An identification module, used to determine the fields to be searched and the corresponding field data range according to the received product search request; A first search module, configured to determine a target commodity identifier whose first field data is within a range of the field data according to first field data of a plurality of commodity identifiers under the to-be-searched field in a preset commodity search system; A second search module is used to obtain the target product name corresponding to the target product identifier and second field data under the field to be searched through a preset product attribute system, wherein the second field data is the same as the first field data and both are derived from the same preset field database, and the field database includes field data of the multiple product identifiers under multiple search fields; The sending module is used to send the target product identifier, the target product name and the second field data as search results in response to the product search request.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the commodity search method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the commodity search method according to any one of claims 1 to 7.

11. A computer program product, characterized in that The method comprises computer instructions for causing a computer to execute the commodity search method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for commodity information access

    CN102222100A

  • Information output method and server

    CN103246980A

  • Commodity search method and device

    CN107844565A

  • Commodity search method, device and equipment and storage medium

    CN115858903A

  • Data processing method, related equipment and system

    CN116383202A

Cited By

  • Commodity search method and apparatus, computer device, and storage medium

    WO2026000980A1