Mail processing method and device, equipment and storage medium
By performing named entity recognition and semantic analysis on email attachment text and combining with a large language model to generate email text, the problem of low efficiency and accuracy of manual writing of email text is solved, and more efficient and accurate email processing is achieved.
Patent Information
- Application Number
- CN202411723645.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-27
- Publication Date
- 2025-03-18
AI Technical Summary
In modern office environments, when processing large amounts of report emails with attachments, existing technology relies on manual writing of email texts, which are less efficient and accurate.
By performing named entity recognition and semantic analysis on the attachment text of the email, the identification and execution status information of the target task are determined, and the email body is generated through a large language model, which is replaced by manual writing.
It improves the efficiency and accuracy of writing email texts, and the generated email texts are accurate and readable, and can display the attachment content more clearly.
Smart Images

Figure CN119648172A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing and artificial intelligence technology, and in particular to a mail processing method, device, equipment and storage medium. Background Art
[0002] In modern office environments, especially in the field of automated monitoring and reporting, it is often necessary to process a large number of report emails with attachments. For report emails, the body of the email needs to clearly and concisely explain the core content of the attachment.
[0003] At present, the body of the email is mainly written manually. Specifically, the staff needs to carefully check the contents of the attachment, extract the key information and organize it into the body of the email in natural language to achieve the purpose of summarizing the contents of the attachment.
[0004] However, manually writing the email body has the problems of low efficiency and accuracy. Summary of the invention
[0005] The embodiments of the present application provide an email processing method, apparatus, device and storage medium to improve the efficiency and accuracy of writing email text.
[0006] In a first aspect, an embodiment of the present application provides an email processing method, including:
[0007] Performing named entity recognition on the attachment text of the initial email to determine multiple entities of the attachment text;
[0008] According to the multiple entities of the attachment text, the attachment text is semantically analyzed to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task;
[0009] Performing visualization processing on the execution status information to generate a visualization result;
[0010] Processing the visualization result, the identifier of the target task, and the execution status information of the target task through a large language model to generate an email body;
[0011] The initial email is updated according to the email body to generate a target email.
[0012] In a second aspect, an embodiment of the present application provides a mail processing device, including:
[0013] A recognition module, used to perform named entity recognition on the attachment text of the initial email, and determine multiple entities of the attachment text;
[0014] A semantic analysis module, configured to perform semantic analysis on the attachment text according to multiple entities of the attachment text, and determine an identifier of a target task corresponding to the attachment text and execution status information of the target task;
[0015] A processing module, used for visualizing the execution status information and generating a visualization result;
[0016] The processing module is further used to process the visualization result, the identifier of the target task and the execution status information of the target task through a large language model to generate an email body;
[0017] The generating module is used to update the initial email according to the email body to generate a target email.
[0018] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0019] The memory stores computer-executable instructions;
[0020] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the implementation of the first aspect as described above.
[0021] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the implementation method of the first aspect as above.
[0022] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the implementation method of the first aspect as above.
[0023] The email processing method, device, equipment and storage medium proposed in the present application, in which the multiple entities of the attachment text are determined by performing named entity recognition on the attachment text of the initial email. Afterwards, the attachment text is semantically analyzed according to the multiple entities of the attachment text to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task. Then, the execution status information is visualized to generate a visualization result. Next, the visualization result, the identifier of the target task and the execution status information of the target task are processed by a large language model to generate the email body. Finally, the initial email is updated according to the email body to generate the target email. In this technical solution, according to the attachment text of the initial email, a visualization result with high accuracy, readability and reliability is automatically generated and inserted into the email body to display the summary information of the attachment text; at the same time, an explanatory and standardized email body is generated so that the recipient can know the content of the attachment more clearly, replacing the workload of manually writing the email body and improving the processing efficiency and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0025] Figure 1 This is a schematic diagram of the structure of the email;
[0026] Figure 2 Schematic diagram of the mail processing method provided for this application Figure 1 ;
[0027] Figure 3 Schematic diagram of the mail processing method provided for this application Figure 2 ;
[0028] Figure 4 A schematic diagram of the structure of a mail processing device provided in an embodiment of the present application;
[0029] Figure 5 A schematic diagram of the structure of the electronic device provided in this application.
[0030] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0031] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] First, the terms used in this application are explained:
[0034] spaCy: An open source software library for advanced natural language processing, with functions such as efficient word segmentation (dividing text into single words or phrases), part-of-speech tagging (labeling each word with its part of speech), named entity recognition (recognizing entities in text, such as names of people, organization names, etc.), and dependency syntactic analysis (analyzing the dependency relationship between words in a sentence), and supports multiple language processing tasks.
[0035] Bidirectional Encoder Representations from Transformers (BERT): is a pre-trained model of bidirectional encoder representations that can provide high-quality text representations in natural language processing tasks.
[0036] Large language model: refers to a neural network training strategy that first performs unsupervised pre-training on a large corpus and then fine-tunes it for specific tasks on a much smaller supervised dataset. The large language model mainly uses a multi-layer Transformer structure, each layer of which contains multiple self-attention and forward neural network modules. Among them, the self-attention module is mainly used to calculate the relative importance of each word in the context, thereby generating a context vector representation, and the forward neural network module is used to map the context vector representation to the conditional probability distribution of the next word to achieve the purpose of the generative language model.
[0037] Next, the application scenarios involved in this application are explained:
[0038] Figure 1 This is a schematic diagram of the structure of an email. Figure 1 As shown, the email includes an email header, an email body, and an email attachment. The email header includes recipient information, CC information, and a subject.
[0039] In modern office environments, especially in the field of automated monitoring and reporting, it is often necessary to process a large number of report emails with attachments, such as summary information of health check failures and summary information of change automation failures. For report emails with attachments, manually writing the body of the email requires a lot of manpower. The staff needs to carefully check the contents of the attachments, extract the key information from them, and organize them into the body of the email in natural language to achieve the purpose of summarizing the contents of the attachments.
[0040] For example, when processing the summary information of health check failures, the staff needs to check each failed item, the corresponding number of failures, possible reasons, and other information one by one, and then write it into the body of the email. For a large number of emails, this process requires a lot of manpower, which increases labor costs.
[0041] In addition, when manually writing the body of an email, due to the limited attention span of humans, errors are prone to occur. The data in the message may be misread, or there may be typos or unclear expressions during the writing process. For example, when counting the number of failures in the summary of failed automation changes, if the staff accidentally misread the number, it will lead to data errors in the body of the email. In addition, when expressing complex information content, the logic may be unclear, affecting the accuracy of the email content.
[0042] Manually writing email text is a time-consuming process, especially when dealing with high-frequency, large-volume emails. Staff members need to spend a lot of time writing the text of each email, resulting in low efficiency of the entire email processing process. For example, in a large enterprise, hundreds of such emails may be received every day. If the text is written manually, these emails may not be processed in time, which in turn affects the normal work.
[0043] That is to say, manually writing the email body has the problem of low efficiency and accuracy.
[0044] In order to solve this problem, a technology has been proposed, which can prepare some templates in advance, and each template has a pre-designed email format. The user can select the template he wants to use, and fill in the template with information related to the email format such as the recipient and the subject, and also fill in the template with key information extracted from the attachment, so as to generate the corresponding email body through the template.
[0045] However, although this technology reduces the amount of editing that users have to do on the body of the email, it still requires users to manually extract key information from the attachments, and there are still problems with low efficiency and accuracy.
[0046] Based on the above technical problems, the invention of this application is conceived as follows: considering that the rigor and efficiency of the manual processing process cannot be guaranteed, the manual processing process can be replaced by automated processing to improve the efficiency and accuracy of the processing. Specifically, for the process of extracting key information from attachments during manual processing, the entities in the attachments can be automatically identified, and semantic analysis of the entities can be performed to determine the key entities, that is, the execution status information, from multiple entities; the manual statistical data process can be achieved by automatically visualizing the execution status information and generating visualization results; for the text in the manually written email body, it can be achieved through a large language model based on the execution status information and visualization results. In this way, replacing the manual processing process with an automated processing process can effectively solve the problem of low efficiency and low accuracy in email text generation caused by manual processing.
[0047] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0048] Figure 2 Schematic diagram of the mail processing method provided for this application Figure 1 ,like Figure 2 As shown, the method includes:
[0049] S21. Perform named entity recognition on the attachment text of the initial email to determine multiple entities in the attachment text.
[0050] The execution subject of the embodiment of the present application is an electronic device, which can be a terminal device, such as a laptop, a desktop computer, a tablet computer, etc., or a server. In practical applications, whether the electronic device is a terminal device or a server can be determined according to actual conditions, and no specific limitation is imposed on this.
[0051] The initial email includes recipient information and attachments.
[0052] In actual applications, the initial email may be a report email with a table attachment.
[0053] Exemplarily, the attachment text may be a tabular text, or a text in other formats, and the embodiments of the present application do not impose any specific limitation on this.
[0054] Optionally, the initial email may also include CC information, a subject, and an email body written by the user.
[0055] The attachment may include execution data for one or more tasks. For example, in an automated monitoring scenario, when monitoring a specific task (i.e., the target task), relevant data generated each time the specific task is executed can be obtained, such as execution time, execution status (success or failure), error type, execution progress, resource usage, network-related data, input data, etc.
[0056] In a possible implementation, the attachment text may be segmented to obtain multiple words. Then, each word is tagged with a part of speech to determine the part of speech of each word. Finally, named entity recognition is performed on the multiple words according to the part of speech of each word to determine multiple entities of the attachment text.
[0057] Among them, word segmentation refers to the process of dividing a continuous text sequence into meaningful basic units (i.e., words) according to certain rules.
[0058] Part-of-speech tagging refers to the process of assigning a part-of-speech tag to each word. Part-of-speech is a classification of the grammatical functions of words, such as nouns, verbs, adjectives, adverbs, etc.
[0059] Among them, named entity recognition is to identify entity names with specific meanings in the attachment text and classify them into predefined categories, such as date, amount, organization name, etc.
[0060] Optionally, the above word segmentation, part-of-speech tagging and named entity recognition can be implemented by spaCy.
[0061] In this implementation, entities in the attachment text can be effectively identified by performing word segmentation, part-of-speech tagging and name recognition processing on the attachment text, so as to facilitate subsequent rapid location of key information in the attachment text, namely, the execution status information corresponding to the target task.
[0062] Optionally, basic information of the email attachments may also be extracted, such as the number, type, size, etc. of the attachments.
[0063] S22. According to the multiple entities of the attachment text, a semantic analysis is performed on the attachment text to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task.
[0064] Optionally, the execution status information includes the error type and error time each time the target task fails to be executed. Further, the execution status information may also include the number of failures.
[0065] Considering that the successful execution of a task is the foundation of a task, that is, it is necessary to pay attention to the information related to the failure of task execution during the task execution process, so that the task can be corrected and improved based on these data in the future, the success rate of task execution can be improved, and the smooth execution of enterprise business can be ensured. Therefore, it is necessary to determine the identification of the target task corresponding to the attachment text and the execution status information of the target task according to the multiple entities of the attachment text.
[0066] Exemplarily, the identifier of the target task may be the name of the target task. Optionally, the identifier of the target task may also be a digital code, etc., for uniquely indicating the target task.
[0067] Optionally, a pre-trained BERT model can be used to perform deep semantic analysis on the attachment text based on multiple entities in the attachment text to extract important information related to a specific task, that is, to extract the identifier of the target task corresponding to the attachment text and the execution status information of the target task.
[0068] Optionally, in some implementations, after the execution status information is determined, a statistical analysis may be performed on the execution status information to determine a statistical quantity of the execution status information.
[0069] Exemplarily, the statistical analysis includes calculating the mean, median, and standard deviation.
[0070] In practical applications, the above statistical analysis and processing can be implemented through data analysis libraries such as Pandas.
[0071] Furthermore, the execution status information may be clustered and analyzed by a clustering algorithm to determine the execution status trend of the target task.
[0072] Optionally, the clustering algorithm may be a K-means clustering algorithm, or other clustering algorithms, which is not specifically limited in the embodiments of the present application.
[0073] Exemplarily, the execution status trend may be that the failure frequency is getting faster, the number of failures is increasing, the error type a is occurring more frequently, and the like.
[0074] In the above implementation, by determining the statistics of the execution status information and the execution status trend of the target task, the email body can be better edited based on the above information to ensure that the recipient can understand the task execution status more intuitively and comprehensively.
[0075] S23. Perform visualization processing on the execution status information to generate visualization results.
[0076] In practical applications, in order to help users view the execution status of target tasks more intuitively, the execution status information can be visualized.
[0077] In a possible implementation, a statistical graph and / or table may be generated according to the execution state information, wherein the statistical graph and / or table is a visualization result.
[0078] Exemplarily, statistical charts include bar charts, line charts, pie charts, and the like.
[0079] Optionally, you can generate statistical graphs using Matplotlib or Seaborn to visually display the data distribution and trends of the execution status information.
[0080] Optionally, generating a table according to the execution status information can be achieved by the following process: creating a data frame through the Python Pandas library according to the entities included in the execution status information of the target task. Then, inputting the parameter data of each entity in the execution status information of the target task into the data frame to form a table.
[0081] Specifically, when creating a data frame using Python's Pandas library, you need to create a separate column for each entity and determine the data type of the column based on the parameter data type of the entity.
[0082] Optionally, a header row of the table may also be generated according to the execution status information.
[0083] It should be understood that the generated table can reflect the attachment text in summary, and is used to reflect the error type, number of failures, impact scope, etc. of the target task represented by the attachment text.
[0084] Optionally, after forming the table, the table may be formatted to ensure that the table has a reasonable structure and is easy to read.
[0085] S24. Process the visualization result, the identifier of the target task, and the execution status information of the target task through the large language model to generate the email body.
[0086] In a possible implementation, the visualization result, the identifier of the target task, and the execution status information of the target task may be used to generate prompt words, and the prompt words are input into the large language model to generate the email body.
[0087] Exemplarily, the prompt words may be: the task name is task A, the execution status information is execution status information A, the visualization results are table a and bar chart a, and the email body is generated according to the above information.
[0088] It should be understood that the generated email body includes a greeting, body content and a closing statement.
[0089] For the large language model, you can use a common greeting as the greeting of the email body, and a common ending as the ending of the email body; you can also use the greeting corresponding to the target task as the greeting of the email body, and the ending of the target task as the ending of the email body. Finally, generate the body content based on the execution status information of the target task and the visualization results, and then generate the email body.
[0090] Specifically, the initial body content can be generated according to the execution status information of the target task, and then together with the greeting and the closing statement, the initial email body is formed. Afterwards, the visualization result is inserted into the appropriate position of the initial body content of the initial email body, thereby generating the email body.
[0091] In another possible implementation, the visualization result, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task are input into the large language model to generate the email body.
[0092] Referring to the above implementation method, when generating the initial body content, in addition to combining the execution status information of the target task, you can also combine the statistics of the execution status information and the execution status trend, thereby improving the description dimension of the initial body content for the target task, so as to ensure that the recipient can more intuitively and comprehensively understand the task execution status.
[0093] In another possible implementation, the large language model can also generate an initial email body based on the recipient mailbox, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task. Then, the visualization result is inserted into the initial email body to generate the email body.
[0094] Referring to the above implementation, since the mailbox of each user in the enterprise is pre-set, the recipient mailbox in the initial email can be queried from the pre-set employee mailbox library through the large language model to obtain the employee name corresponding to the recipient mailbox, and then generate the recipient title part in the initial text content.
[0095] Furthermore, the employee mailbox library may also include each employee's position and gender. For example, if it is determined from the recipient's email that the recipient's mailbox is currently being used by Zhang San, who is a male and has a position of manager, then the recipient's title in the initial body content output by the large language model may be "Dear Manager Zhang" or "Dear Mr. Zhang".
[0096] In another possible implementation, the large language model can also generate the email body according to the recipient's mailbox, statistics of execution status information, execution status trends, the identifier of the target task, execution status information of the target task, and the email body written by the user.
[0097] With reference to the above implementation, when generating the initial body content, the user's speaking style and characteristics can also be determined based on the email body written by the user himself, so as to generate the initial body content according to the user's speaking style and characteristics and retain the user's personal characteristics.
[0098] Optionally, after the email body is generated, the email body may be formatted to ensure its readability and logic.
[0099] S25. Update the initial email according to the email body to generate a target email.
[0100] In a possible implementation, the email body may be added to the email body part of the initial email to generate a target email.
[0101] In another possible implementation, the email body can be added to the email body part of the initial email to generate an updated email. Then, the updated email is displayed to the user so that the user can modify the updated email. Finally, the email obtained after the user's modification is determined as the target email.
[0102] Optionally, after the target email is generated, the target email may be sent to a recipient for viewing.
[0103] The mail processing method provided in the embodiment of the present application determines multiple entities of the attachment text by performing named entity recognition on the attachment text of the initial mail. Afterwards, the attachment text is semantically analyzed according to the multiple entities of the attachment text to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task. Then, the execution status information is visualized to generate a visualization result. Next, the visualization result, the identifier of the target task and the execution status information of the target task are processed by a large language model to generate the body of the mail. Finally, the initial mail is updated according to the body of the mail to generate the target mail. In this technical solution, according to the attachment text of the initial mail, a visualization result with high accuracy, readability and reliability is automatically generated and inserted into the body of the mail to display the summary information of the attachment text; at the same time, an explanatory and standardized body of the mail is generated so that the recipient can know the content of the attachment more clearly, replacing the workload of manually writing the body of the mail, and improving the processing efficiency and accuracy.
[0104] Next, the scenarios involved in the embodiments of the present application are explained.
[0105] Scenario 1: After editing and obtaining the initial email, the user can click the send control. The electronic device responds to the user's sending operation on the initial email (i.e., the clicking operation on the send control) and obtains the initial email. Afterwards, the initial email is processed according to the above embodiment to generate and send the target email.
[0106] In this scenario, the entire operation is seamless for users. Users only need to fill in the basic information of the email and click send, which improves the user experience.
[0107] Scenario 2: After the user edits and obtains the initial email, he can click the Generate control. The electronic device responds to the user's operation of generating the email body and obtains the initial email. The initial email is then processed according to the above embodiment to generate and display the updated email. Next, the updated email is displayed to the user for the user to modify the updated email. After the user has finished modifying the updated email, he can click the Send control. In response to the user's click operation on the Send control, the electronic device determines the email obtained after the user's modification as the target email and sends it.
[0108] In this scenario, the generated email body is displayed to the user so that the user can adjust the email body according to his or her own needs, thereby ensuring that the target email finally generated can meet the user's personalized needs.
[0109] Scenario 3: After editing the initial email, the user can click the send control. The electronic device responds to the user's sending operation on the initial email and sends the target email to the recipient. After obtaining the initial email, the electronic device corresponding to the recipient processes the initial email according to the above embodiment, generates and displays the target email.
[0110] In this scenario, the entire operation is seamless for users. Users only need to fill in the basic information of the email and click send, which improves the user experience.
[0111] Figure 3 Schematic diagram of the mail processing method provided for this application Figure 2 ,like Figure 3 As shown, the method includes:
[0112] S31. Receive an initial email and an attachment to the initial email.
[0113] S32. Parse the initial email and the attachments through spaCy to obtain multiple entities of the attachment text.
[0114] S33. According to multiple entities in the attachment text, the attachment text is semantically analyzed through BERT to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task.
[0115] S34. Visualize the execution status information and generate a table.
[0116] S35: Input the identifier of the target task and the execution status information of the target task into the large language model for analysis.
[0117] S36. Obtain the initial email body output by the large language model.
[0118] S37. Insert the table into the initial email body to generate the email body.
[0119] It should be understood that the implementation method and principle of each step in this embodiment can refer to the contents of the above embodiments and will not be repeated here.
[0120] In summary, this technical solution combines natural language processing (NLP) (spaCy and BERT), natural language generation (NLG) (large language model) and data analysis technology to achieve automatic conversion from attachment text to email body, with a higher degree of automation and information processing capabilities. It can automatically parse attachments, extract key information, perform data analysis, generate structured tables and embed them into the email body, ensuring that the generated email body is accurate, reliable and easy to read, which can improve work efficiency.
[0121] This technical solution has the following technical effects:
[0122] 1. Automated processing: The entire process is automated, without the need for human intervention. Everything from attachment text parsing to email body generation can be completed automatically without human involvement, improving email writing efficiency and reducing errors caused by manual operations.
[0123] 2. High readability: The generated email body has correct grammar, clear logic, and reasonable table structure. It is easy to read and understand, making it easy for recipients to quickly understand the contents of the attachment.
[0124] 3. Information accuracy: Through NLP and data analysis technology, accurate extraction and summary of important information in the attachments to ensure the reliability of the table content.
[0125] 4. Deep semantic analysis: Use the BERT model to perform deep semantic analysis on the attachment content to improve the accuracy and comprehensiveness of information extraction.
[0126] 5. Natural language generation: Use a large language model to generate natural language text to make the email body more natural and humane.
[0127] 6. Data analysis and visualization: Through data analysis and visualization techniques, the generated tables not only contain data, but also intuitively display the distribution and trends of the data.
[0128] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0129] Figure 4 This is a schematic diagram of the structure of the mail processing device provided in the embodiment of the present application. Figure 4 As shown, the mail processing device 40 includes:
[0130] The recognition module 41 is used to perform named entity recognition on the attachment text of the initial email and determine multiple entities in the attachment text.
[0131] The semantic analysis module 42 is used to perform semantic analysis on the attachment text according to multiple entities in the attachment text, and determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task.
[0132] The processing module 43 is used to perform visualization processing on the execution status information to generate visualization results.
[0133] The processing module 43 is further used to process the visualization result, the identifier of the target task and the execution status information of the target task through the large language model to generate the email body.
[0134] The generation module 44 is used to process the visualization result, the identifier of the target task and the execution status information of the target task through the large language model to generate the email body.
[0135] In a possible implementation, the identification module 41 is specifically configured to:
[0136] Perform word segmentation on the attachment text to obtain multiple words.
[0137] Perform part-of-speech tagging on each word to determine the part of speech of each word.
[0138] According to the part of speech of each word, named entity recognition is performed on multiple words to determine multiple entities of the attachment text.
[0139] In a possible implementation, the processing module 43 is specifically configured to:
[0140] According to the execution status information, statistical graphs and / or tables are generated, and the statistical graphs and / or tables belong to visualization results.
[0141] In a possible implementation, after semantic analysis is performed on the attachment text according to multiple entities of the attachment text to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task, the processing module 43 is further used to:
[0142] Perform statistical analysis on the execution status information to determine the statistics of the execution status information.
[0143] The execution status information is clustered and analyzed using a clustering algorithm to determine the execution status trend of the target task.
[0144] Accordingly, the processing module 43 is specifically used for:
[0145] The visualization results, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task are input into the large language model to generate the email body.
[0146] In a possible implementation, the execution status information includes the error type and error time each time the target task fails to be executed.
[0147] In a possible implementation, the processing module 43 is specifically configured to:
[0148] An initial email body is generated according to the recipient mailbox, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task.
[0149] Insert the visualization results into the initial email body to generate the email body.
[0150] In a possible implementation, before performing named entity recognition on the attachment text of the initial email to determine multiple entities in the attachment text, the email processing device 40 further includes:
[0151] The acquisition module is used to acquire the initial email in response to the user's sending operation on the initial email.
[0152] Correspondingly, after the initial email is updated according to the email body to generate the target email, the email processing device 40 further includes:
[0153] The sending module is used to send the target email.
[0154] The mail processing device provided in the embodiment of the present application can be used to execute the mail processing method in any of the above embodiments. Its implementation principle and technical effects are similar and will not be repeated here.
[0155] It should be noted that it should be understood that the division of the various modules of the above device is only a division of logical functions. In actual implementation, all or part of them can be integrated into one physical entity, or they can be physically separated. And these modules can all be implemented in the form of software called by processing elements. They can also be implemented in the form of hardware. Some modules can also be implemented in the form of software called by processing elements, and some modules can be implemented in the form of hardware. In addition, all or part of these modules can be integrated together or implemented independently. The processing element here can be an integrated circuit with signal processing capabilities. In the implementation process, each step of the above method or each module above can be completed by an integrated logic circuit of hardware in the processor element or instructions in the form of software.
[0156] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Figure 5 As shown, the electronic device 50 provided in this embodiment includes: at least one processor 501 and a memory 502. Optionally, the electronic device 50 also includes a communication component 503. The processor 501, the memory 502 and the communication component 503 are connected via a bus 504.
[0157] In a specific implementation process, at least one processor 501 executes the computer-executable instructions stored in the memory 502, so that at least one processor 501 executes the above method.
[0158] The specific implementation process of the processor 501 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0159] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0160] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0161] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0162] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0163] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0164] The above-mentioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0165] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0166] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0169] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0170] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0171] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A mail processing method, characterized in that: include: Performing named entity recognition on the attachment text of the initial email to determine multiple entities of the attachment text; According to the multiple entities of the attachment text, the attachment text is semantically analyzed to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task; Performing visualization processing on the execution status information to generate a visualization result; Processing the visualization result, the identifier of the target task, and the execution status information of the target task through a large language model to generate an email body; The initial email is updated according to the email body to generate a target email.
2. The method according to claim 1, characterized in that The performing named entity recognition on the attachment text of the initial email to determine multiple entities of the attachment text includes: Perform word segmentation processing on the attachment text to obtain multiple words; Tag each word to determine its part of speech; According to the part of speech of each word, named entity recognition is performed on the multiple words to determine the multiple entities of the attachment text.
3. The method according to claim 1 or 2, characterized in that: The visualizing the execution status information to generate a visualization result includes: A statistical graph and / or table is generated according to the execution status information, and the statistical graph and / or the table belong to the visualization result.
4. The method according to claim 1 or 2, characterized in that: After performing semantic analysis on the attachment text according to the multiple entities of the attachment text to determine the identifier of the target task corresponding to the attachment text and the execution status information of the target task, the method further includes: Performing statistical analysis on the execution status information to determine a statistical quantity of the execution status information; Performing cluster analysis on the execution status information by using a clustering algorithm to determine the execution status trend of the target task; Accordingly, the visualization result, the identifier of the target task, and the execution status information of the target task are processed by the large language model to generate the email body, including: The visualization result, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task are input into the large language model to generate the email body.
5. The method according to claim 1 or 2, characterized in that: The execution status information includes the error type and error time each time an error occurs during the execution of the target task.
6. The method according to claim 4, characterized in that The step of inputting the visualization result, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task into the large language model to generate the email body includes: Generate an initial email body according to the recipient mailbox, the statistics of the execution status information, the execution status trend, the identifier of the target task, and the execution status information of the target task; The visualization result is inserted into the initial email body to generate the email body.
7. The method according to claim 1 or 2, characterized in that: Before performing named entity recognition on the attachment text of the initial email to determine multiple entities of the attachment text, the method further includes: In response to a user sending operation on the initial email, acquiring the initial email; Correspondingly, after the initial email is updated according to the email body to generate a target email, the method further includes: Send the target email.
8. A mail processing device, characterized in that: include: A recognition module, used to perform named entity recognition on the attachment text of the initial email, and determine multiple entities of the attachment text; A semantic analysis module, configured to perform semantic analysis on the attachment text according to multiple entities of the attachment text, and determine an identifier of a target task corresponding to the attachment text and execution status information of the target task; A processing module, used for visualizing the execution status information and generating a visualization result; The processing module is further used to process the visualization result, the identifier of the target task and the execution status information of the target task through a large language model to generate an email body; The generating module is used to update the initial email according to the email body to generate a target email.
9. An electronic device, characterized in that: include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 7 when executed by a processor.