A commodity feature processing method and device, computer equipment and storage medium

CN116843913BActive Publication Date: 2026-10-20BEIJING YOUZHUJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310827173.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-06
Publication Date
2026-10-20
Estimated Expiration
2043-07-06

AI Technical Summary

Technical Problem

[0004]有鉴于此,本发明实施例提供了一种商品特征的处理方法、装置、计算机设备及存储介质,以解决无法灵活高效的完成商品特征处理的问题

Benefits of technology

[0017]本申请实施例提供的方法利用目标参数自动从算子关系结构中匹配起始算子,起始算子可以基于算子关系结构中的传递方向,自动推导出中间算子以及终止算子,利用中间算子以及终止算子进行特征计算。相比现有技术更具有灵活性,有效提高了商品特征的处理效率,同时也兼顾了特征数据的一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116843913B_ABST
    Figure CN116843913B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a commodity feature processing method and device, computer equipment and a storage medium, comprising: obtaining a commodity feature calculation task; obtaining a starting operator matching a target parameter from a pre-generated operator relationship structure; taking the target parameter as input data of the operator relationship structure, performing feature calculation on the target parameter through the starting operator to obtain initial feature data, performing feature calculation on the initial feature data through an intermediate operator to obtain intermediate feature data, and performing processing on the intermediate feature data through a terminal operator to obtain final feature data; and constructing a feature data sequence of a target commodity based on the initial feature data, the intermediate feature data and the final feature data. The method provided in the present application is more flexible than the prior art, effectively improves the processing efficiency of commodity features, and also takes into account the consistency of feature data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of feature processing, and more specifically to a method, apparatus, computer equipment, and storage medium for processing product features. Background Technology

[0002] Current product feature processing involves extracting basic product attributes by calling the product basic information service, and then performing feature inference quickly and effectively based on basic product attributes such as text and images to obtain high-quality single-modal features. At the same time, it can combine multiple heterogeneous modal data of products for collaborative inference to obtain multimodal features, and supports integrated feature production and storage.

[0003] However, currently, the feature processing process involves manually arranging the operators before performing feature processing. This process is time-consuming and cumbersome, making it impossible to flexibly and efficiently process product features. Summary of the Invention

[0004] In view of this, embodiments of the present invention provide a method, apparatus, computer equipment, and storage medium for processing commodity features, in order to solve the problem of not being able to flexibly and efficiently complete the processing of commodity features.

[0005] In a first aspect, embodiments of the present invention provide a method for processing product features, the method comprising:

[0006] Obtain a product feature calculation task, wherein the product feature calculation task includes a target product and target parameters corresponding to the target product for performing product feature calculation;

[0007] Obtain a starting operator that matches the target parameter from a pre-generated operator relation structure, wherein the operator relation structure includes multiple operators and the transmission direction between different operators, and the transmission direction is determined according to the operator input and operator output of the operator;

[0008] The target parameter is used as input data of the operator relation structure. The target parameter is used to perform feature calculation through the starting operator to obtain initial feature data. The initial feature data is used to perform feature calculation through intermediate operators to obtain intermediate feature data. The process continues until the terminating operator processes the intermediate feature data to obtain the final feature data. The intermediate operators include operators in the operator relation structure other than the terminating operator and the starting operator.

[0009] The feature data sequence of the target product is constructed based on the initial feature data, intermediate feature data, and final feature data.

[0010] Secondly, embodiments of the present invention provide a processing apparatus for commodity features, the apparatus comprising:

[0011] The acquisition module is used to acquire a product feature calculation task, wherein the product feature calculation task includes a target product and target parameters corresponding to the target product for performing product feature calculation;

[0012] A query module is used to obtain a starting operator that matches the target parameter from a pre-generated operator relation structure, wherein the operator relation structure includes multiple operators and the transmission direction between different operators, and the transmission direction is determined according to the operator input and operator output of the operator;

[0013] The processing module is used to take the target parameter as input data of the operator relation structure, perform feature calculation on the target parameter through the starting operator to obtain initial feature data, perform feature calculation on the initial feature data through intermediate operators to obtain intermediate feature data, and so on until the terminating operator processes the intermediate feature data to obtain final feature data. The intermediate operators include operators in the operator relation structure other than the terminating operator and the starting operator.

[0014] The generation module is used to construct a feature data sequence of the target product based on the initial feature data, intermediate feature data, and final feature data.

[0015] Thirdly, embodiments of the present invention provide a computer device, including: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to perform the method described in the first aspect or any corresponding embodiment thereof.

[0016] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing computer instructions that cause a computer to perform the method described in the first aspect or any of its corresponding embodiments.

