Query method, device, server, medium and product

By receiving and processing query statements in database queries, and automatically adjusting limited fields to improve query efficiency, it solves the problem of reduced query efficiency caused by errors in the knowledge point storage directory, and achieves a faster retrieval process.

CN113590757BActive Publication Date: 2024-10-15BANK OF CHINA
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202110888878.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-03
Publication Date
2024-10-15
Estimated Expiration
2041-08-03

AI Technical Summary

Technical Problem

In database query, if the directory where the knowledge points are stored is incorrect, the user's query efficiency will be reduced. The existing technology requires the user to manually adjust the limited fields in the query statement, resulting in a long retrieval time.

Method used

By receiving the query statement sent by the client, if the target knowledge point is not found within the target search range, the correlation between the restricted field and the candidate restricted field is obtained, and the search range of the candidate restricted field is selected from the search range of the candidate restricted field in descending order according to the correlation. Query until the target knowledge point is reached, and automatically adjust the limited fields to improve query efficiency.

Benefits of technology

It realizes automatic adjustment of limited fields, shortens retrieval time, improves query efficiency, and eliminates the need for users to manually adjust query statements frequently.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113590757B_ABST
    Figure CN113590757B_ABST
Patent Text Reader

Abstract

The embodiments of the present application provide a query method, device, server, medium and product. The query method receives a query statement sent by a client, wherein the query statement includes a query keyword and a limiting field that limits the target search range of the query keyword; within the target search range corresponding to the limiting field, a target knowledge point whose correlation with the query keyword is higher than or equal to a first preset threshold is searched; if the target knowledge point is not found within the target search range, the correlation between the limiting field and the preset candidate limiting field is obtained; the target knowledge point is searched from the candidate search range corresponding to the candidate limiting field in descending order of correlation until the target knowledge point is found; and the target knowledge point is sent to the client. In the related art, if the target knowledge point is not found within the target search range, the user needs to manually adjust the limiting field, which makes the retrieval time longer. The present application can automatically adjust the limiting field, so that the retrieval time is shorter.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of search technology, and more specifically, to a query method, device, server, medium and product. Background Art

[0002] The database stores multiple knowledge points. Users can search for knowledge points with high relevance to the query statements from the database by entering query statements on the client.

[0003] The inventor discovered during the process of implementing the invention that when the operation and maintenance personnel store knowledge points in the database, they store the knowledge points in the corresponding directory based on their own usage experience. If the directory where the knowledge points are stored is incorrect, the query efficiency of the user will be reduced. Summary of the invention

[0004] In view of this, the present application provides a query method, device, server, medium and product.

[0005] To achieve the above objectives, this application provides the following technical solutions:

[0006] According to a first aspect of an embodiment of the present disclosure, a query method is provided, including:

[0007] Receiving a query statement sent by a client, the query statement including a query keyword and a limiting field for limiting a target search range for searching the query keyword;

[0008] Searching for target knowledge points whose relevance to the query keyword is higher than or equal to a first preset threshold within the target search range corresponding to the limited field;

[0009] If the target knowledge point is not found within the target search range, obtaining the relevance between the limited field and a preset candidate limited field;

[0010] Searching for the target knowledge point from the candidate search range corresponding to the candidate limited field in descending order of relevance until the target knowledge point is found;

[0011] Send the target knowledge point to the client.

[0012] According to a second aspect of an embodiment of the present disclosure, a query device is provided, including:

[0013] A first receiving module is used to receive a query statement sent by a client, wherein the query statement includes a query keyword and a limiting field that limits a target search range for searching the query keyword;

[0014] A first query module is used to query, within a target search range corresponding to the limited field, target knowledge points whose relevance to the query keyword is higher than or equal to a first preset threshold;

[0015] A first acquisition module, configured to acquire the relevance between the limited field and a preset candidate limited field if the target knowledge point is not found within the target search range;

[0016] A second query module is used to query the target knowledge point from the candidate search range corresponding to the candidate limited field in order from large to small relevance until the target knowledge point is found;

[0017] A sending module is used to send the target knowledge point to the client.

[0018] According to a third aspect of an embodiment of the present disclosure, a server is provided, including:

[0019] processor;

[0020] a memory for storing instructions executable by the processor;

[0021] The processor is configured to execute the instructions to implement the query method as described in the first aspect.

[0022] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of a server, the server is enabled to execute the query method as described in the first aspect.

[0023] According to the fifth aspect of the embodiment of the present disclosure, a computer program product is provided, which can be directly loaded into the internal memory of a computer, such as the memory included in the server described in the third aspect, and contains software code. After being loaded and executed by the computer, the computer program can implement the query method described in the first aspect.

