CN116955564A - Question answering method and device, electronic equipment and storage medium - Google Patents

Question answering method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116955564A
CN116955564A CN202310930178.5A CN202310930178A CN116955564A CN 116955564 A CN116955564 A CN 116955564A CN 202310930178 A CN202310930178 A CN 202310930178A CN 116955564 A CN116955564 A CN 116955564A
Authority
CN
China
Prior art keywords
information
text information
item
target
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310930178.5A
Other languages
Chinese (zh)
Inventor
李薿
骆金昌
陈坤斌
何伯磊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu International Technology Shenzhen Co ltd
Original Assignee
Baidu International Technology Shenzhen Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Baidu International Technology Shenzhen Co ltd filed Critical Baidu International Technology Shenzhen Co ltd
Priority to CN202310930178.5A priority Critical patent/CN116955564A/en
Publication of CN116955564A publication Critical patent/CN116955564A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/332Query formulation
    • G06F16/3329Natural language query formulation or dialogue systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/319Inverted lists

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Human Computer Interaction (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The disclosure provides a question and answer method, a question and answer device, electronic equipment and a storage medium, and relates to the technical field of artificial intelligence, in particular to the field of natural language processing. The specific implementation scheme is as follows: in response to receiving the original query information, recalling a plurality of item text information from the database in accordance with the original query information; determining a plurality of target text messages in the plurality of item text messages according to the evaluation values of the plurality of item text messages in the recall stage; determining response information aiming at the original query information according to the plurality of target text information and the object information with the association relation with each target text information; the association relation is obtained by extracting the relation between the object information of the object and the project text information of the project based on the project related document.

Description

Question answering method and device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of artificial intelligence, and more particularly, to the field of natural language processing, and more particularly, to a question-answering method, apparatus, electronic device, storage medium, and computer program product.
Background
Inside an enterprise, users sometimes need to query for persona information or project information, for example, to query for which employees a certain project is responsible for, and which projects a certain employee is responsible for. But the current information query efficiency is lower and the query cost is higher.
Disclosure of Invention
The present disclosure provides a question answering method, apparatus, electronic device, storage medium, and computer program product.
According to an aspect of the present disclosure, there is provided a question answering method, including: in response to receiving the original query information, recalling a plurality of item text information from the database in accordance with the original query information; determining a plurality of target text messages in the plurality of item text messages according to the evaluation values of the plurality of item text messages in the recall stage; determining response information aiming at the original query information according to the plurality of target text information and the object information with the association relation with each target text information; the association relation is obtained by extracting the relation between the object information of the object and the project text information of the project based on the project related document.
According to another aspect of the present disclosure, there is provided a question answering apparatus, including: the system comprises a recall module, a target text information determining module and a response information determining module. The recall module is used for recalling a plurality of item text information from the database according to the original query information in response to receiving the original query information. The target text information determining module is used for determining a plurality of target text information in the plurality of item text information according to the evaluation values of the plurality of item text information in the recall stage. The response information determining module is used for determining response information aiming at the original query information according to the plurality of target text information and the object information with the association relation with each target text information; the association relation is obtained by extracting the relation between the object information of the object and the project text information of the project based on the project related document.
According to another aspect of the present disclosure, there is provided an electronic device including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the methods provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method provided by the present disclosure.
According to another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method provided by the present disclosure.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
fig. 1 is an application scenario schematic diagram of a question-answering method and apparatus according to an embodiment of the present disclosure;
FIG. 2 is a schematic flow chart of a question-answering method according to an embodiment of the present disclosure;
FIG. 3A is a schematic flow chart of a question-answering method according to another embodiment of the present disclosure;
FIG. 3B is a schematic diagram of a question-answering method according to an embodiment of the present disclosure;
fig. 4 is a schematic block diagram of a question-answering apparatus according to an embodiment of the present disclosure; and
fig. 5 is a block diagram of an electronic device for implementing the question-answering method of the embodiments of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Inside an enterprise, users sometimes need to query for persona information or project information, for example, to query for which employees a certain project is responsible for, and which projects a certain employee is responsible for.
In some embodiments, basic information, content histories, item information, etc. of staff can be mined from massive materials, then character information and item information are associated in a map, and then information inquiry is performed based on the map. It will be appreciated that the profile needs to be constructed based on the material and that the profile is not updated in real time, and therefore if the profile is not updated in time, the user may be given obsolete information. In addition, if the map lacks relevant information, users need to manually search information such as project relevant people from a large amount of data, and the problems of low efficiency and high time cost exist.
The embodiment of the disclosure aims to provide a question-answering method in an enterprise office scene, which does not need to rely on the content of a map for information retrieval, so that the map is not required to be constructed, and the method can directly integrate the content of effective information according to the problem (original query information) of a user, does not need to manually search data by the user, thereby improving the information query efficiency and reducing the time cost of the user.
The method provided by the embodiment is suitable for enterprise internal knowledge management, and can help users to search information such as project responsible persons, enterprise internal related personnel project experiences and the like. The part of the technical proposal can also be used as a character introduction writing auxiliary tool to help a user to quickly acquire character information.
The technical solutions provided by the present disclosure will be described in detail below with reference to the accompanying drawings and specific embodiments.
Fig. 1 is an application scenario schematic diagram of a question answering method and apparatus according to an embodiment of the present disclosure.
It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, a system architecture 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used as a medium to provide communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired and/or wireless communication links, and the like.
The user may interact with the server 105 via the network 104 using the terminal devices 101, 102, 103 to receive or send messages or the like. The terminal devices 101, 102, 103 may be a variety of electronic devices having a display screen and supporting web browsing, including but not limited to smartphones, tablets, laptop and desktop computers, and the like.
The server 105 may be a server providing various services, such as a background management server (by way of example only) providing support for websites browsed by users using the terminal devices 101, 102, 103. The background management server may analyze and process the received data such as the user request, and feed back the processing result (for example, response information determined according to the original query information input by the user) to the terminal device.
It should be noted that, the question-answering method provided by the embodiments of the present disclosure may be generally executed by the server 105. Accordingly, the question answering apparatus provided by the embodiments of the present disclosure may be generally provided in the server 105. The question-answering method provided by the embodiments of the present disclosure may also be performed by a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105. Accordingly, the question answering apparatus provided by the embodiments of the present disclosure may also be provided in a server or a server cluster that is different from the server 105 and is capable of communicating with the terminal devices 101, 102, 103 and/or the server 105.
It should be understood that the number of terminal devices, networks and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 is a schematic flow chart of a question-answering method according to an embodiment of the present disclosure.
As shown in fig. 2, the question answering method 200 may include operations S210 to S230.
In response to receiving the original query information, a plurality of item text information is recalled from the database according to the original query information in operation S210.
For example, the user may input the original query information through the front-end page, and the original query information may be text information, for example, "who is responsible for XX items", "what is responsible for XX colleagues last month".
For example, a plurality of item text information may be stored in a database, a similarity between the original query information and the item text information may be determined, or a similarity between a vector of the original query information and a vector of the item text information may be determined, and then the plurality of item text information may be recalled from the data based on the similarity ranking.
In operation S220, a plurality of target text information among the plurality of item text information is determined according to the evaluation values of the plurality of item text information at the recall stage.
For example, during recall, item text information corresponds to an evaluation value, and the similarity or other confidence may be used as the evaluation value. For example, the evaluation values may be ranked, and a predetermined number of text information ranked first may be regarded as target text information. The evaluation value may also be processed by a predetermined ranking algorithm, and ranking information may be obtained, and the ranking algorithm is not limited in this embodiment based on the ranking that wants to determine the target text information.
In operation S230, response information to the original query information is determined according to the plurality of target text information and object information having an association relationship with each target text information.
By way of example, the project-related documents are resources within the enterprise, and the project-related documents may be documents that record information related to the project, such as meeting documents, knowledge base documents, weekly reports, work cards, employee profiles, and the like, of the enterprise content. The association between the object information of the object and the project text information of the project can be extracted based on the project related document, and the association of the object information and the project text information can be characterized: the object indicated by the object information participates in the item indicated by the item text information.
For example, the answer information may be text information, for example, question answer information "the responsible person of the XX project is XX colleagues", "the XX colleagues have XX in the work in which they participated in during the time", and the like.
The technical scheme provided by the embodiment of the disclosure carries out recall based on original query information input by a user, then determines target text information from recalled item text information, and further determines response information based on the target text information and associated object information. According to the technical scheme, information retrieval is not needed depending on the content of the map, so that the map is not needed to be constructed, the method can directly integrate the content of the effective information according to the original query information of the user, and the user does not need to manually search the data, so that the information query efficiency is improved, and the time cost of the user is reduced.
Fig. 3A is a schematic flow chart of a question-answering method according to another embodiment of the present disclosure.
As shown in fig. 3A, in the present embodiment, the question-answering method 300 may include operations S340 to S350, operations S311 to S314, operations S32 to S322, and operations S331 to S332.
In operation S340, an association relationship between object information of an object and item text information of an item is extracted based on the item-related document.
For example, the object information of the object may include author information of an author of the project related document. The association relationship between the object information and the project text information may be determined based on the author of the project related document. For example, a certain project document includes at least one project text information describing a certain project, while a certain object performs editing, writing, etc. of the project-related document, so that it can be determined that there is an association between the project text information and object information of the object.
For another example, the object information of the object may include responsible person information of the responsible person of the project. The association relationship between the object information and the item text information may be determined based on the content of the item-related document. For example, a project document includes at least one project text information describing a project, the project text information may describe which employees the project is responsible for, and the project related document may be processed by using a deep learning model, so as to obtain an association relationship between object information and the project text information, where the deep learning model may be a model for extracting triples, and the deep learning model is not limited in this embodiment. In other embodiments, the association relationship between the object information and the item text information may also be determined based on a regular matching manner, for example, the pre-device regular rule is: "project name" responsible for "person name" when content responsible for the canonical rule appears in the project-related document, it is determined that "person name" in the content is associated with "project name".
In operation S350, a database is constructed based on the project-related documents.
The database may include a first database, which may include an Elastic Search or other Search engine that may store data in an inverted index. For example, item text information may be extracted from the item-related document based on the manner of tag extraction for subsequent recall of useful item text information from the database. For example, text content in a project-related document may be divided into at least one paragraph, and each paragraph may then be referred to as a project text message. Keywords may be extracted from the item text information and then an inverted index between the keywords and the item text information may be established, the inverted index characterizing a mapping relationship between the keywords and the item text information.
The database may include a second database that may store vector information for the item text information. For example, the project text information may be converted into a vector after the project text information is obtained based on the project related documents.
It should be noted that the database may include a first database and a second database, and in the subsequent recall process, recall may be performed from the two databases, so as to ensure completeness of the item text information after recall. In other embodiments, the database may include any one of a first database and a second database. It should be noted that incremental data may be added to the database at intervals to update the database.
In operation S311, target query information is determined according to the original query information.
For example, the original query information may include text information entered by a user, and the original query information may be determined as target query information.
For example, the original query information may be rewritten to obtain rewritten query information. The rewriting operation may include extracting keywords from the original query information, for example, may include performing word segmentation on the original query information, and determining the keywords obtained by the word segmentation as rewritten query information. The rewrite operation may also include a process such as performing a synonym transformation on the keyword. The rewritten query information may be determined as target query information. The rewriting operation can extract the effective information in the original query information, thereby improving the recall accuracy and recall effect.
For another example, both the original query information and the rewritten query information may be determined as target query information, so that recall is performed based on the original query information and the rewritten query information, respectively, and the number of recalled item text information is increased.
In operation S312, a plurality of first item text information is recalled in the first database according to the target query information.
For example, the first database stores the keywords and the item text information in an inverted index manner, so that the similarity between the target query information and the keywords can be determined, and then the item text information corresponding to the keywords with the similarity greater than or equal to the threshold value is recalled, and the item text information is called as the first item text information.
In operation S313, a plurality of vector information is recalled in the second database according to the target query information.
For example, the target query information may be converted into vectors, then the similarity between the vector of the target query information and each vector in the second database is determined, and the vectors having the similarity greater than or equal to a threshold are recalled, and the recalled vectors are respectively corresponding to item text information, which is referred to as second item text information.
In operation S314, a plurality of item text information is determined according to the plurality of first item text information and the plurality of second item text information corresponding to the plurality of vector information.
For example, the plurality of first item text information and the plurality of second item text information may be deduplicated, and the deduplicated information may be used as the plurality of item text information.
In operation S321, the plurality of first item text information and the plurality of second item text information are ranked according to the target query information, the plurality of first item text information, the plurality of second item text information, the evaluation values of the plurality of first item information in the recall stage, and the evaluation values of the plurality of second item information in the recall stage, to obtain ranking information.
For example, in the recall process in the first database and the second database, the evaluation value of each item text information recalled may be determined. The ranking may be based on the evaluation values of the recall phases.
For example, a dataset may be constructed and then a ranking model may be trained based on the training set, e.g., each training sample in the dataset may include target query information, item text information, recall evaluation values for the item text information, and sample tags may be in order. And then inputting the target query information, the plurality of first item text information, the plurality of second item text information, the plurality of evaluation values of the first item information in the recall stage and the plurality of evaluation values of the second item information in the recall stage into a trained ranking model, and outputting the ranking information by the ranking model. The sequencing model can reduce sequencing time consumption, and relevant information is primarily screened, so that the information length is within the prompt information (prompt) length required by the question-answer model. For example, the ranking model may be XGBoost (gradient boost decision tree, extreme Gradient Boosting).
For another example, the ranking may be performed without using a model, for example, a first weight of the first item text information and a second weight of the second item text information are configured, then a product of the first weight of the first item text information and an evaluation value of the recall stage is used as a ranking evaluation value of the first item text information, a product of the second weight of the second item text information and an evaluation value of the recall stage is used as a ranking evaluation value of the second item text information, and then the ranking evaluation values are ranked to obtain the ranking information.
In operation S322, a plurality of target item information is determined from the plurality of first item information and the plurality of second item information according to the ranking information.
For example, a predetermined number of item information ranked first may be selected as the target item information based on the ranking information.
In operation S331, target prompt information is constructed according to the original query information, the plurality of target text information, object information having an association relationship with each target text information, attribute information for each target text information, and initial prompt information.
For example, the initial prompt may be a piece of text information in natural language, and the initial prompt may characterize a task that the question-answering model needs to complete, e.g., the initial prompt is "answer according to the provided content, determine a person related to the item, or determine an item for which the person is responsible. If the user's question cannot be answered according to the provided content, predetermined information is output, which is temporarily unresponsive. The contents provided are as follows: "Water-soluble polymers" are known.
For example, the attribute information may include time information, the time information may characterize the time of generation of the target text information, the current time, the time required by the user, and the time of generation of the target text information may be input into the question-answer model, so that the question-answer model performs information filtering based on the time information, and the timeliness of the answer information output by the question-answer model is better
For example, the attribute information may include source information, which may include a database source that characterizes whether the target text information originated from the first database or the second database. The source information may include a document source that characterizes from which project-related document the target text information originated.
For example, the attribute information may include at least one of an evaluation value of the target text information at the recall stage, and ranking information.
In operation S332, the target prompt information is input into the question-answer model, and the question-answer model outputs answer information.
For example, the question-answering model may be a large language model (Large Language Model, LLM) that may be utilized to understand and summarize the capabilities of the question-answering model to provide more desirable results to the user. In the processing process, not only the text information such as the original query information and a plurality of target text information is provided for the question-answer model, but also attribute information such as the recalled evaluation value, source information, time information and the like is provided for the question-answer model, so that the large model obtains sufficient information and summarizes based on the information, and more accurate response information is determined, wherein the response information can be a text segment which is answered according to the original query information of the user.
It should be noted that, operations S340 to S350 may be performed offline, the rest of the operations may be performed online, operation S340 may be performed before operation S331, and operation S350 may be performed before operation S311.
Fig. 3B is a schematic diagram of a question-answering method according to an embodiment of the present disclosure.
As shown in fig. 3B, in the offline stage, the association relationship between the object information 309 of the object and the item text information of the item may be extracted based on the item-related document 301, and the tag extraction may be performed on the item-related document 301 to obtain the item text information, so as to construct a first database, where the first data may be an index library 302, and an inverted index between the keyword and the item text information is stored in the index library 302. The item text information may also be converted into vectors, thereby constructing a second database, which may be the vector library 303.
In the online stage, after the original query information 304 input by the user is acquired, the original query information 304 may be rewritten, so as to obtain rewritten query information 305. Next, based on each of the original query information 304 and the rewritten query information 305, the first item text information is recalled from the index library 302, and vectors corresponding to the second item text information are recalled from the vector library 303, combining the first item text information and the second item text information into a plurality of item text information 306. Next, the plurality of item text information 306 is ranked, and a predetermined number of information in the top ranking is selected therefrom as target text information 307.
Next, target prompt information may be constructed based on the original query message 304, the target text information 307, the attribute information 308, the object information 309 associated with the target text information 307, the initial prompt information 310, and the like, and the target prompt information is input into the question-answer model 311, and the question-answer model 311 outputs the answer information 312.
Fig. 4 is a schematic block diagram of a question answering apparatus according to an embodiment of the present disclosure.
As shown in fig. 4, the question and answer apparatus 400 may include a recall module 410, a target text information determination module 420, and an answer information determination module 430.
The recall module 410 is configured to recall, in response to receiving the original query information, a plurality of item text information from the database in accordance with the original query information.
The target text information determining module 420 is configured to determine a plurality of target text information in the plurality of item text information according to the evaluation values of the plurality of item text information in the recall stage.
The response information determining module 430 is configured to determine response information for the original query information according to the plurality of target text information and object information having an association relationship with each of the target text information; the association relation is obtained by extracting the relation between the object information of the object and the project text information of the project based on the project related document.
According to another embodiment of the present disclosure, a recall module includes: the device comprises a first determining sub-module, a first recall sub-module, a second recall sub-module and a second determining sub-module. The first determining submodule is used for determining target query information according to the original query information. The first recall sub-module is used for recalling a plurality of first item text information in a first database according to the target query information, and the first database stores the mapping relation between the keywords and the item text information. The second recall sub-module is used for recalling a plurality of vector information in a second database according to the target query information, and the second database stores the vector information aiming at the project text information. The second determining submodule is used for determining a plurality of item text information according to the first item text information and the second item text information corresponding to the vector information.
According to another embodiment of the present disclosure, the target text information determination module includes: a sorting sub-module and a third determination sub-module. The sorting submodule is used for sorting the first item text information and the second item text information according to the target query information, the first item text information, the second item text information, the evaluation values of the first item information in the recall stage and the evaluation values of the second item information in the recall stage to obtain sorting information. The third determination submodule is used for determining a plurality of target item information from the plurality of first item information and the plurality of second item information according to the sorting information.
According to another embodiment of the present disclosure, the first determination submodule includes: a rewriting unit and a determining unit. The rewriting unit is used for rewriting the original query information to obtain rewritten query information. The determining unit is used for determining the original query information and the rewritten query information as target query information respectively.
According to another embodiment of the present disclosure, the answer information determination module includes: and constructing a sub-module and an input sub-module. The construction sub-module is used for constructing target prompt information according to the original query information, the plurality of target text information, the object information with the association relation with each target text information, the attribute information aiming at each target text information and the initial prompt information. The input submodule is used for inputting the target prompt information into a question-answer model, and the question-answer model outputs answer information.
According to another embodiment of the present disclosure, the attribute information for each target text information includes at least one of: the evaluation value, ranking information, time information and source information at recall stage for each target text information.
According to another embodiment of the present disclosure, the object information having an association relationship with the item text information includes at least one of: the person in charge of the project, the author information of the author of the project-related document.
According to an embodiment of the present disclosure, the present disclosure also provides an electronic device including at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the question-answering method described above.
According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the above-described question-answering method.
According to an embodiment of the present disclosure, the present disclosure also provides a computer program product comprising a computer program which, when executed by a processor, implements the question-answering method described above.
Fig. 5 is a block diagram of an electronic device for implementing the question-answering method of the embodiments of the present disclosure. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein.
As shown in fig. 5, the apparatus 500 includes a computing unit 501 that can perform various suitable actions and processes according to a computer program stored in a Read Only Memory (ROM) 502 or a computer program loaded from a storage unit 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, ROM 502, and RAM503 are connected to each other by a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.
Various components in the device 500 are connected to the I/O interface 505, including: an input unit 506 such as a keyboard, a mouse, etc.; an output unit 507 such as various types of displays, speakers, and the like; a storage unit 508 such as a magnetic disk, an optical disk, or the like; and a communication unit 509 such as a network card, modem, wireless communication transceiver, etc. The communication unit 509 allows the device 500 to exchange information/data with other devices via a computer network such as the internet and/or various telecommunication networks.
The computing unit 501 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 501 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the respective methods and processes described above, such as a question-answering method. For example, in some embodiments, the question answering method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 500 via the ROM 502 and/or the communication unit 509. When the computer program is loaded into RAM503 and executed by computing unit 501, one or more steps of the question-answering method described above can be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the question-answering method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), complex Programmable Logic Devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), and the internet.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps recited in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the disclosed aspects are achieved, and are not limited herein.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
In the technical scheme of the disclosure, the authorization or consent of the user is obtained before the personal information of the user is obtained or acquired.
The above detailed description should not be taken as limiting the scope of the present disclosure. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present disclosure are intended to be included within the scope of the present disclosure.

