Mail processing and information management method, device, program product
Patent Information
- Application Number
- CN202611160984.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-31
- Publication Date
- 2026-10-23
AI Technical Summary
[0003]本申请提供了一种邮件处理方法、信息管理方法、电子设备以及计算机程序产品,以至少解决相关技术中邮件翻译效果不佳的问题
[0017]通过本申请,依托外部翻译系统对目标邮件进行邮件翻译,并在获取到原始翻译数据时能够对其中所包含的外部翻译系统行程的衍生数据进行过滤,以能够减少目标翻译邮件内的冗余数据以提高目标邮件进行翻译的译文有效性。与此同时,在利用外部翻译系统对目标邮件进行翻译时保证其输出的原始翻译数据适配目标邮件的文件格式,能够减少额外的文件格式转换等步骤,以能够有利于减少利用目标翻译结果时处理步骤,从而能够提高其可使用性。因此,可以解决邮件翻译效果不佳技术问题,达到提高邮件翻译结果可靠性以及可使用性技术效果。
Smart Images

Figure CN122965523A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and in particular to an email processing method, an information management method, an electronic device, and a computer program product. Background Technology
[0002] In scenarios involving the translation of documents such as emails, one can typically use the translation function provided by a webpage or input the content to be translated into an artificial intelligence model. However, the translation results are often unreliable or contain a lot of redundant information, resulting in poor email translation quality that is difficult to use and makes it even more difficult to effectively automate information management. Summary of the Invention
[0003] This application provides an email processing method, an information management method, an electronic device, and a computer program product to at least solve the problem of poor email translation in related technologies.
[0004] This application provides an email processing method, which includes: obtaining a target email to be translated; constructing a translation task containing the content of the target email; calling the interaction interface of an external translation system; sending the translation task to the external translation system via the interaction interface; using the external translation system to execute the translation task; and obtaining the original translation data obtained by the external translation system translating the target email; wherein the original translation data matches the file format of the target email; and identifying and filtering derived data within the original translation data to generate the target translated email; wherein the derived data represents non-email content data generated during the translation process of the target email by the external translation system.
[0005] In one embodiment of this application, identifying and filtering derived data within the original translation data to obtain the target translated email includes: identifying whether the original translation data contains substantive translation data; in response to the original translation data containing substantive translation data, identifying a preset derived identifier contained within the substantive translation data, using the data corresponding to the preset derived identifier as derived data, deleting the derived data to obtain a preliminary filtered email; identifying and deleting redundant characters within the preliminary filtered email to generate the target translated email; wherein, redundant characters include at least one of spaces, blank lines, and null values.
[0006] In one embodiment of this application, the preset derivative identifier includes a start identifier, a thinking label, and an end identifier; using the data corresponding to the preset derivative identifier as derivative data includes: taking the adjacent start identifier and thinking label as the start end, and taking the end identifier following the start end as the end end; using the data between the start end and the end end and the preset derivative identifier as derivative data; and / or, identifying whether the original translation data contains substantive translation data includes: identifying whether the original translation data is a null value or an empty string; in response to the original translation data being a null value or an empty string, determining that the original translation data does not contain substantive translation data; in response to the original translation data not being a null value and not an empty string, determining that the original translation data contains substantive translation data.
[0007] In one embodiment of this application, generating a target translated email includes: obtaining structured data to be evaluated; wherein the structured data is formed by strings of original translated data or original translated data with filtered derived data; using the text content of the answer nodes within the structured data as the email translation content, and using the email translation content to form a target translated email.
[0008] In one embodiment of this application, using the text content of the answer node within structured data as the email translation content includes: obtaining the data node corresponding to the candidate answer list within the structured data as the candidate answer node; determining whether the candidate answer node is an array and includes at least one data item; in response to the candidate answer node being an array and including at least one data item, obtaining the data within the candidate answer node as the reply data, identifying message-type nodes within the reply data, and using the text output node contained in the message-type node as the answer node; and in response to the answer node having substantial text content, using the substantial text content of the text output node as the email translation content.
[0009] In one embodiment of this application, generating the target translated email further includes: monitoring the anomaly in the generation process of the target translated email; in response to detecting an anomaly in the generation process of the target translated email, generating an anomaly log that records the anomaly information, and causing the target translated email to contain an empty string or a null value.
[0010] In one embodiment of this application, after obtaining the original translation data from the translation of the target email by an external translation system, the method further includes: obtaining structured data to be evaluated; wherein the structured data is formed by strings of the original translation data or the original translation data of the filtered derived data; identifying the lexical consumption record nodes contained in the structured data; in response to the existence of substantial data and normal status of the lexical consumption record nodes, converting the lexical consumption record nodes into entity object classes, and extracting the lexical consumption data contained in the entity object classes as the lexical consumption amount for translating the target email; otherwise, setting the lexical consumption amount for translating the target email as the default estimated value.
[0011] In one embodiment of this application, constructing a translation task containing the content of a target email includes: configuring a first instance parameter to create a title translation subtask; wherein the first instance parameter includes the email title of the target email and title translation parameters; the title translation parameters include at least one of an interface key of an external translation system, a title translation instruction, and user identity information; the user identity information includes the user identifier of the current user and / or its tenant identifier; configuring a second instance parameter to create a body translation subtask; wherein the second instance parameter includes the email body of the target email and file translation parameters; the file translation parameters include an interface key of an external translation system, a body translation instruction, and user identity information; the body translation instruction at least indicates maintaining file format matching; and treating the title translation subtask and the body translation subtask as parallel translation tasks.
[0012] In one embodiment of this application, identifying and filtering derived data within the original translation data to generate a target translated email includes: identifying and filtering derived data within the original translation data to obtain initial target data; performing preset email processing on the initial target data to obtain the target translated email; wherein, the preset email processing includes at least one of email verification processing and email format processing; email verification processing means performing translation verification on the terminology keywords within the initial target data using a pre-constructed target terminology set; email format processing means performing email format restoration processing on the initial target data according to the email format of the target email.
[0013] In one embodiment of this application, after generating the target translation email, the process includes: obtaining the target email area of the target email system, and displaying the target translation email in an editable manner in the target email area; wherein, the target email area includes at least one of an email editing area, a draft text area, and a translation assistance area; and in response to a confirmation instruction, applying the target translation email from the target email area.
[0014] This application also provides an information management method, which includes: obtaining a translation request; using the email associated with the translation request as the target email to be translated; processing the target email using any of the email processing methods described above to obtain the target translated email; responding to the translation request using the target translated email; and associating the target translated email with the requesting user of the translation request.
[0015] This application also provides an electronic device, comprising: a storage module, a computing module, and an interaction module; the storage module includes a first memory and a second memory, the first memory being used to store a computer program, and the second memory being used to store a target terminology set; the computing module includes a processor, the processor being connected to the first memory and the second memory respectively; the processor is used to execute the computer program to implement the email processing method as described above, or to implement the information management method as described above; the interaction module is connected to the computing module and is used to obtain translation requests from external input and / or display target translation emails to the outside world.
[0016] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described email processing methods; or, implements the steps of the above-described information management methods.
[0017] This application utilizes an external translation system to translate target emails. Upon obtaining the original translation data, it filters out derived data from the external translation system's processes, reducing redundant data and improving the effectiveness of the translated text. Simultaneously, by ensuring the output of the original translation data is compatible with the target email's file format, it reduces additional file format conversion steps, thereby minimizing processing steps when using the translation results and improving usability. Therefore, it solves the technical problem of poor email translation quality, achieving improved reliability and usability of email translation results. Attached Figure Description
[0018] To more clearly illustrate the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram of the structure of an embodiment of the electronic device of this application; Figure 2 This is a schematic diagram of the structure of an embodiment of the management system of this application; Figure 3 This is a schematic diagram illustrating an application scenario of an embodiment of the management system of this application; Figure 4 This is a flowchart illustrating an embodiment of the information management method of this application; Figure 5 This is a flowchart illustrating an embodiment of the email processing method of this application; Figure 6 This is a flowchart illustrating another embodiment of the email processing method of this application; Figure 7 This is a flowchart illustrating another embodiment of the email processing method of this application. Detailed Implementation
[0020] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.
[0021] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0022] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] The specific application environment architecture or specific hardware architecture on which the execution of email processing methods and information management methods depends is described here.
[0024] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of an embodiment of the electronic device of this application.
[0025] In one embodiment, the electronic device may include a storage module 11, a computing module 12, and an interaction module 13.
[0026] The storage module 11 may include a first memory 111 and a second memory 112, wherein the first memory 111 is used to store computer programs and the second memory 112 is used to store target terminology sets.
[0027] The computing module 12 may include a processor 121, which is connected to a first memory 111 and a second memory 112, respectively. The processor 121 is used to execute computer programs to implement an email processing method or an information management method. The detailed working principles of the email processing method and the information management method will be illustrated in detail later.
[0028] The interactive module 13 is connected to the computing module 12 and is used to obtain translation requests from external input and / or display target translation emails to external systems.
[0029] For example, the interaction module 13 may include a mouse, keyboard, or touchscreen, allowing users to interact with electronic devices to transmit translation requests to the management system. The interaction module 13 may also include a screen capable of displaying, at least as described above, the target translation email for the user to review and edit.
[0030] For example, electronic devices can be mobile phones, personal computers, tablets, smartwatches, in-vehicle systems, servers, etc., without limitation.
[0031] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of an embodiment of the management system of this application.
[0032] In one embodiment, the management system may include a network module 21 and a computing module 22.
[0033] As its name suggests, network module 21 has network service capabilities. When an external translation system requires a network connection, network module 21 can be used to communicate with the external translation system. For example, the external translation system may include an open-source large artificial intelligence model or a trained translation model, without limitation.
[0034] The computing module 22 may include a central processing unit 221.
[0035] The computing module 22 is connected to the network module 21. The computing module 22 is used to implement an email processing method, or an information management method. That is, the computing module 22 can translate the target email to be translated from the current language into a target translated email in the target language; or, it can obtain translation requests, adapt to the translation requests, translate the target email accordingly, and associate the translated email with the requesting user to at least achieve email translation management. The detailed translation principles of the email processing method and the management principles of the information management method will be explained in detail later, and will not be elaborated upon here.
[0036] Optionally, when the external translation model is deployed locally, the computing module 22 may also include a graphics processor connected to the central processing unit 221, and the central processing unit 221 and the graphics processor can cooperate to translate the target email.
[0037] Furthermore, the management system may also include a storage module. The storage module has data storage capabilities and can store a pre-built target terminology set for the target business scenario. Thus, in this embodiment, initial target data can be obtained by identifying and filtering derived data within the original translation data. The initial target data can then undergo pre-defined email processing to obtain the target translation email. This pre-defined email processing includes at least one of email verification processing and email format processing. Email verification processing involves translating and verifying the terminology keywords within the initial target data using the pre-built target terminology set. Email format processing involves restoring the email format of the initial target data according to the target email's format. Specific applications of the target terminology set will be illustrated with examples later.
[0038] For example, the management system could be an email translation management system, a CRM (Customer Relationship Management) system, etc., without limitation.
[0039] Please see Figure 3 , Figure 3 This is a schematic diagram illustrating an application scenario of an embodiment of the management system of this application.
[0040] In one embodiment, a user can send a translation request to the management system through an interactive module to request the translation of a target email from the current language to the target language. The target language can be one or more, and is not limited thereto.
[0041] In response to translation requests, the management system can generate translation tasks and send them to an external translation system. Optionally, the external translation system can be deployed on a local server or a public server. The management system can connect to the external translation system through its network module to send translation tasks.
[0042] An external translation system can perform translation tasks on target emails and feed the raw translation data back to the management system. The management system receives the raw translation data, identifies non-email content (derived data) generated during the translation process, and filters the identified derived data. This involves deleting derived data from the raw translation data to generate data with higher consistency with the target email content. This data is then used to generate the target translated email, reducing redundant data and improving the effectiveness of the translated text.
[0043] At the same time, when using an external translation system to translate a target email, the system can control the output of the original translation data to be adapted to the target email's file format, reducing additional file format conversion steps and thus improving usability by minimizing the processing steps required to utilize the target translation results.
[0044] In an alternative embodiment, the management system can also be directly connected to the user's mailbox to automatically translate emails received in the user's mailbox. Alternatively, the management system can be integrated into a plugin of the user's mailbox, which can trigger the management system plugin to translate received or pending emails when the user makes an email translation request. This is not limited to any particular embodiment.
[0045] For a description of the features in the embodiments corresponding to the management system, please refer to the relevant descriptions of the embodiments corresponding to the information management method and the email processing method, which will not be repeated here.
[0046] The embodiments of this application provide an information management method, and the information management method is described in detail below in conjunction with the execution flow of the information management method.
[0047] Please see Figure 4 , Figure 4 This is a flowchart illustrating an embodiment of the information management method of this application.
[0048] S101: Request a translation.
[0049] In this embodiment, the translation request may be received by the interaction module of the electronic device from an external user, or it may be automatically generated by the computing module of the management module according to the translation plan or by detecting emails in non-target languages. There is no strict limitation here.
[0050] S102: Select the email associated with the translation request as the target email to be translated.
[0051] In this embodiment, in response to receiving a translation request, the computing module can determine the associated email based on the information carried in the translation request, and use the determined email as the target email to be translated.
[0052] The target email can be a received email or an email to be sent, etc., and there is no strict limitation here.
[0053] S103: Use email processing methods to process the target email and obtain the target translated email.
[0054] In this embodiment, the computing module and the network module can work together to implement an email processing method to translate the target email from the current language to the target language and process the email to obtain the target translated email.
[0055] S104: Response the translation request using the target translation email and associate the target translation email with the user who requested the translation request.
[0056] In this embodiment, the computing module can output the target translated email in response to the translation request, send the target translated email back to the requesting user, and associate the target translated email with the user's account or session for storage. This can record the user's translation history, which is convenient for subsequent retrieval, reuse, and management, thereby improving the integrity of the email translation service and enhancing the user experience.
[0057] Taking a CRM system as an example, the target email, target translation email, request source user, and related customers can also be associated together.
[0058] The embodiments of this application provide an email processing method, and the email processing method is described in detail in conjunction with the execution flow of the email processing method.
[0059] Please see Figure 5 , Figure 5 This is a flowchart illustrating an embodiment of the email processing method of this application.
[0060] S201: Obtain the target email to be translated and construct a translation task containing the content of the target email.
[0061] In this embodiment, the computing module can acquire the target email to be translated, extract the email body, email title, and other email content, and construct a translation task based on this. The translation task can specify a target language, or it can be a target language pre-configured by an external translation system; this is not limited here.
[0062] S202: Call the interaction interface of the external translation system, send the translation task to the external translation system through the interaction interface, use the external translation system to execute the translation task, and obtain the original translation data obtained by the external translation system translating the target email; wherein, the original translation data matches the file format of the target email.
[0063] In this embodiment, in response to completing the translation task, the computing module can interact with the network module and call the interaction interface of the external translation system through the network module. The computing module can establish a communication connection with the external translation system through the network module and the interaction interface to send the translation task to the external translation system.
[0064] In this case, after receiving a translation task, the external translation system can translate the target email and return the original translation data.
[0065] Matching the original translation data with the target email's file format can be achieved by controlling the external translation system to ensure that its output original translation data maintains the same file format as the target email. This reduces the need for additional format conversions or adaptations, minimizing intermediate processing steps and lowering the risk of information loss or garbled text due to format mismatches. It also improves the usability of the original translation data. The file format can be plain text, HTML (Hypertext Markup Language), etc. For example, to facilitate direct use of the target translated email, the target email can be formatted as an HTML file, and both the original translation data and the target translated email can also be formatted as HTML files.
[0066] The computing module can obtain raw translation data through the network module and interactive interface.
[0067] S203: Identify and filter derived data within the original translation data to generate the target translated email; wherein, derived data refers to non-email content data generated during the translation of the target email by the external translation system.
[0068] In this embodiment, in response to acquiring the original translation data, the computing module can analyze the acquired original translation data to identify the parts that do not belong to the original email content, i.e., derived data. Derivative data may include non-email text information such as timestamps added by the translation system, session identifiers, format control characters, system comments, thought processes, or redundant tags. The computing module can filter the derived data from the original translation data using preset filtering rules or recognition algorithms, retaining relatively clean translated email content to generate the target translated email. This reduces the need for users to manually remove interfering information from the translation results, thereby improving the reliability and direct usability of the target translated email.
[0069] In other words, this embodiment relies on an external translation system to translate the target email. When obtaining the original translation data, it filters out the derived data generated by the external translation system to reduce redundant data within the target email, thereby improving the effectiveness of the translated text. Simultaneously, when using the external translation system to translate the target email, it ensures that the output original translation data is compatible with the target email's file format, reducing additional file format conversion steps. This reduces the processing steps required to utilize the translation results, thus improving usability.
[0070] Please see Figure 6 , Figure 6 This is a flowchart illustrating another embodiment of the email processing method of this application.
[0071] S301: Retrieve the target email to be translated.
[0072] In this embodiment, the computing module can obtain the original email that needs to be translated from sources such as email systems, user input, or databases, and identify it as the target email. The target email may include components such as the email title and the email body as the email content.
[0073] S302: Configure the first instance parameters to create the title translation subtask.
[0074] In this embodiment, the computing module can configure a first instance parameter for the title portion of the target email and create a title translation subtask accordingly. This enables lightweight and fast translation processing of the short text characteristics of the email title, reducing the risk of interference with the body translation.
[0075] The first instance parameters include the target email's title and title translation parameters. The title translation parameters include at least one of the following: the interface key of the external translation system, the title translation instruction, and user identity information. The user identity information includes the current user's user ID and / or their tenant ID.
[0076] User identity information can be used to distinguish translation configurations, billing and access management for different users or tenants, or to facilitate association between target emails, target translation emails and requesting source users.
[0077] For example, the first instance parameter may include the email title of the target email, the interface key of the external translation system, the tenant ID (identity), the user ID, and the title translation instruction. For instance, the title translation instruction could be "Translate into the target language, return the result directly, without interpretation".
[0078] S303: Configure the second instance parameters to create the text translation subtask.
[0079] In this embodiment, the computing module can configure a second instance parameter for the body of the target email and create a body translation subtask accordingly. This allows it to adapt to scenarios with long and complex body content, preserve the original layout and style, and improve the readability of the translation results.
[0080] The second instance parameter can include the email body of the target email and file translation parameters. The file translation parameters include the interface key of the external translation system, text translation instructions, and user identification information. The text translation instructions must at least indicate that file format matching should be maintained.
[0081] For example, the second instance parameter may include the email body of the target email, the interface key of the external translation system, the tenant ID, the user ID, and the text translation instruction. For instance, the text translation instruction could be "Keep HTML format, return plain HTML after translation, without interpretation".
[0082] S304: Construct a translation task.
[0083] In this embodiment, the computing module assembles the title translation subtask and body translation subtask created in the preceding steps into a complete translation task, and the two subtasks are executed in parallel. Parallel processing can make full use of system resources, enabling the translation process of email titles and email bodies to start almost simultaneously, thereby reducing the overall translation time and improving user response speed.
[0084] Optionally, during subsequent translation tasks, the system can wait for the title translation subtask and the body text translation subtask to complete. A pre-set waiting time threshold can be configured. If at least one of the title translation subtask and the body text translation subtask has not completed by the time the threshold is reached, the translation task is considered to have failed. For example, the waiting time threshold could be 3 minutes, 5 minutes, 6 minutes, etc., to reduce the risk of excessively long and redundant waiting times, and also to reduce the risk that a waiting time threshold that is too short will typically prevent the translation from being completed.
[0085] Of course, in an alternative embodiment, the translation task can also be implemented serially as a title translation subtask and a body text translation subtask, which is not limited here.
[0086] S305: Call an external translation system to perform the title translation subtask.
[0087] In this embodiment, the computing module can call the interactive interface of an external translation system through the network module to send the title translation subtask to the external translation system. The external translation system can translate the email title according to the first instance parameters and return the original translated data corresponding to the email title.
[0088] S306: Call an external translation system to perform the text translation subtask.
[0089] In this embodiment, the computing module invokes an external translation system in parallel to perform the text translation subtask. The external translation system, based on the text translation instructions in the second instance parameters, ensures that the output contains original translated data corresponding to the email body that matches the file format of the target email.
[0090] S307: Obtain the raw translation data by translating the target email using an external translation system.
[0091] In this embodiment, the computing module can receive the original translation data of the email header and the original translation data of the email body returned by the external translation system, and use both as the original translation data of the target email. In this way, the original translation data can maintain a file format match with the target email, reducing the need for additional format conversions.
[0092] S308: Identify whether the original translation data contains substantive translation data.
[0093] In this embodiment, when the original translation data is identified to contain substantial translation data, step S309 can be executed; when the original translation data is identified not to contain substantial translation data, the process can end or a null value or empty string can be returned as the email translation content.
[0094] The computation module can perform validity checks on the acquired raw translation data, specifically identifying whether the raw translation data contains null values or empty strings. If the raw translation data contains null values or empty strings, it is determined that the raw translation data does not contain substantive translation data. If the raw translation data is neither null nor empty, it is determined that the raw translation data contains substantive translation data. This reduces invalid calculations on invalid or blank translation results, saving computational resources for the management system.
[0095] S309: Filter derived data within the original translation data.
[0096] In this embodiment, in response to the original translation data containing substantive translation data, the calculation module can further identify preset derivative identifiers contained within the substantive translation data. The data corresponding to the preset derivative identifiers is used as derivative data, and deleting the derivative data yields a preliminary filtered email.
[0097] Specifically, the preset derived identifiers can include a start identifier, a thinking label, and an end identifier. An adjacent start identifier and thinking label can be used as the starting point, and the end identifier following the start point can be used as the ending point. The data between the start and end points, along with the preset derived identifiers, are considered as derived data.
[0098] Furthermore, redundant characters within the initially filtered emails can be identified and removed. This process of identifying and removing redundant characters in the initially filtered emails generates the target translation email, thus thoroughly cleaning the translation data for the target translation email. Redundant characters include at least one of spaces, blank lines, and null values.
[0099] In this way, by filtering the derived data within the original translation data, the computing module can easily generate relatively clean and directly readable target translation emails. Through multi-layer filtering, it can reduce non-email content data attached by external translation systems and reduce the tedious manual cleaning operations for users.
[0100] For example, the start identifier may be "<"; the thinking tag may be "think", where all characters of the thinking tag may be case-insensitive; the end identifier may be ">". In this way, "<think" can be taken as the start end, the adjacent ">" following it can be taken as the end end, and the data between the start end and the end end can be deleted as derived data.
[0101] For example, when filtering derived data in the original translation data, a method such as a regular expression may be used for filtering.
[0102] S310: Obtain structured data to be evaluated.
[0103] In this embodiment, the structured data may be formed by a character string of original translation data or original translation data with derived data filtered out.
[0104] That is to say, the calculation module may obtain the original translation data that has or has not undergone filtering processing, and convert it into the structured data to be evaluated in the form of a character string. The structured data may be a parsing result of format data returned by a translation interface, which can facilitate subsequent extraction of information such as translation content and token consumption by nodes, and can also improve the standardization and scalability of data parsing.
[0105] Optionally, the character string returned by the external translation system may be parsed into a JSON (JavaScript Object Notation, key-value pair data) object, and the root node of the JSON is imported to obtain the structured data.
[0106] S311: Take the text content of the response node in the structured data as the email translation content.
[0107] In this embodiment, the calculation module may query the structured data, and determine the text content included in the response node as the final email translation content.
[0108] Obtain the data node corresponding to the candidate response list (such as the "choices" field) in the structured data, and use it as a candidate response node. Determine whether the candidate response node is an array and includes at least one piece of data.
[0109] In response to a candidate answer node being an array containing at least one data entry, the data within each candidate answer node is retrieved as the reply data. Message-type nodes (such as "message" field nodes) within the reply data are identified, and the text output nodes contained within these message-type nodes are used as the answer nodes. If the answer node contains substantial text content (such as the content within a "content" field node), the substantial text content of the text output node is used as the email translation content. This improves the accuracy of the translation results, reduces the risk of content extraction errors due to changes in data structure, and further enhances the reliability of the translation results.
[0110] In simpler terms, you can read the content of the first reply message returned by the external translation system, and retrieve the node named "choices" from the response JSON object (the reply list returned by the external translation system). Check if the "choices" node is an array and contains at least one element. If so, retrieve the first reply from the "choices" array, extract the "message" node from it, and then extract the "content" node from the "message" node as the translated email content returned by the external translation system. If the "content" node exists and is not empty, convert the "content" to a string and return it as the translated email content.
[0111] If no actual text content is obtained from the candidate answer list, message node, or text output node, an empty value or an empty string is returned as the email translation content.
[0112] S312: Use email translation content to generate target translation emails.
[0113] In this embodiment, the computing module reassembles the extracted email translation content according to the email structure of the target email's title and body to form a complete target translated email.
[0114] Furthermore, the computing module can also monitor anomalies in the generation process of the target translated email mentioned above, such as network timeouts, interface errors, and data parsing failures.
[0115] In response to the detection of an anomaly in the generation process of the target translated email, an anomaly log is generated to record the anomaly information, and the target translated email is made to contain an empty string or null value.
[0116] S313: Identify the lexical consumption record nodes contained in structured data.
[0117] In this embodiment, after acquiring the structured data, the computing module can further identify whether there are token consumption record nodes. Token consumption record nodes are typically returned by an external translation system and are used to record the number of tokens consumed in this translation, facilitating computational cost management and analysis.
[0118] S314: Determine the lexical consumption for translating the target email.
[0119] In this embodiment, the computing module can verify the existence and status of word consumption record nodes.
[0120] If the lexical consumption record node contains substantial data and is in a normal state, the lexical consumption record node is converted into an entity object class (e.g., a custom field "XUsageDto", where X represents the orchestration platform). The lexical consumption data contained in the entity object class is extracted as the lexical consumption amount for translating the target email. Otherwise, the lexical consumption amount for translating the target email is set to the default estimated value.
[0121] Furthermore, the management system can also associate the token consumption with the requesting user.
[0122] Alternatively, the token consumption amount can be predefined and assigned a default estimated value such as 1. If a field node such as "usage" is not empty and is a normal JSON object, the usage node is converted into an entity object class "XUsageDto", and the total token consumption amount is extracted from "XUsageDto". If the total token consumption amount is not empty and is greater than 0, it is used as token consumption data and assigned to the token consumption amount.
[0123] In summary, this application shortens response time by parallelizing the translation subtasks of email headers and bodies. Furthermore, controlling the matching of the original translation results from the external translation system with the target email's file format reduces cumbersome steps of additional file format conversion. Filtering derived data and redundant characters reduces the need for manual cleaning of translated email content, improving the cleanliness of both the translated and target emails. Structured data further enhances the accuracy and efficiency of extracting translated content, thus ensuring parsing stability. Simultaneously, this application achieves accurate statistics on lexical consumption, facilitating reliable prediction and management of computational costs, thereby improving management system performance.
[0124] Please see Figure 7 , Figure 7 This is a flowchart illustrating another embodiment of the email processing method of this application.
[0125] S401: Obtain the business scenario file for the target business scenario.
[0126] In this embodiment, the computing module can obtain a business scenario file corresponding to the target business scenario to which the target email belongs.
[0127] Business scenario files may include at least one of the following: historical emails, customer information, product information, quotations, transaction orders, and contract templates.
[0128] For example, the computing module can respond to user configuration of the target business scenario by retrieving files associated with that scenario from the storage module, enterprise resource planning system, or email archive database. Obtaining multi-dimensional business scenario files enhances the richness and accuracy of the constructed target terminology set, improving the accuracy with which the target terminology set reflects common expressions and terminological habits within the target business scenario.
[0129] S402: Extract candidate terms from the business scenario file, and construct a target term set by classifying the translation information of the candidate terms according to the preset term categories.
[0130] In this embodiment, the computing module can utilize natural language processing technology to automatically extract candidate terms from business scenario files. For example, a statistical term extraction method combined with a pre-trained language model can be used to identify high-frequency professional terms, named entities, and fixed collocations in the file as candidate terms. For each candidate term, the computing module obtains its translation information, which includes at least one of the following: target language, matching translation expression and / or synonymous translation expression and / or disabled translation expression in the target language, business scenario, matching method, and priority.
[0131] The computing module constructs a target term set according to preset term categories. These preset term categories may include at least one of the following: customer identifier, supplier identifier, product information, transaction terms, transaction method, logistics method, port information, brand identifier, greeting, and email signature. By categorizing and storing candidate terms and their translation information to form a structured target term set, the efficiency and accuracy of subsequent term verification based on preset term categories can be improved.
[0132] S403: Construct a translation task containing email content and call the interaction interface of an external translation system to send the translation task to the external translation system.
[0133] In this embodiment, the computing module can extract the email content of the target email, such as the email body and email title, to construct a translation task. The translation task can specify the target language or rely on the default target language configured in the external translation system. The computing module and the network module work together. The network module calls the application programming interface or other interactive interface provided by the external translation system to send the translation task to the external translation system, so that the machine translation engine of the external translation system can perform the translation processing.
[0134] S404: Obtain the raw translation data from the external translation system and filter out non-email content data within the raw translation data to obtain the initial target data.
[0135] In this embodiment, the computing module can receive raw translation data returned by an external translation system through the network module. When outputting the translation results, the external translation system may append derivative data that is not part of the email content, such as timestamps, session identifiers, format specifiers, system comments, and thought processes. The computing module can use preset filtering rules or a trained classification model to identify and filter out this derivative data, retaining the pure email translation content as the initial target data. The filtered initial target data can maintain the same file format as the original target email, such as HTML (Hypertext Markup Language) or plain text, thus facilitating subsequent terminology location and replacement operations and reducing the risk of information misalignment due to format conversion.
[0136] In this way, the computing module can obtain initial target data by translating the content of the target email. The working principle of using an external translation system to translate email content to obtain initial target data will be illustrated in detail in the embodiments described later.
[0137] S405: Obtain the pre-built target terminology set for the target business scenario.
[0138] In this embodiment, the computing module can retrieve the target terminology set pre-built through steps S401 and S402 from the storage module based on the target business scenario identifier to which the target email belongs. It should be noted that steps S401 and S402 can be pre-built steps, allowing the target terminology set to be directly retrieved or updated during actual email processing and translation, without needing to build the target terminology set separately for each email processing session.
[0139] As explained earlier, the target term set can store translation information such as keywords and target translations for the target business scenario. Furthermore, the acquired target term set can be loaded into memory or cache, thereby improving the efficiency of rapid retrieval and matching during term recognition and verification.
[0140] S406: Use the target term set to determine the term keywords contained in the initial target data.
[0141] In this embodiment, the computing module can perform word segmentation and normalization on the email content to obtain email word segments. For example, normalization may include at least one of the following: converting to lowercase, removing punctuation, and restoring plural forms.
[0142] The calculation module can query whether the target term set contains email segmentation. If the target term set contains email segmentation, the calculation module can use the original email content corresponding to the email segmentation as term keywords.
[0143] Since the target terminology set contains multiple target terms corresponding to email word segmentation, the calculation module can determine the target terms corresponding to email word segmentation as target translation terms according to the matching factor. This allows for the verification of whether terminology keywords need correction using the target translation expression of the target translation terms, thereby facilitating the improvement of the adaptability of the selected target terms through comprehensive evaluation. The matching factor includes at least one of the following: matching frequency, business scenario, and terminology priority.
[0144] In response to the existence of target terms in the target terminology set that match the differences in email word segmentation, the calculation module can evaluate the matching degree between the target terms and the email word segmentation. The difference matching includes at least one of the following: differences between uppercase and lowercase, differences in plural forms, differences in abbreviations, and differences in punctuation. When the matching degree between the target terms and the email word segmentation reaches a matching degree threshold, the original email content corresponding to the email word segmentation is used as the terminology keyword. This helps improve the accuracy and comprehensiveness of identifying terminology keywords in the target email, thereby improving the reliability of translation verification and correction using the target terminology set, and further enhancing email processing performance.
[0145] S407: Use the target term set to verify whether there are any term keywords in the initial target data that need to be corrected.
[0146] In this embodiment, when the initial target data is verified using the target term set and it is determined that there are term keywords that need to be corrected, step S408 can be executed; when the initial target data is verified using the target term set and it is determined that there are no term keywords that need to be corrected, step S412 can be executed.
[0147] For example, the verification method may include: the calculation module can query the target translation expressions of terminology keywords within the target terminology set. The target translation expressions include matching translation expressions and / or synonymous translation expressions. It identifies whether the initial target data contains the target translation expressions. If the initial target data does not contain the target translation expressions, it determines that the initial target data contains terminology keywords that need correction. And / or, it queries the prohibited translation expressions of terminology keywords within the target terminology set; prohibited translation expressions can be considered translation expressions that are not allowed to appear in the target translation email. It identifies whether the initial target data contains prohibited translation expressions. If the initial target data contains prohibited translation expressions, it determines that the initial target data contains terminology keywords that need correction.
[0148] Thus, in this embodiment, by verifying whether prohibited translation expressions are used in the initial target data, the occurrence of unauthorized translation expressions in the target translated email can be reduced. This can improve the adaptability to real target business scenarios, enhance the functionality of email translation, optimize email processing performance, and systematically identify and reduce inappropriate translation expressions and terminology usage in the translation results.
[0149] S408: Query the location information of the terminology keywords to be corrected in the email content, and use the location information to locate the current translation expression within the initial target data.
[0150] In this embodiment, the computing module can record the positional information of terms and keywords within the email content, such as paragraph numbers, sentence indexes, and character offsets. Alignment techniques between the source and target text, such as word alignment models or attention alignment matrices, can be used to map the positional information onto the initial target data. This allows for the location of the translated fragment corresponding to the term or keyword to be corrected, serving as the current translation. This improves the accuracy of the term and keyword positional mapping, thereby ensuring the accuracy of the replaced translation and reducing the risk of mistakenly modifying other content.
[0151] S409: Determine whether the current translation expression has been located.
[0152] In this embodiment, when the current translation expression is located, step S411 can be executed; when the current translation expression is not located, step S410 can be executed.
[0153] S410: Request external confirmation of the current translation.
[0154] In this embodiment, in response to the failure to locate the current translated expression within the initial target data, the calculation module can generate verification information for the terminology keywords to be corrected, and generate a verification request carrying the verification information. The verification request can be displayed to the user or reviewers through user interface pop-ups, review queues, etc., allowing the user to manually confirm the location of the current translated expression. This reduces the possibility of forced identification leading to erroneous changes to other content, further improving the reliability of email processing. In response to receiving a correction instruction for the verification request, the calculation module can use the translated segment within the initial target data indicated by the correction instruction as the current translated expression.
[0155] S411: Obtain the target translation expression of the terminology keywords to be corrected within the target terminology set, replace the current translation expression with the target translation expression to obtain the target email data.
[0156] In this embodiment, the computing module can obtain the target translation expression of the terminology keywords to be corrected from the target terminology set, such as a matching translation expression or a synonymous translation expression, and replace the current translation expression located in the initial target data. Furthermore, when replacing the current translation expression with the target translation expression, the file format or attributes of the initial target data can remain unchanged, ensuring the matching of the translated terminology usage with the standard expressions of the target business scenario.
[0157] S412: Use the initial target data as the target email data.
[0158] In this embodiment, in response to determining that there are no terms or keywords to be corrected in the initial target data, the calculation module can use the initial target data as the target email data.
[0159] S413: Obtain the email format information of the target email.
[0160] In this embodiment, the computing module can identify the email format of the target email to generate email format information. The email format includes at least one of the following: paragraph order, line break position, indentation level, citation level, list numbering, table cells, hyperlinks, signature area, and markup language tag tree. For example, the identification process can be achieved by parsing the email source code or performing layout analysis on plain text emails. The acquired email format information can be used as the format basis for transforming the initial target data into the target translated email.
[0161] S414: Perform email format recovery processing on the target email data according to the email format information to obtain the target translated email.
[0162] In this embodiment, the computing module can combine email format information and email structure information to perform format restoration processing on the target email data obtained after correcting the terminology or the target email data obtained from the initial target data. The translated text content and format placeholders are then refilled into the email structure template corresponding to the email format information to generate a target translated email with a complete email format and structure. This can improve the automation capability of email processing. The target translated email can be considered as an email with a relatively reliable email format that can be applied, thereby improving the standardization of the email format of the target translated email after email processing.
[0163] For example, in response to the target email being a pending email, the computing module can identify the email structure to obtain email structure information. This email structure includes at least one of the following: email subject, salutation, greeting, body paragraphs, explanation, closing, signature, contact information, and historical citations. By combining email format information and email structure information to perform format restoration processing on the initial target data, the format of the translated email can be matched to that of the original target email in the email client, facilitating its direct use.
[0164] S415: Display the target translated email in an editable manner within the target email area.
[0165] In this embodiment, the computing module can acquire the target email area of the target email system and display the target translated email in an editable state within the target email area. The target email area may include at least one of an email editing area, a draft text area, and a translation assistance area. Users can directly view the complete translated email in this area and make minor adjustments or confirmations, thereby improving the flexibility of email processing and its integration with the target email system, and further optimizing email processing performance.
[0166] S416: In response to a confirmation command, apply the target translation email to the target email area.
[0167] In this embodiment, the computing module can monitor whether the user triggers a confirmation command. Upon receiving a confirmation command, it can be assumed that the target translated email within the current target email area has been confirmed by the user and is usable; therefore, the target translated email within the target email area can be applied.
[0168] For example, a confirmation command can be triggered by clicking the send button, save draft button, or confirm application button. In response to the confirmation command being triggered, the current target translation email content in the target email area can be applied, performing operations such as sending the email, saving it to the drafts folder, or replacing the original email. Thus, this embodiment achieves a closed-loop process from terminology set construction, translation, terminology verification, to email usage, improving the accuracy of terminology and work efficiency in international email communication.
[0169] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0170] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described email processing method embodiments; or, execute the steps in the above-described information management method embodiments.
[0171] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0172] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described email processing method embodiments; or, implements the steps in the above-described information management method embodiments.
[0173] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described email processing method embodiments; or, implements the steps in the above-described information management method embodiments.
[0174] Any of the components, modules, units, parts, methods, and operations described herein can be implemented using software, firmware, hardware (e.g., fixed logic circuitry), manual processing, or any combination thereof. Alternatively or additionally, any functionality described herein can be executed at least in part by one or more hardware logic components, such as, but not limited to, a central processing unit (CPU), a field-programmable gate array (FPGA), an application-specific integrated circuit (ASIC), an application-specific standard product (ASSP), a system-on-a-chip (SoC), a complex programmable logic device (CPLD), a microprocessor (MCU), etc. The terms "system," "computing device," or "apparatus" as used herein encompass various means, devices, and machines for processing data, including, for example, one or more programmable processors, computers, SoCs, or combinations thereof. The apparatus may also include code that creates an execution environment for the computer program in question, such as code constituting processor firmware, a protocol stack, a database management system, an operating system, a cross-platform runtime environment, a virtual machine, or one or more combinations thereof. The aforementioned computer program (also known as a program, software, software application, app, script, or code) can be written in any form of programming language, including compiled or interpreted languages, declarative or procedural languages, and can be deployed in any form, including as a standalone program or as a module, component, subroutine, object, or other unit suitable for a computing environment.
[0175] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0176] The foregoing has provided a detailed description of the email processing method, information management method, electronic device, and computer program product provided by this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of this application. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of this application.
Claims
1. An email processing method, characterized in that, The email processing method includes: Obtain the target email to be translated, and construct a translation task containing the content of the target email; The process involves calling the interaction interface of an external translation system, sending the translation task to the external translation system via the interaction interface, executing the translation task using the external translation system, and obtaining the original translation data obtained by the external translation system translating the target email; wherein the original translation data matches the file format of the target email. Derivative data within the original translation data is identified and filtered to generate a target translated email; wherein, the derived data represents non-email content data generated during the translation of the target email by the external translation system.
2. The email processing method according to claim 1, characterized in that, The process of identifying and filtering derived data within the original translation data to obtain the target translated email includes: Identify whether the original translation data contains substantive translation data; In response to the fact that the original translation data contains substantive translation data, a preset derivative identifier contained in the substantive translation data is identified, the data corresponding to the preset derivative identifier is used as the derivative data, and the derivative data is deleted to obtain the preliminary filtered email; Redundant characters in the preliminarily filtered emails are identified and removed to generate the target translated email; wherein, the redundant characters include at least one of spaces, blank lines, and null values.
3. The email processing method according to claim 2, characterized in that, The preset derivative identifiers include a start identifier, a thinking label, and an end identifier; The step of using the data corresponding to the preset derivative identifier as the derivative data includes: Using the adjacent starting identifier and the thinking tag as the starting end, and the ending identifier following the starting end as the ending end; the data between the starting end and the ending end, as well as the preset derived identifier, are used as the derived data; And / or, The process of identifying whether the original translation data contains substantive translation data includes: The system identifies whether the original translation data is an empty value or an empty string; in response to the original translation data being an empty value or an empty string, it determines that the original translation data does not contain substantive translation data; in response to the original translation data not being an empty value and not an empty string, it determines that the original translation data contains substantive translation data.
4. The email processing method according to claim 1, characterized in that, The generated target translated email includes: Obtain the structured data to be evaluated; wherein the structured data is formed by strings of the original translated data or the original translated data after filtering the derived data; The text content of the answer nodes within the structured data is used as the email translation content, and the target translated email is formed using the email translation content.
5. The email processing method according to claim 4, characterized in that, The step of using the text content of the answer nodes within the structured data as the content of email translation includes: Obtain the data nodes corresponding to the candidate answer list within the structured data, and use them as candidate answer nodes; Determine whether the candidate answer node is an array and contains at least one piece of data; In response to the fact that the candidate answer nodes are an array and include at least one piece of data, the data within the candidate answer nodes is obtained as the response data, the message type nodes within the response data are identified, and the text output nodes contained in the message type nodes are taken as the answer nodes. In response to the existence of substantial text content in the answer node, the substantial text content of the text output node is used as the translated content of the email.
6. The email processing method according to claim 4, characterized in that, The generated target translation email also includes: Anomaly monitoring is performed on the generation process of the target translated email; In response to the detection of an anomaly in the generation process of the target translated email, an anomaly log is generated to record the anomaly information, and the target translated email is made to contain an empty string or a null value.
7. The email processing method according to claim 1, characterized in that, After obtaining the original translation data from the external translation system's translation of the target email, the process further includes: Obtain the structured data to be evaluated; wherein the structured data is formed by strings of the original translated data or the original translated data after filtering the derived data; Identify the lexical consumption record nodes contained in the structured data; If the lexical consumption record node has substantial data and is in a normal state, the lexical consumption record node is converted into an entity object class, and the lexical consumption data contained in the entity object class is extracted as the lexical consumption amount for translating the target email; otherwise, the lexical consumption amount for translating the target email is set to the default estimated value.
8. The email processing method according to claim 1, characterized in that, The email content includes the email title and the email body; The translation task of constructing the email content containing the target email includes: Configure first instance parameters to create a title translation subtask; wherein, the first instance parameters include the email title and title translation parameters; the title translation parameters include at least one of the interface key of the external translation system, title translation instructions, and user identity information; the user identity information includes the current user's user identifier and / or its tenant identifier; Configure a second instance parameter to create a text translation subtask; wherein the second instance parameter includes the email body and file translation parameters; the file translation parameters include the interface key of the external translation system, text translation instructions, and the user identity information; the text translation instructions at least indicate that the file format should be matched; The title translation subtask and the body text translation subtask are performed as parallel translation tasks.
9. The email processing method according to claim 1, characterized in that, The process of identifying and filtering derived data within the original translation data to generate the target translated email includes: Identify and filter derived data within the original translated data to obtain initial target data; The initial target data is subjected to preset email processing to obtain the target translated email; wherein, the preset email processing includes at least one of email verification processing and email format processing; the email verification processing means translating and verifying the terminology keywords in the initial target data using a pre-constructed target terminology set; the email format processing means restoring the email format of the initial target data according to the email format of the target email.
10. The email processing method according to claim 1, characterized in that, The process of generating the target translated email includes: Obtain the target email area of the target email system, and display the target translated email in an editable manner within the target email area; wherein, the target email area includes at least one of an email editing area, a draft text area, and a translation assistance area; In response to a confirmation instruction, the target translated email is applied to the target email area.
11. An information management method, characterized in that, The information management method includes: Request a translation; The email associated with the translation request is used as the target email to be translated; The target email is processed using the email processing method as described in any one of claims 1 to 10 to obtain the target translated email; The target translation email is used to respond to the translation request, and the target translation email is associated with the user who requested the translation request.
12. An electronic device, characterized in that, The electronic device includes: The storage module includes a first memory and a second memory, wherein the first memory is used to store computer programs and the second memory is used to store target terminology sets. A computing module includes a processor, which is connected to the first memory and the second memory respectively; the processor is used to execute the computer program to implement the email processing method as described in any one of claims 1 to 12, or to implement the information management method as described in claim 13; An interactive module, connected to the computing module, is used to obtain translation requests from external input and / or display target translation emails to external systems.
13. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the email processing method according to any one of claims 1 to 10, or implements the information management method according to claim 11.