Time information processing method, device, electronic device and storage medium
By identifying candidate times and intentions in the conversation, determining the target message and determining its time information, the problem of inaccurate execution time caused by insufficient time information in the conversation is solved, and accurate target operation time determination is achieved.
Patent Information
- Application Number
- CN202111217421.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-02-21
- Estimated Expiration
- 2041-10-19
AI Technical Summary
In the dialogue field, it is impossible to accurately determine the time to perform target operations such as event reminder, quality inspection and auxiliary response based solely on time information, resulting in the possibility of performing operations at the wrong time.
By obtaining multiple messages in the conversation, identifying whether each message contains a candidate time for executing a target operation and whether it belongs to the target operation, the target message is determined, and the execution of the target operation is determined based on the time information in the target message. time.
It is possible to accurately determine the execution time of the target operation, avoiding operational errors caused by time errors.
Smart Images

Figure CN113887210B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information processing technology, and in particular to a method, device, electronic device and storage medium for processing time information. Background Art
[0002] In the field of conversation, such as customer service conversation, it is necessary to identify and extract time information in the conversation so as to implement target operations such as event reminders, quality inspections, and assisted answers based on the time information. However, it is impossible to accurately determine the time to perform target operations such as event reminders, quality inspections, and assisted answers based solely on time information. For example, "It is not convenient to answer the phone at 12 o'clock tomorrow." If a customer is called based on the identified "12 o'clock", the customer will be called at the wrong time. Summary of the invention
[0003] The present disclosure aims to solve at least one of the problems in the above-mentioned technology to some extent.
[0004] The present disclosure proposes a method, device, electronic device and storage medium for processing time information, so as to determine the target message from each message according to whether each message contains a candidate time for executing the target operation and whether it belongs to the target intention of the target operation, and then determine the execution time of the target operation according to the time information of the target operation contained in the target message, thereby accurately determining the execution time of the target operation.
[0005] The first aspect of the present disclosure proposes a method for processing time information, including: obtaining multiple messages in a conversation; identifying each of the messages to determine whether each of the messages contains a candidate time for performing a target operation, and whether each of the messages belongs to a target intention of denying the target operation; determining a target message from each of the messages; wherein the target message contains a candidate time for performing the target operation, and each message in the conversation that is after the target message does not belong to the target intention; determining the target time for performing the target operation based on the time information for performing the target operation contained in the target message.
[0006] In the above technical scheme, the target message is determined from each message based on whether each message contains a candidate time for executing the target operation and whether it belongs to the target intention of the target operation. Then, the execution time of the target operation is determined based on the time information of the target operation contained in the target message. In this way, the execution time of the target operation can be accurately determined.
[0007] Optionally, determining the target message from each message includes: determining the message in the conversation containing the candidate time as a candidate message; for any candidate message, when it is determined that it belongs to the target intention, marking the candidate time contained in each candidate message before the candidate message as invalid; and using the candidate message without the invalid mark as the target message.
[0008] Optionally, taking the candidate message without the invalid mark as the target message includes: when there are multiple candidate messages without the invalid mark, taking the candidate message without the invalid mark that is sorted later in the conversation as the target message.
[0009] Optionally, the identifying of each of the messages to determine whether each of the messages contains a candidate time for performing the target operation and whether each of the messages belongs to a target intention of negating the target operation includes: identifying a time text for each of the messages; generating a time sequence based on the identified time text, wherein the time sequence includes the time texts contained in each message, and each of the time texts is sorted according to an order in the conversation; identifying whether each time text in the time sequence belongs to a candidate time for performing the target operation; and, identifying whether each of the messages belongs to the target intention.
[0010] Optionally, the identifying whether each time text in the time sequence belongs to a candidate time for executing the target operation includes: for any time text in the time sequence, inputting the message to which the time text belongs and at least one message before it into a first recognition model to identify whether the time text belongs to a candidate time for executing the target operation.
[0011] Optionally, identifying whether each message belongs to the target intent includes: for any message in the conversation, inputting the message and at least one message before the message into a second recognition model to identify whether the message belongs to the target intent.
[0012] The second aspect of the present application proposes a time information processing device, including: an acquisition module, used to acquire multiple messages in a conversation; an identification module, used to identify each of the messages to determine whether each of the messages contains a candidate time for performing a target operation, and whether each of the messages belongs to a target intention of denying the target operation; a first determination module, used to determine a target message from each message; wherein the target message contains a candidate time for performing the target operation, and each message in the conversation that is after the target message does not belong to the target intention; a second determination module, used to determine the target time for performing the target operation based on the time information for performing the target operation contained in the target message.
[0013] The third aspect embodiment of the present application proposes an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the time information processing method proposed in the first aspect embodiment of the present application.
[0014] The fourth aspect embodiment of the present application proposes a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to enable the computer to execute the time information processing method proposed in the first aspect embodiment of the present application.
[0015] The fifth aspect embodiment of the present application proposes a computer program product. When the instruction processor in the computer program product executes, the time information processing method proposed in the first aspect embodiment of the present application is executed.
[0016] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0018] Figure 1 A schematic diagram of a flow chart of a method for processing time information provided in Embodiment 1 of the present disclosure;
[0019] Figure 2 A flowchart of a method for processing time information provided in Embodiment 2 of the present disclosure;
[0020] Figure 3 A flowchart of a method for processing time information provided in Embodiment 3 of the present disclosure;
[0021] Figure 4 A schematic diagram of a flow chart of a method for processing time information according to an embodiment of the present disclosure;
[0022] Figure 5 A schematic flow chart of a method for processing time information according to another embodiment of the present disclosure;
[0023] Figure 6 A schematic diagram of the structure of a time information processing device provided by an embodiment of the present disclosure;
[0024] Figure 7 The invention is a block diagram of an electronic device showing a method for processing time information according to an exemplary embodiment. DETAILED DESCRIPTION
[0025] Embodiments of the present disclosure are described in detail below, examples of which 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 intended to be used to explain the present disclosure, and should not be construed as limiting the present disclosure.
[0026] The following describes a method, device, electronic device, and storage medium for processing time information according to an embodiment of the present disclosure with reference to the accompanying drawings.
[0027] Figure 1 This is a flow chart of a method for processing time information provided in the first embodiment of the present disclosure. It should be noted that the method for processing time information can be applied to a device for processing time information in the embodiment of the present disclosure, and the device can be configured in an electronic device. The electronic device can be a mobile terminal, such as a mobile phone, a tablet computer, a personal digital assistant, or other hardware device with various operating systems.
[0028] like Figure 1 As shown, the method for processing the time information may include the following steps:
[0029] Step 101, obtaining multiple messages in a conversation.
[0030] In the disclosed embodiment, multiple speeches of the speaker in the conversation may be obtained, and the multiple speeches of the speaker in the conversation may be correspondingly regarded as multiple messages in the conversation.
[0031] Step 102 , identifying each message to determine whether each message contains a candidate time for executing the target operation, and whether each message belongs to a target intention of negating the target operation.
[0032] Furthermore, content recognition is performed on each of the multiple messages in the conversation, and it is determined based on the recognized content whether each message contains a candidate time for executing the target operation, and whether each message belongs to the target intention of negating the target operation. For example, the message is "Don't call me before 12 o'clock", and the target intention is to call back. By performing content recognition on the message, it can be determined that the message does not contain a candidate time for performing the target operation, and the message belongs to the target intention of denying the target operation; for another example, the message is "It's inconvenient, call me back after 12 o'clock", and the target intention is to call back. By performing content recognition on the message, it can be determined that the message contains a candidate time for performing the target operation, and the message belongs to the target intention of denying the target operation; for another example, the message is "Okay, I have other things to do after 12 o'clock", and the target intention is to call back. By performing content recognition on the message, it can be determined that the message does not contain a candidate time for performing the target operation, and the message does not belong to the target intention of denying the target operation; for another example, the message is "You can call me before 12 noon tomorrow", and the target intention is to call back. By performing content recognition on the message, it can be determined that the message contains a candidate time for performing the target operation, and the message does not belong to the target intention of denying the target operation.
[0033] Step 103, determining a target message from each message; wherein the target message includes a candidate time for performing a target operation, and each message after the target message in the conversation does not belong to the target intention.
[0034] In an embodiment of the present disclosure, a target message can be determined from each message based on whether each message contains a candidate time for performing a target operation and whether each message belongs to the target intention of negating the target operation. The target message contains a candidate time for performing the target operation, and each message after the target message in the conversation does not belong to the target intention of negating the target operation.
[0035] For example, taking the target operation as a call back, the multiple messages in the conversation are shown in Table 1.
[0036] Table 1. Messages in a conversation
[0037]
[0038] By identifying the six messages in Table 1, it can be determined that the messages containing candidate times for call back are messages 2 to 5, the message with the target intention of denying the call back is message 3, and the messages that do not have the target intention of denying the call back are messages 2, 1, and 5. Message 5 is a rewrite of message 4 and is the target message.
[0039] Step 104: Determine the target time for executing the target operation according to the time information for executing the target operation contained in the target message.
[0040] In the embodiment of the present disclosure, the time information for executing the target operation contained in the target message is used as the target time for executing the target operation. For example, the target message in Table 1 is "can be called before 10 o'clock", and the final call back time can be determined to be before 10 o'clock tomorrow morning. It should be noted that in order to improve the feasibility of the embodiment of the present disclosure, for the target time for executing the target operation is "before x o'clock" or "after x o'clock", the target time for executing the target operation can be set to N minutes forward of the target time or N minutes backward of the target time. For example, if the target time for executing the target operation is "before 12 o'clock", the target time for executing the target operation can be set to "11:57"; for another example, if the target time for executing the target operation is "after 12 o'clock", the target time for executing the target operation can be set to "12:03".
[0041] In summary, the target message is determined from each message by whether it contains a candidate time for executing the target operation and whether it belongs to the target intention of the target operation. Then, the execution time of the target operation is determined based on the time information of the target operation contained in the target message. In this way, the execution time of the target operation can be accurately determined.
[0042] In order to accurately determine the target message from each message, Figure 2 As shown, Figure 2 This is a flow chart of a method for processing time information provided in the second embodiment of the present disclosure. In the embodiment of the present disclosure, a message containing a candidate time for executing a target operation in a conversation can be determined as a candidate message, and a candidate message without an invalid mark can be used as a target message. Figure 2 The illustrated embodiment may include the following steps:
[0043] Step 201, obtaining multiple messages in a conversation.
[0044] Step 202 , identifying each message to determine whether each message contains a candidate time for executing the target operation, and whether each message belongs to a target intention of negating the target operation.
[0045] Step 203: Determine the message containing the candidate time in the conversation as a candidate message.
[0046] In the embodiment of the present disclosure, the message content of each message is identified to determine whether each message contains a candidate time for performing the target operation, and whether each message belongs to the target intention of denying the target operation, and the message containing the candidate time for performing the target operation is used as a candidate message.
[0047] Step 204, for any candidate message, when it is determined that it belongs to the target intention, the candidate time contained in each candidate message before the candidate message is marked as invalid.
[0048] Step 205: The candidate messages that do not have an invalid mark are used as target messages.
[0049] Furthermore, for any candidate message, it can be determined whether the candidate message belongs to the target intention of negating the target operation. If the message belongs to the target intention of negating the target operation, the candidate time contained in each candidate message before the message can be marked as invalid. If there is only one candidate message without an invalid mark, the candidate message without an invalid mark can be used as the target message. If there are multiple candidate messages without an invalid mark, the candidate message with an invalid mark that is ranked later in the conversation can be used as the target message. Among them, the target message contains the candidate time for performing the target operation, and each message after the target message in the conversation does not belong to the target intention.
[0050] For example, in Table 1, messages 2 to 5 are candidate messages, and message 3 belongs to the target intention of negating the target operation. The candidate time contained in message 2 before message 3 can be marked as invalid. Messages 4 and 5 do not have invalid marks, and the candidate message 5 with an invalid mark ranked later is the target message.
[0051] Step 206: Determine the target time for executing the target operation according to the time information for executing the target operation contained in the target message.
[0052] In the embodiments of the present disclosure, steps 201-202 and step 206 may be implemented in any manner in the embodiments of the present application, respectively. The embodiments of the present application do not limit this and will not be described in detail.
[0053] In summary, by determining the message containing the candidate time in the conversation as the candidate message; for any candidate message, if it is determined to belong to the target intention, marking the candidate time contained in the candidate messages before the candidate message as invalid; and taking the candidate message without the invalid mark as the target message. In this way, the target message can be accurately determined from the messages.
[0054] In order to accurately determine whether each message contains a candidate time for executing the target operation, and whether each message belongs to the target intention of negating the target operation, such as Figure 3 As shown, Figure 3 A flowchart of a method for processing time information provided in Embodiment 3 of the present disclosure. In the embodiment of the present disclosure, a time sequence can be generated based on the time text in the message, and each time text in the time sequence can be identified to determine whether each message contains a candidate time for executing a target operation, and whether each message belongs to a target intention of negating the target operation. Figure 3 The illustrated embodiment may include the following steps:
[0055] Step 301, obtaining multiple messages in a conversation.
[0056] Step 302, identifying the time text for each message.
[0057] In the disclosed embodiment, time text recognition can be performed on each message. Optionally, according to a preset regular expression, text content matching one or more preset regular expressions can be extracted from each message, and the matching text content can be parsed to obtain the corresponding time text, wherein it should be noted that each preset regular expression corresponds to a parsing method field, and the parsing method field can be used to parse the time text to a specific time point. For example, as shown in Table 2, text content matching the preset regular expression can be extracted from each message, as shown in Table 3, and further, based on the current time, the matching text content can be processed according to the parsing method to obtain the corresponding time text. For example, the matching text content is "May 8, 2021", and the corresponding time text obtained is "2021-05-08"; for another example, the matching text content is "before 6 pm", and the corresponding time text obtained is "2021-05-01 18:00:00"; for another example, the matching text content is "within 24 hours", and the corresponding time text obtained is "2021-05-02 13:14:15".
[0058] Table 2 Extracting text content that matches the preset regular expression
[0059]
[0060] Table 3 Processing of matching text content according to parsing method
[0061]
[0062] It should be noted that in order to effectively identify the time text in each message, before identifying the time text for each message, the text of each message in the conversation can be cleaned. For example, the uppercase English words in each message can be converted to lowercase, Chinese numerals can be converted to Arabic numerals, Traditional Chinese can be converted to Simplified Chinese, full-width characters can be converted to half-width characters, emoticons can be removed, non-text messages can be removed, blank messages can be removed, pure symbol messages can be removed, and URL (Uniform Resource Locator) links can be removed.
[0063] Step 303: Generate a time sequence based on the identified time text, wherein the time sequence includes the time text contained in each message, and each time text is sorted according to the order in the conversation.
[0064] It is important to understand that for each message in a conversation, each message can be marked with a serial number according to the order in which it is sent, and at the same time, the speaker of the message and the speaking time can be marked. The speaker can be used to mark which speaker sent the message, and the speaking time can be used to mark the sending time of the message, so that the subsequent calculation time is based on the speaking time.
[0065] In the embodiment of the present disclosure, after the time text is identified, each time text can be arranged in sequence according to the marking order of each message in the conversation, and the arrangement result is used as a time sequence. It should be noted that the time sequence may include: the time text, the parsing method corresponding to the time text, the starting position of the time text in the message, and the ending position of the time text in the message.
[0066] Step 304, identifying whether each time text in the time sequence belongs to a candidate time for executing the target operation; and identifying whether each message belongs to the target intention.
[0067] Furthermore, each time text in the time series may be identified to determine whether the time text belongs to a candidate time for executing the target operation.
[0068] Optionally, for any time text in the time sequence, the message to which the time text belongs and at least one message before the time text are input into the first recognition model to identify whether the time text belongs to a candidate time for executing the target operation.
[0069] For example, as shown in Table 4, if the time text in the time series is "before 2 o'clock this afternoon", the message corresponding to the time text "before 2 o'clock this afternoon" and the previous message "I will call you back before 12 o'clock tomorrow noon. When is it convenient for you to answer the phone?" are input into the first recognition model, and the model can recognize the time text and determine that the message corresponding to the time text "before 2 o'clock this afternoon" is a sentence expressing the call back time, indicating that the time text belongs to the candidate time for executing the target operation. For another example, if the time text in the time series is "before 12 o'clock", the message corresponding to the time text "don't call me before 12 o'clock" and the previous messages "book me a flight to Beijing on May 21", "when is it convenient for you to receive the goods?" and "before 2 o'clock this afternoon" are input into the first recognition model, and the model can recognize the time text and determine that the message corresponding to the time text "before 12 o'clock" is not a sentence expressing the call back time, indicating that the time text does not belong to the candidate time for executing the target operation. It should be noted that the first recognition model can be a trained neural network model.
[0070] Table 4 Identify whether the time text belongs to the call back time
[0071]
[0072]
[0073] In an embodiment of the present disclosure, while identifying each time text in the time series to determine whether the time text belongs to a candidate time for performing a target operation, each message in the conversation can be identified to determine whether the message belongs to the target intention of negating the target operation.
[0074] Optionally, for any message in the conversation, the message and at least one message before the message are input into the second recognition model to identify whether the message belongs to the target intention of negating the target operation.
[0075] For example, as shown in Table 5, for example, the message "I am not available this afternoon" and the previous message "I will call you back before 18:00 in the afternoon" are input into the second recognition model, and the model can recognize the message and determine that the message "I am not available this afternoon" is a negative call back, indicating that the message belongs to the target intention of negating the target operation. For another example, the message "OK" and the previous message "I will call you back before 12:00 noon tomorrow" are input into the second recognition model, and the model can recognize the message and determine that the message "OK" is a non-negative call back, indicating that the message does not belong to the target intention of negating the target operation. It should be noted that the second recognition model can be a trained neural network model.
[0076] Table 5 Identification of whether the message is a negative call back
[0077]
[0078] It should be noted that after messages containing time text are identified by the first recognition model and the second recognition model, the messages containing time text can be divided into the following categories: the time text in the message belongs to the candidate time for performing the target operation, and the message belongs to the target intention of denying the target operation, the time text of the message does not belong to the candidate time for performing the target operation, and the message belongs to the target intention of denying the target operation, the time text in the message belongs to the candidate time for performing the target operation, and the message does not belong to the target intention of denying the target operation, and the time text of the message does not belong to the candidate time for performing the target operation, and the message does not belong to the target intention of denying the target operation.
[0079] For example, as shown in Table 6, taking the candidate time for executing the target operation as the call back time and the target intention of negating the target operation as the negative call back as an example, the "before 12 o'clock" in the message "Don't call me before 12 o'clock" is a non-call back time and a negative call back, the "12 o'clock" in the message "It's inconvenient, call me after 12 o'clock" is a call back time, and the message is a negative call back, the "after 12 o'clock" in the message "Okay, I have other things after 12 o'clock" is a non-call back time, and the message is a non-negative call back, and the "before 12 o'clock" in the message "Call me before 12 o'clock" is a call back time, and the message is a non-negative call back.
[0080] Table 6 Message categories containing time text
[0081] Don't call me before 12 o'clock No call back time Negative call back It's not convenient. Please call me after 12 o'clock. Call back time Negative call back Okay, I have something else to do after 12 o'clock. No call back time Non-negative call back Call me before 12 o'clock Call back time Non-negative call back
[0082] Step 305, determining a target message from each message; wherein the target message includes a candidate time for performing a target operation, and each message after the target message in the conversation does not belong to the target intention.
[0083] Step 306: Determine the target time for executing the target operation according to the time information for executing the target operation contained in the target message.
[0084] In the embodiment of the present disclosure, step 301 and steps 306-306 can be implemented in any way in the embodiments of the present application respectively, and the embodiments of the present application do not limit this and will not be repeated.
[0085] In summary, by identifying the time text of each message; generating a time sequence based on the identified time text, wherein the time sequence includes the time text contained in each message, and each time text is sorted according to the order in the conversation; identifying whether each time text in the time sequence belongs to the candidate time for executing the target operation; and identifying whether each message belongs to the target intention. In this way, it can be accurately determined whether each message contains the candidate time for executing the target operation, and whether each message belongs to the target intention of negating the target operation.
[0086] In order to make those skilled in the art understand the present disclosure more clearly, examples are given to illustrate the present disclosure.
[0087] like Figure 4As shown in the figure, taking the customer service conversation as an example, the processing process of time information in the customer conversation is as follows: (1) Customer service conversation: obtain the customer service conversation; (2) Text cleaning: perform text cleaning on the customer service conversation; (3) Message sequence: sort the cleaned text and obtain the message sequence; (4) Time recognition: perform time recognition on the message sequence to determine whether the message contains the candidate time for performing the target operation; (5) Intent recognition: After performing time recognition on the message sequence, perform intent recognition on the message sequence; (6) Time correction: when the message contains the candidate time and the message belongs to the target intention of negating the target operation, the message containing the candidate time before the message is marked as invalid; (7) Time sequence: obtain the candidate message sequence without invalid mark in the conversation; (8) Sequence integration: take the candidate message without invalid mark sorted later in the conversation as the target message; (9) Recognition result: determine the time information for performing the target operation contained in the target message as the target time for performing the target operation.
[0088] It should be noted that, Figure 5 As shown, taking the candidate time for executing the target operation as the call back time and the target intention for negating the target operation as negating the call back as an example, Figure 4 The process of time correction in can be as follows:
[0089] (1) Check whether the time of this message is recognized in the time recognition step. If the time is not recognized, jump to step (3);
[0090] (2) If the call-back time classification result is "non-call-back time", all results of this message will be deleted from the time series;
[0091] (3) Check whether there is a record in the time series whose "Is Valid" field is valid. If there is no record, end the process;
[0092] (4) As shown in Tables 7 and 8, if the result of the negative call back classification is "negative call back", the "whether valid" field in all results corresponding to the most recent message with time before the current message in the time sequence is modified to invalid. It should be noted that this step does not affect the time recognized by the current sentence, and is to better handle multiple expression scenarios contained in a message.
[0093] Table 7 Scenario 1
[0094]
[0095] Table 8 Scenario 2
[0096]
[0097] The method for processing time information in the embodiment of the present disclosure determines the target message from each message by whether each message contains a candidate time for executing the target operation and whether it belongs to the target intention of the target operation, and then determines the execution time of the target operation based on the time information of the target operation contained in the target message. Thus, the execution time of the target operation can be accurately determined.
[0098] In order to implement the above embodiment, the present disclosure also proposes a device for processing time information.
[0099] Figure 6 A schematic diagram of the structure of a time information processing device provided in an embodiment of the present disclosure.
[0100] like Figure 6 As shown, the time information processing device includes: an acquisition module 610, an identification module 620, a first determination module 630 and a second determination module 640.
[0101] Among them, the acquisition module 610 is used to obtain multiple messages in the conversation; the identification module 620 is used to identify each message to determine whether each message contains a candidate time for performing the target operation, and whether each message belongs to the target intention of denying the target operation; the first determination module 630 is used to determine the target message from each message; wherein the target message contains a candidate time for performing the target operation, and the messages after the target message in the conversation do not belong to the target intention; the second determination module 640 is used to determine the target time for performing the target operation based on the time information for performing the target operation contained in the target message.
[0102] As a possible implementation method of the embodiment of the present disclosure, the first determination module 630 is specifically used to: determine a message containing a candidate time in a conversation as a candidate message; for any candidate message, when it is determined that it belongs to the target intention, mark the candidate time contained in each candidate message before the candidate message as invalid; and use the candidate message without an invalid mark as the target message.
[0103] As a possible implementation of the embodiment of the present disclosure, the first determination module 630 is further used to: when there are multiple candidate messages without invalid marks, use the candidate messages without invalid marks that are sorted later in the conversation as target messages.
[0104] As a possible implementation method of the embodiment of the present disclosure, the identification module 620 is specifically used to: identify the time text of each message; generate a time sequence based on the identified time text, wherein the time sequence includes the time text contained in each message, and each time text is sorted according to the order in the conversation; identify whether each time text in the time sequence belongs to a candidate time for performing a target operation; and, identify whether each message belongs to the target intention.
[0105] As a possible implementation method of an embodiment of the present disclosure, the identification module 620 is also used to: for any time text in the time sequence, input the message to which the time text belongs and at least one message before it into the first recognition model to identify whether the time text belongs to a candidate time for executing the target operation.
[0106] As a possible implementation method of the embodiment of the present disclosure, the recognition module 620 is also used to: for any message in the conversation, input a message and at least one message before the message into a second recognition model to identify whether a message belongs to the target intention.
[0107] It should be noted that the above explanation of the embodiment of the method for processing time information is also applicable to the device for processing time information of this embodiment, and will not be repeated here.
[0108] The time information processing device of the disclosed embodiment determines the target message from each message by whether each message contains a candidate time for executing the target operation and whether it belongs to the target intention of the target operation, and then determines the execution time of the target operation based on the time information of the target operation contained in the target message. Thus, the execution time of the target operation can be accurately determined.
[0109] In order to implement the above embodiments, the present application also proposes an electronic device, such as Figure 7 As shown, Figure 7 The invention is a block diagram of an electronic device showing a method for processing time information according to an exemplary embodiment.
[0110] like Figure 7 As shown, the electronic device 700 includes:
[0111] The memory 710 and the processor 720, a bus 730 connecting different components (including the memory 710 and the processor 720), the memory 710 stores a computer program, and when the processor 720 executes the program, the method for processing time information described in the embodiment of the present disclosure is implemented.
[0112] Bus 730 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0113] The electronic device 700 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 700, including volatile and non-volatile media, removable and non-removable media.
[0114] The memory 710 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 740 and / or cache memory 750. The electronic device 700 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 760 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 730 via one or more data medium interfaces. The memory 710 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.
[0115] A program / utility 780 having a set (at least one) of program modules 770 may be stored, for example, in the memory 710, such program modules 770 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may include an implementation of a network environment. The program modules 770 generally perform the functions and / or methods of the embodiments described in the present disclosure.
[0116] The electronic device 700 may also communicate with one or more external devices 790 (e.g., keyboards, pointing devices, displays, etc.), may communicate with one or more devices that enable a user to interact with the electronic device 700, and / or may communicate with any device that enables the electronic device 700 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 792. Furthermore, the electronic device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 793. Figure 7 As shown, the network adapter 793 communicates with other modules of the electronic device 700 via the bus 730. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with electronic device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0117] The processor 720 executes various functional applications and data processing by running the programs stored in the memory 710 .
[0118] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the processing of time information in the embodiment of the present disclosure, which will not be repeated here.
[0119] In order to implement the above embodiments, the present application also proposes a non-transitory computer-readable storage medium storing computer instructions, where the computer instructions are used to enable a computer to execute the time information processing method described in the above embodiments.
[0120] In order to implement the above embodiments, the present disclosure further provides a computer program product. When an instruction processor in the computer program product is executed, the method for processing time information described in the above embodiments is executed.
[0121] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. 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 disclosure. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. 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 the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0122] 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 the indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of the present disclosure, "plurality" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0123] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present disclosure includes additional implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present disclosure belong.
[0124] 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, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute the instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic device), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways if necessary, and then stored in a computer memory.
[0125] It should be understood that the various parts of the present disclosure can be implemented in hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used to implement: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0126] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0127] In addition, each functional unit in each embodiment of the present disclosure may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0128] The storage medium mentioned above may be a read-only memory, a disk or an optical disk, etc. Although the embodiments of the present disclosure have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limitations of the present disclosure. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present disclosure.
Claims
1. A method for processing time information, characterized in that: include: Get multiple messages in a conversation; Identify each of the messages to determine whether each of the messages contains a candidate time for performing a target operation, and whether each of the messages is a target intention to negate the target operation; Determine a target message from each message; wherein the target message includes a candidate time for performing the target operation, and each message after the target message in the conversation does not belong to the target intention; Determining a target time for executing the target operation according to the time information for executing the target operation contained in the target message; Wherein, determining the target message from each message includes: Determine the message in the conversation containing the candidate time as a candidate message; For any candidate message, when it is determined that the candidate message belongs to the target intention, the candidate time contained in each candidate message before the candidate message is marked as invalid; The candidate message not having an invalid flag is used as the target message.
2. The method according to claim 1, characterized in that The step of taking the candidate message not having the invalid mark as the target message comprises: In the case that there are multiple candidate messages that do not have the invalid mark, the candidate messages that do not have the invalid mark and are ranked later in the conversation are used as the target messages.
3. The method according to any one of claims 1 to 2, characterized in that: The identifying of each of the messages to determine whether each of the messages contains a candidate time for performing the target operation and whether each of the messages belongs to a target intention of negating the target operation includes: Identifying a time text for each of the messages; Generate a time sequence according to the identified time text, wherein the time sequence includes the time text contained in each message, and each of the time texts is sorted according to the order in the conversation; Identify whether each time text in the time sequence belongs to a candidate time for executing the target operation; and identify whether each message belongs to the target intention.
4. The method according to claim 3, characterized in that The step of identifying whether each time text in the time sequence belongs to a candidate time for executing the target operation includes: For any time text in the time sequence, the message to which the time text belongs and at least one message before the time text are input into the first recognition model to identify whether the time text belongs to a candidate time for executing the target operation.
5. The method according to claim 3, characterized in that: The identifying whether each message belongs to the target intention includes: For any message in the conversation, the message and at least one message before the message are input into a second recognition model to identify whether the message belongs to the target intent.
6. A time information processing device, characterized in that: include: The acquisition module is used to obtain multiple messages in a conversation; an identification module, used to identify each of the messages to determine whether each of the messages contains a candidate time for performing a target operation, and whether each of the messages belongs to a target intention of negating the target operation; A first determination module is used to determine a target message from each message; wherein the target message includes a candidate time for performing the target operation, and each message after the target message in the conversation does not belong to the target intention; A second determining module, configured to determine a target time for executing the target operation according to the time information for executing the target operation contained in the target message; Wherein, the first determining module is specifically used to: Determine the message in the conversation containing the candidate time as a candidate message; For any candidate message, when it is determined that the candidate message belongs to the target intention, the candidate time contained in each candidate message before the candidate message is marked as invalid; The candidate message not having an invalid flag is used as the target message.
7. The device according to claim 6, characterized in that The first determining module is further used for: In the case that there are multiple candidate messages that do not have the invalid mark, the candidate messages that do not have the invalid mark and are ranked later in the conversation are used as the target messages.
8. The device according to any one of claims 6 to 7, characterized in that: The identification module is specifically used for: Identifying a time text for each of the messages; Generate a time sequence according to the identified time text, wherein the time sequence includes the time text contained in each message, and each of the time texts is sorted according to the order in the conversation; Identify whether each time text in the time sequence belongs to a candidate time for executing the target operation; and identify whether each message belongs to the target intention.
9. The device according to claim 8, characterized in that The identification module is further used for: For any time text in the time sequence, the message to which the time text belongs and at least one message before the time text are input into the first recognition model to identify whether the time text belongs to a candidate time for executing the target operation.
10. The device according to claim 8, characterized in that The identification module is further used for: For any message in the conversation, the message and at least one message before the message are input into a second recognition model to identify whether the message belongs to the target intent.
11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.
12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Intelligent automated assistant
CN102792320A