WO2020155747A1 - Method and apparatus for recommending answer to question, and storage medium and server - Google Patents
Method and apparatus for recommending answer to question, and storage medium and server Download PDFInfo
- Publication number
- WO2020155747A1 WO2020155747A1 PCT/CN2019/117166 CN2019117166W WO2020155747A1 WO 2020155747 A1 WO2020155747 A1 WO 2020155747A1 CN 2019117166 W CN2019117166 W CN 2019117166W WO 2020155747 A1 WO2020155747 A1 WO 2020155747A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- information
- question
- post
- keyword
- matching
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000012545 processing Methods 0.000 claims abstract description 20
- 238000006243 chemical reaction Methods 0.000 claims abstract description 18
- 239000013598 vector Substances 0.000 claims description 66
- 230000015654 memory Effects 0.000 claims description 29
- 239000011159 matrix material Substances 0.000 claims description 28
- 238000004590 computer program Methods 0.000 claims description 23
- 230000004044 response Effects 0.000 claims description 7
- 230000002194 synthesizing effect Effects 0.000 claims description 2
- 238000012216 screening Methods 0.000 claims 1
- 230000006870 function Effects 0.000 description 5
- 238000004364 calculation method Methods 0.000 description 3
- 239000002699 waste material Substances 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000009193 crawling Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/332—Query formulation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/953—Querying, e.g. by the use of web search engines
- G06F16/9535—Search customisation based on user profiles and personalisation
Definitions
- This application relates to the field of data processing, and specifically to a method, device, storage medium and server for recommending answers to questions.
- this application provides a method for recommending answers to questions, including:
- the answer to the question is obtained from several existing posts according to the context information, and the answer is pushed to the post published by the user.
- this application provides a question answer recommendation device, including:
- Word conversion module used to obtain the question information of the post currently published by the user, convert the question information into words, and extract the keyword information in the question information;
- Matching module used to perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information;
- Positioning module used to combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;
- Push module used to obtain answers to questions from several existing posts according to the context information, and push the answers to the posts published by the user.
- the positioning module further includes execution;
- the present application also provides a computer non-volatile readable storage medium with a computer program stored on the computer readable storage medium, and when the computer program is executed by a processor, the above method for recommending answers to questions is implemented.
- the present application also provides a server, the server includes one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory and Is configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned question answer recommendation method.
- This application provides an answer recommendation method based on the combination of the three elements of post, question and answer. It is suitable for application scenarios where forum posts seek answers.
- a user posts a post on the forum he obtains the question information of the user’s current post.
- the question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information.
- Each published post has corresponding keyword information stored in the database , Perform similarity matching in the database according to the keyword information to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched ones In some posts, the contextual information related to the question is located.
- the context information it is possible to clearly understand whether the content of the existing post is related to the question of the user’s current post. It can be obtained from several existing posts. After the context information, the answers to questions related to the user's current post in different posts can be obtained, and then the answer is pushed to the post published by the user, and the user can intuitively understand from the pushed answer Go to the relevant content of the existing post and check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need, improve the accuracy of question matching, and avoid forums The same problem or similar problems occurred multiple times in the forum, resulting in too many repeated posts in the forum, thus saving the limited resources of the server.
- FIG. 1 is a schematic flowchart of an embodiment of a method for recommending answers to questions in this application
- FIG. 2 is a schematic flowchart of another embodiment of a method for recommending answers to questions in this application;
- FIG. 3 is a schematic diagram of an embodiment of a device for recommending answers to questions in this application
- Figure 4 is a schematic structural diagram of an embodiment of the application server.
- the embodiment of the application provides a method for recommending answers to questions. As shown in FIG. 1, the method includes the following steps:
- the forum users can break news, express opinions or seek help by posting posts.
- users post on the forum especially posts seeking answers to questions, in order to avoid the same problem or similar problems appearing multiple times in the forum, causing There are too many repeated posts in the forum.
- the content information of the post currently published by the user is obtained.
- This embodiment defines the content information of the post as question information.
- the question information of the post posted by the user is converted into words.
- the content information of the post is crawled, and then the content information is saved as a txt file, and then word segmentation is performed on the txt file.
- the keyword information in the content information of the post is extracted, and the keyword information is converted into a corresponding word vector, and each keyword is converted into a word vector to facilitate subsequent calculation and processing of the keywords.
- the content of the post is "How is it most convenient to go from Guangzhou to Hong Kong Airport?"
- the content information of the post is transliterated
- the extracted keyword information includes Guangzhou, Go, Hong Kong, Airport, and Convenience.
- S20 Perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information.
- each posted post will be processed to convert the content information of the post into word vectors and extract the keyword information in the content information, and then save the keyword information of each post in the database.
- similarity matching is performed in the database according to the keyword information, and the matching is performed by calculating the word vector corresponding to the keyword information.
- the word vector of the keyword information "Beijing" is [5.0, 3.0, 9.0]
- the word vector of the keyword information "China Capital” is [5.1, 2.9, 9.0]
- the similarity matching includes Chinese and English matching, pinyin matching, synonymous matching, and similar word matching, and then several existing posts matching the keyword information are obtained from the database, and the keyword information is used for matching , Determine the keyword information that matches the current post, and then locate the published post based on the matched keyword information, such as matching Guangzhou with Yangcheng, Huacheng, GZ, 020, and matching Hong Kong with HK, HKG, etc. , Get the posts with the keyword information in the published posts.
- S30 Combine the keyword information into a question mentioned in a post, and locate context information related to the question from the existing post.
- the keyword information is combined into the question mentioned in the user’s current post, so as to more determine the content of the question, and then from the existing
- the contextual information related to the question is located in the post. Since the replies in a post are not necessarily all related to the post, it is necessary to filter the replies to the existing posts, and determine the ones related to the question from the existing posts Contextual information, for example, in an existing post, the reply with the highest number of likes or recommendations is taken as one of the answers related to the question, and the context of the reply is obtained at the same time, that is, to locate and According to the context information related to the question, it can be clearly understood whether the content of the existing post is related to the question of the post currently published by the user according to the context information.
- S40 Obtain answers to questions from several existing posts according to the context information, and push the answers to the post published by the user.
- several answers to the question can be obtained from several existing posts based on contextual information, and then Several answers are integrated, and the integrated answers are pushed to the user’s current post; in another implementation, several answers to the question can be obtained from several existing posts based on contextual information, and then the Several answers are pushed to the user's current post one by one, and the related answers can be located in the published post, and the user can intuitively understand the relevant content of the existing post from the pushed answer , Check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need.
- This embodiment provides an answer recommendation method based on the combination of the three elements of post, question, and answer, which is suitable for application scenarios where forum posts are posted to seek answers.
- the user obtains the question information of the post currently posted by the user , And perform word conversion processing on the question information, determine the keywords in the question information, extract the keyword information to form a description of the question information, and each published post has corresponding keyword information stored in the database , Perform similarity matching in the database according to the keyword information to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched ones In some posts, the contextual information related to the question is located.
- the context information it is possible to clearly understand whether the content of the existing post is related to the question of the user’s current post. It can be obtained from several existing posts. After the context information, the answers to questions related to the user's current post in different posts can be obtained, and then the answer is pushed to the post published by the user, and the user can intuitively understand from the pushed answer Go to the relevant content of the existing post, check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need, and at the same time, avoid the same or similar questions in the forum Many times, the forum has too many repeated posts, thus saving the limited resources of the server.
- the performing similarity matching in a database according to the keyword information to obtain several existing posts that match the keyword information includes:
- Obtain a matching time period perform similarity matching in a database according to the keyword information, and obtain several existing posts matching the keyword information based on the matching time period.
- the matching time period is obtained, and the publishing time of the matched post is limited.
- similarity matching is performed in the database according to the keyword information, several existing posts are determined, and the posts are based on time Sort, and then obtain a number of existing posts that match the keyword information based on the matching time period.
- the posts whose posting time is closer to the current time are regarded as posts with higher similarity To retrieve posts in the most recent time period first.
- the method further includes:
- the user after matching an existing post and pushing the answer to the user according to the matched post, the user’s feedback information is received. If the user’s feedback is inaccurate, the matching time period is modified to make the match earlier Posts posted and related answers. Further, after receiving the user's feedback information and modifying the matching time period, hide the post corresponding to the answer that the user has browsed or feedback in the matching result to avoid having multiple identical answers in the two push answers , Resulting in a waste of resources.
- the performing similarity matching in a database according to the keyword information to obtain several existing posts that match the keyword information includes:
- the similarity matching is performed in a database according to the keyword information, a number of existing posts matching the keyword information are obtained, and the posts with the number of replies meeting the requirements are selected from the existing posts.
- a number of existing posts that match the keyword information are obtained, and posts with a certain number of replies are selected from the matched posts.
- posts with a certain number of replies are selected from the matched posts.
- a post with more replies has a higher similarity.
- the post does not have the answer required for the question, and these posts need to be eliminated to avoid redundancy in information search.
- the method further includes:
- the user’s feedback information is received. If the user’s feedback is inaccurate, the number of replies is modified to match Posts with low number of responses and related answers. For example, in the first matching, several existing posts with a number of replies exceeding n (for example, n is 30) are filtered out. If the user feedback is not accurate, the number of replies selected in the second selection exceeds m (For example, m is 10) posts. Even better, after receiving the user's feedback information and modifying the number of responses, hide the posts corresponding to the answers that the user has viewed or feedback in the matching results to avoid having multiple identical answers in the two pushes The answer is a waste of resources.
- n for example, n is 30
- the feedback information is regarded as positive feedback information.
- the user When adding the answer and the context information, the context information and the above question, the association degree between the question and the above keyword information, if there are similar posts asking similar questions in the future, the user will be given priority to push the association degree more The answer determined by Gao's existing post.
- An embodiment of the present application as shown in FIG. 2, said combining the keyword information into a question mentioned in a post, and locating context information related to the question from the existing post includes:
- S31 Combine the keyword information into a question mentioned in a post, synthesize an answer expression according to the existing post and the question; locate context information related to the question from the existing post; The context information is calculated through the answer expression, the utility of the context information is determined, and the context information whose utility meets a preset requirement is obtained.
- the key words are combined into the questions that need to be answered in the post posted by the user, and then the answer expression is synthesized according to the existing post and the question.
- the answer expression determines which word vectors should be included in the answer. The calculation rule of the vector and the expected value of the result to be obtained; at the same time, the context information related to the question is located in the existing post, and the context information contains a word vector similar to the answer expression; use
- the answer expression calculates the located context information, determines the utility of the context information, that is, obtains the expected value of the context information input into the answer expression, and then obtains the context information whose expected value meets the preset requirements, and the context information can be Provide more accurate answers related to the question, so as to push the required answers to users more accurately.
- the said question information is converted to word processing to extract the keyword information in the question information, including:
- the performing similarity matching in a database according to the keyword information includes:
- the extracted keyword information is text string data.
- the keyword information is converted into a keyword vector, and each keyword is converted into a keyword vector.
- the specific content of the question information of the post can be obtained by combining multiple keywords. It is convenient to calculate.
- the keyword vectors are formed into a vector matrix, and each sentence can be assembled into a vector matrix by word vectors, and the combined vector matrix can be identified as the problem information of the post.
- the first row of the vector matrix is the first word vector, and the second row is the second. Then the similarity of several post questions can be calculated by matrix addition and subtraction.
- the word information is matched in the database for similarity, then the similarity matching is performed in the database according to the vector matrix, and the result that the difference between the two vector matrices is less than the preset value is matched, so as to obtain the match with the keyword information Several existing posts.
- the acquiring question information of a post currently published by a user, translating the question information, and extracting keyword information in the question information includes:
- the combining the keyword information into the question mentioned in the post, and synthesizing the answer expression according to the existing post and the question includes:
- a vector matrix of questions mentioned in the post is formed according to the keyword vector, and an answer expression is synthesized according to the existing post and the vector matrix.
- the question information of the post currently posted by the user is crawled, the question information is transformed into words, the complete question information is divided into word combinations one by one, and then the keywords in the question information are extracted Information, and convert the keyword information into a keyword vector.
- the existing posts When combining the keyword information into the question mentioned in the post, combine the keyword vector to form a vector matrix of the question mentioned in the post , And then calculate the vector matrix of the problems mentioned in the current post based on the existing posts, the existing posts also contain the keyword vectors obtained by the conversion of keyword information, and the vector matrix of the questions obtained from the existing posts Synthesize the corresponding answer expression with the vector matrix of the questions mentioned in the existing posts, and then filter the keyword vectors in the existing posts according to the answer expression to obtain the existing posts that meet the requirements Contextual information, which is the answer required for the question mentioned in the current post.
- the present application provides a question answer recommendation device, including:
- Word conversion module 10 used to obtain the question information of the post currently published by the user, perform word conversion processing on the question information, and extract keyword information in the question information;
- Matching module 20 used to perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information;
- Positioning module 30 used to combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;
- Push module 40 used to obtain answers to questions from several existing posts according to the context information, and push the answers to the posts published by the user.
- the matching module 20 further includes execution;
- Obtain a matching time period perform similarity matching in a database according to the keyword information, and obtain several existing posts matching the keyword information based on the matching time period.
- the matching module 20 further includes execution;
- Perform similarity matching in a database according to the keyword information obtain a number of existing posts that match the keyword information, and select posts whose number of replies meet the requirements from the existing posts.
- the positioning module 30 further includes execution;
- the word transfer module 10 further includes executing:
- the matching module 20 further includes executing:
- the present application provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for recommending answers to questions described in the above embodiments is implemented .
- the computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random AccesSS) Memory, Random Memory), EPROM (EraSable Programmable Read-Only Memory), EEPROM (Electrically EraSable Programmable Read-Only Memory), flash memory, magnetic card or Light card.
- a storage device includes any medium that stores or transmits information in a readable form by a device (for example, a computer or a mobile phone), and may be a read-only memory, a magnetic disk, or an optical disk.
- the computer-readable storage medium provided by the embodiment of the application can obtain the problem information of the post currently posted by the user, convert the problem information to word processing, and extract the keyword information in the problem information; according to the keywords
- the information is similarly matched in the database, and several existing posts matching the keyword information are obtained; the keyword information is combined into the questions mentioned in the post, and the information is located in the existing posts.
- Question-related contextual information obtain answers to questions from several existing posts according to the contextual information, and push the answers to the posts published by the user.
- a user posts a post on the forum When a user posts a post on the forum, he obtains the question information of the user’s current post and adds
- the question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information.
- Each posted post has corresponding keyword information stored in the database, according to The keyword information is similarly matched in the database to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched existing posts
- the contextual information related to the question is located in the post, and based on the contextual information, it is possible to clearly understand whether the content of the existing post is related to the question of the post currently published by the user, and obtain the aforementioned information from several existing posts.
- the computer-readable storage medium provided in the embodiment of the present application can implement the embodiment of the method for recommending answers to the above questions.
- the present application also provides a server.
- the server includes a processor 403, a memory 405, an input unit 407, a display unit 409 and other devices.
- the memory 405 can be used to store a computer program 401 and various functional modules, and the processor 403 runs the computer program 401 stored in the memory 405 to execute various functional applications and data processing of the device.
- the memory 405 may be internal memory or external memory, or include both internal memory and external memory.
- the internal memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory.
- ROM read only memory
- PROM programmable ROM
- EPROM electrically programmable ROM
- EEPROM electrically erasable programmable ROM
- flash memory or random access memory.
- External storage can include hard disks, floppy disks, ZIP disks, U disks, tapes, etc.
- the memory disclosed in this application includes but is not limited to these types of memory.
- the memory 405 disclosed in this application is only an example and not a limitation.
- the input unit 407 is used to receive signal input and user input.
- the input unit 407 can include a touch panel and other input devices.
- the touch panel can collect user touch operations on or near it (for example, the user uses fingers, stylus The operation of any suitable objects or accessories on the touch panel or near the touch panel), and drive the corresponding connection device according to the preset program; other input devices may include but are not limited to physical keyboards, function keys (such as One or more of playback control buttons, switch buttons, etc.), trackball, mouse, joystick, etc.
- the display unit 409 can be used to display information input by the user or information provided to the user and various menus of the computer device.
- the display unit 409 may take the form of a liquid crystal display, an organic light emitting diode, or the like.
- the processor 403 is the control center of the computer equipment. It uses various interfaces and lines to connect the various parts of the entire computer. By running or executing the software programs and/or modules stored in the memory 403, and calling the data stored in the memory, execute Various functions and processing data.
- the server includes one or more processors 403, one or more memories 405, and one or more computer programs 401, wherein the one or more computer programs 401 are stored in the memory 405 It is configured to be executed by the one or more processors 403, and the one or more computer programs 401 are configured to execute the question answer recommendation method described in the above embodiment.
- the one or more processors 403 shown in FIG. 4 can execute and realize the functions of the word transfer module 10, the matching module 20, the positioning module 30, and the pushing module 40 shown in FIG.
- the server provided by the embodiment of the application can obtain the question information of the post currently published by the user, convert the question information to word conversion, and extract the keyword information in the question information; according to the keyword information in the database Perform similarity matching to obtain several existing posts that match the keyword information; combine the keyword information into the questions mentioned in the posts, and locate the context related to the questions from the existing posts Information; obtain answers to questions from a number of existing posts according to the context information, and push the answers to the posts published by the user.
- an answer recommendation method based on the combination of the three elements of post, question and answer, it is suitable for the application scenario of forum posts seeking answers.
- a user posts a post on the forum When a user posts a post on the forum, he obtains the question information of the user’s current post, and The question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information.
- Each posted post has corresponding keyword information stored in the database, according to The keyword information is similarly matched in the database to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched existing posts The contextual information related to the question is located in the post. According to the contextual information, it is possible to clearly understand whether the content of the existing post is related to the question of the current post posted by the user.
- the server provided in the embodiment of the present application can implement the above-provided embodiment of the question answer recommendation method.
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
A method and apparatus for recommending an answer to a question, and a storage medium and a server. The method comprises: acquiring question information of a post currently published by a user, carrying out word conversion processing on the question information, and extracting keyword information from the question information (S10); according to the keyword information, carrying out similarity matching in a database to acquire several existing posts matching the keyword information (S20); combining the keyword information into a question mentioned in the post, and locating context information, related to a question, from the existing posts (S30); and acquiring, according to the context information, answers to the question from the several existing posts, and pushing the answers to the post published by the user (S40). The accuracy of question matching can be improved, and the answers to a question related to a post can be quickly matched.
Description
本申请要求于2019年01月28日提交中国专利局、申请号为201910078024.1、申请名称为“问题答案推荐方法、装置、存储介质及服务器”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on January 28, 2019, the application number is 201910078024.1, and the application name is "Question Answer Recommendation Method, Device, Storage Medium, and Server", the entire content of which is incorporated by reference In this application.
本申请涉及数据处理领域,具体涉及一种问题答案推荐方法、装置、存储介质及服务器。This application relates to the field of data processing, and specifically to a method, device, storage medium and server for recommending answers to questions.
随着互联网技术的发展,社区平台越来越受到人们的欢迎,用户可以通过社区平台爆料新闻、发表观点或寻求帮助,例如,现阶段很多论坛,用户在论坛上会发布帖子寻求帮助,而实际上论坛上很多已拥有的帖子的相关内容便可以回答该帖子的问题,论坛无法有效、精准地向当前发布帖子的用户推荐相关的答案,造成论坛上存在大量重复的帖子,造成资源的浪费。With the development of Internet technology, community platforms are becoming more and more popular. Users can break news, express opinions or seek help through the community platforms. For example, in many forums at this stage, users will post posts on the forums for help. You can answer the questions of the post with the relevant content of many posts you have on the forum. The forum cannot effectively and accurately recommend relevant answers to the users who are currently posting the posts. This results in a large number of duplicate posts on the forum and waste of resources.
发明内容Summary of the invention
为克服以上技术问题,特别是现有技术无法高效匹配用户帖子相关问题的答案,特提出以下技术方案:In order to overcome the above technical problems, especially the existing technology cannot efficiently match the answers to user posts related questions, the following technical solutions are proposed:
第一方面,本申请提供了一种问题答案推荐方法,包括:In the first aspect, this application provides a method for recommending answers to questions, including:
获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Obtain the question information of the post currently published by the user, convert the question information to word processing, and extract keyword information in the question information;
根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Perform similarity matching in the database according to the keyword information, and obtain several existing posts matching the keyword information;
将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;
根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。The answer to the question is obtained from several existing posts according to the context information, and the answer is pushed to the post published by the user.
第二方面,本申请提供一种问题答案推荐装置,包括:In the second aspect, this application provides a question answer recommendation device, including:
转词模块:用于获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Word conversion module: used to obtain the question information of the post currently published by the user, convert the question information into words, and extract the keyword information in the question information;
匹配模块:用于根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Matching module: used to perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information;
定位模块:用于将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Positioning module: used to combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;
推送模块:用于根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。Push module: used to obtain answers to questions from several existing posts according to the context information, and push the answers to the posts published by the user.
进一步的,所述所述定位模块还包括执行;Further, the positioning module further includes execution;
将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息与所述答案表达式相比较,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。Combine the keyword information into the question mentioned in the post, and synthesize the answer expression according to the existing post and the question; locate the context information related to the question from the existing post; The context information is compared with the answer expression, the utility of the context information is determined, and the context information that the utility meets a preset requirement is obtained.
第三方面,本申请还提供了一种计算机非易失性可读存储介质,所述计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述的问题答案推荐方法。In a third aspect, the present application also provides a computer non-volatile readable storage medium with a computer program stored on the computer readable storage medium, and when the computer program is executed by a processor, the above method for recommending answers to questions is implemented.
第四方面,本申请还提供了一种服务器,所述服务器包括一个或多个处理器、存储器、一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个程序配置用于执行上述的问题答案推荐方法。In a fourth aspect, the present application also provides a server, the server includes one or more processors, a memory, and one or more computer programs, wherein the one or more computer programs are stored in the memory and Is configured to be executed by the one or more processors, and the one or more programs are configured to execute the above-mentioned question answer recommendation method.
本申请与现有技术相比,具有以下有益效果:Compared with the prior art, this application has the following beneficial effects:
本申请提供了一种基于帖子、问题、答案三种元素组合的答案推荐方法,适用于论坛发布帖子寻求解答的应用场景,用户在论坛上发布帖子时,获取用户当前发布的帖子的问题信息,并将所述问题信息进行转词处理,,确定问题信息中的关键词,提取关键词信息从而形式对所述问题信息的描述,每一个发布的帖子均有对应的关键词信息存储在数据库中,根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,由于所述关键词信息能够组合成帖子提及的问题,从匹配到的已有的帖子中定位与所述问题相关的上下文信息,根据所述上下文信息便可清晰地了解已有帖子的内 容是否与用户当前发布的帖子的问题相关,在从若干个已有的帖子中获取所述上下文信息后,便能得到不同帖子中与用户当前发布的帖子的问题的相关答案,然后将所述答案推送至所述用户发布的帖子中,用户从推送的答案中便能直观地了解到已有的帖子发布的相关内容,查看已有的帖子的内容信息是否与自己的所需解答的问题相关,从而快速地查找到所需的答案,提高问题匹配的精确度,同时,避免论坛中相同问题或类似问题出现多次,造成论坛重复的帖子过多,从而节省了服务器有限的资源。This application provides an answer recommendation method based on the combination of the three elements of post, question and answer. It is suitable for application scenarios where forum posts seek answers. When a user posts a post on the forum, he obtains the question information of the user’s current post. The question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information. Each published post has corresponding keyword information stored in the database , Perform similarity matching in the database according to the keyword information to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched ones In some posts, the contextual information related to the question is located. According to the context information, it is possible to clearly understand whether the content of the existing post is related to the question of the user’s current post. It can be obtained from several existing posts. After the context information, the answers to questions related to the user's current post in different posts can be obtained, and then the answer is pushed to the post published by the user, and the user can intuitively understand from the pushed answer Go to the relevant content of the existing post and check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need, improve the accuracy of question matching, and avoid forums The same problem or similar problems occurred multiple times in the forum, resulting in too many repeated posts in the forum, thus saving the limited resources of the server.
本申请附加的方面和优点将在下面的描述中部分给出,这些将从下面的描述中变得明显,或通过本申请的实践了解到。The additional aspects and advantages of the present application will be partly given in the following description, which will become obvious from the following description, or be understood through the practice of the present application.
本申请上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of this application will become obvious and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, in which:
图1为本申请问题答案推荐方法的一实施例流程示意图;FIG. 1 is a schematic flowchart of an embodiment of a method for recommending answers to questions in this application;
图2为本申请问题答案推荐方法的另一实施例流程示意图;2 is a schematic flowchart of another embodiment of a method for recommending answers to questions in this application;
图3为本申请问题答案推荐装置的一实施例示意图;FIG. 3 is a schematic diagram of an embodiment of a device for recommending answers to questions in this application;
图4为本申请服务器的一实施例结构示意图。Figure 4 is a schematic structural diagram of an embodiment of the application server.
下面详细描述本申请的实施例,所述实施例的示例在附图中示出。The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings.
本技术领域技术人员可以理解,除非特意声明,这里使用的单数形式“一”、“一个”、“所述”和“该”也可包括复数形式。应该进一步理解的是,本申请的说明书中使用的措辞“包括”是指存在所述特征、整数、步骤、操作,但是并不排除存在或添加一个或多个其他特征、整数、步骤、操作的情况。Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an", "said" and "the" used herein may also include plural forms. It should be further understood that the term "include" used in the specification of this application refers to the presence of the described features, integers, steps, and operations, but does not exclude the presence or addition of one or more other features, integers, steps, and operations. Happening.
本申请实施例提供一种问题答案推荐方法,如图1所示,所述方法包括以下步骤:The embodiment of the application provides a method for recommending answers to questions. As shown in FIG. 1, the method includes the following steps:
S10:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息。S10: Obtain the question information of the post currently published by the user, perform word conversion processing on the question information, and extract keyword information in the question information.
在论坛中,用户可以通过发布帖子爆料新闻、发表观点或寻求帮助,当用户在论坛上发布帖子时,尤其是发布寻求问题解答的帖子,为了避免论坛中相同问题或相似问题出现多次,造成论坛重复的帖子过多,本实施例中,在用户发布帖子后,例如用户点击“提交”按钮后,获取用户当前发布的帖子的内容信息,本实施例将帖子的内容信息定义为问题信息,然后将用户发布的帖子的问题信息进行转词处理,在一种实施方式中,通过爬取帖子的内容信息,然后将所述内容信息保存为txt文件,再对所述txt文件进行分词处理,提取帖子的内容信息中的关键词信息,并将所述关键词信息转化为相应的词向量,将每一个关键词转化为词向量方便后续对关键词进行计算处理。例如帖子发布的内容为“从广州过去香港机场,怎么最方便?”,将帖子的内容信息进行转词处理,提取的关键词信息包括广州、去、香港、机场、方便。In the forum, users can break news, express opinions or seek help by posting posts. When users post on the forum, especially posts seeking answers to questions, in order to avoid the same problem or similar problems appearing multiple times in the forum, causing There are too many repeated posts in the forum. In this embodiment, after the user publishes the post, for example, after the user clicks the "Submit" button, the content information of the post currently published by the user is obtained. This embodiment defines the content information of the post as question information. Then the question information of the post posted by the user is converted into words. In one embodiment, the content information of the post is crawled, and then the content information is saved as a txt file, and then word segmentation is performed on the txt file. The keyword information in the content information of the post is extracted, and the keyword information is converted into a corresponding word vector, and each keyword is converted into a word vector to facilitate subsequent calculation and processing of the keywords. For example, the content of the post is "How is it most convenient to go from Guangzhou to Hong Kong Airport?", the content information of the post is transliterated, and the extracted keyword information includes Guangzhou, Go, Hong Kong, Airport, and Convenience.
S20:根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子。S20: Perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information.
本实施例中,每一个发布的帖子都会进行将帖子的内容信息转词处理,转化为词向量并提取内容信息中的关键词信息的操作,然后将每一个帖子的关键词信息保存在数据库,当有新的帖子发布时,根据所述关键词信息在数据库中进行相似度匹配,通过计算关键词信息对应的词向量进行匹配,例如关键词信息“北京”的词向量为[5.0,3.0,9.0],关键词信息“中国首都”的词向量为[5.1,2.9,9.0],计算该两个词向量的差值,通过所述差值便可得到两个词向量的相似度,优选的,所述相似度匹配包括中英文的匹配、拼音匹配、近义词的匹配、相似词的匹配,然后从数据库中获取与所述关键词信息匹配的若干已有的帖子,通过关键词信息进行匹配后,确定与当前帖子具有匹配的关键词信息,然后通过匹配到的关键词信息定位到已发布的帖子,例如将广州与羊城、花城、GZ、020进行匹配,将香港与HK、HKG等进行匹配,获取已发布的帖子中存在该些关键词信息的帖子。In this embodiment, each posted post will be processed to convert the content information of the post into word vectors and extract the keyword information in the content information, and then save the keyword information of each post in the database. When a new post is published, similarity matching is performed in the database according to the keyword information, and the matching is performed by calculating the word vector corresponding to the keyword information. For example, the word vector of the keyword information "Beijing" is [5.0, 3.0, 9.0], the word vector of the keyword information "China Capital" is [5.1, 2.9, 9.0], calculate the difference between the two word vectors, and the similarity of the two word vectors can be obtained through the difference, preferably The similarity matching includes Chinese and English matching, pinyin matching, synonymous matching, and similar word matching, and then several existing posts matching the keyword information are obtained from the database, and the keyword information is used for matching , Determine the keyword information that matches the current post, and then locate the published post based on the matched keyword information, such as matching Guangzhou with Yangcheng, Huacheng, GZ, 020, and matching Hong Kong with HK, HKG, etc. , Get the posts with the keyword information in the published posts.
S30:将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息。S30: Combine the keyword information into a question mentioned in a post, and locate context information related to the question from the existing post.
在得到与所述关键词信息匹配的若干个已发布的帖子后,将所述关键词信息组合成用户当前发布的帖子提及的问题,从而更加确定问题的内容,然后从所述已有的帖子中定位与所述问题相关的上下文信息,由于一个帖子中的回复不一定全部与该帖子相关,因此需要对已有帖子的回复进行筛选,从已有的帖子中确定与所述问题相关的上下文信息,例如在已有的帖子中,将点赞数或者推荐数最高的回复作为与所述问题相关的答案之一,同时获取该回复的前后文回复,即从已有的帖子中定位与所述问题相关的上下文信息,根据所述上下文信息便可清晰地了解已有帖子的内容是否与用户当前发布的帖子的问题相关。After obtaining several published posts that match the keyword information, the keyword information is combined into the question mentioned in the user’s current post, so as to more determine the content of the question, and then from the existing The contextual information related to the question is located in the post. Since the replies in a post are not necessarily all related to the post, it is necessary to filter the replies to the existing posts, and determine the ones related to the question from the existing posts Contextual information, for example, in an existing post, the reply with the highest number of likes or recommendations is taken as one of the answers related to the question, and the context of the reply is obtained at the same time, that is, to locate and According to the context information related to the question, it can be clearly understood whether the content of the existing post is related to the question of the post currently published by the user according to the context information.
S40:根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。S40: Obtain answers to questions from several existing posts according to the context information, and push the answers to the post published by the user.
在从若干个已有的帖子中获取所述上下文信息后,便能得到不同帖子中与用户当前发布的帖子的问题的相关答案,本实施例中,根据所述上下文信息从若干已有的帖子获取问题的答案,然后将所述答案推送至所述用户发布的帖子中,在一种实施方式中,可以从若干个已有的帖子中根据上下文信息获取到问题的若干个答案,然后将该若干个答案进行整合,将整合后的答案推送至用户当前发布的帖子;在另一种实施方式中,可以从若干个已有的帖子中根据上下文信息获取到问题的若干个答案,然后将该若干个答案一一推送至用户当前发布的帖子,并且从相关的答案便可定位到所述已发布的帖子中,用户从推送的答案中便能直观地了解到已有的帖子发布的相关内容,查看已有的帖子的内容信息是否与自己的所需解答的问题相关,从而快速地查找到所需的答案。After obtaining the context information from a number of existing posts, you can get answers to questions related to the user’s current post in different posts. In this embodiment, according to the context information, you can get answers from several existing posts. Obtain the answer to the question, and then push the answer to the post posted by the user. In one implementation, several answers to the question can be obtained from several existing posts based on contextual information, and then Several answers are integrated, and the integrated answers are pushed to the user’s current post; in another implementation, several answers to the question can be obtained from several existing posts based on contextual information, and then the Several answers are pushed to the user's current post one by one, and the related answers can be located in the published post, and the user can intuitively understand the relevant content of the existing post from the pushed answer , Check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need.
本实施例提供了一种基于帖子、问题、答案三种元素组合的答案推荐方法,适用于论坛发布帖子寻求解答的应用场景,用户在论坛上发布帖子时,获取用户当前发布的帖子的问题信息,并将所述问题信息进行转词处理,确定问题信息中的关键词,提取关键词信息从而形式对所述问题信息的描述,每一个发布的帖子均有对应的关键词信息存储在数据库中,根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,由于所述关键词信息能够组合成帖子提及的问题,从 匹配到的已有的帖子中定位与所述问题相关的上下文信息,根据所述上下文信息便可清晰地了解已有帖子的内容是否与用户当前发布的帖子的问题相关,在从若干个已有的帖子中获取所述上下文信息后,便能得到不同帖子中与用户当前发布的帖子的问题的相关答案,然后将所述答案推送至所述用户发布的帖子中,用户从推送的答案中便能直观地了解到已有的帖子发布的相关内容,查看已有的帖子的内容信息是否与自己的所需解答的问题相关,从而快速地查找到所需的答案,同时,避免论坛中相同问题或类似问题出现多次,造成论坛重复的帖子过多,从而节省了服务器有限的资源。This embodiment provides an answer recommendation method based on the combination of the three elements of post, question, and answer, which is suitable for application scenarios where forum posts are posted to seek answers. When a user posts a post on the forum, the user obtains the question information of the post currently posted by the user , And perform word conversion processing on the question information, determine the keywords in the question information, extract the keyword information to form a description of the question information, and each published post has corresponding keyword information stored in the database , Perform similarity matching in the database according to the keyword information to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched ones In some posts, the contextual information related to the question is located. According to the context information, it is possible to clearly understand whether the content of the existing post is related to the question of the user’s current post. It can be obtained from several existing posts. After the context information, the answers to questions related to the user's current post in different posts can be obtained, and then the answer is pushed to the post published by the user, and the user can intuitively understand from the pushed answer Go to the relevant content of the existing post, check whether the content information of the existing post is related to the question you need to answer, so as to quickly find the answer you need, and at the same time, avoid the same or similar questions in the forum Many times, the forum has too many repeated posts, thus saving the limited resources of the server.
本申请的一种实施例,所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,包括:According to an embodiment of the present application, the performing similarity matching in a database according to the keyword information to obtain several existing posts that match the keyword information includes:
获取匹配时间段,根据所述关键词信息在数据库中进行相似度匹配,并基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子。Obtain a matching time period, perform similarity matching in a database according to the keyword information, and obtain several existing posts matching the keyword information based on the matching time period.
随着时间的推移,相同的问题在不同时间段具有不同的答案,久远的答案已不适用相同的问题,为了提供更准确的答案,本实施例中,在根据所述关键词信息在数据库中进行相似度匹配时,获取匹配时间段,限定所匹配的帖子的发布时间,在根据所述关键词信息在数据库中进行相似度匹配之后,确定了若干个已有的帖子,同时对帖子基于时间进行排序,然后基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子,在一种实施方式中,将帖子发布时间距离当前时间越近的帖子作为相似度更高的帖子,优先检索最近时间段的帖子。As time goes by, the same question has different answers in different time periods, and the old answers are no longer applicable to the same questions. In order to provide more accurate answers, in this embodiment, according to the keyword information in the database When performing similarity matching, the matching time period is obtained, and the publishing time of the matched post is limited. After similarity matching is performed in the database according to the keyword information, several existing posts are determined, and the posts are based on time Sort, and then obtain a number of existing posts that match the keyword information based on the matching time period. In one implementation, the posts whose posting time is closer to the current time are regarded as posts with higher similarity To retrieve posts in the most recent time period first.
进一步的,所述基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子之后,还包括:Further, after obtaining several existing posts matching the keyword information based on the matching time period, the method further includes:
接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整所述匹配时间段。Receive user feedback information on the answer associated with the post, and adjust the matching time period according to the feedback information.
本实施例中,在匹配到已有的帖子,并根据匹配到的帖子将答案推送给用户后,接收用户的反馈信息,若用户反馈答案不准确,则修改所述匹配时间段,匹配更早期发布的帖子及相关的答案。进一步的,在接收到用户的反馈信息而修改匹配时间段后,在匹配的结果中隐藏用户已浏览过或 已反馈过的答案对应的帖子,避免两次推送的答案中具有多个相同的答案,造成资源的浪费。In this embodiment, after matching an existing post and pushing the answer to the user according to the matched post, the user’s feedback information is received. If the user’s feedback is inaccurate, the matching time period is modified to make the match earlier Posts posted and related answers. Further, after receiving the user's feedback information and modifying the matching time period, hide the post corresponding to the answer that the user has browsed or feedback in the matching result to avoid having multiple identical answers in the two push answers , Resulting in a waste of resources.
本申请的一种实施例,所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,包括:According to an embodiment of the present application, the performing similarity matching in a database according to the keyword information to obtain several existing posts that match the keyword information includes:
所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,从所述已有的帖子中筛选回复数满足要求的帖子。The similarity matching is performed in a database according to the keyword information, a number of existing posts matching the keyword information are obtained, and the posts with the number of replies meeting the requirements are selected from the existing posts.
本实施例中,在根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子后,从匹配的帖子中筛选回复数达到一定数量的帖子,优选的,回复数越多的帖子的相似度更高,对于没有回复的帖子,该帖子亦不具备问题所需的答案,需要将该些帖子剔除,避免信息搜索的冗余度。In this embodiment, after similarity matching is performed in the database according to the keyword information, a number of existing posts that match the keyword information are obtained, and posts with a certain number of replies are selected from the matched posts. Preferably, a post with more replies has a higher similarity. For a post with no reply, the post does not have the answer required for the question, and these posts need to be eliminated to avoid redundancy in information search.
进一步的,所述从所述已有的帖子中筛选回复数满足要求的帖子之后,还包括:Further, after selecting the posts whose number of replies meet the requirements from the existing posts, the method further includes:
接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整回复数要求。Receive user feedback information on the answer associated with the post, and adjust the number of responses required according to the feedback information.
本实施例中,在筛选出回复数满足要求的帖子,根据匹配到的帖子将答案推送给用户后后,接收用户的反馈信息,若用户反馈答案不准确,则修改所述回复数要求,匹配回复数较低的的帖子及相关的答案。例如,在第一次匹配时,筛选出回复数超过n(比如n为30)的若干个已有的帖子,若用户反馈不答案不准确,则在第二次筛选时,筛选回复数超过m(比如m为10)的帖子。更佳的,在接收到用户的反馈信息而修改回复数要求后,在匹配的结果中隐藏用户已浏览过或已反馈过的答案对应的帖子,避免两次推送的答案中具有多个相同的答案,造成资源的浪费。In this embodiment, after the posts with the number of replies that meet the requirements are filtered out, and the answers are pushed to the user according to the matched posts, the user’s feedback information is received. If the user’s feedback is inaccurate, the number of replies is modified to match Posts with low number of responses and related answers. For example, in the first matching, several existing posts with a number of replies exceeding n (for example, n is 30) are filtered out. If the user feedback is not accurate, the number of replies selected in the second selection exceeds m (For example, m is 10) posts. Even better, after receiving the user's feedback information and modifying the number of responses, hide the posts corresponding to the answers that the user has viewed or feedback in the matching results to avoid having multiple identical answers in the two pushes The answer is a waste of resources.
本实施例的又一种实施方式,若接收到用户对所述帖子关联的答案的正反馈信息,例如接收到用户确定所推送的答案有效的反馈信息,该反馈信息视为正反馈信息,此时,增加所述答案与所述上下文信息、所述上下文信息与上述问题,所述问题与上述关键词信息的关联度,后续若有相似的帖子询问相似的问题,优先向用户推送关联度更高的已有的帖子所确定 的答案。In another implementation manner of this embodiment, if the user receives positive feedback information on the answer associated with the post, for example, if the user determines that the pushed answer is valid, the feedback information is regarded as positive feedback information. When adding the answer and the context information, the context information and the above question, the association degree between the question and the above keyword information, if there are similar posts asking similar questions in the future, the user will be given priority to push the association degree more The answer determined by Gao's existing post.
本申请的一种实施例,如图2所示,所述将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息,包括:An embodiment of the present application, as shown in FIG. 2, said combining the keyword information into a question mentioned in a post, and locating context information related to the question from the existing post includes:
S31:将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息通过所述答案表达式进行计算,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。S31: Combine the keyword information into a question mentioned in a post, synthesize an answer expression according to the existing post and the question; locate context information related to the question from the existing post; The context information is calculated through the answer expression, the utility of the context information is determined, and the context information whose utility meets a preset requirement is obtained.
本实施例中,通过所述关键词组合成用户发布的帖子所需要解答的问题,然后再根据已有的帖子及所述问题合成答案表达式,答案表达式确定了答案应该包括哪些词向量,词向量的计算规则,以及所要得到的结果的期望值;同时,在已有的帖子中定位与所述问题相关的上下文信息,所述上下文信息包含有与所述答案表达式具有相近的词向量;利用所述答案表达式计算定位到的上下文信息,确定所述上下文信息的效用,即得到该上下文信息输入答案表达式中的期望值,然后获取期望值满足预设要求的上下文信息,该些上下文信息便能够提供更加准确的与问题相关的答案,从而更准确地向用户推送所需的答案。In this embodiment, the key words are combined into the questions that need to be answered in the post posted by the user, and then the answer expression is synthesized according to the existing post and the question. The answer expression determines which word vectors should be included in the answer. The calculation rule of the vector and the expected value of the result to be obtained; at the same time, the context information related to the question is located in the existing post, and the context information contains a word vector similar to the answer expression; use The answer expression calculates the located context information, determines the utility of the context information, that is, obtains the expected value of the context information input into the answer expression, and then obtains the context information whose expected value meets the preset requirements, and the context information can be Provide more accurate answers related to the question, so as to push the required answers to users more accurately.
本申请的一种实施例,所述将所述问题信息进行转词处理,提取问题信息中的关键词信息,包括:According to an embodiment of the present application, the said question information is converted to word processing to extract the keyword information in the question information, including:
将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量,将所述关键词向量组成帖子问题的向量矩阵;Subjecting the question information to word conversion processing, extracting keyword information in the question information, converting the keyword information into a keyword vector, and forming the keyword vector into a vector matrix of the post question;
所述根据所述关键词信息在数据库中进行相似度匹配,包括:The performing similarity matching in a database according to the keyword information includes:
根据所述向量矩阵在数据库中进行相似度匹配。Perform similarity matching in the database according to the vector matrix.
通过爬取所述帖子的问题信息,然后提取帖子的问题信息中的关键词信息时,所提取的关键词信息为文本string型的数据,对于文本string型的数据,为了方便计算以进行相似度的匹配,本实施例中,将所述关键词信息转为关键词向量,每一个关键词都转化为一个关键词向量,将多个关键词组合便能得到帖子的问题信息的具体内容,为了方便计算,组合时将所 述关键词向量组成向量矩阵,每句话便可以通过词向量组装成向量矩阵,组合后的向量矩阵便能被识别为帖子的问题信息,在一种实施方式中,向量矩阵的第一行是第一个词向量,第二行是第二个,那么若干个帖子的问题的相似度便可以通过的矩阵加减法计算,本实施例中,在根据所述关键词信息在数据库中进行相似度匹配,则根据所述向量矩阵在数据库中进行相似度匹配,匹配出两个向量矩阵的差值小于预设值的结果,从而得到与所述关键词信息匹配的若干已有的帖子。By crawling the question information of the post, and then extracting the keyword information in the question information of the post, the extracted keyword information is text string data. For text string data, similarity is calculated for the convenience of calculation In this embodiment, the keyword information is converted into a keyword vector, and each keyword is converted into a keyword vector. The specific content of the question information of the post can be obtained by combining multiple keywords. It is convenient to calculate. When combining, the keyword vectors are formed into a vector matrix, and each sentence can be assembled into a vector matrix by word vectors, and the combined vector matrix can be identified as the problem information of the post. In one embodiment, The first row of the vector matrix is the first word vector, and the second row is the second. Then the similarity of several post questions can be calculated by matrix addition and subtraction. In this embodiment, according to the key The word information is matched in the database for similarity, then the similarity matching is performed in the database according to the vector matrix, and the result that the difference between the two vector matrices is less than the preset value is matched, so as to obtain the match with the keyword information Several existing posts.
本申请的一种实施例,所述获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,包括:In an embodiment of the present application, the acquiring question information of a post currently published by a user, translating the question information, and extracting keyword information in the question information includes:
获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量;Acquiring question information of a post currently published by the user, translating the question information, extracting keyword information in the question information, and converting the keyword information into a keyword vector;
所述将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式,包括:The combining the keyword information into the question mentioned in the post, and synthesizing the answer expression according to the existing post and the question, includes:
根据所述关键词向量组成帖子提及的问题的向量矩阵,根据所述已有的帖子及所述向量矩阵合成答案表达式。A vector matrix of questions mentioned in the post is formed according to the keyword vector, and an answer expression is synthesized according to the existing post and the vector matrix.
本实施例中,在爬取到用户当前发布的帖子的问题信息后,将所述问题信息进行转词处理,将完整的问题信息切分成一个一个的词语组合,然后提取问题信息中的关键词信息,并将所述关键词信息转为关键词向量,在根据所述关键词信息组合成帖子提及的问题时,将所述关键词向量进行组合,组合成帖子提及的问题的向量矩阵,然后再根据已有的帖子,已有的帖子中也包含有关键词信息转化得到的关键词向量,以及已有的帖子所得到的问题的向量矩阵,计算当前帖子提及的问题的向量矩阵与已有的帖子提及的问题的向量矩阵,合成相应的答案表达式,后续根据该答案表达式对已有的帖子中的关键词向量进行筛选,便可得到已有的帖子中满足要求的上下文信息,即当前帖子提及的问题所需的答案。In this embodiment, after the question information of the post currently posted by the user is crawled, the question information is transformed into words, the complete question information is divided into word combinations one by one, and then the keywords in the question information are extracted Information, and convert the keyword information into a keyword vector. When combining the keyword information into the question mentioned in the post, combine the keyword vector to form a vector matrix of the question mentioned in the post , And then calculate the vector matrix of the problems mentioned in the current post based on the existing posts, the existing posts also contain the keyword vectors obtained by the conversion of keyword information, and the vector matrix of the questions obtained from the existing posts Synthesize the corresponding answer expression with the vector matrix of the questions mentioned in the existing posts, and then filter the keyword vectors in the existing posts according to the answer expression to obtain the existing posts that meet the requirements Contextual information, which is the answer required for the question mentioned in the current post.
如图3所示,在另一种实施例中,本申请提供了一种问题答案推荐装置,包括:As shown in Figure 3, in another embodiment, the present application provides a question answer recommendation device, including:
转词模块10:用于获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Word conversion module 10: used to obtain the question information of the post currently published by the user, perform word conversion processing on the question information, and extract keyword information in the question information;
匹配模块20:用于根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Matching module 20: used to perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information;
定位模块30:用于将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Positioning module 30: used to combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;
推送模块40:用于根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。Push module 40: used to obtain answers to questions from several existing posts according to the context information, and push the answers to the posts published by the user.
本申请的一种实施例,所述匹配模块20还包括执行;In an embodiment of the present application, the matching module 20 further includes execution;
获取匹配时间段,根据所述关键词信息在数据库中进行相似度匹配,并基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子。Obtain a matching time period, perform similarity matching in a database according to the keyword information, and obtain several existing posts matching the keyword information based on the matching time period.
本申请的一种实施例,所述匹配模块20还包括执行;In an embodiment of the present application, the matching module 20 further includes execution;
根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,从所述已有的帖子中筛选回复数满足要求的帖子。Perform similarity matching in a database according to the keyword information, obtain a number of existing posts that match the keyword information, and select posts whose number of replies meet the requirements from the existing posts.
本申请的一种实施例,所述定位模块30还包括执行;In an embodiment of the present application, the positioning module 30 further includes execution;
将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息与所述答案表达式相比较,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。Combine the keyword information into the question mentioned in the post, and synthesize the answer expression according to the existing post and the question; locate the context information related to the question from the existing post; The context information is compared with the answer expression, the utility of the context information is determined, and the context information that the utility meets a preset requirement is obtained.
本申请的一种实施例,所述转词模块10还包括执行:In an embodiment of the present application, the word transfer module 10 further includes executing:
将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量,将所述关键词向量组成帖子问题的向量矩阵;Subjecting the question information to word conversion processing, extracting keyword information in the question information, converting the keyword information into a keyword vector, and forming the keyword vector into a vector matrix of the post question;
所述匹配模块20还包括执行:The matching module 20 further includes executing:
根据所述向量矩阵在数据库中进行相似度匹配。Perform similarity matching in the database according to the vector matrix.
在另一种实施例中,本申请提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述实施例所述的问题答案推荐方法。其中,所述计算机可读存储介质包括但不限于任何类型的盘(包括软盘、硬盘、光盘、CD-ROM、和磁光盘)、ROM(Read-Only Memory,只读存储器)、RAM(Random AcceSS Memory, 随即存储器)、EPROM(EraSable Programmable Read-Only Memory,可擦写可编程只读存储器)、EEPROM(Electrically EraSable Programmable Read-Only Memory,电可擦可编程只读存储器)、闪存、磁性卡片或光线卡片。也就是,存储设备包括由设备(例如,计算机、手机)以能够读的形式存储或传输信息的任何介质,可以是只读存储器,磁盘或光盘等。In another embodiment, the present application provides a computer-readable storage medium with a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method for recommending answers to questions described in the above embodiments is implemented . Wherein, the computer-readable storage medium includes, but is not limited to, any type of disk (including floppy disk, hard disk, optical disk, CD-ROM, and magneto-optical disk), ROM (Read-Only Memory), RAM (Random AccesSS) Memory, Random Memory), EPROM (EraSable Programmable Read-Only Memory), EEPROM (Electrically EraSable Programmable Read-Only Memory), flash memory, magnetic card or Light card. That is, a storage device includes any medium that stores or transmits information in a readable form by a device (for example, a computer or a mobile phone), and may be a read-only memory, a magnetic disk, or an optical disk.
本申请实施例提供的一种计算机可读存储介质,可实现获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。通过提供一种基于帖子、问题、答案三种元素组合的答案推荐方法,适用于论坛发布帖子寻求解答的应用场景,用户在论坛上发布帖子时,获取用户当前发布的帖子的问题信息,并将所述问题信息进行转词处理,,确定问题信息中的关键词,提取关键词信息从而形式对所述问题信息的描述,每一个发布的帖子均有对应的关键词信息存储在数据库中,根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,由于所述关键词信息能够组合成帖子提及的问题,从匹配到的已有的帖子中定位与所述问题相关的上下文信息,根据所述上下文信息便可清晰地了解已有帖子的内容是否与用户当前发布的帖子的问题相关,在从若干个已有的帖子中获取所述上下文信息后,便能得到不同帖子中与用户当前发布的帖子的问题的相关答案,然后将所述答案推送至所述用户发布的帖子中,用户从推送的答案中便能直观地了解到已有的帖子发布的相关内容,查看已有的帖子的内容信息是否与自己的所需解答的问题相关,从而快速地查找到所需的答案,同时,避免论坛中相同问题或类似问题出现多次,造成论坛重复的帖子过多,从而节省了服务器有限的资源。The computer-readable storage medium provided by the embodiment of the application can obtain the problem information of the post currently posted by the user, convert the problem information to word processing, and extract the keyword information in the problem information; according to the keywords The information is similarly matched in the database, and several existing posts matching the keyword information are obtained; the keyword information is combined into the questions mentioned in the post, and the information is located in the existing posts. Question-related contextual information; obtain answers to questions from several existing posts according to the contextual information, and push the answers to the posts published by the user. By providing an answer recommendation method based on the combination of the three elements of post, question and answer, it is suitable for application scenarios where forum posts seek answers. When a user posts a post on the forum, he obtains the question information of the user’s current post and adds The question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information. Each posted post has corresponding keyword information stored in the database, according to The keyword information is similarly matched in the database to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched existing posts The contextual information related to the question is located in the post, and based on the contextual information, it is possible to clearly understand whether the content of the existing post is related to the question of the post currently published by the user, and obtain the aforementioned information from several existing posts. After the context information, you can get answers to questions related to the user’s current post in different posts, and then push the answer to the post posted by the user, and the user can intuitively understand from the pushed answer Related content of some posts, check whether the content information of existing posts is related to the question you need to answer, so as to quickly find the answer you need, and at the same time, avoid the same question or similar questions appearing multiple times in the forum , Resulting in too many repeated posts in the forum, thus saving the limited resources of the server.
本申请实施例提供的计算机可读存储介质可以实现上述问题答案推荐方法的实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The computer-readable storage medium provided in the embodiment of the present application can implement the embodiment of the method for recommending answers to the above questions. For specific function implementation, please refer to the description in the method embodiment, which will not be repeated here.
此外,在又一种实施例中,本申请还提供一种服务器,如图4所示,所述服务器包括处理器403、存储器405、输入单元407以及显示单元409等器件。本领域技术人员可以理解,图4示出的结构器件并不构成对所有服务器的限定,可以包括比图示更多或更少的部件,或者组合某些部件。所述存储器405可用于存储计算机程序401以及各功能模块,所述处理器403运行存储在存储器405的计算机程序401,从而执行设备的各种功能应用以及数据处理。所述存储器405可以是内存储器或外存储器,或者包括内存储器和外存储器两者。内存储器可以包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦写可编程ROM(EEPROM)、快闪存储器、或者随机存储器。外存储器可以包括硬盘、软盘、ZIP盘、U盘、磁带等。本申请所公开的存储器包括但不限于这些类型的存储器。本申请所公开的存储器405只作为例子而非作为限定。In addition, in another embodiment, the present application also provides a server. As shown in FIG. 4, the server includes a processor 403, a memory 405, an input unit 407, a display unit 409 and other devices. Those skilled in the art can understand that the structural components shown in FIG. 4 do not constitute a limitation on all servers, and may include more or less components than those shown in the figure, or combine certain components. The memory 405 can be used to store a computer program 401 and various functional modules, and the processor 403 runs the computer program 401 stored in the memory 405 to execute various functional applications and data processing of the device. The memory 405 may be internal memory or external memory, or include both internal memory and external memory. The internal memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), flash memory, or random access memory. External storage can include hard disks, floppy disks, ZIP disks, U disks, tapes, etc. The memory disclosed in this application includes but is not limited to these types of memory. The memory 405 disclosed in this application is only an example and not a limitation.
输入单元407用于接收信号的输入及接收用户的输入,输入单元407可包括触控面板以及其它输入设备,触控面板可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板上或在触控面板附近的操作),并根据预先设定的程序驱动相应的连接装置;其它输入设备可以包括但不限于物理键盘、功能键(比如播放控制按键、开关按键等)、轨迹球、鼠标、操作杆等中的一种或多种。显示单元409可用于显示用户输入的信息或提供给用户的信息以及计算机设备的各种菜单。显示单元409可采用液晶显示器、有机发光二极管等形式。处理器403是计算机设备的控制中心,利用各种接口和线路连接整个电脑的各个部分,通过运行或执行存储在存储器403内的软件程序和/或模块,以及调用存储在存储器内的数据,执行各种功能和处理数据。The input unit 407 is used to receive signal input and user input. The input unit 407 can include a touch panel and other input devices. The touch panel can collect user touch operations on or near it (for example, the user uses fingers, stylus The operation of any suitable objects or accessories on the touch panel or near the touch panel), and drive the corresponding connection device according to the preset program; other input devices may include but are not limited to physical keyboards, function keys (such as One or more of playback control buttons, switch buttons, etc.), trackball, mouse, joystick, etc. The display unit 409 can be used to display information input by the user or information provided to the user and various menus of the computer device. The display unit 409 may take the form of a liquid crystal display, an organic light emitting diode, or the like. The processor 403 is the control center of the computer equipment. It uses various interfaces and lines to connect the various parts of the entire computer. By running or executing the software programs and/or modules stored in the memory 403, and calling the data stored in the memory, execute Various functions and processing data.
在一种实施方式中,所述服务器包括一个或多个处理器403,以及一个或多个存储器405,一个或多个计算机程序401,其中所述一个或多个计算机程序401被存储在存储器405中并被配置为由所述一个或多个处理器403执行,所述一个或多个计算机程序401配置用于执行以上实施例所述的问题答案推荐方法。图4中所示的一个或多个处理器403能够执行、实现图3中所示的转词模块10、匹配模块20、定位模块30、推送模块40的 功能。In one embodiment, the server includes one or more processors 403, one or more memories 405, and one or more computer programs 401, wherein the one or more computer programs 401 are stored in the memory 405 It is configured to be executed by the one or more processors 403, and the one or more computer programs 401 are configured to execute the question answer recommendation method described in the above embodiment. The one or more processors 403 shown in FIG. 4 can execute and realize the functions of the word transfer module 10, the matching module 20, the positioning module 30, and the pushing module 40 shown in FIG.
本申请实施例提供的一种服务器,可实现获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。通过提供一种基于帖子、问题、答案三种元素组合的答案推荐方法,适用于论坛发布帖子寻求解答的应用场景,用户在论坛上发布帖子时,获取用户当前发布的帖子的问题信息,并将所述问题信息进行转词处理,,确定问题信息中的关键词,提取关键词信息从而形式对所述问题信息的描述,每一个发布的帖子均有对应的关键词信息存储在数据库中,根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,由于所述关键词信息能够组合成帖子提及的问题,从匹配到的已有的帖子中定位与所述问题相关的上下文信息,根据所述上下文信息便可清晰地了解已有帖子的内容是否与用户当前发布的帖子的问题相关,在从若干个已有的帖子中获取所述上下文信息后,便能得到不同帖子中与用户当前发布的帖子的问题的相关答案,然后将所述答案推送至所述用户发布的帖子中,用户从推送的答案中便能直观地了解到已有的帖子发布的相关内容,查看已有的帖子的内容信息是否与自己的所需解答的问题相关,从而快速地查找到所需的答案,同时,避免论坛中相同问题或类似问题出现多次,造成论坛重复的帖子过多,从而节省了服务器有限的资源。The server provided by the embodiment of the application can obtain the question information of the post currently published by the user, convert the question information to word conversion, and extract the keyword information in the question information; according to the keyword information in the database Perform similarity matching to obtain several existing posts that match the keyword information; combine the keyword information into the questions mentioned in the posts, and locate the context related to the questions from the existing posts Information; obtain answers to questions from a number of existing posts according to the context information, and push the answers to the posts published by the user. By providing an answer recommendation method based on the combination of the three elements of post, question and answer, it is suitable for the application scenario of forum posts seeking answers. When a user posts a post on the forum, he obtains the question information of the user’s current post, and The question information is converted to words, the keywords in the question information are determined, and the keyword information is extracted to form a description of the question information. Each posted post has corresponding keyword information stored in the database, according to The keyword information is similarly matched in the database to obtain a number of existing posts that match the keyword information. Since the keyword information can be combined into the questions mentioned in the post, from the matched existing posts The contextual information related to the question is located in the post. According to the contextual information, it is possible to clearly understand whether the content of the existing post is related to the question of the current post posted by the user. After contextual information, you can get answers to questions related to the user’s current post in different posts, and then push the answer to the post posted by the user, and the user can intuitively understand from the pushed answer Related content of some posts, check whether the content information of existing posts is related to the question you need to answer, so as to quickly find the answer you need, and at the same time, avoid the same question or similar questions in the forum. , Resulting in too many repeated posts in the forum, thus saving the limited resources of the server.
本申请实施例提供的服务器可以实现上述提供的问题答案推荐方法的实施例,具体功能实现请参见方法实施例中的说明,在此不再赘述。The server provided in the embodiment of the present application can implement the above-provided embodiment of the question answer recommendation method. For specific function implementation, please refer to the description in the method embodiment, which will not be repeated here.
以上所述仅是本申请的部分实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本申请原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本申请的保护范围。The above are only part of the implementation of this application. It should be pointed out that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and modifications can be made, and these improvements and modifications are also Should be regarded as the scope of protection of this application.
Claims (20)
- 一种问题答案推荐方法,其特征在于,包括:A method for recommending answers to questions, characterized in that it includes:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Obtain the question information of the post currently published by the user, convert the question information to word processing, and extract keyword information in the question information;根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Perform similarity matching in the database according to the keyword information, and obtain several existing posts matching the keyword information;将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。The answer to the question is obtained from several existing posts according to the context information, and the answer is pushed to the post published by the user.
- 根据权利要求1所述的方法,其特征在于,所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,包括:The method according to claim 1, wherein the performing similarity matching in a database according to the keyword information to obtain several existing posts matching the keyword information comprises:获取匹配时间段,根据所述关键词信息在数据库中进行相似度匹配,并基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子;Obtaining a matching time period, performing similarity matching in a database according to the keyword information, and obtaining a number of existing posts matching the keyword information based on the matching time period;所述基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子之后,还包括:After obtaining several existing posts matching the keyword information based on the matching time period, the method further includes:接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整所述匹配时间段。Receive user feedback information on the answer associated with the post, and adjust the matching time period according to the feedback information.
- 根据权利要求1所述的方法,其特征在于,所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,包括:The method according to claim 1, wherein the performing similarity matching in a database according to the keyword information to obtain several existing posts matching the keyword information comprises:根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,从所述已有的帖子中筛选回复数满足要求的帖子;Perform similarity matching in a database according to the keyword information, obtain a number of existing posts that match the keyword information, and select posts whose number of responses meet the requirements from the existing posts;所述从所述已有的帖子中筛选回复数满足要求的帖子之后,还包括:After screening the posts whose number of replies meet the requirements from the existing posts, it also includes:接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整回复数要求。Receive user feedback information on the answer associated with the post, and adjust the number of responses required according to the feedback information.
- 根据权利要求1所述的方法,其特征在于,所述将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息, 包括:The method according to claim 1, wherein the combining the keyword information into a question mentioned in a post, and locating context information related to the question from the existing post, comprises:将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息与所述答案表达式相比较,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。Combine the keyword information into the question mentioned in the post, and synthesize the answer expression according to the existing post and the question; locate the context information related to the question from the existing post; The context information is compared with the answer expression, the utility of the context information is determined, and the context information that the utility meets a preset requirement is obtained.
- 根据权利要求1所述的方法,其特征在于,所述将所述问题信息进行转词处理,提取问题信息中的关键词信息,包括:The method according to claim 1, wherein said converting the question information to a word and extracting keyword information in the question information comprises:将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量,将所述关键词向量组成帖子问题的向量矩阵;Subjecting the question information to word conversion processing, extracting keyword information in the question information, converting the keyword information into a keyword vector, and forming the keyword vector into a vector matrix of the post question;所述根据所述关键词信息在数据库中进行相似度匹配,包括:The performing similarity matching in a database according to the keyword information includes:根据所述向量矩阵在数据库中进行相似度匹配。Perform similarity matching in the database according to the vector matrix.
- 根据权利要求4所述的方法,其特征在于,所述获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,包括:The method according to claim 4, wherein said obtaining question information of a post currently published by a user, performing word conversion processing on said question information, and extracting keyword information in question information comprises:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量;Acquiring question information of a post currently published by the user, translating the question information, extracting keyword information in the question information, and converting the keyword information into a keyword vector;所述将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式,包括:The combining the keyword information into the question mentioned in the post, and synthesizing the answer expression according to the existing post and the question, includes:根据所述关键词向量组成帖子提及的问题的向量矩阵,根据所述已有的帖子及所述向量矩阵合成答案表达式。A vector matrix of questions mentioned in the post is formed according to the keyword vector, and an answer expression is synthesized according to the existing post and the vector matrix.
- 根据权利要求1-6任一项所述的方法,其特征在于,所述提取帖子的问题信息中的关键词信息时,所提取的关键词信息为文本string型的数据。The method according to any one of claims 1 to 6, wherein when the keyword information in the question information of the post is extracted, the extracted keyword information is text string data.
- 一种问题答案推荐装置,其特征在于,包括:A question answer recommendation device, characterized in that it comprises:转词模块:用于获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Word conversion module: used to obtain the question information of the post currently published by the user, convert the question information into words, and extract the keyword information in the question information;匹配模块:用于根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Matching module: used to perform similarity matching in the database according to the keyword information, and obtain several existing posts that match the keyword information;定位模块:用于将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Positioning module: used to combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;推送模块:用于根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。Push module: used to obtain answers to questions from several existing posts according to the context information, and push the answers to the posts published by the user.
- 根据权利要求8所述的装置,其特征在于,所述定位模块还包括执行;The device according to claim 8, wherein the positioning module further comprises execution;将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息与所述答案表达式相比较,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。Combine the keyword information into the question mentioned in the post, and synthesize the answer expression according to the existing post and the question; locate the context information related to the question from the existing post; The context information is compared with the answer expression, the utility of the context information is determined, and the context information that the utility meets a preset requirement is obtained.
- 根据权利要求8所述的装置,其特征在于,所述匹配模块具体用于:The device according to claim 8, wherein the matching module is specifically configured to:获取匹配时间段,根据所述关键词信息在数据库中进行相似度匹配,并基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子;Obtaining a matching time period, performing similarity matching in a database according to the keyword information, and obtaining a number of existing posts matching the keyword information based on the matching time period;所述匹配模块还用于:The matching module is also used for:接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整所述匹配时间段。Receive user feedback information on the answer associated with the post, and adjust the matching time period according to the feedback information.
- 根据权利要求8所述的装置,其特征在于,所述匹配模块具体用于:The device according to claim 8, wherein the matching module is specifically configured to:根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子,从所述已有的帖子中筛选回复数满足要求的帖子;Perform similarity matching in a database according to the keyword information, obtain a number of existing posts that match the keyword information, and select posts whose number of responses meet the requirements from the existing posts;所述匹配模块还用于:The matching module is also used for:接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整回复数要求。Receive user feedback information on the answer associated with the post, and adjust the number of responses required according to the feedback information.
- 根据权利要求8所述的装置,其特征在于,所述转词模块在将所述问题信息进行转词处理,提取问题信息中的关键词信息时,具体用于:The device according to claim 8, wherein the word conversion module is specifically used for: when performing word conversion processing on the question information and extracting keyword information in the question information:将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量,将所述关键词向量组成帖子问题的向量矩阵;Subjecting the question information to word conversion processing, extracting keyword information in the question information, converting the keyword information into a keyword vector, and forming the keyword vector into a vector matrix of the post question;所述匹配模块在根据所述关键词信息在数据库中进行相似度匹配时,具体用于:When the matching module performs similarity matching in the database according to the keyword information, it is specifically used for:根据所述向量矩阵在数据库中进行相似度匹配。Perform similarity matching in the database according to the vector matrix.
- 根据权利要求9所述的装置,其特征在于,所述转词模块具体用于:The device according to claim 9, wherein the word conversion module is specifically configured to:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量;Acquiring question information of a post currently published by the user, translating the question information, extracting keyword information in the question information, and converting the keyword information into a keyword vector;所述定位模块在将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式时,具体用于:When the positioning module combines the keyword information into the question mentioned in the post, and synthesizes the answer expression according to the existing post and the question, it is specifically used for:根据所述关键词向量组成帖子提及的问题的向量矩阵,根据所述已有的帖子及所述向量矩阵合成答案表达式。A vector matrix of questions mentioned in the post is formed according to the keyword vector, and an answer expression is synthesized according to the existing post and the vector matrix.
- 根据权利要求8-13任一项所述的装置,其特征在于,所述提取帖子的问题信息中的关键词信息时,所提取的关键词信息为文本string型的数据。The device according to any one of claims 8-13, wherein when the keyword information in the question information of the post is extracted, the extracted keyword information is text string data.
- 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现权利要求1至7任一项所述的问题答案推荐方法。A computer non-volatile readable storage medium, characterized in that a computer program is stored on the computer non-volatile readable storage medium, and the computer program implements any one of claims 1 to 7 when executed by a processor Recommended methods for answers to the questions described.
- 一种服务器,其特征在于,包括:A server, characterized in that it comprises:一个或多个处理器;One or more processors;存储器;Memory一个或多个计算机程序,其中所述一个或多个计算机程序被存储在所述存储器中并被配置为由所述一个或多个处理器执行,所述一个或多个计算机程序配置用于执行以下步骤:One or more computer programs, wherein the one or more computer programs are stored in the memory and configured to be executed by the one or more processors, and the one or more computer programs are configured to execute The following steps:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息;Obtain the question information of the post currently published by the user, convert the question information to word processing, and extract keyword information in the question information;根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子;Perform similarity matching in the database according to the keyword information, and obtain several existing posts matching the keyword information;将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息;Combine the keyword information into a question mentioned in a post, and locate contextual information related to the question from the existing post;根据所述上下文信息从若干已有的帖子获取问题的答案,将所述答案推送至所述用户发布的帖子。The answer to the question is obtained from several existing posts according to the context information, and the answer is pushed to the post published by the user.
- 根据权利要求16所述的服务器,其特征在于,所述根据所述关键词信息在数据库中进行相似度匹配,获取与所述关键词信息匹配的若干已有的帖子时,所述一个或多个计算机程序配置用于执行以下步骤:The server according to claim 16, wherein when the similarity matching is performed in the database according to the keyword information to obtain several existing posts matching the keyword information, the one or more A computer program configuration is used to perform the following steps:获取匹配时间段,根据所述关键词信息在数据库中进行相似度匹配,并基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子;Obtaining a matching time period, performing similarity matching in a database according to the keyword information, and obtaining a number of existing posts matching the keyword information based on the matching time period;所述基于所述匹配时间段获取与所述关键词信息匹配的若干已有的帖子 之后,所述一个或多个计算机程序还被配置用于执行以下步骤:After obtaining several existing posts matching the keyword information based on the matching time period, the one or more computer programs are further configured to perform the following steps:接收用户对所述帖子关联的答案的反馈信息,根据所述反馈信息调整所述匹配时间段。Receive user feedback information on the answer associated with the post, and adjust the matching time period according to the feedback information.
- 根据权利要求16所述的服务器,其特征在于,所述将所述关键词信息组合成帖子提及的问题,从所述已有的帖子中定位与所述问题相关的上下文信息时,所述一个或多个计算机程序配置用于执行以下步骤:The server according to claim 16, wherein when the keyword information is combined into the question mentioned in the post, and the context information related to the question is located from the existing post, the One or more computer programs are configured to perform the following steps:将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式;从所述已有的帖子中定位与所述问题相关的上下文信息;将所述上下文信息与所述答案表达式相比较,确定所述上下文信息的效用,获取所述效用满足预设要求的上下文信息。Combine the keyword information into the question mentioned in the post, and synthesize the answer expression according to the existing post and the question; locate the context information related to the question from the existing post; The context information is compared with the answer expression, the utility of the context information is determined, and the context information that the utility meets a preset requirement is obtained.
- 根据权利要求16所述的服务器,其特征在于,所述将所述问题信息进行转词处理,提取问题信息中的关键词信息时,所述一个或多个计算机程序配置用于执行以下步骤:The server according to claim 16, characterized in that, when the question information is converted into words and the keyword information in the question information is extracted, the one or more computer programs are configured to perform the following steps:将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量,将所述关键词向量组成帖子问题的向量矩阵;Subjecting the question information to word conversion processing, extracting keyword information in the question information, converting the keyword information into a keyword vector, and forming the keyword vector into a vector matrix of the post question;所述根据所述关键词信息在数据库中进行相似度匹配时,所述一个或多个计算机程序配置用于执行以下步骤:When performing similarity matching in a database according to the keyword information, the one or more computer programs are configured to perform the following steps:根据所述向量矩阵在数据库中进行相似度匹配。Perform similarity matching in the database according to the vector matrix.
- 根据权利要求18所述的服务器,其特征在于,所述获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息时,所述一个或多个计算机程序配置用于执行以下步骤:The server according to claim 18, characterized in that, when the question information of the post currently published by the user is obtained, the question information is converted into words, and the keyword information in the question information is extracted, the one or more A computer program configuration is used to perform the following steps:获取用户当前发布的帖子的问题信息,将所述问题信息进行转词处理,提取问题信息中的关键词信息,将所述关键词信息转为关键词向量;Acquiring question information of a post currently published by the user, translating the question information, extracting keyword information in the question information, and converting the keyword information into a keyword vector;所述将所述关键词信息组合成帖子提及的问题,根据所述已有的帖子及所述问题合成答案表达式时,所述一个或多个计算机程序配置用于执行以下步骤:When the keyword information is combined into the question mentioned in the post, and the answer expression is synthesized according to the existing post and the question, the one or more computer programs are configured to perform the following steps:根据所述关键词向量组成帖子提及的问题的向量矩阵,根据所述已有的帖子及所述向量矩阵合成答案表达式。A vector matrix of questions mentioned in the post is formed according to the keyword vector, and an answer expression is synthesized according to the existing post and the vector matrix.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910078024.1A CN109871438A (en) | 2019-01-28 | 2019-01-28 | Problem answers recommended method, device, storage medium and server |
CN201910078024.1 | 2019-01-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2020155747A1 true WO2020155747A1 (en) | 2020-08-06 |
Family
ID=66918141
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/117166 WO2020155747A1 (en) | 2019-01-28 | 2019-11-11 | Method and apparatus for recommending answer to question, and storage medium and server |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN109871438A (en) |
WO (1) | WO2020155747A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988479A (en) * | 2020-08-20 | 2020-11-24 | 浙江企蜂信息技术有限公司 | Call information processing method and device, computer equipment and storage medium |
CN118193721A (en) * | 2024-05-17 | 2024-06-14 | 广州启盟信息科技有限公司 | Associated information recommendation system based on natural language processing |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109871438A (en) * | 2019-01-28 | 2019-06-11 | 平安科技(深圳)有限公司 | Problem answers recommended method, device, storage medium and server |
CN111488500B (en) * | 2020-03-19 | 2023-12-12 | 华南师范大学 | Medical problem information processing method, device and storage medium |
CN111696010A (en) * | 2020-05-28 | 2020-09-22 | 深圳市元征科技股份有限公司 | Scene-based training method, server, terminal device and storage medium |
CN111914153A (en) * | 2020-07-24 | 2020-11-10 | 广州中医药大学第一附属医院 | Follower method, follower system, server, and storage medium |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020169872A1 (en) * | 2001-05-14 | 2002-11-14 | Hiroshi Nomiyama | Method for arranging information, information processing apparatus, storage media and program tranmission apparatus |
CN105005564A (en) * | 2014-04-17 | 2015-10-28 | 北京搜狗科技发展有限公司 | Data processing method and apparatus based on question-and-answer platform |
CN105893391A (en) * | 2015-01-26 | 2016-08-24 | 阿里巴巴集团控股有限公司 | Intelligent answering method, apparatus and system, and electronic device |
CN108268450A (en) * | 2018-02-27 | 2018-07-10 | 百度在线网络技术(北京)有限公司 | For generating the method and apparatus of information |
CN109871438A (en) * | 2019-01-28 | 2019-06-11 | 平安科技(深圳)有限公司 | Problem answers recommended method, device, storage medium and server |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101178734A (en) * | 2007-12-06 | 2008-05-14 | 深圳市迅雷网络技术有限公司 | Method and device for reverting forum information |
CN104484465A (en) * | 2014-12-30 | 2015-04-01 | 康佳集团股份有限公司 | Method and system of fast assigning and replying messages in network community |
JP6649582B2 (en) * | 2016-02-23 | 2020-02-19 | 富士通株式会社 | Search control program, search control device, and search control method |
US20180150747A1 (en) * | 2016-11-27 | 2018-05-31 | International Business Machines Corporation | Enhancing Time-to-Answer for Community Questions in Online Discussion Sites |
-
2019
- 2019-01-28 CN CN201910078024.1A patent/CN109871438A/en active Pending
- 2019-11-11 WO PCT/CN2019/117166 patent/WO2020155747A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20020169872A1 (en) * | 2001-05-14 | 2002-11-14 | Hiroshi Nomiyama | Method for arranging information, information processing apparatus, storage media and program tranmission apparatus |
CN105005564A (en) * | 2014-04-17 | 2015-10-28 | 北京搜狗科技发展有限公司 | Data processing method and apparatus based on question-and-answer platform |
CN105893391A (en) * | 2015-01-26 | 2016-08-24 | 阿里巴巴集团控股有限公司 | Intelligent answering method, apparatus and system, and electronic device |
CN108268450A (en) * | 2018-02-27 | 2018-07-10 | 百度在线网络技术(北京)有限公司 | For generating the method and apparatus of information |
CN109871438A (en) * | 2019-01-28 | 2019-06-11 | 平安科技(深圳)有限公司 | Problem answers recommended method, device, storage medium and server |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111988479A (en) * | 2020-08-20 | 2020-11-24 | 浙江企蜂信息技术有限公司 | Call information processing method and device, computer equipment and storage medium |
CN111988479B (en) * | 2020-08-20 | 2021-04-20 | 浙江企蜂信息技术有限公司 | Call information processing method and device, computer equipment and storage medium |
CN118193721A (en) * | 2024-05-17 | 2024-06-14 | 广州启盟信息科技有限公司 | Associated information recommendation system based on natural language processing |
Also Published As
Publication number | Publication date |
---|---|
CN109871438A (en) | 2019-06-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020155747A1 (en) | Method and apparatus for recommending answer to question, and storage medium and server | |
US9558264B2 (en) | Identifying and displaying relationships between candidate answers | |
US9898554B2 (en) | Implicit question query identification | |
CN107992585B (en) | Universal label mining method, device, server and medium | |
JP6414956B2 (en) | Question generating device and computer program | |
US9679558B2 (en) | Language modeling for conversational understanding domains using semantic web resources | |
CN110704743B (en) | Semantic search method and device based on knowledge graph | |
US9767183B2 (en) | Method and system for enhanced query term suggestion | |
US9659004B2 (en) | Retrieval device and method | |
US20130304730A1 (en) | Automated answers to online questions | |
CN107690634B (en) | Automatic query pattern generation method and system | |
CN101868797A (en) | Cross-language search | |
US20140236941A1 (en) | Discovery engine | |
CN105550206B (en) | The edition control method and device of structured query sentence | |
CN111401033A (en) | Event extraction method, event extraction device and electronic equipment | |
CN110147494B (en) | Information searching method and device, storage medium and electronic equipment | |
CN111414122A (en) | Intelligent text processing method and device, electronic equipment and storage medium | |
CN112925898B (en) | Question-answering method and device based on artificial intelligence, server and storage medium | |
CN109804368A (en) | For providing the system and method for contextual information | |
CN111708800A (en) | Query method and device and electronic equipment | |
Lommatzsch et al. | An Information Retrieval-based Approach for Building Intuitive Chatbots for Large Knowledge Bases. | |
US20200159857A1 (en) | Transliteration of data records for improved data matching | |
JP6162134B2 (en) | Social page trigger | |
CN113254671A (en) | Atlas optimization method, device, equipment and medium based on query analysis | |
CN111126073B (en) | Semantic retrieval method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19912538 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19912538 Country of ref document: EP Kind code of ref document: A1 |