[0024] Through the above technical solution, it can be known that in the query method provided by the embodiment of the present application, a query statement sent by a client is received, the query statement includes a query keyword and a limited field that limits the target search range of the query keyword; the target knowledge point whose relevance to the query keyword is higher than or equal to the first preset threshold is searched within the target search range corresponding to the limited field; if the target knowledge point is not found within the target search range, the relevance of the limited field and the preset candidate limited field is obtained; the target knowledge point is searched from the candidate search range corresponding to the candidate limited field in descending order of relevance until the target knowledge point is found; the target knowledge point is sent to the client. In the related art, if the target knowledge point is not found within the target search range, information indicating that the relevant knowledge point has not been retrieved will be fed back to the client, or the knowledge point with low relevance will be fed back to the client, so that the user can manually adjust the limited field in the query statement, and search again based on the adjusted query statement. If the target knowledge point is still not found within the target search range corresponding to the adjusted limited field, the user needs to manually adjust it again, which makes the retrieval time-consuming. The embodiment of the present application can automatically adjust the limited fields until the target knowledge point is retrieved, so that the retrieval time is shorter. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0026] Figure 1 A structural diagram of the hardware architecture involved in the embodiments of the present application;

[0027] Figure 2 A flowchart of a query method provided in an embodiment of the present application;

[0028] Figure 3 A schematic diagram of an implementation method of a user interface provided in an embodiment of the present application;

[0029] Figure 4 A structural diagram of a query device provided in an embodiment of the present application;

[0030] Figure 5 The invention is a block diagram showing a device for a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0032] The embodiments of the present application provide a query method, device, server, medium and product. Before introducing the technical solution provided by the embodiments of the present application, the relevant content and hardware architecture involved in the embodiments of the present application are first described.

[0033] First, the relevant contents involved in the embodiments of the present application are introduced.

[0034] The database includes multiple knowledge points. Exemplarily, the multiple knowledge points are obtained by splitting source documents. The source documents corresponding to different knowledge points may be the same or different.

[0035] For example, the source document includes 10 paragraphs. Exemplarily, the source text is divided into 10 knowledge points, that is, each paragraph corresponds to one knowledge point; Exemplarily, the source document is divided into 5 knowledge points, and one knowledge point includes one or more paragraphs in the source document; Exemplarily, the source document is divided into 20 knowledge points, and one knowledge point includes one or more sentences in a paragraph.

[0036] Exemplarily, the knowledge point includes a source document; exemplary, the knowledge point is obtained based on other knowledge points.

[0037] Exemplarily, there are many ways to represent knowledge points, and the present application embodiment provides but is not limited to: any one of a linked list, an array, a structure, and a table. The structure of a knowledge point is described below using a table as an example.

[0038] Exemplarily, the structure of the knowledge point is shown in Table 1.

[0039] Table 1 Structure of knowledge points

[0040]

[0041] Exemplarily, the body of the knowledge includes any one of the knowledge title and the knowledge content; Exemplarily, the knowledge content corresponds to the knowledge title. For example, the knowledge content corresponding to the knowledge title "Deposit Period of Bank of China Fortune Personal Notice Deposits" may be: Regardless of the actual deposit period, personal notice deposits are divided into two types: 1-day notice deposits and 7-day notice deposits according to the length of the depositor's advance notice. 1-day notice deposits must notify the agreed withdrawal of deposits 1 day in advance, while 7-day notice deposits must notify the agreed withdrawal of deposits 7 days in advance. For 1-day notice deposits and 7-day notice deposits, customers must come to the counter 1 day or 7 days in advance to make an appointment for withdrawal registration. The so-called transfer means that the system can automatically transfer the principal and interest to the customer's current account on the due date, but the customer is required to come to the counter every cycle (7 days) to handle the agreed transfer business.

[0042] Exemplarily, the knowledge title can be obtained from the knowledge content text based on natural language processing technology; exemplary, the knowledge title can be obtained from the source document.

[0043] Exemplarily, the graph tags contained in the knowledge point refer to the attribute information of the knowledge text. Exemplarily, the graph tags include: product (the product described by the content of the knowledge text), bank (which branch or which head office the content of the knowledge text is aimed at), customer type. Exemplarily, customer types include but are not limited to: individual customers, wealth management customers, ordinary customers, private banking customers, BOC wealth management customers, etc.

[0044] Exemplarily, the personalized tags contained in the knowledge points are added by human agents, and the human agents can mark the knowledge points based on their own understanding of the knowledge points. For example, the human agent with the identification A of the human agent in Table 1 marked "Fuden's special time deposit". Next time, the human agent with the identification A of the human agent can accurately search for the knowledge points shown in Table 1 based on the query statement "Fuden's special time deposit".

