CN111966894A - Information query method and device, storage medium and electronic equipment - Google Patents
Information query method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN111966894A CN111966894A CN202010776861.4A CN202010776861A CN111966894A CN 111966894 A CN111966894 A CN 111966894A CN 202010776861 A CN202010776861 A CN 202010776861A CN 111966894 A CN111966894 A CN 111966894A
- Authority
- CN
- China
- Prior art keywords
- query
- query result
- vector
- initial
- correlation
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 67
- 238000003860 storage Methods 0.000 title claims abstract description 9
- 239000013598 vector Substances 0.000 claims description 156
- 230000015654 memory Effects 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 26
- 238000001914 filtration Methods 0.000 claims description 10
- 238000004590 computer program Methods 0.000 claims description 5
- 230000000875 corresponding effect Effects 0.000 description 64
- 230000006870 function Effects 0.000 description 15
- 238000000605 extraction Methods 0.000 description 12
- 238000010586 diagram Methods 0.000 description 11
- 230000008569 process Effects 0.000 description 11
- 238000007726 management method Methods 0.000 description 9
- 238000004364 calculation method Methods 0.000 description 8
- 238000004891 communication Methods 0.000 description 8
- 238000004422 calculation algorithm Methods 0.000 description 7
- 238000003062 neural network model Methods 0.000 description 6
- 238000005516 engineering process Methods 0.000 description 5
- 238000013500 data storage Methods 0.000 description 4
- 238000011161 development Methods 0.000 description 4
- 238000009826 distribution Methods 0.000 description 4
- 230000002996 emotional effect Effects 0.000 description 4
- 230000006978 adaptation Effects 0.000 description 3
- 238000004458 analytical method Methods 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 239000008186 active pharmaceutical agent Substances 0.000 description 2
- 238000013528 artificial neural network Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000002596 correlated effect Effects 0.000 description 2
- 238000005314 correlation function Methods 0.000 description 2
- 238000005520 cutting process Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000007477 logistic regression Methods 0.000 description 2
- 238000013507 mapping Methods 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000009877 rendering Methods 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 238000012896 Statistical algorithm Methods 0.000 description 1
- 235000009470 Theobroma cacao Nutrition 0.000 description 1
- 230000002776 aggregation Effects 0.000 description 1
- 238000004220 aggregation Methods 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 244000240602 cacao Species 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000012512 characterization method Methods 0.000 description 1
- 239000003795 chemical substances by application Substances 0.000 description 1
- 238000003066 decision tree Methods 0.000 description 1
- 238000011156 evaluation Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 238000002372 labelling Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 239000000203 mixture Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000011176 pooling Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 230000000306 recurrent effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9536—Search customisation based on social or collaborative filtering
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9538—Presentation of query results
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Health & Medical Sciences (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Health & Medical Sciences (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the application discloses an information query method, an information query device, a storage medium and electronic equipment, wherein the method comprises the following steps: the method comprises the steps of obtaining an input query statement, searching at least one initial query result corresponding to the query statement, determining correlation parameters of the query statement and each initial query result, adjusting the at least one initial query result based on each correlation parameter, and generating a final query result. By adopting the embodiment of the application, the accuracy of information query can be improved.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to an information query method, an information query device, a storage medium, and an electronic device.
Background
With the development of communication technology, network resources become more abundant, and information query services such as search engines are also widely used. For example, when a user inputs a query statement through a user device, an information query service (e.g., a search engine) may perform a matching query in a database (e.g., a search index library) according to the query statement to obtain a query result corresponding to the query statement, so as to provide resource information presented in the query result to the user.
Currently, in the process of information query, the electronic device performs information search based on a query statement input by a user to obtain a plurality of query results corresponding to the query statement, then ranks the query results according to click rate or estimated profit (ECPM) of the query results, and then provides resource information presented in the ranked query results to the user.
Disclosure of Invention
The embodiment of the application provides an information query method, an information query device, a storage medium and electronic equipment, and the accuracy of information query can be improved. The technical scheme of the embodiment of the application is as follows:
in a first aspect, an embodiment of the present application provides an information query method, where the method includes:
acquiring an input query statement, and searching at least one initial query result corresponding to the query statement;
determining the relevance parameters of the query statement and each initial query result respectively;
and adjusting the at least one initial query result based on each correlation parameter to generate a final query result.
In a second aspect, an embodiment of the present application provides an information query apparatus, where the apparatus includes:
the query result searching module is used for acquiring an input query statement and searching at least one initial query result corresponding to the query statement;
a correlation parameter determining module, configured to determine correlation parameters between the query statement and each of the initial query results;
and the query result adjusting module is used for adjusting the at least one initial query result based on each correlation parameter to generate a final query result.
In a third aspect, embodiments of the present application provide a computer storage medium storing a plurality of instructions adapted to be loaded by a processor and to perform the above-mentioned method steps.
In a fourth aspect, an embodiment of the present application provides an electronic device, which may include: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the above-mentioned method steps.
The beneficial effects brought by the technical scheme provided by some embodiments of the application at least comprise:
in one or more embodiments of the present application, an electronic device obtains an input query statement, searches for at least one initial query result corresponding to the query statement, determines a relevance parameter between the query statement and each of the initial query results, and adjusts the at least one initial query result based on each of the relevance parameters to generate a final query result. By determining the relevance parameters of the searched initial query results and the query statement, taking the relevance degree of the initial results and the query statement into reference, and adjusting the initial query results based on the relevance parameters, the problem of low relevance when the query results are determined based on click rate or ECPM can be solved, the accuracy of information query is improved, and the relevance of the query results in the information query is ensured.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic flowchart of an information query method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of another information query method provided in an embodiment of the present application;
fig. 3 is a schematic view of a scenario architecture of information query provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of an information query apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a correlation parameter determining module according to an embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of a correlation parameter calculation unit according to an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a query result adjustment module according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram of another information query device provided in an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of an operating system and a user space provided in an embodiment of the present application;
FIG. 11 is an architectural diagram of the android operating system of FIG. 9;
FIG. 12 is an architecture diagram of the IOS operating system of FIG. 9.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In the description of the present application, it is to be understood that the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. In the description of the present application, it is noted that, unless explicitly stated or limited otherwise, "including" and "having" and any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. The specific meaning of the above terms in the present application can be understood in a specific case by those of ordinary skill in the art. Further, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In the related art, the electronic device performs information search based on a query statement input by a user to obtain a plurality of query results corresponding to the query statement, and then ranks the query results in combination with click rate or estimated profit (ECPM) of the query results.
The present application will be described in detail with reference to specific examples.
In one embodiment, as shown in fig. 1, an information query method is specifically proposed, which can be implemented by means of a computer program and can be run on an information query device based on the von neumann architecture. The computer program may be integrated into the application or may run as a separate tool-like application.
The information inquiry apparatus may be an electronic device with an information inquiry function, and the electronic device includes but is not limited to: a server, a wearable device, a handheld device, a personal computer, a tablet, an in-vehicle device, a smartphone, a computing device, or other processing device connected to a wireless modem, and so forth. Electronic devices in different networks may be called different names, such as: user equipment, access terminal, subscriber unit, subscriber station, mobile station, remote terminal, mobile device, user terminal, wireless communication device, user agent or user equipment, cellular telephone, cordless telephone, Personal Digital Assistant (PDA), electronic device in a 5G network or future evolution network, and the like.
Specifically, the information query method includes:
step S101: the method comprises the steps of obtaining an input query statement, and searching at least one initial query result corresponding to the query statement.
In practical applications, information query becomes an important way for users to obtain internet information, such as a search engine providing search services. When a user queries information through a search service, the query intention may be described by searching for similar query sentences such as query terms, query sentences, etc., and then the information query may be performed by inputting the query sentence through the search service (e.g., a search engine).
In a specific implementation scenario, when a user inputs a query statement through a search service (e.g., a search engine) on an electronic device to perform information query, the electronic device may obtain the query statement input by the user.
In a specific implementation scenario, when a user inputs a query statement through a search service (e.g., a search engine) on a terminal and requests an electronic device (e.g., a server providing a search function) for information query, the electronic device may obtain the query statement input by the user on the terminal.
Specifically, after acquiring a query statement input by a user, the electronic device searches for at least one initial query result corresponding to the query statement.
In the embodiment of the present application, the initial query result is firstly searched based on the query statement, and then the information query method of the embodiment of the present application is continuously executed, so that the search accuracy of the information query is improved, and the search matching degree of the query statement is improved.
In a specific implementation scenario, when the electronic device searches for an initial query result in a provided search service based on a query sentence, the electronic device may extract a keyword from the query sentence, where the keyword may be extracted by a keyword extraction method, for example, the keyword extraction usually uses a specific calculation rule to calculate a weight of each word in an input query sentence of a user, and selects a word with a large weight as the keyword. Searching in the search service directly based on the keywords, for example, by calling a search engine of the home terminal or a third party to query a query result corresponding to the keywords, wherein specifically, the content in the related art can be referred to for searching the initial query result by the search engine based on the keywords, and is not repeated here;
in a specific implementation scenario, when the electronic device searches for an initial query result in the provided search service based on a query statement, the electronic device may combine semantics of the "query statement" term and then generate keywords in a comprehensive manner, for example, a method for generating keywords may generally "understand" the query statement input by the user and then generate some keywords based on the intention of the user (i.e., the semantics of the query statement). By adopting the method, new words (namely, keywords) can be generated, and if a user inputs 'how much we want to know about a mobile phone X', the method of the keyword generation formula can generate different results according to the training corpus. For example, a "handset 8" and a "price" may be generated. That is, new words are generated, and when the words are generated, the probability may be calculated according to a vocabulary made from the corpus, so as to search in a search service based on the keywords, and so on.
It should be noted that there are various ways for determining the initial query result corresponding to the query statement based on the query service, which are listed only for convenience of explanation, and it can be understood that the above ways are not limited to the relevant method steps in the embodiments of the present application, and in specific implementation, the method for determining the initial query result corresponding to the query statement based on the query service in the related art may be used in combination with practical application, and is not described herein again.
Step S102: and determining the relevance parameters of the query statement and each initial query result respectively.
The relevance parameter is used for representing the relevance between the initial query result and the query statement, and can also be understood as the semantic similarity between the initial query result and the query statement.
In practical application, the electronic device performs feature vector expression on the semantic feature information of the query statement and the result feature information of the initial query result based on the relevant neural network model and performs feature vector expression on the result feature information of the initial query result, then, based on a pre-created relevance model, performing feature vector expression on the query statement and the initial query result based on the relevance model, such as using a neural network model to characterize Query and item as semantic vectors with certain dimension, and quantizing the two semantic vectors by a set correlation function, thereby outputting the correlation parameters of the query statement and the initial query result, it can be understood that when the initial query result corresponds to a plurality of results, the correlation parameters of the query statement and each initial query result can be obtained.
By obtaining sample data (including a plurality of sample query statements and a plurality of sample query results corresponding to each sample query statement) in an actual application environment, extracting feature information (that is, extracting semantic feature information of the sample query statements and result feature information of the sample query results), and labeling parameter results corresponding to the sample data to create a correlation model. The correlation model is trained by using a large number of samples, for example, the score determination model may be implemented based on at least one of a Convolutional Neural Network (CNN) model, a Deep Neural Network (DNN) model, a Recurrent Neural Network (RNN), a model, an embedding (embedding) model, a Gradient Boosting Decision Tree (GBDT) model, a Logistic Regression (LR) model, and an item2vec model, and the trained correlation model may be obtained by training the correlation model based on the sample data to which the parameter result has been labeled.
Schematically, as shown in fig. 2, fig. 2 is a schematic view of a scenario in which a correlation model outputs correlation parameters, and the structure of the correlation model in fig. 2 can be divided into at least an input layer, a representation layer, and a matching layer (i.e., a correlation calculation layer).
An input layer: on one hand, mapping a query statement into a set vector space with specified dimensions (such as 64 dimensions) and inputting the vector space into a representation layer of DNN;
during mapping, the input layer cuts words of the query sentence to generate a word vector with a specified dimension, the word vector is used as the input of the model, the query sentence is taken as Chinese as an example, and when the words of the Chinese query sentence are cut, the minimum granularity of Chinese can be set, such as word cutting of a single word or word cutting of a radical part. The input layer typically includes a plurality of input units for computing output values (i.e., word vectors) input to the bottommost presentation layer unit from the input query statement. And after the query sentence is input into the input unit, the input unit calculates an output value output to the bottommost presentation layer by using the voice characteristics input into the input unit according to the weighted value of the input unit.
The presentation layer is typically multiple, each including multiple presentation layer elements that receive input values from a presentation layer element in the next presentation layer. And carrying out weighted summation on input values from the representation layer units in the next-layer representation layer according to the weighted value of the layer, and taking the result of the weighted summation as an output value output to the representation layer units of the previous-layer representation layer. Wherein the presentation layer may also be referred to as a hidden layer in some embodiments.
For example, if Wi represents the weight matrix of the ith layer and bi represents the bias term (bias term) of the ith layer, the first hidden vector l1 and the ith hidden vector li can be represented as follows:
l1=W1x
Li=f(Wili-1+bi),i=2,...,N-1
y=f(WNlN-1+bn)
wherein, f (x) is an activation function of the hidden layer and the output layer, which can be determined by the actual application environment, for example, the activation function can be a tanh function.
An output layer: the method comprises the steps that the output units receive input values from hidden layer units in the uppermost hidden layer, correlation calculation is carried out on the input values from the hidden layer units in the uppermost hidden layer according to a correlation calculation unit of the layer, an actual output value (namely a correlation function) is fitted according to a correlation calculation result, and a connection weight value and a threshold value of each layer are adjusted along an output path and are reversely propagated from the output layer based on an error between an expected output value and the actual output value.
For example, a result fitting manner of correlation calculation may be calculated by using correlation cosine values (i.e., cosine distances) of two semantic vectors respectively corresponding to Query (Query statement) and item (initial Query result).
Step S103: and adjusting the at least one initial query result based on each correlation parameter to generate a final query result.
In a possible implementation manner, after determining the relevance parameters of the query statement and each of the initial query results, the electronic device adjusts the at least one initial query result according to the set adjustment condition of the query result based on each of the relevance parameters, and generates a final query result.
In one possible implementation, the adjustment condition may be setting a parameter threshold, and filtering the initial query result based on the parameter threshold. The method comprises the following specific steps:
the electronic device determines a target relevance parameter smaller than a parameter threshold value in each relevance parameter, and it can be understood that, under the condition that the relevance parameter of an initial query result is usually smaller than the parameter threshold value, the initial query result is considered to have low relevance to the query statement, at this time, the electronic device may determine a target query result corresponding to the target relevance parameter in the at least one initial query result, and then filter the target query result, that is, the target query result is not included in the parameter, and after filtering, a final query result without the target query result is generated.
The parameter threshold value is an empirical value which is comprehensively determined by collecting a large amount of sample data by the electronic equipment in an actual application environment, and combining the sample data with a big data algorithm by adopting a mathematical analysis method.
In one possible implementation, the adjustment condition may be a positive or negative determination based on the value of the correlation parameter, and the initial query result is filtered based on the positive or negative determination of the correlation parameter. The method comprises the following specific steps:
in some embodiments, whether the initial query result is positively correlated with the query statement may be represented by the correlation parameter, and in practical applications, when the correlation parameter is negative, the target correlation parameter with the negative value may be considered as negatively correlated with the query statement, that is, the correlation is weak, so that the target initial query result corresponding to the target correlation parameter with the negative value is filtered, that is, the target query result is not included in the parameter, and after the filtering, the final query result without the target query result is generated.
In a feasible implementation manner, the adjustment condition may be that the initial query results corresponding to the correlation parameters are sequentially adjusted based on the magnitude of the numerical values of the correlation parameters, and in practical applications, the initial query result arrangement order corresponding to the correlation parameters may be sequentially determined based on the magnitude order of the numerical values of the correlation parameters, for example, the initial query results with larger numerical values of the correlation parameters are arranged in front, and the like, and after the initial query results are arranged, the final query results are obtained.
In the embodiment of the application, the electronic device obtains an input query statement, searches for at least one initial query result corresponding to the query statement, then determines correlation parameters of the query statement and each initial query result respectively, and adjusts the at least one initial query result based on each correlation parameter to generate a final query result. By determining the relevance parameters of the searched initial query results and the query statement, taking the relevance degree of the initial results and the query statement into reference, and adjusting the initial query results based on the relevance parameters, the problem of low relevance when the query results are determined based on click rate or ECPM can be solved, the accuracy of information query is improved, and the relevance of the query results in the information query is ensured.
Referring to fig. 3, fig. 3 is a schematic flowchart illustrating an information query method according to another embodiment of the present application. Specifically, the method comprises the following steps:
step S201: the method comprises the steps of obtaining an input query statement, and searching at least one initial query result corresponding to the query statement.
Specifically, refer to step S101, which is not described herein again.
Step S202: and vectorizing the query statement to obtain a first vector corresponding to the query statement.
Specifically, after acquiring a query sentence input by a user, the electronic device extracts semantic feature information of the query sentence based on a relevant neural network model (also referred to as a semantic extraction network) model, where semantic benefits refer to semantic attributes specific to unstructured data expressed in characters, and the semantic features at least include semantic elements such as user query intentions, query subjects, underlying feature meanings, associated words, or associated words, taking the query sentence input by the user as an example. The semantic feature information is a plurality of features capable of expressing the semantics of the query sentence object and the semantics in the query environment, and at least includes composition letters, word sequence, emotional information of words, mutual information, query intention, query subject, bottom feature meaning, associated words or associated words, and the like.
The composing letters are those letters that a word is composed of, and the letters are in the sequence relation.
The word order is the sequence of each word formed by expressing a sentence of query sentence (one meaning).
The emotional information of a word is the emotional meaning of the word expressed in the sentence, and the emotional meaning can be understood as whether the word is positive or negative, high or low, happy or sad, and the like.
Mutual information refers to a statistically independent relationship between a word or word and a category, and is often used to measure the mutual relationship between two objects.
When the electronic device extracts the semantic feature information of the query statement, the electronic device may be a query statement feature information extraction method based on a contextual framework, that is, firstly, extracting elements (sentences, words, characters, symbols and the like) of the query statement are determined, and then semantic analysis is merged into a statistical algorithm to extract and process the query statement, so as to obtain the semantic feature information of the query statement; the method can be a text feature extraction method of query sentences based On ontologies, namely, an ontologies (On-ontology) model is used for taking the text content as input and outputting the query sentence feature information of the text content; the method can be a conceptual feature extraction method based on the known network, that is, a sentence feature extraction method based on the conceptual feature, and the like, on the basis of a Vector Space Model (VSM), semantic analysis is performed on the text content of the query sentence, semantic information of vocabularies is acquired by using a database of the known network, the vocabularies with the same semantics are mapped to the same concept, then the clustered words are obtained by clustering and are used as feature items of a text Vector of the VSM Model, and then Model operation is performed, and the like. It should be noted that there are many ways to extract the semantic feature information of the query statement, and the semantic feature information may be one or more of the fits described above, which is not limited herein.
Furthermore, after extracting the semantic feature information of the query statement, the semantic feature information usually includes semantic features of multiple dimensions, and the electronic device performs vectorization on the semantic features of the multiple dimensions by using a neural network model based on the semantic feature information, so as to obtain a first vector corresponding to the query statement.
Step S203: vectorizing each initial query result to obtain a second vector corresponding to each initial query result.
Specifically, the electronic device obtains feature information of each initial query result, where the feature information of the initial query result at least includes description information of the obtained initial query result, id of the initial query result, semantic information, category, query click quantity, result creation time, query result history score, and the like, where the description information may be understood as: assuming that the query result is a commodity, the description information may be information such as evaluation, introduction, and instruction for the commodity. In specific implementation, the electronic device may introduce a relevant neural network model (also referred to as a feature extraction network) model, and in some implementation scenarios, the feature extraction network may be the same neural network model as the semantic extraction network.
In practical application, the feature information (such as semantic information, category, and click query amount) of each type of dimension is subjected to network vectorization processing by a feature extraction network to generate one or more dimensional vectors (that is, a certain dimensional vector of a second vector) corresponding to the feature information of each type of dimension, and then the vectors of all dimensions are subjected to aggregation pooling processing, for example, the vectors of multiple dimensions are fused by a (weighted) addition method to obtain second vectors (which may also be called item vectors) so as to obtain second vectors corresponding to the initial query results, wherein when the initial query results are multiple, the second vectors corresponding to the initial query results are obtained by the above method.
The vectorization processing of the initial query result based on the feature extraction network may refer to the similar related contents in step S202, and is not described here again.
In a possible implementation manner, the electronic device may create, in advance, second vectors corresponding to all initial query results involved in the query service, for example, taking an application search downloading scenario as an example, the electronic device may vectorize feature information corresponding to each application of an application store, and then generate a vector library containing the second vectors corresponding to each initial query result. In practical application, when the electronic device searches for an initial query result corresponding to a query statement each time, vectorization processing needs to be performed on the initial query result, and in specific implementation, the electronic device may directly query a second vector corresponding to each initial query result from a preset vector library.
Furthermore, the following explains the process of creating the vector library, and in practical applications, the electronic device collects at least one reference query result, which may be understood as a query result under a query service provided by the electronic device, such as a corresponding query result in a search engine provided by the electronic device.
The electronic device obtains feature information of each reference query result in the at least one reference query result, and then performs vectorization processing on the reference query result based on the feature information, where the vectorization processing process is similar to the above manner and is not described herein again, and after performing vectorization processing on the reference query result, the electronic device may obtain a second vector corresponding to the reference query result, and in some embodiments, the electronic device may perform vectorization processing on all the reference query results, thereby generating second vectors corresponding to all the reference query results; the electronic device may also perform vectorization processing on a part of the reference query results, for example, perform vectorization processing on all the reference query results of a certain type or multiple types, so as to generate a vector library including each of the second vectors.
Step S204: and calculating the cosine of the first vector and each second vector respectively, and taking the cosine as the correlation parameter of the first vector and the second vector.
The cosine is one of parameters representing the correlation between a first vector and a second vector, the geometric meaning of the cosine is that in a vector space, vectors (such as the second vector) of the correlation to be calculated are all normalized into vectors with the length of 1, the coordinates of the starting points of all the normalized vectors fall on a spherical surface with the vector 0 as the center of sphere and the radius of 1, the correlation between the first vector and the second vector can be measured by using the included angle between the first vector and the second vector, the smaller the included angle is, the higher the correlation degree is, the higher the cosine value is, and the larger the correlation degree is.
In one possible embodiment, the cosine algorithm for calculating the first vector and the second vector is as follows:
wherein n is the dimension of the vector, xi is the ith dimension component corresponding to the first vector, yi is the ith dimension component corresponding to the second vector, and cos () is the cosine.
Based on the algorithm, the first vector and each of the second vectors are respectively input into the algorithm, a cosine of each of the first vector and each of the second vectors can be output, and further, the cosine can be used as a correlation parameter between the first vector and the second vector by the electronic device.
Step S205: and calculating the relative entropy of the first vector and each second vector respectively, and taking the relative entropy as a correlation parameter of the first vector and the second vector.
The relative entropy, also referred to as information divergence, is used to measure the number of extra bits required to characterize the average of samples from the second vector P using the first vector Q based encoding. Typically, P represents the real distribution of data, i.e. the vector distribution of the initial query result corresponding to the characterization query statement, and Q represents the theoretical distribution of data, i.e. the vector distribution of the theoretical query result corresponding to the query statement.
In one possible implementation, the algorithm for calculating the relative entropy (E) of the first vector and the second vector, respectively, is as follows:
and ui is the ith dimension component corresponding to the first vector, vi is the ith dimension component corresponding to the second vector, and E is the relative entropy.
Based on the algorithm, the first vector and each of the second vectors are respectively input into the algorithm, so that relative entropy of the first vector and each of the second vectors can be output, and further, the electronic device can use the relative entropy as a correlation parameter of the first vector and the second vector.
Step S206: in each of the correlation parameters, a target correlation parameter that is less than a parameter threshold is determined.
The threshold refers to a threshold value of a certain field, state or system, and is also called a critical value. In this embodiment, the parameter threshold refers to a parameter threshold corresponding to the correlation parameter. When the correlation parameter is greater than or equal to the parameter threshold value, the correlation between the initial query result and the query statement is considered to be high; when the correlation parameter is smaller than the parameter threshold value, the correlation between the initial query result and the query statement is considered to be not high.
The electronic device sequentially traverses the correlation parameters and compares the correlation parameters with the threshold parameters to determine target correlation parameters smaller than a parameter threshold, and it can be understood that, under the condition that the correlation parameters of the initial query result are usually smaller than the parameter threshold, the correlation between the initial query result and the query statement is not high, so as to further adjust the initial query result in the next step based on the target correlation parameters.
Step S207: and determining a target query result corresponding to the target relevance parameter in the at least one initial query result.
Specifically, after determining a target relevance parameter smaller than a parameter threshold value in each relevance parameter, the electronic device determines a target query result corresponding to the target relevance parameter in the at least one initial query result, where the target query result may be considered to have a smaller relevance to an actual query result of the query statement and a larger deviation.
Step S208: and determining the category of the target query result, filtering all initial query results belonging to the category in the query result, and generating a final query result.
The category may be understood as a type corresponding to the target query result, for example, taking a scene to which the query result belongs as an application, the electronic device may determine the category to which the target application belongs, such as a game type, a browser type, a music type, a video type, a navigation type, and the like.
Specifically, after the electronic device determines the target query result, because the correlation between the target query result and the query statement is not high, in order to further filter the initial query result related to the target query result and improve the accuracy of the final query result that is finally generated, the electronic device may determine the category to which the target query result belongs, and filter all initial query results belonging to the category in the query result, if it is assumed that the target query result a belongs to the category B, the electronic device filters all query results belonging to the category B in the query result, thereby generating the final query result after filtering.
In a possible implementation manner, after filtering all the initial query results belonging to the category in the query results, the electronic device may further adjust each of the initial query results based on a high-low order of each of the correlation parameters, and in practical applications, may sequentially determine an initial query result arrangement order corresponding to the correlation parameters based on a numerical value high-low order of the correlation parameters, for example, arrange initial query results with larger numerical values of the correlation parameters in front, and so on, and obtain a final query result after finishing the ordering of each of the initial query results.
In the embodiment of the application, relevance parameters of the initial query results and the query sentences are further obtained by vectorizing the searched initial query results and the query sentences, the relevance degree of the initial results and the query sentences is taken as a reference, and the initial query results are adjusted based on the relevance parameters, so that the problem of low relevance when the query results are determined based on click rate or ECPM (equal cost performance) can be avoided, the accuracy of information query is improved, and the relevance of the query results in the information query is ensured; the target initial results with low relevance can be filtered based on the relevance parameters, or all the initial query results are sorted, so that the accuracy of the query results in information query can be improved; and when the second vector of the initial query result is determined, a vector library can be established in advance, so that the corresponding second vector can be quickly acquired in the vector library directly based on the initial query result in practical application, and the efficiency of information query is improved.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Referring to fig. 4, a schematic structural diagram of an information query apparatus according to an exemplary embodiment of the present application is shown. The information querying device may be implemented as all or part of a device in software, hardware, or a combination of both. The apparatus 1 comprises a query result search module 11, a relevance parameter determination module 12 and a query result adjustment module 13.
A query result searching module 11, configured to obtain an input query statement, and search for at least one initial query result corresponding to the query statement;
a correlation parameter determining module 12, configured to determine correlation parameters between the query statement and each of the initial query results;
and a query result adjusting module 13, configured to adjust the at least one initial query result based on each of the correlation parameters, and generate a final query result.
Optionally, as shown in fig. 5, the correlation parameter determining module 12 includes:
a first vector processing unit 121, configured to perform vectorization processing on the query statement to obtain a first vector corresponding to the query statement;
a second vector processing unit 122, configured to perform vectorization processing on each initial query result to obtain a second vector corresponding to each initial query result;
a correlation parameter calculating unit 123, configured to calculate a correlation parameter between each of the first vectors and each of the second vectors.
Optionally, the second vector processing unit 122 is specifically configured to:
and querying a second vector corresponding to each initial query result in a preset vector library.
Optionally, as shown in fig. 8, the apparatus 1 further includes:
a query result acquisition module 14, configured to acquire at least one reference query result;
a second vector generation module 15, configured to obtain feature information of each reference query result in the at least one reference query result, and perform vectorization processing on the reference query result based on the feature information to obtain a second vector corresponding to the reference query result;
a vector library generating module 16, configured to generate a vector library including each of the second vectors.
Optionally, as shown in fig. 6, the correlation parameter calculating unit 123 includes:
a cosine calculating subunit 1231, configured to calculate cosines of the first vector and each of the second vectors, respectively, and use the cosines as correlation parameters of the first vector and the second vectors;
a relative entropy calculating subunit 1232, configured to calculate relative entropies of the first vector and each of the second vectors, respectively, and use the relative entropies as correlation parameters of the first vector and the second vectors.
Optionally, as shown in fig. 7, the query result adjusting module 13 includes:
a target correlation reference determination unit 131 configured to determine a target correlation parameter smaller than a parameter threshold value among the correlation parameters;
a target query result determining unit 132, configured to determine, in the at least one initial query result, a target query result corresponding to the target relevance parameter;
and a final query result generating unit 133, configured to filter the target query result and generate a final query result.
Optionally, the query result adjusting module 13 includes:
the target correlation reference determining unit 131 is further configured to determine, in each of the correlation parameters, a target correlation parameter smaller than a parameter threshold;
the target correlation reference determining unit 131 is further configured to determine, in the at least one initial query result, a target query result corresponding to the target correlation parameter;
the final query result generating unit 133 is further configured to determine a category to which the target query result belongs, filter all initial query results belonging to the category in the query result, and generate a final query result.
Optionally, the query result adjusting module 13 is further configured to:
and ranking each initial query result based on the high-low order of each correlation parameter.
It should be noted that, when the information query apparatus provided in the foregoing embodiment executes the information query method, only the division of the functional modules is illustrated, and in practical applications, the functions may be distributed and completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules, so as to complete all or part of the functions described above. In addition, the information query device and the information query method provided by the above embodiments belong to the same concept, and the detailed implementation process thereof is referred to as the method embodiment, which is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the embodiment of the application, relevance parameters of the initial query results and the query sentences are further obtained by vectorizing the searched initial query results and the query sentences, the relevance degree of the initial results and the query sentences is taken as a reference, and the initial query results are adjusted based on the relevance parameters, so that the problem of low relevance when the query results are determined based on click rate or ECPM (equal cost performance) can be avoided, the accuracy of information query is improved, and the relevance of the query results in the information query is ensured; the target initial results with low relevance can be filtered based on the relevance parameters, or all the initial query results are sorted, so that the accuracy of the query results in information query can be improved; and when the second vector of the initial query result is determined, a vector library can be established in advance, so that the corresponding second vector can be quickly acquired in the vector library directly based on the initial query result in practical application, and the efficiency of information query is improved.
An embodiment of the present application further provides a computer storage medium, where the computer storage medium may store a plurality of instructions, where the instructions are suitable for being loaded by a processor and for executing the information query method according to the embodiments shown in fig. 1 to fig. 3, and a specific execution process may refer to specific descriptions of the embodiments shown in fig. 1 to fig. 3, which is not described herein again.
The present application further provides a computer program product, where at least one instruction is stored, and the at least one instruction is loaded by the processor and executes the information query method according to the embodiment shown in fig. 1 to fig. 3, where a specific execution process may refer to specific descriptions of the embodiment shown in fig. 1 to fig. 3, and is not described herein again.
Referring to fig. 9, a block diagram of an electronic device according to an exemplary embodiment of the present application is shown. The electronic device in the present application may comprise one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, memory 120, input device 130, and output device 140 may be connected by a bus 150.
The Memory 120 may include a Random Access Memory (RAM) or a read-only Memory (ROM). Optionally, the memory 120 includes a non-transitory computer-readable medium. The memory 120 may be used to store instructions, programs, code sets, or instruction sets. The memory 120 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like, and the operating system may be an Android (Android) system, including a system based on Android system depth development, an IOS system developed by apple, including a system based on IOS system depth development, or other systems. The data storage area may also store data created by the electronic device during use, such as phone books, audio and video data, chat log data, and the like.
Referring to fig. 10, the memory 120 may be divided into an operating system space, where an operating system is run, and a user space, where native and third-party applications are run. In order to ensure that different third-party application programs can achieve a better operation effect, the operating system allocates corresponding system resources for the different third-party application programs. However, the requirements of different application scenarios in the same third-party application program on system resources are different, for example, in a local resource loading scenario, the third-party application program has a higher requirement on the disk reading speed; in the animation rendering scene, the third-party application program has a high requirement on the performance of the GPU. The operating system and the third-party application program are independent from each other, and the operating system cannot sense the current application scene of the third-party application program in time, so that the operating system cannot perform targeted system resource adaptation according to the specific application scene of the third-party application program.
In order to enable the operating system to distinguish a specific application scenario of the third-party application program, data communication between the third-party application program and the operating system needs to be opened, so that the operating system can acquire current scenario information of the third-party application program at any time, and further perform targeted system resource adaptation based on the current scenario.
Taking an operating system as an Android system as an example, programs and data stored in the memory 120 are as shown in fig. 11, and a Linux kernel layer 320, a system runtime library layer 340, an application framework layer 360, and an application layer 380 may be stored in the memory 120, where the Linux kernel layer 320, the system runtime library layer 340, and the application framework layer 360 belong to an operating system space, and the application layer 380 belongs to a user space. The Linux kernel layer 320 provides underlying drivers for various hardware of the electronic device, such as a display driver, an audio driver, a camera driver, a bluetooth driver, a Wi-Fi driver, power management, and the like. The system runtime library layer 340 provides a main feature support for the Android system through some C/C + + libraries. For example, the SQLite library provides support for a database, the OpenGL/ES library provides support for 3D drawing, the Webkit library provides support for a browser kernel, and the like. Also provided in the system runtime library layer 340 is an Android runtime library (Android runtime), which mainly provides some core libraries that can allow developers to write Android applications using the Java language. The application framework layer 360 provides various APIs that may be used in building an application, and developers may build their own applications by using these APIs, such as activity management, window management, view management, notification management, content provider, package management, session management, resource management, and location management. At least one application program runs in the application layer 380, and the application programs may be native application programs carried by the operating system, such as a contact program, a short message program, a clock program, a camera application, and the like; or a third-party application developed by a third-party developer, such as a game application, an instant messaging program, a photo beautification program, an information query program, and the like.
Taking an operating system as an IOS system as an example, programs and data stored in the memory 120 are shown in fig. 12, and the IOS system includes: a Core operating system Layer 420(Core OS Layer), a Core Services Layer 440(Core Services Layer), a Media Layer 460(Media Layer), and a touchable Layer 480(Cocoa Touch Layer). The kernel operating system layer 420 includes an operating system kernel, drivers, and underlying program frameworks that provide functionality closer to hardware for use by program frameworks located in the core services layer 440. The core services layer 440 provides system services and/or program frameworks, such as a Foundation framework, an account framework, an advertisement framework, a data storage framework, a network connection framework, a geographic location framework, a motion framework, and so forth, as required by the application. The media layer 460 provides audiovisual related interfaces for applications, such as graphics image related interfaces, audio technology related interfaces, video technology related interfaces, audio video transmission technology wireless playback (AirPlay) interfaces, and the like. Touchable layer 480 provides various common interface-related frameworks for application development, and touchable layer 480 is responsible for user touch interaction operations on the electronic device. Such as a local notification service, a remote push service, an advertising framework, a game tool framework, a messaging User Interface (UI) framework, a User Interface UIKit framework, a map framework, and so forth.
In the framework illustrated in FIG. 12, the framework associated with most applications includes, but is not limited to: a base framework in the core services layer 440 and a UIKit framework in the touchable layer 480. The base framework provides many basic object classes and data types, provides the most basic system services for all applications, and is UI independent. While the class provided by the UIKit framework is a basic library of UI classes for creating touch-based user interfaces, iOS applications can provide UIs based on the UIKit framework, so it provides an infrastructure for applications for building user interfaces, drawing, processing and user interaction events, responding to gestures, and the like.
The Android system can be referred to as a mode and a principle for realizing data communication between the third-party application program and the operating system in the IOS system, and details are not repeated herein.
The input device 130 is used for receiving input instructions or data, and the input device 130 includes, but is not limited to, a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used for outputting instructions or data, and the output device 140 includes, but is not limited to, a display device, a speaker, and the like. In one example, the input device 130 and the output device 140 may be combined, and the input device 130 and the output device 140 are touch display screens for receiving touch operations of a user on or near the touch display screens by using any suitable object such as a finger, a touch pen, and the like, and displaying user interfaces of various applications. Touch displays are typically provided on the front panel of an electronic device. The touch display screen may be designed as a full-face screen, a curved screen, or a profiled screen. The touch display screen can also be designed to be a combination of a full-face screen and a curved-face screen, and a combination of a special-shaped screen and a curved-face screen, which is not limited in the embodiment of the present application.
In addition, those skilled in the art will appreciate that the configurations of the electronic devices illustrated in the above-described figures do not constitute limitations on the electronic devices, which may include more or fewer components than illustrated, or some components may be combined, or a different arrangement of components. For example, the electronic device further includes a radio frequency circuit, an input unit, a sensor, an audio circuit, a wireless fidelity (WiFi) module, a power supply, a bluetooth module, and other components, which are not described herein again.
In the embodiment of the present application, the main body of execution of each step may be the electronic device described above. Optionally, the execution subject of each step is an operating system of the electronic device. The operating system may be an android system, an IOS system, or another operating system, which is not limited in this embodiment of the present application.
The electronic device of the embodiment of the application can also be provided with a display device, and the display device can be various devices capable of realizing a display function, for example: a cathode ray tube display (CR), a light-emitting diode display (LED), an electronic ink panel, a Liquid Crystal Display (LCD), a Plasma Display Panel (PDP), and the like. A user may utilize a display device on the electronic device 101 to view information such as displayed text, images, video, and the like. The electronic device may be a smartphone, a tablet computer, a gaming device, an AR (Augmented Reality) device, an automobile, a data storage device, an audio playback device, a video playback device, a notebook, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, an electronic garment, or the like.
In the electronic device shown in fig. 9, where the electronic device may be a terminal, the processor 110 may be configured to call the information query application stored in the memory 120, and specifically perform the following operations:
acquiring an input query statement, and searching at least one initial query result corresponding to the query statement;
determining the relevance parameters of the query statement and each initial query result respectively;
and adjusting the at least one initial query result based on each correlation parameter to generate a final query result.
In one embodiment, the processor 110 specifically performs the following operations when performing the determining of the relevance parameter between the query statement and each of the initial query results:
vectorizing the query statement to obtain a first vector corresponding to the query statement;
vectorizing each initial query result to obtain a second vector corresponding to each initial query result;
and calculating the correlation parameters of the first vector and each second vector respectively.
In an embodiment, when the processor 110 performs the vectorization processing on each initial query result to obtain a second vector corresponding to each initial query result, the following operations are specifically performed:
and querying a second vector corresponding to each initial query result in a preset vector library.
In one embodiment, the processor 110 further performs the following operations before executing the query statement of the get input:
collecting at least one reference query result;
acquiring feature information of each reference query result in the at least one reference query result, and performing vectorization processing on the reference query result based on the feature information to obtain a second vector corresponding to the reference query result;
and generating a vector library containing each second vector.
In one embodiment, the processor 110 specifically performs the following operations when performing the calculation of the correlation parameter between the first vector and each of the second vectors:
calculating cosines of the first vector and each second vector respectively, and taking the cosines as correlation parameters of the first vector and the second vectors; or the like, or, alternatively,
and calculating the relative entropy of the first vector and each second vector respectively, and taking the relative entropy as a correlation parameter of the first vector and the second vector.
In an embodiment, when the processor 110 performs the adjusting of the at least one initial query result based on each of the correlation parameters to generate a final query result, the following operations are specifically performed:
determining a target correlation parameter smaller than a parameter threshold value in each correlation parameter;
determining a target query result corresponding to the target relevance parameter in the at least one initial query result;
and filtering the target query result to generate a final query result.
In an embodiment, when the processor 110 performs the adjusting of the at least one initial query result based on each of the correlation parameters to generate a final query result, the following steps are specifically performed:
determining a target correlation parameter smaller than a parameter threshold value in each correlation parameter;
determining a target query result corresponding to the target relevance parameter in the at least one initial query result;
and determining the category of the target query result, filtering all initial query results belonging to the category in the query result, and generating a final query result.
In an embodiment, when the processor 110 performs the adjusting of the at least one initial query result based on each of the correlation parameters to generate a final query result, the following steps are specifically performed:
and ranking each initial query result based on the high-low order of each correlation parameter.
In the embodiment of the application, relevance parameters of the initial query results and the query sentences are further obtained by vectorizing the searched initial query results and the query sentences, the relevance degree of the initial results and the query sentences is taken as a reference, and the initial query results are adjusted based on the relevance parameters, so that the problem of low relevance when the query results are determined based on click rate or ECPM (equal cost performance) can be avoided, the accuracy of information query is improved, and the relevance of the query results in the information query is ensured; the target initial results with low relevance can be filtered based on the relevance parameters, or all the initial query results are sorted, so that the accuracy of the query results in information query can be improved; and when the second vector of the initial query result is determined, a vector library can be established in advance, so that the corresponding second vector can be quickly acquired in the vector library directly based on the initial query result in practical application, and the efficiency of information query is improved.
It is clear to a person skilled in the art that the solution of the present application can be implemented by means of software and/or hardware. The "unit" and "module" in this specification refer to software and/or hardware that can perform a specific function independently or in cooperation with other components, where the hardware may be, for example, a Field-ProgrammaBLE Gate Array (FPGA), an Integrated Circuit (IC), or the like.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present application is not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implementing, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of some service interfaces, devices or units, and may be an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be substantially implemented or a part of or all or part of the technical solution contributing to the prior art may be embodied in the form of a software product stored in a memory, and including several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory comprises: various media capable of storing program codes, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Those skilled in the art will appreciate that all or part of the steps in the methods of the above embodiments may be implemented by a program, which is stored in a computer-readable memory, and the memory may include: flash disks, Read-Only memories (ROMs), Random Access Memories (RAMs), magnetic or optical disks, and the like.
The above description is only an exemplary embodiment of the present disclosure, and the scope of the present disclosure should not be limited thereby. That is, all equivalent changes and modifications made in accordance with the teachings of the present disclosure are intended to be included within the scope of the present disclosure. Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
Claims (10)
1. An information query method, the method comprising:
acquiring an input query statement, and searching at least one initial query result corresponding to the query statement;
determining the relevance parameters of the query statement and each initial query result respectively;
and adjusting the at least one initial query result based on each correlation parameter to generate a final query result.
2. The method of claim 1, wherein determining the relevance parameter of the query statement to each of the initial query results comprises:
vectorizing the query statement to obtain a first vector corresponding to the query statement;
vectorizing each initial query result to obtain a second vector corresponding to each initial query result;
and calculating the correlation parameters of the first vector and each second vector respectively.
3. The method according to claim 2, wherein the vectorizing each of the initial query results to obtain a second vector corresponding to each of the initial query results comprises:
and querying a second vector corresponding to each initial query result in a preset vector library.
4. The method of claim 3, wherein prior to obtaining the input query statement, further comprising:
collecting at least one reference query result;
acquiring feature information of each reference query result in the at least one reference query result, and performing vectorization processing on the reference query result based on the feature information to obtain a second vector corresponding to the reference query result;
and generating a vector library containing each second vector.
5. The method of claim 3, wherein said calculating the correlation parameter between the first vector and each of the second vectors comprises:
calculating cosines of the first vector and each second vector respectively, and taking the cosines as correlation parameters of the first vector and the second vectors; or the like, or, alternatively,
and calculating the relative entropy of the first vector and each second vector respectively, and taking the relative entropy as a correlation parameter of the first vector and the second vector.
6. The method of claim 1, wherein adjusting the at least one initial query result based on each of the relevance parameters to generate a final query result comprises:
determining a target correlation parameter smaller than a parameter threshold value in each correlation parameter;
determining a target query result corresponding to the target relevance parameter in the at least one initial query result;
and filtering the target query result to generate a final query result.
7. The method of claim 1, wherein adjusting the at least one initial query result based on each of the relevance parameters to generate a final query result comprises:
determining a target correlation parameter smaller than a parameter threshold value in each correlation parameter;
determining a target query result corresponding to the target relevance parameter in the at least one initial query result;
and determining the category of the target query result, filtering all initial query results belonging to the category in the query result, and generating a final query result.
8. The method of claim 6 or 7, wherein before generating the final query result, further comprising:
and ranking each initial query result based on the high-low order of each correlation parameter.
9. A computer storage medium, characterized in that it stores a plurality of instructions adapted to be loaded by a processor and to carry out the method steps according to any one of claims 1 to 8.
10. An electronic device, comprising: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to perform the method steps of any of claims 1 to 8.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010776861.4A CN111966894A (en) | 2020-08-05 | 2020-08-05 | Information query method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010776861.4A CN111966894A (en) | 2020-08-05 | 2020-08-05 | Information query method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111966894A true CN111966894A (en) | 2020-11-20 |
Family
ID=73363930
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010776861.4A Pending CN111966894A (en) | 2020-08-05 | 2020-08-05 | Information query method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111966894A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112905848A (en) * | 2021-02-10 | 2021-06-04 | 北京有竹居网络技术有限公司 | Information query method, device, electronic equipment, storage medium and program product |
CN114116731A (en) * | 2022-01-24 | 2022-03-01 | 北京智象信息技术有限公司 | Data separation storage display method and device based on indexedDB storage |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101853272A (en) * | 2010-04-30 | 2010-10-06 | 华北电力大学(保定) | Search engine technology based on relevance feedback and clustering |
US20170060844A1 (en) * | 2015-08-28 | 2017-03-02 | Microsoft Technology Licensing, Llc | Semantically-relevant discovery of solutions |
CN107491547A (en) * | 2017-08-28 | 2017-12-19 | 北京百度网讯科技有限公司 | Searching method and device based on artificial intelligence |
CN110222706A (en) * | 2019-04-28 | 2019-09-10 | 中国科学院计算机网络信息中心 | Ensemble classifier method, apparatus and storage medium based on feature reduction |
CN110555101A (en) * | 2019-09-09 | 2019-12-10 | 浙江诺诺网络科技有限公司 | customer service knowledge base updating method, device, equipment and storage medium |
CN110674365A (en) * | 2019-09-06 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Searching method, device, equipment and storage medium |
-
2020
- 2020-08-05 CN CN202010776861.4A patent/CN111966894A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101853272A (en) * | 2010-04-30 | 2010-10-06 | 华北电力大学(保定) | Search engine technology based on relevance feedback and clustering |
US20170060844A1 (en) * | 2015-08-28 | 2017-03-02 | Microsoft Technology Licensing, Llc | Semantically-relevant discovery of solutions |
CN107491547A (en) * | 2017-08-28 | 2017-12-19 | 北京百度网讯科技有限公司 | Searching method and device based on artificial intelligence |
CN110222706A (en) * | 2019-04-28 | 2019-09-10 | 中国科学院计算机网络信息中心 | Ensemble classifier method, apparatus and storage medium based on feature reduction |
CN110674365A (en) * | 2019-09-06 | 2020-01-10 | 腾讯科技(深圳)有限公司 | Searching method, device, equipment and storage medium |
CN110555101A (en) * | 2019-09-09 | 2019-12-10 | 浙江诺诺网络科技有限公司 | customer service knowledge base updating method, device, equipment and storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112905848A (en) * | 2021-02-10 | 2021-06-04 | 北京有竹居网络技术有限公司 | Information query method, device, electronic equipment, storage medium and program product |
CN114116731A (en) * | 2022-01-24 | 2022-03-01 | 北京智象信息技术有限公司 | Data separation storage display method and device based on indexedDB storage |
CN114116731B (en) * | 2022-01-24 | 2022-04-22 | 北京智象信息技术有限公司 | Data separation storage display method and device based on indexedDB storage |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11934780B2 (en) | Content suggestion system | |
US20160306800A1 (en) | Reply recommendation apparatus and system and method for text construction | |
CN111597006A (en) | Application split screen method and device, storage medium and electronic equipment | |
US10956470B2 (en) | Facet-based query refinement based on multiple query interpretations | |
US20230386238A1 (en) | Data processing method and apparatus, computer device, and storage medium | |
CN112116212B (en) | Application evaluation method and device, storage medium and electronic equipment | |
CN112581162A (en) | Information content display method, device, storage medium and terminal | |
CN114564666A (en) | Encyclopedic information display method, encyclopedic information display device, encyclopedic information display equipment and encyclopedic information display medium | |
CN111966894A (en) | Information query method and device, storage medium and electronic equipment | |
CN111787042B (en) | Method and device for pushing information | |
CN111444321B (en) | Question answering method, device, electronic equipment and storage medium | |
CN112347365A (en) | Target search information determination method and device | |
CN109299378B (en) | Search result display method and device, terminal and storage medium | |
CN113934501B (en) | Translation method, translation device, storage medium and electronic equipment | |
CN113378895B (en) | Classification model generation method and device, storage medium and electronic equipment | |
CN112328339B (en) | Notification message display method and device, storage medium and electronic equipment | |
CN113486260B (en) | Method and device for generating interactive information, computer equipment and storage medium | |
CN109829157B (en) | Text emotion presenting method, text emotion presenting device and storage medium | |
CN109857838B (en) | Method and apparatus for generating information | |
CN111339124A (en) | Data display method and device, electronic equipment and computer readable medium | |
CN117354416A (en) | Message processing method and device, storage medium and electronic equipment | |
CN107784101B (en) | Method, device and equipment for launching ciphertext and readable storage medium | |
CN118035546A (en) | Training method for text intention recognition model, text intention recognition method and device | |
CN116644331A (en) | Crowd classification method and device, storage medium and electronic equipment | |
CN115827833A (en) | Dialog structure processing method and device, storage medium and electronic equipment |
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 |