Editing method and system for various message entities

By preprocessing and analyzing messages using Naive Bayes and Gaussian mixture models, message templates are generated, solving the problems of low efficiency and interception during the editing process of different types of messages. This enables unified editing and review, improving the management efficiency and quality of the message platform.

WO2026091796A1PCT designated stage Publication Date: 2026-05-07SHANGHAI FLAGINFO INFORMATION TECH
View PDF 7 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
SHANGHAI FLAGINFO INFORMATION TECH
Filing Date
2025-08-20
Publication Date
2026-05-07

AI Technical Summary

Technical Problem

In existing technologies, different types of messages are not efficient in the editing and sending process, and cannot be uniformly integrated into a unified messaging platform, resulting in problems such as inefficient editing and messages being easily intercepted.

Method used

The system employs Naive Bayes and Gaussian mixture models to preprocess and analyze messages, generating message templates. It also uses artificial intelligence to determine the legality of message content, prohibits the blocking of message uploads, and achieves unified editing and review.

Benefits of technology

It improved the efficiency and quality of message editing, reduced the workload of subsequent review, enabled unified editing and management of different types of messages, and improved the overall management efficiency and quality of the message platform.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025115897_07052026_PF_FP_ABST
    Figure CN2025115897_07052026_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed in the embodiments of the present invention are an editing method and system for various message entities. The method comprises: collecting a certain number of blocked text messages and normal text messages, and performing data preprocessing on the blocked text messages and the normal text messages, so as to obtain first preprocessed data and second preprocessed data; inputting the first preprocessed data into a naive Bayes model for training, so as to obtain an optimal naive Bayes model; on the basis of the second preprocessed data, generating a plurality of message templates; acquiring a message to be edited, analyzing said message to obtain key information corresponding to said message, determining a message template on the basis of the key information, and inserting said message into the corresponding message template, so as to obtain text message content of the message template; inserting the text message content into a corresponding message entity to be edited, so as to perform message editing, so as to obtain an edited message; and verifying the edited message. The problem in the prior art of it being impossible to integrate unified editing into a unified message platform is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Editing methods and systems for various message types Technical Field

[0001] This invention relates to the field of artificial intelligence technology, and specifically to an editing method and system for various message types. Background Technology

[0002] Currently, various message types are sent, including plain text messages, rich media messages, multimedia messages, and 5G messages. While the editing and sending of these different message types are typically handled separately, they share common business attributes, such as the need for editing, review, sending, and statistics. Most companies conducting such business can currently manage review, sending, and statistics in a unified manner.

[0003] The current challenges encountered by the editors include: low editing efficiency, easy interception of edited messages, and difficulty in effectively integrating unified editing into the unified messaging platform.

[0004] Therefore, there is an urgent need for a unified messaging platform that can integrate message editing, review, sending, and statistics. Summary of the Invention

[0005] The purpose of this invention is to provide an editing method and system for various message types, in order to solve the problem that the existing technology cannot integrate unified editing into a unified messaging platform.

[0006] To achieve the above objectives, embodiments of the present invention provide an editing method for various message bodies, the method specifically including:

[0007] A certain number of intercepted text messages and normal text messages are collected, and the intercepted text messages and normal text messages are preprocessed respectively to obtain first preprocessed data and second preprocessed data.

[0008] Construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model.

[0009] Multiple message templates are generated based on the second preprocessed data;

[0010] Obtain the message to be edited, analyze the message to be edited to obtain the key information corresponding to the message to be edited, determine the 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;

[0011] The text message content is inserted into the corresponding edit message body for message editing to obtain the edited message; wherein, the edit message body includes editing plain text messages, editing rich media messages, and editing multimedia messages;

[0012] When a message needs to be edited to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body.

[0013] When editing a multimedia message and inserting voice information is required, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message.

[0014] The edited message is validated.

[0015] Based on the above technical solution, the present invention can be further improved as follows:

