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

By defining the search fields and data range in the product search system and obtaining consistent product names and data using the product attribute system, the problem of inconsistent search results caused by differences in field data across different systems is solved, resulting in more accurate product search results.

WO2026000980A1PCT designated stage Publication Date: 2026-01-02BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/074322
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-24
Filing Date
2025-01-23
Publication Date
2026-01-02

AI Technical Summary

Technical Problem

In existing technologies, due to business isolation between different systems, the field data corresponding to the same product and the same search field may differ in different systems, resulting in search results that do not match the product search request.

Method used

By determining the fields to be searched and their data range, the target product identifiers are filtered using a pre-built product search system, and the target product name and field data are obtained through a pre-built product attribute system, ensuring that the data comes from the same field database. The target product identifier, name, and data are then sent as the search results.

Benefits of technology

This ensures the consistency of field data for the same product identifier across different systems, improves the accuracy and performance of search results, and enhances the quality of product searches.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025074322_02012026_PF_FP_ABST
    Figure CN2025074322_02012026_PF_FP_ABST
Patent Text Reader

Abstract

The present disclosure relates to the technical field of data processing. Disclosed are a commodity search method and apparatus, a computer device, and a storage medium. The present disclosure provides the commodity search method, comprising: on the basis of a received commodity search request, determining a field to be searched and a corresponding field data range; on the basis of first field data of a plurality of commodity identifiers under said field in a preset commodity search system, determining a target commodity identifier of which the first field data is within the field data range; by means of a preset commodity attribute system, acquiring a target commodity name and second field data under said field that correspond to the target commodity identifier, the second field data and the first field data being the same and both being derived from a 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.
Need to check novelty before this filing date? Find Prior Art

Description

Commodity search method and device, computer device and storage medium

[0001] Cross-reference to Related Applications

[0002] The present application claims priority to the Chinese patent application No. 202410822614.1, filed on June 24, 2024, and entitled "Commodity search method and device, computer device and storage medium", the content of which is incorporated herein by reference in its entirety. TECHNICAL FIELD

[0003] The present disclosure relates to the technical field of data processing, in particular to a commodity search method and device, a computer device and a storage medium. BACKGROUND

[0004] In related technologies, when a commodity search request is received, a commodity search needs to be performed in combination with multiple systems. However, the field data corresponding to the same search field under different systems for the same commodity may be different, which may result in a search result that does not match the commodity search request. SUMMARY

[0005] Therefore, the present disclosure provides a commodity search method and device, a computer device and a storage medium to solve the problem that the search result does not match the commodity search request.

[0006] In a first aspect, the present disclosure provides a commodity search method, which comprises:

[0007] determining a to-be-searched field and a corresponding field data range according to a received commodity search request;

[0008] determining a target commodity identifier whose first field data is within the field data range according to the first field data of multiple commodity identifiers under the to-be-searched field in a preset commodity search system;

[0009] obtaining a target commodity name and second field data under the to-be-searched field corresponding to the target commodity identifier through a preset commodity attribute system, the second field data being the same as the first field data and both being derived from the same preset field database, the field database comprising field data of multiple commodity identifiers under multiple search fields;

[0010] 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.

[0011] In a second aspect, the present disclosure provides a commodity search device, which comprises:

[0012] a recognition module configured to determine a to-be-searched field and a corresponding field data range according to a received commodity search request;

[0013] The first search module is configured to determine a target product identifier in a field data range according to first field data of a plurality of product identifiers under a search field in a preset product search system.

[0014] The second search module is configured to obtain a target product name corresponding to the target product identifier and second field data under the search field through a preset product attribute system, the second field data being the same as the first field data and both being from a same preset field database, the field database including field data of a plurality of product identifiers under a plurality of search fields.

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

[0016] In a third aspect, the present disclosure provides a computer device, including a memory and a processor, the memory and the processor being communicatively connected with each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the product search method of the first aspect or any of the corresponding embodiments thereof.

