Information query method and related equipment

By performing word segmentation processing and determining synonyms and error correction words on the query statement, and searching them as keywords, the problem that existing search solutions cannot meet the needs of diversified searches is solved, and the diversified search of query statements and the efficiency of product recommendations is improved.

CN119884154APending Publication Date: 2025-04-25BUSINESS LINE COMMERCIAL PTE LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510040346.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-09
Publication Date
2025-04-25

AI Technical Summary

Technical Problem

The existing search solutions cannot meet the diverse search needs, cannot stem the word segmentation process of query statements, and cannot match the stemming results, synonyms or error correction words in the search field to find product information that meets user requirements.

Method used

Provide an information query method. By performing word segmentation processing on the query statement, synonyms and error correction words of the word segmentation are determined, and word segmentation, synonyms and error correction words are used as keywords. Search for keywords based on these keywords and search fields, and search for keywords in the search field through the word segmentation device of the search field to obtain product information matching the keywords.

Benefits of technology

It realizes the stemming processing of the word segmentation in the query sentence, and match searches in the search field based on the stemming results, synonyms or error correction words of the word segmentation, to meet the diverse search needs of query sentences, and improves the efficiency and user experience of product recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119884154A_ABST
    Figure CN119884154A_ABST
Patent Text Reader

Abstract

The invention relates to an information query method and related equipment. The method comprises the following steps: performing word segmentation processing on a query statement to obtain segmented words; determining synonyms and error correction words of the segmented words, and taking the segmented words, the synonyms and the error correction words as keywords; and generating a retrieval statement according to the keyword and the retrieval field, responding to the retrieval statement, and searching the keyword in the retrieval field through a word segmentation device of the retrieval field to obtain commodity information matched with the keyword. According to the method and the device, the commodity information meeting the user requirements can be found by matching the synonym or the error correction word of the segmented word in the retrieval field according to the word drying result of the segmented word, so that the diversified retrieval requirements of the query statement are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information retrieval technology, and in particular to an information query method and related equipment. Background Art

[0002] Due to the openness of e-commerce platforms, merchants on e-commerce platforms usually expect the store's search fields to be configurable. When merchants configure the store's search box, they need to configure the search fields in terms of title (Title), product code (SKU), and brand (Brand), and they need to meet the diverse search effects. For example, each word segment of the query statement (Query) entered in the input box needs to match the search field to ensure the accuracy of the search effect; when searching the title search field, it is necessary to stem the word segment to obtain the word root of the word segment, and search for the stemmed word root, the synonyms, synonyms, or error correction words of the word segment. However, the existing query scheme cannot meet the diverse search needs when searching the query statement. Summary of the invention

[0003] In view of the above, it is necessary to provide an information query method, an electronic device and a storage medium to solve the technical problem that the existing search schemes cannot meet the diverse search needs.

[0004] In a first aspect, the present application provides an information query method, the method comprising: performing word segmentation processing on a query statement to obtain word segments; determining synonyms and error correction words of the word segments, and using the word segments, the synonyms, and the error correction words as keywords; generating a search statement based on the keywords and a search field, responding to the search statement, searching for keywords in the search field through a word segmenter of the search field, and obtaining product information matching the keywords.

[0005] In some embodiments of the present application, the search fields include a title search field, a product code search field, and a brand search field, and the method further includes: configuring the word segmenter of the title search field as a first word segmenter; configuring the word segmenter of the product code search field as a second word segmenter; configuring the word segmenter of the brand search field as a third word segmenter.

[0006] In some embodiments of the present application, the word segmenter through the search field searches for keywords in the search field to obtain product information matching the keywords, including: performing semantic segmentation on the keywords through the first word segmenter to obtain first segmented words, and extracting the stem of the first segmented words, and querying the title search field for product information matching the first segmented words or the stem of the first segmented words; performing prefix segmentation on the keywords through the second word segmenter to obtain second segmented words, and querying the product code search field for product information matching the second segmented words; performing semantic segmentation on the keywords through the third word segmenter to obtain third segmented words, and querying the brand code search field for product information matching the third segmented words.

[0007] In some embodiments of the present application, the keyword includes multiple keywords, and generating a search statement based on the keywords and the search field includes: constructing match query sub-statements of all keywords, and combining the match query sub-statements of each keyword to obtain a search statement.