Claims (17)

1. A question-answering method, comprising:
in response to receiving the original query information, recalling a plurality of item text information from a database in accordance with the original query information;
determining a plurality of target text information in the plurality of item text information according to the evaluation values of the plurality of item text information in the recall stage; and
determining response information aiming at the original query information according to the plurality of target text information and object information with association relation with each target text information;
the association relation is obtained by extracting the relation between the object information of the object and the project text information of the project based on the project related document.
2. The method of claim 1, wherein recalling a plurality of item text information from a database in accordance with the original query information comprises:
determining target query information according to the original query information;
recalling a plurality of first item text information in a first database according to the target query information, wherein the first database stores mapping relations between keywords and the item text information;
recalling a plurality of vector information in a second database according to the target query information, wherein the second database stores vector information aiming at project text information; and
and determining the plurality of item text information according to the plurality of first item text information and the plurality of second item text information corresponding to the plurality of vector information.
3. The method of claim 2, wherein the determining a plurality of target text information in the plurality of item text information based on the evaluation values of the plurality of item text information at the recall stage comprises:
sorting the plurality of first item text information and the plurality of second item text information according to the target query information, the plurality of first item text information, the plurality of second item text information, the evaluation values of the plurality of first item information in the recall stage and the evaluation values of the plurality of second item information in the recall stage to obtain sorting information; and
and determining the target item information from the first item information and the second item information according to the sorting information.
4. The method of claim 2, wherein the determining target query information from the original query information comprises:
rewriting the original query information to obtain rewritten query information; and
and respectively determining the original query information and the rewritten query information as the target query information.
5. The method of any one of claims 1 to 4, wherein the determining response information to the original query information according to the plurality of target text information and object information having an association relationship with each target text information includes:
constructing target prompt information according to the original query information, the plurality of target text information, object information with association relation with each target text information, attribute information aiming at each target text information and initial prompt information; and
and inputting the target prompt information into a question-answer model, and outputting the answer information by the question-answer model.
6. The method of claim 5, wherein the attribute information for each target text information includes at least one of: the evaluation value, ranking information, time information and source information at recall stage for each target text information.
7. The method of claim 1, wherein the object information having an association relationship with the item text information includes at least one of: the person in charge of the project, the author information of the author of the project-related document.
8. A question answering apparatus comprising:
the recall module is used for recalling a plurality of item text information from the database according to the original query information in response to receiving the original query information;
the target text information determining module is used for determining a plurality of target text information in the plurality of item text information according to the evaluation values of the plurality of item text information in the recall stage; and
the response information determining module is used for determining response information aiming at the original query information according to the plurality of target text information and object information with association relation with each target text information;
wherein the association relation is based on project related documents, and the object information of the object is extracted
The relationship between the information and the item text information of the item is obtained.
9. The apparatus of claim 8, wherein the recall module comprises:
the first determining submodule is used for determining target query information according to the original query information;
the first recall sub-module is used for recalling a plurality of first item text information in a first database according to the target query information, and the first database stores the mapping relation between the keywords and the item text information;
the second recall sub-module is used for recalling a plurality of vector information in a second database according to the target query information, and the second database stores the vector information aiming at the project text information; and
and the second determining submodule is used for determining the plurality of item text information according to the plurality of first item text information and the plurality of second item text information corresponding to the plurality of vector information.
10. The apparatus of claim 9, wherein the target text information determination module comprises:
the sorting sub-module is used for sorting the plurality of first item text information and the plurality of second item text information according to the target query information, the plurality of first item text information, the plurality of second item text information, the evaluation values of the plurality of first item information in the recall stage and the evaluation values of the plurality of second item information in the recall stage to obtain sorting information; and
and a third determining sub-module for determining the plurality of target item information from the plurality of first item information and the plurality of second item information according to the ranking information.
11. The apparatus of claim 9, wherein the first determination submodule comprises:
the rewriting unit is used for rewriting the original query information to obtain rewritten query information; and
and the determining unit is used for determining the original query information and the rewritten query information as the target query information respectively.
12. The apparatus according to any one of claims 8 to 11, wherein the answer information determination module comprises: the construction sub-module is used for constructing target prompt information according to the original query information, the plurality of target text information, object information with association relation with each target text information, attribute information aiming at each target text information and initial prompt information; and
and the input sub-module is used for inputting the target prompt information into a question-answer model, and the question-answer model outputs the answer information.
13. The apparatus of claim 12, wherein the attribute information for each target text information comprises at least one of: the evaluation value, ranking information, time information and source information at recall stage for each target text information.
14. The apparatus of claim 8, wherein the object information having an association relationship with the item text information includes at least one of: the person in charge of the project, the author information of the author of the project-related document.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 7.
16. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1 to 7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 7.
CN202310930178.5A 2023-07-27 2023-07-27 Question answering method and device, electronic equipment and storage medium Pending CN116955564A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310930178.5A CN116955564A (en) 2023-07-27 2023-07-27 Question answering method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310930178.5A CN116955564A (en) 2023-07-27 2023-07-27 Question answering method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116955564A true CN116955564A (en) 2023-10-27