[0017] In a fourth aspect, the present disclosure provides a computer readable storage medium, the computer readable storage medium storing computer instructions, the computer instructions being used to make a computer execute the product search method of the first aspect or any of the corresponding embodiments thereof.

[0018] In a fifth aspect, the present disclosure provides a computer program product, including computer instructions, the computer instructions being used to make a computer execute the product search method of the first aspect or any of the corresponding embodiments thereof. BRIEF DESCRIPTION OF DRAWINGS

[0019] In order to more clearly illustrate the specific embodiments of the present disclosure or the technical solutions in the prior art, the drawings needed in the specific embodiments or the prior art description will be briefly introduced as follows. Obviously, the drawings in the following description are some embodiments of the present disclosure, and those skilled in the art can also obtain other drawings according to these drawings without creative labor.

[0020] FIG. 1 is a flow diagram of a product search method according to an embodiment of the present disclosure;

[0021] FIG. 2 is a flow diagram of a field data synchronization method based on a field database according to an embodiment of the present disclosure;

[0022] FIG. 3 is an architectural diagram of a field updating device according to an embodiment of the present disclosure;

[0023] FIG. 4 is a schematic diagram of a registration interface according to an embodiment of the present disclosure;

[0024] FIG. 5 is a schematic diagram of another registration interface according to an embodiment of the present disclosure;

[0025] FIG. 6 is a schematic diagram of yet another registration interface according to an embodiment of the present disclosure;

[0026] FIG. 7 is a schematic diagram of a flow of a commodity search method according to an embodiment of the present disclosure;

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

[0028] FIG. 9 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present disclosure. DETAILED DESCRIPTION

[0029] To make the objectives, technical solutions, and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be described clearly and completely below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are some but not all of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present disclosure.

[0030] In the related art, when a commodity search is performed according to a received commodity search request, a plurality of systems need to be combined to determine. Because there is business isolation between different systems, the field data corresponding to the same search field of the same commodity under different systems can be different, which further causes the search result to be inconsistent with the commodity search request. For example, if the commodity search request is to obtain A-class commodities with a price between 0 and 50 yuan, but the price of b commodity under A class is changed from 55 yuan to 49 yuan because of business update in one system, and the price of b commodity in other systems is greater than 50 yuan, then b commodity will not be included in the search result, which is inconsistent with the commodity search request.

[0031] In view of this, the embodiment of the present disclosure provides a commodity search method. After receiving a commodity search request, a to-be-searched field and a corresponding field data range that need to be searched are determined for targeted search. According to the first field data of a plurality of commodity identifiers under the to-be-searched field in the preset commodity search system, target commodity identifiers in which the first field data is within the field data range are determined, and then the target commodity identifiers correspond to target commodity names and second field data under the to-be-searched field through the preset commodity attribute system. 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 field data of a plurality of commodity identifiers under a plurality of search fields, thereby ensuring that the same commodity identifier corresponds to the same field data under the same search field in different systems. The target commodity identifiers, the target commodity names, and the second field data are sent as search results to respond to the commodity search request, which can ensure that the search results sent are consistent with the commodity search request, thereby helping to improve the commodity search performance.

[0032] According to the embodiment of the present disclosure, a commodity search method embodiment 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 group of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that here.

[0033] In the present embodiment, a commodity search method is provided, which can be used in the above-mentioned computer devices such as computers, servers, etc. FIG. 1 is a flowchart of the commodity search method according to the embodiment of the present disclosure. As shown in FIG. 1, the flowchart includes the following steps:

[0034] Step S101, according to the received commodity search request, determining the to-be-searched field and the corresponding field data range.

[0035] The commodity search request refers to a request initiated by a user on an e-commerce platform or a search engine to search for a specific commodity. For example, the commodity search request can be generated according to the relevant keywords or filtering conditions input by the user in the search box.

[0036] After receiving the commodity search request, in order to determine the commodity search direction, the commodity search request is parsed to obtain the search keywords and filtering conditions input by the user, and then the to-be-searched field and the corresponding field data range are determined from the obtained search keywords and filtering conditions, so that the search results obtained in the subsequent targeted search can meet the user's needs. The to-be-searched field and the corresponding field data range depend on the actual obtained commodity search request, which is not limited here.

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