[0045] It should be noted that sometimes when a human agent searches for a required knowledge point, but the human agent has some understanding of the knowledge point or has his own habit of naming the knowledge point, then the human agent can add his own understanding to the personalized label of the knowledge point. In this way, the thinking habits of different human agents can be taken into account, and the annotation of knowledge can be enriched, thereby speeding up the efficiency of knowledge query and improving the accuracy of knowledge query.

[0046] For example, for the same knowledge point, the personalized tags marked by different manual agents may be different or the same; because the manual agent needs to log in before searching for knowledge points, the query statement of the manual agent includes the identification of the manual agent. Therefore, in the process of retrieving knowledge points by personalized tags, it will not be affected by the personalized tags marked by other manual agents.

[0047] Exemplarily, the management attribute included in the knowledge point refers to information about the administrator who manages the knowledge point. For example, the management attribute includes the department to which the administrator belongs and the user group to which the administrator belongs.

[0048] The structure of the knowledge points in Table 1 is only an example and does not limit the structure of the knowledge points. For example, a knowledge point may include: knowledge text, graph labels, personalized labels, and one or more fields in management attributes.

[0049] Exemplarily, the knowledge points also include: keywords of the knowledge text.

[0050] Exemplarily, the knowledge point also includes a receiving group, and the receiving group includes identifiers of users who can query and obtain the knowledge point.

[0051] Secondly, the hardware architecture involved in the embodiments of the present application is described.

[0052] like Figure 1 , which is a structural diagram of the hardware architecture involved in an embodiment of the present application, the hardware architecture includes: an electronic device 11 and a server 12.

[0053] Exemplarily, the electronic device 11 can be any electronic product that can interact with a user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as a mobile phone, a laptop computer, a tablet computer, a PDA, a personal computer, a wearable device, a smart TV, a PAD, etc.

[0054] Exemplarily, the server 12 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing server center. The server 12 may include a processor, a memory, a network interface, and the like.

[0055] It should be noted that Figure 1 This is just an example. There are many types of electronic devices, not limited to Figure 1 Computers in the.

[0056] Exemplarily, the electronic device 11 may establish a connection and communicate with the server 12 via a wireless network or a wired network.

[0057] The electronic device 11 may run a client, which may be an application client or a web client.

[0058] The user can input a query statement through the client in the electronic device 11. The client in the electronic device 11 can send the query statement to the server 12. The client in the electronic device 11 can display the query result fed back by the server 12.

[0059] Exemplarily, the query statement may include a query keyword and a limiting field that limits a target search scope for searching the query keyword.

[0060] Exemplarily, the limiting field may include at least one of a target search directory and a target search field.

[0061] The target search directory is a storage path for storing knowledge points in the database. Exemplarily, different types of knowledge points are stored in different storage paths.

[0062] Exemplarily, the target search field is any field contained in the knowledge point. For example, the target search field may include one or more fields in the knowledge text, graph label, personalized label, and management attribute.

[0063] Those skilled in the art should understand that the above-mentioned electronic devices and servers are only examples, and other existing or future electronic devices or servers that are applicable to the present disclosure should also be included in the protection scope of the present disclosure and are included here by reference.

[0064] The query method provided by the embodiment of the present application is described below in combination with the above hardware architecture. The query method can be applied to Figure 1 in the server shown.

[0065] like Figure 2 As shown, it is a flowchart of a query method provided in an embodiment of the present application, and the method includes the following steps S21 to S25.

[0066] Step S21: receiving a query statement sent by a client, wherein the query statement includes a query keyword and a limiting field for limiting a target search range for searching the query keyword.

[0067] Exemplarily, a user interface may be displayed in an electronic device running a client, wherein a limited field is displayed in the user interface, and a user may select a limited field and input a corresponding query keyword in an input box corresponding to the limited field.

[0068] In an optional implementation, the limited field includes at least one of a target search directory and a target search field, and correspondingly, the candidate limited field includes at least one of a candidate search directory and a candidate search field, the target search field or the candidate search field is any field contained in the knowledge points stored in the database, for example, a personality label, a graph label, and the target search directory or the candidate search directory is the storage path of the knowledge points stored in the database.

[0069] To help those skilled in the art better understand the defined fields provided in the embodiments of the present application, the following examples are provided for illustration.

[0070] like Figure 3 Shown is a schematic diagram of an implementation method of the user interface provided in an embodiment of the present application.

[0071] In the embodiment of the present application, the search directory included in the limited fields contained in the query statement is referred to as the target search directory, and the search field included is referred to as the target search field.

[0072] Figure 3 In the example, the knowledge points stored in the database are stored in M ​​large storage paths. Each large storage path has multiple small storage paths, such as a secondary directory, a tertiary directory, etc.

[0073] Users can Figure 3 The search directory shown on the left side of the user interface selects the target search directory, and the user can enter or select the query keyword in the corresponding target search field through the right side of the user interface. After the user clicks on the search, the query statement can be generated.

