Mail processing method and related device
By using generative artificial intelligence models to perform multi-dimensional analysis and logical enhancement of email content, combined with process automation instruction sets, the automation and intelligence of email processing have been achieved, solving the problem of low email processing efficiency and improving processing efficiency and accuracy.
Patent Information
- Application Number
- CN202511730613.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-24
- Publication Date
- 2026-02-10
AI Technical Summary
In existing technologies, users are inefficient when processing large volumes of emails, leading to work delays.
The email content is analyzed from multiple dimensions by a pre-trained generative artificial intelligence model to generate data analysis results. Based on the data analysis results, the processing intent is determined by calling and enhancing prompt words, and the target instruction sequence is matched from a pre-built set of automated process instructions to complete the email processing.
It has achieved automation and intelligence in email processing, significantly reducing manual intervention, improving processing efficiency and accuracy, and adapting to complex and ever-changing business scenarios.
Smart Images

Figure CN121504409A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and in particular to a mail processing method and related device. BACKGROUND
[0002] Users usually communicate and interact by using mails. For example, an employee needs to handle various work tasks assigned by a leader, the leader needs to handle various business approval mails and work report mails sent by the employee, etc. Based on artificial processing of a large number of mails, the mail processing efficiency is low, and the work is delayed. SUMMARY
[0003] In view of the above problems, the present application provides a mail processing method and related device. The specific scheme is as follows:
[0004] The first aspect of the present application provides a mail processing method, comprising:
[0005] obtaining mail content data of a target mail, the mail content data comprising a mail subject and a mail body;
[0006] performing multi-dimensional analysis on the mail content data by using a pre-trained generative artificial intelligence model to generate a data analysis result;
[0007] based on the data analysis result, calling a basic prompt word from a pre-set prompt word rule library, and enhancing the basic prompt word by using a logic enhancement template to generate a target prompt word;
[0008] responding to the enhanced prompt word by using the generative artificial intelligence model to obtain a processing intention of the target mail;
[0009] determining a target instruction sequence matched with the processing intention from a pre-constructed flow automation instruction set; the flow automation instruction set comprises a plurality of instruction sequences, and an instruction sequence comprises at least one instruction arranged in sequence for triggering an atomic operation;
[0010] sequentially calling each instruction in the target instruction sequence until a mail processing result matched with the processing intention is obtained.
[0011] In a possible implementation, the multi-dimensional analysis on the mail content data by using the pre-trained generative artificial intelligence model to generate the data analysis result comprises:
[0012] performing keyword extraction and semantic classification on the mail subject to determine a mail subject;
[0013] performing entity recognition on the mail body to obtain entity information, the entity information comprising time, place, person and entity relationship;
[0014] performing sentiment analysis on the mail body to identify sentiment tendency and urgency level;
[0015] The data analysis result includes mail subject, entity information, sentiment tendency and urgency level.
[0016] In a possible implementation, based on the data analysis result, a basic prompt word is called from a preset prompt word rule library, and the basic prompt word is enhanced by using a logic enhancement template to generate a target prompt word, including:
[0017] According to the mail subject and sentiment tendency in the data analysis result, a corresponding basic prompt word is matched and called from the prompt word rule library;
[0018] Based on the entity information, one or more preset interrogative pronoun templates are determined from the logic enhancement template;
[0019] The interrogative pronoun template is embedded in the basic prompt word to generate an enhanced question with logic reasoning orientation as the target prompt word;
[0020] The interrogative pronoun template includes a first template for asking reasons, a second template for asking time, a third template for asking content, and a fourth template for asking ways.
[0021] In a possible implementation, the construction process of the flow automation instruction set includes:
[0022] The preset mail processing task is decomposed into an atomic business process to obtain a plurality of atomic business processes, and a business process sequence is obtained;
[0023] Each atomic business process in the business process sequence is configured with a corresponding atomic operation, and instructions for triggering each atomic operation are constructed respectively to obtain an instruction sequence;
[0024] An instruction identifier is added to each instruction, and the instruction identifier includes an interactive instruction and an automation instruction;
[0025] The instruction sequences of all the mail processing tasks are collected to obtain the flow automation instruction set.
[0026] In a possible implementation, the mail processing method further includes:
[0027] A task description is generated for each instruction sequence in the flow automation instruction set, and the task description includes a mail subject description, a business function description and an applicable condition description.
[0028] The task description and the instruction sequence are stored in association.
[0029] In one possible implementation, based on the processing intent, a target instruction sequence matching the processing intent is determined from a pre-built set of process automation instructions, including:
[0030] Semantically match the processing intent with the task descriptions of each instruction sequence in the process automation instruction set;
[0031] Based on the matching results, at least one candidate instruction sequence that matches the task description and the processing intention is selected.
[0032] Based on the urgency and entity information in the data analysis results, a target instruction sequence is determined from the at least one candidate instruction sequence.
[0033] In one possible implementation, instructions in the target instruction sequence are called sequentially until a processing result matching the processing intent is obtained, including:
[0034] Read the instructions and their identifiers in the target instruction sequence in sequence;
[0035] For each target instruction: if the instruction identifier of the target instruction is an automation instruction, then the corresponding robotic process automation model is invoked to execute the target atomic operation corresponding to the target instruction, and the operation result of the target atomic operation is obtained; if the instruction identifier of the target instruction is an interactive instruction, then the operation prompt of the target atomic operation corresponding to the target instruction is sent to the interactive interface and the feedback information of the operation prompt is received, and the atomic operation result of the target atomic operation is obtained.
[0036] The atomic operation result of each instruction is used as context and passed to subsequent instructions until all instructions in the target instruction sequence have been executed, resulting in an email processing result that matches the processing intent.
[0037] A second aspect of this application provides an email processing apparatus, comprising:
[0038] The email acquisition unit is used to acquire the email content data of the target email, wherein the email content data includes the email subject and the email body;
[0039] The email analysis unit is used to perform multi-dimensional analysis on the email content data using a pre-trained generative artificial intelligence model, and generate data analysis results.
[0040] The prompt word determination unit is used to call basic prompt words from a preset prompt word rule library based on the data analysis results, and enhance the basic prompt words using a logic enhancement template to generate target prompt words;
[0041] An intent generation unit is used to obtain the processing intent of the target email by responding to the enhanced prompt words through the generative artificial intelligence model.
[0042] An instruction sequence selection unit is configured to determine a target instruction sequence matching the processing intent from a pre-built set of process automation instructions, based on the processing intent; the set of process automation instructions includes multiple instruction sequences, each including at least one instruction arranged in sequence to trigger an atomic operation.
[0043] The instruction invocation unit is used to sequentially invoke each instruction in the target instruction sequence until an email processing result matching the processing intent is obtained.
[0044] A third aspect of this application provides an electronic device, comprising at least one processor and a memory connected to the processor, wherein:
[0045] The memory is used to store computer programs;
[0046] The processor is used to execute the computer program so that the electronic device can implement the email processing method of the first aspect or any implementation thereof.
[0047] The fourth aspect of this application provides a computer program product, characterized in that it includes computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the email processing method of the first aspect or any implementation thereof.
[0048] By employing the aforementioned technical solution, the email processing method and related apparatus provided in this application acquire email content data of a target email, including the email subject and email body. A pre-trained generative artificial intelligence model performs multi-dimensional analysis on the email content data to generate data analysis results. Based on the data analysis results, basic prompt words are called from a pre-set prompt word rule library, and logical enhancement templates are used to enhance the basic prompt words, generating target prompt words. The generative artificial intelligence model responds to the enhanced prompt words to obtain the processing intent of the target email. According to the processing intent, a target instruction sequence matching the processing intent is determined from a pre-built process automation instruction set. The process automation instruction set includes multiple instruction sequences, each including at least one instruction sequentially arranged to trigger an atomic operation. The instructions in the target instruction sequence are called sequentially until an email processing result matching the processing intent is obtained. This application utilizes generative AI to replace manual email content analysis and intent reasoning, and intelligently drives the execution of predefined automated processes, significantly reducing manual intervention and improving the efficiency and intelligence level of email processing. Attached Figure Description
[0049] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.
[0050] Figure 1 A flowchart illustrating an email processing method provided in an embodiment of this application;
[0051] Figure 2 A flowchart illustrating yet another email processing method provided in this application embodiment;
[0052] Figure 3 A flowchart illustrating yet another email processing method provided in this application embodiment;
[0053] Figure 4 This is a schematic diagram of the structure of an email processing device provided in an embodiment of this application;
[0054] Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0055] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.
[0056] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.
[0057] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same properties in the description of embodiments of this application. Furthermore, the terms "including" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.
[0058] This application provides an email processing method to improve email processing efficiency and intelligence. The email processing method of this application embodiment will be described in detail below with reference to the accompanying drawings.
[0059] ReferenceFigure 1 , Figure 1 This is a flowchart illustrating an email processing method provided in an embodiment of this application, as shown below. Figure 1 As shown in the figure, an email processing method provided in this application embodiment may include steps S101 to S106, which are described in detail below.
[0060] S101. Obtain the email content data of the target email.
[0061] In this embodiment, the target email refers to the original email to be processed, and the email content data is the original information required for email processing. Specifically, the email content data includes the email subject and the email body.
[0062] In this embodiment, by calling the mail server's application programming interface (such as IMAP, POP3, Graph API, etc.) or monitoring a specific mailbox directory, newly arrived or pending emails are automatically obtained, the raw email data is parsed, and the structured email subject and email body text are extracted. For example, an email with the subject "Project Progress Report" and the body containing project details and questions is obtained from the inbox.
[0063] S102. Perform multi-dimensional analysis on email content data using a pre-trained generative artificial intelligence model to generate data analysis results.
[0064] In this embodiment, the pre-trained generative artificial intelligence model, also known as a generative AI model, refers to a large-scale language model that has been trained on massive amounts of text data and possesses natural language understanding and generation capabilities. Multi-dimensional analysis refers to parsing email content data from different perspectives.
[0065] In this embodiment, the email subject and body text are input into a generative AI model. The generative AI model utilizes its powerful semantic understanding capabilities to comprehensively analyze the email subject and body text, outputting the data analysis results.
[0066] S103. Based on the data analysis results, call the basic prompt words from the preset prompt word rule library, and use the logic enhancement template to enhance the basic prompt words to generate the target prompt words.
[0067] In this embodiment, the prompt word rule base stores initial prompt templates for standard questioning methods in various scenarios. The basic prompt words are the initial prompt templates matched from the prompt word rule base based on the analysis results. The logic enhancement templates include preset question word frameworks used to guide the model to engage in deeper thinking, such as "why" and "when".
[0068] In this embodiment, based on the data analysis results (such as identifying the email subject as "complaint"), the corresponding basic prompt words are retrieved from the prompt word rule base, such as "Please process this email". Subsequently, one or more logic enhancement templates (such as "why" and "how") are selected to embed and recombine the basic prompt words to generate target prompt words, such as "Please analyze this complaint email, explain why this problem occurred, and how we should respond to the customer?".
[0069] S104. By responding to the enhanced prompts through a generative artificial intelligence model, the processing intent of the target email is obtained.
[0070] In this embodiment, the target prompt is input into the generative AI model again. Based on a deep understanding of the email content and the guidance of the prompt, the generative AI model outputs a clear "processing intent". For example, for the complaint email mentioned above, the generative AI model outputs the processing intent as: "Draft an apology email and provide a specific compensation plan".
[0071] S105. Based on the processing intent, determine the target instruction sequence that matches the processing intent from the pre-built process automation instruction set.
[0072] In this embodiment, the process automation instruction set includes multiple instruction sequences, each including at least one instruction arranged in sequence to trigger an atomic operation.
[0073] Specifically, a process automation instruction set is a pre-generated resource library containing all available instruction sequences. An instruction sequence is a complete process composed of multiple atomic operation instructions chained together according to specific business logic.
[0074] In this embodiment, the processing intent is matched with each instruction sequence in the instruction library, and the optimal instruction sequence is selected as the target instruction sequence. For example, the processing intent is semantically matched with the description of each instruction sequence, and the instruction sequence with the highest semantic similarity is selected as the target instruction sequence.
[0075] S106. Call each instruction in the target instruction sequence in sequence until the email processing result that matches the processing intention is obtained.
[0076] In this embodiment, each instruction in the target instruction sequence is called sequentially.
[0077] Specifically, each instruction triggers an atomic operation. An atomic operation can be a fully automated operation (such as calling an RPA model to send an email) or a semi-automated operation (such as requesting user input for confirmation). The result of each atomic operation is passed as context to the next instruction until the entire sequence of target instructions has been executed, ultimately yielding the email processing result.
[0078] As can be seen from the above technical solution, the email processing method provided in this application obtains the email content data of the target email, which includes the email subject and email body. A pre-trained generative artificial intelligence model performs multi-dimensional analysis on the email content data to generate data analysis results. Based on the data analysis results, basic prompt words are called from a preset prompt word rule library, and logical enhancement templates are used to enhance the basic prompt words to generate target prompt words. The generative artificial intelligence model responds to the enhanced prompt words to obtain the processing intent of the target email. According to the processing intent, a target instruction sequence matching the processing intent is determined from a pre-built process automation instruction set. The process automation instruction set includes multiple instruction sequences, each including at least one instruction arranged in sequence to trigger an atomic operation. The instructions in the target instruction sequence are called sequentially until an email processing result matching the processing intent is obtained. In summary, this solution achieves a complete closed loop from email content understanding to automated execution. This method uses generative AI to replace manual email content analysis and intent reasoning, and intelligently drives the execution of predefined automated processes, significantly reducing manual intervention and improving the efficiency and intelligence level of email processing.
[0079] See Figure 2 , Figure 2 This is a flowchart illustrating yet another email processing method provided in an embodiment of this application. Figure 2 This illustrates a specific implementation method for constructing a process automation instruction set, such as... Figure 2 As shown, this method includes:
[0080] S201. Decompose the preset email processing task into atomic business processes, identify multiple atomic business processes, and obtain a business process sequence.
[0081] In this embodiment, atomic business process decomposition involves breaking down complex business processes into the smallest task units, resulting in a business process sequence composed of multiple atomic business processes arranged in the order of business logic.
[0082] In this embodiment, historical email processing tasks, such as replying to meeting invitations, handling customer complaints, and forwarding work reports, are streamlined to obtain the business process sequence for each email processing task. For example, replying to a meeting invitation is decomposed into: P1. Identify the sender's identity, P2. Parse the meeting time and location, P3. Determine the reply content, and P4. Send the reply email. The sequence {P1, P2, P3, P4} is the business process sequence for replying to a meeting invitation.
[0083] S202. Configure corresponding atomic operations for each atomic business process in the business process sequence, and construct instructions to trigger each atomic operation to obtain an instruction sequence.
[0084] In this embodiment, a specific implementation method is configured for the corresponding atomic operation of each atomic business process in the business process sequence. For example, for P1 (identifying the sender's identity), an atomic operation is configured to call the internal address book API for matching, and an instruction is constructed to trigger this atomic operation. Thus, all instructions are constructed in the execution order of the atomic operations to form a complete instruction sequence.
[0085] S203. Add an instruction identifier to each instruction.
[0086] In this embodiment, the instruction identifier includes interactive instructions and automated instructions.
[0087] In this embodiment, the instruction identifier is used to distinguish the execution mode of the instruction. Among them, the automated instruction is the instruction that can be completed automatically by the system, and the interactive instruction is the instruction that requires human intervention to provide information or make decisions.
[0088] In this embodiment, the type field is set in the instruction metadata. For example, Instruction_VerifySender (automatic address book lookup) is identified as an "automatic instruction", and Instruction_ConfirmReplyContent (confirmation reply content) is identified as an interactive instruction.
[0089] S204. Collect the instruction sequences of all email processing tasks to obtain the process automation instruction set.
[0090] In this embodiment, all instruction sequences built for different email processing tasks are registered in a central repository or database to form a final set of process automation instructions that can be queried and invoked by the system.
[0091] S205. Generate a task description for each instruction sequence in the process automation instruction set.
[0092] In this embodiment, the task description includes: an email subject description, a business function description, and an applicable condition description. That is, the task description is a summary of the instruction sequence functions and applicable scenarios using natural language or structured tags.
[0093] In this embodiment, descriptive metadata is created for each instruction sequence. For example, a task description is generated for the "Reply to Meeting Invitation" sequence: Email subject description: ["Meeting", "Invitation"]; Business function description: "Automatically parse and reply to meeting invitations"; Applicable conditions description: "Sender is an internal employee".
[0094] S206. Store the task description and instruction sequence together.
[0095] In this embodiment, in the storage structure of the process automation instruction set, the task description is stored as metadata and bound to the corresponding instruction sequence.
[0096] As can be seen from the above technical solutions, the email processing method provided in this application systematically constructs a structured and intelligently callable set of process automation instructions. Through atomic decomposition and refined identification, it ensures the flexibility and maintainability of the automated process, while providing a basis for AI-driven intelligent matching through task description.
[0097] See Figure 3 , Figure 3 This is a flowchart illustrating yet another email processing method provided in an embodiment of this application. Figure 3 This application illustrates an optional specific implementation of an email processing method provided by an embodiment of the present application, such as... Figure 3 As shown, this method includes:
[0098] S301. Perform data preprocessing on the email content data of the target email, and input the processed email subject and email body into the pre-trained generative artificial intelligence model.
[0099] In this embodiment, data preprocessing is the process of cleaning, transforming and standardizing the raw data, with the aim of improving data quality and ensuring the accuracy and effectiveness of subsequent email processing.
[0100] In this embodiment, after obtaining the original email content data of the target email, the following operations are performed, including but not limited to: removing HTML tags, filtering irrelevant special characters and advertising content, unifying text encoding (such as converting to UTF-8), and segmenting the text. After preprocessing, a clean and structured email subject and body text are obtained, and these are submitted as input to a pre-trained generative artificial intelligence model for analysis.
[0101] S302. Use a pre-trained generative artificial intelligence model to extract keywords and perform semantic classification on the email subject to determine the email subject.
[0102] In this embodiment, keyword extraction involves identifying and extracting core words or phrases from the text, while semantic classification involves categorizing the email subject into predefined categories based on the textual semantics of the email subject.
[0103] In this embodiment, when the generative artificial intelligence model analyzes the email subject, the model first extracts keywords that represent the core content of the email. Then, based on a deep semantic understanding of the keywords and the entire subject sentence, the model categorizes the target email into the target subject type.
[0104] For example, for an email subject line “Application for Approval of Project Budget for the Fourth Quarter of 2023”, the model extracts the keywords “project budget” and “approval”, and determines the email subject line as “financial approval”.
[0105] S303. Use a pre-trained generative artificial intelligence model to perform entity recognition on the email body and obtain entity information.
[0106] In this embodiment, entity recognition is used to identify and extract named entities from unstructured text and classify them into predefined entity categories. Entity information includes time, location, people, and entity relationships.
[0107] In this embodiment, entity information includes not only basic elements such as time, location, and people, but also relational entities used to indicate the relationship between entities, such as the relationship between the sender and the recipient.
[0108] For example, from the text "Please report the project progress to Manager Wang in Conference Room 201 at 14:00 next Monday", the generative artificial intelligence model can identify: time: next Monday at 14:00, location: conference room 201, person: Manager Wang, and infer the entity relationship: [reporting object: Manager Wang].
[0109] S304. Using a pre-trained generative artificial intelligence model, perform sentiment analysis on the email body to identify sentiment tendencies and urgency levels.
[0110] In this embodiment, the data analysis results include email subject, entity information, sentiment, and urgency. Sentiment analysis is used to determine the subjective emotions, attitudes, or viewpoints expressed in the email body, while urgency is a quantitative assessment of the speed or priority at which the matter needs to be processed.
[0111] In this embodiment, the generative artificial intelligence model comprehensively analyzes the vocabulary selection, sentence structure, and context of the email body. For sentiment, it outputs a classification or confidence score, such as positive, negative, or neutral. For urgency, it identifies keywords such as urgent, as soon as possible, and important, and combines these with tone keywords to determine the email's urgency level, such as high, medium, or low.
[0112] For example, in the email body “System failure has caused business interruption, please handle immediately!”, the generative artificial intelligence model identifies “sentiment: negative” and judges “urgency level: high”.
[0113] In this solution, S301~S304 are specific implementation methods for performing multi-dimensional analysis of email content data through a pre-trained generative artificial intelligence model to generate data analysis results.
[0114] S305. Based on the email subject and sentiment in the data analysis results, match and call the corresponding basic prompt words from the prompt word rule library.
[0115] In this embodiment, the email subject and sentiment are used as search criteria to perform retrieval and matching within a pre-defined suggestion word rule base. The rule base contains pre-stored standard suggestion templates corresponding to different scenario combinations.
[0116] For example, if the data analysis result is: Email subject: Customer complaint, sentiment: negative, the system may call the basic prompt word from the rule base: "Please process this customer complaint email".
[0117] S306. Determine one or more preset interrogative pronoun templates from the logic enhancement template based on entity information.
[0118] In this embodiment, the logic enhancement template includes multiple interrogative pronoun templates for guiding the model to perform deep reasoning. The interrogative pronoun templates include a first template for asking for reasons, namely the "why" template; a second template for asking for time, namely the "when" template; a third template for asking for content, namely the "what" template; and a fourth template for asking for the method, namely the "how" template.
[0119] Specifically, based on the entity type in the entity information, a logic enhancement template that matches the entity information is intelligently selected. For example, if the entity information contains a product name and a fault description, the "why" and "how" templates are selected; if it contains a specific time point, the "when" template is selected.
[0120] S307. Embed interrogative pronoun templates in basic prompt words to generate enhanced questions with logical reasoning orientation, which serve as target prompt words.
[0121] In this embodiment, the selected interrogative pronoun template is embedded into the basic prompt words in a natural language manner to generate enhanced questions with logical reasoning orientation.
[0122] For example, the generated target prompt might be: "Please process this customer complaint email, analyze why this product is malfunctioning, and explain how we should resolve this issue?"
[0123] S305~S307 of this scheme is a specific implementation method that, based on data analysis results, calls basic prompt words from a preset prompt word rule library and enhances the basic prompt words using a logic enhancement template to generate target prompt words.
[0124] S308. By responding to target prompts through a generative artificial intelligence model, the processing intent of the target email is obtained.
[0125] S309. Perform semantic matching between the processing intent and the task descriptions of each instruction sequence in the process automation instruction set.
[0126] In this embodiment, the semantic similarity between the processing intent and the task description of each instruction sequence in the process automation instruction set is calculated, and the semantic similarity is used as the matching result.
[0127] For example, computational processing Figure 1 The semantic similarity between the task description of providing compensation solutions and responding to customers and the task description of instruction sequence A (handling general customer inquiries), and the task description of instruction sequence B (handling customer complaints and providing compensation).
[0128] S310. Based on the matching results, select at least one candidate instruction sequence that matches the task description and processing intention.
[0129] In this embodiment, instruction sequences with semantic similarity greater than a preset matching threshold are selected as candidate instruction sequences.
[0130] S311. Based on the urgency and entity information in the data analysis results, determine the target instruction sequence from at least one candidate instruction sequence.
[0131] In this embodiment, a secondary decision is made on the candidate instruction sequences by combining the urgency level and entity information, and the target instruction sequence is selected.
[0132] For example, if the urgency level is high and the entity information includes the customer level: VIP, then a fast-track instruction sequence specifically designed for VIP customers is selected from at least one candidate instruction sequence as the final target instruction sequence.
[0133] S308~S311 of this scheme is a specific implementation method for determining the target instruction sequence that matches the processing intention from a pre-built set of process automation instructions.
[0134] S312. Read the instructions and their identifiers in the target instruction sequence in sequence.
[0135] In this embodiment, the target instruction sequence is loaded, and each instruction is read one by one according to its position in the target instruction sequence, while the instruction identifier is read at the same time.
[0136] S313. If the instruction identifier of the target instruction is an automation instruction, then the corresponding robotic process automation model is called to execute the target atomic operation corresponding to the target instruction, and the operation result of the target atomic operation is obtained.
[0137] In this embodiment, when the instruction identifier of the target instruction is an automated instruction, that is, when the target instruction can be executed fully automatically, the RPA model bound to the instruction is called. The RPA model simulates manual operation, executes the atomic operation corresponding to the target instruction, and returns the execution result of the target instruction to obtain the operation result of the target atomic operation.
[0138] For example, if the target instruction is to send a confirmation email, the RPA email sending model is invoked to automatically complete operations such as email drafting, recipient filling, and sending, and returns a successful sending status and a copy of the email as the operation result.
[0139] S314. If the instruction identifier of the target instruction is an interactive instruction, then the operation prompts for the target atomic operation corresponding to the target instruction are sent through the interactive interface, and the atomic operation result of the target atomic operation is generated based on the feedback information of the operation prompts.
[0140] In this embodiment, when the instruction identifier of the target instruction is an interactive instruction, it indicates that the target instruction requires human intervention. The automated process is paused, and specific operation prompts are displayed to the user through the user interface (such as pop-up windows or sidebars) while waiting for user input.
[0141] For example, if the target instruction is to determine the compensation amount, a dialog box will pop up, prompting "Please enter the compensation amount you approve." After the user enters "200 yuan" and confirms, this amount becomes the result of this atomic operation.
[0142] S315. The atomic operation result of each instruction is used as context and passed to subsequent instructions until all instructions in the target instruction sequence have been executed, and an email processing result matching the processing intent is obtained.
[0143] In this embodiment, an execution context is maintained, and the operation result of the previous instruction is automatically passed as an input parameter to the next instruction. This continues until the entire instruction sequence is executed, ultimately converging to generate a complete email processing result.
[0144] For example, the target instruction sequence is (Pi1, Pi2, Pi3, Pi4). The first instruction, Pi1, is triggered to identify the recipient, which is Mr. Zhang. The recipient is then passed as context to the next instruction, the second instruction, Pi2. The second instruction, Pi2, prompts the user through an interactive interface to confirm the compensation amount for Mr. Zhang. The received feedback is a compensation amount of 200 yuan. This compensation amount is then passed as context to the next instruction, the third instruction, Pi3. The third instruction calls the RPA model that generates an apology letter. This RPA model automatically fills the amount into a specific location in the email template, generating a complete apology letter to be sent. Furthermore, the apology letter is passed as context to the next instruction, the fourth instruction, which calls the RPA model that sends the email. This RPA model sends the apology letter as an attachment to the recipient's email address.
[0145] S312~S315 of this scheme is a specific implementation method for sequentially calling each instruction in the target instruction sequence until an email processing result matching the processing intention is obtained.
[0146] As can be seen from the above technical solutions, the email processing method provided in this application constructs a complete intelligent closed loop from deep email parsing, intelligent reasoning and questioning, accurate process matching to human-machine collaborative execution. It not only realizes the automated understanding of email content, but also dynamically selects and drives the optimal automated process through logic enhancement and context-aware decision-making mechanisms, which significantly improves the efficiency, accuracy and intelligence level of email processing and effectively copes with complex and ever-changing actual business scenarios.
[0147] It should be noted that the embodiments of this application also include the step of updating the target instruction sequence through interactive information. The generative artificial intelligence model interacts with the human-computer interaction module configured with text interaction and human-computer dialogue functions to obtain the information (text or natural language) input by the user on the visual operation interface. Human-computer dialogue is used to meet the user's personalized email processing needs. Based on the question and answer content output by the customer, the matching content can be found from the historical dialogue content. Then, the response content used to respond to the matching content can be found from the historical dialogue content. Finally, the response content is sent and displayed on the customer's operation terminal, thus completing one round of human-computer dialogue process. Through multiple rounds of dialogue, the user's needs for email content are further clarified, thereby better processing the email.
[0148] Specifically, a generative artificial intelligence model generates a new instruction sequence based on the feedback information input by the user through the interactive interface. That is, it sequentially determines whether the instructions in the new instruction sequence are new instructions. If they are new instructions, S313 or S314 is executed. If they are not new instructions, the cached atomic operation results are directly obtained, and the atomic operation results of each instruction are used as context to pass to subsequent instructions until all instructions in the target instruction sequence are executed, and an email processing result matching the processing intent is obtained.
[0149] Taking an email with the subject "Invitation to Project A Solution Review Meeting" as an example, through S311, based on the urgency and entity information in the data analysis results, the target instruction sequence is determined from at least one candidate instruction sequence. Through S312, the instructions and their instruction identifiers in the target instruction sequence are read in sequence to determine that instructions 1 to 3 are respectively an automated instruction (parse the meeting time and location), an interactive instruction (request the user to confirm whether to attend), and an automated instruction (automatically reply to the email based on the user's selection (attend / not attend).
[0150] For instruction 1, trigger instruction 1, call model 1 to parse the recipient, meeting time and location, and get the atomic operation result: Manager Li, tomorrow 10:00, meeting room 301.
[0151] For instruction 2, triggering instruction 2 results in a pop-up prompt: "Would you like to attend the Project A review meeting?". The user's feedback is: "I cannot attend, but my subordinate Li Si can represent me. Please forward the meeting materials to him and reply." The generative AI model analyzes the feedback information, performs semantic recognition on the feedback information, and identifies two key changes: a change in the attendee (from the user to Li Si) and a new atomic operation (forwarding meeting materials). Combining the semantic recognition results of the feedback information, the processing intent is updated to obtain a new processing intent.
[0152] Determine whether the target sequence still matches the processing intent. If not, generate a new instruction sequence or execute the sequence matching step again to obtain a new instruction sequence that matches the new processing intent.
[0153] Further, by using S312, the instructions and their identifiers in the new instruction sequence are read sequentially to determine that new instructions 1 to new instructions 4 are respectively: automation instruction (parse the recipient, meeting time, and location), automation instruction (determine the email address of the forwarding target), automation instruction (generate the body of the forwarded email and forward the email to the forwarding target), and automation instruction (generate the body of the reply and automatically reply to the email).
[0154] For the new instruction 1, if it is determined that the new instruction 1 is the same as the original instruction 1, then the atomic operation result of the original instruction 1 is obtained, which is the meeting summary: Manager Li, tomorrow 10:00, meeting room 301.
[0155] For new instruction 2, trigger new instruction 2, call the RPA model to determine the email address of the forwarding object based on the feedback information, and the atomic operation result is Li Si, email lisi@xx.com.
[0156] For new instruction 3, trigger new instruction 3, call the RPA model to determine the forwarded email body based on the feedback information: Please attend the Project A review meeting on my behalf, and forward the target email to lisi@xx.com.
[0157] For new instruction 4, trigger new instruction 4, call the RPA model to determine the reply email based on the feedback information. The political commissar is the original participant who cannot attend, and Li Si will attend on his behalf, and reply to the target email.
[0158] Through the above steps, the email processing method provided in this application embodiment can flexibly adapt to unexpected changes and personalized user needs during the processing. By dynamically generating new processes and intelligently reusing existing execution results, it maximizes the system's intelligence and execution efficiency while ensuring processing accuracy.
[0159] The above describes an email processing method provided by an embodiment of this application. The following will describe the related apparatus for performing the above email processing method.
[0160] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of an email processing device provided in an embodiment of this application. Figure 4 As shown, the email processing device 400 includes:
[0161] The email acquisition unit 401 is used to acquire the email content data of the target email, wherein the email content data includes the email subject and the email body;
[0162] The email analysis unit 402 is used to perform multi-dimensional analysis on the email content data using a pre-trained generative artificial intelligence model and generate data analysis results.
[0163] The prompt word determination unit 403 is used to call basic prompt words from a preset prompt word rule library based on the data analysis results, and enhance the basic prompt words using a logic enhancement template to generate target prompt words;
[0164] The intent generation unit 404 is used to obtain the processing intent of the target email by responding to the enhanced prompt words through the generative artificial intelligence model;
[0165] The instruction sequence selection unit 405 is used to determine a target instruction sequence that matches the processing intention from a pre-built process automation instruction set according to the processing intention; the process automation instruction set includes multiple instruction sequences, and the instruction sequence includes at least one instruction arranged in sequence for triggering an atomic operation;
[0166] The instruction invocation unit 406 is used to sequentially invoke each instruction in the target instruction sequence until an email processing result matching the processing intent is obtained.
[0167] In one possible implementation, the email analysis unit is used to perform multi-dimensional analysis of the email content data using a pre-trained generative artificial intelligence model, and when generating data analysis results, it is specifically used for:
[0168] Keyword extraction and semantic classification are performed on the email subject to determine the email subject;
[0169] Entity recognition is performed on the email body to obtain entity information, which includes time, location, people, and entity relationships.
[0170] Sentiment analysis was performed on the email body to identify sentiment trends and urgency levels.
[0171] The data analysis results include email subject, entity information, sentiment, and urgency level.
[0172] In one possible implementation, the prompt word determination unit is used to, based on the data analysis results, call basic prompt words from a preset prompt word rule library, and enhance the basic prompt words using a logic enhancement template. Specifically, when generating the target prompt word, it is used to:
[0173] Based on the email subject and sentiment in the data analysis results, the corresponding basic prompt words are matched and called from the prompt word rule base;
[0174] One or more preset interrogative pronoun templates are determined from the logic enhancement template based on entity information;
[0175] The interrogative pronoun template is embedded in the basic prompt words to generate an enhanced question with logical reasoning orientation, which serves as the target prompt word;
[0176] The interrogative pronoun templates include a first template for asking about reasons, a second template for asking about time, a third template for asking about content, and a fourth template for asking about manner.
[0177] In one possible implementation, the mail processing apparatus further includes an instruction building unit for:
[0178] The preset email processing task is decomposed into atomic business processes to obtain multiple atomic business processes, resulting in a business process sequence.
[0179] Configure a corresponding atomic operation for each atomic business process in the business process sequence, and construct instructions to trigger each atomic operation to obtain an instruction sequence;
[0180] Add an instruction identifier to each instruction, the instruction identifier including interactive instructions and automated instructions;
[0181] The instruction sequence of all the email processing tasks is combined to obtain the process automation instruction set.
[0182] In one possible implementation, the instruction building block is also used for:
[0183] A task description is generated for each instruction sequence in the process automation instruction set. The task description includes: email subject description, business function description, and applicable conditions description.
[0184] The task description and instruction sequence are stored together.
[0185] In one possible implementation, when the instruction sequence selection unit determines a target instruction sequence matching the processing intention from a pre-built set of process automation instructions, it is specifically used for:
[0186] Semantically match the processing intent with the task descriptions of each instruction sequence in the process automation instruction set;
[0187] Based on the matching results, at least one candidate instruction sequence that matches the task description and the processing intention is selected.
[0188] Based on the urgency and entity information in the data analysis results, a target instruction sequence is determined from the at least one candidate instruction sequence.
[0189] In one possible implementation, the instruction invocation unit is used to sequentially invoke each instruction in the target instruction sequence until a processing result matching the processing intent is obtained, specifically for:
[0190] Read the instructions and their identifiers in the target instruction sequence in sequence;
[0191] For each target instruction: if the instruction identifier of the target instruction is an automation instruction, then the corresponding robotic process automation model is invoked to execute the target atomic operation corresponding to the target instruction, and the operation result of the target atomic operation is obtained; if the instruction identifier of the target instruction is an interactive instruction, then the operation prompt of the target atomic operation corresponding to the target instruction is sent to the interactive interface and the feedback information of the operation prompt is received, and the atomic operation result of the target atomic operation is obtained.
[0192] The atomic operation result of each instruction is used as context and passed to subsequent instructions until all instructions in the target instruction sequence have been executed, resulting in an email processing result that matches the processing intent.
[0193] This application also provides an electronic device in its embodiments. (See reference...) Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0194] like Figure 5 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. When the electronic device is powered on, the RAM 503 also stores various programs and data required for the operation of the electronic device. The processing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.
[0195] Typically, the following devices can be connected to I / O interface 505: input devices 506 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 507 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 508 including, for example, memory cards, hard drives, etc.; and communication devices 509. Communication device 509 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.
[0196] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the email processing methods provided in this application.
[0197] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the email processing methods provided in this application.
[0198] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.
[0199] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0200] In the above embodiments, implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, as a computer program product.
[0201] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).
Claims
1. An email processing method, characterized in that, include: Obtain the email content data of the target email, wherein the email content data includes the email subject and the email body; The email content data is analyzed from multiple dimensions using a pre-trained generative artificial intelligence model to generate data analysis results. Based on the data analysis results, basic prompt words are called from the preset prompt word rule library, and the basic prompt words are enhanced using a logic enhancement template to generate target prompt words; The processing intent of the target email is obtained by responding to the target prompt words through the generative artificial intelligence model. Based on the processing intent, a target instruction sequence matching the processing intent is determined from a pre-built set of process automation instructions; the set of process automation instructions includes multiple instruction sequences, each including at least one instruction arranged in sequence to trigger an atomic operation. The instructions in the target instruction sequence are called sequentially until an email processing result matching the processing intent is obtained.
2. The email processing method according to claim 1, characterized in that, The email content data is analyzed from multiple dimensions using a pre-trained generative artificial intelligence model to generate data analysis results, including: Keyword extraction and semantic classification are performed on the email subject to determine the email subject; Entity recognition is performed on the email body to obtain entity information, which includes time, location, people, and entity relationships. Sentiment analysis was performed on the email body to identify sentiment trends and urgency levels. The data analysis results include email subject, entity information, sentiment, and urgency level.
3. The email processing method according to claim 1, characterized in that, Based on the data analysis results, basic prompt words are retrieved from a preset prompt word rule library, and the basic prompt words are enhanced using a logic enhancement template to generate target prompt words, including: Based on the email subject and sentiment in the data analysis results, the corresponding basic prompt words are matched and called from the prompt word rule base; One or more preset interrogative pronoun templates are determined from the logic enhancement template based on entity information; The interrogative pronoun template is embedded in the basic prompt words to generate an enhanced question with logical reasoning orientation, which serves as the target prompt word; The interrogative pronoun templates include a first template for asking about reasons, a second template for asking about time, a third template for asking about content, and a fourth template for asking about manner.
4. The email processing method according to claim 1, characterized in that, The process of constructing the automation instruction set includes: The preset email processing task is decomposed into atomic business processes to obtain multiple atomic business processes, resulting in a business process sequence. Configure a corresponding atomic operation for each atomic business process in the business process sequence, and construct instructions to trigger each atomic operation to obtain an instruction sequence; Add an instruction identifier to each instruction, the instruction identifier including interactive instructions and automated instructions; The instruction sequence of all the email processing tasks is combined to obtain the process automation instruction set.
5. The email processing method according to claim 4, characterized in that, The email processing method further includes: Generate a task description for each instruction sequence in the process automation instruction set. The task description includes: email subject description, business function description, and applicable condition description. The task description and instruction sequence are stored together.
6. The email processing method according to claim 5, characterized in that, Based on the processing intent, a target instruction sequence matching the processing intent is determined from a pre-built set of process automation instructions, including: Semantically match the processing intent with the task descriptions of each instruction sequence in the process automation instruction set; Based on the matching results, at least one candidate instruction sequence that matches the task description and the processing intention is selected. Based on the urgency and entity information in the data analysis results, a target instruction sequence is determined from the at least one candidate instruction sequence.
7. The email processing method according to claim 5, characterized in that, The instructions in the target instruction sequence are called sequentially until a processing result matching the processing intent is obtained, including: Read the instructions and their identifiers in the target instruction sequence in sequence; For each target instruction: if the instruction identifier of the target instruction is an automation instruction, then the corresponding robotic process automation model is invoked to execute the target atomic operation corresponding to the target instruction, and the operation result of the target atomic operation is obtained; if the instruction identifier of the target instruction is an interactive instruction, then the operation prompt of the target atomic operation corresponding to the target instruction is sent to the interactive interface and the feedback information of the operation prompt is received, and the atomic operation result of the target atomic operation is obtained. The atomic operation result of each instruction is used as context and passed to subsequent instructions until all instructions in the target instruction sequence have been executed, resulting in an email processing result that matches the processing intent.
8. An email processing device, characterized in that, include: The email acquisition unit is used to acquire the email content data of the target email, wherein the email content data includes the email subject and the email body; The email analysis unit is used to perform multi-dimensional analysis on the email content data using a pre-trained generative artificial intelligence model, and generate data analysis results. The prompt word determination unit is used to call basic prompt words from a preset prompt word rule library based on the data analysis results, and enhance the basic prompt words using a logic enhancement template to generate target prompt words; An intent generation unit is used to obtain the processing intent of the target email by responding to the enhanced prompt words through the generative artificial intelligence model. An instruction sequence selection unit is configured to determine a target instruction sequence matching the processing intent from a pre-built set of process automation instructions, based on the processing intent; the set of process automation instructions includes multiple instruction sequences, each including at least one instruction arranged in sequence to trigger an atomic operation. The instruction invocation unit is used to sequentially invoke each instruction in the target instruction sequence until an email processing result matching the processing intent is obtained.
9. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to enable the electronic device to implement the email processing method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes computer-readable instructions that, when executed on an electronic device, cause the electronic device to implement the email processing method as described in any one of claims 1 to 7.