[0038] Step S102, according to the first field data of the plurality of product identifiers under the field to be searched in the preset product search system, determine the target product identifier whose first field data is within the field data range.

[0039] In order to determine the product that meets the field data range under the field to be searched, the preset product search system is used for screening. In the preset product search system, a plurality of search fields and a plurality of first field data corresponding to the products under each search field are stored. In order to facilitate data maintenance and management, the corresponding product is represented by the product identifier in the product search system. For example, the product identifier can be the stock keeping unit (SKU), identity document (ID) or product code, which is not limited here.

[0040] Through the field to be searched, the search range of the target product identifier in the product search system can be determined, and then combined with the field data range, the product identifier 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 identifier is obtained. For example, taking the field to be searched as the price of a certain fruit, and the field range data as 20-90 yuan, the product identifier of the fruit whose price is between 20-90 yuan is searched through the product search system, and then the product identifier of the fruit whose price is between 20-90 yuan is taken as the target trademark identifier.

[0041] 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.

[0042] The preset product attribute system stores product attribute information corresponding to a plurality of product identifiers. The product attribute information includes, but is not limited to, the product name corresponding to the product 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. The field database includes the field data of a plurality of product identifiers under a plurality of search fields.

[0043] Since the second field data corresponding to the target commodity identifier in the commodity attribute system is the same as the first field data corresponding to the target commodity identifier in the commodity search system for the same search field, in order to facilitate the user to understand the attribute information of the target commodity corresponding to the target commodity identifier, the second field data under the target commodity identifier and the second field data under the target commodity name are obtained from the preset commodity attribute system.

[0044] In step S104, the target commodity identifier, the target commodity name, and the second field data are sent as a search result to respond to the commodity search request.

[0045] In some optional embodiments, the step S104 includes:

[0046] The target commodity identifier, the target commodity name, and the second field data are sent as a search result to the e-commerce platform or the search engine, which helps the e-commerce platform or the search engine to display the target commodity and the corresponding commodity attribute in the display interface, so that the user can quickly understand the target commodity and the corresponding commodity attribute that meet the commodity search request, thereby improving the commodity search performance.

[0047] The commodity search method provided in the embodiment can ensure that the field data corresponding to the same commodity identifier in different systems is the same for the same search field, so that the search result obtained when searching for commodities according to the obtained search field and the corresponding field data range is consistent with the commodity search request, thereby helping to improve the quality of the search result and improving the commodity search performance.

[0047] In the embodiment, a field data synchronization method based on a field database is provided, which can be used in the above computer devices such as computers, servers, etc. FIG. 2 is a flowchart of the field data synchronization method based on the field database according to the embodiment of the present disclosure. As shown in FIG. 2, the flow includes the following steps:

[0048] In step S201, the current commodity identifier is obtained in the multiple search fields under the to-be-updated field data.

[0049] In order to ensure that the field data synchronized to the commodity search system and the commodity attribute system is the latest valid field data, the to-be-updated field data of the same commodity identifier in the multiple search fields is obtained, so that the consistency of the data can be ensured when updating subsequently, thereby helping to improve the search accuracy of the target commodity identifier.

[0050] In some optional embodiments, the step S201 includes:

[0051] In step a1, the target data source corresponding to the data update task is determined in response to the received data update task.

[0052] 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 to-be-updated field data can be acquired in a targeted manner, thereby ensuring the acquisition effectiveness of the to-be-updated field data, avoiding the situation that the field database appears data abnormity due to confusion or incorrect update of irrelevant field data, and thus helping to improve the data security and accuracy of the field database.

[0053] Step a2, acquiring the to-be-updated field data of the current commodity identifier under the plurality of search fields from the target data source.

[0054] The target data source can determine the current commodity identifier and the corresponding search field in which the field data has changed, thereby improving the acquisition effectiveness when acquiring the to-be-updated field data.