[0016] Further, the step of collecting a certain number of intercepted text messages and normal text messages, and performing data preprocessing on the intercepted text messages and normal text messages respectively to obtain first preprocessed data and second preprocessed data includes:

[0017] The intercepted text messages are cleaned and processed using text processing techniques, while retaining the time attributes of both the intercepted and normal text messages.

[0018] Furthermore, the generation of multiple message templates based on the second preprocessed data includes:

[0019] The second preprocessed data is input into a Long Short-Term Memory (LSTM) network model for processing to obtain the processing result, and a message template is generated based on the processing result.

[0020] Further, 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] Calculate X using formula (1) i The conditional probability under condition y;

[0022] In the formula, P(X) i |y) is X i The conditional probability of x given y. i For the verification information set X = {X1, X2, X3, ... X} n An element of}, where y is the interception condition, and θ iy For X i The parameter of the term under the condition of y. For parameter value θ iy X i Power of 1.

[0023] Furthermore, the conversion of speech information into text information using a Gaussian mixture model includes:

[0024] The probability of sample set x is calculated using formula (2);

[0025] In the formula, p(x) is the probability of the sample set x, n is the number of components, and W i μ is the number of the i-th component. i Let Σ be the mean of the i-th component. i Let be the covariance matrix of the i-th component, and N be a normal distribution.

[0026] Furthermore, the editing method for multiple message bodies also includes:

[0027] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.

[0028] Furthermore, the editing method for multiple message bodies also includes:

[0029] The image is inserted into the corresponding message body. The position information of the inserted image is obtained in real time. Based on the position information, it is determined whether the position of the inserted image in the message body is correct. When the position of the inserted image in the message body is incorrect, the inserted image is adjusted to the correct position in real time.

[0030] An editing system for multiple message bodies, comprising:

[0031] The data collection module is used to collect a certain number of intercepted text messages and normal text messages;

[0032] The preprocessing module is used to preprocess the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data;

[0033] The construction module is used to construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model.

[0034] The template generation module is used to generate various message templates based on the second preprocessed data;

[0035] The analysis module is used to acquire the message to be edited, analyze the message to be edited, obtain the key information corresponding to the message to be edited, determine the 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.

[0036] The editing module is used to insert the text message content into the corresponding edit message body for message editing, and obtain the edited message; wherein, the edit message body includes editing plain text messages, editing rich media messages, and editing multimedia messages;

[0037] When a message needs to be edited to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body.

[0038] When editing a multimedia message and inserting voice information is required, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message.

[0039] The verification module is used to verify the edited message.

[0040] An electronic device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to perform the steps of the method described herein.

[0041] A non-transitory computer-readable storage medium having a computer program stored thereon, the computer program implementing the steps of the method when executed by a processor.

[0042] The embodiments of the present invention have the following advantages:

[0043] This invention presents an editing method for various message bodies, placing different types of messages together for unified editing. It utilizes common message elements (generation, verification, and synthesis) for standardized processing, facilitating unified editing. Simultaneously, it incorporates artificial intelligence technology to generate templates for normally displayed messages and uses intercepted messages for editing verification, increasing the quality of message editing. Furthermore, it performs unified review, sending, and statistical analysis on edited messages, providing convenience for subsequent unified management and operation. By uniformly processing edited and trained messages to generate text information for insertion into various message bodies, it significantly improves message editing efficiency. Through normal training messages and intercepted messages, it significantly improves message quality. This improved quality also reduces the workload of subsequent message reviewers, as repeatedly revising rejected messages is time-consuming and labor-intensive. This represents a significant improvement over traditional methods and solves the problem of existing technologies failing to integrate unified editing into a unified messaging platform. Attached Figure Description

[0044] To more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings in the following description are merely exemplary, and those skilled in the art can derive other embodiments based on the provided drawings without creative effort.

[0045] The structures, proportions, sizes, etc. illustrated in this specification are only for the purpose of assisting those skilled in the art in understanding and reading the content disclosed herein, and are not intended to limit the conditions under which the present invention can be implemented. Therefore, they have no substantial technical significance. Any modifications to the structure, changes in the proportions, or adjustments to the size, without affecting the effects and objectives that the present invention can produce, should still fall within the scope of the technical content disclosed in the present invention.