[0017] The method provided in this application automatically matches a starting operator from the operator relation structure using target parameters. The starting operator can automatically derive intermediate and termination operators based on the propagation direction in the operator relation structure, and feature calculation is performed using these intermediate and termination operators. Compared to existing technologies, this method is more flexible, effectively improves the processing efficiency of product features, and also ensures the consistency of feature data. Attached Figure Description

[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in 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 the present invention. 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 method for processing product features according to some embodiments of the present invention;

[0020] Figure 2 This is a schematic diagram of the operator structure relationship according to some embodiments of the present invention;

[0021] Figure 3 This is a flowchart illustrating a method for processing product features according to some embodiments of the present invention;

[0022] Figure 4 This is a schematic diagram of the operator structure relationship according to some embodiments of the present invention;

[0023] Figure 5 This is a structural block diagram of a processing apparatus for commodity features according to an embodiment of the present invention;

[0024] Figure 6 This is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0026] According to embodiments of the present invention, a method, apparatus, computer device, and storage medium for processing product features are provided. It should be noted that the steps shown in the flowcharts 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 flowcharts, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] This embodiment provides a method for processing product features, which can be used in the aforementioned mobile terminals, such as mobile phones and tablet computers. Figure 1 This is a flowchart of a method for processing product features according to an embodiment of the present invention, such as... Figure 1As shown, the process includes the following steps:

[0028] Step S11: Obtain the product feature calculation task, wherein the product feature calculation task includes the target product and the target parameters corresponding to the target product for calculating product features.

[0029] In this embodiment, the product feature calculation task can be triggered according to the product update frequency or according to a pre-generated time period. The product feature calculation task retrieves the changed products and performs feature calculation on the changed basic information or product transaction data of the products, thereby quickly obtaining the feature data of the products after the changes.

[0030] Specifically, the task of obtaining product feature calculations includes the following steps A1-A5:

[0031] Step A1: Obtain the product change message queue, wherein the product change message queue carries the change time and change basic information of at least one first candidate product.

[0032] In this embodiment, the server can monitor in real time whether the basic information of online products has changed. The basic information of products may include: product title, product attributes, product images, etc. When a change in the basic information of an online product is detected, the server reads the change time of the product's basic information and the changed basic information of the product, and selects the product as a candidate product. The server then sends the candidate product's product ID, change time, and changed basic information to the product message change queue.

[0033] As an example, the product message change queue includes the following messages:

[0034] Message 1: Candidate Product ID1 - Change time T1, change basic information M1.

[0035] Message 2: Candidate Product ID2 - Change time T2, change basic information M2.

[0036] Message 3: Candidate Product ID2 - Change time T3, change basic information M3.

[0037] Step A2: Obtain the product data table, wherein the product data table includes product transaction data of at least one second candidate product within a unit of time.

[0038] In this embodiment of the application, the server can monitor the online product transaction data in real time. The product transaction data may include: number of views, number of transactions, number of favorites, etc. The server can use the product transaction data to update the product transaction data of the product in the product data table per unit time in real time.

[0039] As an example, the product data table contains the following data:

[0040] Product 1: Day 1 - Page views x11, Sales y11, Favorites z11; Day 2 - Page views x12, Sales y12, Favorites z12...

[0041] Product 2: Day 2 - Pageviews x21, Sales y21, Favorites z21; Day 2 - Pageviews x22, Sales y22, Favorites z22...

[0042] Product 3: Day 3 - Page views x31, Sales y31, Favorites z32; Day 2 - Page views x32, Sales y32, Favorites z32...

[0043] Step A3: Determine the first candidate product in the product change message queue whose change time falls within a preset time period as the target product, or determine the second candidate product in the product data table whose unit time falls within a preset time period as the target product.

[0044] Step A4: Obtain the target parameters corresponding to the target product. The target parameters include: basic information to be changed, product transaction data, or preset feature fields.

[0045] In this embodiment, the target parameter is determined based on the characteristic requirements of the current product, or it can be preset. Specifically, if the current target product is determined based on the product change message queue, the target parameter can be the basic change information of the product. If the current target product is determined based on the product data table, the target parameter can be the product transaction data. If it is necessary to process one or more product features, feature fields can be preset, such as tag features, image features, etc.

[0046] Step A5: Generate a product feature calculation task based on the target product and target parameters.

[0047] In this embodiment of the application, after determining the target product and target parameters, a product feature calculation task Q1 with a preset time period can be generated, and the product feature calculation task can be added to the task queue. The status of the product feature calculation task can be updated to the execution status. The task queue includes: the product feature calculation task corresponding to each time period and the corresponding task processing result.

