Product search methods, devices, computer equipment and storage media
By retrieving data from the same field database in the product attribute system, the problem of inconsistent product search requests across different systems was resolved, improving the quality and performance of search results.
Patent Information
- Application Number
- CN202410822614.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2026-01-06
- Estimated Expiration
- 2044-06-24
AI Technical Summary
The search field data for the same product may differ across different systems, resulting in search results that do not match the product search request.
The system obtains the target product name and second field data corresponding to the target product identifier through a pre-set product attribute system, ensuring that the data comes from the same field database, and sends the target product identifier, target product name, and second field data as search results in response to the product search request.
Ensure that the field data corresponding to the same product identifier is consistent across different systems, thereby improving the quality and performance of search results.
Smart Images

Figure CN118747237B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, specifically to product search methods, apparatus, computer equipment, and storage media. Background Technology
[0002] In related technologies, when performing a product search on a received product search request, it is necessary to combine multiple systems for determination. However, because the field data corresponding to the same product and the same search field may differ across different systems, 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 equipment, and storage medium to solve the problem of mismatch between search results and product search requests.
[0004] Firstly, this disclosure provides a product search method, which includes:
[0005] Based on the received product search request, determine the fields to be searched and the corresponding data range of the fields;
[0006] Based on the first field data of multiple product identifiers under the search field in the pre-set product search system, determine the target product identifier whose first field data falls within the field data range;
[0007] The system obtains the target product name corresponding to the target product identifier and the second field data under the search field by using a pre-set product attribute system. The second field data is the same as the first field data and both come from the same pre-set field database. The field database includes field data of multiple product identifiers under multiple search fields.
[0008] Send the target product identifier, target product name, and second field data as a response to the product search request.
[0009] Secondly, this disclosure provides a product search device, the device comprising:
[0010] The identification module is used to determine the field to be searched and the corresponding field data range based on the received product search request;
[0011] The first search module is used to determine the target product identifier whose first field data is within the field data range based on the first field data of multiple product identifiers under the search field in the pre-set product search system.
[0012] The second search module is used to obtain the target product name corresponding to the target product identifier and the second field data under the search field through the preset product attribute system. The second field data is the same as the first field data and both come from the same preset field database. 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, target product name, and second field data as a response to the product search request as a search result.
[0014] Thirdly, this disclosure provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to perform the product search method of the first aspect or any corresponding embodiment described above.
[0015] Fourthly, this disclosure provides a computer-readable storage medium storing computer instructions for causing a computer to perform the product search method of the first aspect or any corresponding embodiment described above.
[0016] Fifthly, the present invention provides a computer program product, including computer instructions for causing a computer to execute the product search method of the first aspect or any corresponding embodiment thereof.
[0017] The product search method disclosed herein ensures that the field data corresponding to the same product identifier is the same in different systems for the same search field. Therefore, when searching for products based on the obtained search field and the corresponding field data range, the search results can be consistent with the product search request, thereby helping to improve the quality of search results and improve product search performance. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the specific embodiments of this disclosure or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a product search method according to an embodiment of the present disclosure;
[0020] Figure 2 This is a flowchart illustrating a field data synchronization method based on a field database according to an embodiment of the present disclosure;
[0021] Figure 3 This is a schematic diagram of the architecture of a field update apparatus according to an embodiment of the present disclosure;
[0022] Figure 4 This is a schematic diagram of the registration interface according to an embodiment of the present disclosure;
[0023] Figure 5 This is a schematic diagram of another registration interface according to an embodiment of the present disclosure;
[0024] Figure 6 This is another schematic diagram of a registration interface according to an embodiment of the present disclosure;
[0025] Figure 7 This is a flowchart illustrating a product search method according to an embodiment of the present disclosure;
[0026] Figure 8 This is a structural block diagram of a product search device according to an embodiment of the present disclosure;
[0027] Figure 9 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present disclosure. Detailed Implementation
[0028] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0029] In related technologies, when performing a product search 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 product and the same search field may differ in different systems, which will lead to the search results not matching the product search request. For example, if the product search request is to retrieve category A products priced between 0 and 50 yuan, but one system changes the price of product b under category A from 55 yuan to 49 yuan due to a business update, and the price of product b is greater than 50 yuan in other systems, then product b will not be included in the search results, resulting in a discrepancy with the product search request.
[0030] Therefore, this disclosure provides a product search method. Upon receiving a product search request, the method determines the search field and its corresponding data range for targeted searching. Based on first field data of multiple product identifiers under the search field in a pre-set product search system, a target product identifier whose first field data falls within the data range is identified. Then, the target product name corresponding to the target product identifier and its second field data under the search field are obtained through a pre-set product attribute system. The second field data is identical to the first field data and both originate from the same pre-set field database. This field database includes field data of multiple product identifiers under multiple search fields, ensuring that the same product identifier has the same field data for the same search field across different systems. Sending the target product identifier, target product name, and second field data as search results in response to the product search request ensures consistency between the sent search results and the product search request, thereby improving product search performance.
[0031] According to an embodiment of this disclosure, a product search method embodiment is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0032] This embodiment provides a product search method, which can be used in the aforementioned computer devices, such as computers and servers. Figure 1 This is a flowchart of a product search method according to an embodiment of the present disclosure, such as... Figure 1 As shown, the process includes the following steps:
[0033] Step S101: Based on the received product search request, determine the field to be searched and the corresponding field data range.
[0034] A product search request refers to a request initiated by a user on an e-commerce platform or search engine to search for a specific product. For example, a product search request can be generated based on relevant keywords or filter conditions entered by the user in the search box.
[0035] Upon receiving a product search request, to clarify the search direction, the request is parsed to obtain the user's input search keywords and filter conditions. Then, from these keywords and conditions, the fields to be searched and their corresponding data ranges are determined. This ensures that subsequent targeted searches yield results that meet the user's needs. The specific fields to be searched and their corresponding data ranges depend on the actual product search request received and are not limited here.
[0036] In some examples, the search field can be any one or more of the following: product name, product category, product price, product attribute, etc. If the search field is the product name, the corresponding data range can be all product names containing that product name. If the search field is the product price, the corresponding data range can be a specific price range, such as between 50 and 100 yuan. If the search field is a product attribute, the corresponding data range can be specific colors, materials, sizes, etc.
[0037] Step S102: Based on the first field data of multiple product identifiers under the search field in the preset product search system, determine the target product identifier whose first field data is within the field data range.
[0038] To identify products that meet the data range of the search field, a pre-built product search system is used for filtering. This system stores multiple search fields and the first field data for each product under each search field. For ease of data maintenance and management, the product search system uses product identifiers to represent the corresponding products. For example, a product identifier can be a Stock Keeping Unit (SKU), a unique identification document (ID), or a product code; there are no restrictions on this.
[0039] By defining the search field, the search scope for the target product identifier can be clearly determined within the product search system. Then, by combining this with the data range of the field, product identifiers whose data falls within the specified range can be quickly filtered under the search field, thus obtaining the target product identifier. For example, if the search field is the price of a certain fruit, and the data range is 20-90 yuan, then the product search system will search for product identifiers whose price falls within this range, and these product identifiers will be selected as the target identifiers.
[0040] Step S103: 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.
[0041] The pre-built product attribute system stores product attribute information corresponding to multiple product identifiers. This product attribute information includes, but is not limited to, the product name corresponding to the product identifier, second field data under different search fields, and other attribute information. The second field data is identical to the first field data, both originating from the same pre-built field database, which includes field data for multiple product identifiers under multiple search fields.
[0042] Since 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 for the same search field, in order to facilitate users to understand the attribute information of the target product corresponding to each target product identifier, the information is obtained from the preset product attribute system, thereby obtaining the target product name corresponding to the target product identifier and the second field data under the search field.
[0043] Step S104: Send the target product identifier, target product name, and second field data as a response to the product search request.
[0044] Sending the target product identifier, target product name, and second field data as search results to e-commerce platforms or search engines helps them to display the results in a targeted manner on the display interface. This allows users to quickly understand the target product that meets their search request and its 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 is the same in different systems for the same search field. Therefore, when searching for products based on the obtained search field and the corresponding field data range, the search results can be consistent with the product search request, thereby helping to improve the quality of search results and improve product search performance.
[0046] This embodiment provides a field data synchronization method based on a field database, which can be used in the aforementioned computer devices, such as computers and servers. Figure 2 This is a flowchart of a field data synchronization method based on a field database according to an embodiment of this disclosure, such as... Figure 2 As shown, the process includes the following steps:
[0047] Step S201: Obtain the data of fields to be updated for the current product identifier under multiple search fields.
[0048] To ensure that all field data synchronized to the product search system and product attribute system are the latest and valid, for the same product identifier, the field data to be updated under multiple search fields is obtained. This ensures data consistency during subsequent updates and helps improve the search accuracy of the target product identifier.
[0049] In some optional implementations, step S201 above includes:
[0050] Step a1: Respond to the received data update task and determine the target data source corresponding to the data update task.
[0051] To ensure the data security of the field database, after receiving a data update task, the target data source corresponding to the data update task is determined so that the data of the field to be updated can be obtained in a targeted manner. This ensures the effectiveness of obtaining the data of the field to be updated and avoids data anomalies in the field database due to confusion or incorrect updating of irrelevant field data, thereby helping to improve the data security and accuracy of the field database.
[0052] Step a2: Obtain the data of fields to be updated for the current product identifier under multiple search fields from the target data source.
[0053] By using the target data source, the current product identifier and corresponding search field whose field data has changed can be clearly identified, thereby improving the effectiveness of obtaining the field data to be updated.
[0054] The acquired data to be updated includes both fields whose data has changed and current fields whose data has not changed. This ensures data consistency when updating the field data of the current product identifier, preventing inconsistencies with the data in the target data source.
[0055] In some optional implementations, if the target data source is a batch task data source, then step a2 above includes:
[0056] Step a21: Obtain the first data update file from the batch task data source;
[0057] Step a22: Through parallel processing, each sub-data update file is converted into streaming data to obtain the field data to be updated corresponding to at least one product identifier under the corresponding search field;
[0058] Step a23: Based on the field data to be updated corresponding to at least one product identifier under each search field, determine the field data to be updated for the current product identifier under multiple search fields.
[0059] Specifically, if the target data source is a batch task data source, it indicates that batch updates of field data under multiple search fields are required. Therefore, a first data update file is obtained from the batch task data source. This 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] To improve data acquisition efficiency, parallel processing is used to perform streaming data conversion on each sub-data update file. This unifies the format of multiple fields to be updated under the same search field, filters out redundant data in the sub-data update files, reduces the difficulty of data updates, and thus obtains the field data to be updated corresponding to at least one product identifier under the corresponding search field.
[0061] Since each sub-data update file contains only one product identifier's data to be updated under the corresponding search field, in order to ensure data consistency, the data is integrated based on the data to be updated under different search fields for each product identifier, thereby obtaining the data to be updated under multiple search fields for the current product identifier.
[0062] In some alternative implementations, if the target data source is a streaming task data source, then step a2 above includes:
[0063] Step a24: Continuously retrieve multiple second data update files from the streaming task data source;
[0064] Step a25: Perform streaming data conversion on the second data update file to obtain the 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 streaming 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 streaming task data source. However, since the second data update file contains data to be updated for the current product identifier under the current search field, multiple second data update files are continuously obtained to ensure consistency between the field data in the field database and the field data in the streaming task data source. This allows for subsequent updates to the field data of the same product identifier by combining the field data under multiple search fields. Different second data update files correspond to different search fields.
[0066] The second data update file is transformed into streaming data to remove redundant data, reduce the difficulty of data updating, and obtain the field data to be updated corresponding to at least one product identifier under the corresponding search field.
[0067] Step S202: Lock the product attribute system and the product search system using a pre-set distributed lock. During the locking process, write the field data to be updated into the product search system and the product attribute system respectively to update the field data of the current product identifier under multiple search fields.
[0068] To ensure data consistency during updates, before writing the data to be updated into the product search system and the product attribute system, a pre-defined distributed lock is used to lock these systems. This prevents data inconsistencies caused by concurrent updates. The distributed lock can be implemented using a shared distributed lock service (such as ZooKeeper or Redis), ensuring that only one thread can access and modify the data throughout the entire update process.
[0069] Step S203: After the data in the field to be updated has been written, release the distributed lock.
[0070] When the response indicates that the data to be updated in the field has been written, it signifies that the synchronous update has been completed, and the distributed lock is released so that other threads can acquire the distributed lock to perform other data operations. This avoids data conflicts and chaos 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 a field database provided in this embodiment can support the field database to obtain 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. This can ensure that the field data of each product identifier under different search fields in the product attribute system and the product search system are the same, thereby ensuring that the search results obtained are consistent with the received product search requests when performing subsequent product searches, which is beneficial to improving product search performance.
[0072] In some alternative implementations, the product attribute system and product search system are locked, including:
[0073] Step b1: Determine the intermediate transfer area corresponding to the field data to be updated in the current search field according to the preset update priority of the current search field;
[0074] Step b2: Based on the update cycle of the intermediate transfer area, lock the product attribute system and the product search system. During the locking process, write the data of the field to be updated of the current search field into the product search system and the product attribute system respectively through the intermediate transfer area.
[0075] Specifically, to ensure timely updates to field data in the product attribute system and product search system, pre-configured update priorities are set for different search fields. Different pre-configured update priorities correspond to different update frequency cycles. For example: real-time updates, updates every 3 days, or updates every month.
[0076] After determining that the field data under the current search field needs to be updated, the intermediate transfer area corresponding to the field data to be updated under 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 identifier under the current search field through the intermediate transfer area.
[0077] Since the update cycles of different intermediate transfer areas are different, during the synchronization of 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 area. This ensures that the field data to be updated in each intermediate transfer 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, and the intermediate transfer area includes a first transfer area or a second transfer area. The first priority corresponds to the first transfer area, and the second priority corresponds to the second transfer area. 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 this disclosure, to ensure that the second field data of each product identifier in the product attribute system under multiple search fields is consistent with the first field data of each product identifier in the product search system under multiple search fields, it can be achieved by means of... Figure 3 The field update device shown synchronizes field data. This device includes multiple batch processing modules, a first-stream database, a transfer module, a field database, a first transfer area, a second transfer area, and a distributed lock. Different batch processing modules perform streaming data transformation on the field data to be updated corresponding to different search fields. The first-stream database manages the transformed data and stores and queries it through the transfer module. The field database stores the field data to be updated for multiple product identifiers under multiple search fields. The first transfer area stores the field data to be updated corresponding to search fields with a preset update priority of first priority. The second transfer area stores the field data to be updated corresponding to search fields with a preset update priority of second priority. The distributed lock is used to simultaneously lock the product attribute system and the product search system when updating data, preventing interference from other threads. The product search system includes a search engine system and a vector engine system. The search engine system performs direct searches based on keywords corresponding to the search fields. The vector engine system performs associative searches based on keywords corresponding to the search fields.
[0080] By synchronizing field data through the field update 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 updated uniformly and remain consistent at all times. This establishes a data pathway between unified multi-source data and multi-product systems, thereby effectively solving the problem of discrepancies between search results and product search requests.
[0081] In some optional implementation scenarios, to enable the field update device to autonomously synchronize and update field data, a mapping relationship between the field update device and each target data source and each product system is pre-established in the background, including:
[0082] First, register the target data source information in the backend interface. For example... Figure 4 As shown, a mapping relationship between the field update device and various target data sources can be established through table registration. If the target data source is Kafka (an open-source distributed stream processing platform), the topic name should be entered when filling in the table name, allowing the data parser to be configured according to the actual data format within the corresponding data source. For example, if the data format is JSON, then JsonParser should be configured. When configuring the data source field type: if it is JSON data, a data sample is provided for the product system to automatically deduce the field names and types, allowing manual correction of the deduced types; if it is PB data format, simply upload the PB file. The same field can exist in multiple data sources, but a field registered in the data format can only exist in one virtual table. The product system can only read actual data when the table status is active; otherwise, reading will stop.
[0083] Secondly, register the system information for the product attribute system, search engine system, and vector engine system separately. Different system attributes are configured for different product systems. For example... Figure 5 As shown, when configuring each product system, it is necessary to configure all field names and field types corresponding to each product system to ensure that the field data of each product identifier under different search fields can be updated uniformly and remain consistent. The device will only write data to the product system when the product system is active; otherwise, it will stop writing.
[0084] Finally, configure the field mapping relationships. For example... Figure 6 As shown, create a new mapping relationship on the field mapping page, select a field in the data source table, configure a preset update priority for it, and simultaneously configure it in the aforementioned three product systems to ensure that the three product systems are bound together. When this mapping relationship is active, it will normally write to the three product systems simultaneously; when it is stopped, it will stop writing to all three systems simultaneously, ensuring online data consistency.
[0085] In some alternative implementation scenarios, during data updates, when the target data source is Hive, the field update device will launch a batch streaming module when a new partition is created in the corresponding Hive table. This module, implemented by the Spark framework, first reads the entire Hive table content and then writes it to the Kafka streaming database via the Kafka client interface.
[0086] For each Kafka streaming database, a dedicated Kafka-to-TBase transfer module is used for field updates. This module runs continuously, writing field data from Kafka to the TBase wide table database in real time. Implemented by Flink, this transfer module obtains the complete binary information by subscribing to Kafka messages. Using the data source field parser and field enumeration information in the controller, the actual data for each field is parsed out. Unknown fields are discarded, and then the data is written to TBase in real time using the TBase client. When writing to TBase, each column name follows the format "data source table_data source field name". This format clearly identifies the source table from which the field originates and allows for rapid support when field names change, without requiring old data cleanup.
[0087] By configuring priorities in the field mapping, the controller will configure corresponding message change receivers for each search field in 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.
[0088] For each message change receiver (KAFKA), the field update mechanism is accompanied by a value search field transfer module, which runs continuously. This transfer module, implemented in Flink, obtains one or more field data to be updated by subscribing to Kafka messages. The controller distributes field mapping relationships, and the transfer module, based on these relationships, simultaneously distributes the search field values to multiple product systems. To ensure simultaneous updates across multiple systems, this module uses ZooKeeper as a distributed lock, ensuring that the same product across the three product systems is only synchronously updated through one transfer module. The distributed lock is released only after all three product systems have completed their updates, allowing other modules to acquire the lock for that product and continue updating 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 product search system obtains user-inputted product search requests from the front-end product platform. This request is then sent to the back-end server, which determines the search field and its corresponding data range. For example, if the search field and corresponding data range are products from a brand with a price greater than 50, the system sends these requests to both the search engine system and the vector engine system to identify the target product identifier. After obtaining the target product identifier, the system sends it to the server. The server then sends the target product identifier to the product attribute system to retrieve the corresponding product attribute information, resulting in the target product name and the second field data (the corresponding product price) under the search field. Finally, the target product identifier, target product name, and corresponding product price are sent as search results to the product platform in response to the product search request.
[0091] This embodiment also provides a product search device for implementing the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that performs a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0092] This embodiment provides a product search device, such as... Figure 8 As shown, it includes:
[0093] The identification module 801 is used to determine the field to be searched and the corresponding field data range based on the received product search request;
[0094] The first search module 802 is used to determine the target product identifier whose first field data is within the field data range based on the first field data of multiple product identifiers under the search field in the preset product 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 search field through the preset product attribute system. The second field data is the same as the first field data and both come from the same preset field database. The field database includes 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 a response to the product search request as a search result.
[0097] In some alternative implementations, the apparatus for synchronizing field data in a field database includes:
[0098] The acquisition module is used to acquire the data of fields to be updated for the current product identifier under multiple search fields;
[0099] The synchronization module is used to lock the product attribute system and the product search system through a pre-set distributed lock. During the locking process, the field data to be updated is written to the product search system and the product attribute system respectively to update the field data of the current product identifier under multiple search fields.
[0100] The control module is used to release the distributed lock when the data to be updated in the field is written.
[0101] In some alternative implementations, the synchronization module includes:
[0102] The first processing unit is used to determine the intermediate transfer 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.
[0103] The locking unit is used to lock the product attribute system and the product search system according to the update cycle of the intermediate transfer area. During the locking process, the data of the field to be updated of the current search field is written into the product search system and the product attribute system respectively through the intermediate transfer area.
[0104] In some optional implementations, the preset update priority includes a first priority or a second priority, and the intermediate transfer area includes a first transfer area or a second transfer area. The first priority corresponds to the first transfer area, and the second priority corresponds to the second transfer area. 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] The second processing unit is used to respond to the received data update task and determine the target data source corresponding to the data update task.
[0107] The third processing unit is used to obtain the data of fields to be updated for the current product identifier under 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] The first execution unit is used to obtain the first data update file from the batch task data source. The first data update file includes multiple sub-data update files corresponding to multiple search fields.
[0110] The second execution unit is used to perform stream data conversion on each sub-data update file in parallel processing to obtain the 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 field data to be updated for the current product identifier under multiple search fields based on the field data to be updated corresponding to at least one product identifier under each search field.
[0112] In some optional implementations, if the target data source is a streaming task data source, the third processing unit includes:
[0113] The fourth execution unit is used to continuously obtain multiple second data update files from the streaming task data source, with different second data update files corresponding 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 identifier under the corresponding search field.
[0115] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.
[0116] In this embodiment, the product search device is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0117] This disclosure also provides a computer device having the above-described features. Figure 8 The product search device shown.
[0118] Please see Figure 9 , Figure 9 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of this disclosure, such as... Figure 9As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 9 Take a processor 10 as an example.
[0119] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GDA), or any combination thereof.
[0120] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.
[0121] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0122] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or 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, memory 20, input device 30, and output device 40 can be connected via a bus or other means. Figure 9 Taking the example of a connection between China and Israel via a bus.
[0124] Input device 30 can receive input numerical or character information, and generate key signal inputs related to user settings and function control of the computer device, such as a touchscreen, keypad, mouse, trackpad, touchpad, joystick, one or more mouse buttons, trackball, joystick, etc. Output device 40 may include display devices, auxiliary lighting devices (e.g., LEDs), and haptic feedback devices (e.g., vibration motors). The aforementioned display devices include, but are not limited to, liquid crystal displays, light-emitting diodes, displays, and plasma displays. In some alternative embodiments, the display device may be a touchscreen.
[0125] This disclosure also provides a computer-readable storage medium in which the methods described in this disclosure can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium after being downloaded over a network. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium may be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium may also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.
[0126] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0127] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose, based on the prompt message, whether to provide personal information to the computer device, application program, server, or storage medium, or other software or hardware performing the operations of this disclosed technical solution.
[0128] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the computer device.
[0129] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0130] A portion of this invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can invoke or provide the methods and / or technical solutions according to the invention through the operation of the computer. Those skilled in the art will understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executing the instructions, or the computer compiling the instructions and then executing the corresponding compiled program, or the computer reading and executing the instructions, or the computer reading and installing the instructions and then executing the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to a computer.
[0131] Although embodiments of the present disclosure have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present disclosure, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A commodity search method characterized by comprising: The method comprises: According to the received commodity search request, determine the search field and the corresponding field data range; According to the first field data of a plurality of commodity identifiers under the search field in the preset commodity search system, determine the target commodity identifier whose first field data is within the field data range; Through the preset commodity attribute system, obtain the target commodity name corresponding to the target commodity identifier and the second field data under the search field, the second field data and the first field data are the same, and are derived from the same preset field database, the field database includes the field data of the plurality of commodity identifiers under the plurality of search fields; Send 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, The method for synchronizing field data of the field database comprises: Obtain the to-be-updated field data of the current commodity identifier under the plurality of search fields; Lock the commodity attribute system and the commodity search system through the 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, to update the field data of the current commodity identifier under the plurality of search fields; In response to the writing of the to-be-updated field data being completed, release the distributed lock.
3. The method of claim 2, wherein, The locking of the commodity attribute system and the commodity search system comprises: According to the preset update priority of the current search field, determine the intermediate storage area corresponding to the to-be-updated field data of the current search field; According to the update period of the intermediate storage area, lock the commodity attribute system and the commodity search system, 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.
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 the first update period frequency of the first storage area is lower than the second update period frequency of the second storage area.
5. The method of claim 2, wherein, The obtaining of the to-be-updated field data of the current commodity identifier under the plurality of search fields comprises: In response to the received data update task, determine the target data source corresponding to the data update task; Obtain 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, obtaining the to-be-updated field data of the current commodity identifier under the plurality of search fields from the target data source comprises: Obtain a first data update file from the batch task data source, the first data update file includes a plurality of search field corresponding sub-data update files; Through parallel processing, perform stream data conversion on each sub-data update file respectively to obtain the to-be-updated field data corresponding to at least one commodity identifier under the corresponding search field; According to the to-be-updated field data corresponding to at least one commodity identifier under each search field, the to-be-updated field data of the current commodity identifier under the plurality of search fields is determined.
7. The method of claim 5, wherein, If the target data source is a stream task data source, the to-be-updated field data of the current commodity identifier under the plurality of search fields is extracted from a data update file, including: 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 file to obtain the to-be-updated field data corresponding to at least one commodity identifier under the corresponding search field.
8. A commodity search device characterized by comprising: The device comprises: An identification module configured to determine a to-be-searched field and a corresponding field data range according to a received commodity search request; A first search module configured to determine a target commodity 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 commodity identifiers under the to-be-searched field in a preset commodity search system; A second search module configured to obtain a target commodity name corresponding to the target commodity identifier and second field data under the to-be-searched field 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 the plurality of commodity identifiers under a plurality of search fields; A sending module configured to send the target commodity identifier, the target commodity name, and the second field data as a search result to respond to the commodity search request.
9. A computer device, comprising: Comprising: A memory and a processor, which are communicatively connected, the memory stores computer instructions, and the processor executes the computer instructions to perform the commodity search method of any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer instructions, which are used to make the computer execute the commodity search method of any one of claims 1 to 7.
11. A computer program product, characterised in that, The computer instructions are used to make the computer execute the commodity search method of 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