[0046] Figure 1 is a flowchart of the editing method for various message bodies according to the present invention;

[0047] Figure 2 is an architecture diagram of the editing system for multiple message bodies according to the present invention;

[0048] Figure 3 is a schematic diagram of the physical structure of the electronic device provided by the present invention.

[0049] The attached diagrams are labeled as follows: 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, Bus 803. Detailed Implementation

[0050] The following specific embodiments illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0051] Figure 1 is a flowchart of an embodiment of the editing method for multiple message bodies according to the present invention. As shown in Figure 1, the editing method for multiple message bodies provided by the embodiment of the present invention includes the following steps:

[0052] S101, collect a certain number of intercepted text messages and normal text messages, and perform data preprocessing on the intercepted text messages and normal text messages respectively to obtain the first preprocessed data and the second preprocessed data;

[0053] Specifically: Collect messages that are intercepted by operators after being sent by the unified messaging platform as intercepted text messages.

[0054] Messages sent by the unified messaging platform but intercepted as spam by mobile phone manufacturers are collected as intercepted text messages.

[0055] Collect information that users can normally receive and display as normal text messages.

[0056] The intercepted text messages are cleaned and processed using text processing techniques, while retaining the time attributes of both the intercepted and normal text messages.

[0057] S102, Construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model.

[0058] Specifically, the system collects intercepted text messages from telecom operators and those set as spam by manufacturers, covering various possible styles and formats. The collected intercepted text messages undergo data preprocessing, including removing special characters, punctuation marks, and stop words. Text processing techniques (such as regular expressions and word segmentation) are used to clean and process the intercepted text messages, preserving their temporal attributes. A Naive Bayes model is trained on the intercepted text messages, and the training results are used to validate the input intercepted text messages to determine if they are defined as abnormal display information (intercepted spam). A Bernoulli distribution Naive Bayes model is used (this model is chosen primarily because of the binary property: spam messages have an attribute value of 1, and non-spam messages have a value of 0. Each feature is uncorrelated), which improves the recognition accuracy compared to traditional Naive Bayes.

[0059] Posterior probability:

[0060] Where P(y|X) is the posterior probability of y given variable X.

[0061] Bernoulli probability mass function: P(x=k)=θ k (1-θ) (1-k) ;

[0062] x represents the value of the random variable (0 or 1), θ represents the parameter of the Bernoulli distribution, and θ represents the probability of the event occurring.

[0063] We use the results of training with Bernoulli distribution Naive Bayes to identify spam.

[0064] S103, Generate multiple message templates based on the second preprocessed data;

[0065] Specifically, the second preprocessed data is input into a Long Short-Term Memory (LSTM) network model for processing to obtain the processing result, and a message template is generated based on the processing result.

[0066] This process involves collecting normal text messages, covering various possible styles and formats. The collected messages undergo data preprocessing, including removing special characters, punctuation marks, and stop words. Text processing techniques (such as regular expressions and word segmentation) are used to clean and process the normal text messages, preserving their temporal attributes. A Long Short-Term Memory (LSTM) network is trained on the normal text messages to address the gradient vanishing problem of small-weight information in textual information, while also effectively combining long-term and short-term memory.

[0067] The LSTM gating mechanism and its parameters are explained below:

[0068] Input gate: i t =σ(W xi x t +W hi h t-1 +b i );

[0069] Forgotten Gate: f t =σ(W xf x t +W hf h t-1 +b f );

[0070] Cell status update:

[0071] Cell state:

[0072] Output gate: o t =σ(W xo x t +W ho h t-1 +b o );

[0073] Hidden state: h t =o t ⊙tanh(C t );

[0074] Where, x t It is the input vector at the current time; σ is the Sigmoid activation function. ⊙ is the Hadamard product of matrices; h t-1 h tThese represent the hidden state at the previous time and the hidden state at the current time, respectively; W i It is the weight; b i It is the threshold; tanh is the hyperbolic tangent activation function. To solve the gradient vanishing problem, a forgetting gate f is used. t For weight W f The partial derivative, The overall loss function is E = Loss(h0,h1,h2,...,h n ), the partial derivative with respect to the forget gate.

[0075] S104, Obtain the message to be edited, analyze the message to be edited, obtain the key information corresponding to the message to be edited, determine the 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;

[0076] Specifically: Plain text messages, multimedia messages, rich media messages, and 5G messages can all contain text information, so text message templates can be inserted and edited during editing. Rich media messages, multimedia messages, and 5G messages all have their own specific formats that support images, audio, and video, so materials for editing rich media, multimedia, and 5G messages can be processed and used uniformly. Multimedia messages support voice media; the editing pages for each message type are integrated into a unified message editing page; key information is entered in the input box of the message editing page, a list of message templates pops up, and a message template can be selected (since it is a template trained on normal messages, this message is generally not blocked by operators and manufacturers). The text message content of this template is then inserted into the message editing boxes for short text messages, rich media messages, multimedia messages, and 5G messages, respectively.

[0077] S105, insert the text message content into the corresponding edit message body for message editing, and obtain the edited message;

[0078] Specifically, editing message bodies includes editing plain text messages, editing rich media messages, and editing multimedia messages.

[0079] S106: When a message needs to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding message body. The image can be inserted into the message body of rich media messages, multimedia messages, or 5G messages.

[0080] Specifically, X is calculated using formula (1). i The conditional probability under condition y;

[0081] In the formula, P(X) i|y) is X i The conditional probability under condition y. For a random variable X, the distribution is Bernoulli (0-1 distribution). i The parameters (0 < θ) iy <1), X i When the value is 1, it is θ iy When the value is 0, it is (1-θ) iy ), x i For the verification information set X = {X1, X2, X3, ... X} n An element of}, (X i There are two possible outcomes: 0: normal text message; 1: intercepted text message; X i The value can be 0 or 1), y is the interception condition (e.g., operator interception, mobile phone manufacturer interception, etc.), and θ iy For X i The parameter of the term under condition y, where iy is just a subscript symbol. For parameter value θ iy X i The power; referencing the binomial distribution P(x=k=θ k (1-θ) (1-k) , For θ iy Parameter value X i The power of (X) i (Take 0 or 1).

[0082] S107: When editing a multimedia message and inserting voice information, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message. Currently, there are no voice templates inserted into 5G messages and rich media messages.

[0083] Specifically, for audio files inserted into the editing area, this invention uses a Gaussian mixture model from a machine learning model to convert the input audio information into text information.

[0084] Gaussian distribution:

[0085] Where μ is the mean vector, Σ is the covariance matrix, and x is the observed sample set x = {x1, x2, ..., x} n} samples;

[0086] The probability of sample set x is calculated using formula (2);

[0087] In the formula, p(x) is the probability of the sample set x, n is the number of components, and W i μ is the number of the i-th component. i Let Σ be the mean of the i-th component. i Let be the covariance matrix of the i-th component, and N be a normal distribution.

[0088] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.

[0089] The image is inserted into the corresponding message body. The position information of the inserted image is obtained in real time. Based on the position information, it is determined whether the position of the inserted image in the message body is correct. When the position of the inserted image in the message body is incorrect, the inserted image is adjusted to the correct position in real time.

[0090] S108, Verify the edited message;

[0091] Specifically, the text information from the multi-platform editor is submitted to the Naive Bayes model for verification.

[0092] Verify the message format of edited multimedia, rich media messages, and 5G messages.

[0093] After approval, submit to the backend for review.