Family

ID=88460000

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310930178.5A Pending CN116955564A (en) 2023-07-27 2023-07-27 Question answering method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116955564A (en)

Similar Documents

Publication Publication Date Title
EP3958145A1 (en) Method and apparatus for semantic retrieval, device and storage medium
CN114595686B (en) Knowledge extraction method, and training method and device of knowledge extraction model
CN114610845B (en) Intelligent question-answering method, device and equipment based on multiple systems
CN112507098B (en) Question processing method, question processing device, electronic equipment, storage medium and program product
CN113239295A (en) Search method, search device, electronic equipment and storage medium
CN114861889A (en) Deep learning model training method, target object detection method and device
CN112989023A (en) Label recommendation method, device, equipment, storage medium and computer program product
CN112883248A (en) Information pushing method and device and electronic equipment
EP3992814A2 (en) Method and apparatus for generating user interest profile, electronic device and storage medium
CN112506864B (en) File retrieval method, device, electronic equipment and readable storage medium
CN114428902A (en) Information searching method and device, electronic equipment and storage medium
CN114064925A (en) Knowledge graph construction method, data query method, device, equipment and medium
CN114116997A (en) Knowledge question answering method, knowledge question answering device, electronic equipment and storage medium
CN116597443A (en) Material tag processing method and device, electronic equipment and medium
CN116955856A (en) Information display method, device, electronic equipment and storage medium
CN117112595A (en) Information query method and device, electronic equipment and storage medium
CN113704494B (en) Entity retrieval method, device, equipment and storage medium based on knowledge graph
CN113722593B (en) Event data processing method, device, electronic equipment and medium
CN116955564A (en) Question answering method and device, electronic equipment and storage medium
CN114281990A (en) Document classification method and device, electronic equipment and medium
CN113326438A (en) Information query method and device, electronic equipment and storage medium
CN116610782B (en) Text retrieval method, device, electronic equipment and medium
CN113656393B (en) Data processing method, device, electronic equipment and storage medium
CN113377922B (en) Method, device, electronic equipment and medium for matching information
CN113377921B (en) Method, device, electronic equipment and medium for matching information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination