CN111159552A - Commodity searching method, commodity searching device, server and storage medium - Google Patents

Commodity searching method, commodity searching device, server and storage medium Download PDF

Info

Publication number
CN111159552A
CN111159552A CN201911392939.6A CN201911392939A CN111159552A CN 111159552 A CN111159552 A CN 111159552A CN 201911392939 A CN201911392939 A CN 201911392939A CN 111159552 A CN111159552 A CN 111159552A
Authority
CN
China
Prior art keywords
target
commodity
category
semantic information
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911392939.6A
Other languages
Chinese (zh)
Inventor
刘建辉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Daily Youxian Technology Co.,Ltd.
Original Assignee
Beijing Missfresh Ecommerce Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Missfresh Ecommerce Co Ltd filed Critical Beijing Missfresh Ecommerce Co Ltd
Priority to CN201911392939.6A priority Critical patent/CN111159552A/en
Publication of CN111159552A publication Critical patent/CN111159552A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9536Search customisation based on social or collaborative filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Economics (AREA)
  • General Business, Economics & Management (AREA)
  • Strategic Management (AREA)
  • Marketing (AREA)
  • Development Economics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a commodity searching method, a commodity searching device, a server and a storage medium, and belongs to the technical field of the Internet. The commodity searching method provided by the embodiment of the application responds to a target searching request of a terminal and obtains target semantic information; determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information; determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position weight of the target commodity category; and returning the commodity information and the position information of the target commodity to the terminal. The method can directly judge the target commodity category according to the target semantic information of the target search request, does not need manual configuration, and has strong generalization capability. And according to the position weight of the target commodity category, determining the position information of the target commodity corresponding to the target commodity category in the commodity interface, so that the commodity required by the user can be displayed in the commodity interface in a priority mode.

Description