[0055] The to-be-updated field data includes the to-be-updated field data in which the data has changed and the current field data in which the data has not changed, thereby ensuring the consistency between the data when updating the field data of the current commodity identifier, and avoiding the inconsistency with the data in the target data source.

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

[0057] Step a21, acquiring a first data update file from the batch task data source;

[0058] Step a22, performing stream data conversion on each sub-data update file respectively by using a parallel processing mode, to obtain the to-be-updated field data corresponding to at least one commodity identifier under the corresponding search field;

[0059] Step a23, determining the to-be-updated field data of the current commodity identifier under the plurality of search fields according to the to-be-updated field data corresponding to at least one commodity identifier under each search field.

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

[0061] To improve the data acquisition efficiency, the stream data conversion is performed on each sub-data update file in a parallel processing manner to unify the formats of the multiple to-be-updated field data of the same search field, to filter out the redundant data in the sub-data update file, to reduce the data update difficulty, and to obtain the to-be-updated field data corresponding to at least one product identifier under the corresponding search field.

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

[0063] In some optional embodiments, if the target data source is a stream task data source, the step a2 includes:

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

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

[0066] Specifically, if the target data source is a stream task data source, it indicates that the currently executed data update task 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 to-be-updated data of the current product identifier under the current search field is in the second data update file, 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 updated subsequently, the field data under multiple search fields can be combined for updating. Different second data update files correspond to different search fields.

[0067] The stream data conversion is performed on the second data update file to filter out the redundant data in the second data update file, to reduce the data update difficulty, and to obtain the to-be-updated field data corresponding to at least one product identifier under the corresponding search field.

[0068] Step S202, locking the product attribute system and the product search system through the preset distributed lock, and writing the to-be-updated field data into the product search system and the product attribute system during the locking process to update the field data of the current product identifier under multiple search fields.

[0069] To ensure the consistency of data update, the field data to be updated is written into the product search system and the product attribute system respectively, and the product attribute system and the product search system are locked by the preset distributed lock before the writing, so as to avoid the inconsistency of data caused by concurrent update during the data update. The distributed lock can be realized based on a shared distributed lock service (such as ZooKeeper, Redis, etc.), so as to ensure that only one thread can access and modify the data during the entire update process.

[0070] In step S203, the distributed lock is released in response to the completion of writing the field data to be updated.

[0071] In response to the completion of writing the field data to be updated, it is indicated that the synchronous update is completed, and then the distributed lock is released, so that other threads can acquire the distributed lock to perform other data operations, thereby avoiding data conflicts and confusion caused by concurrent update between different threads, and ensuring the performance and reliability of the field database.

[0072] The field data synchronization method based on the field database provided in the embodiment can support the field database to obtain the field data to be updated from multiple target data sources, and synchronize the obtained field data to be updated into the product search system and the product attribute system, so as to 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, thereby ensuring that the search result obtained during subsequent product search is consistent with the received product search request, and improving the product search performance.

[0073] In some optional embodiments, the locking of the product attribute system and the product search system comprises:

[0074] In step b1, the intermediate storage 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.

[0075] In step b2, the product attribute system and the product search system are locked according to the update period of the intermediate storage area, so that the field data to be updated of the current search field is written into the product search system and the product attribute system through the intermediate storage area during the locking process.

[0076] Specifically, to ensure that the field data in the product attribute system and the product search system can be updated in time, the corresponding preset update priority is configured in advance for different search fields. The update periods corresponding to different preset update priorities are different. For example, real-time update, 3-day update or one-month update.

[0077] After determining that the field data under the current search field is updated, then according to the preset update priority of the current search field, the intermediate storage area corresponding to the to-be-updated field data of the current search field is determined, so as to cache the to-be-updated field data of at least one commodity identifier under the current search field through the intermediate storage area.

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

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