[0094] This method for editing various message bodies involves collecting a certain number of intercepted and normal text messages, preprocessing them to obtain first and second preprocessed data, respectively; constructing a Naive Bayes model by inputting the first preprocessed data into the Naive Bayes model for training to obtain the optimal Naive Bayes model; generating various message templates based on the second preprocessed data; acquiring the message to be edited, analyzing it to obtain key information corresponding to the message, determining the message template based on the key information, inserting the message to be edited into the corresponding message template to obtain the text message content of the message template; and inserting the text message content into the corresponding message body for message editing to obtain the edited message. The system includes editing plain text messages, rich media messages, and multimedia messages. When an image needs to be inserted into the message editing, the text information in the image is identified, 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, image upload is prohibited; otherwise, the image is inserted into the corresponding message editing body. When the message editing body is a multimedia message and voice information needs to be inserted, the voice information is converted into text information using 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, voice information upload is prohibited; otherwise, the voice information is inserted into the multimedia message editing. The system also verifies the edited message. This solves the problem in existing technologies where unified editing cannot be integrated into a unified messaging platform.

[0095] Figure 2 is an architecture diagram of an embodiment of the editing system for multiple message bodies according to the present invention; as shown in Figure 2, an embodiment of the present invention provides an editing system for multiple message bodies, including the following steps:

[0096] The acquisition module 10 is used to acquire a certain number of intercepted text messages and normal text messages;

[0097] Preprocessing module 20 is used to preprocess the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data;

[0098] The preprocessing module 20 is also used for:

[0099] The intercepted text messages are cleaned and processed using text processing techniques, while retaining the time attributes of both the intercepted and normal text messages.

[0100] Module 30 is used to construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model.

[0101] Template generation module 40 is used to generate multiple message templates based on the second preprocessed data;

[0102] The template generation module 40 is also used for:

[0103] The second preprocessed data is input into a Long Short-Term Memory (LSTM) network model for processing to obtain the processing result, and a message template is generated based on the processing result.

[0104] Analysis module 50 is used to acquire the message to be edited, analyze the message to be edited, obtain the key information corresponding to the message to be edited, determine the 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.

[0105] The editing module 60 is used to insert the text message content into the corresponding editing message body for message editing, and obtain the edited message; wherein, the editing message body includes editing plain text messages, editing rich media messages, and editing multimedia messages;

[0106] When a message needs to be edited to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body.

[0107] When editing a multimedia message and inserting voice information is required, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message.

[0108] The editing module 60 is also used for:

[0109] Calculate X using formula (1) i The conditional probability under condition y;

[0110] In the formula, P(X) i |y) is X i The conditional probability of x given y. i For the verification information set X = {X1, X2, X3, ... X} n An element of}, where y is the interception condition, and θ iy For X i The parameter of the term under the condition of y. For parameter value θ iy X i Power of 1.

[0111] The probability of sample set x is calculated using formula (2);

[0112] In the formula, p(x) is the probability of the sample set x, n is the number of components, and W i μ is the number of the i-th component. i Let Σ be the mean of the i-th component. i Let be the covariance matrix of the i-th component, and N be a normal distribution.

[0113] When the message body is a multimedia message, the text message is converted into voice information and inserted into the multimedia message.

[0114] The image is inserted into the corresponding message body. The position information of the inserted image is obtained in real time. Based on the position information, it is determined whether the position of the inserted image in the message body is correct. When the position of the inserted image in the message body is incorrect, the inserted image is adjusted to the correct position in real time.

[0115] The verification module 70 is used to verify the edited message.