[0048] Step S12: Obtain the starting operator that matches the target parameter from the pre-generated operator relation structure. The operator relation structure includes multiple operators and the transmission direction between different operators. The transmission direction is determined based on the operator input and operator output of the operator.

[0049] In this embodiment of the application, the process of constructing the operator relation structure includes the following steps B1-B3:

[0050] Step B1: Obtain the interface description files for each operator.

[0051] In this embodiment, the operator's interface definition language (IDL) file can be pre-configured and stored in ZooKeeper. Therefore, when building the operator relationship structure, the operator's IDL file can be directly retrieved from ZooKeeper. It should be noted that configuring the operator's IDL file facilitates the rapid integration of heterogeneous operators in the future.

[0052] Step B2: Use the interface description file to access the operator and obtain the operator configuration information corresponding to the operator. The operator configuration information includes the operator input and the operator output.

[0053] In this embodiment, after pulling the operator's interface description file from ZooKeeper, the operator is connected using the interface description file, and the operator configuration information of the currently connected operators is obtained. The configuration information is as follows:

[0054] Operator 1:

[0055] service:kitex.test.server1

[0056] input:

[0057] ab:f1

[0058] output:

[0059] f2:cd

[0060] f3:e

[0061] Operator 2:

[0062] service:kitex.test.server2

[0063] input:

[0064] g:f2

[0065] output:

[0066] f4:h

[0067] f5:j

[0068] The operator configuration information specifies the inputs and outputs of each operator. For example, the operator input for operator 1 is ab:f1, and the operator outputs for operator 1 are f2:cd, f3:e. The operator input for operator 2 is g:f2, and the operator outputs for operator 2 are f4:h, f5:j.

[0069] Step B3: Determine the transmission direction between each operator based on the operator input and operator output carried by the configuration information, and construct the operator relationship structure based on each operator and the transmission direction between operators.

[0070] In this embodiment, the propagation direction of each operator's time is determined based on the operator inputs and outputs configured in the configuration information. For example, if the operator output of operator 1 is f2:cd, f3:e, and the operator input of operator 2 is g:f2, then the operator output of operator 1 is determined to be the operator input of operator 2, and the propagation direction is operator 1 → operator 2. Finally, an operator relationship structure is constructed based on each operator and the propagation direction between operators. The operator relationship structure in this embodiment can be a directed acyclic graph (DAG).

[0071] Additionally, ZooKeeper can be used to monitor whether the interface description file has changed. If it has changed, the operator relationship structure can be updated according to the updated interface description file.

[0072] The method provided in this application embodiment enables the rapid access of various operators by pre-configuring the interface description files of operators. After the operators are accessed, the transmission direction between operators is determined by using the operator inputs and outputs of each operator configured in the operator configuration information. This achieves automatic construction of the operator relationship structure without the need for manual arrangement of the relationships between operators, thus improving the efficiency of feature calculation.

[0073] In this embodiment, obtaining a starting operator matching the target parameter from a pre-generated operator relation structure includes: traversing the operator inputs of each operator in the operator relation structure, and determining the operator whose operator input matches the target parameter as the starting operator. Alternatively, traversing the operator outputs of each operator in the operator relation structure, determining the operator whose operator output matches the target parameter as the reference operator, and determining the operator associated with the operator output of the reference operator in the operator relation structure as the starting operator.

[0074] As an example, when the target parameter is the basic information of the target product (product title, product attributes, etc.), such as Figure 2 As shown, operator 1, which matches the product title, or operator 2, which matches the product attribute, can be obtained from the operator relation structure. Finally, operator 1 and operator 2 are determined as the initial operators.

[0075] Alternatively, when the target parameter is a preset feature field of the target product (title feature, attribute feature, etc.), such as Figure 2 As shown, operator 1, which matches the title feature, or operator 2, which matches the attribute feature, can be obtained from the operator relation structure. Operator 1 and operator 2 are then determined as the baseline operators. The output of operator 1 becomes the input of operator 3, which is then used as the initial operator. Simultaneously, the output of operator 2 becomes the input of operator 4, which is then used as the initial operator.

[0076] It should be noted that by flexibly configuring the target parameters, on the one hand, the target parameters can be matched with the operator input, enabling automatic matching of the starting operator in scenarios where basic information changes. On the other hand, the target parameters can be matched with the operator output, enabling automatic matching of the starting operator in scenarios with preset feature fields. Subsequently, simply inputting the target parameters into the starting operator allows the starting operator to process based on the target parameters. Simultaneously, the starting operator can automatically derive intermediate and terminal operators based on the propagation direction in the operator relation structure. During the derivation process, the intermediate and terminal operators sequentially calculate the feature data. Based on this, the operator automatically derives the operator according to the propagation relationship of the operator relation structure, and performs feature calculations through the operator, thereby improving the consistency of feature data.