Commodity searching method, commodity searching device, server and storage medium
Technical Field
The present application relates to the field of internet technologies, and in particular, to a method, an apparatus, a server, and a storage medium for searching for a commodity.
Background
With the development of internet technology, more and more electric suppliers including fresh electric suppliers emerge. The fresh food e-commerce means selling fresh food products, such as fruits, vegetables or meat, on the internet by means of e-commerce. The user can search for the required fresh products through the client installed on the terminal. However, the phenomenon of one word and multiple meanings commonly exists in the Chinese expression, and the same word expression is often corresponding to various types of commodities, for example, a user searches for 'apple', possibly fruits which the user wants to eat, and possibly yoghourt with apple taste. At this time, the categories of the commodities which the user intends to search need to be distinguished, so that the user is helped to find the needed commodities more quickly and better.
In the related technology, an operator mainly extracts a keyword in a search request, directly configures a commodity category corresponding to the keyword according to the operation experience of the operator and in combination with a fresh electronic commerce search engine log, then determines the display position of a commodity corresponding to each commodity category according to the preset recommendation sequence of the commodity categories, and finally displays the commodity corresponding to each commodity category according to the display position on a terminal.
However, the cost and maintenance cost for manually configuring the commodity category are high, the difficulty is high, the coverage rate of manual configuration is low due to the randomness of the expression of the search request of the user, the generalization capability is poor, and the requirement of online service of a fresh search engine for distinguishing the commodity category intention of the massive search request of the user is difficult to meet.
Disclosure of Invention
The embodiment of the application provides a commodity searching method, a commodity searching device, a server and a storage medium, and can improve the generalization of commodity searching. The technical scheme is as follows:
in one aspect, a method for searching for a commodity is provided, the method comprising:
responding to a target search request of a terminal, and acquiring target semantic information of a short text in the target search request;
determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information;
determining the position information of the target commodity corresponding to the target commodity category in a commodity interface to be requested according to the position weight of the target commodity category;
and returning the commodity information and the position information of the target commodity to the terminal.
In a possible implementation manner, the determining, according to the target semantic information, at least one target commodity category and a position weight of the target commodity category corresponding to the target semantic information includes:
inputting the target semantic information into a first category discrimination model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library;
selecting at least one target commodity category with the probability exceeding a first preset threshold value from the commodity category library according to the probability that the target semantic information belongs to each commodity category;
and determining the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
In another possible implementation manner, before the target semantic information is input into the first category discrimination model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library, the method further includes:
searching an offline text base according to the target semantic information, wherein the offline text base stores the corresponding relation between the historical semantic information and the first category sequence;
and responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, and executing the step of inputting the target semantic information into a first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library.
In another possible implementation manner, the method further includes:
responding to the fact that historical semantic information matched with the target semantic information exists in the offline text base, and taking the commodity category in a first category sequence corresponding to the historical semantic information as the target commodity category;
and determining the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
In another possible implementation manner, the determining, according to the position weight of the target commodity category, the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested includes:
sequencing the target commodity categories according to the position weights of the target commodity categories to obtain a second category sequence;
determining a target commodity corresponding to the target commodity category;
and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
In another possible implementation manner, the method further includes:
acquiring first description information of sample commodities and a first commodity category corresponding to the first description information, and second sample semantic information corresponding to a first historical search request in a plurality of seasons and a second commodity category corresponding to the second sample semantic information;
segmenting the first description information to obtain a plurality of keywords;
recombining the keywords to obtain first sample semantic information;
and training a second category discrimination model according to the first sample semantic information and a first commodity category corresponding to the first sample semantic information, and the second sample semantic information and a second commodity category corresponding to the second sample semantic information to obtain the first category discrimination model.
In another possible implementation manner, after the training of the second category discrimination model according to the first sample semantic information and the first commodity category corresponding to the first sample semantic information, and the second sample semantic information and the second commodity category corresponding to the second sample semantic information, to obtain the first category discrimination model, the method further includes:
acquiring a history search record, wherein the history search record comprises history semantic information of a short text in a history search request and history commodity categories of clicked commodity information in a commodity interface acquired through the history semantic information;
determining the commodity category corresponding to the historical semantic information through the first category distinguishing model according to the historical semantic information;
determining the accuracy of the first category discrimination model discrimination according to the commodity category corresponding to the historical semantic information and the historical commodity category;
and responding to the fact that the accuracy is not smaller than a second preset threshold value, and executing the step of inputting the target semantic information into a first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library.
In another aspect, there is provided an article search apparatus, the apparatus including:
the first acquisition module is used for responding to a target search request of a terminal and acquiring target semantic information of a short text in the target search request;
the first determining module is used for determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information;
the second determining module is used for determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category;
and the return module is used for returning the commodity information and the position information of the target commodity to the terminal.
In a possible implementation manner, the first determining module is further configured to input the target semantic information into a first category discrimination model to obtain a probability that the target semantic information belongs to each commodity category in a commodity category library; selecting at least one target commodity category with the probability exceeding a first preset threshold value from the commodity category library according to the probability that the target semantic information belongs to each commodity category; and determining the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
In another possible implementation manner, the apparatus further includes:
the searching module is used for searching an offline text base according to the target semantic information, and the offline text base stores the corresponding relation between the historical semantic information and the first category sequence;
and the input module is used for responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, inputting the target semantic information into a first category judgment model, and obtaining the probability that the target semantic information belongs to each commodity category in the commodity category library.
In another possible implementation manner, the apparatus further includes:
the third determining module is used for responding to the existence of historical semantic information matched with the target semantic information in the offline text library, and taking the commodity category in the first category sequence corresponding to the historical semantic information as the target commodity category; and determining the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
In another possible implementation manner, the second determining module is configured to sort the target commodity categories according to the position weights of the target commodity categories to obtain a second category sequence; determining a target commodity corresponding to the target commodity category; and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
In another possible implementation manner, the apparatus further includes:
the second acquisition module is used for acquiring first description information of sample commodities and corresponding first commodity categories thereof, and second sample semantic information corresponding to the first historical search requests in a plurality of seasons and corresponding second commodity categories thereof;
the word segmentation module is used for segmenting the first description information to obtain a plurality of keywords;
the combination module is used for recombining the keywords to obtain first sample semantic information;
and the training module is used for training a second category discrimination model according to the first sample semantic information and a first commodity category corresponding to the first sample semantic information, and the second sample semantic information and a second commodity category corresponding to the second sample semantic information to obtain the first category discrimination model.
In another possible implementation manner, the apparatus further includes:
the third acquisition module is used for acquiring a historical search record, wherein the historical search record comprises historical semantic information of a short text in a historical search request and a historical commodity category of clicked commodity information in a commodity interface acquired through the historical semantic information;
the fourth determining module is used for determining the commodity category corresponding to the historical semantic information through the first category distinguishing model according to the historical semantic information;
a fifth determining module, configured to determine, according to the commodity category corresponding to the historical semantic information and the historical commodity category, an accuracy of the first category discrimination model;
the input module is further configured to input the target semantic information into a first category discrimination model in response to that the accuracy is not less than a second preset threshold, so as to obtain a probability that the target semantic information belongs to each commodity category in a commodity category library.
In another aspect, a server is provided, which includes a processor and a memory, where at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to implement the operations of any one of the above commodity search methods.
In another aspect, a computer-readable storage medium is provided, in which at least one program code is stored, and the at least one program code is loaded and executed by a processor to implement the operations of any one of the above-mentioned item search methods.
The technical scheme provided by the embodiment of the application has the following beneficial effects:
the commodity searching method provided by the embodiment of the application responds to a target searching request of a terminal, and obtains target semantic information of a short text in the target searching request; determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information; determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category; and returning the commodity information and the position information of the target commodity to the terminal. The method can directly judge the target commodity category according to the target semantic information of the target search request, does not need manual configuration, and has strong generalization capability. And according to the obtained position weight of the target commodity category, determining the position information of the target commodity corresponding to the target commodity category in the commodity interface, so that the commodity required by the user can be displayed in the commodity interface preferentially.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
FIG. 1 is a schematic diagram of an implementation environment of a product search provided in an embodiment of the present application;
fig. 2 is a flowchart of a method for searching for a commodity according to an embodiment of the present application;
fig. 3 is a flowchart of a method for searching for a commodity according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating that a server determines location information of a target product in a product interface through an offline text library and a first category discrimination model according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an article search device according to an embodiment of the present application;
fig. 6 is a block diagram of a server according to an embodiment of the present disclosure.
Detailed Description
In order to make the technical solutions and advantages of the present application more clear, the following describes the embodiments of the present application in further detail.
An embodiment of the present application provides an implementation environment for commodity search, and referring to fig. 1, the implementation environment includes: a terminal 101 and a server 102. The terminal 101 and the server 102 may be connected by wireless or wired connection. The terminal 101 is installed with a target client, and the server 102 is a server 102 corresponding to the target client. The target client may be a client for selling any commodity, for example, the target client may be a client for selling clothing, a client for selling fresh food, a client for selling cosmetics, and the like.
The phenomenon that one word is multiple in meaning is common in Chinese expression, and the same word expression is often corresponding to multiple types of commodities, so that when a user searches commodities on a target client, the target client can display multiple types of commodities for the user to select the required commodities from. However, in the related technologies, the operator manually configures the commodity category, the coverage rate of manually configuring the commodity category is low, the configuration cost and the maintenance cost are high, and often only a small part of high-frequency search requests can be covered, but the search request expression of the user has strong randomness and personal subjectivity, so that the manual configuration method is difficult to effectively cover massive long-tail search requests, the generalization capability is poor, the ordering of different types of commodities obtained by search results is not reasonable, and the search cost of the user is increased.
In the commodity searching method provided by the embodiment of the application, the server 102 directly judges the commodity category according to the target semantic information of the short text by acquiring the target semantic information of the short text in the target searching request, and compared with the method in the prior art, the method has stronger generalization. Meanwhile, according to the obtained position weight of the target commodity category, the position information of the target commodity corresponding to the target commodity category in the commodity interface is determined, so that the commodity required by the user can be displayed in the commodity interface preferentially.
Moreover, when a user searches for a commodity, the search request is generally a long-tail search request, for example, the user wants to search for "apple", the input search request may be "apple", or may be "Fuji apple", and the "Fuji apple" is a long-tail search request. However, in the related art, keywords in the search request are generally extracted, for example, the search request of the user is "Fuji apple" in the tobacco station, and the keywords are "apple", because it is difficult to manually configure the categories of commodities according to the search request, and the commodities in the fresh field are updated frequently along with seasons alternately, the operators generally configure the categories of the commodities according to the keywords, and often need to refer to historical click data of the search request, but click behaviors of the long-tailed search request are sparse, and the seasonality of the fresh commodities is strong, which further causes the duration of the long-tailed search request to be short, and makes it difficult to solve the problem of periodic variation of the search request.
According to the commodity searching method provided by the embodiment of the application, the server 102 can directly search according to the searching request of the user, the searching request can be a long-tail searching request or a keyword searching request, the keyword does not need to be extracted, manual configuration is not needed, the commodity intention category of the searching request of the user is directly distinguished and scored, the requirements of searching commodities and optimizing commodity sequencing according to the long-tail searching request in the fresh field can be met, the problems of more long-tail searching requests and sparse clicking behaviors can be effectively solved, and meanwhile, the continuous computing overhead caused by counting the clicking logs of the searching request in a timed cycle mode is reduced.
An embodiment of the present application provides a method for searching for a commodity, and referring to fig. 2, the method includes:
step 201: and responding to a target search request of the terminal, and acquiring target semantic information of the short text in the target search request.
Step 202: and determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information.
Step 203: and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category.
Step 204: and returning the commodity information and the position information of the target commodity to the terminal.
In one possible implementation manner, determining at least one target commodity category and a position weight of the target commodity category corresponding to the target semantic information according to the target semantic information includes:
inputting the target semantic information into a first category discrimination model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library;
selecting at least one target commodity category with the probability exceeding a first preset threshold from a commodity category library according to the probability that the target semantic information belongs to each commodity category;
and determining the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
In another possible implementation manner, before the target semantic information is input into the first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library, the method further includes:
searching an offline text base according to the target semantic information, wherein the offline text base stores the corresponding relation between the historical semantic information and the first category sequence;
and responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, and executing the step of inputting the target semantic information into the first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library.
In another possible implementation manner, the method further includes:
responding to the existence of historical semantic information matched with the target semantic information in the offline text library, and taking the commodity category in the first category sequence corresponding to the historical semantic information as the target commodity category;
and determining the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
In another possible implementation manner, determining, according to the position weight of the target commodity category, position information of a target commodity corresponding to the target commodity category in a commodity interface to be requested includes:
sequencing the target commodity categories according to the position weights of the target commodity categories to obtain a second category sequence;
determining a target commodity corresponding to the target commodity category;
and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
In another possible implementation manner, the method further includes:
acquiring first description information of sample commodities and a first commodity category corresponding to the first description information, and second sample semantic information corresponding to a first historical search request in a plurality of seasons and a second commodity category corresponding to the second sample semantic information;
segmenting the first description information to obtain a plurality of keywords;
recombining the keywords to obtain first sample semantic information;
and training the second category discrimination model according to the first sample semantic information and the corresponding first commodity category thereof, and the second sample semantic information and the corresponding second commodity category thereof to obtain the first category discrimination model.
In another possible implementation manner, after the second category discrimination model is trained according to the first sample semantic information and the first commodity category corresponding to the first sample semantic information, and the second sample semantic information and the second commodity category corresponding to the second sample semantic information, and the first category discrimination model is obtained, the method further includes:
acquiring a historical search record, wherein the historical search record comprises historical semantic information of a short text in a historical search request and a historical commodity category of clicked commodity information in a commodity interface acquired through the historical semantic information;
determining commodity categories corresponding to the historical semantic information through a first category discrimination model according to the historical semantic information;
determining the accuracy of discrimination of the first category discrimination model according to the commodity category corresponding to the historical semantic information and the historical commodity category;
and responding to the accuracy rate not less than a second preset threshold value, and executing the step of inputting the target semantic information into the first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library.
The commodity searching method provided by the embodiment of the application responds to a target searching request of a terminal, and obtains target semantic information of a short text in the target searching request; determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information; determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category; and returning the commodity information and the position information of the target commodity to the terminal. The method can directly judge the target commodity category according to the target semantic information of the target search request, does not need manual configuration, and has strong generalization capability. And according to the obtained position weight of the target commodity category, determining the position information of the target commodity corresponding to the target commodity category in the commodity interface, so that the commodity required by the user can be displayed in the commodity interface preferentially.
An embodiment of the present application provides a method for searching a commodity, which is applied to a terminal and a server, and is shown in fig. 3, where the method includes:
step 301: the terminal sends a target search request to the server.
When a target user accesses a target client installed on a terminal and inputs a short text on a commodity interface of the target client, the terminal sends a target search request to a server, and the target search carries target semantic information of the short text. The server is a server corresponding to the target client. The target client may be a fresh sales client, a clothing sales client, a cosmetics sales client, and the like, in this embodiment, the target client is only taken as the fresh sales client for example to explain, and correspondingly, the server is a server corresponding to the fresh sales client.
Step 302: and the server receives a target search request of the terminal and acquires target semantic information of the short text in the target search request.
And the server receives a target search request sent by the terminal and acquires target semantic information of the short text in the target search request. The target semantic information of the short text may be semantic information of a keyword, and may also be semantic information of a long-tail short text, which is not specifically limited in this embodiment of the application. For example, the semantic information of the short text may be "sausage" or "jiajia kanghai sausage", where "sausage" is the semantic information of the keyword and "jia kanghai sausage" is the semantic information of the long-tail short text.
It should be noted that, in the embodiment of the present application, the server may directly determine the target commodity category and the position weight thereof through the first category discrimination model, or the server may determine the target commodity category and the position weight thereof through the offline text library and the first category discrimination model. When the server determines the target commodity category and the position weight thereof directly through the first category judgment model, the server may directly execute step 306 and step 308 after executing step 302; when the server determines the target commodity category and the position weight thereof through the offline text library and the first category judgment model, the server executes step 302 and then executes step 303 and 308.
Step 303: and searching an offline text library by the server according to the target semantic information.
The off-line text base stores the corresponding relation between the historical semantic information and a first category sequence, the first category sequence comprises a plurality of target commodity categories, and each commodity category is sequentially arranged according to the probability of the commodity category related to the target semantic information.
The number of the commodity categories included in the first category sequence may be set and changed as needed, and is not particularly limited in the embodiment of the present application. For example, the number may be 5, 6 or 7.
In one possible implementation, the server may update the offline text repository. The server may be updated periodically or aperiodically. In the embodiments of the present application, this is not particularly limited. When updated periodically, the period may be 1 day, 2 days, or 1 week. For example, the period is 1 day, the server updates the offline text repository daily.
In this step, the server searches the offline text library, determines whether the offline text library has historical semantic information matched with the target semantic information, and when the offline text library has historical semantic information matched with the target semantic information, the server executes step 304 and step 305; when there is no historical semantic information matching the target semantic information in the offline text library, the server performs step 306 and step 308.
Before the step, the server stores the historical semantic information and the first category sequence in the offline text library in advance, and when the server searches the offline text library, the stored historical semantic information and the first category sequence are directly called without judging the categories of the commodities through the first category judgment model, so that the commodity searching efficiency is improved. The historical semantic information is semantic information input when other users except the target user search for the commodity.
Step 304: and in response to the fact that historical semantic information matched with the target semantic information exists in the offline text base, the server takes the commodity category in the first category sequence corresponding to the historical semantic information as the target commodity category.
When the history semantic information matched with the target semantic information exists in the offline text library, the server may directly use the commodity category in the first category sequence corresponding to the history semantic information as the target commodity category, and then execute step 305 to determine the position weight of the target commodity category according to step 305.
For example, the semantic information of the target user searching for the commodity is "apple", the historical semantic information "apple" and the first category sequence exist in the offline text library, and the server directly takes the commodity category in the first category sequence corresponding to the historical semantic information "apple" as the target commodity category.
In a possible implementation manner, the commodity category in the first category sequence may include not only the commodity category corresponding to the historical semantic information, but also the commodity category corresponding to the semantic information related to the historical semantic information. The semantic information related to the historical semantic information can be semantic information which is matched with the historical semantic information to form a menu. For example, the historical semantic information is "tomato", and the semantic information related to "tomato" may be "egg", "laver", etc., wherein "egg" and "laver" may be matched with tomato to make egg-flower soup.
In a possible implementation manner, the server may directly use the commodity category in the first category sequence as the target commodity category, or may adjust the order of the commodity categories in the first category sequence.
In a possible implementation manner, when the server adjusts the order of the commodity categories in the first category sequence, the server may obtain a user identifier of the target user from the target search request, obtain a historical search record of the target user according to the user identifier, and adjust the order of the commodity categories in the first category sequence according to the historical search record of the target user.
The server acquires the historical search record of the target user, and when the multiple commodities searched in the historical search record of the target user are all commodities of the same commodity category, the commodities searched by the target user at present and the commodities searched in the historical search record are likely to be the same commodity category. For example, if the plurality of commodities searched in the history search record of the target user are pears, bananas and pineapples, and all the commodities belong to the fruit commodity category, the target semantic information currently searched by the target user is likely to be fruits, and if the order of the commodity category "fruits" in the first category sequence is backward, the order of the "fruits" can be adjusted forward. The higher the order of the commodity categories in the first category sequence is, the higher the probability that the commodity category is the commodity category that the user wants to search is.
In another possible implementation manner, when the server adjusts the order of the commodity categories in the first category sequence, the server may further obtain a historical purchase record of the target user according to the user identifier, and adjust the order of the commodity categories in the first category sequence according to the historical purchase record of the target user.
The server acquires the historical purchase record of the target user, and when the multiple commodities purchased in the historical purchase record of the target user are all commodities of the same commodity category, the commodities currently searched by the target user and the commodities purchased in the historical purchase record are likely to be of the same commodity category. For example, if the plurality of items purchased in the historical purchase record of the target user are chicken, pork, and the plurality of items all belong to the meat item category, the target semantic information currently searched by the target user is likely to be meat, and if the order of the item category "meat" in the first item sequence is backward, the order of "meat" may be adjusted forward.
In another possible implementation manner, when the server adjusts the order of the commodity categories in the first category sequence, the server may further obtain the current time, and adjust the order of the commodity categories in the first category sequence according to the current time.
The server can also obtain the current time, when the current time is the cooking time, the target semantic information currently searched by the target user is probably vegetables, and at the moment, the server can forward adjust the sequence of the commodity category 'vegetables' in the first category sequence; when the current time is afternoon tea time, the target semantic information currently searched by the target user is likely to be fruit, and at this time, the server can adjust the sequence of the commodity category "fruit" in the first category sequence forward.
Step 305: and the server determines the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
The first category sequence comprises a plurality of commodity categories which are sequentially arranged according to the probability of the commodity categories related to the target semantic information. The arrangement sequence of the plurality of commodity categories can be arranged from high probability to low probability or from low probability to high probability. In the embodiment of the present application, the sorting manner of the multiple commodity classes is not particularly limited. For example, the ranking order of the plurality of commodity classes is ranked according to the probability from large to small.
The server allocates a position weight to each commodity category according to the arrangement sequence of the commodity categories, the position weight value is larger when the probability of the commodity category related to the historical semantic information is larger, and the display position of the commodity interface is more front and more obvious when the commodity interface is more front. When a plurality of commodity categories in the first category sequence are arranged from large to small according to the probability related to the historical semantic information, the position weighted value distributed by the server for each commodity category is also arranged from large to small; when the plurality of commodity categories in the first category sequence are arranged from small to large according to the probability related to the historical semantic information, the position weighted value distributed by the server for each commodity category is also arranged from small to large.
For example, the target semantic information is "apple", historical semantic information of "apple" exists in the offline text library, the corresponding first category sequence includes 3 commodity categories, which are respectively fruit, yogurt and cookies, and the 3 commodity categories are sequentially arranged from large to small according to the probability related to "apple", so that the corresponding position weights are also from large to small.
Step 306: and responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, and the server inputs the target semantic information into the first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library.
And when the history semantic information matched with the target semantic information does not exist in the offline text library, the server determines the target commodity category corresponding to the target semantic information and the position weight thereof through the first category judgment model.
The commodity category library includes a plurality of commodity categories, and in the embodiment of the present application, the number of the commodity categories included in the commodity category library is not specifically limited. For example, the number of the article categories included in the article category library is 20, that is, 20 article categories are included in the article category library. In this step, the server inputs the target semantic information into the first category discrimination model, and determines the probability that the target semantic information belongs to each of the 20 categories of the goods in the goods category library.
In a possible implementation manner, when the offline text library does not have historical semantic information matched with the semantic information, and the server obtains the target commodity category and the category probability thereof through the first category judgment model, after the server obtains the target commodity category and the category probability thereof through the first category judgment model, the server can store the target commodity category and the category probability thereof obtained by the first category judgment model as a commodity category sequence corresponding to the semantic information into the offline text library, so that when other subsequent users search commodities according to the semantic information, the server can quickly return the target commodity category and the category probability corresponding to the semantic information, and the commodity search efficiency is improved.
It should be noted that, before this step, the server trains to obtain the first category discriminant model. In a possible implementation manner, the step of training the server to obtain the first category discriminant model may be implemented by the following steps (1) to (4), including:
(1) the server obtains first description information of sample commodities and corresponding first commodity categories, and second sample semantic information corresponding to the first historical search requests in a plurality of seasons and corresponding second commodity categories.
The sample commodity is a commodity in a commodity category library, and the first description information is a commodity name or a commodity title of the sample commodity.
The plurality of seasons corresponding to the first historical search request may be selected and changed as needed, for example, the plurality of seasons may be any number of four seasons, namely, spring, summer, autumn, and winter. In the present embodiment, the plurality of seasons are four seasons of spring, summer, autumn, and winter as an example. Correspondingly, the first historical search requests in the plurality of seasons are historical search requests in four seasons of spring, summer, autumn and winter, namely historical search requests in a whole year.
The server can capture the corresponding relation between each search request and the commodity category in different seasons by using semantic information corresponding to the historical search request of the whole year and the commodity category corresponding to the semantic information, so that the related data is prevented from being omitted.
(2) The server carries out word segmentation on the first description information to obtain a plurality of keywords.
The server itself may perform word segmentation on the first description information, and may also perform word segmentation on the first description information through a word segmentation device, which is not specifically limited in this embodiment of the application.
For example, the first description information of the sample commodity is "jiajia jia refined style sausage", and the server divides the first description information into words to obtain keywords "jia kang", "refined style", "guang style", and "sausage", respectively.
(3) The server recombines the keywords to obtain first sample semantic information.
The plurality of keywords can be randomly combined to obtain first sample semantic information.
For example, the keywords "jiajiajiakang", "hardpack", "guang style", "sausage" obtained as described above are randomly combined to obtain semantic information such as "jiajiajiajiakang sausage", "jiajiajiakang hardpack sausage", "guang style sausage", "hardpack guang style", and the like, and the server sets the plurality of semantic information as first sample semantic information.
(4) And the server trains the second category discrimination model according to the first sample semantic information and the corresponding first commodity category thereof, and the second sample semantic information and the corresponding second commodity category thereof to obtain the first category discrimination model.
When the server trains the second category discrimination model, the sample format obtained according to the first sample semantic information and the second sample semantic information may be "__ label __ commodity category first sample semantic information/second sample semantic information". The number of samples for the server to train the second category discrimination model may be set and changed as needed, which is not specifically limited in this embodiment of the application. For example, the number of samples may be 45750474.
In one possible implementation, the second category identification model is a classification model, and the second category identification model can be selected and changed as needed. In the embodiments of the present application, the model is only described as a Fasttext classifier. The Fastext classifier is a classifier which is concentrated on large-scale text data, has the characteristics of high speed and low resource occupation compared with the traditional classifier, greatly reduces the model training time while ensuring the precision, and can directly perform multi-classification on the text while generating word vectors.
In a possible implementation manner, before the server trains the second category discrimination model, the server sets model parameters, where the model parameters include: learning rate, word vector, and semantic interval. In this embodiment of the present application, the model parameters may be set and changed as needed, for example, the learning rate may be set to 0.05, the word vector dimension may be set to 200, and the semantic interval, that is, the word graph, may be set to 2. When the learning rate is set to be too large, the training time of the model is short, but the accuracy of the model obtained by training is low; when the learning rate is set to be too small, the training time of the model is long, resulting in high training cost. Based on this, in the embodiment of the application, the server sets the learning rate to 0.05, which not only can shorten the training time, but also can improve the accuracy.
In a possible implementation manner, after the server trains to obtain the first category discrimination model, the model can be tested through the history search record. Accordingly, the process may be implemented by the following steps (5) to (8), including:
(5) the server obtains a historical search record.
The history search record comprises history semantic information of short texts in the history search request and history commodity categories of clicked commodity information in the commodity interface acquired through the history semantic information.
The historical search record is different from the first historical search request obtained when the model was trained. When the first history search request during model training is a history search request corresponding to the last year and the whole year, the history search record may be a search record of one month or more of the year, for example, the history search record may be a search record of three months of the year, that is, the server uses the search record of three months of the year as a test data set to test the first category discrimination model, and the server may directly use a test interface provided by a Fasttext library to perform model test.
(6) And the server determines the commodity category corresponding to the historical semantic information through a first category distinguishing model according to the historical semantic information.
The server inputs the historical semantic information into the first category distinguishing model to obtain the probability of each commodity category corresponding to the historical semantic information, and then at least one commodity category with higher probability is selected from the probability to obtain the commodity category corresponding to the historical semantic information.
(7) And the server determines the discrimination accuracy of the first category discrimination model according to the commodity category corresponding to the historical semantic information and the historical commodity category.
The server determines whether the historical commodity category of the clicked commodity information in the commodity interface is the same as the commodity category obtained through the first category judgment model, and therefore the accuracy of the first category judgment model is determined.
(8) And the server responds that the accuracy is not less than a second preset threshold value, and inputs the target semantic information into the first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library.
When the accuracy is not smaller than a second preset threshold, the accuracy of the first category judgment model is higher, and the server executes subsequent operation through the first category judgment model; and (3) when the accuracy is smaller than a second preset threshold, the server continues to train the model through the steps (1) to (4), and then tests until the accuracy is not smaller than the second preset threshold.
The second preset threshold may be set and changed as needed, and is not particularly limited in the embodiment of the present application. For example, the second preset threshold may be 90% or 95%. For example, the second preset threshold is 90%, and the accuracy of the first category discrimination model obtained by training in the embodiment of the present application exceeds 95%.
It should be noted that, in the embodiment of the present application, the sample of the model training is not only based on the historical search request and the corresponding commodity category, but also randomly constructs a "false" search request after performing word segmentation on the first description information of the sample commodity, thereby more fully utilizing the commodity data. The problem that the click history is concentrated on the high-frequency search request only by using the search request click log statistics is solved, and the generalization is improved.
In addition, the method for counting the click history based on the keywords in the related technology can only achieve higher coverage rate in a mode of continuously expanding the cache data, and ignores semantic information in different long-tail search requests. In the embodiment of the application, the server can directly judge and predict the target commodity category desired by the user based on the target semantic information of the short text in the search request through the first category judgment model, and can effectively solve the problems of more long-tail words and sparse statistical information in the search request. In addition, the server combines the offline text library with the online model, so that the mode not only ensures the instant return of the commodity category corresponding to the high-frequency search request and improves the online response capability, but also can cover the unregistered long-tail short text, perform online prediction on the unregistered long-tail short text, ensure the generalization capability of the first category discrimination model and expand the search range of commodity search.
Step 307: and the server selects at least one target commodity category with the probability exceeding a first preset threshold from the commodity category library according to the probability that the target semantic information belongs to each commodity category.
In a possible implementation manner, the server may select at least one target commodity category having a probability exceeding a first preset threshold from the commodity category library directly according to the probability that the target semantic information belongs to each commodity category.
In another possible implementation, the server may also select a first number of target item categories from a library of item categories. Accordingly, step 307 may be replaced with: and the server selects a first number of target commodity categories from the commodity category library according to the probability that the target semantic information belongs to each commodity category and the number of the commodity categories included in the commodity category library.
In the implementation mode, the server can sort the commodity categories in the commodity category library from big to small according to the probability that the target semantic information belongs to each commodity category, and then select a first number of target commodity categories sorted in the front; or the server sorts the commodity categories from small to large according to the probability, and selects the first quantity of sorted target commodity categories.
The first number may be set and changed according to the number of the categories of the goods included in the goods category library, which is not particularly limited in the embodiment of the present application. For example, the product category library includes 20 product categories, and the first number may be 4, 5, or 6.
The first preset threshold may be set and changed as needed, and is not particularly limited in the embodiment of the present application. For example, the first preset threshold is 0.3, that is, the server selects at least one target commodity category with a probability exceeding 0.3 from the commodity category library.
Step 308: and the server determines the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
In the step, the server allocates position weight to the target commodity category according to the probability that the target semantic information belongs to the target commodity category, wherein the larger the probability is, the larger the corresponding position weight is, and the more front and more obvious the subsequent display position in the commodity interface is.
When the server allocates the position weight to the target commodity category, the target commodity category can be sequentially ordered from large to small or from small to large according to the probability, and then the position weight is allocated to the target commodity category from large to small or from small to large according to the position weight.
In one possible implementation, the server may assign a location weight to the target semantic information directly according to the probability that the target semantic information belongs to the target commodity class.
In another possible implementation manner, the server may further determine the location weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category and the historical search record of the target user.
In this implementation, the server may assign a first weight to each category of goods according to the number of searches for each category of goods in the historical search records. And the server allocates a second weight to the target commodity class according to the probability that the target semantic information belongs to the target commodity class. The server may combine the first weight and the second weight, and use the obtained integrated weight as a location weight of the target commodity category.
In another possible implementation manner, the server may further determine the location weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category and the historical purchase record of the target user.
In this implementation, the server may assign a first weight to each category of goods according to the purchase quantity of each category of goods in the historical purchase record. And the server allocates a second weight to the target commodity class according to the probability that the target semantic information belongs to the target commodity class. The server may combine the first weight and the second weight, and use the obtained integrated weight as a location weight of the target commodity category.
The server determines the position weight of the target commodity category according to the probability, so that the target commodity most probably wanted by the user can be preferentially displayed in the commodity interface under the condition of meaning of a word, and the user experience is improved.
Step 309: and the server determines the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category.
This step can be realized by the following steps (1) to (2), including:
(1) and the server sorts the target commodity categories according to the position weights of the target commodity categories to obtain a second category sequence.
The position weights corresponding to different target commodity categories are different, and the server can sort the position weights from large to small or from small to large to obtain a second category sequence.
(2) The server determines a target commodity corresponding to the target commodity category.
The different categories of target merchandise include different target merchandise, and the different categories of target merchandise generally include a plurality of target merchandise.
The target commodity categories obtained by the server through the step 304-305 and the target commodity categories obtained by the step 306-308 are generally multiple, and in this step, the server obtains the target commodity corresponding to each commodity category from the commodity repository.
In a possible implementation manner, when the server obtains the target commodities corresponding to each commodity category from the commodity repository, a second number of target commodities may be randomly selected from a plurality of target commodities included in each commodity category, or the second number of target commodities may be selected according to a historical sales record of each target commodity, or the second number of target commodities may be selected according to a storage order of the target commodities in the commodity repository. In the embodiments of the present application, this is not particularly limited.
For example, the target semantic information is "strawberry", the user may want to search for fruit, or strawberry-flavored yogurt, or strawberry-flavored cookies, and the target commodity categories obtained according to the above method include "fruit", "yogurt", and "cookies". The target commodity category 'fruit' can comprise strawberries of different varieties and strawberries of different prices, the target commodity category 'yoghourt' can comprise strawberry-flavored yoghourt of different brands, strawberry-flavored yoghourt of different production dates, and the target commodity category 'biscuit' can comprise strawberry-flavored biscuits of different brands and strawberry-flavored biscuits of different packaging contents. The server may select a second number of target items from the item repository based on the historical sales record for each target item.
The second number may be set and changed as necessary, and is not particularly limited in the embodiment of the present application. For example, the second number may be 3, 4, or 5.
In a possible implementation manner, the server may determine the target product corresponding to the target product category according to the position weight of the target product category. The position weights of the target commodity categories are different, the number of the corresponding target commodities is different, and the larger the position weight of the target commodity category is, the larger the number of the corresponding target commodities is.
For example, if the position weight of the target commodity category "fruit" is the largest, "yogurt" is the second, "biscuit" is the smallest, the server determines that the number of target commodities corresponding to "fruit" is greater than the number of target commodities corresponding to "yogurt", and the number of target commodities corresponding to "yogurt" is greater than the number of target commodities corresponding to "biscuit".
In a possible implementation manner, the target product corresponding to the target product category may be a product corresponding to the target semantic information, that is, the target semantic information is "strawberry", and the target product is strawberries of different varieties or strawberries of different prices. In another possible implementation manner, the target product corresponding to the target product category may also be a related product related to the target semantic information. The related commodities can be the temporary commodities close to the quality guarantee period, so that the sales of the temporary commodities can be promoted to a certain extent, and the overall benefits are improved. Namely, the target semantic information is strawberry, and the related commodities are Hami melon and salad sauce, wherein the Hami melon and the strawberry belong to fruits, and the salad sauce and the strawberry can be matched to prepare fruit salad.
(3) And the server determines the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
When the server sorts the target commodity categories according to the position weights from large to small in the step (1), in the step, the position of the target commodity category in the second category sequence is more front, and the display position of the corresponding target commodity in the commodity interface is more front and more obvious.
When the server sorts the target commodity categories from small to large according to the position weights in the step (1), in the step, the more backward the position of the target commodity category in the second category sequence is, the more forward the display position of the corresponding target commodity in the commodity interface is, the more obvious the display position is.
For multiple target commodities under the same target commodity category, in one possible implementation manner, the server may determine the position information of each target commodity in the commodity interface according to the historical sales record of each target commodity. The larger the historical sales quantity is, the more front and obvious the display position of the target commodity in the commodity interface is. In another possible implementation manner, the server may also determine the position information of each target commodity in the commodity interface according to a historical adding record of each target commodity added to the shopping cart. The larger the number of the historical cars added, the more front and obvious the display position of the target commodity in the commodity interface. In another possible implementation manner, the server may further determine the location information of each target product in the product interface according to the historical purchase record of each target product by the target user. The larger the purchase quantity of the target commodity of the target user is, the more forward the display position of the target commodity in the commodity interface is.
In the embodiment of the application, the server sorts the target commodity categories according to the position weights of the target commodity categories, and further sorts the target commodities obtained by searching according to the satisfaction degree of different commodity categories on the search requests of the users, so that the users can be helped to find the needed commodities more quickly and better.
When the server determines the target commodity category and the position weight thereof through the offline text library and the first category judgment model, referring to fig. 4, it can be seen from fig. 4 that: the server obtains the first sample semantic information and the second sample semantic information, and then trains the model to obtain a first category discrimination model. The server carries out model test on the first category discrimination model, when the test is passed and the target user searches for the commodity, the server determines the categories and the position weight of the target commodity through the offline text base and the first category discrimination model, and then determines the position information of the target commodity corresponding to each category of the target commodity in the commodity interface according to the position weight.
Step 310: the server returns the commodity information and the position information of the target commodity to the terminal.
And after determining the position information of the target commodity in the commodity interface, the server sends the commodity information and the position information of the target commodity to the terminal.
In one possible implementation manner, the target products under different target product categories may be located in the same display area, or may be located in different display areas. And when the target commodities under different target commodity categories are positioned in the same display area, the server sends commodity information and position information of the target commodities under different target commodity categories to the terminal. When the target commodities under different target commodity categories are located in different display areas, the server determines the display area corresponding to each target commodity category according to the position weight of the target commodity category, and sends commodity information and position information of the target commodities under the target commodity category in each display area to the terminal.
Step 311: and the terminal receives the commodity information and the position information of the target commodity sent by the server, and displays the commodity information at a display position corresponding to the position information of the target commodity in the commodity interface.
The terminal receives the commodity information and the position information of the target commodity, and the commodity information of the target commodity is rendered at a display position corresponding to the position information of the target commodity in the commodity interface, so that a target user can select the target commodity under the target commodity category required by the target user.
The commodity searching method provided by the embodiment of the application responds to a target searching request of a terminal, and obtains target semantic information of a short text in the target searching request; determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information; determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category; and returning the commodity information and the position information of the target commodity to the terminal. The method can directly judge the target commodity category according to the target semantic information of the target search request, does not need manual configuration, and has strong generalization capability. And according to the obtained position weight of the target commodity category, determining the position information of the target commodity corresponding to the target commodity category in the commodity interface, so that the commodity required by the user can be displayed in the commodity interface preferentially.
An embodiment of the present application provides a commodity search device, and referring to fig. 5, the device includes:
a first obtaining module 501, configured to respond to a target search request of a terminal, and obtain target semantic information of a short text in the target search request;
a first determining module 502, configured to determine, according to the target semantic information, at least one target commodity category and a position weight of the target commodity category corresponding to the target semantic information;
a second determining module 503, configured to determine, according to the position weight of the target commodity category, position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested;
and a returning module 504, configured to return the commodity information and the location information of the target commodity to the terminal.
In a possible implementation manner, the first determining module 502 is further configured to input the target semantic information into the first category distinguishing model, so as to obtain a probability that the target semantic information belongs to each commodity category in the commodity category library; selecting at least one target commodity category with the probability exceeding a first preset threshold from a commodity category library according to the probability that the target semantic information belongs to each commodity category; and determining the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
In another possible implementation manner, the apparatus further includes:
the searching module is used for searching an offline text base according to the target semantic information, and the offline text base stores the corresponding relation between the historical semantic information and the first category sequence;
and the input module is used for responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, inputting the target semantic information into the first category judgment model, and obtaining the probability that the target semantic information belongs to each commodity category in the commodity category library.
In another possible implementation manner, the apparatus further includes:
the third determining module is used for responding to the existence of historical semantic information matched with the target semantic information in the offline text library and taking the commodity category in the first category sequence corresponding to the historical semantic information as the target commodity category; and determining the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
In another possible implementation manner, the second determining module 503 is configured to sort the target product categories according to the position weights of the target product categories to obtain a second category sequence; determining a target commodity corresponding to the target commodity category; and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
In another possible implementation manner, the apparatus further includes:
the second acquisition module is used for acquiring first description information of sample commodities and corresponding first commodity categories thereof, and second sample semantic information corresponding to the first historical search requests in a plurality of seasons and corresponding second commodity categories thereof;
the word segmentation module is used for segmenting the first description information to obtain a plurality of keywords;
the combination module is used for recombining the keywords to obtain first sample semantic information;
and the training module is used for training the second category discrimination model according to the first sample semantic information and the corresponding first commodity category thereof, and the second sample semantic information and the corresponding second commodity category thereof to obtain the first category discrimination model.
In another possible implementation manner, the apparatus further includes:
the third acquisition module is used for acquiring a historical search record, wherein the historical search record comprises historical semantic information of a short text in a historical search request and historical commodity categories of clicked commodity information in a commodity interface acquired through the historical semantic information;
the fourth determining module is used for determining the commodity category corresponding to the historical semantic information through the first category distinguishing model according to the historical semantic information;
the fifth determining module is used for determining the accuracy of the first category discrimination model according to the commodity category corresponding to the historical semantic information and the historical commodity category;
and the input module is also used for inputting the target semantic information into the first category judgment model in response to the accuracy rate not less than a second preset threshold value so as to obtain the probability that the target semantic information belongs to each commodity category in the commodity category library.
The commodity searching device provided by the embodiment of the application responds to a target searching request of a terminal, and obtains target semantic information of a short text in the target searching request; determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information; determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category; and returning the commodity information and the position information of the target commodity to the terminal. The device can directly judge the target commodity category according to the target semantic information of the target search request, does not need manual configuration, and has strong generalization capability. And according to the obtained position weight of the target commodity category, determining the position information of the target commodity corresponding to the target commodity category in the commodity interface, so that the commodity required by the user can be displayed in the commodity interface preferentially.
Fig. 6 is a block diagram of a server 600 according to an embodiment of the present disclosure. The server 600 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 601 and one or more memories 602, where at least one program code is stored in the memory 602, and is loaded and executed by the processor 601 to implement the methods provided by the above method embodiments. Of course, the server 600 may also have components such as a wired or wireless network interface, a keyboard, and an input/output interface, so as to perform input and output, and the server 600 may also include other components for implementing the functions of the device, which is not described herein again.
The embodiment of the present application further provides a computer-readable storage medium, which is applied to a server, and at least one program code is stored in the computer-readable storage medium, and the at least one program code is loaded and executed by a processor, so as to implement the operations executed by the server in the product search method of the foregoing embodiment.
The above description is only for facilitating the understanding of the technical solutions of the present application by those skilled in the art, and is not intended to limit the present application. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (10)