[0080] As one or more specific application embodiments of the present disclosure, in order to ensure that the second field data of each commodity identifier in the commodity attribute system under the plurality of search fields is consistent with the first field data of each commodity identifier in the commodity search system under the plurality of search fields, the field update device can be used to synchronize the field data as shown in FIG. 3. The field update device includes a plurality of batch flow conversion modules, a first flow database, a storage module, a field database, a first storage area, a second storage area, and a distributed lock. Different batch flow conversion modules are used to convert the to-be-updated field data corresponding to different search fields. The first flow database is used to manage the data after the flow data conversion, and stores and queries the data through the storage module. The field database is used to store the to-be-updated field data of a plurality of commodity identifiers under a plurality of search fields. The first storage area is used to store the to-be-updated field data corresponding to the search field with the first priority. The second storage area is used to store the to-be-updated field data corresponding to the search field with the second priority. The distributed lock is used to lock the commodity attribute system and the commodity search system for data when updating the data of the commodity attribute system and the commodity search system, so as to avoid interference of other threads. The commodity search system includes a search engine system and a vector engine system. The search engine system is used for direct search according to the keywords corresponding to the to-be-searched field. The vector engine system is used for associated search according to the keywords corresponding to the to-be-searched field.

[0081] The field data is synchronized by the field updating device, so that the field data of each commodity identifier under different search fields in the commodity attribute system, the search engine system and the vector engine system can be uniformly updated and always kept consistent, a data path between the unified multi-source data and the multi-commodity system is constructed, and thus the problem that the search result does not match the commodity search request can be effectively solved.

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

[0083] First, the information of the target data source is registered in the background interface. As shown in FIG. 4, the mapping relationship between the field updating device and each target data source can be established in a table registration manner. If the target data source is kafka (an open source distributed stream processing platform), the topic name is filled in when the table name is filled in, and then the data parser can be configured according to the real data format in the corresponding data source. For example, if the data format in it is a json format, a JsonParser is configured. When the data source field type is configured: if it is a json data, a data sample is given, which is used for the commodity system to automatically deduce each field name and field type, and the deduced type can be manually corrected. If it is a pb data format, a pb file can be uploaded. The same field can exist in multiple data sources, but the field registered in the data format can exist in only one virtual table. When the table state is in effect, the commodity system can read the real data, otherwise the reading will be stopped.

[0084] Secondly, the system information of the commodity attribute system, the search engine system and the vector engine system is registered respectively. Different commodity systems are configured with different system attributes. As shown in FIG. 5, when each commodity system is configured, all field names and field types corresponding to each commodity system need to be configured, so as to ensure that the field data of each commodity identifier under different search fields can be uniformly updated and kept consistent. When the commodity system is in the effective state, the device will write data to the commodity system, otherwise the writing will be stopped.

[0085] Finally, the field mapping relationship is configured. As shown in FIG. 6, a mapping relationship is created in the field mapping page, a field is selected in the data source table, a preset update priority is configured for the field, and the field is simultaneously configured into the three commodity systems, so as to ensure that the three commodity systems are in a binding relationship. When the mapping relationship is in effect, it will be normally written into the three commodity systems at the same time, and when it is stopped, the writing will be stopped at the same time, so as to ensure that the online data is consistent.

[0086] In another optional implementation scenario, during the data updating process, when the system of the target data source is hive, the field updating device will start a batch stream module when a new partition of the corresponding hive table is generated. The module is implemented by the spark framework, which will first read the entire hive table content, and then write it to the kafka stream database through the kafka client interface.

[0087] The field updating device will be equipped with a kafka to tbase conversion module for each kafka stream database. The module will run all the time and write the field data in kafka to the tbase wide table database in real time. The conversion module is implemented by flink, which obtains the entire binary information by subscribing to kafka messages. The real data of each field is parsed by using the data source field parser and field enumeration information in the controller, and discarded if there are unknown fields. Then, the tbase client is used to write to the tbase in real time. When writing to the tbase, each column name is in the format of "data source table name_data source field name". This format can solve the problem of determining which source table the field comes from, and can quickly support the change of field name without the need to clean up old data.

[0088] Through the priority configuration in the field mapping, the controller will configure the corresponding message change receiver for each search field of the tbase 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.