[0077] Step S13: The target parameter is used as the input data of the operator relation structure. The initial feature data is obtained by performing feature calculation on the target parameter through the starting operator. The intermediate feature data is obtained by performing feature calculation on the initial feature data through the intermediate operator. The process continues until the terminating operator processes the intermediate feature data to obtain the final feature data. The intermediate operators include all operators in the operator relation structure except for the terminating operator and the starting operator.

[0078] In this embodiment, the target parameter is used as input data to the operator relation structure, that is, the target parameter is used as the operator input to the starting operator. The starting operator is called to perform feature calculation on the target parameter, thereby obtaining initial feature data. Feature calculation can be feature computation, for example: the target parameter is the product title, which can be understood as the title field. The starting operator can be to identify the product title and obtain the text features corresponding to the product title (i.e., the initial feature data).

[0079] After obtaining the initial feature data, the starting operator determines the direction of its output transmission based on the operator relation structure, thereby determining the intermediate operators and passing the initial feature data to the first intermediate operator. The first intermediate operator processes the initial feature data to obtain the first intermediate feature data. For example, when the initial feature data is text features, the first intermediate operator performs word segmentation on the text features to obtain text word segmentation features (i.e., the first intermediate feature data).

[0080] After obtaining the first intermediate feature data, the first intermediate operator determines the direction of its output based on the operator relation structure, thereby determining the next operator. If the next operator is not a terminating operator, the first intermediate feature data is passed to the second intermediate operator (i.e., the next operator of the first intermediate operator). The second intermediate operator processes the first intermediate feature data to obtain the second intermediate feature data.

[0081] After obtaining the second intermediate feature data, the second intermediate operator determines the direction of its output based on the operator relation structure, thereby determining the next operator. If the next operator is a terminating operator, the second intermediate feature data is passed to the terminating operator (i.e., the next operator of the second intermediate operator). The terminating operator processes the second intermediate feature data to obtain the final feature data.

[0082] Step S14: Construct a feature data sequence for the target product based on the initial feature data, intermediate feature data, and final feature data.

[0083] As an example, let's illustrate this with changes to the title and image of the target product, such as... Figure 3 As shown, firstly, the modified product title and product image are obtained. Secondly, the operator whose input matches the product title and image is obtained from the operator relation structure; this is operator 1 (the initial operator). At this point, the modified product title is used as the input to operator 1. Operator 1 performs category prediction on the modified product title to obtain the predicted category features. These predicted category features can be food category IDs (identifiers), clothing category IDs (identifiers), etc. Then, from... Figure 3 The operator relation structure shown determines which operator's input operator is used for operator 1, thus determining the next operator of operator 1—operator 2 (intermediate operator). The predicted category and product image are used as input to operator 2 to obtain the image features of the product image. Furthermore, based on the operator relation structure, the next operator of operator 2—operator 3 (terminating operator)—is determined. Operator 3 uses model inference on the predicted category and image features to obtain multimodal vector features. These multimodal vector features can be: product tag features, product description features, etc. Finally, the predicted category (initial feature data), the image features of the product image (intermediate feature data), and the multimodal features (final feature data) are combined into a feature data sequence.

[0084] The method provided in this application automatically matches a starting operator from the operator relation structure using target parameters. The starting operator can automatically derive intermediate and termination operators based on the propagation direction in the operator relation structure, and feature calculation is performed using these intermediate and termination operators. Compared to existing technologies, this method is more flexible, effectively improves the processing efficiency of product features, and also ensures the consistency of feature data.

[0085] Figure 3 This is a flowchart of a method for processing product features according to an embodiment of the present invention, such as... Figure 3 As shown, the process includes the following steps:

[0086] Step S21: Obtain the product feature calculation task, wherein the product feature calculation task includes the target product and the target parameters corresponding to the target product for calculating product features. For detailed explanation, please refer to the relevant descriptions in the above embodiments, which will not be repeated here.

[0087] Step S22: Obtain the starting operator that matches the target parameter from the pre-generated operator relation structure. The operator relation structure includes multiple operators and the transmission direction between different operators. The transmission direction is determined based on the operator input and operator output. For detailed explanation, please refer to the relevant descriptions in the above embodiments; they will not be repeated here.

