Editing method and system for multiple message bodies
Through the method of editing a variety of messages, using data pre -processing and simplicity Bayesian model generate message templates, combined with artificial intelligence technology to edit and process, solve the problem that the unified editing cannot be integrated into the unified message platform in the existing technology. Implement efficient and unified message editing and management.
Patent Information
- Application Number
- CN202411537425.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2044-10-31
AI Technical Summary
The existing technology cannot integrate unified editing into a unified messaging platform, resulting in low editing efficiency, easy to intercept message sending, and inability to uniformly manage editing, review, sending and statistics.
Adopt a method of editing a variety of messages, preprocess data by collecting interceptions and normal text messages, build a simple Bayesian model, generate message templates, and use artificial intelligence technology to determine whether text information is intercept text messages during the editing process. And then perform corresponding treatment.
The unified editing of a variety of messages has been achieved, the editing efficiency and message quality have been improved, the workload of subsequent reviewers has been reduced, and the problem of interception is solved, providing unified management and operation convenience.
Smart Images

Figure CN119047436B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an editing method and system for multiple message bodies. Background Art
[0002] Currently, there are many types of messages sent, including plain text messages, rich media messages, multimedia messages, and 5G messages. Usually, the editing and sending of various messages are handled separately, but they have common business attributes, such as editing, review, sending, and statistics. Among them, review, sending, and statistics can be managed uniformly by most companies that currently carry out business.
[0003] The difficulties currently faced by the editor side include: the editing efficiency is not high enough, the messages sent by the editor are easily intercepted, and the unified editing cannot be better integrated into the unified messaging platform;
[0004] Therefore, there is an urgent need for a unified message platform that can realize unified editing, review, sending, and statistics of messages. Summary of the invention
[0005] The purpose of the embodiments of the present invention is to provide an editing method and system for multiple message bodies, so as to solve the problem in the prior art that unified editing cannot be integrated into a unified message platform.
[0006] To achieve the above object, an embodiment of the present invention provides an editing method for multiple message bodies, the method specifically comprising:
[0007] Collecting a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data;
[0008] Constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model;
[0009] generating a plurality of message templates based on the second preprocessed data;
[0010] Acquire a message to be edited, analyze the message to be edited, obtain key information corresponding to the message to be edited, determine a message template based on the key information, insert the message to be edited into the corresponding message template, and obtain text message content of the message template;
[0011] Insert the text message content into the corresponding edit message body for message editing to obtain an edited message; wherein the edit message body includes editing a plain text message, editing a rich media message, and editing a multimedia message;
[0012] When a picture needs to be inserted into a message, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited; if not, the picture is inserted into the corresponding edited message body;
[0013] When the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message.
[0014] The edited completion message is verified.
[0015] On the basis of the above technical solution, the present invention can also be improved as follows:
[0016] Further, the collecting of a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data include:
[0017] The intercepted text message is cleaned and processed using a text processing technology, and the time attributes of the intercepted text message and the normal text message are retained.
[0018] Further, the generating a plurality of message templates based on the second pre-processed data includes:
[0019] The second preprocessed data is input into the long short-term memory network model for processing to obtain a processing result, and a message template is generated based on the processing result.
[0020] Furthermore, the step of inputting the text information into the optimal naive Bayes model to determine whether the text information is an intercepted text message includes:
[0021] Calculated by formula (1) Conditional probability given by y;
[0022] Formula (1);
[0023] In the formula, for The conditional probability under y, For the verification information set X={ }, y is the intercept condition, for The parameter of the term conditional on y, For parameter value of Power.
[0024] Furthermore, the converting of speech information into text information by using a Gaussian mixture model includes:
[0025] Calculate the probability of sample set x by formula (2);
[0026] Formula (2);
[0027] In the formula, is the probability of sample set x, n is the number of components, is the number of the i-th component, is the mean of the i-th component, is the covariance matrix of the ith component, and N is the normal distribution.
[0028] Furthermore, the editing method for multiple message bodies also includes:
[0029] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.
[0030] Furthermore, the editing method for multiple message bodies also includes:
[0031] Insert the image into the corresponding message body, obtain the position information of the inserted image in real time, determine whether the position of the inserted image in the message body is correct based on the position information, and when the position of the inserted image in the message body is incorrect, adjust the inserted image to the correct position in real time.
[0032] An editing system for multiple message bodies, including:
[0033] A collection module, used to collect a certain number of intercepted text messages and normal text messages;
[0034] A preprocessing module, used to perform data preprocessing on the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data;
[0035] A construction module, used for constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model;
[0036] A template generation module, used to generate multiple message templates based on the second pre-processed data;
[0037] An analysis module, used to obtain a message to be edited, analyze the message to be edited, obtain key information corresponding to the message to be edited, determine a message template based on the key information, insert the message to be edited into the corresponding message template, and obtain text message content of the message template;
[0038] An editing module, used for inserting the text message content into a corresponding editing message body for message editing to obtain an edited message; wherein the editing message body includes editing a plain text message, editing a rich media message, and editing a multimedia message;
[0039] When a picture needs to be inserted into a message, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited; if not, the picture is inserted into the corresponding edited message body;
[0040] When the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message.
[0041] A verification module is used to verify the edited completion message.
[0042] An electronic device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the steps of the method are implemented when the processor executes the computer program.
[0043] A non-transitory computer-readable storage medium stores a computer program, which implements the steps of the method when executed by a processor.
[0044] The embodiments of the present invention have the following advantages:
[0045] The editing method for multiple message bodies in the present invention puts different types of messages together for unified editing, uses common elements of messages (generation, verification, synthesis) for unified processing, which is conducive to unified editing, and introduces artificial intelligence technology to generate templates for normally displayed messages, and uses intercepted messages as editing verification, which can increase the quality of message editing; at the same time, the edited messages are uniformly reviewed, sent and statistically analyzed, which provides convenience for subsequent unified management and operation. By uniformly processing edited and trained messages to generate text information and insert it into each message body, the efficiency of message editing can be greatly improved; by normal training messages and intercepted messages, the quality of messages can be greatly improved; the improved quality can also reduce the workload of subsequent message reviewers, because the back and forth modification of messages that fail the review is relatively time-consuming and multi-party work, which is a significant improvement over traditional practices, and solves the problem that the prior art cannot integrate unified editing into the unified message platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0047] The structures, proportions, sizes, etc. illustrated in this specification are only used to match the contents disclosed in the specification so as to facilitate understanding and reading by persons familiar with the technology. They are not used to limit the conditions under which the present invention can be implemented, and therefore have no substantial technical significance. Any structural modification, change in proportion or adjustment of size shall still fall within the scope of the technical contents disclosed in the present invention without affecting the effects and purposes that can be achieved by the present invention.
[0048] Figure 1 A flowchart of the editing method for multiple message bodies of the present invention;
[0049] Figure 2 It is an architecture diagram of the editing system for multiple message bodies of the present invention;
[0050] Figure 3 This is a schematic diagram of the physical structure of the electronic device provided by the present invention.
[0051] The accompanying drawings are denoted as follows:
[0052] Acquisition module 10 , preprocessing module 20 , construction module 30 , template generation module 40 , analysis module 50 , editing module 60 , verification module 70 , electronic device 80 , processor 801 , memory 802 , and bus 803 . DETAILED DESCRIPTION
[0053] The following is a description of the implementation of the present invention by specific embodiments. People familiar with the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0054] Figure 1 FIG. 1 is a flow chart of an embodiment of the editing method for multiple message bodies of the present invention, as shown in FIG. Figure 1 As shown, an editing method for multiple message bodies provided by an embodiment of the present invention includes the following steps:
[0055] S101, collecting a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data;
[0056] Specifically: collect the messages that are sent by the unified messaging platform and then intercepted by the operator as intercepted text messages.
[0057] Messages that are intercepted as spam by mobile phone manufacturers after being sent by the unified messaging platform are collected as intercepted text messages.
[0058] Information that can be normally received and displayed by the user is collected as normal text messages.
[0059] The intercepted text message is cleaned and processed using a text processing technology, and the time attributes of the intercepted text message and the normal text message are retained.
[0060] S102, constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model;
[0061] Specifically, by collecting some intercepted text messages that are set as spam by some operators and manufacturers, covering various possible styles and formats; preprocessing the collected intercepted text messages, including removing special characters, punctuation marks, stop words, etc. Use text processing technology (such as regular expressions, word segmentation, etc.) to clean and process intercepted text messages, retaining the time attributes of intercepted text messages; use the naive Bayes model to train intercepted text messages, and verify the intercepted text messages provided as input based on the training results to verify whether they are defined as abnormal display information (intercepted spam), and use Bernoulli distribution naive Bayes (this model is mainly used to consider the binary characteristics: spam information sets the attribute value to 1, and non-spam information to 0. Each feature is irrelevant), which can improve the recognition accuracy compared to naive Bayes;
[0062] Posterior probability: ;
[0063] in, is the posterior probability of y given the variable X.
[0064] Bernoulli probability mass function: ;
[0065] x represents the value of a random variable (0 or 1), Denotes the parameters of the Bernoulli distribution, which represents the probability of an event occurring.
[0066] By applying the Bernoulli distribution naive Bayes training results, spam can be identified.
[0067] S103, generating multiple message templates based on the second pre-processed data;
[0068] Specifically, the second preprocessed data is input into the long short-term memory network model for processing to obtain a processing result, and a message template is generated based on the processing result.
[0069] By collecting normal text messages, covering various possible styles and formats; preprocessing the collected normal text messages, including removing special characters, punctuation marks, stop words, etc. Use text processing techniques (such as regular expressions, word segmentation, etc.) to clean and process normal text messages, retaining the time attributes of these normal text messages; use the long short-term memory network LSTM (long short-term memory) to train normal text messages, and solve the problem of vanishing gradients of small weight information in text information through the long short-term memory network model, while being able to combine long-term memory and short-term memory problems well.
[0070] The LSTM gating mechanism and parameter descriptions are as follows:
[0071] Input Gate: ;
[0072] Forget Gate: ;
[0073] Cell status update: ;
[0074] Cell Status: ;
[0075] Output Gate: ;
[0076] Hidden state: ;
[0077] in, is the input vector at the current time; is the Sigmiod activation function, (z)= ; is the matrix Hadamard product; , Respectively represent the hidden state of the previous time and the hidden state of the current time; is the weight; is the threshold; tanh is the hyperbolic tangent activation function, tanh(x)= . To solve the gradient disappearance problem, use the forget gate Weight The partial guide, , the overall loss function E=Loss( , the partial derivative of the forget gate.
[0078] S104, obtaining a message to be edited, analyzing the message to be edited, obtaining key information corresponding to the message to be edited, determining a message template based on the key information, inserting the message to be edited into the corresponding message template, and obtaining text message content of the message template;
[0079] Specifically: Plain text messages, multimedia messages, rich media messages, and 5G messages can all cover text information, so text message templates can be inserted and edited when editing. Rich media messages, multimedia messages, and 5G messages all have their own specific formats that support images, audio, and video, so the materials for editing rich media, multimedia, and 5G messages can be processed and used in a unified manner. Multimedia messages support voice media; the editing pages of various message types are integrated into the editing page of unified messages; key information is entered into the input box of the message editing page, a list of message templates pops up, and the message template is selected (because it is a template for normal message training, the message will generally not be intercepted by operators and manufacturers), and the text message content of the template is inserted into the message editing boxes of short text messages, rich media messages, multimedia messages, and 5G messages respectively.
[0080] S105, inserting the text message content into the corresponding edit message body to edit the message, and obtaining an edited message;
[0081] Specifically, editing the message body includes editing a plain text message, editing a rich media message, and editing a multimedia message.
[0082] S106, when a picture needs to be inserted during message editing, identify the text information in the picture, input the text information into the optimal naive Bayes model, determine whether the text information is an intercepted text message, if so, prohibit uploading the picture, if not, insert the picture into the corresponding edited message body; the picture can be inserted into the edited message body of rich media messages, multimedia messages, and 5G messages.
[0083] Specifically, we calculate it by formula (1): Conditional probability given by y;
[0084] Formula (1);
[0085] In the formula, for The conditional probability under y, For the Bernoulli distribution (0-1 distribution), for the random variable Parameters ( ), When the value is 1, , when it takes the value 0, it is (1- ), For the verification information set X={ }, ( There are two results, 0: normal text message, 1: intercepted text message; The value is 0 or 1), y is the interception condition (such as: operator interception, mobile phone manufacturer interception, etc.), for The parameter of the term under the condition of y, iy is just a subscript symbol, For parameter value of Power; refer to the binomial distribution P(x=k) = , for Parameter value Power ( takes 0 or 1).
[0086] S107, when the message body to be edited is a multimedia message, and voice information needs to be inserted into the message editing, the voice information is converted into text information through the Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message; 5G messages and rich media messages currently do not have voice templates inserted;
[0087] Specifically, for the voice file inserted into the editing area, the present invention uses a Gaussian mixture model of a machine learning model to convert the input voice information into text information.
[0088] Gaussian distribution:
[0089]
[0090] in, is the mean vector, is the covariance matrix x for the observed sample set x={ } sample;
[0091] Calculate the probability of sample set x by formula (2);
[0092] Formula (2);
[0093] In the formula, is the probability of sample set x, n is the number of components, is the number of the i-th component, is the mean of the i-th component, is the covariance matrix of the ith component, and N is the normal distribution.
[0094] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.
[0095] Insert the image into the corresponding message body, obtain the position information of the inserted image in real time, determine whether the position of the inserted image in the message body is correct based on the position information, and when the position of the inserted image in the message body is incorrect, adjust the inserted image to the correct position in real time.
[0096] S108, verifying the edited message;
[0097] Specifically, the multi-terminal editor text information is submitted to the Naive Bayes model for verification.
[0098] Verify the message format of edited multimedia, rich media messages, and 5G messages.
[0099] Submit for background review after passing.
[0100] The editing method for multiple message bodies collects a certain number of intercepted text messages and normal text messages, performs data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data; constructs a naive Bayes model, inputs the first preprocessed data into the naive Bayes model for training to obtain an optimal naive Bayes model; generates multiple message templates based on the second preprocessed data; obtains a message to be edited, analyzes the message to be edited to obtain key information corresponding to the message to be edited, determines a message template based on the key information, inserts the message to be edited into a corresponding message template to obtain text message content of the message template; inserts the text message content into a corresponding edited message body for message editing, and obtains an edited message. Information; wherein, the editing of the message body includes editing plain text messages, editing rich media messages and editing multimedia messages; when the message editing needs to insert a picture, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited, and if not, the picture is inserted into the corresponding edited message body; when the editing message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the voice information upload is prohibited, and if not, the voice information is inserted into the edited multimedia message; the edited message is verified. The problem that the unified editing cannot be integrated into the unified message platform in the prior art is solved.
[0101] Figure 2 FIG. 1 is an architecture diagram of an embodiment of the editing system for multiple message bodies of the present invention; Figure 2 As shown, an editing system for multiple message bodies provided by an embodiment of the present invention includes the following steps:
[0102] A collection module 10, used to collect a certain number of intercepted text messages and normal text messages;
[0103] A preprocessing module 20, configured to perform data preprocessing on the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data;
[0104] The pre-processing module 20 is also used for:
[0105] The intercepted text message is cleaned and processed using a text processing technology, and the time attributes of the intercepted text message and the normal text message are retained.
[0106] A construction module 30 is used to construct a naive Bayes model, input the first preprocessed data into the naive Bayes model for training, and obtain an optimal naive Bayes model;
[0107] A template generating module 40, configured to generate a plurality of message templates based on the second pre-processed data;
[0108] The template generation module 40 is also used for:
[0109] The second preprocessed data is input into the long short-term memory network model for processing to obtain a processing result, and a message template is generated based on the processing result.
[0110] The analysis module 50 is used to obtain the message to be edited, analyze the message to be edited, obtain key information corresponding to the message to be edited, determine a message template based on the key information, insert the message to be edited into the corresponding message template, and obtain the text message content of the message template;
[0111] The editing module 60 is used to insert the text message content into the corresponding editing message body for message editing to obtain an edited message; wherein the editing message body includes editing a plain text message, editing a rich media message, and editing a multimedia message;
[0112] When a picture needs to be inserted into a message, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited; if not, the picture is inserted into the corresponding edited message body;
[0113] When the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message.
[0114] The editing module 60 is also used for:
[0115] Calculated by formula (1) Conditional probability given by y;
[0116] Formula (1);
[0117] In the formula, for The conditional probability under y, For the verification information set X={ }, y is the intercept condition, for The parameter of the term conditional on y, For parameter value of Power.
[0118] Calculate the probability of sample set x by formula (2);
[0119] Formula (2);
[0120] In the formula, is the probability of sample set x, n is the number of components, is the number of the i-th component, is the mean of the i-th component, is the covariance matrix of the ith component, and N is the normal distribution.
[0121] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.
[0122] Insert the image into the corresponding message body, obtain the position information of the inserted image in real time, determine whether the position of the inserted image in the message body is correct based on the position information, and when the position of the inserted image in the message body is incorrect, adjust the inserted image to the correct position in real time.
[0123] The verification module 70 is used to verify the edited message.
[0124] The present invention is an editing system for multiple message bodies. A certain number of intercepted text messages and normal text messages are collected through a collection module 10; data preprocessing is performed on the intercepted text messages and the normal text messages respectively through a preprocessing module 20 to obtain first preprocessed data and second preprocessed data; a naive Bayesian model is constructed through a construction module 30, and the first preprocessed data is input into the naive Bayesian model for training to obtain an optimal naive Bayesian model; a plurality of message templates are generated based on the second preprocessed data through a template generation module 40; a message to be edited is obtained through an analysis module 50, and the message to be edited is analyzed to obtain key information corresponding to the message to be edited, a message template is determined based on the key information, and the message to be edited is inserted into the corresponding message template to obtain the text message content of the message template; the text message content is inserted into the message template through an editing module 60 The message is edited in the corresponding edit message body to obtain an edited message; wherein, the edit message body includes editing plain text messages, editing rich media messages and editing multimedia messages; when the message editing needs to insert a picture, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited, and if not, the picture is inserted into the corresponding edit message body; when the edit message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the voice information upload is prohibited, and if not, the voice information is inserted into the edited multimedia message; the edited message is verified by the verification module 70. The editing method for multiple message bodies solves the problem that the unified editing cannot be integrated into the unified message platform in the prior art.
[0125] The present invention provides an editing system for multiple message bodies, which takes message editing as the core and various data generated by a unified message platform as the basis, introduces artificial intelligence to guide the editing of multiple messages, solves difficult problems encountered on the editing side of multiple information, improves the efficiency and quality of information editing, and realizes a higher value editing system for multiple message bodies.
[0126] Figure 3 A schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention, such as Figure 3 As shown, the electronic device 80 includes: a processor 801 (processor), a memory 802 (memory) and a bus 803;
[0127] The processor 801 and the memory 802 communicate with each other via the bus 803;
[0128] The processor 801 is used to call the program instructions in the memory 802 to execute the methods provided by the above-mentioned method embodiments, for example, including: collecting a certain number of intercepted text messages and normal text messages, performing data preprocessing on the intercepted text messages and the normal text messages respectively, and obtaining first preprocessed data and second preprocessed data; constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model; generating multiple message templates based on the second preprocessed data; obtaining a message to be edited, analyzing the message to be edited, obtaining key information corresponding to the message to be edited, determining a message template based on the key information, inserting the message to be edited into the corresponding message template, and obtaining the text message content of the message template; inserting the text message content into the corresponding edited message body The message is edited to obtain an edited message; wherein the edited message body includes editing a plain text message, editing a rich media message and editing a multimedia message; when the message editing needs to insert a picture, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, uploading of the picture is prohibited, and if not, the picture is inserted into the corresponding edited message body; when the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, uploading of the voice information is prohibited, and if not, the voice information is inserted into the edited multimedia message; the edited message is verified.
[0129] The present embodiment provides a non-transitory computer-readable storage medium, which stores computer instructions. The computer instructions enable a computer to execute the methods provided by the above-mentioned method embodiments, for example, including: collecting a certain number of intercepted text messages and normal text messages, performing data preprocessing on the intercepted text messages and the normal text messages respectively, and obtaining first preprocessed data and second preprocessed data; constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model; generating multiple message templates based on the second preprocessed data; obtaining a message to be edited, analyzing the message to be edited, obtaining key information corresponding to the message to be edited, determining a message template based on the key information, inserting the message to be edited into the corresponding message template, and obtaining the text message content of the message template; The content of the message is inserted into the corresponding editing message body for message editing to obtain an edited message; wherein, the editing message body includes editing plain text messages, editing rich media messages and editing multimedia messages; when the message editing needs to insert a picture, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is judged whether the text information is an intercepted text message. If so, the picture upload is prohibited, and if not, the picture is inserted into the corresponding editing message body; when the editing message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information upload is prohibited, and if not, the voice information is inserted into the editing multimedia message; the edited message is verified.
[0130] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk, etc., various storage media that can store program codes.
[0131] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0132] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0133] Although the present invention has been described in detail above by general description and specific embodiments, it is obvious to those skilled in the art that some modifications or improvements can be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all belong to the scope of protection claimed by the present invention.
Claims
1. A method for editing multiple message bodies, characterized in that: The editing method for multiple message bodies specifically includes: Collecting a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data; Constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model; generating a plurality of message templates based on the second preprocessed data; Acquire a message to be edited, analyze the message to be edited, obtain key information corresponding to the message to be edited, determine a message template based on the key information, insert the message to be edited into the corresponding message template, and obtain text message content of the message template; Insert the text message content into the corresponding edit message body for message editing to obtain an edited message; wherein the edit message body includes editing a plain text message, editing a rich media message, and editing a multimedia message; When a picture needs to be inserted into a message, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited; if not, the picture is inserted into the corresponding edited message body; When the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message. The edited completion message is verified.
2. The editing method for multiple message bodies according to claim 1, characterized in that: The collecting of a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and the normal text messages respectively to obtain first preprocessed data and second preprocessed data, includes: The intercepted text message is cleaned and processed using a text processing technology, and the time attributes of the intercepted text message and the normal text message are retained.
3. The editing method for multiple message bodies according to claim 1, characterized in that: The generating a plurality of message templates based on the second pre-processed data comprises: The second preprocessed data is input into the long short-term memory network model for processing to obtain a processing result, and a message template is generated based on the processing result.
4. The editing method for multiple message bodies according to claim 1, characterized in that: The step of inputting the text information into the optimal naive Bayes model to determine whether the text information is an intercepted text message includes: Calculated by formula (1) Conditional probability given by y; Formula (1): In the formula, for The conditional probability given by y, For the verification information set X={ }, y is the intercept condition, for The parameter of the term under the condition of y, For parameter value of Power.
5. The editing method for multiple message bodies according to claim 1, characterized in that: The method of converting speech information into text information by using a Gaussian mixture model includes: Calculate the probability of sample set x by formula (2); Formula (2): In the formula, is the probability of sample set x, n is the number of components, is the number of the i-th component, is the mean of the i-th component, is the covariance matrix of the ith component, and N is the normal distribution.
6. The editing method for multiple message bodies according to claim 1, characterized in that: The editing method for multiple message bodies also includes: When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.
7. The editing method for multiple message bodies according to claim 1, characterized in that: The editing method for multiple message bodies also includes: Insert the image into the corresponding message body, obtain the position information of the inserted image in real time, and determine whether the position of the inserted image in the message body is correct based on the position information; when the position of the inserted image in the message body is incorrect, adjust the inserted image to the correct position in real time.
8. An editing system for multiple message bodies, characterized in that: include: A collection module, used to collect a certain number of intercepted text messages and normal text messages; A preprocessing module, used to perform data preprocessing on the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data; A construction module, used for constructing a naive Bayesian model, inputting the first preprocessed data into the naive Bayesian model for training, and obtaining an optimal naive Bayesian model; A template generation module, used to generate multiple message templates based on the second pre-processed data; An analysis module, used to obtain a message to be edited, analyze the message to be edited, obtain key information corresponding to the message to be edited, determine a message template based on the key information, insert the message to be edited into the corresponding message template, and obtain text message content of the message template; An editing module, used for inserting the text message content into a corresponding editing message body for message editing to obtain an edited message; wherein the editing message body includes editing a plain text message, editing a rich media message, and editing a multimedia message; When a picture needs to be inserted into a message, the text information in the picture is identified, the text information is input into the optimal naive Bayes model, and it is determined whether the text information is an intercepted text message. If so, the picture upload is prohibited; if not, the picture is inserted into the corresponding edited message body; When the edited message body is to edit a multimedia message, and the message editing needs to insert voice information, the voice information is converted into text information through a Gaussian mixture model, and the text information is input into the optimal naive Bayes model to determine whether the text information is an intercepted text message. If so, the voice information is prohibited from being uploaded. If not, the voice information is inserted into the edited multimedia message. A verification module is used to verify the edited completion message.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A non-transitory computer readable medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Method and system for establishing information identification model and interception method and system
CN111209391A
Customer service robot response method and system, computer equipment and storage medium
CN115510216A