[0089] For each message change receiver kafka, the field updating device will be equipped with a conversion module for numerical search fields. The module will run all the time. The conversion module is implemented by flink, which obtains one or more field data to be updated by subscribing to kafka messages. The controller will issue the field mapping relationship, and the conversion module will issue the search field values to multiple commodity systems according to the mapping relationship. In order to ensure simultaneous updating of multiple systems, the module will use zookeeper as a distributed lock to ensure that only one conversion module is used to synchronize the update of the same commodity in three commodity systems. When the data of the three commodity systems is updated, the distributed lock will be released. Thus, other modules can obtain the lock of the commodity to continue updating other numerical search fields.

[0090] In some optional implementation scenarios, as shown in FIG. 7, the process of commodity search can be as follows:

[0091] The user inputted commodity search request is acquired through the front-end commodity platform, and then the commodity platform sends the commodity search request to the back-end server, so as to determine the to-be-searched field and the corresponding field data range through the server. Taking the to-be-searched field and the corresponding field data range as an example, the commodity of a certain brand with a price greater than 50 is sent to the search engine system and the vector engine system through the commodity search system, so as to determine the target commodity identifier. After the target commodity identifier is obtained through the commodity search system, it is sent to the server. The server 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 to-be-searched field. Finally, the target commodity identifier, the target commodity name and the corresponding commodity price are sent to the commodity platform as the search result to respond to the commodity search request.

[0092] In the embodiment, a commodity search device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments, and details are not repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware or a combination of software and hardware is also possible and is contemplated.

[0093] The embodiment provides a commodity search device, as shown in FIG. 8, comprising:

[0094] The identification module 801 is configured to determine the to-be-searched field and the corresponding field data range according to the received commodity search request;

[0095] The first search module 802 is configured to determine the target commodity identifier of the first field data within the field data range according to the first field data of a plurality of commodity identifiers under the to-be-searched field in the preset commodity search system;

[0096] The second search module 803 is configured to obtain the target commodity name corresponding to the target commodity identifier and the second field data under the to-be-searched field through the preset commodity attribute system, the second field data being the same as the first field data and both being derived from the same preset field database, the field database comprising field data of a plurality of commodity identifiers under a plurality of search fields;

[0097] The sending module 804 is configured to send the target commodity identifier, the target commodity name and the second field data as the search result to respond to the commodity search request.

[0098] In some optional embodiments, the device for synchronizing the field data of the field database comprises:

[0099] The acquisition module is configured to acquire the to-be-updated field data of the current commodity identifier under the multiple search fields;

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

[0101] The control module is configured to release the distributed lock in response to the writing of the to-be-updated field data being completed.

[0102] In some optional embodiments, the synchronization module comprises:

[0103] The first processing unit is configured to determine an intermediate storage area corresponding to the to-be-updated field data of the current search field according to a preset update priority of the current search field.

[0104] The locking unit is configured to lock the commodity attribute system and the commodity search system according to an update period of the intermediate storage area, so as to write the to-be-updated field data of the current search field into the commodity search system and the commodity attribute system respectively through the intermediate storage area during the locking process.

[0105] In some optional embodiments, the preset update priority comprises a first priority or a second priority, the intermediate storage area comprises a first storage area or a second storage area, the first priority corresponds to the first storage area, the second priority corresponds to the second storage area, and a first update period frequency of the first storage area is lower than a second update period frequency of the second storage area.

[0106] In some optional embodiments, the acquisition module comprises:

[0107] The second processing unit is configured to determine a target data source corresponding to the received data update task in response to the received data update task.

[0108] The third processing unit is configured to acquire the to-be-updated field data of the current commodity identifier under the multiple search fields from the target data source.

[0109] In some optional embodiments, if the target data source is a batch task data source, the third processing unit comprises:

[0110] The first execution unit is configured to acquire a first data update file from the batch task data source, the first data update file comprising a plurality of sub-data update files corresponding to the multiple search fields.

[0111] The second execution unit is configured to perform stream data conversion on each of the sub-data update files respectively in a parallel processing manner to obtain the to-be-updated field data corresponding to the at least one product identifier under the corresponding search field.

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

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