[0008] In some embodiments of the present application, the construction of match query sub-statements for all keywords and combining the match query sub-statements of each keyword to obtain a search statement include: constructing a match query sub-statement for each keyword in the title search field, the product code search field, and the brand search field; combining the match query sub-statements of each keyword in the title search field, the product code search field, and the brand search field with an "OR" logical statement to obtain a match combination statement; combining match combination statements belonging to different participles with an "AND" logical statement, and combining match combination statements belonging to the same participle with an "OR" logical statement to obtain a search statement.

[0009] In some embodiments of the present application, generating a search statement according to the keywords and the search field, responding to the search statement, searching the keywords in the search field through the word segmenter of the search field, and obtaining product information matching the keywords, includes: setting the weight of the keywords; generating the search statement according to the keywords, the weight of the keywords and the search field; responding to the search statement, searching the keywords in the search field through the word segmenter of the search field, obtaining product information matching the keywords, and adjusting the relevance score of the product information according to the weight of the keywords.

[0010] In some embodiments of the present application, setting the weight of the keyword includes: if the keyword is the participle, setting the keyword to a first weight; if the keyword is a synonym of the participle, setting the keyword to a second weight; if the keyword is a correction word for the participle, setting the keyword to a third weight; wherein the second weight is less than the first weight, and the third weight is greater than the first weight.

[0011] In some embodiments of the present application, the method further includes: sorting and displaying the product information according to the relevance score of the product information.

[0012] In a second aspect, the present application provides an electronic device, comprising a memory and a processor: the memory is used to store program instructions; the processor is used to read and execute the program instructions stored in the memory, and when the program instructions are executed by the processor, the electronic device executes the above-mentioned information query method.

[0013] In a third aspect, the present application provides a computer storage medium, wherein the computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the above-mentioned information query method.

[0014] The embodiment of the present application can determine the segmentation of the query statement, as well as the synonyms and error correction words of the segmentation, and use the segmentation, synonyms and error correction words as keywords, and generate a search statement based on the keywords and the search field, respond to the search statement, search the keywords in the search field through the segmentation device of the search field, and obtain product information matching the keywords, thereby achieving stemming processing of the segmentation of the query statement, and at the same time, it is also possible to match the product information that meets the user's requirements in the search field according to the stemming results of the segmentation, the synonyms of the segmentation or the error correction words, thereby achieving diversified search needs for the query statement. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 An application scenario diagram of the information query method provided in an embodiment of the present application.

[0016] Figure 2 A flowchart of an information query method provided in an embodiment of the present application.

[0017] Figure 3 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0018] In order to more clearly understand the above-mentioned objects, features and advantages of the present application, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing the embodiments in one embodiment and are not intended to limit this application.

[0020] It should be noted that the terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way.

[0021] It should also be noted that the method disclosed in the embodiments of the present application or the method shown in the flowchart includes one or more steps for implementing the method. Without departing from the scope of the claims, the execution order of multiple steps can be interchanged with each other, and some steps can also be deleted. Some embodiments will be described below in conjunction with the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.

[0022] Due to the openness of e-commerce platforms, merchants on e-commerce platforms usually expect the store's search fields to be configurable. The search field stores product attribute information. By searching in the search field through a query statement, you can find the product information corresponding to the product attribute information that matches the query statement. When configuring the store's search box, merchants need to search in the three search fields of title, product code (SKU), and brand (Brand), and at the same time, they need to meet the preset search effect. For example, each word segmentation of the query statement needs to exist in any of the three search fields to ensure the accuracy of the search effect; when searching the title search field, it is necessary to stem the word segmentation to obtain the word root, and search the stemmed word root, synonyms, synonyms or error correction words of the word segmentation; when searching the product code search field, it is necessary to perform prefix matching on the word segmentation; when searching the brand search field, it is not necessary to stem the word segmentation.

[0023] However, existing query solutions cannot stem the word segmentation of query statements when searching for query statements, nor can they match the stemming results, word segmentation, synonyms of word segmentation or error correction words in the search field to find product information that meets user requirements. It is impossible to meet the diversified search requirements for query statements, resulting in low efficiency in product recommendation.

