Information extraction method and device, storage medium and program product
By identifying the intent and determining the sequence of sentences during the conversation and using a large model to extract key information, the problem of quickly and accurately extracting information in the conversation is solved, and the efficiency and accuracy of information extraction are improved.
Patent Information
- Application Number
- CN202510068266.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-09-23
AI Technical Summary
During a conversation, it is difficult to quickly and accurately extract key information (such as mobile phone numbers, membership numbers, etc.), which affects business processing efficiency.
By performing intent recognition on the sentences, determining the first sequence number and the number of the first sentences, determining the second sequence number based on the intent recognition results, extracting key information from the sentences with the second sequence number, and using a large model for context understanding and information extraction.
It achieves real-time and accurate extraction of key information during the conversation, improves information extraction efficiency, and reduces resource consumption and network data overhead.
Smart Images

Figure CN120687545A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to an information extraction method, device, storage medium and program product. Background Art
[0002] During conversations, such as online chats or phone calls between customer service representatives and customers, information needed for business processing is often generated, such as mobile phone numbers and membership numbers required for intelligent work order filling and information verification. Quickly and accurately extracting this critical information is crucial for business processing. Summary of the Invention
[0003] The embodiments of the present application provide an information extraction method, device, storage medium, and program product for quickly and accurately extracting key information generated during a conversation.
[0004] In a first aspect, an embodiment of the present application provides an information extraction method, comprising: Perform intent recognition on the sentence and obtain the intent recognition result; In response to the intention recognition result being to obtain key information, determining a second sequence number based on the first sequence number of the sentence and the number of first sentences; In response to receiving the statement with the second serial number, key information is extracted based on the statements between the first serial number and the second serial number to obtain first key information.
[0005] In a second aspect, an embodiment of the present application provides an electronic device, comprising: a memory and a processor, wherein: The memory is used to store computer programs; The processor is coupled to the memory and is configured to execute the computer program stored in the memory to perform the information extraction method provided in the first aspect.
[0006] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a computer, can implement the information extraction method provided in the first aspect.
[0007] In a fifth aspect, an embodiment of the present application provides a computer program product, which stores instructions. When the instructions are executed by a computer, the computer implements the information extraction method provided in the first aspect.
[0008] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects: Considering that during a conversation, when one party has the intention to obtain key information, the other party will usually mention the corresponding key information in a subsequent conversation. Based on this, the intention recognition is performed on the sentences received during the conversation to obtain the intention recognition result; in response to the intention recognition result of the sentence being to obtain key information, the second sequence number is determined based on the first sequence number and the number of first sentences of the sentence, wherein the number of first sentences is the number of sentences required for key information extraction, and the second sequence number is the sequence number of the sentence that triggers the key information extraction. Therefore, the sentences between the first sequence number and the second sequence number can not only serve as the context of the received sentence, but also usually contain key information; further, in response to the sentence with the second sequence number, key information extraction is performed based on the sentences between the first sequence number and the second sequence number, and the first key information is accurately extracted by understanding the conversation context. In addition, the above information extraction method can be used to extract key information in real time during the conversation, that is, once the received sentence contains the intention to obtain key information, the required key information is extracted from a certain number of subsequent sentences, thereby greatly improving the efficiency of information extraction. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings: Figure 1 A schematic diagram of an implementation environment of an information extraction method provided in one embodiment of the present application; Figure 2 A flowchart of an information extraction method provided in one embodiment of the present application; Figure 3 A flowchart of an information extraction method provided in another embodiment of the present application; Figure 4 A flowchart of an information extraction method provided in yet another embodiment of the present application; Figure 5 A schematic structural diagram of an information extraction device provided in one embodiment of the present application; Figure 6 A schematic structural diagram of an electronic device provided in accordance with an embodiment of the present application. DETAILED DESCRIPTION
[0010] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0011] Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.
[0012] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, and this is merely a way of distinguishing the objects of the same attributes when describing them in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0013] Before introducing the information extraction method provided by the embodiment of the present application in detail, a brief introduction to the implementation environment involved in the embodiment of the present application is given. Figure 1 , is a schematic diagram of an implementation environment of an information extraction method provided by an embodiment of the present application, the implementation environment includes a terminal 10 and an information processing platform 20. The terminal 10 is connected to the information processing platform 20 via a wireless network or a wired network.
[0014] The terminal 10 may be at least one of a smartphone, a game console, a desktop computer, a tablet computer, an e-book reader, a laptop computer, etc. The terminal 10 may have installed and run an application that supports conversations (such as instant messaging) and information retrieval. For example, the application may be a system application, an instant messaging application, a shopping application, an online video application, an online customer service application, a social networking application, etc.
[0015] The information processing platform 20 includes at least one of a server, multiple servers, a cloud computing server, and a virtualization center. The information processing platform 20 is used to provide background services for application programs that support sessions.
[0016] For example, a user can chat online with customer service through an application on terminal 10. Terminal 10 sends the sentences generated in real time during the conversation to information processing platform 20. Information processing platform 20 deploys a large language model (LLM). Whenever information processing platform 20 receives a sentence, it calls the large language model to identify the sentence's intent. If the sentence is identified as intended to obtain key information, the large model is called to extract key information from a certain number of sentences following the sentence, obtaining the key information required for business processing.
[0017] Based on the implementation environment introduced above, the information extraction method provided in the embodiment of the present application is described in detail with reference to the accompanying drawings.
[0018] Please refer to Figure 2 , is a flow chart of an information extraction method provided in one embodiment of the present application, the method comprising the following steps: S202: Perform intent recognition on the sentence to obtain an intent recognition result.
[0019] Specifically, during a real-time conversation, each sentence is recognized for its intent and its meaning is determined. In practical applications, a large model with speech recognition capabilities can be used to perform intent recognition on the speech to determine its meaning. Alternatively, the speech can be converted to text, and then the large model can be used to perform intent recognition on the text to determine its meaning.
[0020] For example, a first prompt word (prompt) and a sentence can be concatenated and input into a large model to obtain the sentence's intent. The first prompt word indicates intent recognition for the sentence. The first prompt word can be configured as needed, such as a zero-sample prompt word or a thought chain prompt word. This embodiment of the application does not limit the form and content of the prompt word.
[0021] A large model can be any machine learning model with large parameters and complex computational results. Because large models have made significant progress in scenarios such as content generation, question answering, computation, and reasoning, using them to identify intent in sentences can quickly yield accurate results.
[0022] S204 , in response to the intention recognition result being to obtain key information, determine a second sequence number based on the first sequence number of the sentence and the number of first sentences.
[0023] The first sequence number of a statement indicates the order of statements during a conversation, helping to clearly track the location and chronological order of statements. For example, in a conversation between a customer service representative and a customer, a statement with sequence number 1 indicates that the statement is the first sentence the customer initiates, such as "I'd like to inquire about your product policies." A statement with sequence number 2 might be the customer service representative's response, such as "Our products are primarily targeted at young people."
[0024] If the intent of a sentence is to obtain key information, the corresponding key information may be mentioned in the conversation after this sentence, and the key information can be extracted from the sentence after this sentence. For example, if the sentence is "What is your contact information?", and the intent of this sentence is to obtain the key information "contact information", the contact information may be mentioned in the conversation after this sentence, and the contact information can be extracted from the sentence after this sentence.
[0025] The first number of sentences refers to the number of sentences required for this key information extraction. The first number of sentences can be set based on expert experience, or can be continuously updated based on the number of sentences actually used to extract key information during the conversation.
[0026] The second sequence number refers to the sequence number of the statement that triggers key information extraction. Specifically, the second sequence number can be determined as the sum of the first sequence number and the number of first statements. For example, if the sequence number of the currently received statement S(x) is x (i.e., the first sequence number), the statement's intent is to obtain key information, and the number of first statements is k, then the second sequence number is x+k. This means that the key information extraction operation is triggered when the statement S(x+k) with the second sequence number is received.
[0027] S206 , in response to receiving the statement with the second sequence number, extract key information based on the statements between the first sequence number and the second sequence number to obtain first key information.
[0028] The sentences between the first and second sequence numbers can not only serve as the context of the received sentences, but also usually contain key information, which helps to enhance the understanding of the conversation context during the information extraction process, thereby accurately extracting the first key information.
[0029] In one embodiment, the sentences from the first sequence number to the second sequence number may be concatenated, and key information may be extracted from the concatenated text to obtain the first key information. For example, if the first sequence number of sentence S(x) is x and the second sequence number is x+k, then sentences S(x+1) to S(x+k) may be concatenated in order, and key information may be extracted from the concatenated text to obtain the first key information.
[0030] In another embodiment, considering that the sentence with the first sequence number contains the intention to obtain key information, it may also indicate the specific type of key information to be extracted. This indication helps to improve the accuracy of information extraction. Based on this, the sentence with the first sequence number, the sentence between the first and second sequence numbers, and the sentence with the second sequence number are concatenated to obtain a first text; key information is extracted from the first text to obtain the first key information.
[0031] For example, assuming that the sentence with the first sequence number is S(x) and the sentence with the second sequence number is S(x+k), then S(x)~S(x+k) are concatenated in order to obtain the first text; key information is extracted from the first text to obtain the first key information.
[0032] In practical applications, extracting key information from text can be achieved using a large model. For example, the second prompt word and the text are concatenated and then input into the large model to obtain the key information in the text. The second prompt word is used to indicate the extraction of key information from the text.
[0033] The above describes some implementation methods of the above S206. Of course, it should be understood that the above S206 can also be implemented in other ways, and the present embodiment of the application does not limit this.
[0034] According to the above information extraction method, considering that during a conversation, when one party has the intention to obtain key information, the other party will usually mention the corresponding key information in a subsequent conversation, based on this, the intention recognition is performed on the sentence received during the conversation to obtain the intention recognition result; in response to the intention recognition result of the sentence being to obtain key information, the second sequence number is determined based on the first sequence number and the number of first sentences of the sentence, wherein the number of first sentences is the number of sentences required for key information extraction, and the second sequence number is the sequence number of the sentence that triggers the key information extraction. Therefore, the sentences between the first sequence number and the second sequence number can not only serve as the context of the received sentence, but also usually contain key information; further, in response to the sentence with the second sequence number, key information extraction is performed based on the sentences between the first sequence number and the second sequence number, so that the first key information is accurately extracted by understanding the conversation context. In addition, the above information extraction method can be used to extract key information in real time during a conversation, that is, once the received sentence contains the intention to obtain key information, the required key information is extracted from a certain number of subsequent sentences, thereby greatly improving the efficiency of information extraction.
[0035] Please refer to Figure 3 , is a flow chart of an information extraction method provided in another embodiment of the present application, the method comprising the following steps: S302: Perform intent recognition on the sentence to obtain an intent recognition result.
[0036] The specific implementation of the above S302 is the same as Figure 2 The specific implementation of S202 in the illustrated embodiment is similar and will not be repeated here.
[0037] S304 , in response to the intention recognition result being to obtain key information, determine a second sequence number based on the first sequence number of the sentence and the number of first sentences.
[0038] The specific implementation of the above S304 is the same as Figure 2 The specific implementation of S204 in the illustrated embodiment is similar and will not be described in detail.
[0039] S306 , in response to receiving the statement with the second sequence number, extract key information based on the statements between the first sequence number and the second sequence number to obtain first key information.
[0040] The specific implementation of the above S306 is the same as Figure 2 The specific implementation of S206 in the illustrated embodiment is similar and will not be repeated here.
[0041] S308, determining the third serial number of the sentence of the first key information source.
[0042] The sentence from which the first key information comes is the sentence from which the first key information is extracted. For example, if key information m is extracted from the nth sentence in the conversation, the third sequence number is n.
[0043] S310: Based on the third sequence number and the first number of sentences, the second number of sentences required for the next key information extraction is obtained.
[0044] In one embodiment, the above S310 includes the following steps: determining the difference between the third serial number and the first serial number; based on the difference, determining the number of third sentences used for key information extraction this time; determining the average of the number of third sentences and the number of first sentences as the second number of sentences.
[0045] For example, after identifying that the sentence S(x) with sequence number x is intended to obtain key information, if the number of sentences required for key information extraction this time is k, then key information extraction is performed on S(x) to S(x+k). Assuming that key information is extracted from sentence S(x+k'), and k'<k, the number of sentences required for key information extraction next time = (k+k') / 2.
[0046] Since the average of the number of third sentences and the number of first sentences reflects the average level of the number of sentences required to extract key information, using this average as the number of sentences required for the next key information extraction can not only ensure the accurate and comprehensive extraction of key information, but also avoid the situation where insufficient number of sentences leads to insufficient understanding of the conversation context and affects the accuracy of information extraction, as well as avoid the situation where too many sentences affect the efficiency of information extraction and cause resource consumption.
[0047] In another embodiment, taking into account that there may be a deviation in the number of first sentences, for example, the number of first sentences is too small and the key information cannot be extracted or cannot be fully extracted, for this reason, the deviation is introduced on the basis of the number of first sentences, that is, a certain number of sentences are selected after the sentence with the second serial number to extract the key information again. If the key information extracted twice is consistent, it indicates that the number of first sentences is appropriately selected and the key information extracted last time is accurate. Then, the number of sentences actually used for the key information extraction last time is used to determine the number of sentences required for the next key information extraction, thereby providing data support for the accurate and efficient extraction of key information next time.
[0048] Specifically, before the above S310, the process further includes: determining a fourth sequence number based on the second sequence number and the first quantity deviation of the key information extracted this time; in response to receiving the sentence with the fourth sequence number, extracting key information based on the sentences between the first sequence number and the fourth sequence number to obtain the second key information; and comparing the first key information with the second key information. Accordingly, in the above S310, if the first key information is consistent with the second key information, then determining the second number of sentences required for the next key information extraction based on the third sequence number and the first number of sentences.
[0049] The first quantity deviation may be set based on expert experience, or may be continuously updated based on an actual quantity deviation during a session.
[0050] The fourth sequence refers to the sequence number of the sentence for which key information is extracted again. The specific implementation method for extracting key information based on the sentences between the first sequence number and the fourth sequence number is the same as the above Figure 2 The specific implementation of S206 in the illustrated embodiment is similar and will not be repeated here.
[0051] For example, after identifying that the intention of the statement S(x) with sequence number x is to obtain key information, if the number of statements required for this key information extraction is k, key information extraction is performed on statements S(x)~S(x+k). Assuming that key information m is extracted from statement S(x+k'), k'≤k, and the first quantity deviation is 3σ, then the fourth sequence number is x+k+3σ, and then when statement S(x+k+3σ) is received, key information extraction is performed again on statements S(x)~S(x+k+3σ) to obtain key information m'. If the key information m is consistent with the key information m', it indicates that the first number of statements k is appropriately selected, and then the number of statements required for the next key information extraction is determined to be (k+k') / 2.
[0052] In another embodiment, considering that a certain number of statements are selected after the statement with the second serial number to extract key information again, and the key information extracted twice is inconsistent, it indicates that the first number of statements selected is inappropriate, and the key information extracted the previous time is inaccurate, and then the number of statements actually used for the next key information extraction is determined to determine the number of statements required for the next key information extraction, providing data support for the accurate and efficient extraction of key information next time.
[0053] Specifically, after comparing the first key information and the second key information as mentioned above, it also includes: if the first key information is inconsistent with the second key information, determining the fifth serial number of the sentence from which the second key information comes; based on the fifth serial number and the number of first sentences, obtaining the number of second sentences required for the next key information extraction.
[0054] As an example, the second number of statements is determined as follows: determine the difference between the fifth serial number and the first serial number; based on the difference, determine the number of statements actually used for key information extraction this time; determine the average of the number of statements and the number of first statements as the second number of statements.
[0055] For example, after identifying that the intention of the statement S(x) with sequence number x is to obtain key information, if the number of statements required for this key information extraction is k, key information extraction is performed on statements S(x)~S(x+k). Assuming that key information m is extracted from statement S(x+k'), k' ≤ k, and the first quantity deviation is 3σ, then the fourth sequence number is x+k+3σ. Then, when statement S(x+k+3σ) is received, key information extraction is performed again on statements S(x)~S(x+k+3σ), and key information m' is extracted from S(x+k+k''), k''≤ 3σ. If the key information m is inconsistent with the key information m', it indicates that the first number of statements k is not appropriately selected, and the number of statements required for the next key information extraction is determined to be (k+k'') / 2.
[0056] In another embodiment, after obtaining the second number of sentences required for the next key information extraction based on the third serial number and the first number of sentences, it also includes: determining the first number of sentences, the second number of sentences and the fourth number of sentences required for the key information extraction before this time, and determining the standard deviation; based on the standard deviation, determining the second quantity deviation for the next key information extraction.
[0057] For example, if the number of first sentences is k, the number of second sentences is k'', and the number of fourth sentences required for key information extraction before this is k''', then the standard deviation σ of these sentence numbers is calculated; then, according to the Laida criterion, the second number deviation for the next key information extraction is determined to be 3σ.
[0058] Through this approach, the deviation in the number of sentences considered for key information extraction is continuously updated during a conversation. This is based on the standard deviation of the number of sentences required for each key information extraction step. Because the standard deviation reflects the degree of dispersion or fluctuation in the number of sentences, updating the sentence number deviation based on this standard deviation helps more accurately locate segments containing key information, reduces interference from other conversational content on the information extraction process, and further improves the efficiency and accuracy of key information extraction.
[0059] The above describes some implementation methods of the above-mentioned S310. Of course, it should be understood that the above-mentioned S310 can also be implemented in other ways, and the embodiments of the present application are not limited to this. For example, after determining the number of third sentences used for the current key information extraction, the smaller value between the number of third sentences and the number of first sentences is determined as the number of second sentences required for the next key information extraction.
[0060] Through the information extraction method provided in this embodiment, the number of sentences required for key information extraction is continuously updated during the conversation, and the update is based on the number of sentences actually used to extract the key information. This helps to more accurately locate the fragments containing key information, reduce the interference of other conversation content on the information extraction process, and further improve the efficiency and accuracy of key information extraction.
[0061] In order to facilitate the understanding of the information extraction method provided in the embodiment of the present application, the following Figure 4 The information extraction method provided in the embodiments of the present application is described in detail.
[0062] like Figure 4As shown, during the conversation, every time a sentence is generated, the large model is called to identify the intent of the sentence to obtain the intent recognition result of the sentence; if the intent recognition result of the sentence is to obtain key information, assuming that the sentence is the x-th sentence, the number of first sentences required for this key information extraction is k, then the second serial number of the sentence that triggers the key information extraction is determined to be x+k.
[0063] As the conversation progresses, when the x+kth statement is generated, a key information extraction operation is triggered. This operation feeds statements x through x+k into the big model. Leveraging the big model's semantic understanding of the conversation context and its information processing capabilities, the big model extracts key information m and returns it to the business side. The big model also records the third sequence number of the statement from which key information m originated, for example, n.
[0064] Furthermore, based on the second sequence number x+k and the first quantitative deviation 3σ of this key information extraction, a fourth sequence number x+k+3σ is determined for the sentence that triggers key information extraction again. As the conversation progresses, when the x+k+3σth sentence is generated, the key information extraction operation is triggered again. This means that sentences x through x+k+3σth are fed into the big model. Leveraging the big model's semantic understanding of the conversation context and its information processing capabilities, the key information m' is extracted. Simultaneously, the big model also records the fifth sequence number of the sentence from which the key information m' originates, for example, the fifth sequence number is n'.
[0065] Further, the key information m and the key information m' are compared; if the two are consistent, it indicates that the information extraction result is correct, and there is no need to notify the business party to correct the key information m. At the same time, based on the third serial number n and the first number of sentences k, the second number of sentences k' required for the next key information extraction is determined; if the key information m and the key information m' are inconsistent, it indicates that the information extraction result is incorrect, and the key information m' extracted for the second time is returned to the business party to notify the business party to correct the existing key information m. At the same time, based on the fifth serial number n' and the first number of sentences k, the second number of sentences k' required for the next key information extraction is determined.
[0066] In addition, based on the first sentence number k, the second sentence number k' and the number of sentences required for each key information extraction before, the standard deviation σ' is determined, and then the second quantity deviation 3σ' for the next key information extraction is determined.
[0067] Repeat the above process until the session ends.
[0068] In the above embodiment, the use of a large model to associate conversation context and key information extraction capabilities can more accurately extract key information in combination with actual semantics, eliminating erroneous information during the communication process between the parties in the conversation. Secondly, for some key information features that are not obvious or require a certain degree of summarization and induction capabilities, such as product classification and problem classification, the induction and summarization capabilities of the large model can be used to normalize and standardize the information. Thirdly, by combining actual application data, the sentences required to extract key information are obtained, and through self-training, multiple sentences that may contain key information can be more accurately obtained and analyzed, eliminating the interference of redundant sentences on the large model as much as possible, and improving the analysis efficiency of the large model. Finally, through the above solution, key information can be obtained more accurately and quickly in real-time conversation scenarios and fed back to the business party in a timely manner. At the same time, the number and content of sentences can be better controlled, reducing network data overhead and large model analysis overhead.
[0069] Based on the same inventive concept, the present application also provides an information extraction device. Figure 5 , is a structural diagram of an information extraction device 500 provided in an embodiment of the present application, the device 500 includes: an identification module 510, a first response module 520 and a second response module 530.
[0070] The recognition module 510 is used to perform intent recognition on the sentence and obtain an intent recognition result.
[0071] The first response module 520 is configured to determine a second sequence number based on the first sequence number of the sentence and the number of first sentences in response to the intention recognition result being to obtain key information.
[0072] The second response module 530 is configured to extract key information based on the statements between the first sequence number and the second sequence number in response to receiving the statement with the second sequence number, so as to obtain first key information.
[0073] In another embodiment, the second response module is configured to: splicing the sentence with the first sequence number, the sentence between the first sequence number and the second sequence number, and the sentence with the second sequence number to obtain a first text; Key information is extracted from the first text to obtain first key information.
[0074] In another embodiment, the information extraction device 500 further includes: a first determining module, configured to determine a third serial number of the sentence of the first key information source; The second determining module is used to obtain the second number of sentences required for the next key information extraction based on the third serial number and the first number of sentences.
[0075] In another embodiment, the second determining module is configured to: determining a difference between the third sequence number and the first sequence number; Based on the difference, determining the number of third sentences used for this key information extraction; An average of the third number of statements and the first number of statements is determined as the second number of statements.
[0076] In another embodiment, the information extraction device further comprises: a third determining module, configured to determine a fourth serial number based on the second serial number and a first quantity deviation for this key information extraction; a third response module, configured to extract key information based on the sentences between the first sequence number and the fourth sequence number in response to receiving the sentence with the fourth sequence number, to obtain second key information; a comparison module, configured to compare the first key information with the second key information; The second determining module is configured to obtain the number of second statements required for the next key information extraction based on the third sequence number and the number of the first statements if the first key information is consistent with the second key information.
[0077] In another embodiment, the information extraction device 500 further includes: a fourth determining module, configured to determine a fifth sequence number of a sentence from which the second key information is derived if the first key information is inconsistent with the second key information; The fifth determining module is used to obtain the second number of sentences required for the next key information extraction based on the fifth sequence number and the first number of sentences.
[0078] In another embodiment, the information extraction device 600 further includes: A sixth determining module, configured to determine a standard deviation based on the number of the first sentences, the number of the second sentences, and the number of the fourth sentences required for the previous key information extraction; The seventh determination module is used to determine a second quantity deviation for the next key information extraction based on the standard deviation.
[0079] Obviously, the information extraction device 500 provided in the embodiment of the present application can be used as the above Figure 2 The execution subject of the information extraction method shown in FIG. Figure 2 Since the principle is the same, the functions realized will not be described in detail.
[0080] Figure 6This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Figure 6 At the hardware level, the electronic device includes a processor and, optionally, an internal bus, a network interface, and memory. The memory may include internal memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the electronic device may also include other hardware required for its services.
[0081] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, Figure 6 Only one bidirectional arrow is used in the diagram, but this does not mean that there is only one bus or one type of bus.
[0082] The memory is used to store programs. Specifically, the program may include program code, which includes computer operating instructions. The memory may include internal memory and non-volatile memory, and provides instructions and data to the processor.
[0083] The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it, forming a training device for the graph convolutional network at the logical level. The processor executes the program stored in the memory and is specifically used to perform the following operations: Perform intent recognition on the sentence and obtain the intent recognition result; In response to the intention recognition result being to obtain key information, determining a second sequence number based on the first sequence number of the sentence and the number of first sentences; In response to receiving the statement with the second serial number, key information is extracted based on the statements between the first serial number and the second serial number to obtain first key information.
[0084] The above application Figure 2The methods performed by the information extraction device disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be performed by hardware integrated logic circuits within the processor or by software instructions. The above processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The methods, steps, and logic block diagrams disclosed in the embodiments of this application can be implemented or executed. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly implemented and executed by a hardware decoding processor, or by a combination of hardware and software modules within the decoding processor. The software module can be located in a storage medium well-known in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and, in conjunction with its hardware, completes the steps of the above method.
[0085] The electronic device may also perform Figure 2 Method, and realize information extraction device in Figure 2 The functions of the illustrated embodiment will not be described in detail in the embodiments of the present application.
[0086] Of course, in addition to software implementation, the electronic device of this application does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0087] The embodiment of the present application also provides a computer-readable storage medium, which stores one or more programs, wherein the one or more programs include instructions, which, when executed by a portable electronic device including multiple application programs, can enable the portable electronic device to execute Figure 2 The method of the embodiment shown is specifically used to perform the following operations: Perform intent recognition on the sentence and obtain the intent recognition result; In response to the intention recognition result being to obtain key information, determining a second sequence number based on the first sequence number of the sentence and the number of first sentences; In response to receiving the statement with the second serial number, key information is extracted based on the statements between the first serial number and the second serial number to obtain first key information.
[0088] An embodiment of the present application also provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute some or all of the steps in the information extraction method provided in the embodiment of the present application.
[0089] In short, the above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
[0090] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0091] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0092] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0093] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.
Claims
1. An information extraction method, characterized in that: include: Perform intent recognition on the sentence and obtain the intent recognition result; In response to the intention recognition result being to obtain key information, determining a second sequence number based on the first sequence number of the sentence and the number of first sentences; In response to receiving the statement with the second serial number, key information is extracted based on the statements between the first serial number and the second serial number to obtain first key information.
2. The method according to claim 1, characterized in that The extracting key information based on the sentence between the first sequence number and the second sequence number to obtain the first key information includes: splicing the sentence with the first sequence number, the sentence between the first sequence number and the second sequence number, and the sentence with the second sequence number to obtain a first text; Key information is extracted from the first text to obtain first key information.
3. The method according to claim 1, characterized in that After extracting key information based on the sentences between the first sequence number and the second sequence number in response to receiving the sentence with the second sequence number to obtain the first key information, the method further includes: Determine the third serial number of the sentence of the first key information source; Based on the third sequence number and the first number of sentences, the second number of sentences required for the next key information extraction is obtained.
4. The method according to claim 3, characterized in that The obtaining, based on the third sequence number and the first number of sentences, the number of second sentences required for the next key information extraction includes: determining a difference between the third sequence number and the first sequence number; Based on the difference, determining the number of third sentences used for this key information extraction; An average of the third number of statements and the first number of statements is determined as the second number of statements.
5. The method according to claim 3, characterized in that Before obtaining the second number of sentences required for the next key information extraction based on the third sequence number and the first number of sentences, the method further includes: Determining a fourth serial number based on the second serial number and the first quantity deviation of the key information extracted this time; In response to receiving the statement with the fourth sequence number, extracting key information based on the statements between the first sequence number and the fourth sequence number to obtain second key information; comparing the first key information and the second key information; The obtaining, based on the third sequence number and the first number of sentences, the number of second sentences required for the next key information extraction includes: If the first key information is consistent with the second key information, the number of second sentences required for the next key information extraction is obtained based on the third sequence number and the number of the first sentences.
6. The method according to claim 5, characterized in that After comparing the first key information and the second key information, the method further includes: If the first key information is inconsistent with the second key information, determining the fifth sequence number of the sentence from which the second key information comes; Based on the fifth sequence number and the first number of sentences, the second number of sentences required for the next key information extraction is obtained.
7. The method according to claim 5, characterized in that After obtaining the second number of sentences required for the next key information extraction based on the third sequence number and the first number of sentences, the method further includes: determining a standard deviation based on the number of the first sentences, the number of the second sentences, and the number of the fourth sentences required for the previous key information extraction; Based on the standard deviation, a second quantity deviation for the next key information extraction is determined.
8. An electronic device, characterized in that: include: Memory and processor, wherein The memory is used to store computer programs; The processor is coupled to the memory and is used to execute the computer program stored in the memory to perform the information extraction method described in any one of claims 1 to 7.
9. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer, can implement the information extraction method according to any one of claims 1 to 7.
10. A computer program product, characterized in that The computer program product stores instructions, which, when executed by a computer, cause the computer to implement the information extraction method according to any one of claims 1 to 7.