[0088] Step S23: The target parameter is used as the input data of the operator relation structure. The initial feature data is obtained by performing feature calculation on the target parameter through the starting operator. The intermediate feature data is obtained by performing feature calculation on the initial feature data through the intermediate operator. The process continues until the terminating operator processes the intermediate feature data to obtain the final feature data. The intermediate operators include all operators in the operator relation structure except for the terminating operator and the starting operator.

[0089] In this embodiment of the application, the initial feature data is obtained by performing feature calculation on the target parameters through the starting operator, including the following steps C1-C3:

[0090] Step C1: Obtain cache configuration information, which includes the operator identifier and calculation result corresponding to each operator. The calculation result is obtained by pre-calculating the features of the operator.

[0091] In this embodiment, to reduce the feature transfer time between operators during feature calculation, cache configuration information is added. Any subsequent operator can query the cache configuration information before performing feature calculation. If the cache configuration information contains the calculation result of that operator, then that operator does not need to perform further calculation and can directly pass the calculation result from the cache configuration information to the next operator. This solves the problem of redundant operator calculations and reduces the feature transfer time between operators by improving the computational efficiency of individual operators.

[0092] In this embodiment, the operator identifier and calculation result in the cache configuration information are stored in key-value pairs. The operator identifier is the key, and the calculation result is the value. The hash value is obtained by concatenating the cache configuration string corresponding to the operator and using the Message-Digest Algorithm (MD5). This hash value is then used as the operator identifier (i.e., the key of the cache configuration information).

[0093] In this embodiment of the application, the operator cache key configuration format is: input1, input2, input3[*], version, where input1 is the operator identifier corresponding to operator 1, input2 is the operator identifier corresponding to operator 2, and input3 is the operator identifier corresponding to operator 3. [*] is used to mark whether the operator identifier needs to be broken down as the cache key, and version represents the current version number. When the operator iterates, the cache can be refreshed, and the version number will also change at this time.

[0094] It should be noted that when a product contains multiple images, the operator that takes images as input will perform feature calculations on each image corresponding to that product, and then combine the calculated features of each image into a list. <any>The structures are combined and stored as a complete feature. Therefore, when storing the image features of a product, the operator identifier of the operator is broken down and used as the cache key. When the product image changes, the image features of the unchanged image can be directly retrieved through the cache key. At the same time, the changed image is calculated to obtain new image features. Finally, the new image features and the image features of the unchanged image are linked together through a list. <any>The structure combines new, complete features.

[0095] Step C2: Query the cache configuration information to see if there is a first operator identifier corresponding to the starting operator.

[0096] Step C3: If the first operator identifier exists in the cache configuration information, obtain the calculation result corresponding to the first operator identifier from the cache configuration information, and use the calculation result corresponding to the first operator identifier as the initial feature data.

[0097] In this embodiment of the application, after determining the cache configuration information, the cache configuration information is used to query whether there is a first operator identifier corresponding to the starting operator. If it exists, the starting operator does not need to calculate the target parameter. Instead, it directly obtains the corresponding calculation result from the cache configuration and uses the calculation result as the initial feature data. Then, the initial feature data is passed to the intermediate operator according to the transmission direction in the operator relationship structure.

[0098] In this embodiment of the application, the method further includes: if the first operator identifier does not exist in the cache configuration information, calling the start operator to calculate the target parameters to obtain initial feature data, and storing the initial feature data as the calculation result of the first operator identifier in the cache configuration information.

[0099] It should be noted that if the first operator identifier is not present in the cache configuration information, it means that no feature calculations have been performed before the starting operator. In this case, the starting operator is called again to calculate the target parameters, obtain the initial feature data, and store the initial feature data as the calculation result of the first operator identifier in the cache configuration information. This allows subsequent operators to directly retrieve the corresponding calculation results from the cache configuration information.

[0100] In this embodiment of the application, intermediate feature data is obtained by performing feature calculations on the initial feature data through intermediate operators, until the final feature data is obtained by processing the intermediate feature data through a termination operator, including the following steps D1-D4:

[0101] Step D1: Identify at least one operator in the operator relation structure that is associated with the operator output of the starting operator as an intermediate operator, and use the initial feature data as the operator input of the intermediate operator.

[0102] Step D2: If the second operator identifier exists in the cache configuration information, obtain the calculation result corresponding to the second operator identifier from the cache configuration information, and use the calculation result corresponding to the second operator identifier as intermediate feature data, where the second operator identifier is the operator identifier corresponding to the target operator.

[0103] Step D3: Obtain the termination operator associated with the intermediate operator from the operator relation structure, and use the intermediate feature data as the operator input of the termination operator.