[0024] In order to solve the above technical problems, the present application embodiment provides an information query method. Figure 1 The figure is an application scenario diagram of the information query method provided in the embodiment of the present application. The information query method is applied in Figure 1 In the network architecture shown in Figure 1 In the network architecture shown, the e-commerce platform 10 is deployed on the Internet to provide corresponding services to its users. Similarly, the devices 20 of the merchant users of the e-commerce platform 10 and the devices 30 of the consumer users are also connected to the Internet to use the services provided by the e-commerce platform.

[0025] The exemplary e-commerce platform 10 provides supply and demand matching of products and / or services to the general public with the help of Internet infrastructure. In the e-commerce platform 10, products and / or services are provided as commodity information. To simplify the description, the concepts of commodity, product, etc. are used in this application to refer to the products and / or services in the e-commerce platform 10, which may specifically be physical products, digital products, tickets, service subscriptions, other offline services, etc.

[0026] In reality, all entities can access the e-commerce platform 10 as users, use the various online services provided by the e-commerce platform 10, and achieve the purpose of participating in the business activities achieved by the e-commerce platform 10. These entities can be natural persons, legal persons or social organizations, etc. Corresponding to the two types of entities, merchants and consumers in business activities, the e-commerce platform 10 has two types of users, merchant users and consumer users. In business activities, all entities in the product distribution chain, including manufacturers, sellers, retailers, logistics providers, etc., can use online services in the e-commerce platform 10 as merchant users, while consumers in business activities, including real or potential consumers, can use online services in the e-commerce platform 10 as their corresponding consumer users. In actual business activities, the same entity can act as both a merchant user and a consumer user, and this should be understood flexibly.

[0027] The infrastructure used to deploy the e-commerce platform 10 mainly includes the backend architecture and front-end devices. The backend architecture runs various online services through the service cluster, including middleware or front-end services for the platform, services for consumers, services for merchants, etc., to enrich and improve its service functions; the front-end devices mainly cover the terminal devices used by users to access the e-commerce platform 10 as clients, including but not limited to various mobile terminals, personal computers, point-of-sale devices, etc. For example, merchant users can use device 20 to enter product information for their online stores, or use the interface opened by the e-commerce platform to generate their product information; consumer users can use device 30 to access the webpage of the online store implemented by the e-commerce platform 10, trigger the shopping process through the shopping button provided on the webpage, and call various online services provided by the e-commerce platform 10 in the shopping process, so as to achieve the purpose of shopping orders.

[0028] In some embodiments, the e-commerce platform 10 may be implemented by a processing facility including a processor and a memory, the processing facility storing a set of instructions that, when executed, cause the e-commerce platform 10 to perform the e-commerce and support functions involved in the present application. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, fixed computing platform, or other computing platform, and provides electronic components, merchant equipment, payment gateways, application developers, marketing channels, transportation providers, customer equipment, point-of-sale equipment, etc. of the e-commerce platform 10.

[0029] The e-commerce platform 10 can be implemented as an online service such as cloud computing service, software as a service (SaaS), infrastructure as a service (IaaS), platform as a service (PaaS), desktop as a service (DaaS), hosted software as a service, mobile backend as a service (MBaaS), information technology management as a service (ITMaaS), etc. In some embodiments, the various functional components of the e-commerce platform 10 can be implemented to be suitable for operation on various platforms and operating systems. For example, for an online store, its administrator user can TM、 Android TM 、HomonyOS TM , or web pages, etc., all have the same or similar functions.

[0030] The e-commerce platform 10 can implement its corresponding independent station for each merchant to run its corresponding online store, and provide the merchant with a corresponding business management engine instance for the merchant to establish, maintain, and run one or more online stores in one or more independent stations. The business management engine instance can be used for content management, task automation, and data management of one or more online stores, and various specific business processes of the online store can be configured through interfaces or built-in components to support the implementation of business activities. The independent station is the infrastructure of the e-commerce platform 10 with cross-border service functions. Merchants can maintain their online stores more centrally and autonomously based on the independent station. Independent stations usually have a domain name and storage space dedicated to merchants, and different independent stations are relatively independent. The e-commerce platform 10 can provide standardized or personalized technical support for a large number of independent stations, so that merchant users can customize their own business management engine instances, and use this business management engine instance to maintain one or more online stores they own.