[0114] The fourth execution unit is configured to continuously acquire a plurality of second data update files from the stream task data source, and different second data update files correspond to different search fields.

[0115] The fifth execution unit is configured to perform stream data conversion on the second data update files to obtain the to-be-updated field data corresponding to the at least one product identifier under the corresponding search field.

[0116] Further function descriptions of the above-mentioned modules and units are the same as those of the corresponding embodiments, and will not be described here again.

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

[0118] The embodiment of the present disclosure further provides a computer device with the product search device shown in FIG. 8.

[0119] Referring to FIG. 9, FIG. 9 is a structural diagram of a computer device according to an optional embodiment of the present disclosure. As shown in FIG. 9, 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. The various components communicate with each other using different buses, and can be mounted on a common main board or mounted in other manners as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of a GUI on an external input / output device, such as a display device coupled to the interface. In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple memory banks, if necessary. Also, multiple computer devices can be connected, each device providing part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). One processor 10 is taken as an example in FIG. 9.

[0120] The processor 10 can be a central processor, a network processor, or a combination thereof. The processor 10 can further include a hardware chip. The hardware chip can be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device can be a complex programmable logic device, a field programmable logic device, a general array logic, or any combination thereof.

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

[0122] The memory 20 can include a program storage area and a data storage area. The program storage area can store an operating system and application programs required by at least one function; the data storage area can store data created according to the use of the computer device, etc. In addition, the memory 20 can include a high-speed random access memory, and can also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state memory device. In some optional embodiments, the memory 20 can optionally include a memory remotely arranged with respect to the processor 10, and these remote memories can be connected to the computer device through a network. Examples of the network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof.

[0123] The memory 20 can include a volatile memory, such as a random access memory; the memory can also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state disk; and the memory 20 can further include a combination of the above kinds of memories.

[0124] 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 can be connected by a bus or other means, and are connected by a bus in FIG. 9 as an example.

[0125] The input device 30 can receive inputted digital or character information, and generate key signal input related to user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 can include a display device, an auxiliary lighting device (e.g., an LED), a tactile feedback device (e.g., a vibration motor), etc. The 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.

[0126] The embodiments of the present disclosure further provide a computer readable storage medium, and the method according to the embodiments of the present disclosure can be implemented in hardware, firmware, or recorded in a storage medium, or be implemented as computer code originally stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and stored in a local storage medium, so that the method described herein can be processed by such software on a storage medium using a general purpose computer, a special purpose processor, or programmable or special hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk or a solid state disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that the computer, processor, 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 the computer, processor or hardware, the method shown in the above embodiments is implemented.

[0127] It can be understood that, before using the technical solutions disclosed in the embodiments of the present disclosure, the type of personal information involved in the present disclosure, the use range, the use scenario, etc. should be informed to the user and the authorization of the user should be obtained through appropriate means according to relevant laws and regulations.

[0128] For example, in response to receiving the user's active request, the user is sent prompt information to explicitly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can voluntarily choose whether to provide personal information to the computer device, application program, server or storage medium, etc. software or hardware that performs the operation of the technical solutions of the present disclosure according to the prompt information.

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

[0130] It can be understood that the above notification and user authorization obtaining process is only illustrative and does not limit the implementation of the present disclosure, and other manners meeting the relevant laws and regulations can also be applied to the implementation of the present disclosure.

[0131] Part of the present application can be applied as a computer program product, for example, computer program instructions, when executed by a computer, through the operation of the computer, the method and / or technical solutions according to the present application can be invoked or provided. Those skilled in the art should understand that the form of computer program instructions in a computer readable medium includes but is not limited to source files, executable files, installation package files, etc. Correspondingly, the manner of computer program instructions executed by a computer includes but is not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer readable medium can be any available computer readable storage medium or communication medium accessible to the computer.

[0132] Although the embodiments of the present disclosure are described in conjunction with the drawings, various modifications and changes can be made by those skilled in the art without departing from the spirit and scope of the present disclosure, and such modifications and changes fall within the scope defined by the appended claims.

Claims