[0116] This invention provides an editing system for various message types. The system comprises: a collection module 10 collecting a certain number of intercepted and normal text messages; a preprocessing module 20 preprocessing the intercepted and normal text messages to obtain first and second preprocessed data; a construction module 30 constructing a Naive Bayes model, inputting the first preprocessed data into the Naive Bayes model for training to obtain an optimal Naive Bayes model; a template generation module 40 generating various message templates based on the second preprocessed data; an analysis module 50 acquiring and analyzing the message to be edited to obtain key information corresponding to the message, determining a message template based on the key information, inserting the message to be edited into the corresponding message template to obtain the text message content of the message template; and an editing module 60 inserting the text message content into the message template. The message is edited within the corresponding message body to obtain the edited message. The message body includes editing plain text messages, editing rich media messages, and editing multimedia messages. When an image needs to be inserted during message editing, the text information in the image is identified, and the text information is input into the optimal Naive Bayes model to determine if the text information is an intercepted text message. If so, image upload is prohibited; otherwise, the image is inserted into the corresponding message body. When the message body is an edited multimedia message and audio information needs to be inserted, the audio information is converted into text information using a Gaussian mixture model, and the text information is input into the optimal Naive Bayes model to determine if the text information is an intercepted text message. If so, audio information upload is prohibited; otherwise, the audio information is inserted into the edited multimedia message. The edited message is verified by the verification module 70. This editing method for multiple message bodies solves the problem in existing technologies that cannot integrate unified editing into a unified messaging platform.

[0117] This invention provides an editing system for multiple message types. With message editing as its core and various data generated by a unified messaging platform as its foundation, it introduces artificial intelligence to guide the editing of multiple messages, solving the difficult problems encountered in editing multiple types of information, improving the efficiency and quality of information editing, and thus realizing a higher-value editing system for multiple message types.

[0118] Figure 3 is a schematic diagram of the physical structure of an electronic device provided in an embodiment of the present invention. As shown in Figure 3, the electronic device 80 includes: a processor 801, a memory 802, and a bus 803.

[0119] The processor 801 and the memory 802 communicate with each other via the bus 803.

[0120] The processor 801 is used to call program instructions in the memory 802 to execute the methods provided in the above-described method embodiments, including, for example,: 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 to obtain first preprocessed data and second preprocessed data; constructing a Naive Bayes model; inputting the first preprocessed data into the Naive Bayes model for training to obtain an optimal Naive Bayes model; generating multiple message templates based on the second preprocessed data; acquiring a message to be edited; analyzing the message to be edited to obtain 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 to obtain the text message content of the message template; and inserting the text message content into the corresponding edit message body. The system performs message editing to obtain a completed message. The message body includes editing plain text messages, editing rich media messages, and editing multimedia messages. When an image needs to be inserted during message editing, the system identifies the text information in the image, inputs the text information into the optimal Naive Bayes model, and determines whether the text information is an intercepted text message. If so, image upload is prohibited; otherwise, the image is inserted into the corresponding message body. When the message body is a multimedia message and audio information needs to be inserted, the audio information is converted into text information using a Gaussian mixture model. The text information is then input into the optimal Naive Bayes model to determine whether the text information is an intercepted text message. If so, audio information upload is prohibited; otherwise, the audio information is inserted into the multimedia message. The completed message is then validated.

[0121] This embodiment provides a non-transitory computer-readable storage medium that stores computer instructions. These instructions cause a computer to execute the methods provided in the above-described method embodiments. For example, the methods include: collecting a certain number of intercepted text messages and normal text messages; performing data preprocessing on the intercepted text messages and normal text messages respectively to obtain first preprocessed data and second preprocessed data; constructing a Naive Bayes model; inputting the first preprocessed data into the Naive Bayes model for training to obtain an optimal Naive Bayes model; generating multiple message templates based on the second preprocessed data; acquiring a message to be edited; analyzing the message to be edited to obtain 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 to obtain the text message content of the message template; and deleting the text message... The message content is inserted into the corresponding edit message body for message editing, resulting in a completed message. The edit message body includes editing plain text messages, editing rich media messages, and editing multimedia messages. When an image needs to be inserted into the message, the text information in the image is identified, and the text information is input into the optimal Naive Bayes model to determine if the text information is an intercepted text message. If so, image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body. When the edit message body is an edited multimedia message and audio information needs to be inserted, the audio information is converted into text information using a Gaussian mixture model, and the text information is input into the optimal Naive Bayes model to determine if the text information is an intercepted text message. If so, audio information upload is prohibited; otherwise, the audio information is inserted into the edited multimedia message. The completed message is then validated.

[0122] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various storage media capable of storing program code, such as ROM, RAM, magnetic disk, or optical disk.