[0104] In this embodiment, an operator that is associated with the operator output of an intermediate operator and has no downstream operator is obtained from the operator relation structure, and this operator is determined as the termination operator. It should be noted that the absence of a downstream operator means that the operator output of this operator is not used as the operator input of other operators.

[0105] Step D4: If a third operator identifier exists in the cache configuration information, obtain the calculation result corresponding to the third operator identifier from the cache configuration information, and use the calculation result corresponding to the third operator identifier as the final feature data. Here, the third operator identifier is the operator identifier corresponding to the target operator.

[0106] As an example, such as Figure 4 As shown, operator 1 is the starting operator, and operator 1 transmits the initial feature data to operator 2 (intermediate operator) according to the transmission direction in the operator relation structure.

[0107] Operator 2 queries the cache configuration information. If the cache configuration information includes the operator identifier of operator 2 and the calculation result, operator 2 directly pulls the calculation result and uses the calculation result as the first intermediate feature data. Then, according to the transmission direction in the operator relation structure, the initial feature data is passed to operator 2 and then to operator 3 (intermediate operator).

[0108] Operator 3 queries the cache configuration information. If the cache configuration information includes the operator identifier of operator 3 and the calculation result, operator 3 directly pulls the calculation result and uses the calculation result as the second intermediate feature data. Then, according to the transmission direction in the operator relation structure, the initial feature data is passed to operator 3 and then to operator 4 (termination operator).

[0109] Operator 4 queries the cache configuration information. If the cache configuration information includes the operator identifier of operator 3 and the calculation result, operator 4 directly pulls the calculation result and uses the calculation result as the final feature data.

[0110] In this embodiment, if the intermediate operator's identifier is not present in the cache configuration information, the intermediate operator is invoked to calculate the initial feature data, obtaining intermediate feature data, and the intermediate feature data is stored in the cache configuration information as the calculation result of its operator identifier. Similarly, if the final operator's identifier is not present in the cache configuration information, the final operator is invoked to calculate the intermediate feature data, obtaining final feature data, and the final feature data is stored in the cache configuration information as the calculation result of its operator identifier. Based on this, by continuously updating the cache configuration information, the calculation efficiency of subsequent operators can be effectively improved.

[0111] Step S24: Construct a feature data sequence for the target product based on the initial feature data, intermediate feature data, and final feature data.

[0112] In this embodiment, after constructing a feature data sequence for the target product based on initial feature data, intermediate feature data, and final feature data, the feature data in the obtained feature data sequence can be sent to a message queue for distribution and storage by downstream services. The downstream service first reads the feature data from the message queue, queries the storage configuration file corresponding to the feature data for the required storage location (including forward and inverted indexes), and then performs serialization and storage. For example, when the feature data sequence includes feature data such as predicted category and predicted brand corresponding to the target product, the corresponding forward index is found by querying the storage configuration file, and the feature data is updated to that forward index. When the feature data sequence includes vector feature data corresponding to the target product, the corresponding inverted index is found by querying the storage configuration file, and the feature data is updated to that inverted index.

[0113] The method provided in this application embodiment can distribute the feature data in the feature data sequence after obtaining the feature data sequence, thereby performing forward and inverted index updates, realizing flexible storage of feature data and facilitating the improvement of the accuracy of subsequent product queries.

[0114] This embodiment also provides a product feature processing apparatus 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 apparatus described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.

[0115] This embodiment provides a device for processing product features, such as... Figure 5 As shown, it includes:

[0116] The acquisition module 51 is used to acquire the product feature calculation task, wherein the product feature calculation task includes the target product and the target parameters corresponding to the target product for performing product feature calculation;

[0117] The query module 52 is used to obtain the starting operator that matches the target parameter from the pre-generated operator relation structure. The operator relation structure includes multiple operators and the transmission direction between different operators. The transmission direction is determined according to the operator input and operator output of the operator.

[0118] Processing module 53 is used to take the target parameters as input data of the operator relation structure, perform feature calculation on the target parameters through the start operator to obtain initial feature data, perform feature calculation on the initial feature data through the intermediate operator to obtain intermediate feature data, and so on until the termination operator processes the intermediate feature data to obtain the final feature data. The intermediate operators include operators in the operator relation structure other than the termination operator and the start operator.

[0119] The generation module 54 is used to construct a feature data sequence of the target product based on the initial feature data, intermediate feature data and final feature data.

[0120] In this embodiment, the acquisition module 51 is used to acquire a product change message queue, wherein the product change message queue carries at least one first candidate product and basic change information of the first candidate product; acquire a product data table, wherein the product data table includes at least one second candidate product and product transaction data of the second candidate product within a unit time; determine the first candidate product in the product change message queue whose change time falls within a preset time period as the target product, or determine the second candidate product in the product data table whose unit time falls within a preset time period as the target product; acquire the target parameters corresponding to the target product, wherein the target parameters include: basic change information, product transaction data or preset feature fields; and generate a product feature calculation task based on the target product and the target parameters.