[0074] Exemplarily, the user may also directly enter a query statement in the search box.

[0075] Exemplarily, the syntax of the query statement may be [@target search directory query keyword in target search field], where the target search directory is after the @ symbol. The target search directory may be left blank when the user is unclear. If left blank, it means searching all search directories.

[0076] Step S22: Searching for target knowledge points within the target search range corresponding to the limited field whose relevance to the query keyword is higher than or equal to a first preset threshold.

[0077] The process of searching for target knowledge points within the target search range whose relevance to the query keyword is higher than or equal to a first preset threshold may be as follows:

[0078] If the restricted field includes the target search directory, the target search range is determined to be the knowledge points whose storage path is the target search directory. If the restricted field includes the target restricted field, the relevance between the attribute value of the target restricted field contained in the knowledge point whose storage path is the target search directory and the query keyword is calculated; if the relevance between the attribute value of the target restricted field contained in the target knowledge point whose storage path is the target search directory and the query keyword is higher than or equal to the first preset threshold, the target knowledge point is found, otherwise, it is not found.

[0079] The specific value of the first preset threshold may be determined based on actual conditions and is not limited here.

[0080] Step S23: If the target knowledge point is not found within the target search range, the relevance between the restricted field and a preset candidate restricted field is obtained.

[0081] There are two situations that may result in the inability to query the target knowledge point within the target search range.

[0082] The first case: When the operation and maintenance personnel store the target knowledge points, they store the target knowledge points in the wrong search directory, and the target search directory entered by the user is correct.

[0083] The second situation: When the operation and maintenance personnel store the target knowledge points, they store the target knowledge points in the correct search directory, and the target search directory entered by the user is wrong.

[0084] It is understandable that in the related art, if the target knowledge point is not found within the target search range, information indicating that the relevant knowledge point has not been retrieved will be fed back to the client, or knowledge points with low relevance will be fed back to the client, so that the user can manually adjust the limiting fields in the query statement, and search again based on the adjusted query statement. If the target knowledge point is still not found within the target search range corresponding to the adjusted limiting field, the user needs to manually adjust it again, which makes the retrieval time longer. The embodiment of the present application can automatically adjust the limiting fields until the target knowledge point is retrieved, so that the retrieval time is shorter.

[0085] Step S24: querying the target knowledge point from the candidate search range corresponding to the candidate limited field in order from large to small relevance until the target knowledge point is found.

[0086] Assuming that the candidate limiting fields are sorted from large to small according to their relevance to the limiting field, they are: candidate limiting field 1, candidate limiting field 2, candidate limiting field 3, and candidate limiting field 4. Then, the target knowledge point is first queried from the candidate search range corresponding to candidate limiting field 1. If the target knowledge point is not found, the target knowledge point is queried from the candidate search range corresponding to candidate limiting field 2. If the target knowledge point is not found, the target knowledge point is queried from the candidate search range corresponding to candidate limiting field 3. If the target knowledge point is not found, the target knowledge point is queried from the candidate search range corresponding to candidate limiting field 4, until the target knowledge point is found.

[0087] Step S25: Send the target knowledge point to the client.

[0088] In the query method provided by the embodiment of the present application, a query statement sent by a client is received, the query statement includes a query keyword and a limited field that limits the target search range of the query keyword; the target knowledge point whose relevance to the query keyword is higher than or equal to the first preset threshold is searched within the target search range corresponding to the limited field; if the target knowledge point is not found within the target search range, the relevance of the limited field and the preset candidate limited field is obtained; the target knowledge point is searched from the candidate search range corresponding to the candidate limited field in descending order according to the relevance, until the target knowledge point is found; the target knowledge point is sent to the client. In the related art, if the target knowledge point is not found within the target search range, information indicating that the relevant knowledge point has not been retrieved will be fed back to the client, or the knowledge point with low relevance will be fed back to the client, so that the user can manually adjust the limited field in the query statement, and search again based on the adjusted query statement. If the target knowledge point is still not found within the target search range corresponding to the adjusted limited field, the user needs to adjust it again manually, so that the retrieval takes a long time. The embodiment of the present application can automatically adjust the limited field until the target knowledge point is retrieved, so that the retrieval takes a short time.

[0089] In an optional implementation, there are two situations that may result in the inability to query the target knowledge point within the target search range. The first situation: when the operation and maintenance personnel store the target knowledge point, the target knowledge point is stored in the wrong search directory, and the target search directory entered by the user is correct. In the first case, it is necessary to adjust the storage directory of the target knowledge point stored in the database. The second situation: when the operation and maintenance personnel store the target knowledge point, the target knowledge point is stored in the correct search directory, and the target search directory entered by the user is wrong. In the second case, if most users believe that the target knowledge point should be stored in the target search directory, then in order to improve the user experience and reduce the retrieval time, the target knowledge point can be copied to the target search directory. Based on this, the embodiment of the present application also provides the following method, which includes steps A11 to A12.