[0123] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0124] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of each embodiment or some parts of the embodiments.

[0125] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.

Claims

1. An editing method for multiple message bodies, characterized in that, The editing method for multiple message bodies specifically includes: A certain number of intercepted text messages and normal text messages are collected, and the intercepted text messages and normal text messages are preprocessed respectively to obtain first preprocessed data and second preprocessed data. Construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model. Multiple message templates are generated based on the second preprocessed data; Obtain the message to be edited, analyze the message to be edited to obtain the key information corresponding to the message to be edited, determine the 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; The text message content is inserted into the corresponding edit message body for message editing to obtain the edited message; wherein, the edit message body includes editing plain text messages, editing rich media messages, and editing multimedia messages; When a message needs to be edited to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body. When editing a multimedia message and inserting voice information is required, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message. The edited message is validated.

2. The editing method for multiple message bodies according to claim 1, characterized in that, The process involves collecting a certain number of intercepted text messages and normal text messages, and preprocessing the intercepted text messages and normal text messages respectively to obtain first preprocessed data and second preprocessed data, including: The intercepted text messages are cleaned and processed using text processing techniques, while retaining the time attributes of both the intercepted and normal text messages.

3. The editing method for multiple message bodies according to claim 1, characterized in that, The generation of multiple message templates based on the second preprocessed data includes: The second preprocessed data is input into a Long Short-Term Memory (LSTM) network model for processing to obtain the 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 and determining whether the text information is an intercepted text message includes: Calculate X using formula (1) i The conditional probability under condition y; In the formula, P(X) i |y) is X i The conditional probability of x given y. i For the verification information set X = {X1, X2, X3, ... X} n An element of}, where y is the interception condition, and θ iy For X i The parameter of the term under the condition of y. For parameter value θ iy X i Power of 1.

5. The editing method for multiple message bodies according to claim 1, characterized in that, The process of converting speech information into text information using a Gaussian mixture model includes: The probability of sample set x is calculated using formula (2); In the formula, p(x) is the probability of the sample set x, n is the number of components, and W i μ is the number of the i-th component. i Let Σ be the mean of the i-th component. i Let be the covariance matrix of the i-th component, and N be a 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: The image is inserted into the corresponding message body. The position information of the inserted image is obtained in real time. Based on the position information, it is determined whether the position of the inserted image in the message body is correct. When the position of the inserted image in the message body is incorrect, the inserted image is adjusted to the correct position in real time.

8. An editing system for multiple message types, characterized in that, include: The data collection module is used to collect a certain number of intercepted text messages and normal text messages; The preprocessing module is used to preprocess the intercepted text message and the normal text message respectively to obtain first preprocessed data and second preprocessed data; The construction module is used to construct a Naive Bayes model, input the first preprocessed data into the Naive Bayes model for training, and obtain the optimal Naive Bayes model. The template generation module is used to generate various message templates based on the second preprocessed data; The analysis module is used to acquire the message to be edited, analyze the message to be edited, obtain the key information corresponding to the message to be edited, determine the 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. The editing module is used to insert the text message content into the corresponding edit message body for message editing, and obtain the edited message; wherein, the edit message body includes editing plain text messages, editing rich media messages, and editing multimedia messages; When a message needs to be edited to insert an image, the text information in the image is identified, 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 image upload is prohibited; otherwise, the image is inserted into the corresponding edit message body. When editing a multimedia message and inserting voice information is required, the voice information is converted into text information using a Gaussian mixture model. The text information is then 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; otherwise, the voice information is inserted into the multimedia message. The verification module is used to verify the edited 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, it implements the steps of the method as described in any one of claims 1 to 7.

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, it implements the steps of the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Message browsing and editing device and message browsing and editing method and mobile terminal

    CN103167081A

  • Message filtering method and device

    CN105955951A

  • Short message interception method and device

    CN106470405A

  • Short message text template extraction method and related apparatus

    CN107748739A

  • Message generation method and device, equipment and medium

    CN113569541A