A reporting task processing method and device
By automating the reporting process of key information in emails, the problem of wasted labor costs in intelligent operation and maintenance in the financial industry has been solved, and efficient and accurate information reporting has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- WEBANK (CHINA)
- Filing Date
- 2021-11-16
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, during the intelligent operation and maintenance process in the financial industry, users need to manually monitor the equipment manufacturer's emails and extract key information for reporting to the ITSM system, resulting in a significant waste of labor costs.
By acquiring target emails, a text classification model is used to automatically determine the email category, match rules, and report interface information, thereby enabling the automated reporting of key information to the ITSM system.
It reduces the steps of manual monitoring and information copying and pasting, lowers labor costs, and improves processing efficiency and accuracy.
Smart Images

Figure CN114064838B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of financial technology (Fintech), and more particularly to a method and apparatus for processing reporting tasks. Background Technology
[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech), and intelligent operation and maintenance technology is no exception. However, due to the security and real-time requirements of the financial industry, higher requirements are also being placed on the technology in the field of intelligent operation and maintenance.
[0003] Equipment manufacturers can provide computing products to equipment users, who can then periodically perform maintenance and upgrades on these products. Specifically, manufacturers can inform users of key information via email, and users can then report the corresponding key information internally based on the email content, thereby enabling them to perform maintenance on the computing products accordingly.
[0004] This requires users to monitor in real time for emails from the equipment manufacturer. If an email is confirmed, the user must read it, extract key information, copy and paste it into the internal IT Service Management (ITSM) system, and manually report the corresponding change. This process wastes significant manpower. Summary of the Invention
[0005] This application provides a reporting task processing method and apparatus to solve the problem of wasting a lot of labor costs by manually extracting key information from email content and copying and pasting the key information into the internal ITSM system.
[0006] Firstly, this application provides a method for processing reporting tasks, the method comprising:
[0007] Obtain the target email, wherein the target email is an email to be processed that meets a first preset condition; determine the target email category based on the target email and a text classification model; determine the target matching rule and target reporting interface information based on the target email category; and report the key information in the target email to the system corresponding to the target reporting interface information based on the target matching rule and the target reporting interface information.
[0008] The above technical solution automatically retrieves target emails, extracts key information from them, and reports this information to the corresponding system. This automates the reporting of key information from emails without human intervention, thus reducing labor costs.
[0009] In one possible implementation, determining the target email category based on the target email and the text classification model includes: dividing the email content of the target email into one or more words; inputting the one or more words into a word vector model to obtain word vectors corresponding to the one or more words, and forming a word vector matrix from the word vectors corresponding to the one or more words; inputting the word vector matrix into any one of the multiple convolutional kernels to obtain feature maps corresponding to the two channels of the convolutional kernel; inputting the feature maps corresponding to the two channels of the convolutional kernel into a pooling layer to obtain a fixed-length feature map corresponding to the convolutional kernel; and concatenating the fixed-length feature maps corresponding to the multiple convolutional kernels and inputting them into a fully connected classification model to obtain the target email category.
[0010] In the above technical solution, the email content of the target email is processed sequentially as follows: word segmentation, word vector construction, convolution, max pooling to obtain feature terms, and then the feature terms are fed into a fully connected classification model, which returns the target email category. In this way, excellent classification results can still be achieved with a simple network structure, and the advantage of simple structure accelerates the computation speed.
[0011] In one possible implementation, determining the target matching rule and target reporting interface information based on the target email category includes: determining the target matching rule based on the target email category and first pre-configuration information, wherein the target email category in the first pre-configuration information corresponds to the target matching rule; and determining the target reporting interface information based on the target email category and second pre-configuration information, wherein the target email category in the second pre-configuration information corresponds to the target reporting interface information, and the target reporting interface information includes a target reporting interface and target user authentication credentials.
[0012] In the above technical solution, the preset first configuration information and second configuration information can determine the target matching rules based on the target email category and the first pre-configured information; and determine the target reporting interface information based on the target email category and the second pre-configured information. In this way, user-defined matching rules and reporting interface information can be matched based on user-defined settings, improving the flexibility of information reporting.
[0013] In one possible implementation, the method further includes: extracting key information corresponding to the target matching rule from the email content of the target email according to the target matching rule; wherein the target matching rule includes one or more of email subject matching, regular expression matching rule, start and end matching rule, and fixed field matching rule.
[0014] In the above technical solution, key information is matched from the target email according to the target matching rules, without human intervention, avoiding possible errors in manual operation, and helping to improve the accuracy and efficiency of processing and reporting.
[0015] In one possible implementation, obtaining the target email includes: obtaining an email application object and a target email account corresponding to the email application object; reading local emails corresponding to the target inbox in the email application object according to the target email account to obtain a target email set; and obtaining the target email from the target email set.
[0016] In the above technical solution, local emails corresponding to the target inbox in the email application object are read without reading any email service interface. Therefore, no key is required to read the email service interface, which not only reduces the pressure on the email service, but also improves the efficiency and security of email reading.
[0017] In one possible implementation, obtaining the email application object includes: obtaining the email application object through a first obtaining method; or, after failing to obtain the email application object through the first obtaining method, obtaining the email application object through a second obtaining method; wherein, the first obtaining method is used to obtain the email application object in a running state; and the second obtaining method is used to obtain the email application object in a non-running state.
[0018] In the above technical solution, the email application object is obtained through the first acquisition method or the second acquisition method. Without having to judge the running status of the email application object, the success rate of obtaining the email application object can be guaranteed, which improves the acquisition speed and fault tolerance.
[0019] One possible implementation also includes: recording the reporting results corresponding to the target email.
[0020] In the above technical solution, recording the reporting results corresponding to the target email helps in subsequent determination of whether the target email has been processed and user archive query.
[0021] Secondly, this application provides a reporting task processing device, which has the functions of implementing the first aspect or any possible implementation of the first aspect. The functions of the device can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules, units or means corresponding to the above functions.
[0022] In one possible implementation, the reporting task processing device includes: an acquisition module for acquiring a target email, wherein the target email is an email to be processed that meets a first preset condition; a processing module for determining the target email category based on the target email and a text classification model; determining target matching rules and target reporting interface information based on the target email category; and reporting key information in the target email to the system corresponding to the target reporting interface information based on the target matching rules and the target reporting interface information.
[0023] Thirdly, this application provides a computer-readable storage medium storing a computer program or instructions that, when executed by a device, cause the device to perform the method described in the first aspect or any possible implementation thereof.
[0024] Fourthly, this application provides a computer program product comprising a computer program or instructions that, when executed by a device, implement the method described in the first aspect or any possible implementation thereof.
[0025] Fifthly, this application provides a computing device including a processor connected to a memory for storing a computer program, and the processor for executing the computer program stored in the memory to cause the computing device to perform the methods in the first aspect or any possible implementation thereof.
[0026] The technical effects that can be achieved by any of the second to fifth aspects mentioned above can be referred to the description of the beneficial effects in the first aspect mentioned above, and will not be repeated here. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0028] Figure 1 A schematic diagram of a system architecture provided as an example for this application;
[0029] Figure 2 A flowchart illustrating a reporting task processing method provided as an example in this application;
[0030] Figure 3 This application provides an exemplary flowchart for obtaining a target email.
[0031] Figure 4 This application provides an exemplary flowchart for obtaining a target email category.
[0032] Figure 5 A schematic diagram illustrating an input to a text classification model is provided as an example in this application.
[0033] Figure 6 A schematic diagram of a word vector matrix provided as an example in this application;
[0034] Figure 7 A schematic diagram illustrating the determination of a feature map, provided as an example in this application;
[0035] Figure 8 This application provides an exemplary flowchart of a maximum pooling process.
[0036] Figure 9 A schematic diagram of a reporting task processing device is provided as an example in this application;
[0037] Figure 10 A flowchart illustrating another reporting task processing method provided by this application;
[0038] Figure 11 A flowchart illustrating the processing of a classification matching module provided as an example in this application;
[0039] Figure 12 A flowchart illustrating the processing of a reporting module is provided as an example in this application.
[0040] Figure 13 A schematic diagram of another reporting task processing device provided as an example in this application;
[0041] Figure 14 This is a schematic diagram of another reporting task processing device provided as an example of this application. Detailed Implementation
[0042] The following is a brief explanation of the technical terms used in this application:
[0043] Python: A computer programming language.
[0044] IT Service Management (ITSM) is a methodology that helps enterprises effectively manage the planning, development, implementation, and operation of their IT systems. ITSM combines three essential elements for high-quality service: processes, people, and technology. Standard processes monitor the operation of IT services, personnel competence determines the quality of service, and technology ensures both quality and efficiency.
[0045] Application Programming Interface (API): This refers to the conventions that connect different components of a software system.
[0046] JavaScript Object Notation (JSON) is a lightweight data-interchange format. It is based on a subset of ECMAScript (the JavaScript specification defined by the European Computer Association) and uses a text format that is completely independent of programming languages to store and represent data.
[0047] POST method: An important component of the HTTP protocol. The POST method is used to send data to the destination server to create / update resources. The POST method is generally used to send update requests to the destination server, with the update request including a request body.
[0048] Uniform Resource Locator (URL): A method of representing the location of information on the World Wide Web services of the Internet.
[0049] The word2vec model is a type of language model that can learn semantic knowledge from a large amount of text corpus in an unsupervised manner. It is widely used in natural language processing and is a tool for generating word vectors.
[0050] Figure 1 An exemplary system architecture is shown for the reporting task processing method provided in the embodiments of this application. This system architecture may include a device manufacturer and a device user (i.e., a user), wherein the device manufacturer may be the manufacturer of the device.
[0051] Users have a partnership with equipment manufacturers, purchasing and using their computing products, such as cloud computing products. Typically, the equipment manufacturer provides regular maintenance for the sold computing products, such as software upgrades. Correspondingly, after purchasing the computing products, users can perform maintenance on them based on key information released by the equipment manufacturer.
[0052] In existing solutions, equipment manufacturers typically inform users of key information via email. This involves the manufacturer sending an email containing crucial information. Consequently, users need to monitor for emails from the manufacturer in real time, and if an email is received, read it, extract the key information, copy and paste it into their internal ITSM system or other service management system, and manually report the corresponding change. This process incurs significant labor costs.
[0053] Based on this, this application provides a method for reporting and processing tasks. This method eliminates the need for users to manually monitor emails from equipment manufacturers, and also eliminates the need to manually read the contents of emails and copy and paste them into the company's internal ITSM system or other service management system, thereby reducing labor costs and improving processing efficiency.
[0054] It should be noted in advance that users can preset the following information or parameters:
[0055] (1) First preset condition
[0056] The first preset condition is used to determine whether to execute the reporting task processing flow for the email. This first preset condition may include whether the email subject contains a certain keyword, or whether the sender is a specified email address. If the email meets the first preset condition, the reporting task processing flow can be executed.
[0057] (2) Email Categories
[0058] It can also be referred to as email type, interface type, or interface category.
[0059] This application provides a variety of email categories for users to choose from, such as emails related to network changes, cutovers, or host maintenance.
[0060] In addition, users can pre-define email categories, or be reminded to customize email categories based on the matching results in the task reporting process after the task is reported.
[0061] (3) First pre-configuration information
[0062] The first pre-configured information can be pre-configured by the user according to their usage needs. This pre-configured information may include the correspondence between email categories and matching rules. For example, in Table 1, email category 1 corresponds to matching rule 1, email category 2 corresponds to matching rule 2, and so on.
[0063] Table 1
[0064] Email Categories Matching rules Email Category 1 Matching rule 1 Email Category 2 Matching rule 2 Email Category 3 Matching rule 3 …… ……
[0065] (4) Second pre-configuration information
[0066] The second pre-configured information can be pre-configured by the user according to their usage needs. This pre-configured information may include the correspondence between email categories and reporting interface information. For example, in Table 2, email category 1 corresponds to reporting interface information 1, email category 2 corresponds to reporting interface information 2, and so on.
[0067] Furthermore, the reported interface information may also include the reporting interface and user authentication credentials (which can be represented as userAuthKey in English).
[0068] The reporting interface can specifically be an interface between the operation and maintenance system or the operation and maintenance server. This reporting interface is used to report key information corresponding to the target email to the operation and maintenance system or the operation and maintenance server. For example, the reporting interface can be a uniform resource locator (URL) for the interface that the user needs to report.
[0069] Specifically, user authentication credentials can be credentials that validate the validity of the interface authentication request. If the user authentication credentials are valid, interface access is allowed; if the user authentication credentials are invalid, interface access is denied.
[0070] As shown in Table 2, Reporting Interface Information 1 includes Reporting Interface 1 and User Authentication Credentials 1, Reporting Interface Information 2 includes Reporting Interface 2 and User Authentication Credentials 2, and so on.
[0071] Table 2
[0072] Email Categories Report interface information Email Category 1 Report interface information 1 (report interface 1 and user authentication credentials 1) Email Category 2 Report interface information 2 (report interface 2 and user authentication credentials 2) Email Category 3 Report interface information 3 (report interface 3 and user authentication credentials 3) …… ……
[0073] (5) Matching rules
[0074] Matching rules can be pre-configured by the user according to their needs. Matching rules can also be used as input parameters (or interface parameters) for the reporting interface, that is, input parameters that can be attached when requesting access to the reporting interface.
[0075] The matching rules may include one or more of the following: email subject matching, regular expression matching rules, start and end matching rules, and fixed field matching rules.
[0076] Email subject matching: This means directly using the email subject content as the input parameter. Generally, the title of the reported change is consistent with the email subject, so providing a direct email subject matching method is available for users to choose.
[0077] Regular expression matching rules: Use regular expression matching rules to match key information in the email. For example, if you need to match the changeDesc parameter (change content), you can directly use the regular expression r' / change content:(.*). / \1' matches the change content in the email.
[0078] Start and end matching rules: Start and end matching rules match the content between the starting keyword and the ending keyword. For example, if the start and end matching rule is {start: impact, end: above changes}, it means matching the content between the keyword "impact" and the keyword "above changes". This method uses Python's re module to match the content between the start and end: get the start and end positions of start and end, and extract them from the main text.
[0079] Specifically, start = re.search(r'^influence.*',content,re.M|re.I).span()[0];
[0080] end = re.search(r'The above changes.*',content,re.M|re.I).span()[0];
[0081] match_content=content[change_affect_start:change_affect_end];
[0082] Here, start refers to the position of the starting keyword in the email body, end refers to the position of the ending keyword in the email body, content refers to the content of the email body, and match_content refers to the content being matched.
[0083] Fixed matching rules: This means using fixed parameter values, such as the parameter value corresponding to the fixed parameter risk (risk level), or the parameter value corresponding to the fixed parameter eoaChainJson (approval chain).
[0084] (6) Target Inbox
[0085] A user's email application object can include multiple inboxes, such as Inbox 1, Inbox 2, Inbox 3, and so on. The user can select a target inbox from these options. Accordingly, only emails in the target inbox can be retrieved, and a reporting task can be performed based on these emails.
[0086] Table 3 illustrates, for example, the information or parameters pre-set by the user in the automatic reporting scenario of network changes in this application:
[0087] Table 3
[0088]
[0089] The above technical solution provides users with flexible and scalable configuration functions, enabling flexible switching between different types and configurations.
[0090] like Figure 2As shown, the process of this reporting task handling method is as follows:
[0091] Step 201: Obtain the target email.
[0092] The target email is the email to be processed that meets the first preset condition.
[0093] In one possible implementation, retrieving the target email can be done as follows: Figure 3 The process is shown in the diagram:
[0094] Step 301: Obtain the email application object (which can be represented as mail_application_obj) and the target email account corresponding to the email application object.
[0095] In this application, an email application object can be obtained through a first acquisition method or a second acquisition method. The first acquisition method is used to read / acquire an email application object in a running state, and the second acquisition method is used to read / acquire an email application object in a non-running state.
[0096] In the first example, the email application object can be obtained first through the first retrieval method; if the first retrieval method fails to obtain the email application object, the second retrieval method can be used to obtain the email application object.
[0097] If the current email application object is not running, it cannot be obtained through the first retrieval method, meaning the retrieval will fail. Subsequently, the email application object can be retrieved through the second retrieval method, thus obtaining the email application object that is not running.
[0098] If the email application object is currently running, it can be retrieved directly using the first retrieval method, meaning the retrieval is successful. There is no need to execute the second retrieval method.
[0099] In the second example, the email application object can be obtained first through the second retrieval method; if the second retrieval method fails to obtain the email application object, the first retrieval method can be used to obtain the email application object.
[0100] If the current email application object is running, it cannot be obtained through the second retrieval method, meaning the retrieval will fail. Subsequently, the first retrieval method can be used to retrieve the email application object, thus obtaining the running email application object.
[0101] If the email application object is not currently running, it can be retrieved directly using the second retrieval method, meaning the retrieval will be successful. There is no need to execute the first retrieval method again.
[0102] In this way, regardless of whether the email application object is running or not, it can be successfully obtained, and then the local emails corresponding to the target inbox in the mailbox application object can be retrieved.
[0103] For example, the first retrieval method is win32com.client.GetActiveObject(); the second retrieval method is win32com.client.Dispatch(). To improve the success rate of retrieving the mail application object in both running and non-running states, you can first use the win32com.client.GetActiveObject() method to retrieve the mail application object in a running state. If the mail application object is in a non-running state at this time, an exception is caught. Then, use the win32com.client.Dispatch() method to retrieve the mail application object. Using a try-expect approach ensures a high success rate in retrieving the mail application object without checking its running state, thus improving retrieval speed and fault tolerance.
[0104] Two retrieval methods can be used to obtain the email application object in different states. If the first retrieval method, such as win32com.client.GetActiveObject(), fails, an exception is caught, and the second retrieval method, win32com.client.Dispatch(), is used. This ensures successful retrieval whether the email application object is running or not, improving fault tolerance.
[0105] Step 302: Obtain the target email set by reading the local emails corresponding to the target inbox in the email application object based on the target email account.
[0106] Obtain the target email account, log in to the email application object based on the target email account, and then retrieve one or more local emails from the target inbox of the email application object. Combine the one or more local emails retrieved into the target email set.
[0107] In this application, if a user sets up one email account, that email account can be obtained as the target email account. If a user sets up multiple email accounts, any one of them can be selected as the target email account, or the multiple email accounts can correspond to their respective account indices, and the email account with account index 0 can be selected as the target email account. Of course, there are other methods as well, which are not limited in this application.
[0108] For example, the target email account can also be obtained through a first acquisition method and a second acquisition method, where the first acquisition method is, for example, win32com.client.GetActiveObject(); and the second acquisition method is, for example, win32com.client.Dispatch(). This can be achieved as follows:
[0109] try:
[0110] mail_accounts=win32com.client.Dispatch("Outlook.Application").Session.Accounts
[0111] expect:
[0112] mail_accounts=win32com.client.GetActiveObject("Outlook.Application").Session.Accounts[0]
[0113] This retrieves the set of accounts corresponding to the email application object (referred to as mail_accounts, which includes multiple email accounts set by the user). Obtaining the target email accounts through the two methods described above helps improve fault tolerance.
[0114] Furthermore, the target email account can be obtained from the account set by specifying an index as needed. For example, if the specified index is account index 0, then the target email account can be obtained based on account index 0, such as mymail_account = mail_accounts[0].
[0115] Step 303: Retrieve the target emails from the target email collection.
[0116] In one possible implementation, the target email collection (represented as mail_objs) can be iterated through to obtain each email in the target email collection (also known as an email object, represented as mail_obj). The sender, subject, and body of the email can be obtained through fields such as mail_obj.SenderName, mail_obj.Subject, and mail_obj.Body.
[0117] This application allows the setting of a scheduled task, which can be used to periodically detect whether a pending email that meets the first preset condition (such as the sender being a specified email address, the email subject containing specified keywords, etc.) has been received in the target email set.
[0118] The scheduled task can be set to run once per minute or once per second.
[0119] In one example, a scheduled task can detect whether an email meeting a first preset condition has been received in the target inbox. If so, it can further determine whether the email is an unprocessed email, i.e., whether the email is in an unprocessed state. If the email is an unprocessed email, it can be determined that the email is the target email. If the email is a processed email, it can be determined that the email is not the target email.
[0120] In another example, a scheduled task can detect whether a new email has been received in the inbox, that is, retrieve unprocessed emails in the inbox. Then, it determines whether the unprocessed email meets a first preset condition. If it does, the unprocessed email is determined to be the target email; otherwise, the email is determined not to be the target email.
[0121] In the above technical solution, local emails corresponding to the target inbox in the email application object are read without reading any email service interface. Therefore, no key is required to read the email service interface, which not only reduces the pressure on the email service, but also improves the efficiency and security of email reading.
[0122] Step 202: Determine the target email category based on the target email and text classification model.
[0123] Specifically, a text classification model can be pre-trained, and then the target email can be input into the text classification model. In this text classification model, the email content of the target email can be processed sequentially as follows: word segmentation, word vector construction, convolution, max pooling to obtain feature terms, and the feature terms are fed into a fully connected classification model, which then returns the target email category.
[0124] Among them, text classification models include TextCNN. TextCNN can still achieve excellent classification results with a simple network structure, and the advantage of simple structure accelerates the calculation speed.
[0125] For the specific process of determining the target email category in this application, please refer to [link / reference]. Figure 4 As shown:
[0126] Step 401: Divide the content of the target email into multiple words.
[0127] The email content can include one or more of the email subject and email body. Here are three examples of how to divide the target email content into multiple words:
[0128] Example 1: Divide the subject line of the target email into multiple words;
[0129] Example 2: Divide the content of the email body of the target email into multiple words;
[0130] Example 3: Divide the content of the email subject of the target email into multiple words, and divide the content of the email body of the target email into multiple words.
[0131] Step 402: Input one or more words into the word vector model respectively to obtain the word vectors corresponding to the one or more words respectively, and the word vectors corresponding to the one or more words respectively form a word vector matrix. Here, the dimension of the word vector can be set by the user.
[0132] The word vector model can specifically be a word2vec model, which can convert word segmentation into word vectors. Specifically, the word2vec model is a model that learns semantic knowledge in an unsupervised manner from a large amount of text corpora, and is widely used in natural language processing and is a tool for generating word vectors.
[0133] Step 403: For any one of the multiple convolutional kernels, input the word vector matrix into the convolutional kernel to obtain the feature maps corresponding to the two channels of the convolutional kernel; input the feature maps corresponding to the two channels of the convolutional kernel into the pooling layer to obtain the fixed-length feature map corresponding to the convolutional kernel.
[0134] Inputting the feature maps corresponding to the two channels into the pooling layer can also be understood as performing max-pooling processing on the feature maps corresponding to the two channels. Here, max-pooling processing means taking the point with the largest value in the local receptive field, and different-length sentences can output fixed-length feature maps after passing through this pooling layer. This reduces the risk of overfitting, reduces the parameters, and helps to further accelerate the calculation.
[0135] Step 404: After splicing the fixed-length feature maps corresponding to the multiple convolutional kernels respectively, input them into the fully connected classification model to obtain the category of the target email.
[0136] Here, the fully connected classification model can be a softmax classification model.
[0137] (1) If it is a predicted category, input the spliced fixed-length feature map into the softmax classification model to obtain the probability of each email category.
[0138] Suppose there are a total of n classifications represented by numerical values S k , 0 < k <= n, where n represents the number of classifications. The calculation formula of the softmax classification model can be expressed as:
[0139]
[0140] Here, i represents a certain classification in k, gi This represents the value for that category.
[0141] For example, assuming the three values are A=2, B=1, and C=0, the softmax proportions are as follows:
[0142]
[0143]
[0144]
[0145] Where P(A)+P(B)+P(C)=1.
[0146] (2) If it is a training model, the loss function will be calculated based on the predicted label and the actual label. The loss function in softmax is the cross-entropy loss function, which is mostly used in classification tasks:
[0147]
[0148] Here, 'a' represents the softmax prediction result, and 'y' represents the actual label of the training sample, indicating the correct classification type of the sample. The goal of training the model is to bring the predicted labels closer to the actual labels, that is, to minimize the loss function value.
[0149] To better explain the embodiments of this application, the following explanation uses an email subject "ABC Cloud Emergency Network Change Notice" input into a text classification model. For details, please refer to [link to relevant documentation]. Figure 5 As shown:
[0150] Step 1: Divide the email subject "ABC Cloud Emergency Network Change Notice." into six words: "ABC", "Cloud", "Emergency", "Network", "Change", "Notice", and ".".
[0151] Step 2: Input the six words into the word vector model. Specifically, input each word into the word vector model, which will output the word vector corresponding to that word.
[0152] Specifically, the word2vec model is used in Python as follows:
[0153] from gensim.models.deprecated.word2vec import Word2Vec # Import module
[0154] model = Word2Vec.load('. / model / Word60.model') # Load the model
[0155] vec = model[word] # Convert the word "word" to a vector "vec"
[0156] Input "ABC", "cloud", "emergency", "network", "change", "notification", and "." into the word vector model respectively. The resulting word vectors can be found in [link to relevant documentation]. Figure 6 As shown:
[0157] The input to the word vector model is "ABC", and the output is [0,0,0,0,1].
[0158] The input to the word vector model is "cloud", and the output is [0,1,0,0,0];
[0159] The input to the word vector model is "network", and the output is [0,0,0,1,0].
[0160] The input to the word vector model is "urgent", and the output is [1,0,0,0,0];
[0161] The input to the word vector model is "change", and the output is [0,1,1,0,0].
[0162] The input to the word vector model is "notification", and the output is [0,0,0,1,1].
[0163] The input to the word vector model is ".", and the output is [1,0,0,0,0].
[0164] Natural language is numericalized by constructing word vectors, making it convolutional.
[0165] Can Figure 6 The matrix composed of word vectors corresponding to multiple words shown is called the word vector matrix, which can be used as the input of a convolutional layer.
[0166] Step 3: Convolve the word vector matrix with 2*5, 3*5, and 4*5 convolution kernels respectively, with each convolution kernel having two output channels.
[0167] Combination Figure 7 The following example illustrates how a 4*1 feature map (which can be represented as a feature map) is obtained by convolving the word vector matrix with a 4*5 convolution kernel:
[0168] feature_map[0]=0*1+0*0+0*1+0*0+1*0+0*0+1*0+0*0+0*0+0*0+0*1+0*0+0*1+1*0+0*0+1*1+0*0+0*1+0*0+0*0+=1
[0169] Step 4: Input the feature maps corresponding to the two channels of each convolution kernel into the pooling layer to obtain the fixed-length feature maps corresponding to the convolution kernel.
[0170] Combination Figure 8 An exemplary diagram illustrating max pooling processing is shown below:
[0171] Figure 8 In part (a), the feature maps corresponding to the two channels of the 4*5 convolution kernel are input into the pooling layer to obtain the fixed-length feature maps corresponding to the 4*5 convolution kernel.
[0172] Figure 8 In part (b), the feature maps corresponding to the two channels of the 3*5 convolution kernel are input into the pooling layer to obtain the fixed-length feature maps corresponding to the 3*5 convolution kernel.
[0173] Step 5: Concatenate the results obtained from max pooling and input them into the fully connected classification model to obtain the target email category.
[0174] Of course, the above Figures 4 to 8 The process described in the relevant embodiments can also be used in the training process of a text classification model, where multiple training data are input into the text classification model to be trained, and the model is trained based on the above training process to obtain a trained text classification model.
[0175] Step 203: Determine the target matching rules and target reporting interface information based on the target email category.
[0176] The explanation will be provided in two steps as follows:
[0177] Step 203a: Determine the target matching rule based on the target email category and the first pre-configuration information, where the target email category in the first pre-configuration information corresponds to the target matching rule. Referring to the example in Table 1, if the target email category is email category 1, then the target matching rule is matching rule 1.
[0178] Step 203b: Determine the target reporting interface information based on the target email category and the second pre-configuration information, where the target email category in the second pre-configuration information corresponds to the target reporting interface information. Referring to the example in Table 2, if the target email category is email category 1, then the target reporting interface information is reporting interface information 1.
[0179] Furthermore, the target reporting interface information includes the target reporting interface and the target user authentication credentials. This can also be understood as determining the target reporting interface and target user authentication credentials based on the target email category and the second pre-configured information.
[0180] Specifically, the target reporting interface can be an interface between the target system or the target server, which is used to report key information corresponding to the target email to the target system or the target server.
[0181] The target user authentication credentials can be used by the target system or target server to perform security authentication on the key information corresponding to the target email.
[0182] Referring to the example in Table 2, if the target email category is email category 1, then the target reporting interface and the target user authentication credential are reporting interface 1 and user authentication credential 1, respectively.
[0183] Step 204: Based on the target matching rules and target reporting interface information, report the key information in the target email to the system corresponding to the target reporting interface information.
[0184] In one possible implementation, key information corresponding to the target matching rules is extracted from the email content of the target email. These target matching rules include one or more of the following: email subject matching, regular expression matching, start / end matching, and fixed field matching. The key information can be a JSON-formatted string.
[0185] Using the examples in Table 4, the target matching rules corresponding to the "Network Change" category are illustrated as follows:
[0186] Table 4
[0187]
[0188] Subsequently, based on the target matching rules in Table 4, key information is matched from the content of the target email (including the email subject and the email body).
[0189] For example, the regular expression r'[0-9]{4}-[0-9]{1,2}-[0-9]{1,2}' in Table 4 can be used to match the reporting date in the format YYYY-mm-dd (parameter is reportDate). Another example is the regular expression r' / change content:(.*). / \1' which matches the change content in an email (parameter is changeDesc).
[0190] For example, based on the target matching rules in Table 4, the key information JSON can be constructed as follows:
[0191] {
[0192] Report Date: 2021-09-12
[0193] changeTitle: ABC Cloud Change Notice -- Network
[0194] changeDesc: Plan to upgrade and optimize network devices in the Beijing area,
[0195] incidence: During this period, there will be 4 10-second jitters in the internal network access between Beijing's three districts and five districts. risk: Medium risk,
[0196] eoaChainJson: sanzhang (Zhang San), sili (Li Si)
[0197] }
[0198] After obtaining the key information in the target email, the target user authentication credentials can be appended to the key information, and then request to access the target reporting interface. Through the target reporting interface, the key information is reported to the corresponding system.
[0199] Exemplarily, the target user authentication credentials can be appended to the key information JSON string, and then use the request module of python to post a request to the target reporting interface.
[0200] The specific post request is as follows:
[0201] requests.post(
[0202] url,
[0203] data = payload_json,
[0204] headers = {"Content-Type": "application / json"},
[0205] timeout = 10 )
[0207] In the above code, url is the target reporting interface (i.e., the target reporting API), payload_json is the JSON string of the key information, headers is the request header, and timeout is the request timeout time, with the unit of seconds / s.
[0208] Step 205, record the reporting result corresponding to the target email.
[0209] After reporting the key information in the target email to the system corresponding to the target reporting interface information, the reporting result corresponding to the target email can be obtained. The reporting result can be a reporting failure result or a reporting success result. Subsequently, record the reporting result corresponding to the target email. For subsequent judgment on whether the target email has been processed and user archive query.
[0210] Furthermore, if the reporting result corresponding to the target email is a reporting failure result, a relevant failure information pop-up can be returned to remind the user so that the user can take relevant follow-up actions.
[0211] Step 205 is an optional step.
[0212] The above technical solution automatically retrieves target emails, extracts key information from them, and reports this information to the corresponding system. This automates the reporting of key information from emails without human intervention, thus reducing labor costs.
[0213] Furthermore, when extracting key information, the target matching rules are determined based on the target email category, and then the key information is matched from the target email according to the target matching rules. No human intervention is required, which avoids possible errors in manual operation and helps to improve the accuracy and efficiency of processing and reporting.
[0214] Based on the same inventive concept Figure 9 An exemplary embodiment of a reporting task processing device provided in this application is shown, which includes: a configuration module 901, a reading module 902, a classification and matching module 903, and a reporting module 904. The descriptions of each module can be found in conjunction with... Figure 10 An illustrative flowchart explaining another method for processing reporting tasks is shown below:
[0215] Configuration module 901 is used for user-defined rules and interfaces to achieve flexible and scalable matching functionality. Specifically, users can configure one or more of the following through configuration module 901: first preset conditions, email category, first pre-configuration information, second pre-configuration information, matching rules, and target inbox.
[0216] The reading module 902 is used to read one or more of the email subject content and email body content of the target email, and then send the read email subject content and email body content to the classification matching module 903.
[0217] The classification and matching module 903 is used to intelligently classify target emails based on text classification technology to obtain the target email category; then, based on the target email category, it reads the user-defined target matching rules under the target email category from the configuration module 901, and then performs key information matching according to the target matching rules and constructs a JSON string, and passes the target email category and JSON string together to the reporting module 904.
[0218] Specifically, the classification and matching module 903 can be divided into a classification module and a matching module.
[0219] like Figure 11This application provides an exemplary flowchart of a classification and matching module. The classification module extracts features from the target email and inputs these features into a text classification model (i.e., a classifier) to obtain the target email category. The text classification model can be pre-trained. For example, it can train the text by sequentially performing word segmentation, word vector construction, convolution, and max pooling on the email content in the training text to obtain features, then inputting these features into a fully connected classification model, which returns the email category, thus completing the training of the text classification model. Further, the classification module can input the target email category into the matching module. The matching module reads the user-defined matching rules (i.e., obtains the target matching rules) from the configuration module 901 based on the target email category, thereby achieving key information matching of the target email and obtaining the key information.
[0220] The reporting module 904, after obtaining the target email category and key information JSON string, retrieves the target reporting interface information corresponding to the target email category from the configuration module 901. This target reporting interface information includes the target reporting interface and the target user authentication credentials. Subsequently, the reporting module 904 appends the target user authentication credentials to the key information JSON string and then uses Python's `requests` module to POST this key information JSON string as a request body parameter to the target reporting interface. Regardless of whether the reporting is successful or not, the reporting module 904 records the returned parameters and the processing status of the email, specifically by writing them to a database for later determination of whether the target email has been processed and for users to query the target email reporting details. See [link to details] for further information. Figure 12 The diagram shows a processing flowchart for a reporting module.
[0221] Based on the above content and the same concept, Figure 13 and Figure 14 This is a schematic diagram of the possible reporting task processing apparatus provided in this application. These reporting task processing apparatuses can be used to implement the functions in the above method embodiments, and therefore can also achieve the beneficial effects of the above method embodiments.
[0222] In one possible implementation, the apparatus includes: an acquisition module 1301, configured to acquire a target email, wherein the target email is an email to be processed that meets a first preset condition; and a processing module 1302, configured to determine the target email category based on the target email and a text classification model; determine target matching rules and target reporting interface information based on the target email category; and report key information in the target email to the system corresponding to the target reporting interface information based on the target matching rules and the target reporting interface information.
[0223] In one possible implementation, the processing module 1302 is specifically used to: divide the email content of the target email into one or more words; input the one or more words into a word vector model to obtain word vectors corresponding to the one or more words respectively, and the word vectors corresponding to the one or more words form a word vector matrix; for any one of the multiple convolutional kernels, input the word vector matrix into the convolutional kernel to obtain feature maps corresponding to the two channels of the convolutional kernel respectively; input the feature maps corresponding to the two channels of the convolutional kernel into a pooling layer to obtain a fixed-length feature map corresponding to the convolutional kernel; and concatenate the fixed-length feature maps corresponding to the multiple convolutional kernels and input them into a fully connected classification model to obtain the target email category.
[0224] In one possible implementation, the processing module 1302 is specifically configured to: determine the target matching rule based on the target email category and the first pre-configuration information, wherein the target email category in the first pre-configuration information corresponds to the target matching rule; and determine the target reporting interface information based on the target email category and the second pre-configuration information, wherein the target email category in the second pre-configuration information corresponds to the target reporting interface information, and the target reporting interface information includes a target reporting interface and target user authentication credentials.
[0225] In one possible implementation, the processing module 1302 is further configured to: extract key information corresponding to the target matching rule from the email content of the target email according to the target matching rule; wherein the target matching rule includes one or more of email subject matching, regular expression matching rule, start and end matching rule, and fixed field matching rule.
[0226] In one possible implementation, the acquisition module 1301 is specifically used to: acquire an email application object and a target email account corresponding to the email application object; read local emails corresponding to the target inbox in the email application object according to the target email account to obtain a target email set; and acquire the target emails from the target email set.
[0227] In one possible implementation, the acquisition module 1301 is specifically used to: acquire the email application object through a first acquisition method; or, after failing to acquire the email application object through the first acquisition method, acquire the email application object through a second acquisition method; wherein, the first acquisition method is used to acquire the email application object in a running state; and the second acquisition method is used to acquire the email application object in a non-running state.
[0228] In one possible implementation, the processing module 1302 is further configured to: record the reporting result corresponding to the target email.
[0229] like Figure 14 The image shown is of the apparatus 1400 provided in an embodiment of this application. Figure 14 The device shown can be Figure 13 The illustrated device represents one hardware circuit implementation. This device can be applied to the flowchart shown above to perform the functions of the first or second terminal device in the method embodiments described.
[0230] For ease of explanation, Figure 14 Only the main components of the device are shown.
[0231] Figure 14 The illustrated device 1400 includes a communication interface 1410, a processor 1420, and a memory 1430, wherein the memory 1430 is used to store program instructions and / or data. The processor 1420 may operate in conjunction with the memory 1430. The processor 1420 may execute program instructions stored in the memory 1430. When the instructions or program stored in the memory 1430 are executed, the processor 1420 is used to perform the operations performed by the processing module 1302 in the above embodiments, and the communication interface 1410 is used to perform the operations performed by the acquisition module 1301 in the above embodiments.
[0232] The memory 1430 and the processor 1420 are coupled. The coupling in this embodiment is an indirect coupling or communication connection between devices, units, or modules, and can be electrical, mechanical, or other forms, used for information exchange between devices, units, or modules. At least one of the memories 1430 may be included in the processor 1420.
[0233] In this embodiment, the communication interface can be a transceiver, circuit, bus, module, or other type of communication interface. In this embodiment, when the communication interface is a transceiver, the transceiver can include an independent receiver, an independent transmitter, or a transceiver integrating transceiver functions, or simply a communication interface.
[0234] Device 1400 may further include a communication line 1440. The communication interface 1410, processor 1420, and memory 1430 can be interconnected via the communication line 1440. The communication line 1440 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication line 1440 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 14 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0235] Based on the above content and the same concept, this application provides a computer-readable storage medium storing a computer program or instructions, which, when executed by a device, causes the device to perform the method in the above implementation.
[0236] Based on the above content and the same concept, this application provides a computer program product, which includes a computer program or instructions that, when executed by a device, implement the method in the above-described implementation.
[0237] Based on the above content and the same concept, this application provides a computing device, including a processor connected to a memory for storing computer programs, and the processor for executing the computer programs stored in the memory, so that the computing device performs the method in the above implementation.
[0238] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0239] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0240] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0241] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0242] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for processing reporting tasks, characterized in that, include: Obtain the target email, wherein the target email is an email to be processed that meets the first preset condition; Based on the target email and text classification model, determine the target email category; Based on the target email category, determine the target matching rules and target reporting interface information; Based on the target matching rules and the target reporting interface information, the key information in the target email is reported to the system corresponding to the target reporting interface information; The step of determining the target email category based on the target email and text classification model includes: The content of the target email is divided into multiple words; The one or more words are input into the word vector model to obtain the word vectors corresponding to the one or more words respectively, and the word vectors corresponding to the one or more words are combined to form a word vector matrix; For any one of the multiple convolutional kernels, the word vector matrix is input into the convolutional kernel to obtain the feature maps corresponding to the two channels of the convolutional kernel respectively; the feature maps corresponding to the two channels of the convolutional kernel are input into the pooling layer to obtain the fixed-length feature map corresponding to the convolutional kernel; After concatenating the fixed-length feature maps corresponding to the multiple convolutional kernels, the data is input into a fully connected classification model to obtain the target email category. The step of determining the target matching rules and target reporting interface information based on the target email category includes: The target matching rule is determined based on the target email category and the first pre-configuration information, wherein the target email category in the first pre-configuration information corresponds to the target matching rule; The target reporting interface information is determined based on the target email category and the second pre-configuration information, wherein the target email category in the second pre-configuration information corresponds to the target reporting interface information, and the target reporting interface information includes the target reporting interface and the target user authentication credentials.
2. The method as described in claim 1, characterized in that, Also includes: According to the target matching rule, key information corresponding to the target matching rule is extracted from the email content of the target email; wherein the target matching rule includes one or more of the following: email subject matching, regular expression matching rule, start and end matching rule, and fixed field matching rule.
3. The method as described in claim 1, characterized in that, The process of obtaining the target email includes: Obtain the email application object and the target email account corresponding to the email application object; Based on the target email account, read the local emails corresponding to the target inbox in the email application object to obtain the target email set; Retrieve the target emails from the target email set.
4. The method as described in claim 3, characterized in that, The process of obtaining the email application object includes: The email application object is obtained through the first acquisition method; or... After failing to obtain the email application object using the first method, the email application object is obtained using the second method. The first acquisition method is used to acquire the email application object that is in a running state; The second acquisition method is used to acquire the email application object that is not running.
5. The method according to any one of claims 1-4, characterized in that, Also includes: Record the reporting results corresponding to the target email.
6. A reporting task processing device, characterized in that, Includes a module for performing the method as described in any one of claims 1 to 5.
7. A computing device, characterized in that, include: Memory, used to store program instructions; A processor is configured to invoke program instructions stored in the memory and execute the method according to any one of claims 1 to 5.
8. A computer-readable non-volatile storage medium, characterized in that, Includes computer-readable instructions that, when read and executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 5.