[0090] Step A11: If the target knowledge point is not found in the target search directory, record the first number of times the target knowledge point located in the candidate search directory is found through a query statement containing the target search directory.

[0091] For example, the query statement entered by user A is [@target search directory 1 query keyword A1in target search field], and the target knowledge point retrieved by the server is knowledge point 1, but knowledge point 1 is stored under candidate search directory A; the query statement entered by user B is [@target search directory 1 query keyword A2in target search field], and the target knowledge point retrieved by the server is knowledge point 1, but knowledge point 1 is stored under candidate search directory A, then the first number is 2.

[0092] Step A12: If the first number of times is greater than or equal to a second preset threshold, the target knowledge point is copied to the target search directory.

[0093] It is understandable that if many users input query statements including the target search directory, but the target knowledge points retrieved by the server are stored in the candidate search directory A, it means that many users believe that the target knowledge points should be stored in the target search directory. If the target knowledge points are copied to the target search directory, and subsequently the user inputs query statements including the target search directory, the target knowledge points can be directly found in the target search directory, thereby shortening the retrieval time.

[0094] The specific value of the second preset threshold can be determined based on actual conditions and will not be elaborated here.

[0095] In an optional implementation, in order to avoid the database from storing multiple duplicate knowledge points, a maximum value of duplicate stored knowledge points can be set. In this case, step A12 can be: if the first number is greater than or equal to a second preset threshold, and the number of target knowledge points stored in the database is less than the maximum value, the target knowledge point is copied to the target search directory.

[0096] Exemplarily, if the first number of times is greater than or equal to the second preset threshold, and the number of target knowledge points stored in the database is equal to the maximum value, the target knowledge point with the earliest storage time stored in the database is deleted, and the target knowledge point is copied to the target search directory. In this way, the number of target knowledge points stored in the database can be maintained at no more than the maximum value.

[0097] In an optional implementation, the following steps B11 to B12 are also included.

[0098] Step B11: If the relevance between the attribute value of the target search field of the knowledge point stored in the database and the query keyword is less than the first preset threshold, record the second number of times the target knowledge point whose attribute value of the candidate search field and relevance between the query keyword is greater than or equal to the first preset threshold is found through a query statement containing the target search field.

[0099] Assume that the initial value of the second number is 0. If the query statement input by user A is [@target search directory 1 query keyword A1in knowledge content], if the correlation between the attribute value of the knowledge content contained in the knowledge point and the query keyword A1 is less than the first preset threshold, if the knowledge content is expanded to the graph label, then the correlation between the attribute value of the graph label contained in the knowledge point and the query keyword A1 can be calculated. If the target knowledge point retrieved by the server is knowledge point 1, that is, the attribute value in the target knowledge point 1 with a correlation higher than or equal to the first preset threshold with the query keyword A1 does not belong to the knowledge content but belongs to the graph label; then the second number is 1; if the query statement input by user B is [@target search directory 1 query keyword A2in knowledge content], the target knowledge point retrieved by the server is knowledge point 1, and the attribute value in the target knowledge point 1 with a correlation higher than or equal to the first preset threshold with the query keyword A2 does not belong to the knowledge content but belongs to the graph label; then the second number is 2.

[0100] Step B12: If the second number is greater than or equal to a third preset threshold, the target search field and the candidate search field are divided into the same field set.

[0101] The specific value of the third preset threshold can be determined based on actual conditions and will not be elaborated here.

[0102] In an optional implementation, in order to prevent malicious searches, the correlation between the search fields stored in the field set is weaker, that is, two originally unrelated candidate search fields are divided into the same field set. The embodiment of the present application also provides the following method: for any of the field sets, if the correlation between any search field in the field set and other search fields is less than or equal to a fourth preset threshold, delete the search field in the field set.

[0103] The specific value of the fourth preset threshold value can be determined based on actual conditions and will not be described in detail here.

[0104] Exemplarily, the fourth preset threshold is smaller than the third preset threshold.

[0105] In an optional implementation, step S23 includes the following steps C11 to C12.

[0106] Step C11: If there is a target field set including the target search field, determine that all search fields included in the target field set except the target search field are candidate search fields.

[0107] Assuming that the target search field is the knowledge title, if the target field set including the knowledge title is {knowledge title, knowledge content, graph label}, then the fields in the target field set except the knowledge title, namely the knowledge content and graph label, are all candidate search fields.

[0108] Step C12: Calculate the relevance between the candidate search fields included in the target field set and the target search field.