[0031] The online store of the e-commerce platform 10 or independent station can provide a variety of functions for each consumer, mainly including product search, click, add to cart, browse, like, favorite, forward, order, return, exchange, evaluation, recommendation functions, product order management function, payment management function, product marketing activity function (discount promotion, coupon issuance and use, live broadcast, recorded broadcast playback), logistics management function, customer service support function, and membership service function.

[0032] In order to provide product search functions to its users, the online store of the e-commerce platform 10 or the independent station usually deploys a search engine in the server under its background architecture. The server receives the product search request submitted by the user on his terminal device and responds, and passes the product search request to the search engine. Generally speaking, the search engine adopts a pre-configured search strategy or search mechanism from the pre-created and continuously maintained product information library based on the search conditions and keywords in the product search request, parses the corresponding user search intention, matches the relevant product information, and quickly locates the products that meet the search conditions through the pre-established index structure. After the search is completed, the search engine will return the results to the server, and the server will pass these results back to the user's terminal device and finally display them to the user. The search engine is usually implemented using Elasticsearch, which is a full-text search engine based on Lucene, also known as a distributed search engine, developed in Java, and open source, with distributed HTTP Web and frameless Json documents. The information query method provided by the present application can be programmed as a computer program product and deployed in a client or server for execution. For example, in the exemplary application scenario of the present application, it can be deployed and implemented in the server of an e-commerce customer service platform, thereby accessing the interface opened after the computer program product is running and performing human-computer interaction with the process of the computer program product through a graphical user interface to execute the method.

[0033] The method can obtain a query statement associated with product information input by a user, perform word segmentation on the query statement to obtain word segments; generate a search statement based on the word segments, synonyms of the word segments, error correction words and preset search fields; and perform a search in a product information database based on a word segmenter for calculation statements and search fields to obtain matching product information, thereby improving the efficiency of product recommendation and enhancing user experience.

[0034] refer to Figure 2 The figure is a flow chart of the information query method provided in the embodiment of the present application. Figure 2 The method of the example includes one or more steps, but does not constitute a limitation of the present application. In addition, the order of the steps of the method is only an example, and the order of the steps can be changed. Additional steps can be added or steps can be reduced without departing from the content disclosed in the present application. The method includes the following steps.

[0035] Step S201, configuring a word segmenter for the search field.

[0036] In some embodiments of the present application, the configured search fields include title, product code, and brand. A search field refers to a specific field or attribute used to query and retrieve data. The search field is used to store product attribute information, such as the product's title attribute, product code attribute, brand attribute, price, production date attribute, etc. In some embodiments of the present application, the search field can be pre-configured according to user needs, and the number of pre-configured search fields can be more or less than the title, product code, and brand. For example, in addition to the title, product code, and brand search fields, the pre-configured search fields also include price and production price search fields.

[0037] In some embodiments of the present application, the search engine of the electronic device sets the word segmenter of the search field according to preset rules. In some embodiments of the present application, setting the word segmenter of the search field according to preset rules includes: setting the word segmenter of the title search field as the first word segmenter, wherein the first word segmenter is used to semantically segment the keywords to obtain first segmented words, and extract the stems of the first segmented words; setting the word segmenter of the product code search field as the second word segmenter, wherein the second word segmenter is used to prefix segment the keywords to obtain second segmented words; setting the word segmenter of the brand search field as the third word segmenter, wherein the third word segmenter is used to semantically segment the keywords to obtain third segmented words. In some embodiments of the present application, the first word segmenter and the third word segmenter are ICU (International Components for Unicode) plug-in word segmenters, and the second word segmenter is an edge N-Gram word segmenter.

[0038] In some embodiments of the present application, for example, the keyword is Cats, the first word segmenter performs semantic segmentation on Cats to obtain the first segmented word Cats, and performs stem extraction on the first segmented word Cats to obtain the stem Cat; the second word segmenter performs prefix segmentation on Cats to obtain the second segmented word C, Ca, Cat, Cats; the third word segmenter performs semantic segmentation on Cats to obtain the third segmented word Cats.

[0039] In some embodiments of the present application, the engine may be an Elasticsearch search engine.