[0121] In this embodiment of the application, a product feature processing device further includes: a construction module, used to obtain interface description files of each operator; access the operator using the interface description files and obtain the operator configuration information corresponding to the operator, wherein the operator configuration information includes operator input and operator output; determine the transmission direction between each operator based on the operator input and operator output carried by the configuration information, and construct an operator relationship structure based on each operator and the transmission direction between operators.

[0122] In this embodiment of the application, the query module 52 is used to traverse the operator inputs of each operator in the operator relation structure, and determine the operator whose operator input matches the target parameter as the starting operator; or, traverse the operator outputs of each operator in the operator relation structure, determine the operator whose operator output matches the target parameter as the reference operator, and determine the operator in the operator relation structure associated with the operator output of the reference operator as the starting operator.

[0123] In this embodiment of the application, the processing module 53 is used to obtain cache configuration information, wherein the cache configuration information includes the operator identifier and calculation result corresponding to each operator, and the calculation result is obtained by the operator performing feature calculation in advance; querying the cache configuration information to see if there is a first operator identifier corresponding to the starting operator; if there is a first operator identifier in the cache configuration information, obtaining the calculation result corresponding to the first operator identifier from the cache configuration information, and using the calculation result corresponding to the first operator identifier as the initial feature data.

[0124] In this embodiment of the application, a product feature processing device further includes: a calling module, used to call a starting operator to calculate target parameters to obtain initial feature data when there is no first operator identifier in the cache configuration information, and store the initial feature data as the calculation result of the first operator identifier in the cache configuration information.

[0125] In this embodiment, the processing module 53 is configured to: determine at least one operator associated with the operator output of the starting operator in the operator relation structure as an intermediate operator, and use the initial feature data as the operator input of the intermediate operator; if a second operator identifier exists in the cache configuration information, obtain the calculation result corresponding to the second operator identifier from the cache configuration information, and use the calculation result corresponding to the second operator identifier as intermediate feature data, wherein the second operator identifier is the operator identifier corresponding to the target operator; obtain the termination operator associated with the intermediate operator from the operator relation structure, and use the intermediate feature data as the operator input of the termination operator; if a third operator identifier exists in the cache configuration information, obtain the calculation result corresponding to the third operator identifier from the cache configuration information, and use the calculation result corresponding to the third operator identifier as the final feature data, wherein the third operator identifier is the operator identifier corresponding to the target operator.

[0126] Please see Figure 6 , Figure 6 This is a schematic diagram of the structure of a computer device provided in an optional embodiment of the present invention, such as... Figure 6 As 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).

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

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

[0129] 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 as shown by a landing page for an app. 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, which can 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.

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

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

[0132] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0133] This invention also provides a computer-readable storage medium. The methods described above according to embodiments of the invention can be implemented in hardware or firmware, or implemented as computer code that can be recorded on a storage medium, or implemented as computer code downloaded via a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and then stored on a local storage medium. 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 can 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 can 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, which, when accessed and executed by the computer, processor, or hardware, implements the methods shown in the above embodiments.

[0134] Although embodiments of the invention 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 invention, and such modifications and variations all fall within the scope defined by the appended claims.< / any> < / any>

Claims

1. A method for processing product features, characterized in that, The method includes: Obtain a product feature calculation task, wherein the product feature calculation task includes a target product and target parameters corresponding to the target product for performing product feature calculation, the target parameters being determined according to the feature requirements of the target product or pre-set; The process involves obtaining a starting operator that matches the target parameter from a pre-generated operator relation structure. This operator relation structure includes multiple operators and a transmission direction between them, determined based on the operator inputs and outputs. The process includes: traversing the operator inputs of each operator in the operator relation structure and identifying the operator whose input matches the target parameter as the starting operator; or traversing the operator outputs of each operator in the operator relation structure and identifying the operator whose output matches the target parameter as a reference operator, and identifying the operator associated with the reference operator's output in the operator relation structure as the starting operator. The target parameter is used as input data of the operator relation structure. The target parameter is used to perform feature calculation through the starting operator to obtain initial feature data. The initial feature data is used to perform feature calculation through intermediate operators to obtain intermediate feature data. The process continues until the terminating operator processes the intermediate feature data to obtain the final feature data. The intermediate operators include operators in the operator relation structure other than the terminating operator and the starting operator. The feature data sequence of the target product is constructed based on the initial feature data, intermediate feature data, and final feature data.

