Method for acquiring object features and related device
By calculating the query identifier of object information and performing calculations and storage when feature data cannot be obtained, the problem of redundant calculation of object information is solved, thereby saving computing resources and improving efficiency.
Patent Information
- Application Number
- CN202411147333.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2026-01-02
- Estimated Expiration
- 2044-08-20
AI Technical Summary
Calculating the same information for different objects leads to a waste of computing resources, especially when calculating features multiple times, particularly for different store links of the same product, where there is duplication and redundancy in calculations.
The system calculates the query identifier corresponding to the object information using a preset algorithm, and performs the calculation when feature data cannot be obtained. It establishes an association between the query identifier and feature data, thereby reducing redundant calculations.
It saves a lot of computing resources, especially reducing the computational load on the graphics processor and improving the efficiency of feature calculation.
Smart Images

Figure CN119128225B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method and related equipment for acquiring object characteristics. Background Technology
[0002] In the field of computer technology, object characteristics can be used for the processing and analysis of object information. In related technologies, utilizing characteristics to perform processing and analysis can improve efficiency.
[0003] However, the inventors of this disclosure have discovered that different objects may have the same object information. If the same object information is subjected to multiple feature calculations due to the different objects, it is easy to waste computing resources. Summary of the Invention
[0004] This disclosure proposes a method and related equipment for acquiring object features to solve or partially solve the above-mentioned problems.
[0005] In a first aspect, this disclosure provides a method for obtaining object characteristics, comprising:
[0006] Get object information about an object;
[0007] According to a preset algorithm, a query identifier corresponding to the object information is calculated based on the object information; wherein, the object information and the query identifier are in one-to-one correspondence.
[0008] Obtain the feature data corresponding to the object information based on the query identifier;
[0009] In response to the inability to obtain the feature data corresponding to the object information based on the query identifier, the feature data of the object information is calculated, and the calculated feature data is associated with the query identifier and stored.
[0010] A second aspect of this disclosure provides an apparatus for acquiring object features, comprising:
[0011] The first acquisition module is configured to: acquire object information of an object;
[0012] The calculation module is configured to: calculate the query identifier corresponding to the object information based on the object information according to a preset algorithm; wherein the object information and the query identifier are in one-to-one correspondence.
[0013] The second acquisition module is configured to: acquire feature data corresponding to the object information based on the query identifier;
[0014] The calculation and storage module is configured to: in response to the inability to obtain the feature data corresponding to the object information based on the query identifier, calculate the feature data of the object information, associate the calculated feature data with the query identifier, and store it.
[0015] A third aspect of this disclosure provides a computer device including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs including instructions for performing the method according to the first aspect.
[0016] A fourth aspect of this disclosure provides a non-volatile computer-readable storage medium containing a computer program that, when executed by one or more processors, causes the processors to perform the method described in the first aspect.
[0017] A fifth aspect of this disclosure provides a computer program product including computer program instructions that, when executed on a computer, cause the computer to perform the method as described in the first aspect.
[0018] The method and related device for obtaining object features provided in this disclosure calculate the query identifier of object information according to a preset algorithm, and first obtain feature data based on the query identifier. When feature data cannot be obtained, feature data is calculated, which can save a lot of computing resources. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A schematic diagram of an exemplary system provided by an embodiment of this disclosure is shown.
[0021] Figure 2A A schematic diagram of another exemplary system provided by an embodiment of this disclosure is shown.
[0022] Figure 2B A schematic diagram of the details page of an exemplary object according to an embodiment of this disclosure is shown.
[0023] Figure 3 A flowchart illustrating an exemplary method provided in an embodiment of this disclosure is shown.
[0024] Figure 4A schematic diagram of an exemplary apparatus provided by an embodiment of the present disclosure is shown.
[0025] Figure 5 A schematic diagram of the hardware structure of an exemplary computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.
[0027] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0028] It is understood that before using the technical solutions of the various embodiments in this disclosure, users will be informed of the type, scope of use, and usage scenarios of the personal information involved in an appropriate manner, and user authorization will be obtained.
[0029] 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 software or hardware such as electronic devices, applications, servers, or storage media performing the operations of this disclosed technical solution.
[0030] As an optional but not limited 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 electronic device.
[0031] 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.
[0032] Figure 1 A schematic diagram of an exemplary system 100 provided in an embodiment of this disclosure is shown.
[0033] like Figure 1 As shown, system 100 may include terminal device 102, terminal device 104, server 106, and database server 108. A medium (e.g., a network) may be provided to provide a communication link between terminal device 102, terminal device 104, server 106, and database server 108. This network may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0034] For example, various applications (APPs) can be installed on the terminal device 104, such as life service applications, collaborative office applications, video conferencing applications, reading applications, video applications, social applications, payment applications, web browsers, and instant messaging tools.
[0035] The terminal devices 102 and 104 here can be hardware or software. When terminal devices 102 and 104 are hardware, they can be various electronic devices with displays, including but not limited to smartphones, tablets, e-book readers, MP3 players, laptops, and desktop computers (PCs). When terminal devices 102 and 104 are software, they can be installed in the electronic devices listed above. They can be implemented as multiple software programs or software modules (e.g., to provide distributed services) or as a single software program or software module. No specific limitations are made here.
[0036] Server 106 can be a server providing various services, such as a backend server supporting various applications displayed on terminal devices 102 and 104. Database server 108 can also be a database server providing various services. It is understood that if server 106 can implement the relevant functions of database server 108, database server 108 may not need to be set up in system 100.
[0037] The server 106 and database server 108 here can be either hardware or software. When they are hardware, they can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When they are software, they can be implemented as multiple software programs or software modules (e.g., used to provide distributed services), or as a single software program or software module. No specific limitations are made here.
[0038] It should be noted that the information generation method provided in this embodiment can be executed by terminal device 102 and / or terminal device 104. It should be understood that... Figure 1 The number of terminal devices, users, servers, and database servers shown is merely illustrative. Depending on implementation needs, there can be any number of terminal devices, users, servers, and database servers.
[0039] In some embodiments, the terminal device 104 may have a lifestyle service application or software installed, and the user 112 may use the application or software to obtain services related to clothing, food, housing and transportation, such as shopping.
[0040] As an example scenario, user 112 can use a lifestyle service application on terminal device 104 to shop, for example, by providing a product image to find similar products. For instance, terminal device 104 uploads the product image to server 106, which can calculate features based on the product image and then find products similar to the image through feature comparison.
[0041] Due to the large number of products, calculating the features of each product in real time and comparing them with the features of the product images would significantly increase the real-time computing load. In some embodiments, a feature library can be built for each product. For example, user 110 can use terminal device 102 to send a request to server 106 to create a feature library, so that server 106 can create the feature library based on the request and store the feature library in database server 108. This request may include a range of objects for creating the feature library, such as a certain type of object (e.g., footwear).
[0042] After creating a feature library, you can compare the features of product images with the features in the feature library to find similar products.
[0043] It is understandable that this method of creating feature libraries requires a significant amount of computing and storage resources.
[0044] The inventors of this disclosure discovered that, due to the large number of merchants on shopping platforms, the same product may be sold by multiple stores. Each product corresponds to a unique Product Identifier (PID) for each store's product sales link (or product sales page). In other words, substantially identical products (e.g., the same book) may correspond to multiple PIDs. Therefore, when creating a feature library using product features, to distinguish products from different stores, product features are typically calculated based on the product information corresponding to the PID (e.g., product sales link, product sales page, etc.), and then the feature library is created based on the calculated product features. Since the product information corresponding to different PIDs for the same product has a high degree of repetition (e.g., possibly using the same images and / or the same text descriptions, etc.), performing feature calculations separately for each PID's product information would result in significant computational duplication and redundancy, consuming unnecessary computational resources.
[0045] In view of this, embodiments of the present disclosure provide a method for obtaining object features to solve or partially solve the above-mentioned problems.
[0046] Figure 2A A schematic diagram of an exemplary system 200 provided in an embodiment of this disclosure is shown. The system 200 can be used to acquire and store object features. Optionally, the system 200 can be implemented as follows: Figure 1 Server-side 106, or, implemented as Figure 1 The server 106 and the database server 108.
[0047] In the initial state, it may be necessary to create a feature library for objects (e.g., goods) in order to process and analyze objects based on their features. As an optional implementation scenario, a feature library could be built for a certain type of object (e.g., dresses), and the object identifier (PID) of all objects under that type could be obtained. The server 106 can generate a feature calculation request for each object, which can carry the object identifier 2022 of that object.
[0048] like Figure 2A As shown, in some embodiments, the first service 202 can obtain the attribute information of the object based on the object identifier 2022. Optionally, the first service 202 can be a product packaging service, used to obtain the basic attribute information of the product based on the PID, such as the Uniform Resource Locator (URL) address of the image contained in the product sales page, the title of the product (e.g., "XX Fairy-like Resort Style Dress Autumn New Slimming"), the text in the product sales page (e.g., the product description text), etc.
[0049] After obtaining the attribute information of the object, the object information of the object can be obtained based on the attribute information.
[0050] Optionally, the text in the product sales page can be directly used as object information for calculating the text features of the object.
[0051] For the URL address of an image contained in the product sales page, the second service 204 can be used to request the image information corresponding to that URL address. Optionally, the second service 204 can be an image download service, and the image information can be the image's binary information.
[0052] After obtaining the object information (e.g., text, image information), the object information can be sent to the third service 206 for processing. Optionally, depending on the requirements, image information, text information, and / or multimodal data containing both image and text information can be provided to the third service 206 as object information to adapt to different scenario needs.
[0053] In some cases, the third service 206 can first determine the query identifier corresponding to the object information. This query identifier can be used to query existing features in the feature library. Optionally, for databases that use key-value pairs to implement data queries, the query identifier can be a key, and can be the primary key of the data.
[0054] In some embodiments, when the object information is image information used to describe the object, the query identifier corresponding to the object information can be calculated based on the image information according to a preset algorithm.
[0055] The preset algorithm can be any algorithm and can calculate a unique result based on image information, ensuring a one-to-one correspondence between the image information and the query identifier. Thus, when searching for feature data corresponding to the image information in the feature database based on the query identifier, the unique feature data corresponding to the image information can be found.
[0056] In some embodiments, the preset algorithm can be an encryption algorithm. In this way, a unique piece of information similar to a private key can be calculated based on the image information using a common encryption algorithm, which can be used as a query identifier. On the one hand, this ensures the uniqueness of the query identifier, and on the other hand, by using an existing encryption algorithm, there is no need to design the algorithm again, thus improving efficiency.
[0057] Optionally, the encryption algorithm can be, for example, the Message Digest Algorithm MD5, so that MD5 can be used to quickly calculate the query identifier, and the query identifiers obtained based on the MD5 algorithm all have the same length, which helps to ensure the consistency of the query identifier.
[0058] It is understood that in some embodiments, when the object information is text information or multimodal data used to describe the object, the aforementioned embodiments can also be used to calculate the query identifier, which will not be repeated here.
[0059] In some embodiments, the object includes a product, and the object information is text information describing the product (e.g., the product title, text information on the details page, etc.). The third service 206 can extract the product title corresponding to the product from the text information as the query identifier according to a preset algorithm. Optionally, the preset algorithm can identify the identifier corresponding to the product title in the text information, and then extract the product title from the text information based on the identifier as the query identifier.
[0060] Unlike using encryption algorithms to calculate the query identifier, using the extracted product title as the query identifier for the text features corresponding to the text information eliminates the calculation process, further saving computational resources. Furthermore, product titles are typically long and include brand names (e.g., "XX Brand Ethereal Vacation Style Long Dress, Autumn New Arrival, Slimming and Versatile"), usually possessing uniqueness and being relatively easy to obtain. In some cases, if the uniqueness of the product title cannot be guaranteed, other text information of the object obtained from the first service 202 can be added to the query identifier along with the product title as the query identifier.
[0061] For multimodal data, the query identifiers corresponding to the image information and text information can be concatenated together to form the query identifier corresponding to the multimodal data.
[0062] In this way, a one-to-one correspondence between object information and query identifier is established.
[0063] Next, the third service 206 can obtain the feature data corresponding to the object information based on the query identifier. For example, it can obtain the feature data corresponding to the object information from the feature library 212 based on the query identifier. Optionally, for a database that uses key-value pairs to implement data query, the value obtained based on the query identifier (key) can be the corresponding feature data.
[0064] It is understandable that, in the initial state, the feature library 212 may not contain any feature data. Therefore, the feature data corresponding to the object information cannot be obtained based on the query identifier. In this case, the third service 206 can call the model inference service to calculate the feature data of the object information. For example, it can call the feature calculation model 216 of the model inference service to calculate the feature data of the object information. Optionally, if the object information is image information, image features can be calculated based on the image information; if the object information is text information, text features can be calculated based on the text information; if the object information is multimodal data, multimodal features can be calculated based on the multimodal data.
[0065] In some embodiments, if the object is a product, the object information includes multiple object information corresponding to the object, the feature data includes multiple feature data corresponding to the multiple object information, and the query identifier includes multiple query identifiers corresponding to the multiple object information.
[0066] Figure 2B A schematic diagram of a details page 220 of an exemplary object according to an embodiment of this disclosure is shown.
[0067] like Figure 2B As shown, exemplarily, a single object may include images 222-226 and text 228. Image 222 may be a header image, and there may be multiple images; the user can switch header images via a swipe gesture. Therefore, the objects may include more than one type of image. Figure 2B Images 222-226 are shown in the image.
[0068] In some embodiments, an image feature and a query identifier can be calculated based on the image information corresponding to each image, thus allowing the same object to have multiple image features and multiple query identifiers. Furthermore, a text feature can be calculated based on text information, which can also correspond to a query identifier. Additionally, multimodal features can be calculated based on multimodal data consisting of image information and text information from all images, and this multimodal data can also correspond to a query identifier. In this way, for the same object, multiple object information, multiple feature data, and multiple query identifiers can be obtained.
[0069] After calculating the feature data, the calculated feature data can be associated with the query identifier and stored in the feature library.
[0070] Optionally, the calculated feature data and its associated query identifier can be stored in a table, and then the table can be provided to the feature storage service 210 for storage.
[0071] In some embodiments, image features and query identifiers corresponding to individual image information, as well as text features and query identifiers corresponding to individual text information, can be stored in a first storage module (or a first feature library) 212. This allows for subsequent queries to retrieve the corresponding image features or text features from the first storage module 212 for individual image information or individual text information. Therefore, by splitting each row of data in the table, information with features and query identifiers as key-value pairs can be obtained and stored in the first storage module 212. The first feature library created in the first storage module 212 can then be used as a cache library for the feature operators of the third service 206, allowing it to retrieve feature data based on query identifiers, reducing repeated calls to the model inference service, and thus reducing the pressure on the model inference service. Furthermore, since the image features and text features of individual image information are stored separately, when the query identifiers are the same, the corresponding image features or text features can be found from the first storage module 212, eliminating the need to repeatedly store the same image features or text features, thus reducing resource waste.
[0072] In some embodiments, such as Figure 2A As shown, the feature storage service 210 can also associate the multiple feature data corresponding to the object with the object identifier (PID) of the object and store them in the second storage module 214 (or the second feature library). In this way, in some scenarios, users can still query the feature data corresponding to the object based on the object identifier.
[0073] At this point, the feature data for the first object has been stored in the database. When the next request arrives, the above steps can be repeated. When the third service 206 retrieves the feature data corresponding to the object information based on the query identifier, since the first storage module 212 already contains data, in some cases, such as when the query identifier for a single image can be found in the first storage module 212, the third service 206 records the image feature and does not need to call the feature calculation model 216 to recalculate the image feature. For object information where feature data cannot be found, the feature calculation model 216 can still be called to calculate the feature data.
[0074] Thus, when all the feature data corresponding to the object information of the second object has been obtained (queried or calculated), the third service 206 can provide a table of query identifiers and feature data to the feature storage service 210 for feature storage. The feature data corresponding to the query obtained in this table can be marked as 1, so the feature storage service 210 no longer needs to store that feature data. Feature data marked as 0 can be stored in the first storage module 212. Optionally, the multiple feature data corresponding to the second object can also be associated with the object identifier (PID) of the object and stored in the second storage module 214.
[0075] This process is repeated to process the data of the next object until all object features have been acquired and stored in the feature library, completing the feature library construction. Subsequently, the created feature library can be used to retrieve object features, allowing real-time tasks to be completed based on the retrieved features. If no features are found, a feature calculation model can be invoked for real-time calculation, ensuring the effective completion of the real-time task. It is understood that the method of acquiring object features when executing real-time tasks is similar to the steps in the aforementioned embodiments, and will not be repeated here.
[0076] In some embodiments, data stored in the first storage module 212 can be deleted or cleaned up based on an automatic deletion mechanism (Time to Live, TTL) to ensure the timeliness of the data and save storage resources.
[0077] In some embodiments, data stored in the second storage module 214 can be deleted or cleaned up based on the automatic deletion mechanism for expired data (Time to Live, TTL), or it can be explicitly deleted by specifying a query identifier to ensure the timeliness of the data and save storage resources.
[0078] In some embodiments, besides creating a feature library or completing real-time tasks, updating the feature library using the aforementioned method is also necessary when the feature calculation model is updated (e.g., the algorithm itself is updated, model parameters are updated, etc.). Specifically, the feature data of the object information can be re-determined based on the updated feature calculation model, and then the already stored feature data of the object information can be replaced with the re-determined feature data. It is understood that, in this process, since feature data may be duplicated, a significant amount of computational resources can still be saved.
[0079] As can be seen from the above embodiments, the method for obtaining object features provided in this disclosure can greatly reduce the repeated calculation of some features by determining the query identifier of object information and first obtaining feature data based on the query identifier, and only calculating feature data when feature data cannot be obtained. This can save a lot of computing resources, especially reducing the computing load of graphics processing unit (GPU) and improving feature calculation efficiency.
[0080] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.
[0081] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0082] This disclosure also provides a method for obtaining object features. Figure 3 A flowchart illustrating an exemplary method 300 provided in an embodiment of this disclosure is shown. This method 300 can be implemented by the system 200 of FIG2, such as... Figure 3 As shown, the method 300 may include the following steps.
[0083] In step 302, object information of the object can be obtained. Optionally, the object information includes at least one of image information, text information, and multimodal data describing the object.
[0084] In step 304, according to a preset algorithm, a query identifier corresponding to the object information is calculated based on the object information; wherein, the object information and the query identifier are in one-to-one correspondence.
[0085] In step 306, feature data corresponding to the object information is obtained based on the query identifier.
[0086] In step 308, in response to the inability to obtain the feature data corresponding to the object information based on the query identifier, the feature data of the object information is calculated, and the calculated feature data is associated with the query identifier and stored.
[0087] As can be seen from the above embodiments, the method for obtaining object features provided in this disclosure calculates the query identifier of object information according to a preset algorithm, and first obtains feature data based on the query identifier. The feature data is only calculated when the feature data cannot be obtained. This can greatly reduce the repeated calculation of some features, save a lot of computing resources, especially reduce the computing load of the graphics processing unit (GPU), and improve the feature calculation efficiency.
[0088] In some embodiments, the object information is image information describing the object, and the preset algorithm is an encryption algorithm. This allows the use of common encryption algorithms to calculate a unique piece of information, similar to a private key, based on the image information, as a query identifier. This ensures the uniqueness of the query identifier and, by using existing encryption algorithms, eliminates the need for further algorithm design, thus improving efficiency.
[0089] Optionally, the encryption algorithm can be, for example, the Message Digest Algorithm MD5, so that MD5 can be used to quickly calculate the query identifier, and the query identifiers obtained based on the MD5 algorithm all have the same length, which helps to ensure the consistency of the query identifier.
[0090] In some embodiments, the object includes a product, and the object information is text information describing the product;
[0091] According to a preset algorithm, based on the object information, the query identifier corresponding to the object information is calculated, including:
[0092] According to a preset algorithm, the product title corresponding to the product is extracted from the text and used as the query identifier.
[0093] Unlike using encryption algorithms to calculate the query identifier, using the extracted product title as the query identifier for the text features corresponding to the text information eliminates the calculation process, further saving computational resources. Furthermore, product titles are typically long and include brand names (e.g., "XX Brand Ethereal Vacation Style Long Dress, Autumn New Arrival, Slimming and Versatile"), usually possessing uniqueness and being relatively easy to obtain. In some cases, if the uniqueness of the product title cannot be guaranteed, other text information of the object obtained from the first service 202 can be added to the query identifier along with the product title as the query identifier.
[0094] In some embodiments, obtaining object information of an object includes:
[0095] Obtain the object identifier of the object;
[0096] Obtain the attribute information of the object based on the object identifier;
[0097] The object information of the object is obtained based on the attribute information.
[0098] In this way, attribute information can be obtained based on object identifiers to determine the object information used to calculate features.
[0099] In some embodiments, the object information includes multiple object information corresponding to the object, the feature data includes multiple feature data corresponding to the multiple object information, and the query identifier includes multiple query identifiers corresponding to the multiple object information. Thus, for the same object, multiple object information, multiple feature data, and multiple query identifiers can be obtained, allowing for a more comprehensive representation of the object.
[0100] In some embodiments, associating and storing the feature data with the query identifier includes: associating the feature data and the query identifier one-to-one and storing them in a first storage module. This can then be used as a cache library for feature operators, allowing them to retrieve feature data based on the query identifier, reducing repeated calls to the model inference service and thus reducing the pressure on the model inference service. Furthermore, since image features and text features for individual image information are stored separately, when the query identifiers are the same, the corresponding image features or text features can be found from the first storage module, eliminating the need to repeatedly store the same image features or text features, thus reducing resource waste.
[0101] In some embodiments, the method further includes: associating the plurality of feature data corresponding to the object with the object identifier of the object and storing them in a second storage module. Thus, in some scenarios, users can still query the feature data corresponding to the object based on the object identifier.
[0102] In some embodiments, calculating the feature data of the object information includes: invoking a feature calculation model to calculate the feature data of the object information. Thus, the method of this disclosure embodiment can significantly reduce the number of model calls and save computational resources.
[0103] In some embodiments, the method further includes: in response to the feature calculation model being updated, redetermining the feature data of the object information; replacing the already stored feature data of the object information with the redetermined feature data of the object information, thereby updating the feature data after the feature calculation model is updated.
[0104] This disclosure also provides an apparatus for acquiring object features. Figure 4 A schematic diagram of an exemplary apparatus 400 provided in an embodiment of this disclosure is shown. For example... Figure 4 As shown, the device 400 can be used to implement method 300 and may further include the following modules.
[0105] The first acquisition module 402 is configured to: acquire object information of an object;
[0106] The calculation module 404 is configured to: calculate the query identifier corresponding to the object information based on the object information according to a preset algorithm; wherein the object information and the query identifier are in one-to-one correspondence.
[0107] The second acquisition module 406 is configured to: acquire feature data corresponding to the object information based on the query identifier;
[0108] The calculation and storage module 408 is configured to: in response to the inability to obtain the feature data corresponding to the object information based on the query identifier, calculate the feature data of the object information, associate the calculated feature data with the query identifier, and store it.
[0109] In some embodiments, the object information includes at least one of image information, text information, and multimodal data used to describe the object.
[0110] In some embodiments, the object information is image information describing the object, and the preset algorithm is an encryption algorithm.
[0111] In some embodiments, the object includes a product, and the object information is text information describing the product;
[0112] The calculation module 404 is configured to extract the product title corresponding to the product from the text as the query identifier.
[0113] In some embodiments, the first acquisition module 402 is configured to:
[0114] Obtain the object identifier of the object;
[0115] Obtain the attribute information of the object based on the object identifier;
[0116] The object information of the object is obtained based on the attribute information.
[0117] In some embodiments, the object information includes multiple object information corresponding to the object, the feature data includes multiple feature data corresponding to the multiple object information, and the query identifier includes multiple query identifiers corresponding to the multiple object information.
[0118] In some embodiments, the computing and storage module 408 is configured to associate the feature data with the query identifier in a one-to-one correspondence and store them in the first storage module.
[0119] In some embodiments, the computing and storage module 408 is configured to associate the plurality of feature data corresponding to the object with the object identifier of the object and store them in a second storage module.
[0120] In some embodiments, the computing and storage module 408 is configured to: invoke a feature computing model to calculate feature data of the object information.
[0121] In some embodiments, the computation and storage module 408 is configured to: in response to the feature computation model being updated, redetermine the feature data of the object information; and replace the already stored feature data of the object information with the redetermined feature data of the object information.
[0122] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.
[0123] The apparatus of the above embodiments is used to implement the corresponding method 300 in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0124] This disclosure also provides a computer device for implementing the method 300 described above. Figure 5 A schematic diagram of the hardware structure of an exemplary computer device 500 provided in an embodiment of this disclosure is shown. The computer device 500 can be used to implement... Figure 1 Server 106 can also be used to implement Figure 1 Terminal devices 102 and 104. In some scenarios, this computer device 500 can also be used to implement... Figure 1 Database server 108.
[0125] like Figure 5 As shown, the computer device 500 may include: a processor 502, a memory 504, a network module 506, a peripheral interface 508, and a bus 510. The processor 502, memory 504, network module 506, and peripheral interface 508 are interconnected within the computer device 500 via the bus 510.
[0126] Processor 502 may be a central processing unit (CPU), image processor, neural network processor (NPU), microcontroller (MCU), programmable logic device, digital signal processor (DSP), application-specific integrated circuit (ASIC), or one or more integrated circuits. Processor 502 can be used to perform functions related to the techniques described in this disclosure. In some embodiments, processor 502 may also include multiple processors integrated as a single logic component. For example, such as... Figure 5 As shown, processor 502 may include multiple processors 502a, 502b and 502c.
[0127] Memory 504 can be configured to store data (e.g., instructions, computer code, etc.). Figure 5 As shown, the data stored in memory 504 may include program instructions (e.g., program instructions for implementing method 300 of embodiments of this disclosure) and data to be processed (e.g., the memory may store configuration files of other modules, etc.). Processor 502 may also access the program instructions and data stored in memory 504 and execute the program instructions to operate on the data to be processed. Memory 504 may include volatile or non-volatile storage devices. In some embodiments, memory 504 may include random access memory (RAM), read-only memory (ROM), optical disk, magnetic disk, hard disk, solid-state drive (SSD), flash memory, memory stick, etc.
[0128] Network interface 506 can be configured to provide communication with other external devices to computer device 500 via a network. This network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, Near Field Communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the specific examples described above.
[0129] The peripheral interface 508 can be configured to connect the computer device 500 to one or more peripheral devices to enable information input and output. For example, peripheral devices may include input devices such as keyboards, mice, touchpads, touch screens, microphones, and various sensors, as well as output devices such as displays, speakers, vibrators, and indicator lights.
[0130] Bus 510 can be configured to transfer information between various components of computer device 500 (e.g., processor 502, memory 504, network interface 506, and peripheral interface 508), such as internal buses (e.g., processor-memory bus), external buses (USB port, PCI-E bus), etc.
[0131] It should be noted that although the architecture of the computer device 500 described above only shows the processor 502, memory 504, network interface 506, peripheral interface 508, and bus 510, in specific implementations, the architecture of the computer device 500 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the architecture of the computer device 500 described above may only include the components necessary for implementing the embodiments of this disclosure, and does not necessarily include all the components shown in the figures.
[0132] Based on the same inventive concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method 300 as described in any of the above embodiments.
[0133] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.
[0134] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to perform the method 300 as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0135] Based on the same inventive concept, corresponding to the method 300 of any of the above embodiments, this disclosure also provides a computer program product, which includes a computer program. In some embodiments, the computer program is executable by one or more processors to cause the processors to perform the method 300. Corresponding to the execution entity for each step in each embodiment of method 300, the processor performing the corresponding step may belong to the corresponding execution entity.
[0136] The computer program product of the above embodiments is used to cause the processor to execute the method 300 as described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0137] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.
[0138] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0139] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.
[0140] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A method for obtaining object features, comprising: obtaining object information of an object, the object information comprising picture information for describing the object, the object comprising a commodity; calculating, according to a preset algorithm, a query identifier corresponding to the object information based on the object information; wherein the object information and the query identifier are in one-to-one correspondence; obtaining feature data corresponding to the object information from a feature library according to the query identifier, the feature data being data calculated by calling a feature calculation model and used to represent features of the object information; in response to being unable to obtain the feature data corresponding to the object information from the feature library according to the query identifier, calculating the feature data of the object information, and associating and storing the calculated feature data with the query identifier in the feature library; wherein calculating the feature data of the object information comprises: calling the feature calculation model to perform feature calculation on the object information to obtain the feature data of the object information.
2. The method of claim 1, wherein, The object information comprises at least one of picture information, text information, and multi-modal data for describing the object.
3. The method of claim 2, wherein, The object information is picture information for describing the object, and the preset algorithm is an encryption algorithm.
4. The method of claim 2, wherein, The object comprises a commodity, and the object information is text information for describing the commodity; calculating, according to a preset algorithm, a query identifier corresponding to the object information based on the object information, comprises: extracting a commodity title corresponding to the commodity from the text as the query identifier according to a preset algorithm.
5. The method of claim 2, wherein, The object information of the object comprises: obtaining an object identifier of the object; obtaining attribute information of the object according to the object identifier; obtaining the object information of the object according to the attribute information.
6. The method of claim 1, wherein, The object information comprises a plurality of object information corresponding to the object, the feature data comprises a plurality of feature data corresponding to the plurality of object information, and the query identifier comprises a plurality of query identifiers corresponding to the plurality of object information.
7. The method of claim 6, wherein, Associating and storing the feature data with the query identifier comprises: associating and storing the feature data and the query identifier in one-to-one correspondence in a first storage module.
8. The method of claim 6, further comprising: associating and storing the plurality of feature data corresponding to the object and the object identifier of the object in a second storage module.
9. The method of claim 1, further comprising: in response to the feature calculation model being updated, re-determining the feature data of the object information; replacing the already stored feature data of the object information with the re-determined feature data of the object information.
10. An apparatus for obtaining object features, comprising: a first obtaining module configured to obtain object information of an object, the object information comprising picture information for describing the object, the object comprising a commodity; a calculation module configured to calculate, according to a preset algorithm, a query identifier corresponding to the object information based on the object information; wherein the object information and the query identifier are in one-to-one correspondence; and a second obtaining module configured to obtain feature data corresponding to the object information from a feature library according to the query identifier, the feature data being data calculated by calling a feature calculation model and used to represent features of the object information. A second obtaining module, configured to: obtain feature data corresponding to the object information from a feature library according to the query identifier, the feature data being data calculated by calling a feature calculation model and used to represent features of the object information; A calculation and storage module, configured to: in response to being unable to obtain the feature data corresponding to the object information from the feature library according to the query identifier, calculate feature data of the object information, and store the calculated feature data in association with the query identifier to the feature library; The calculation of the feature data of the object information comprises: calling the feature calculation model to perform feature calculation on the object information to obtain the feature data of the object information.
11. A computer device comprising one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the program comprises instructions for executing the method according to any one of claims 1 to 9.
12. A non-transitory computer-readable storage medium containing a computer program, which, when executed by one or more processors, causes the processors to perform the method of any one of claims 1 to 9.
13. A computer program product comprising computer program instructions, which, when executed on a computer, cause the computer to perform the method of any one of claims 1 to 9.
Citation Information
Patent Citations
Private data query method, system and device
CN110990681A
Method and device for processing content recommendation service, computer equipment and storage medium
CN115827959A
Information query method and device, equipment and medium
CN118277436A