1. A method for searching for an item, the method comprising:
responding to a target search request of a terminal, and acquiring target semantic information of a short text in the target search request;
determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information;
determining the position information of the target commodity corresponding to the target commodity category in a commodity interface to be requested according to the position weight of the target commodity category;
and returning the commodity information and the position information of the target commodity to the terminal.
2. The method according to claim 1, wherein the determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information comprises:
inputting the target semantic information into a first category discrimination model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library;
selecting at least one target commodity category with the probability exceeding a first preset threshold value from the commodity category library according to the probability that the target semantic information belongs to each commodity category;
and determining the position weight of the target commodity category according to the probability that the target semantic information belongs to the target commodity category.
3. The method of claim 2, wherein before entering the target semantic information into a first category discriminant model to obtain a probability that the target semantic information belongs to each item in a library of item categories, the method further comprises:
searching an offline text base according to the target semantic information, wherein the offline text base stores the corresponding relation between the historical semantic information and the first category sequence;
and responding to the fact that no historical semantic information matched with the target semantic information exists in the offline text library, and executing the step of inputting the target semantic information into a first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library.
4. The method of claim 3, further comprising:
responding to the fact that historical semantic information matched with the target semantic information exists in the offline text base, and taking the commodity category in a first category sequence corresponding to the historical semantic information as the target commodity category;
and determining the position weight of the target commodity category according to the position of the commodity category in the first category sequence.
5. The method according to claim 1, wherein the determining, according to the position weight of the target commodity category, the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested includes:
sequencing the target commodity categories according to the position weights of the target commodity categories to obtain a second category sequence;
determining a target commodity corresponding to the target commodity category;
and determining the position information of the target commodity corresponding to the target commodity category in the commodity interface according to the position of the target commodity category in the second category sequence.
6. The method of claim 2, further comprising:
acquiring first description information of sample commodities and a first commodity category corresponding to the first description information, and second sample semantic information corresponding to a first historical search request in a plurality of seasons and a second commodity category corresponding to the second sample semantic information;
segmenting the first description information to obtain a plurality of keywords;
recombining the keywords to obtain first sample semantic information;
and training a second category discrimination model according to the first sample semantic information and a first commodity category corresponding to the first sample semantic information, and the second sample semantic information and a second commodity category corresponding to the second sample semantic information to obtain the first category discrimination model.
7. The method of claim 6, wherein after the second category identification model is trained according to the first sample semantic information and the corresponding first commodity category, and the second sample semantic information and the corresponding second commodity category, the method further comprises:
acquiring a history search record, wherein the history search record comprises history semantic information of a short text in a history search request and history commodity categories of clicked commodity information in a commodity interface acquired through the history semantic information;
determining the commodity category corresponding to the historical semantic information through the first category distinguishing model according to the historical semantic information;
determining the accuracy of the first category discrimination model discrimination according to the commodity category corresponding to the historical semantic information and the historical commodity category;
and responding to the fact that the accuracy is not smaller than a second preset threshold value, and executing the step of inputting the target semantic information into a first category judgment model to obtain the probability that the target semantic information belongs to each commodity category in a commodity category library.
8. An article search apparatus, characterized in that the apparatus comprises:
the first acquisition module is used for responding to a target search request of a terminal and acquiring target semantic information of a short text in the target search request;
the first determining module is used for determining at least one target commodity category corresponding to the target semantic information and the position weight of the target commodity category according to the target semantic information;
the second determining module is used for determining the position information of the target commodity corresponding to the target commodity category in the commodity interface to be requested according to the position weight of the target commodity category;
and the return module is used for returning the commodity information and the position information of the target commodity to the terminal.
9. A server, characterized in that the server comprises a processor and a memory, wherein at least one program code is stored in the memory, and the at least one program code is loaded and executed by the processor to realize the goods search method according to any one of claims 1 to 7.
10. A computer-readable storage medium having at least one program code stored therein, the at least one program code being loaded and executed by a processor to implement the item search method according to any one of claims 1 to 7.
CN201911392939.6A 2019-12-30 2019-12-30 Commodity searching method, commodity searching device, server and storage medium Pending CN111159552A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911392939.6A CN111159552A (en) 2019-12-30 2019-12-30 Commodity searching method, commodity searching device, server and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911392939.6A CN111159552A (en) 2019-12-30 2019-12-30 Commodity searching method, commodity searching device, server and storage medium

