Question search method, device, terminal device and readable storage medium
By obtaining and using book information corresponding to historical questions to screen and increase the weight, the problem of low question search accuracy in the existing technology is solved, and the accuracy of question search in a massive question bank is improved.
Patent Information
- Application Number
- CN202210193128.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-28
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2042-02-28
AI Technical Summary
In the existing photo search question technology, OCR text information is used to directly search in a large number of questions and a large number of similar questions. As a result, the accuracy of the search results is not high, and the original questions cannot be accurately searched.
By obtaining the image of the target question to be searched and the book information corresponding to the searched historical questions, the searched book information within the preset time period is determined, and the answer to the target question is identified based on this information to improve the accuracy of the question search.
Compared with directly using OCR text information for retrieval, filtering and weighting by book information corresponding to historical topics significantly improves the accuracy of search results and reduces the amount of calculation and search time.
Smart Images

Figure CN114547467B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of question searching, and in particular to a question searching method, apparatus, terminal device and readable storage medium. Background Art
[0002] In the existing photo-taking search technology, a user usually clicks or frames a question to be searched for optical character recognition (OCR) and searches for the question.
[0003] The problem with this method is that when searching for a question, the OCR text information of the question is used to directly search in a question bank with a large number of questions and a large number of similar questions. The accuracy of the search result is not high and the original question cannot be found. Summary of the invention
[0004] The embodiments of the present application provide a question search method, apparatus, terminal device and readable storage medium to improve the accuracy of question search results.
[0005] In a first aspect, an embodiment of the present application provides a question search method, comprising:
[0006] An acquisition module, used to acquire the target topic image to be searched and the book information corresponding to the searched historical topic;
[0007] A first determining module, configured to determine the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical topic;
[0008] The second determination module is used to determine the answer to the target question according to the target question image and the book information searched within the preset first time period.
[0009] In a possible implementation of the first aspect, the method for determining the book information corresponding to the searched history topic includes:
[0010] In the preset index library, multiple related question information related to each historical question information is searched;
[0011] Determine the book information corresponding to each piece of relevant question information according to the plurality of pieces of relevant question information;
[0012] According to the book information corresponding to each of the related question information, the book information corresponding to the searched historical questions is determined.
[0013] The step of determining the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical titles includes:
[0014] Determining the book information corresponding to the historical title information within the preset first time period according to the book information corresponding to the searched historical title;
[0015] The first number of book information corresponding to the historical title information within the preset first time period is counted, and if the first number is not less than a first threshold, the book information whose first number is not less than the first threshold is determined as the book information searched within the preset first time period.
[0016] The step of determining the answer to the target question based on the target question image and the book information searched within the preset first time period includes:
[0017] Identify the target topic image and obtain target topic information;
[0018] Calculating the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period;
[0019] The answer to the target question is determined according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period.
[0020] The step of calculating the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period includes:
[0021] Determining the book information that has been searched within a preset second time period according to the book information corresponding to the searched historical topic, where the second time period is a time period within the first time period;
[0022] Determining whether the book information searched within the preset second time period includes the book information searched within the preset first time period;
[0023] If so, the weight of the book information searched within the preset second time period is increased;
[0024] The relevance between the target title information and the title information corresponding to the book information searched within the preset first time period is calculated according to the weight.
[0025] The step of increasing the weight of the book information searched within the preset second time period includes:
[0026] Counting a second number of times the book information has been searched within a preset second time period;
[0027] If the second number of times is not less than the second threshold and not greater than the first threshold, the weight of the book information searched the second number of times within the preset second time period is increased.
[0028] The step of determining the answer to the target question according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period includes:
[0029] Sorting the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period;
[0030] The answer information corresponding to the book information searched within the preset first time period with the greatest relevance is determined as the answer information of the target question.
[0031] In a second aspect, an embodiment of the present application provides a question searching device, comprising:
[0032] An acquisition module, used to acquire the target topic image to be searched and the book information corresponding to the searched historical topic;
[0033] A first determining module, configured to determine the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical topic;
[0034] The second determination module is used to determine the answer to the target question according to the target question image and the book information searched within the preset first time period.
[0035] In a third aspect, an embodiment of the present application provides a terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the question searching method as described in any one of the first aspects when executing the computer program.
[0036] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and wherein the computer program, when executed by a processor, implements the question-searching method as described in any one of the first aspects.
[0037] Compared with the prior art, the embodiments of the present application have the following beneficial effects: the embodiments of the present application obtain the target title image to be searched and the book information corresponding to the searched historical title; determine the book information that has been searched within the preset first time period according to the book information corresponding to the searched historical title; determine the answer to the target title according to the target title image and the book information that has been searched within the preset first time period. That is, when searching for the target title, the present application can determine the book information that has been searched within the preset first time period through the book information corresponding to the searched historical title, and determine the answer to the target title according to the book information, which improves the accuracy of searching questions compared to using the OCR text information of the target title to directly search in a question bank with a large number of questions and a large number of similar questions. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0039] Figure 1 This is a schematic diagram of an application scenario of the question search method provided in one embodiment of the present application;
[0040] Figure 2 is a schematic flow chart of a method for determining an answer to a target question provided in an embodiment of the present application;
[0041] Figure 3 is a schematic flow chart of a method for determining book information corresponding to historical topic information provided in an embodiment of the present application;
[0042] Figure 4 is a schematic flow chart of a specific method of S202 provided in an embodiment of the present application;
[0043] Figure 5 is a schematic flow chart of a specific method of S203 provided in an embodiment of the present application;
[0044] Figure 6 is a schematic flow chart of a specific method of S502 provided in an embodiment of the present application;
[0045] Figure 7 is a schematic flow chart of a specific method of S603 provided in an embodiment of the present application;
[0046] Figure 8 is a schematic flow chart of a specific method of S503 provided in an embodiment of the present application;
[0047] Fig. 9 It is a structural schematic diagram of a question-searching device provided in an embodiment of the present application;
[0048] Fig.10 It is a structural diagram of a terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0049] In the following description, specific details such as specific system structures, technologies, etc. are proposed for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application. In other cases, the specific technical details of each embodiment may be referenced to each other, and a specific system not described in one embodiment may be referenced to other embodiments.
[0050] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0051] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0052] References to "an embodiment of the present application" or "some embodiments" described in the specification of the present application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in other embodiments", "an embodiment of the present application", "other embodiments of the present application", etc. that appear in different places in the specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0053] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0054] In the existing photo-taking search technology, a user usually clicks or frames a question to be searched for optical character recognition (OCR) and searches for the question.
[0055] The problem with this method is that when searching for a question, the OCR text information of the question is used to directly search in a question bank with a large number of questions and a large number of similar questions. The accuracy of the search result is not high and the original question cannot be found.
[0056] In order to solve the above-mentioned defects, the inventive concept of the present application is as follows:
[0057] When searching for a target question, the present application can determine the book information that has been searched within a preset first time period through the book information corresponding to the historical questions that have been searched, and determine the answer to the target question based on the book information. This improves the accuracy of the search compared to using the OCR text information of the target question to directly search in a question bank with a large number of questions and a large number of similar questions.
[0058] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0059] Please refer to Figure 1 , Figure 1 This is a schematic diagram of an application scenario of the question search method provided in an embodiment of the present application. For the convenience of explanation, only the part related to the present application is shown. The application scenario includes: a terminal device 100 and a target question 200.
[0060] The terminal device 100 includes a scanning pen, a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc. The embodiment of the present application does not impose any limitation on the specific type of the terminal device.
[0061] The target topic 200 in the embodiment of the present application may be a topic on a whole page of a book, a topic on a test paper, or a topic written temporarily.
[0062] The target title in the embodiment of the present application can be a printed font or a handwritten font, and the embodiment of the present application does not limit the font type of the title.
[0063] The terminal device mainly obtains the target question 200 image to be searched and the book information corresponding to the historical questions that have been searched; determines the book information that has been searched within a preset first time period based on the book information corresponding to the historical questions that have been searched; and determines the answer to the target question based on the target question 200 image and the book information that has been searched within the preset first time period.
[0064] For the method of determining the answer to the target question in the embodiment of the present application, please refer to Figure 2 , Figure 2 It is a schematic flowchart of a method for determining an answer to a target question provided in an embodiment of the present application. Figure 2The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 2 As shown, the method includes: S201 to S203.
[0065] S201, obtaining the target title image to be searched and the book information corresponding to the searched historical titles.
[0066] Specifically, a photographic component is usually configured in the terminal device. In the embodiment of the present application, the terminal device can obtain the target topic image to be searched through the photographic component. The embodiment of the present application does not limit the type of the photographic component.
[0067] In the embodiment of the present application, after obtaining the target topic image to be searched, the obtained image needs to be preprocessed, and the preprocessing includes graying, binarization, smoothing and other processing. The purpose of the preprocessing is to correct the obtained image and unify the specifications. The embodiment of the present application does not limit the preprocessing method.
[0068] In the embodiment of the present application, the book information corresponding to the searched historical topic refers to the topic information that the searcher has searched before searching the target topic using the terminal device, and the book information is determined by the searched topic information.
[0069] In the embodiment of the present application, each time the question searcher searches for historical question information using a terminal device, the historical question information and the book information corresponding to the historical question information are recorded using a embedding technology.
[0070] Buried point is a term in the field of data collection. In the embodiment of the present application, the historical question information searched by the question searcher and the book information corresponding to the historical question information can be captured and stored through buried points.
[0071] In some embodiments, the method for determining the book information corresponding to the searched historical title information is:
[0072] The information of each history question is input into the trained neural network model. In the neural network model, multiple word segments of each history question are obtained based on the information of each history question. Then, based on the word frequency values of each word segment in multiple different books, book recognition is performed on each history question information to determine the book information corresponding to each history question.
[0073] The training method of the neural network model is:
[0074] Obtain sample history title information and mark the corresponding book information in the sample history title information.
[0075] Input sample historical question information into the neural network model for training.
[0076] In the neural network model, multiple word segments of sample historical topic information and the word frequency values of each word segment in different books are obtained.
[0077] According to the word frequency values of each word segment in different books, book recognition is performed on the sample historical title information. If the recognition result is inconsistent with the marked book information, the word frequency values of each word segment in different books are adjusted to obtain the adjusted word frequency values.
[0078] After the adjustment, book recognition is performed again according to the adjusted word frequency values corresponding to each word segment in different books. The adjustment and recognition is a cyclic process until the adjusted word frequency values can make the book recognition result consistent with the book mark.
[0079] Through the above process, after training a certain number of sample history questions, we can obtain more accurate word segmentation of history questions and their corresponding word frequency values of different books, so that when we subsequently identify history questions of unknown books, we can accurately identify the book to which the history question belongs.
[0080] In other embodiments of the present application, the method for determining the book information corresponding to the searched historical title information can refer to Figure 3 , Figure 3 It is a schematic flow chart of a method for determining book information corresponding to historical topic information provided in an embodiment of the present application. Figure 3 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 3 As shown, the method includes: S301 to S303.
[0081] S301. Search a preset index library for a plurality of related question information related to each historical question information.
[0082] Specifically, the preset index library contains document information corresponding to each question, and the document information corresponding to each question includes each question information, book information corresponding to each question information, and answer information corresponding to each question information.
[0083] The method for building the preset index library is:
[0084] An index document is constructed for each question, the book information corresponding to each question, and the answer information corresponding to each question. If there are m questions in all books involved in the basic education stage, m index documents are constructed, and the m index documents constitute a preset index library.
[0085] All books involved in the basic education stage in the embodiment of the present application include textbooks, exercise books, exercise books, test papers, etc.
[0086] The traditional question search method needs to search and identify in the traditional question bank, which includes questions from all books on the market. The number of question banks is very large, resulting in excessive calculation during the search, long search time and low recognition accuracy. The question search method provided in the embodiment of the present application can search and identify in a preset index library, which only includes questions included in all books involved in the basic education stage. Compared with the traditional subject recognition method, it can reduce the amount of calculation, save search time, and improve recognition accuracy.
[0087] The method for searching for multiple related question information related to each historical question information may be:
[0088] First, according to the preset relevance operator, the relevance between each historical question information and the document information in the preset index library is determined.
[0089] Specifically, the preset relevance operator in the embodiment of the present application may be a weighted algorithm (Term Frequency–Inverse Document Frequency, TF-IDF) for information retrieval and data mining, or may be an algorithm BM25 based on a probability model.
[0090] In an embodiment of the present application, a preset relevance operator is used to score the similarity between each historical question information and the document information in the preset index library, and the relevance between each historical question information and the document information in the preset index library can be determined based on the score.
[0091] Secondly, according to the relevance, multiple related question information related to each historical question information is determined.
[0092] Specifically, for example, 10 document information are stored in the preset index library, and according to the preset relevance operator, the scores of a historical topic information and the 10 document information are calculated to be 0, 0.1, 0.45, 0, 0.6, 0.7, 0.8, 0.6, 0, and 0 respectively. Then, the multiple related topic information related to the historical topic information is the topic information in all document information except the one with a score of 0. According to this method, the multiple related topic information related to each historical topic information can be determined.
[0093] S302: Determine book information corresponding to each piece of relevant question information according to the plurality of pieces of relevant question information.
[0094] Specifically, the preset index library contains document information corresponding to each question, and the document information corresponding to each question includes each question information, book information corresponding to each question information, and answer information corresponding to each question information.
[0095] In the embodiment of the present application, when the method in S301 is used to determine multiple pieces of relevant topic information, the book information corresponding to each piece of relevant topic information can be determined according to a preset index library.
[0096] S303: Determine the book information corresponding to the historical question information according to the book information corresponding to each relevant question information.
[0097] Specifically, in some embodiments, the book information corresponding to each relevant question information can be determined as the book information corresponding to the historical question information. For example, the book information corresponding to the relevant question information with scores of 0.1, 0.45, 0.6, 0.7, 0.8, and 0.6 can all be determined as the book information corresponding to the historical question information.
[0098] In the embodiment of the present application, the book information corresponding to each relevant question information can be sorted according to the relevance, and the book information corresponding to multiple relevant question information with high relevance can be determined as the book information corresponding to the historical question information. Exemplarily, the sorting is performed according to the score, for example: the score is in the order of 0.8, 0.7, 0.6, 0.6, 0.45, 0.1 from large to small, and the book information corresponding to the first 3 or 4 relevant question information can be determined as the book information corresponding to the historical question information.
[0099] In the embodiment of the present application, the book information corresponding to the multiple pieces of relevant question information with high relevance is determined as the multiple pieces of relevant question information in the book information corresponding to the historical question information, which can be specifically selected according to actual conditions.
[0100] S202: Determine the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical titles.
[0101] Specifically, in some embodiments, the method for determining the book information that has been searched within the preset first time period can be found in Figure 4 , Figure 4 It is a schematic flow chart of a specific method of S202 provided in an embodiment of the present application. Figure 4 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 4 As shown, the method includes: S401 to S402.
[0102] S401. Determine book information corresponding to the historical title information within a preset first time period according to the searched historical title information.
[0103] Specifically, the preset first time period refers to a period of time before the question searcher uses the terminal device to search for questions. Exemplarily, the preset first time period is 5 months to 7 months, for example, 6 months.
[0104] In an embodiment of the present application, when the searched historical title information is recorded by using the embedding technology, the searched historical title information can be stored in a preset first database, and the preset first database only includes book information corresponding to the historical title information within a preset first time period.
[0105] For example: the preset first database only contains book information corresponding to historical topic information within 6 months before the search. Therefore, when storing the searched historical topic information in the preset first database, it is necessary to continuously delete the data 6 months before the search so that the preset first database only stores the data within 6 months before the search.
[0106] S402: Count the first number of book information corresponding to the historical title information within a preset first time period. If the first number is not less than a first threshold, determine the book information whose first number is not less than the first threshold as the book information searched within the preset first time period.
[0107] For example, the book information stored in the first database is preset to be Chinese textbooks, Chinese exercise books, mathematics textbooks, English textbooks, and history textbooks. The number of times of these books is counted, for example: Chinese textbooks 4 times, Chinese exercise books 3 times, Chinese exercise books 5 times, mathematics textbooks 2 times, English textbooks 1 time, and history textbooks 1 time.
[0108] The first threshold in the embodiment of the present application can be specifically set according to the actual application. Exemplarily, the first threshold is 2 to 4 times, for example, 3 times.
[0109] The counted number of Chinese textbooks, Chinese exercise books, Chinese exercise books, mathematics textbooks, English textbooks, and history textbooks are compared with a first threshold of 3 times. If the number of Chinese textbooks, Chinese exercise books, and Chinese exercise books is not less than the first threshold, the Chinese textbooks, Chinese exercise books, and Chinese exercise books are determined to be book information that has been searched within a preset first time period.
[0110] S203: Determine the answer to the target question based on the target question image and the book information searched within a preset first time period.
[0111] Specifically, for a method of determining the answer to a target question based on the target question image and the book information that has been searched within the preset first time period, please refer to Figure 5 , Figure 5 It is a schematic flow chart of a specific method of S203 provided in an embodiment of the present application. Figure 5 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 5 As shown, the method includes: S501 to S503.
[0112] S501: Identify a target topic image and obtain target topic information.
[0113] Specifically, in the embodiment of the present application, the guest recognizes the target title image through optical character recognition (OCR) technology to obtain the target title information.
[0114] In some embodiments, identifying the target title image can be divided into two steps, one step is to detect the text information in the target title image, and the other step is to recognize the text information. When detecting the target title image, the text area of the title in the image is located, and then the text is marked out in the form of a text box. In some embodiments, the text box can be a rectangular box. In an embodiment of the present application, a detection model based on deep learning can be used to detect text, such as: Efficient and Accuracy Scene Text (EAST) model, etc. Recognizing the target title image is to recognize the text in the text box. In an embodiment of the present application, a recognition model based on deep learning can be used to recognize text, such as: Residual Neural Network Model ResNet, etc.
[0115] In other embodiments, when identifying the target title image, text detection and text recognition can also be implemented in a network structure, such as a Fast Oriented Text Spotting with a Unified Network (FOTS) model.
[0116] S502: Calculate the relevance between the target title information and the title information corresponding to the book information searched within a preset first time period.
[0117] The method for calculating the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period can be found in Figure 6 , Figure 6 It is a schematic flowchart of a specific method of S502 provided in an embodiment of the present application. Figure 6 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 6 As shown, the method includes: S601 to S604.
[0118] S601. Determine book information that has been searched within a preset second time period based on historical title information.
[0119] The second time period is a time period within the first time period. Exemplarily, the first time period is preset to be 5 to 7 months, such as 6 months, and the second preset time period is 1 to 3 weeks, such as 2 weeks.
[0120] In an embodiment of the present application, when the searched historical title information is recorded by using the embedding technology, the searched historical title information can be stored in a preset second database, and the preset second database only includes book information corresponding to the historical title information within a preset second time period.
[0121] For example: the preset second database only contains book information corresponding to historical question information within 2 weeks before the search. Therefore, when storing the searched historical question information in the preset second database, it is necessary to continuously delete the data 2 weeks before the search so that the preset second database only stores the data within 2 weeks before the search.
[0122] S602: Determine whether the book information searched within the preset second time period includes the book information searched within the preset first time period.
[0123] Exemplarily, the book information that has been searched within the preset second time period determined according to S601 includes Chinese textbooks, Chinese exercise books, English textbooks, and history textbooks, and the book information that has been searched within the preset first time period determined according to S402 includes Chinese textbooks, Chinese exercise books, and Chinese exercise books, then it is determined whether the book information determined according to S402 exists in the book information determined according to S601.
[0124] S603: If yes, increase the weight of the book information searched within the preset second time period.
[0125] Exemplarily, the book information that has been searched in the preset second time period includes the book information (Chinese textbooks and Chinese exercise books) that has been searched in the preset first time period.
[0126] The embodiment of the present application uses a preset relevance operator to calculate the relevance between target title information and title information corresponding to book information that has been searched within a preset first time period. When using the preset relevance operator for calculation, it is necessary to assign a weight to the book information that has been searched within the preset first time period.
[0127] In the embodiment of the present application, the preset relevance operator is to adjust the weight by setting the weight parameter boost. The purpose of increasing the weight of the book information searched within the preset second time period, that is, increasing the weight of the Chinese textbook and the Chinese exercise book, is to make the score value of the target title information and the Chinese textbook and the Chinese exercise book greater than the score value of the document information corresponding to other book information.
[0128] In other embodiments, the method of increasing the weight of the book information searched within the preset second time period includes: Figure 7 The method in Figure 7 It is a schematic flowchart of a specific method of S603 provided in an embodiment of the present application. Figure 7 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 7 As shown, the method includes: S701 to S702.
[0129] S701: Count the second number of times that book information has been searched within a preset second time period.
[0130] Specifically, the second number is smaller than the first number.
[0131] Exemplarily, the book information searched within the preset second time period determined according to S601 includes Chinese textbooks, Chinese exercise books, English textbooks, and history textbooks, and the number of times these book information are counted are: Chinese textbooks 2 times, Chinese exercise books 3 times, English textbooks 1 time, and history textbooks 1 time.
[0132] S702: If the second number is not less than the second threshold and not greater than the first threshold, increase the weight of the book information searched within the preset second time period corresponding to the second number being not less than the second threshold and not greater than the first threshold.
[0133] Specifically, the second threshold is 1 to 3 times, for example, 2 times.
[0134] An exemplary first threshold is 3 times, a second threshold is 2 times, and if the number of Chinese textbooks and Chinese exercise books is not less than 2 times and not more than 3 times, the weight of the book information corresponding to the Chinese textbooks and Chinese exercise books is increased.
[0135] S604: Calculate the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period according to the weight.
[0136] Exemplarily, the book information that has been searched within the preset first time period determined in S402 includes Chinese textbooks, Chinese exercise books, and Chinese exercise books.
[0137] Before the weight is increased, when calculating the score of the document information corresponding to the target topic information and the Chinese textbook, the weight is set to 1; when calculating the score of the document information corresponding to the target topic information and the Chinese exercise book, the weight is set to 1; when calculating the score of the document information corresponding to the target topic information and the Chinese exercise book, the weight is set to 1.
[0138] Since the number of Chinese textbooks and Chinese exercise books is not less than the second threshold and not greater than the first threshold, when the weight is increased, the weight is set to 3.5 when calculating the score of the document information corresponding to the target title information and the Chinese textbook, the weight is set to 1 when calculating the score of the document information corresponding to the target title information and the Chinese exercise book, and the weight is set to 3.5 when calculating the score of the document information corresponding to the target title information and the Chinese exercise book.
[0139] S503: Determine the answer to the target question according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period.
[0140] Specifically, according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period, the method for determining the answer to the target question can be found in Figure 8 , Figure 8 It is a schematic flowchart of a specific method of S503 provided in an embodiment of the present application. Figure 8 The execution subject of the method in can be Figure 1 The terminal device 100 in FIG. Figure 8 As shown, the method includes: S801 to S802.
[0141] S801: Sort the relevance between target title information and title information corresponding to book information that has been searched within a preset first time period.
[0142] For example, the Chinese textbook corresponds to 3 pieces of document information A1, B1 and C1, the Chinese exercise book corresponds to 4 pieces of document information A2, B2, C2 and D2, and the Chinese exercise book corresponds to 2 pieces of document information A3 and B3. When calculating the scores of the target topic information and the 3 pieces of document information corresponding to the Chinese textbook, the weight is set to 3.5, the score of A1 is 0.92, the score of B1 is 0.87, and the score of C1 is 0.97.
[0143] When calculating the scores of the four pieces of document information corresponding to the target topic information and the Chinese exercise book, the weight is set to 1, A2 scores 0.32, B2 scores 0.37, C2 scores 0.47, and D2 scores 0.31.
[0144] When calculating the scores of the two pieces of document information corresponding to the target topic information and the Chinese language exercise book, the weight is set to 3.5, the score of A3 is 0.93, and the score of B3 is 0.83.
[0145] The relevance between the target title information and the title information corresponding to the book information searched within the preset first time period is sorted, that is, the scores of the above 9 document information are sorted.
[0146] S802: Determine the answer information corresponding to the book information with the greatest relevance that has been searched within the preset first time period as the answer information of the target question.
[0147] Exemplarily, the answer information corresponding to the book information with the highest score among the scores of the 9 document information is determined as the answer information of the target question.
[0148] In summary, the embodiment of the present application obtains the target title image to be searched and the book information corresponding to the searched historical title; determines the book information that has been searched within the preset first time period according to the book information corresponding to the searched historical title; and determines the answer to the target title according to the target title image and the book information that has been searched within the preset first time period. That is, when searching for the target title, the present application can determine the book information that has been searched within the preset first time period through the book information corresponding to the searched historical title, and determine the answer to the target title according to the book information. Compared with using the OCR text information of the target title to directly search in a question bank with a large number of questions and a large number of similar questions, the accuracy of question search is improved.
[0149] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0150] Please refer to Fig. 9 , Fig. 9 The invention is a question-searching device, comprising:
[0151] The acquisition module 91 is used to acquire the target title image to be searched and the book information corresponding to the searched historical titles.
[0152] The first determining module 92 is used to determine the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical topics.
[0153] The third determination module 93 is used to determine the answer to the target question according to the target question image and the book information searched within a preset first time period.
[0154] The acquisition module 91 is further used to search for multiple related question information related to each historical question information in a preset index library;
[0155] According to the information of multiple related questions, determine the book information corresponding to each related question information;
[0156] According to the book information corresponding to each relevant question information, the book information corresponding to the searched historical questions is determined.
[0157] The first determination module 92 is further used to determine the book information corresponding to the historical title information within a preset first time period according to the book information corresponding to the searched historical title;
[0158] The first number of book information corresponding to the historical title information within a preset first time period is counted. If the first number is not less than a first threshold, the book information whose first number is not less than the first threshold is determined as the book information searched within the preset first time period.
[0159] The second determination module 93 is also used to identify the target topic image and obtain the target topic information;
[0160] Calculating the relevance between the target title information and the title information corresponding to the book information searched within a preset first time period;
[0161] The answer to the target question is determined according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period.
[0162] The second determination module 93 is further used to determine the book information that has been searched within a preset second time period according to the book information corresponding to the searched history title, and the second time period is a time period within the first time period;
[0163] Determining whether the book information searched in the preset second time period includes the book information searched in the preset first time period;
[0164] If so, the weight of the book information searched within the preset second time period is increased;
[0165] The relevance between the target title information and the title information corresponding to the book information searched within the preset first time period is calculated according to the weight.
[0166] The second determining module 93 is further used to count the second number of times the book information has been searched within a preset second time period;
[0167] If the second number is not less than the second threshold and not greater than the first threshold, the weight of the book information that has been searched the second number of times within the preset second time period is increased.
[0168] The second determining module 93 is further used to sort the relevance between the target title information and the title information corresponding to the book information that has been searched within the preset first time period;
[0169] The answer information corresponding to the book information with the greatest relevance that has been searched within the preset first time period is determined as the answer information of the target question.
[0170] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0171] like Fig.10 As shown, an embodiment of the present application also provides a terminal device 100, including a memory 21, a processor 22, and a computer program 23 stored in the memory 21 and executable on the processor 22, and when the processor 22 executes the computer program 23, the question searching methods of the above-mentioned embodiments are implemented.
[0172] The processor 22 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0173] The memory 21 may be an internal storage unit of the terminal device 100. The memory 21 may also be an external storage device of the terminal device 100, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 100. Further, the memory 21 may also include both an internal storage unit of the terminal device 100 and an external storage device. The memory 21 is used to store computer programs and other programs and data required by the terminal device 100. The memory 21 may also be used to temporarily store data that has been output or is to be output.
[0174] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the question searching methods of the above embodiments are implemented.
[0175] An embodiment of the present application provides a computer program product. When the computer program product runs on a mobile terminal, the mobile terminal implements the question searching methods of the above-mentioned embodiments when executing the computer program product.
[0176] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above-mentioned various method embodiments can be implemented. Among them, the computer program includes computer program generation data, which can be in the form of source generation data, object generation data, executable files or some intermediate forms. The computer-readable storage medium may at least include: any entity or device that can carry the computer program generation data to the camera / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal, and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, a computer-readable storage medium cannot be an electric carrier signal and a telecommunication signal.
[0177] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0178] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0179] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
[0180] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A question searching method, characterized in that: include: Obtaining the target topic image to be searched and the book information corresponding to the searched historical topics; Determining the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical titles; Identify the target topic image and obtain target topic information; Determining the book information that has been searched within a preset second time period according to the book information corresponding to the searched historical topic, where the second time period is a time period within the first time period; Determining whether the book information searched within the preset second time period includes the book information searched within the preset first time period; If so, counting the second number of times the book information has been searched within the preset second time period; If the second number of times is not less than the second threshold and not greater than the first threshold, increasing the weight of the book information searched the second number of times within the preset second time period; Calculating the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period according to the weight; The answer to the target question is determined according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period.
2. The method according to claim 1, characterized in that The method for determining the book information corresponding to the searched historical topic includes: In the preset index library, multiple related question information related to each historical question information is searched; Determine the book information corresponding to each piece of relevant question information according to the plurality of pieces of relevant question information; According to the book information corresponding to each of the related question information, the book information corresponding to the searched historical questions is determined.
3. The method according to claim 1, characterized in that The step of determining the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical titles includes: Determining the book information corresponding to the historical title information within the preset first time period according to the book information corresponding to the searched historical title; The first number of book information corresponding to the historical title information within the preset first time period is counted, and if the first number is not less than a first threshold, the book information whose first number is not less than the first threshold is determined as the book information searched within the preset first time period.
4. The method according to claim 1, characterized in that: The step of determining the answer to the target question according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period includes: Sorting the relevance between the target title information and the title information corresponding to the book information searched within the preset first time period; The answer information corresponding to the book information searched within the preset first time period with the greatest relevance is determined as the answer information of the target question.
5. A question-searching device, characterized in that: include: An acquisition module, used to acquire the target topic image to be searched and the book information corresponding to the searched historical topic; A first determining module, configured to determine the book information that has been searched within a preset first time period according to the book information corresponding to the searched historical topic; A second determination module is used to identify the target title image and obtain target title information; determine the book information that has been searched within a preset second time period according to the book information corresponding to the searched historical title, the second time period being a time period within the first time period; determine whether the book information that has been searched within the preset second time period exists in the book information that has been searched within the preset first time period; if so, count the second number of times the book information has been searched within the preset second time period; if the second number of times is not less than a second threshold and not greater than the first threshold, increase the weight of the book information that has been searched the second number of times within the preset second time period; and calculate the relevance of the target title information to the title information corresponding to the book information that has been searched within the preset first time period according to the weight; The answer to the target question is determined according to the relevance between the target question information and the question information corresponding to the book information searched within the preset first time period.
6. A terminal device, characterized in that: The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the question searching method as claimed in any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the question searching method as described in any one of claims 1 to 4 is implemented.