[0109] In an optional implementation, there are multiple implementations of step S24, and the embodiments of the present application provide but are not limited to the following three.

[0110] The first implementation method includes the following steps D11 to D18.

[0111] Step D11: Sort the candidate search fields included in the target field set according to their relevance to the target search field from large to small, to obtain a first sorting result.

[0112] Step D12: Determine the target search directory as the target directory.

[0113] Step D13: Determine the first unmarked candidate search field in the first ranking result as the target candidate search field.

[0114] Step D14: Calculate the correlation between the attribute value of the target candidate search field contained in the knowledge point stored in the target directory and the query keyword. If the target knowledge point with a correlation greater than or equal to the first preset threshold is not found, execute step D15. If the target knowledge point is found, terminate.

[0115] Step D15: Mark the target candidate search field to indicate that the target candidate field has been used, and return to step D13.

[0116] If all candidate search fields in the first sorting result are marked, step D16 is executed.

[0117] Step D16: Sort the candidate search directories in descending order according to their relevance to the target search directory to obtain a second sorting result.

[0118] Step D17: Determine the first unmarked candidate search directory in the second sorting result as the target candidate search directory.

[0119] Step D18: Mark the target candidate search directory, calculate the correlation between the attribute value of the target search field contained in the knowledge point stored in the target candidate search directory and the query keyword, if the target knowledge point with a correlation greater than or equal to the first preset threshold is not found, clear the mark of each candidate search field in the first sorting result, determine the target candidate search directory as the target directory, and execute steps D13 to D15. If the target knowledge point is found, terminate; if all candidate search fields in the first sorting result are marked, execute step D17.

[0120] The second implementation method includes the following steps E11 to E15.

[0121] Step E11: Obtain a target field set including a target search field, and determine that the target search directory is the target directory.

[0122] Step E12: Calculate the relevance between the attribute value of each candidate search field in the target field set included in the knowledge points stored in the target directory and the query keyword.

[0123] If the target knowledge point with a relevance greater than or equal to the first preset threshold is not found, step E13 is executed. If the target knowledge point is found, the process is terminated.

[0124] Step E13: Sort the candidate search directories in descending order according to their relevance to the target search directory to obtain a second sorting result.

[0125] Step E14: Determine the first unmarked candidate search directory in the second sorting result as the target candidate search directory.

[0126] Step E15: Mark the target candidate search directory, calculate the correlation between the attribute value of the target search field contained in the knowledge point stored in the target candidate search directory and the query keyword, if the target knowledge point with a correlation greater than or equal to the first preset threshold is not found, determine the target candidate search directory as the target directory, and return to step E12. If the target knowledge point is found, terminate; if the target knowledge point with a correlation greater than or equal to the first preset threshold is not found, execute step E14.

[0127] The third implementation includes the following steps F11 to F15.

[0128] Step F11: Sort the candidate search directories in descending order according to their relevance to the target search directory to obtain a second sorting result.

[0129] Step F12: Determine the first unmarked candidate search directory in the second sorting result as the target candidate search directory.

[0130] Step F13: Mark the target candidate search directory, calculate the correlation between the attribute value of the target search field contained in the knowledge point stored in the target candidate search directory and the query keyword, if the target knowledge point with a correlation greater than or equal to the first preset threshold is not found, return to step F12, if the target knowledge point is found, terminate.

[0131] Step F14: If all candidate search directories in the second sorting result are marked and the target knowledge point is still not found, a target field set including the target search field is obtained.

[0132] Step F15: Calculate the relevance between the attribute values ​​of each candidate search field in the target field set contained in the knowledge points stored in the target search directory and the query keyword. If no target knowledge point with a relevance greater than or equal to the first preset threshold is found, execute step F16. If the target knowledge point is found, terminate.

[0133] Step F16: Calculate the relevance of the attribute values ​​of each candidate search field in the target field set contained in the knowledge point under the i-th candidate search directory stored in the second sorting result and the query keyword, with the value of i starting from 1 until the target knowledge point is found.

[0134] It is understandable that there are many ways to implement step S24, which cannot be enumerated in the embodiments of the present application. Other existing or future methods that are applicable to the present disclosure should also be included in the scope of protection of the present disclosure and are included here by reference.

[0135] The method is described in detail in the embodiments disclosed in the above-mentioned application. The method of the application can be implemented by various forms of devices. Therefore, the application also discloses a device, and a specific embodiment is given below for detailed description.

[0136] like Figure 4 As shown, it is a structural diagram of a query device provided in an embodiment of the present application, and the query device includes: a first receiving module 41, a first query module 42, a first acquisition module 43, a second query module 44 and a sending module 45, wherein:

[0137] A first receiving module 41 is configured to receive a query statement sent by a client, wherein the query statement includes a query keyword and a limiting field that limits a target search range for searching the query keyword;