1. A commodity search method, comprising: determining a search field and a corresponding field data range according to a received commodity search request; determining a target commodity identifier in which first field data of a plurality of commodity identifiers under the search field is within the field data range according to the first field data of the plurality of commodity identifiers under the search field in a preset commodity search system; acquiring a target commodity name corresponding to the target commodity identifier and second field data under the search field through a preset commodity attribute system, the second field data being the same as the first field data and both being from a same preset field database, the field database comprising field data of the plurality of commodity identifiers under a plurality of search fields; 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. 2.The method of claim 1, wherein a method of synchronizing field data of the field database comprises: acquiring to-be-updated field data of a current commodity identifier under the plurality of search fields; locking the commodity attribute system and the commodity search system through a preset distributed lock, and writing the to-be-updated field data into the commodity search system and the commodity attribute system respectively during the locking process to update the field data of the current commodity identifier under the plurality of search fields; releasing the distributed lock in response to completion of writing the to-be-updated field data. 3.The method of claim 2, wherein the locking the commodity attribute system and the commodity search system comprises: determining an intermediate storage area corresponding to to-be-updated field data of a current search field according to a preset update priority of the current search field; locking the commodity attribute system and the commodity search system according to an update period of the intermediate storage area to write the to-be-updated field data of the current search field into the commodity search system and the commodity attribute system respectively through the intermediate storage area during the locking process. 4.The method of claim 3, wherein the preset update priority comprises a first priority or a second priority, the intermediate storage area comprises a first storage area or a second storage area, the first priority corresponds to the first storage area, the second priority corresponds to the second storage area, and a first update period frequency of the first storage area is lower than a second update period frequency of the second storage area. 5.The method of claim 2, wherein the acquiring to-be-updated field data of a current commodity identifier under the plurality of search fields comprises: determining a target data source corresponding to a received data update task; acquiring the to-be-updated field data of the current commodity identifier under the plurality of search fields from the target data source. 6.The method of claim 5, wherein if the target data source is a batch task data source, the acquiring the to-be-updated field data of the current commodity identifier under the plurality of search fields from the target data source comprises: obtaining a first data update file from the batch task data source, the first data update file including a plurality of sub-data update files corresponding to a plurality of search fields; performing stream data conversion on each of the sub-data update files in parallel to obtain at least one product identifier corresponding to a to-be-updated field data under a corresponding search field; determining the to-be-updated field data of the current product identifier under the plurality of search fields according to the to-be-updated field data of at least one product identifier under each search field.

7. The method of claim 5, wherein if the target data source is a stream task data source, extracting the to-be-updated field data of the current product identifier under the plurality of search fields from the data update file comprises: continuously obtaining a plurality of second data update files from the stream task data source, different second data update files corresponding to different search fields; performing stream data conversion on the second data update files to obtain at least one product identifier corresponding to to-be-updated field data under a corresponding search field.

8. A product search apparatus, comprising: an identification module configured to determine a to-be-searched field and a corresponding field data range according to a received product search request; a first search module configured to determine a target product identifier whose first field data under the to-be-searched field is within the field data range according to first field data of a plurality of product identifiers under the to-be-searched field in a preset product search system; a second search module configured to obtain a target product name corresponding to the target product identifier and second field data under the to-be-searched field through a preset product attribute system, the second field data being the same as the first field data and both being derived from a same preset field database, the field database including field data of the plurality of product identifiers under a plurality of search fields; a sending module configured to send the target product identifier, the target product name, and the second field data as a search result to respond to the product search request.

9. A computer device, comprising: a memory and a processor, which are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the product search method of any one of claims 1 to 7.

10. A computer readable storage medium, which stores computer instructions for causing a computer to perform the product search method of any one of claims 1 to 7.

11. A computer program product, comprising computer instructions for causing a computer to perform the product search method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for commodity information access

    CN102222100A

  • Information search method and device

    CN111814028A

  • Government affair database management method and device and computer readable storage medium

    CN117331909A

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

    CN118747237A

  • Search center dynamic configuration using field mappings

    US20090106191A1