2. The method according to claim 1, characterized in that, The task of obtaining product feature calculations includes: Obtain a product change message queue, wherein the product change message queue carries the change time and basic change information of at least one first candidate product; Obtain a product data table, wherein the product data table includes product transaction data of at least one second candidate product within a unit of time; The first candidate product whose change time falls within a preset time period in the product change message queue is determined as the target product, or the second candidate product whose unit time falls within the preset time period in the product data table is determined as the target product; Obtain the target parameters corresponding to the target product, wherein the target parameters include: basic information for modification, product transaction data, or preset feature fields; The product feature calculation task is generated based on the target product and the target parameters.

3. The method according to claim 1, characterized in that, Before obtaining the starting operator that matches the target parameter from the pre-generated operator relation structure, the method further includes: Obtain the interface description files for each operator; The operator is accessed using the interface description file, and the operator configuration information corresponding to the operator is obtained, wherein the operator configuration information includes operator input and operator output; The transmission direction between each operator is determined based on the operator input and operator output carried by the configuration information, and the operator relationship structure is constructed based on each operator and the transmission direction between the operators.

4. The method according to claim 1, characterized in that, The step of performing feature calculations on the target parameters using the starting operator to obtain initial feature data includes: Obtain cache configuration information, wherein the cache configuration information includes the operator identifier and calculation result corresponding to each operator, and the calculation result is obtained by the operator performing feature calculation in advance; Query the cache configuration information to see if there is a first operator identifier corresponding to the starting operator; If the first operator identifier exists in the cache configuration information, the calculation result corresponding to the first operator identifier is obtained from the cache configuration information, and the calculation result corresponding to the first operator identifier is used as the initial feature data.

5. The method according to claim 4, characterized in that, The method further includes: If the first operator identifier is not present in the cache configuration information, the starting operator is invoked to calculate the target parameter to obtain the initial feature data, and the initial feature data is stored in the cache configuration information as the calculation result of the first operator identifier.

6. The method according to claim 4, characterized in that, The process of performing feature calculations on the initial feature data using intermediate operators to obtain intermediate feature data, until a termination operator processes the intermediate feature data to obtain the final feature data, includes: At least one operator in the operator relation structure that is associated with the operator output of the starting operator is identified as the intermediate operator, and the initial feature data is used as the operator input of the intermediate operator; If a second operator identifier exists in the cache configuration information, the calculation result corresponding to the second operator identifier is obtained from the cache configuration information, and the calculation result corresponding to the second operator identifier is used as the intermediate feature data, wherein the second operator identifier is the operator identifier corresponding to the intermediate operator; The termination operator associated with the intermediate operator is obtained from the operator relation structure, and the intermediate feature data is used as the operator input of the termination operator; If a third operator identifier exists in the cache configuration information, the calculation result corresponding to the third operator identifier is obtained from the cache configuration information, and the calculation result corresponding to the third operator identifier is used as the final feature data, wherein the third operator identifier is the operator identifier corresponding to the termination operator.

7. A processing apparatus for commodity features, characterized in that, The device includes: The acquisition module is used to acquire a product feature calculation task, wherein the product feature calculation task includes a target product and target parameters corresponding to the target product for performing product feature calculation. The target parameters are determined according to the feature requirements of the target product or are preset. A query module is used to obtain a starting operator that matches the target parameter from a pre-generated operator relation structure. The operator relation structure includes multiple operators and transmission directions between different operators. The transmission directions are determined based on the operator inputs and outputs of the operators. Specifically, the query module is used to traverse the operator inputs of each operator in the operator relation structure and determine the operator whose input matches the target parameter as the starting operator; or, traverse the operator outputs of each operator in the operator relation structure and determine the operator whose output matches the target parameter as the reference operator, and determine the operator associated with the operator output of the reference operator in the operator relation structure as the starting operator. The processing module is used to take the target parameter as input data of the operator relation structure, perform feature calculation on the target parameter through the starting operator to obtain initial feature data, perform feature calculation on the initial feature data through intermediate operators to obtain intermediate feature data, and so on until the terminating operator processes the intermediate feature data to obtain final feature data. The intermediate operators include operators in the operator relation structure other than the terminating operator and the starting operator. The generation module is used to construct a feature data sequence of the target product based on the initial feature data, intermediate feature data, and final feature data.

8. A computer device, characterized in that, include: A memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, the processor executing the computer instructions to perform the method of any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing a computer to perform the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Object feature processing and information pushing method, device and equipment

    CN111382347A

  • Object data processing method and device, electronic equipment and storage medium

    CN115878637A