[0138] A first query module 42 is used to query a target knowledge point whose relevance to the query keyword is higher than or equal to a first preset threshold within the target search range corresponding to the limited field;

[0139] A first acquisition module 43 is used to acquire the relevance between the limited field and a preset candidate limited field if the target knowledge point is not found within the target search range;

[0140] A second query module 44 is used to query the target knowledge point from the candidate search range corresponding to the candidate limited field in descending order of relevance until the target knowledge point is found;

[0141] The sending module 45 is used to send the target knowledge point to the client.

[0142] In an optional implementation, the limited field includes at least one of a target search directory and a target search field, and correspondingly, the candidate limited field includes at least one of a candidate search directory and a candidate search field, the target search field or the candidate search field is any field contained in the knowledge points stored in the database, the target search directory or the candidate search directory is the storage path of the knowledge points stored in the database, and the target knowledge point is any knowledge point stored in the database.

[0143] In an optional implementation, if the limiting field includes a target search directory, it also includes:

[0144] A first recording module, configured to record a first number of times the target knowledge point located in the candidate search directory is found through a query statement containing the target search directory if the target knowledge point is not found in the target search directory;

[0145] A copy module is used to copy the target knowledge point to the target search directory if the first number of times is greater than or equal to a second preset threshold.

[0146] In an optional implementation, the limited field includes at least one of a target search directory and a target search field, and correspondingly, the candidate limited field includes at least one of a candidate search directory and a candidate search field, the target search field or the candidate search field is any field contained in the knowledge points stored in the database, the target search directory or the candidate search directory is the storage path of the knowledge points stored in the database, and the target knowledge point is any knowledge point stored in the database.

[0147] In an optional implementation, if the limited field includes a target search field, it also includes:

[0148] A second recording module is used for recording a second number of times the target knowledge point whose attribute value of the target search field and the query keyword have a correlation greater than or equal to the first preset threshold value found through a query statement containing the target search field, if the correlation between the attribute value of the target search field and the query keyword of the knowledge point stored in the database is less than the first preset threshold value;

[0149] A division module is used to divide the target search field and the candidate search field into the same field set if the second number is greater than or equal to a third preset threshold.

[0150] In an optional implementation, the first acquisition module includes:

[0151] a determining unit, configured to, if there is a target field set including the target search field, determine that all search fields included in the target field set except the target search field are candidate search fields;

[0152] The calculation unit is used to calculate the relevance between the candidate search fields included in the target field set and the target search field respectively.

[0153] In an optional implementation, the method further includes:

[0154] The deleting module is configured to, for any of the field sets, delete the search field in the field set if the relevance between any search field in the field set and other search fields is less than or equal to a fourth preset threshold.

[0155] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0156] Figure 5 The invention is a block diagram showing a device for a server according to an exemplary embodiment.

[0157] The server includes, but is not limited to, a processor 51 , a memory 52 , a network interface 53 , an I / O controller 54 , and a communication bus 55 .

[0158] It should be noted that those skilled in the art can understand that Figure 5 The server structure shown in the figure does not constitute a limitation on the server, and the server may include Figure 5 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0159] Combine the following Figure 5 A detailed introduction to each component of the server:

[0160] The processor 51 is the control center of the server. It uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 52, and calling data stored in the memory 52, so as to monitor the server as a whole. The processor 51 may include one or more processing units; illustratively, the processor 51 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 51.

[0161] The processor 51 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0162] The memory 52 may include a memory, such as a high-speed random access memory (RAM) 521 and a read-only memory (ROM) 522, and may also include a large-capacity storage device 523, such as at least one disk storage, etc. Of course, the server may also include hardware required for other services.

[0163] The memory 52 is used to store executable instructions of the processor 51. The processor 51 has the following functions: receiving a query statement sent by a client, the query statement including a query keyword and a limiting field for limiting a target search range of the query keyword;

[0164] Searching for target knowledge points whose relevance to the query keyword is higher than or equal to a first preset threshold within the target search range corresponding to the limited field;

[0165] If the target knowledge point is not found within the target search range, obtaining the relevance between the limited field and a preset candidate limited field;

[0166] Searching for the target knowledge point from the candidate search range corresponding to the candidate limited field in descending order of relevance until the target knowledge point is found;

[0167] Send the target knowledge point to the client.

[0168] The processor 51, the memory 52, the network interface 53 and the I / O controller 54 can be interconnected via a communication bus 55, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc.

[0169] In an exemplary embodiment, the server may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned query method.

[0170] In an exemplary embodiment, the present disclosure provides a storage medium including instructions, such as a memory 52 including instructions, and the instructions can be executed by a processor 51 of a server to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0171] In an exemplary embodiment, a computer-readable storage medium is also provided, which can be directly loaded into the internal memory of a computer, such as the above-mentioned memory 52, and contains software code. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the above-mentioned query method.

