Problem processing method, device and equipment based on AI, RPA and AI Agent
Based on AI, RPA, and AI Agent, the problem of difficulty and complicated model training of document information extraction data is solved, and efficient and accurate answers are achieved, and the technical threshold is reduced.
Patent Information
- Application Number
- CN202411482376.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-22
- Publication Date
- 2025-01-21
AI Technical Summary
The prior art faces problems of difficulty in obtaining high-quality labeled data, complex model training and tuning, and high technical threshold in document information extraction.
Based on AI, RPA, and AI Agent, it is used to split treatment, obtain target sentence vector, identify the types of problems, determine similar document fragments from the candidate document clip, and generate reply answers.
There is no need for a large amount of labeled data to train the model, which reduces application costs and technical thresholds, and improves the efficiency and accuracy of answer generation.
Smart Images

Figure CN119337878A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of artificial intelligence (AI), robotic process automation (RPA) and artificial intelligence agent (AI agent), and in particular to a problem handling method, device and equipment based on AI, RPA and AI agent. Background Art
[0002] Robotic Process Automation (RPA) uses specific "robot software" to simulate human operations on computers and automatically execute process tasks according to rules.
[0003] Artificial Intelligence (AI) is a technical science that studies and develops theories, methods, technologies and application systems for simulating, extending and expanding human intelligence.
[0004] The Artificial Intelligence Agent (AI Agent) of the digital labor platform can perceive the environment, make decisions and perform actions. The difference from traditional artificial intelligence is that it has the ability to think and act independently and can call tools to complete given goals. AI Agent is based on Large Language Models (LLM) as its core computing engine, which enables it to have conversations, perform tasks, reason and show a certain degree of autonomy. It has the ability to understand, perceive, plan, remember and use tools independently, and can automatically perform complex tasks. Specifically, AI Agent, an intelligent assistant composed of multiple AI capabilities driven by LLM, can interact with employees in natural language, understand employees' instructions and needs, and provide feedback and responses; it can master domain knowledge related to the business to complete complex professional work; it can decompose complex tasks into several executable tasks and use data and tools to complete tasks; it can also collaborate with employees, and AI Agents can also collaborate to complete complex tasks, so as to enable digital employees to achieve a leap from automation to intelligence, help employees complete their work more efficiently, and fully realize human-machine collaboration.
[0005] With the rapid development of informatization, the importance of document processing and information extraction in enterprise automation processes has become increasingly prominent. Especially when dealing with long documents in the fields of law, finance, business, etc., such as contract documents, the traditional way of manually reading, analyzing and extracting key information is not only inefficient, but also prone to errors, and it is difficult to meet the needs of large-scale data processing. In order to overcome these challenges, machine learning methods in AI technology have emerged, providing a new solution for automatically extracting the key information required by users (such as Party A, Party B, payment method, etc.) from long documents.
[0006] Specifically, by using labeled data to train classifiers or sequence labeling models, the trained models can accurately capture the language patterns and structural features in long documents, thereby automatically extracting key information without relying on human intervention.
[0007] However, although machine learning methods have shown great potential in document information extraction, their practical application still faces a series of challenges. First, high-quality annotated data is the basis for training efficient models, but the acquisition and annotation process of annotated data is not only time-consuming and labor-intensive, but also costly; secondly, the training and tuning process of the model is also relatively complex, requiring deep professional knowledge and rich practical experience, which raises the technical and application thresholds. Summary of the invention
[0008] The embodiment of the present application provides a problem processing method, device and equipment based on AI, RPA and AI Agent to solve one of the technical problems existing in the related technology. The technical solution is as follows:
[0009] In a first aspect, an embodiment of the present application provides a problem handling method based on AI, RPA, and AI Agent, including:
[0010] Split the problem to be processed into at least one first problem;
[0011] Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs;
[0012] Based on multiple target sentence vectors, determine a target document segment similar to any first question from multiple candidate document segments; wherein the candidate document segment is obtained by segmenting the document content;
[0013] Generate a reply answer to any first question according to each target document segment and question type, so as to reply to the question to be processed based on the reply answer to each first question.
[0014] In a second aspect, an embodiment of the present application provides a problem processing device based on AI, RPA, and AI Agent, including:
[0015] A splitting module, used for splitting the problem to be processed to obtain at least one first problem;
[0016] A processing module, used to obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs;
[0017] A determination module, configured to determine a target document segment similar to any first question from a plurality of candidate document segments based on a plurality of target sentence vectors; wherein the candidate document segment is obtained by segmenting the document content;
[0018] A generation module, used for generating a response answer to any first question according to each target document fragment and question type;
[0019] The reply module is used to reply to the pending questions based on the reply answers to the first questions.
[0020] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising: a memory and a processor. The memory and the processor communicate with each other through an internal connection path, the memory is used to store instructions, the processor is used to execute the instructions stored in the memory, and when the processor executes the instructions stored in the memory, the processor executes the method in any one of the above-mentioned embodiments.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program runs on a computer, the method in any one of the above-mentioned embodiments is executed.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the method in any one of the above-mentioned embodiments when executed by a processor.
[0023] The advantages or beneficial effects of the above technical solution include at least:
[0024] There is no need to use a large amount of labeled data to train machine learning models (such as classifiers or sequence labeling models), and the trained machine learning models can be used to extract the key information required by users (i.e. the answers corresponding to the questions to be processed) from the document content, which can reduce application costs, technical barriers and application barriers. In addition, AI, RPA and AIAgent technologies can be used to extract answers from document content that match the intent of the questions to be processed, which can improve the efficiency and accuracy of answer generation.
[0025] The above summary is for illustrative purposes only and is not intended to be limiting in any way. In addition to the illustrative aspects, embodiments and features described above, further aspects, embodiments and features of the present application will be readily apparent by reference to the accompanying drawings and the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] In the accompanying drawings, unless otherwise specified, the same reference numerals throughout the multiple drawings represent the same or similar parts or elements. These drawings are not necessarily drawn to scale. It should be understood that these drawings only depict some embodiments disclosed in the present application and should not be regarded as limiting the scope of the present application.
[0027] Figure 1 This is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by an embodiment of the present application;
[0028] Figure 2 is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application;
[0029] Figure 3 is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application;
[0030] Figure 4 is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application;
[0031] Figure 5 This is a schematic diagram of the construction process of a document vector library provided by an embodiment of the present application;
[0032] Figure 6 This is a schematic diagram of the analysis process of a user question provided by an embodiment of the present application;
[0033] Figure 7 It is a schematic diagram of the processing flow of the output result of LLM by the AI Agent provided in one embodiment of the present application;
[0034] Figure 8 is a structural diagram of a problem processing device based on AI, RPA and AI Agent provided by an embodiment of the present application;
[0035] Fig. 9 A structural block diagram of an electronic device according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0036] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application, and cannot be understood as limiting the present application.
[0037] In related technologies, the following two methods are mainly used to extract the key information required by users from documents:
[0038] The first type, rule and template matching, uses predefined rules and templates to identify and extract specific types of key information in documents. These rules are usually written manually by technicians and are applicable to specific fields.
[0039] The second is the machine learning method: using labeled data to train a classifier or sequence labeling model (such as Conditional Random Field (CRF)), and using the trained model to identify and extract the key information needed by users in the document.
[0040] However, the first method mentioned above has at least the following disadvantages:
[0041] The first is poor flexibility: rules and templates are usually written manually by technicians and are applicable to documents in specific fields and formats. When the document format or the field to which the document belongs changes, the rules need to be rewritten or adjusted.
[0042] Second, high maintenance costs: As data volume and complexity increase, maintaining and updating rules becomes increasingly difficult and time-consuming.
[0043] The third is poor scalability: it is difficult to handle unforeseen new types of information or complex language structures.
[0044] Fourth, limited coverage: rules and templates may not cover all possible situations, resulting in limited accuracy and completeness of information extraction.
[0045] The second method mentioned above has at least the following problems:
[0046] First, it is highly data-dependent: a large amount of labeled data is required to train the model, and the acquisition and labeling process of labeled data is time-consuming and expensive.
[0047] Second, model complexity: The model training and tuning process is complex and requires expertise and experience.
[0048] The third one is limited generalization ability: the model may perform well on labeled data, but may perform poorly on unseen data, especially when the data distribution changes.
[0049] In order to solve at least one of the above-mentioned problems, the embodiments of the present application propose a problem-solving method, device and equipment based on artificial intelligence (AI), robotic process automation (RPA) and digital labor platform intelligent assistant (AIAgent). These and other aspects of the embodiments of the present application will be clear with reference to the following description and drawings. In these descriptions and drawings, some specific implementations in the embodiments of the present application are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present application, but it should be understood that the scope of the embodiments of the present application is not limited thereto. On the contrary, the embodiments of the present application include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0050] Before describing the embodiments of the present application in detail, in order to facilitate understanding, common technical terms are first introduced:
[0051] In the description of the present application, the term "plurality" refers to two or more.
[0052] In the description of this application, the term "OCR" is the abbreviation of Optical Character Recognition, which specifically refers to the process in which an electronic device examines characters printed on paper, determines their shapes by detecting dark and light patterns, and then translates the shapes into computer text using character recognition methods; that is, for printed characters, an optical method is used to convert the text in a paper document into a black and white dot matrix image file, and recognition software is used to convert the text in the image into a text format for further editing and processing by word processing software.
[0053] In the description of this application, the term "query to be processed" refers to a question (query) input by a user, wherein the input method of the question to be processed includes but is not limited to: touch input (such as sliding, clicking, etc.), keyboard input, voice input, etc.
[0054] In the description of this application, the term "sentence vector" refers to a vector (Embedding) obtained by embedding a query.
[0055] In the description of this application, the term "question type" refers to the category obtained by classifying the first question, and the question type is used to indicate the type of answer corresponding to the first question or the language unit corresponding to the answer (including but not limited to words, phrases, sentences, text segments, etc.).
[0056] In the description of this application, the term "candidate document fragment" is obtained by segmenting the document content, wherein there is no restriction on the segmentation granularity of the candidate document fragment, for example, it can be segmented by paragraphs, by tables, by chapters, and so on.
[0057] There is no restriction on the method of obtaining the document. For example, the document can be uploaded by the user, or the document can be collected online through web crawler technology, etc.
[0058] There is no restriction on the document format of each document. For example, the document format includes but is not limited to: Word, Portable Document Format (PDF) and other formats.
[0059] In the description of the present application, the term "synonymous question" refers to a question having the same meaning as the first question.
[0060] In the description of this application, the term "document vector" refers to a vector obtained by embedded encoding a candidate document segment.
[0061] In the description of this application, the term "specified element" refers to a pre-set element, including but not limited to: a title, a header, and other elements.
[0062] In the description of this application, the term "reference document fragment" refers to a candidate document fragment that is located in the same document as a specified element.
[0063] In the description of this application, the term "associated document fragment" refers to a candidate document fragment associated with a specified element. For example, taking the specified element as a title as an example, the associated document fragment may be the paragraph under the title; for another example, taking the specified element as a table header or table caption as an example, the associated document fragment may be the table body.
[0064] In the description of this application, the term "first document fragment" refers to a candidate document fragment associated with a target document fragment.
[0065] In the description of this application, the term "second document fragment" refers to a candidate document fragment that is located in the same document as the target document fragment.
[0066] In the description of the present application, the term "third document fragment" refers to a candidate document fragment located above the target document fragment, and / or a candidate document fragment located below the target document fragment.
[0067] These and other aspects of the embodiments of the present application will be apparent with reference to the following description and accompanying drawings. In these descriptions and accompanying drawings, some specific implementations in the embodiments of the present application are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present application, but it should be understood that the scope of the embodiments of the present application is not limited thereto. On the contrary, the embodiments of the present application include all changes, modifications and equivalents that fall within the spirit and connotation of the appended claims.
[0068] The following describes the problem processing method, device and equipment based on AI, RPA and AI Agent according to the embodiments of the present application in conjunction with the accompanying drawings.
[0069] Figure 1 This is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by an embodiment of the present application.
[0070] In a possible implementation method provided in an embodiment of the present application, the present application takes the problem processing method based on AI, RPA and AI Agent as an example, which is configured in a problem processing device based on AI, RPA and AI Agent. The problem processing device can be applied to any electronic device with computing capability.
[0071] The electronic device may be a personal computer, a mobile terminal, a service end (or server), etc. The mobile terminal may be, for example, a mobile phone, a tablet computer, a personal digital assistant, or other hardware device with various operating systems.
[0072] In another possible implementation of the embodiment of the present application, the problem-solving method based on AI, RPA and AI Agent can be applied to AI Agent, wherein the AI Agent can run in any electronic device with computing capabilities.
[0073] In another possible implementation of the embodiment of the present application, the problem-solving method based on AI, RPA and AI Agent can be applied to a Robotic Process Automation (RPA) robot, wherein the RPA robot can run in any electronic device with computing capabilities.
[0074] In another possible implementation of the embodiment of the present application, the problem-solving method based on AI, RPA and AI Agent can be applied to an intelligent automation platform; wherein the intelligent automation platform can realize seamless integration of multiple capabilities such as RPA, intelligent document processing (IDP), conversational AI (CoAI), and process mining (Process Mining), and has five major functions of "business understanding", "process creation", "run anywhere", "centralized control", and "human-machine collaboration", which can realize end-to-end intelligent automation of business processes for enterprises, replace manual operations, further improve business efficiency, and accelerate digital transformation.
[0075] Among them, intelligent document processing (IDP) is one of the core capabilities of the intelligent automation platform. Intelligent document processing (IDP) is a new generation of automation technology based on AI technologies such as optical character recognition (OCR), computer vision (CV), natural language processing (NLP), and knowledge graph (KG). It can identify, classify, extract elements, verify, compare, and correct errors of various documents, helping enterprises realize the intelligence and automation of document processing.
[0076] like Figure 1 As shown, the problem handling method based on AI, RPA and AI Agent may include the following steps S101 to S104:
[0077] Step S101: split the problem to be processed to obtain at least one first problem.
[0078] It should be noted that the user may input multiple questions at a time. At this time, in order to improve the accuracy of the question answers, the questions to be processed input by the user can be split based on natural language processing (NLP) technology to obtain at least one first question.
[0079] For example, taking the pending issue of "Who is Party A in the contract? Who is Party B? What is the payment method?" as an example, the pending issue can be divided into three first questions, namely: "Who is Party A in the contract?", "Who is Party B in the contract?", and "What is the payment method in the contract?".
[0080] Step S102: Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs.
[0081] The question type is used to indicate the type of answer corresponding to the first question or the language unit corresponding to the answer (including but not limited to words, phrases, sentences, text segments, etc.).
[0082] Among them, question types include but are not limited to: clear word type (used to indicate that the language unit corresponding to the answer to the question is a word), clear phrase type (used to indicate that the language unit corresponding to the answer to the question is a phrase), complex content extraction type (used to indicate that the language unit corresponding to the answer to the question is a text segment), etc.
[0083] In an embodiment of the present application, for any first question, the first question can be embedded encoded based on a coding algorithm in deep learning technology to obtain multiple target sentence vectors corresponding to the first question.
[0084] In any embodiment of the present application, a variety of different encoding algorithms can be used to perform embedded encoding on the first question to obtain multiple target sentence vectors for the first question; wherein each target sentence vector is an encoding vector obtained by performing embedded encoding on the first question using an encoding algorithm.
[0085] In any embodiment of the present application, the following steps A to D may also be used to obtain multiple target sentence vectors corresponding to any first question:
[0086] Step A: Perform synonym expansion on the first question to obtain at least one synonymous question.
[0087] As an example, take the first question as "Who is Party A in the contract?". Since "Party A" can usually be equivalent to expressions such as "lessor" and "seller", synonymous questions may include: "Who is the lessor in the contract?" and "Who is the seller in the contract?".
[0088] Step B: Perform embedded encoding on the first question to obtain a first sentence vector of the first question.
[0089] Exemplarily, a large language model may be called to perform embedded encoding on the first question to obtain a first sentence vector.
[0090] It should be noted that compared with previous encoding models, the first sentence vector obtained by using a large language model for embedded encoding can better express the semantics of the first question. At the same time, the first question at the sentence level can be directly embedded encoded without the need to segment the first question, encode the words after segmentation, and then restore it to the sentence encoding. This greatly improves the semantic richness contained in the encoding while simplifying the encoding process.
[0091] Step C: Perform embedded encoding on each synonymous question to obtain the second sentence vector of each synonymous question.
[0092] Exemplarily, a large language model may be called to perform embedded encoding on each synonymous question to obtain a second sentence vector for each synonymous question.
[0093] Step D: The first sentence vector and each second sentence vector are used as multiple target sentence vectors corresponding to the first question.
[0094] Therefore, it is possible to obtain multiple target sentence vectors corresponding to the first question in different ways, which can improve the flexibility and applicability of the method. In addition, the sentence vectors of synonymous questions that are synonymous with the first question are also used as the sentence vectors of the first question, which has at least the following advantages: 1. The original first question can be expanded into multiple synonymous questions that are semantically similar but expressed differently, which helps to increase the coverage of the answer, so that relevant content that may have been missed due to vocabulary differences can also be retrieved. 2. In the document fragment (used to generate the answer corresponding to the question) matching stage, using the sentence vector containing the synonym expansion to match the document fragment can reduce the mismatch or missed match caused by vocabulary differences, thereby more accurately identifying answers that are highly relevant to the user's intention, improving the accuracy of retrieval or question-answering, and improving the user's experience. 3. Synonym expansion can better adapt to the diversity and complexity of language. By introducing synonyms, it can more accurately understand the user's intention and conduct more effective retrieval or question-answering. That is, the method of performing synonym expansion on user questions and combining it with embedded coding to generate sentence vectors has significant benefits in improving query coverage, enhancing semantic understanding capabilities, improving answer matching accuracy, adapting to language diversity, improving user experience, and maintaining flexibility and scalability.
[0095] In the embodiment of the present application, for any first question, the question type to which the first question belongs can also be identified. Exemplarily, the AI agent technology can be used to classify the first question to obtain the question type to which the first question belongs.
[0096] For example, taking the first question as "Who is Party A in the contract?", the answer to the question "Party A" is usually a subject name, which usually appears directly in the document content. Therefore, the question type can be a clear phrase type; for another example, taking the first question as "What is the payment method in the contract?", the answer to the question "Payment method" is usually very complicated, and the answer is usually expressed in one or more paragraphs. Therefore, the question type can be a complex content extraction type.
[0097] Step S103: Based on multiple target sentence vectors, determine a target document segment similar to any first question from multiple candidate document segments; wherein the candidate document segment is obtained by segmenting the document content.
[0098] Among them, the candidate document fragments are obtained by segmenting the document content, and the document content can be the text content in one document, or can also be the text content in multiple documents, and the embodiments of the present application do not limit this.
[0099] The number of target document segments may be 1 or more, and the embodiment of the present application does not limit this. Exemplarily, the number of target document segments may be N, where N is a positive integer.
[0100] In an embodiment of the present application, for any first question, a target document fragment similar to the first question (including but not limited to: semantic similarity, textual similarity, etc.) can be determined from multiple candidate document fragments based on multiple target sentence vectors corresponding to the first question.
[0101] Step S104: Generate a reply answer to any first question according to each target document segment and question type, so as to reply to the question to be processed based on the reply answer to each first question.
[0102] In an embodiment of the present application, an answer corresponding to the first text can be generated based on various target document fragments similar to the above-mentioned first question and the question type to which the first question belongs. This answer is recorded as a reply answer in the present application, so that the pending questions input by the user can be replied to based on the reply answers to the various first questions.
[0103] The problem-solving method based on AI, RPA and AI Agent in the embodiment of the present application does not need to use a large amount of labeled data to train the machine learning model (such as a classifier or sequence labeling model), and uses the trained machine learning model to extract the key information required by the user from the document content (i.e., the answer corresponding to the problem to be processed), which can reduce the application cost, technical threshold and application threshold. In addition, based on AI, RPA and AI Agent technology, answers that match the intent of the problem to be processed can be extracted from the document content, which can improve the efficiency and accuracy of answer generation.
[0104] In order to clearly illustrate how any embodiment of the present application determines a target document fragment similar to the first question from multiple candidate document fragments based on multiple target sentence vectors of the first question, the present application also proposes a problem processing method based on AI, RPA and AI Agent.
[0105] Figure 2 This is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application.
[0106] It should be noted that the problem-solving method based on AI, RPA and AI Agent can be executed alone, or it can be executed in combination with any embodiment in the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the embodiments of the present application are not limited to this.
[0107] like Figure 2 As shown, the problem handling method based on AI, RPA and AI Agent may include the following steps S201 to S206:
[0108] Step S201: split the problem to be processed to obtain at least one first problem.
[0109] Step S202: Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs.
[0110] The explanation of steps S201 to S202 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0111] Step S203: querying a document vector library according to the multiple target sentence vectors; wherein the document vector library includes multiple document vectors, and the document vectors are obtained by performing embedded coding on the candidate document fragments.
[0112] The document vector library includes multiple document vectors, each of which is obtained by embedded encoding of a candidate document fragment. Exemplarily, a large language model can be called to perform embedded encoding on each candidate document fragment to obtain a document vector.
[0113] In any embodiment of the present application, the document vector library may be constructed by an RPA robot. For example, the RPA robot may construct the document vector library by following steps A' to D':
[0114] Step A': using OCR technology to perform character recognition on at least one document to obtain the document content in each document.
[0115] It should be noted that, considering that enterprises have to deal with a variety of document formats in daily work, such as Word, PDF and other different document formats, even the same type of document format may have multiple different types, such as image-type PDF, text-type PDF, etc. If each document format is processed separately, it will generate a huge workload and limit the scalability of the entire system.
[0116] In response to the above problems, in this application, OCR technology can be used to recognize the text content in the document, so that different document formats can be ignored, which not only simplifies the complexity of the system, but also enhances the compatibility and scalability of the entire system.
[0117] Step B': restore the document structure of the document content of each document to obtain the restored content of each document.
[0118] Step C': Split the restored content of each document to obtain multiple candidate document segments.
[0119] It should be noted that the present application does not impose any restrictions on the segmentation granularity (or splitting granularity) of the candidate document fragments. For example, the candidate document fragments may be segmented by paragraphs, by tables, by chapters, and so on.
[0120] Step D': Embedded encoding is performed on multiple candidate document fragments to obtain document vectors of the multiple candidate document fragments, and the document vectors are added to the document vector library.
[0121] Exemplarily, a large language model may be called to perform embedded encoding on each candidate document segment, obtain a document vector for each candidate document segment, and add the vector to a document vector library.
[0122] It should be noted that the above-mentioned documents may be documents uploaded by the same user. In this case, each user corresponds to a document vector library, which contains the document vectors of all candidate document fragments in the documents uploaded by the user; or, the above-mentioned documents may be documents uploaded by different users, documents collected online, etc. In this case, a large number of users can share a document vector library.
[0123] In summary, using RPA robots to automatically segment document content and embedding the segmented document fragments to build a document vector library can improve the efficiency of building the document vector library.
[0124] Step S204: determining a target document vector similar to the multiple target sentence vectors from the multiple document vectors according to the similarities between the multiple target sentence vectors and the multiple document vectors.
[0125] As an example, for any document vector in the document vector library, the similarity between multiple target sentence vectors and the document vector can be calculated, and the similarity between the first question and the document vector can be determined based on the similarity between the multiple target sentence vectors and the document vector. For example, the mean value, weighted sum value, etc. of the similarity between the multiple target sentence vectors and the document vector can be used as the similarity between the first question and the document vector. Furthermore, in the present application, a target document vector similar to the first question can be determined from multiple document vectors based on the similarity between the first question and the multiple document vectors.
[0126] Exemplarily, a document vector having a similarity higher than a set similarity threshold may be used as a target document vector.
[0127] Exemplarily, multiple document vectors may be sorted from high to low according to similarity values to obtain a sorted sequence, and the first N document vectors in the sorted sequence are used as target document vectors.
[0128] Step S205: taking the candidate document segment corresponding to the target document vector as the target document segment.
[0129] In the embodiment of the present application, the candidate document segment corresponding to each target document vector may be used as the target document segment. That is, the target document vector is obtained by performing embedded coding on the target document segment.
[0130] It should be noted that usually the title of a document may contain the content of the user's question, but not the answer. The answer is often in the paragraph below the title. At this time, the target text segment similar to the first question may contain the title but not the answer. In response to the above problem, in this application, the title of the document can be identified through document structuring technology, and the title can be associated with the corresponding paragraph to facilitate answer retrieval or generation without missing key content. Similarly, content related to user questions usually appears in table headers or table captions, so it is also necessary to restore the structure of the table and treat the entire table as a whole.
[0131] That is, in any embodiment of the present application, the RPA robot may also perform the following steps E' to H':
[0132] Step E': Based on the document structuring technology, identify the specified element from multiple candidate document fragments.
[0133] The number of specified elements may be one or more, and this is not limited in the embodiments of the present application.
[0134] Step F': Determine, from a plurality of candidate document segments, a reference document segment that is located in the same document as the designated element.
[0135] Step G': Based on the layout positions of the reference document fragment and the designated element in the same document, determine the associated document fragment associated with the designated element from the reference document fragment.
[0136] As an example, taking the specified element as a title, the associated document fragment may be the paragraph below the title; for another example, taking the specified element as a table header or table caption, the associated document fragment may be the table body.
[0137] Step H': Establish an association relationship between the associated document fragment and the specified element.
[0138] Therefore, the RPA robot can establish associations between different document fragments, so that when subsequent answers are generated, the associations, the target document fragments and the question types can be combined to generate responses to each first question, thereby improving the accuracy and reliability of response generation and improving the user experience in the document processing field.
[0139] Step S206: Generate a reply answer to any first question according to each target document segment and question type, so as to reply to the question to be processed based on the reply answer to each first question.
[0140] For the explanation of step S206, please refer to the relevant description in any embodiment of the present application, which will not be repeated here.
[0141] In any embodiment of the present application, for any target document fragment, when the target document fragment is a specified element, the association relationship in step S205, each target document fragment and the question type can be integrated to generate a reply answer to the first question.
[0142] As an example, for any target document fragment, when the target document fragment is a specified element, the above association relationship can be queried based on the target document fragment to determine the first document fragment associated with the target document fragment from multiple candidate document fragments; wherein the first document fragment and the target document fragment are located in the same document. Afterwards, the document positions of the target document fragment and the first document fragment can be restored based on the layout positions of the target document fragment and the first document fragment in the same document to obtain the first document content, so that in this application, a reply answer to the first question can be generated based on the first document content and the question type.
[0143] Exemplarily, when the question type indicates that the language unit of the answer to the question is a word or a phrase, the large language model can be directly called to process the first document content to obtain the reply answer to the first question. For example, the first document content and the first question can be assembled to obtain a first prompt text (prompt), wherein the first prompt text is used to indicate the task information to be performed by the large language model, so in this application, the large language model can be called to process the first prompt text to obtain the reply answer to the first question.
[0144] In the case where the question type indicates that the language unit of the answer to the question is a text segment, a fourth document segment located in the same document as the first document content can be determined from multiple candidate document segments, and based on the context information of the first document content in the same document, a fifth document segment located above the first document content and / or a fifth document segment located below the first document content can be determined from each fourth document segment. After that, the first document content and the fifth document segment can be restored to their document positions based on their layout positions in the same document to obtain the third document content. Thus, in this application, a large language model can be called to process the third document content (such as refining processing) to obtain a reply answer to the first question. For example, the third document content and the first question can be assembled to obtain a second prompt text, and the large language model can be called to process the second prompt text to obtain a reply answer to the first question.
[0145] Therefore, when the target document fragment includes the specified element, the first document fragment associated with the target document fragment, the target document fragment and the question type to which the first question belongs are comprehensively used to generate a response answer to the first question, which can improve the accuracy and reliability of answer generation.
[0146] In any one of the embodiments of the present application, for any target document fragment, when the target document fragment is not a designated element, a reply answer to the first question can be generated directly according to each target document fragment and the question type.
[0147] As an example, for any target document fragment, when the target document fragment is not a specified element, it can be determined whether the question type indicates that the language unit of the answer to the question is a word or a phrase. If the question type indicates that the language unit of the answer to the question is a word or a phrase, the large language model is called to process the target document fragment to obtain a reply answer to the first question; and if the question type indicates that the language unit of the answer to the question is a text segment, a second document fragment located in the same document as the target document fragment is determined from multiple candidate document fragments, and based on the context information of the target document fragment in the same document, a third document fragment located above the target document fragment and / or a fourth document fragment located below the target document fragment is determined from each second document fragment. Afterwards, the document positions of the target document fragment and the third document fragment can be restored according to their typeset positions in the same document to obtain the second document content. Therefore, in this application, the large language model can be called to process the second document content (such as refining processing) to obtain a reply answer to the first question.
[0148] Therefore, when the target document fragment does not include the specified element, a reply answer to the first question is generated directly based on the target document fragment and the question type to which the first question belongs, which can take into account both the efficiency and accuracy of answer generation.
[0149] The problem processing method based on AI, RPA and AI Agent in the embodiment of the present application searches for target document fragments similar to the first question from multiple candidate document fragments based on the similarity between vectors, which can take into account both query efficiency and accuracy of query results.
[0150] In order to clearly illustrate how any embodiment of the present application generates a response answer to the first question based on each target document fragment and question type, the present application also proposes a problem processing method based on AI, RPA and AI Agent.
[0151] Figure 3 This is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application.
[0152] It should be noted that the problem-solving method based on AI, RPA and AI Agent can be executed alone, or it can be executed in combination with any embodiment in the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the embodiments of the present application are not limited to this.
[0153] like Figure 3 As shown, the problem handling method based on AI, RPA and AI Agent may include the following steps S301 to S310:
[0154] Step S301: split the problem to be processed to obtain multiple first problems.
[0155] Step S302: Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs.
[0156] Step S303: Based on multiple target sentence vectors, determine a target document segment similar to any first question from multiple candidate document segments; wherein the candidate document segment is obtained by segmenting the document content.
[0157] The explanation of steps S301 to S303 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0158] Step S304: determining a second question to be merged from the multiple first questions according to the similarities between the target document segments corresponding to the multiple first questions.
[0159] As an example, the first question with similar target document fragments may be used as the second question to be merged.
[0160] That is to say, considering that the answers to similar questions are also similar, in this application, in order to make full use of the semantic understanding ability of the large language model and reduce the number of requests to the large language model, the first questions with similar target document fragments can be merged into a total question and submitted to the large language model for answer generation. This can not only reduce the number of requests to the large language model, but also reduce the cost of using the large language model, shorten the answer generation time, and reduce the user's waiting time.
[0161] Step S305: merge the second questions to obtain a merged question, and generate first prompt information according to the merged question and the target document fragments corresponding to the second questions.
[0162] The first prompt information is used to instruct the large language model to perform the answer generation task.
[0163] In an embodiment of the present application, all second questions can be merged to obtain a merged question, and the target document fragments corresponding to the merged question and the second question can be assembled to obtain a first prompt information; wherein, the first prompt information is used to indicate the task information to be performed by the large language model, that is, to instruct the large language model to perform the answer generation task.
[0164] Step S306: calling the large language model to process the first prompt information to obtain responses to the second questions.
[0165] In an embodiment of the present application, a large language model may be called to process the first prompt information to obtain a response answer to each second question.
[0166] Step S307: determining a third question other than the second question from the plurality of first questions.
[0167] Among them, the number of third questions can be one or more, and the embodiment of the present application does not limit this.
[0168] Step S308: Generate second prompt information according to the third question and the target document segment corresponding to the third question.
[0169] The second prompt information is used to instruct the large language model to perform the answer generation task.
[0170] In an embodiment of the present application, a third question other than the second question can be determined from multiple first questions, and each third question and the target document fragment corresponding to the third question are assembled to obtain a second prompt information; wherein the second prompt information is used to indicate task information to be performed by the large language model, that is, to instruct the large language model to perform the answer generation task.
[0171] Step S309: calling the large language model to process the second prompt information to obtain a reply answer to the third question.
[0172] In an embodiment of the present application, a large language model may be called to process the second prompt information to obtain a reply answer to the third question.
[0173] Step S310: Reply to the question to be processed based on the reply answers corresponding to the second question and the third question respectively.
[0174] In the embodiment of the present application, the pending questions input by the user can be replied to according to the reply answers corresponding to each of the second question and the third question.
[0175] The problem processing method based on AI, RPA and AI Agent in the embodiment of the present application takes into account that the answers to similar questions are also similar. The first questions with similar target document fragments are merged into one merged question and submitted to the large language model for answer generation. This can not only reduce the number of requests to the large language model, but also reduce the cost of using the large language model, shorten the answer generation time, and reduce the user's waiting time.
[0176] In order to clearly explain how the questions to be processed are responded to based on the responses to the first questions in any embodiment of the present application, the present application also proposes a problem processing method based on AI, RPA and AI Agent.
[0177] Figure 4 This is a flowchart of a problem handling method based on AI, RPA and AI Agent provided by another embodiment of the present application.
[0178] It should be noted that the problem-solving method based on AI, RPA and AI Agent can be executed alone, or it can be executed in combination with any embodiment in the present application or a possible implementation method in the embodiment, or it can be executed in combination with any technical solution in the relevant technology, and the embodiments of the present application are not limited to this.
[0179] like Figure 4 As shown, the problem handling method based on AI, RPA and AI Agent may include the following steps S401 to S412:
[0180] Step S401: split the problem to be processed to obtain at least one first problem.
[0181] Step S402: Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs.
[0182] Step S403: Based on the multiple target sentence vectors, determine a target document segment similar to any first question from the multiple candidate document segments.
[0183] The candidate document fragments are obtained by segmenting the document content.
[0184] Step S404: Generate a reply answer to any first question according to each target document segment and question type.
[0185] The explanation of steps S401 to S404 can be found in the relevant description in any embodiment of the present application and will not be repeated here.
[0186] Step S405: Using AI Agent to check the logical consistency, factual accuracy and compliance with professional knowledge of the reply answer to any first question, and obtain the credibility of the reply answer to any first question.
[0187] The credibility is used to indicate the credibility of the answer to the first question.
[0188] In an embodiment of the present application, for any first question, an AI Agent can be used to check the logical consistency, factual accuracy, and compliance with professional knowledge of the reply answer to the first question to obtain the credibility of the reply answer to the first question.
[0189] Step S406, determining whether the credibility is higher than a set threshold, if so, executing step S408 and subsequent steps, if not, executing step S407.
[0190] The set threshold refers to a pre-set credibility threshold.
[0191] In the embodiment of the present application, it can be determined whether the credibility of the reply answer to the first question is higher than a set threshold. If so, step S408 and subsequent steps are executed; if not, step S407 is executed.
[0192] It should be noted that step S407 and step S408 and subsequent steps are two parallel implementation methods. In actual application, only one needs to be executed.
[0193] Step S407: Execute the answer generation process.
[0194] In an embodiment of the present application, when the credibility of the reply answer to the first question is not higher than the set threshold, it indicates that the reply answer to the first question is not credible. At this time, the answer generation process (or answer regeneration process) can be further executed, wherein the answer generation process is used to re-call the large language model to generate a reply answer to the first question (i.e., re-execute step S404 and subsequent steps) to reply to the first question based on the regenerated reply answer.
[0195] Step S408: Use the AI Agent to check whether the reply answer to any of the first questions needs clarification. If so, execute step S409; if not, execute step S410 and subsequent steps.
[0196] In an embodiment of the present application, when the credibility of the reply answer to the first question is higher than the set threshold, it indicates that the reply answer to the first question is credible. At this time, the AI Agent can be further used to check whether the reply answer to the first question needs to be clarified. If so, execute step S409, if not, execute step S410 and subsequent steps.
[0197] Exemplarily, it can be determined whether the reply answer to the first question is vague or ambiguous. If so, it is determined that the reply answer to the first question needs to be clarified. If not, it is determined that the reply answer to the first question does not need to be clarified.
[0198] It should be noted that step S409 and step S410 and subsequent steps are two parallel implementation methods. In actual application, only one needs to be executed.
[0199] Step S409: Execute the clarification process.
[0200] In an embodiment of the present application, when the reply answer to the first question needs to be clarified, a clarification process can be further executed, wherein the clarification process is used to generate a clarification question and send the clarification question to the client that sent the pending question, so as to regenerate the reply answer to the first question according to the clarification result sent by the client, and reply to the first question based on the regenerated reply answer.
[0201] Step S410: Use AI Agent to determine whether the reply answer to any first question needs to be normalized. If so, execute step S411; if not, execute step S412.
[0202] In an embodiment of the present application, when the reply answer to the first question does not need to be clarified, the AI Agent can be further used to determine whether the reply answer to the first question needs to be normalized. If so, step S411 is executed, and if not, step S412 is executed.
[0203] It should be noted that step S411 and step S412 are two parallel implementation methods. In actual application, only one needs to be executed.
[0204] Step S411: Execute the normalization process.
[0205] In an embodiment of the present application, when the reply answer to the first question needs to be normalized, a normalization process can be executed, wherein the normalization process is used to normalize the reply answer to the first question, and reply to the first question based on the normalized reply answer.
[0206] Step S412: Use the reply answer to any first question to reply to any first question.
[0207] In the embodiment of the present application, when the reply answer to the first question does not need to be normalized, the reply answer to the first question can be directly used to reply to the first question.
[0208] The problem-solving method based on AI, RPA and AI Agent in the embodiment of the present application introduces AI Agent technology to process the reply answers output by the large language model, judge whether the generated reply answers are credible, whether they need clarification, whether they need normalization, etc., and automatically generate the corresponding process to process the first question, which can improve the accuracy of the reply answers returned to the user and improve the user experience in the document processing field.
[0209] It should be noted that with the continuous enhancement of the capabilities of large language models, using large language models to process documents has become feasible and easy to operate. However, large language models still have strict restrictions on the length of input content. Even if the length limit is not exceeded, the longer the input content is, the slower the processing speed of the large language model and the higher the cost. On the contrary, the content in the document to be processed is numerous (for example, a contract document is usually about 10 pages), and how to use large language models to effectively process such long documents is the key to improving work efficiency.
[0210] Based on this, this application proposes a technology that uses LLM technology to extract key information required by users from long documents, aiming to solve the following problems: 1. Use a large language model to encode the document content; 2. Use vector retrieval technology to refine the document content; 3. Reorganize the question and the refined document content to extract the answer to the question.
[0211] As an example, the document to be processed is a document uploaded by the user. First, the large language model is called to vector encode the document uploaded by the user and build a document vector library. Then, the large language model is called to encode the content of the user's question to obtain a sentence vector. Then, based on the sentence vector, the constructed document vector library is searched to recall relevant document fragments. Finally, the user's question and document fragments are sorted and submitted to the large language model for answer generation. The implementation principle of this application mainly includes the following parts:
[0212] Part 1: Building a document vector library.
[0213] Considering that enterprises need to process various document formats in their daily work, such as Word, PDF and other different document formats, even the same type of document format may have multiple different types, such as image-type PDF, text-type PDF, etc. If each document format is processed separately, it will obviously generate a huge workload and limit the scalability of the entire system. Therefore, in this application, OCR technology can be used to recognize the text content in the document, so that the document format can be ignored, which simplifies the complexity of the system while enhancing the compatibility and scalability of the entire system.
[0214] After obtaining the document content through OCR technology, the document structure can also be restored to the document content, such as titles, paragraphs, and tables. Usually the title of the document will contain the content of the user's question, but it does not contain the answer. The answer is often in the paragraph below the title. Therefore, in this application, document structuring technology can be used to identify the title of the document and establish an association with the corresponding paragraph to facilitate subsequent content retrieval without missing key content. Similarly, the content related to the user's question usually appears in the table header or table caption, so it is also necessary to restore the structure of the table and treat the entire table as a whole.
[0215] After obtaining the above content, the content can be segmented to obtain multiple document fragments, and the document fragments can be embedded encoded using a large language model to obtain document vectors. Compared with previous encoding models, the document vectors output by the large language model can better express the semantics of the content, and can directly embed and encode sentence-level document fragments without the need to segment the document fragments, encode the words after segmentation, and then restore them to sentence encoding. This greatly improves the semantic richness of the encoding while simplifying the encoding process.
[0216] Finally, the obtained document vectors are constructed into a document vector library to facilitate subsequent use. The construction process of the document vector library can be as follows: Figure 5 shown.
[0217] Part 2: Analysis of user questions.
[0218] After completing the construction of the document vector library, it is also necessary to perform embedded coding and analysis on user questions. In addition to using a large language model to perform embedded coding on user questions, user questions may also use some synonyms, omissions, etc., so it is also necessary to perform some analysis on user questions. The main analysis contents are as follows:
[0219] 2.1. Use common synonym technology in NLP technology to expand the content of the user's question. For example, "Party A" can usually be equivalent to expressions such as "lessor" and "seller".
[0220] 2.2. Using AI Agent technology, we can determine the type of question that the user is asking. Usually, we need to determine whether the answer is a clear word or phrase, or a summary of a paragraph. For example, the answer to the question "Party A" is usually a subject name, which usually appears directly in the document content and can be used directly; while the answer to the question "Payment method" is usually very complicated, and the answer is usually expressed in one or more paragraphs to describe the complex situation. If the complex text is directly returned to the user, it will not improve the user's work efficiency. At the same time, this type of question also requires other strategies to assist in recall during retrieval.
[0221] As an example, the analysis process of user questions can be as follows Figure 6 As shown. Figure 6 After the analysis process shown, detailed analysis data of the user's question can be obtained, and then relevant document fragments will be recalled from the document vector library.
[0222] Part III: Document content retrieval.
[0223] After constructing the document vector library and obtaining the detailed analysis data of the user's question, the relevant document fragments can be recalled or retrieved. Specifically, the similarity between the user's question and all the document fragments can be calculated in turn, and the TopN (i.e., the first N) document fragments with similarity higher than the similarity threshold are retained. After that, as mentioned above, it is also necessary to determine whether each document fragment is an element such as a title or table header. If so, it is also necessary to expand the document fragment associated with it (such as a paragraph or table body, etc.). According to the detailed analysis data of the user's question, more document fragments need to be supplemented from the context for recall.
[0224] After recalling document fragments related to all questions, considering that the order in the document is usually meaningful, the recalled document fragments will not be sorted according to the most common similarity scores, but need to restore their order in the original document.
[0225] In order to fully utilize the semantic understanding ability of the large language model and reduce the total number of requests to the large language model, in this application, questions with similar document fragments can be merged into one question and provided to the large language model for answer generation. In this way, the number of requests can usually be reduced by more than half, greatly reducing the cost of using the large language model and shortening the waiting time of users.
[0226] Part 4: Generate answers with large language models.
[0227] After providing the above prepared content to the large language model to generate answers, AI Agent technology can also be introduced to process the replies output by the large language model. AI Agent is used to determine whether the replies generated by the large language model are credible, whether they need clarification, whether they need normalization, etc., and automatically generate corresponding processes to process user questions, obtain the final answer, and return it to the user. The implementation process can be as follows: Figure 7 shown.
[0228] In summary, the technical solution provided by this application has at least the following advantages:
[0229] 1. High flexibility: Users can ask questions in natural language, and it is easy to modify and add questions. No professional knowledge of Internet Technology (IT) is required.
[0230] 2. High scalability: Different types of questions can be added quickly and are easy to modify.
[0231] 3. Low data dependence: It can be used without labeling any data, which greatly reduces the startup cost.
[0232] 4. Strong generalization ability: Even if the document format undergoes major changes, it can adapt to the changes and extract the key information required by users without human intervention.
[0233] In order to implement the above embodiments, the present application also provides a problem handling device based on AI, RPA and AI Agent.
[0234] Figure 8 This is a structural diagram of a problem processing device based on AI, RPA and AI Agent provided by an embodiment of the present application.
[0235] like Figure 8 As shown, the problem processing device 800 based on AI, RPA and AI Agent includes: a splitting module 810, a processing module 820, a determination module 830, a generation module 840 and a reply module 850.
[0236] The splitting module 810 is used to split the problem to be processed to obtain at least one first problem;
[0237] A processing module 820 is used to obtain multiple target sentence vectors corresponding to any first question and identify the question type to which any first question belongs;
[0238] A determination module 830 is used to determine a target document segment similar to any first question from a plurality of candidate document segments based on a plurality of target sentence vectors; wherein the candidate document segment is obtained by segmenting the document content;
[0239] A generating module 840, for generating a reply answer to any first question according to each target document segment and question type;
[0240] The reply module 850 is used to reply to the pending questions based on the reply answers to the first questions.
[0241] In any one embodiment of the present application, the processing module 820 is used to: perform synonym expansion on any first question to obtain at least one synonymous question; perform embedded coding on any first question to obtain a first sentence vector for any first question; perform embedded coding on each synonymous question to obtain a second sentence vector for each synonymous question; and use the first sentence vector and each second sentence vector as multiple target sentence vectors corresponding to any first question.
[0242] In any one embodiment of the present application, the determination module 830 is used to: query a document vector library based on multiple target sentence vectors; wherein the document vector library includes multiple document vectors, and the document vector is obtained by embedded encoding of candidate document fragments; based on the similarity between the multiple target sentence vectors and the multiple document vectors, determine the target document vector similar to the multiple target sentence vectors from the multiple document vectors; and use the candidate document fragment corresponding to the target document vector as the target document fragment.
[0243] In any embodiment of the present application, the document vector library is constructed by the RPA robot using the following modules:
[0244] A recognition module, used to perform character recognition on at least one document using optical character recognition (OCR) technology to obtain document content;
[0245] A restoration module is used to restore the document structure of the document content to obtain restored content;
[0246] A segmentation module is used to split the restored content to obtain multiple candidate document fragments;
[0247] The encoding module is used to perform embedded encoding on multiple candidate document fragments, obtain document vectors of the multiple candidate document fragments, and add them to the document vector library.
[0248] In any embodiment of the present application, the RPA robot is further configured to execute the following modules:
[0249] A module is established to identify a specified element from multiple candidate document fragments based on document structuring technology; determine a reference document fragment located in the same document as the specified element from multiple candidate document fragments; determine an associated document fragment associated with the specified element from the reference document fragment based on the layout positions of the reference document fragment and the specified element in the same document; and establish an association relationship between the associated document fragment and the specified element.
[0250] In any one embodiment of the present application, the generation module 840 is used to: when the target document fragment includes a specified element, query a first document fragment associated with the target document fragment from multiple candidate document fragments; wherein the first document fragment and the target document fragment are located in the same document; according to the layout position of the target document fragment and the first document fragment in the same document, restore the document position of the target document fragment and the first document fragment to obtain the first document content; according to the first document content and the question type, generate a response answer to any first question.
[0251] In any embodiment of the present application, the question type is used to indicate the language unit corresponding to the answer to the question; the generation module 840 is used to: when the question type indicates that the language unit is a word or a phrase, call the large language model to process the target document fragment to obtain a reply answer to any first question; when the question type indicates that the language unit is a text segment, query a second document fragment in the same document as the target document fragment from multiple candidate document fragments; based on the context information of the target document fragment in the same document, determine the third document fragment from each second document fragment; according to the typesetting position of the target document fragment and the third document fragment in the same document, restore the document position of the target document fragment and the third document fragment to obtain the second document content; call the large language model to process the second document content to obtain a reply answer to any first question.
[0252] In any embodiment of the present application, there are multiple first questions, and a generation module 840 is used to: determine the second questions to be merged from the multiple first questions based on the similarity between the target document fragments corresponding to the multiple first questions; merge the second questions to obtain a merged question; generate a first prompt message based on the merged question and the target document fragments corresponding to the second questions; wherein the first prompt message is used to instruct the large language model to perform an answer generation task; and call the large language model to process the first prompt message to obtain a reply answer to each second question.
[0253] In any embodiment of the present application, the generation module 840 is further used to: determine a third question other than the second question from multiple first questions; generate a second prompt information based on the third question and the target document fragment corresponding to the third question; wherein the second prompt information is used to instruct the large language model to perform the answer generation task; and call the large language model to process the second prompt information to obtain a reply answer to the third question.
[0254] In any embodiment of the present application, the reply module 850 is used to: use AI Agent to check the logical consistency, factual accuracy and compliance with professional knowledge of the reply answer to any first question, and obtain the credibility of the reply answer to any first question; when the credibility is higher than the set threshold, use AI Agent to check whether the reply answer to any first question needs to be clarified; when the reply answer to any first question does not need to be clarified, use AI Agent to determine whether the reply answer to any first question needs to be normalized; when the reply answer to any first question does not need to be normalized, use the reply answer to any first question to reply to any first question.
[0255] In any embodiment of the present application, the reply module 850 is also used to: when the credibility is not higher than the set threshold, execute an answer generation process; wherein the answer generation process is used to re-call the large language model to generate a reply answer to any first question, so as to reply to any first question based on the regenerated reply answer; when the reply answer to any first question needs to be clarified, execute a clarification process; wherein the clarification process is used to generate a clarification question, send the clarification question to the client that sent the question to be processed, and regenerate a reply answer to any first question based on the clarification result sent by the client, so as to reply to any first question based on the regenerated reply answer; when the reply answer to any first question needs to be normalized, execute a normalization process; wherein the normalization process is used to normalize the reply answer to any first question, and reply to any first question based on the normalized reply answer.
[0256] It should be noted here that the problem processing device based on AI, RPA and AI Agent provided in the embodiment of the present application can implement all the method steps implemented in any of the above-mentioned method embodiments, and can achieve the same technical effects. The parts and beneficial effects of this embodiment that are the same as the method embodiment will not be described in detail here.
[0257] Fig. 9 FIG. 1 is a block diagram showing a structure of an electronic device according to an embodiment of the present application. Fig. 9As shown, the electronic device includes: a memory 910 and a processor 920, wherein the memory 910 stores a computer program that can be run on the processor 920. When the processor 920 executes the computer program, the problem processing method based on AI, RPA and AI Agent in the above-mentioned embodiment is implemented. The number of the memory 910 and the processor 920 can be one or more.
[0258] The electronic device also includes:
[0259] The communication interface 930 is used to communicate with external devices and perform data exchange transmission.
[0260] If the memory 910, the processor 920 and the communication interface 930 are implemented independently, the memory 910, the processor 920 and the communication interface 930 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Fig. 9 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0261] Optionally, in a specific implementation, if the memory 910, the processor 920 and the communication interface 930 are integrated on a chip, the memory 910, the processor 920 and the communication interface 930 can communicate with each other through an internal interface.
[0262] An embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the problem-solving method based on AI, RPA, and AI Agent provided in any embodiment of the present application.
[0263] An embodiment of the present application also provides a chip, which includes a processor for calling and executing instructions stored in the memory from the memory, so that a communication device equipped with the chip executes the problem handling method based on AI, RPA and AI Agent provided in any embodiment of the present application.
[0264] An embodiment of the present application also provides a chip, including: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the problem handling method based on AI, RPA and AIAgent provided in any embodiment of the application.
[0265] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc. It is worth noting that the processor may be a processor supporting an advanced RISC machines (ARM) architecture.
[0266] Further, optionally, the above-mentioned memory may include a read-only memory and a random access memory, and may also include a non-volatile random access memory. The memory may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may include a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may include a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available. For example, static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct rambus RAM (DR RAM).
[0267] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium.
[0268] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and the features of different embodiments or examples, unless they are contradictory.
[0269] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.
[0270] Any process or method description in the flow chart or otherwise described herein can be understood to represent a module, fragment or portion of a code including one or more executable instructions for implementing the steps of a specific logical function or process. And the scope of the preferred embodiment of the present application includes other implementations, in which the functions may not be performed in the order shown or discussed, including in a substantially simultaneous manner or in a reverse order according to the functions involved.
[0271] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium for use by an instruction execution system, apparatus or device (such as a computer-based system, a system including a processor or other system that can fetch instructions from an instruction execution system, apparatus or device and execute instructions), or used in combination with these instruction execution systems, apparatuses or devices.
[0272] It should be understood that the various parts of the present application can be implemented with hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented with software or firmware stored in a memory and executed by a suitable instruction execution system. All or part of the steps of the above embodiment method can be completed by instructing the relevant hardware through a program, which can be stored in a computer-readable storage medium, and when the program is executed, it includes one of the steps of the method embodiment or a combination thereof.
[0273] In addition, each functional unit in each embodiment of the present application can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. If the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium can be a read-only memory, a disk or an optical disk, etc.
[0274] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A problem handling method based on artificial intelligence AI, robotic process automation RPA and digital labor platform intelligent assistant AIAgent, characterized in that: include: Split the problem to be processed into at least one first problem; Obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs; Based on the multiple target sentence vectors, determine a target document segment similar to any of the first questions from multiple candidate document segments; wherein the candidate document segment is obtained by segmenting the document content; A reply answer to any of the first questions is generated according to each of the target document fragments and the question type, so as to reply to the question to be processed based on the reply answer to each of the first questions.
2. The method according to claim 1, characterized in that The obtaining of a plurality of target sentence vectors corresponding to any first question includes: Performing synonym expansion on any of the first questions to obtain at least one synonymous question; Performing embedded coding on any of the first questions to obtain a first sentence vector for any of the first questions; Performing embedded coding on each of the synonymous questions to obtain a second sentence vector for each of the synonymous questions; The first sentence vector and each of the second sentence vectors are used as the multiple target sentence vectors corresponding to any one of the first questions.
3. The method according to claim 1, characterized in that The step of determining a target document segment similar to any one of the first questions from a plurality of candidate document segments based on the plurality of target sentence vectors includes: Querying a document vector library according to the multiple target sentence vectors; wherein the document vector library includes multiple document vectors, and the document vectors are obtained by performing embedded coding on the candidate document fragments; Determining, from the multiple document vectors, target document vectors that are similar to the multiple target sentence vectors according to the similarities between the multiple target sentence vectors and the multiple document vectors; The candidate document segment corresponding to the target document vector is used as the target document segment.
4. The method according to claim 3, characterized in that The document vector library is constructed by the RPA robot using the following steps: Using optical character recognition (OCR) technology to perform character recognition on at least one document to obtain document content; Performing document structure restoration on the document content to obtain restored content; Splitting the restored content to obtain multiple candidate document segments; Embedded coding is performed on the multiple candidate document fragments to obtain document vectors of the multiple candidate document fragments, and the document vectors are added to the document vector library.
5. The method according to claim 4, characterized in that The RPA robot is also used to perform the following steps: Based on the document structuring technology, identifying a specified element from the multiple candidate document fragments; Determine, from the plurality of candidate document segments, a reference document segment that is located in the same document as the designated element; Based on the layout positions of the reference document fragment and the designated element in the same document, determining an associated document fragment associated with the designated element from the reference document fragment; An association relationship is established between the associated document fragment and the designated element.
6. The method according to any one of claims 1 to 5, characterized in that Generating a reply answer to any of the first questions according to each of the target document segments and the question type includes: In the case where the target document fragment includes the specified element, searching for a first document fragment associated with the target document fragment from the multiple candidate document fragments; wherein the first document fragment and the target document fragment are located in the same document; According to the layout positions of the target document fragment and the first document fragment in the same document, restoring the document positions of the target document fragment and the first document fragment to obtain first document content; Generate a reply answer to any of the first questions based on the first document content and the question type.
7. The method according to any one of claims 1 to 5, characterized in that The question type is used to indicate the language unit corresponding to the answer to the question; Generating a reply answer to any of the first questions according to each of the target document segments and the question type includes: In the case where the question type indicates that the language unit is a word or a phrase, calling a large language model to process the target document fragment to obtain a reply answer to any one of the first questions; In a case where the question type indicates that the language unit is a text segment, querying a second document segment that is located in the same document as the target document segment from the plurality of candidate document segments; Determining a third document segment from each of the second document segments based on context information of the target document segment in the same document; According to the layout positions of the target document fragment and the third document fragment in the same document, restoring the document positions of the target document fragment and the third document fragment to obtain the second document content; The large language model is called to process the second document content to obtain a reply answer to any one of the first questions.
8. The method according to any one of claims 1 to 5, characterized in that There are multiple first questions, and generating a reply answer to any of the first questions according to each of the target document fragments and the question type includes: Determining a second question to be merged from the plurality of first questions according to similarities between target document segments corresponding to the plurality of first questions; Merge each of the second problems to obtain a merged problem; Generate first prompt information according to the merged question and the target document fragments corresponding to each of the second questions; wherein the first prompt information is used to instruct the large language model to perform an answer generation task; The large language model is called to process the first prompt information to obtain a reply answer to each of the second questions.
9. The method according to claim 8, characterized in that The step of generating a reply answer to any of the first questions according to each of the target document segments and the question type further includes: determining a third question other than the second question from the plurality of first questions; Generate second prompt information according to the third question and the target document segment corresponding to the third question; wherein the second prompt information is used to instruct the large language model to perform an answer generation task; The large language model is called to process the second prompt information to obtain a reply answer to the third question.
10. The method according to any one of claims 1 to 5, characterized in that The step of replying to the pending questions based on the reply answers to the first questions includes: Using an AI Agent to check the logical consistency, factual accuracy, and compliance with professional knowledge of the reply answer to any of the first questions, and obtain the credibility of the reply answer to any of the first questions; In the case where the credibility is higher than the set threshold, using the AIAgent to check whether the reply answer to any of the first questions needs clarification; In the case where the reply answer to any of the first questions does not need to be clarified, using the AIAgent to determine whether the reply answer to any of the first questions needs to be normalized; In the case where the reply answer to any of the first questions does not need to be normalized, the reply answer to any of the first questions is used to reply to the any of the first questions.
11. The method according to claim 10, characterized in that The step of replying to the pending questions based on the reply answers to the first questions further includes: When the credibility is not higher than the set threshold, executing an answer generation process; wherein the answer generation process is used to re-call the large language model to generate a reply answer to any of the first questions, so as to reply to any of the first questions based on the re-generated reply answer; In the case where the reply answer to any of the first questions needs to be clarified, executing a clarification process; wherein the clarification process is used to generate a clarification question, send the clarification question to the client that sent the question to be processed, and regenerate the reply answer to any of the first questions based on the clarification result sent by the client, so as to reply to any of the first questions based on the regenerated reply answer; In the case where the reply answer to any of the first questions needs to be normalized, a normalization process is executed; wherein the normalization process is used to normalize the reply answer to any of the first questions, and reply to any of the first questions based on the normalized reply answer.
12. A problem processing device based on AI, RPA and AI Agent, characterized in that: include: A splitting module, used for splitting the problem to be processed to obtain at least one first problem; A processing module, used to obtain multiple target sentence vectors corresponding to any first question, and identify the question type to which any first question belongs; A determination module, configured to determine, based on the multiple target sentence vectors, a target document segment similar to any of the first questions from multiple candidate document segments; wherein the candidate document segment is obtained by segmenting the document content; A generating module, configured to generate a reply answer to any of the first questions according to each of the target document fragments and the question type; A reply module is used to reply to the pending questions based on the reply answers to the first questions.
13. The device according to claim 12, characterized in that The processing module is used for: Performing synonym expansion on any of the first questions to obtain at least one synonymous question; Performing embedded coding on any of the first questions to obtain a first sentence vector for any of the first questions; Performing embedded coding on each of the synonymous questions to obtain a second sentence vector for each of the synonymous questions; The first sentence vector and each of the second sentence vectors are used as the multiple target sentence vectors corresponding to any one of the first questions.
14. An electronic device, characterized in that: include: A processor and a memory, wherein the memory stores instructions, and the instructions are loaded and executed by the processor to implement the method according to any one of claims 1 to 11.
15. A computer-readable storage medium, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.