[0040] Step S202, performing word segmentation processing on the query statement to obtain word segments.

[0041] In some embodiments of the present application, the search engine obtains the query statement through the search box, and performs word segmentation on the query statement to obtain the word segmentation. In some embodiments of the present application, the search engine can use word segmentation algorithms such as Jieba, Stanford, Hanlp, KCWS word segmenter, THULAC, deep learning, etc. to perform word segmentation on the query statement at the lexical granularity to obtain each word segmentation. In some embodiments of the present application, if the query statement is a text described in a natural language in which words such as English, French, or German are separated by spaces as delimiters, the query statement can be simply segmented at the word granularity by space segmentation to obtain each word in the candidate product information. For example, the user enters the query statement "I lova red" in the search box of the page displayed by the electronic device, and the search engine can obtain the search statement "I lovared" from the search box. The search engine performs word segmentation on the search statement "I lova red" through the above-mentioned preset word segmenter to obtain the word segmentation "I", the word segmentation "lova", and the word segmentation "red".

[0042] Step S203, determine the synonyms and error correction words of the segmentation, and use the segmentation, the synonyms and error correction words of the segmentation as keywords.

[0043] In some embodiments of the present application, the search engine determines the synonyms and error correction words of the segmentation through the algorithm query understanding module. For example, the elasticsearch search engine determines that the segmentation "I" has no synonyms and error correction words; determines that the synonym of the segmentation "lova" is "like" and the error correction word is "love"; determines that the segmentation "red" has no synonyms and error correction words; and uses the segmentation "I", the segmentation "lova", the segmentation "red", the synonym "like" of the segmentation "lova", and the error correction word "love" of the segmentation "lova" as keywords.

[0044] Step S204, generating a search statement according to the keyword and the search field, responding to the search statement, searching the keyword in the search field through the word segmenter of the search field, and obtaining product information matching the keyword.

[0045] In some embodiments of the present application, searching for keywords in the search field through a word segmenter of the search field to obtain product information matching the keywords includes: performing semantic segmentation on the keywords through a first word segmenter to obtain first segmented words, and extracting the stem of the first segmented words, and querying the title search field for product information matching the first segmented words or the stem of the first segmented words; performing prefix segmentation on the keywords through a second word segmenter to obtain second segmented words, and querying the product code search field for product information matching the second segmented words; performing semantic segmentation on the keywords through a third word segmenter to obtain third segmented words, and querying the brand code search field for product information matching the third segmented words.

[0046] For example, for the keyword "Cats", the word segmenter of the title search field performs semantic segmentation on the keyword "Cats" to obtain the first segmented word "Cats", and extracts the first segmented word "Cats" to obtain the stem "Cat"; the product information matching "Cats" or "Cat" is searched in the title search field; if there is product information in the title search field (such as the product information is "Cat") that matches "Cats" or "Cat", it is determined that the product information matching the keyword "Cats" is retrieved in the title search field.

[0047] For example, the word segmenter of the product code search field performs prefix segmentation on the keyword "Cats" to obtain the second segmented words "C", "Ca", "Cat", "Cats", and searches for product information matching "C", "Ca", "Cat", "Cats" in the product code search field; if there is product information in the product code search field (such as the product information is "Ca") that matches "C", "Ca", "Cat", "Cats", it is determined that the product information matching the keyword "Cats" is retrieved in the product code search field.

[0048] For example, for the keyword "Cats", the word segmenter of the brand search field performs semantic segmentation on the keyword "Cats" to obtain the third segmented word "Cats"; the product information matching "Cats" is searched in the brand search field; if there is product information in the brand search field (such as the product information is "Cats") that matches "Cats", it is determined that the product information matching the keyword "Cats" is retrieved in the brand search field.

[0049] In some embodiments of the present application, the keyword includes multiple keywords, and generating a search statement according to the keywords and the search field includes: constructing match query sub-statements of all keywords, and combining the match query sub-statements of each keyword to obtain a search statement.

[0050] Specifically, a match query sub-statement is constructed for each keyword in the title search field, the product code search field, and the brand search field; the match query sub-statements of each keyword in the title search field, the product code search field, and the brand search field are combined with an "OR" logic statement to obtain a match combination statement; the match combination statements belonging to different participles are combined with an "AND" logic statement, and the match combination statements belonging to the same participle are combined with an "OR" logic statement to obtain a search statement. In some embodiments of the present application, the search statement is an Elasticsearch query statement.

[0051] For example, taking the keyword "I" belonging to the participle "I", the keywords "like", "lova", and "love" belonging to the participle "lova", and the keyword "red" belonging to the participle "red" as an example, construct the match query sub-statements of each keyword in the keywords "I", "like", "lova", "love", and "red" in the title search field, the product code search field, and the brand search field respectively; combine the match query sub-statements of each keyword in the keywords "I", "like", "lova", "love", and "red" in the title search field, the product code search field, and the brand search field respectively with the "OR" logical statement to obtain the match combination statement; combine the match combination statements corresponding to different participles "I", "lova", and "red" with the "AND" logical statement, and combine the match combination statements corresponding to the same participle "lova" with the "OR" logical statement to obtain the search statement.

[0052] In some embodiments of the present application, a search statement is generated based on keywords and a search field, and in response to the search statement, the keywords are searched in the search field through a word segmenter of the search field to obtain product information matching the keywords, including: setting keyword weights; generating a search statement based on keywords, keyword weights and a search field; in response to the search statement, the keywords are searched in the search field through a word segmenter of the search field to obtain product information matching the keywords, and adjusting the relevance score of the product information according to the keyword weights.

[0053] In some embodiments of the present application, if the keyword is a segmentation, the keyword is set to a first weight; if the keyword is a synonym of the segmentation, the keyword is set to a second weight; if the keyword is a correction word, the keyword is set to a third weight, wherein the second weight is less than the first weight, and the third weight is greater than the first weight. In the embodiments of the present application, by setting the weight of the synonym of the segmentation to be less than the weight of the corresponding segmentation, the weight of the synonym in determining the relevance score of the product information can be reduced; by setting the weight of the correction word of the segmentation to be greater than the weight of the corresponding segmentation, the weight of the correction word in determining the relevance score of the product information can be increased.

[0054] In some embodiments of the present application, the method further includes: sorting and displaying the product information according to the relevance score of the product information. In the embodiment of the present application, since the higher the relevance score of the product information, the more the product information meets the user's search intention, sorting and displaying the product information according to the relevance score of the product information can improve the user's search efficiency.

[0055] The embodiment of the present application can determine the segmentation of the query statement, as well as the synonyms and error correction words of the segmentation, and use the segmentation, synonyms and error correction words as keywords, and generate a search statement based on the keywords and the search field, respond to the search statement, search the keywords in the search field through the segmentation device of the search field, and obtain product information matching the keywords, thereby achieving stemming processing of the segmentation of the query statement, and at the same time, it is also possible to match the product information that meets the user's requirements in the search field according to the stemming results of the segmentation, the synonyms of the segmentation or the error correction words, thereby meeting the diversified search needs for the query statement.

[0056] Please refer to Figure 3 , which is a schematic diagram of the structure of an electronic device provided in some embodiments of the present application.

[0057] The electronic device 40 may include at least one memory 41, a processor 42 and a communication unit 43. The memory 41 includes a computer-readable storage medium, which is used to store computer programs, such as multiple logic instructions. The communication unit 43 is used to communicate with the electronic device 40 or a server. The processor 42 can run the logic instructions to execute the above-mentioned information query method.

[0058] It can be understood that in some embodiments, the communication unit 43 includes a module with communication function such as a network module, and the present application does not limit this.

[0059] The logic instructions in the above-mentioned computer-readable storage medium can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.

[0060] The computer-readable storage medium may be configured to store software programs, computer-executable programs, such as program instructions corresponding to the information query method in the embodiment of the present application. The processor 42 executes the functional application and image processing by running the software program, instructions or modules stored in the computer-readable storage medium, that is, implementing the information query method in the above embodiment.

[0061] In the implementation mode of the present application, the computer-readable storage medium includes a non-volatile computer-readable memory, such as a disk, a memory, etc. It is understood that the computer-readable storage medium may also include other non-volatile computer-readable memories, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one flash memory device and / or other non-volatile solid-state storage devices.

[0062] In the embodiment of the present application, the processor 42 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 42 is the control center of the electronic device 40, and may be connected to other external devices and / or systems / modules / units using various interfaces and lines to provide base sequencing functions to applications of other external devices and / or systems / modules / units.

[0063] This embodiment also provides a computer program product. When the computer program product runs on a computer, it enables the computer to execute the above-mentioned related steps to implement the information query method in the above-mentioned embodiment.

[0064] Among them, the electronic device, computer storage medium, computer program product or chip provided in this embodiment is used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above and will not be repeated here.

[0065] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0066] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0067] The unit described as a separate component may or may not be physically separated, and the component shown as a unit may be one physical unit or multiple physical units, that is, it may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment.

[0068] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0069] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a device or processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

[0070] The above implementation modes are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the above preferred implementation modes, a person skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.

Claims

1. An information query method, characterized in that: The method comprises: Perform word segmentation on the query statement to obtain word segmentation; Determine the synonyms and error correction words of the segmented words, and use the segmented words, the synonyms and the error correction words as keywords; A search statement is generated according to the keyword and the search field, and in response to the search statement, the keyword is searched in the search field through the word segmenter of the search field to obtain product information matching the keyword.

2. The information query method according to claim 1, characterized in that: The search fields include a title search field, a product code search field, and a brand search field. The method further includes: The word segmenter configured for the title search field is a first word segmenter; The word segmenter configured for the commodity code search field is a second word segmenter; The word segmenter configured for the brand search field is the third word segmenter.

3. The information query method according to claim 2, characterized in that: The word segmenter of the search field searches for keywords in the search field to obtain product information matching the keywords, including: The keyword is semantically segmented by the first word segmenter to obtain a first segmented word, and a stem of the first segmented word is extracted, and product information matching the first segmented word or the stem of the first segmented word is searched in the title search field; Perform prefix segmentation on the keyword by the second word segmenter to obtain second segmented words, and search for product information matching the second segmented words in the product code search field; The keyword is semantically segmented by the third word segmenter to obtain a third segmented word, and the product information matching the third segmented word is searched in the brand code search field.

4. The information query method according to claim 2, characterized in that: The keywords include multiple keywords, and generating a search statement according to the keywords and the search field includes: Construct the match query sub-statements of all keywords, and combine the match query sub-statements of each keyword to obtain the search statement.

5. The information query method according to claim 4, characterized in that: The matching query sub-statements of all keywords are constructed, and the matching query sub-statements of each keyword are combined to obtain a search statement, including: Construct a match query sub-statement for each keyword in the title search field, the product code search field, and the brand search field; Combine the match query sub-statements of each keyword in the title search field, the product code search field, and the brand search field using an "OR" logic statement to obtain a match combination statement; The match combination statements belonging to different participles are combined with the "AND" logic statement, and the match combination statements belonging to the same participle are combined with the "OR" logic statement to obtain the search statement.

6. The information query method according to claim 1, characterized in that: The step of generating a search statement according to the keyword and the search field, responding to the search statement, searching the keyword in the search field through a word segmenter of the search field, and obtaining product information matching the keyword includes: Setting the weight of the keyword; generating the search statement according to the keyword, the weight of the keyword and the search field; In response to the search statement, a keyword is searched in the search field through the word segmenter of the search field to obtain product information matching the keyword, and the relevance score of the product information is adjusted according to the weight of the keyword.

7. The information query method according to claim 6, characterized in that: The step of setting the weight of the keyword includes: If the keyword is the participle, setting the keyword to the first weight; If the keyword is a synonym of the participle, the keyword is set to a second weight; If the keyword is a correction word for the segmented word, setting the keyword to a third weight; The second weight is smaller than the first weight, and the third weight is larger than the first weight.

8. The information query method according to claim 1, characterized in that: The method further comprises: The product information is sorted and displayed according to the relevance score of the product information.

9. An electronic device, characterized in that: The electronic device comprises a memory and a processor: The memory is used to store program instructions; The processor is used to read and execute the program instructions stored in the memory. When the program instructions are executed by the processor, the electronic device executes the information query method as described in any one of claims 1 to 8.

10. A computer storage medium, characterized in that: The computer storage medium stores program instructions, and when the program instructions are executed on an electronic device, the electronic device executes the information query method according to any one of claims 1 to 8.