[0172] In an exemplary embodiment, a computer program product is also provided, which can be directly loaded into the internal memory of a computer, such as the memory contained in the server, and contains software code. After being loaded and executed by a computer, the computer program can implement the steps shown in any embodiment of the query method described above.

[0173] It should be noted that the features described in the various embodiments in this specification can be replaced or combined with each other. For the device or system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0174] It should also be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0175] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.

[0176] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A query method, characterized in that: include: Receiving a query statement sent by a client, the query statement including a query keyword and a limiting field for limiting a target search range for searching the query keyword; Searching for target knowledge points whose relevance to the query keyword is higher than or equal to a first preset threshold within the target search range corresponding to the limited field; If the target knowledge point is not found within the target search range, obtaining the relevance between the limited field and a preset candidate limited field; Searching for the target knowledge point from the candidate search range corresponding to the candidate limited field in descending order of relevance until the target knowledge point is found; Sending the target knowledge point to the client; Wherein, the limited field includes at least one of a target search directory and a target search field, and correspondingly, the candidate limited field includes at least one of a candidate search directory and a candidate search field, the target search field or the candidate search field is any field contained in the knowledge points stored in the database, the target search directory or the candidate search directory is a storage path of the knowledge points stored in the database, and the target knowledge point is any knowledge point stored in the database; If the limiting field includes a target search directory, it also includes: If the target knowledge point is not found in the target search directory, record the first number of times the target knowledge point located in the candidate search directory is found through the query statement containing the target search directory; If the first number of times is greater than or equal to a second preset threshold, the target knowledge point is copied to the target search directory.

2. The query method according to claim 1, characterized in that: If the limiting field includes the target search field, it also includes: If the relevance between the attribute value of the target search field of the knowledge point stored in the database and the query keyword is less than the first preset threshold, record the second number of times the target knowledge point whose attribute value of the candidate search field and the relevance between the query keyword is greater than or equal to the first preset threshold is found through the query statement containing the target search field; If the second number is greater than or equal to a third preset threshold, the target search field and the candidate search field are divided into the same field set.

3. The query method according to claim 2, characterized in that: The obtaining of the relevance between the limiting field and the preset candidate limiting field includes: If there is a target field set including the target search field, determining that all search fields except the target search field included in the target field set are candidate search fields; The relevance between the candidate search fields included in the target field set and the target search field is calculated.

4. The query method according to claim 2 or 3, characterized in that: Also includes: For any of the field sets, if the relevance between any search field in the field set and other search fields is less than or equal to a fourth preset threshold, the search field in the field set is deleted.

5. A query device, characterized in that: include: A first receiving module is used to receive a query statement sent by a client, wherein the query statement includes a query keyword and a limiting field that limits a target search range for searching the query keyword; A first query module is used to query, within a target search range corresponding to the limited field, target knowledge points whose relevance to the query keyword is higher than or equal to a first preset threshold; A first acquisition module, configured to acquire the relevance between the limited field and a preset candidate limited field if the target knowledge point is not found within the target search range; A second query module is used to query the target knowledge point from the candidate search range corresponding to the candidate limited field in order from large to small relevance until the target knowledge point is found; A sending module, used for sending the target knowledge point to the client; Wherein, the limited field includes at least one of a target search directory and a target search field, and correspondingly, the candidate limited field includes at least one of a candidate search directory and a candidate search field, the target search field or the candidate search field is any field contained in the knowledge points stored in the database, the target search directory or the candidate search directory is a storage path of the knowledge points stored in the database, and the target knowledge point is any knowledge point stored in the database; If the limiting field includes a target search directory, it also includes: If the target knowledge point is not found in the target search directory, record the first number of times the target knowledge point located in the candidate search directory is found through the query statement containing the target search directory; If the first number of times is greater than or equal to a second preset threshold, the target knowledge point is copied to the target search directory.

6. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the query method according to any one of claims 1 to 4.

7. A computer-readable storage medium, when instructions in the storage medium are executed by a processor of a server, the server is enabled to execute the query method according to any one of claims 1 to 4.

8. A computer program product, which can be directly loaded into an internal memory of a computer and contains software codes, and which can implement the query method according to any one of claims 1 to 4 after being loaded and executed by a computer.

Citation Information

Patent Citations

  • Automatic inquiring and answering method and system

    CN101377777A

  • Method and device for displaying results of keyword search

    CN102902688A

  • Method and system for extracting book knowledge points according to book catalogue

    CN104361028A

  • Data query method and device, computer equipment and storage medium

    CN111400556A

  • High-concurrency data retrieval method and device, equipment and storage medium

    CN111428140A