Publications (1)

Publication Number Publication Date
CN111159552A true CN111159552A (en) 2020-05-15

Family

ID=70559421

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911392939.6A Pending CN111159552A (en) 2019-12-30 2019-12-30 Commodity searching method, commodity searching device, server and storage medium

Country Status (1)

Country Link
CN (1) CN111159552A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115858568A (en) * 2022-07-21 2023-03-28 北京百度网讯科技有限公司 Model training method and device based on context, electronic equipment and storage medium
WO2023109292A1 (en) * 2021-12-14 2023-06-22 北京字跳网络技术有限公司 Search result display method and apparatus, computer device, and storage medium

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236663A (en) * 2010-04-30 2011-11-09 阿里巴巴集团控股有限公司 Query method, query system and query device based on vertical search
CN102479366A (en) * 2010-11-25 2012-05-30 阿里巴巴集团控股有限公司 Commodity recommending method and system
CN103810198A (en) * 2012-11-09 2014-05-21 阿里巴巴集团控股有限公司 Method and device for searching commodity information
CN104424296A (en) * 2013-09-02 2015-03-18 阿里巴巴集团控股有限公司 Query word classifying method and query word classifying device
CN104750713A (en) * 2013-12-27 2015-07-01 阿里巴巴集团控股有限公司 Method and device for sorting search results
CN104778176A (en) * 2014-01-13 2015-07-15 阿里巴巴集团控股有限公司 Data search processing method and device
CN104866623A (en) * 2015-06-11 2015-08-26 郑州悉知信息技术有限公司 Searching method and searching server
CN104881497A (en) * 2015-06-17 2015-09-02 郑州悉知信息技术有限公司 Searching method and client
CN104933149A (en) * 2015-06-23 2015-09-23 郑州悉知信息技术有限公司 Information searching method and information searching device
CN105468680A (en) * 2015-11-16 2016-04-06 中国建设银行股份有限公司 Data retrieval method and device
US20160360336A1 (en) * 2015-05-27 2016-12-08 Apple Inc. Systems and Methods for Proactively Identifying and Surfacing Relevant Content on a Touch-Sensitive Device
CN107704892A (en) * 2017-11-07 2018-02-16 宁波爱信诺航天信息有限公司 A kind of commodity code sorting technique and system based on Bayesian model
CN107908615A (en) * 2017-10-17 2018-04-13 北京京东尚科信息技术有限公司 A kind of method and apparatus for obtaining search term corresponding goods classification
WO2018106974A1 (en) * 2016-12-08 2018-06-14 MetaSense Digital Marketing Management Inc. Content validation and coding for search engine optimization
CN108665064A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 Neural network model training, object recommendation method and device
EP3447624A1 (en) * 2015-05-27 2019-02-27 Apple Inc. Systems and methods for proactively identifying and surfacing relevant content on a touch-sensitive device
CN110490712A (en) * 2019-08-21 2019-11-22 浙江中国轻纺城网络有限公司 A kind of commodity class heading search method, system and storage medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102236663A (en) * 2010-04-30 2011-11-09 阿里巴巴集团控股有限公司 Query method, query system and query device based on vertical search
CN102479366A (en) * 2010-11-25 2012-05-30 阿里巴巴集团控股有限公司 Commodity recommending method and system
CN103810198A (en) * 2012-11-09 2014-05-21 阿里巴巴集团控股有限公司 Method and device for searching commodity information
CN104424296A (en) * 2013-09-02 2015-03-18 阿里巴巴集团控股有限公司 Query word classifying method and query word classifying device
CN104750713A (en) * 2013-12-27 2015-07-01 阿里巴巴集团控股有限公司 Method and device for sorting search results
CN104778176A (en) * 2014-01-13 2015-07-15 阿里巴巴集团控股有限公司 Data search processing method and device
US20160360336A1 (en) * 2015-05-27 2016-12-08 Apple Inc. Systems and Methods for Proactively Identifying and Surfacing Relevant Content on a Touch-Sensitive Device
EP3447624A1 (en) * 2015-05-27 2019-02-27 Apple Inc. Systems and methods for proactively identifying and surfacing relevant content on a touch-sensitive device
CN104866623A (en) * 2015-06-11 2015-08-26 郑州悉知信息技术有限公司 Searching method and searching server
CN104881497A (en) * 2015-06-17 2015-09-02 郑州悉知信息技术有限公司 Searching method and client
CN104933149A (en) * 2015-06-23 2015-09-23 郑州悉知信息技术有限公司 Information searching method and information searching device
CN105468680A (en) * 2015-11-16 2016-04-06 中国建设银行股份有限公司 Data retrieval method and device
WO2018106974A1 (en) * 2016-12-08 2018-06-14 MetaSense Digital Marketing Management Inc. Content validation and coding for search engine optimization
CN108665064A (en) * 2017-03-31 2018-10-16 阿里巴巴集团控股有限公司 Neural network model training, object recommendation method and device
CN107908615A (en) * 2017-10-17 2018-04-13 北京京东尚科信息技术有限公司 A kind of method and apparatus for obtaining search term corresponding goods classification
CN107704892A (en) * 2017-11-07 2018-02-16 宁波爱信诺航天信息有限公司 A kind of commodity code sorting technique and system based on Bayesian model
CN110490712A (en) * 2019-08-21 2019-11-22 浙江中国轻纺城网络有限公司 A kind of commodity class heading search method, system and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109292A1 (en) * 2021-12-14 2023-06-22 北京字跳网络技术有限公司 Search result display method and apparatus, computer device, and storage medium
CN115858568A (en) * 2022-07-21 2023-03-28 北京百度网讯科技有限公司 Model training method and device based on context, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Osadchiy et al. Recommender system based on pairwise association rules
KR101511050B1 (en) Method, apparatus, system and computer program for offering and displaying a product information
CN109635198B (en) Method, device, medium and electronic equipment for presenting user search results on commodity display platform
CN107516235B (en) Commodity preference estimation method and device
CN108520450B (en) Recommendation method and system for local low-rank matrix approximation based on implicit feedback information
CN108537596B (en) Method, device and system for recommending vehicle type in search box and memory
KR102227552B1 (en) System for providing context awareness algorithm based restaurant sorting personalized service using review category
CN106708821A (en) User personalized shopping behavior-based commodity recommendation method
CN105718184A (en) Data processing method and apparatus
CN109214955B (en) Method and device for generating meal package
CN110264291B (en) Information recommendation method and device
JP2002150071A (en) Method and device for searching commodities
CN110532351B (en) Recommendation word display method, device and equipment and computer readable storage medium
CN111506849A (en) Page generation method and device
CN103020240A (en) Commodity search method of online shopping platform
CN111047412A (en) Big data electricity merchant operation platform
CN106126544B (en) Internet content delivery method and device
CN110727859B (en) Recommendation information pushing method and device
US20210287271A1 (en) Determining recommended search terms for a user of an online concierge system
CN111159552A (en) Commodity searching method, commodity searching device, server and storage medium
CN110990695A (en) Recommendation system content recall method and device
CN111428007B (en) Cross-platform based synchronous push feedback method
CN107833088A (en) Content providing, device and smart machine
CN111815413A (en) Big data commodity prediction system and method based on hot event
WO2022001349A1 (en) Method and device for information analysis

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20211130

Address after: Room 084, No. 1-309, 3rd floor, commercial building, No. 9 Wangjing street, Chaoyang District, Beijing 100102

Applicant after: Beijing Daily Youxian Technology Co.,Ltd.

Address before: 100102 room 801, 08 / F, building 7, yard 34, Chuangyuan Road, Chaoyang District, Beijing

Applicant before: BEIJING MISSFRESH E-COMMERCE Co.,Ltd.

WD01 Invention patent application deemed withdrawn after publication
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20200515