Message processing method, device, equipment and storage medium

By authenticating and assembling the message processing method of the message center in the financial system, combining whitelist and sensitive database verification, and using the communication interface of the adapter design pattern, the problem of insufficient security of message transmission in the financial system is solved, and the problem of insufficient security of message transmission in the financial system is realized Secure delivery of messages and confidentiality of information.

CN115454671BActive Publication Date: 2024-12-20CHINA CONSTRUCTION BANK +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202211087548.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-07
Publication Date
2024-12-20
Estimated Expiration
2042-09-07

AI Technical Summary

Technical Problem

In the existing financial system, the message center cannot effectively ensure the security of message transmission, and there is a risk of information leakage and unauthenticated message delivery.

Method used

By obtaining the access component's messages, using a unified request body structure for authentication and content assembly, ensuring that the message is authenticated before sending, and verifying the legitimacy of the receiver through whitelists and sensitive databases, using adapter design mode communication The interface sends messages and dynamically counts the sending data.

Benefits of technology

It realizes the security and confidentiality of message sending, avoids unauthenticated messaging, and ensures the security and compliance of information in the financial system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115454671B_ABST
    Figure CN115454671B_ABST
Patent Text Reader

Abstract

The present application provides a message processing method, device, equipment and storage medium, which relates to the field of computer technology. The method includes: obtaining a message of an access component, the message adopts a request body structure, the request body structure includes an access identifier, a component name, a sent content, a message recipient and a content template type, wherein the message request body structure adopted by different access components is the same; authenticating the access component according to the access identifier, if the identity authentication is passed, assembling the sent content according to the content template type to obtain a message completion body; according to the component name, sending the message completion body to the external component corresponding to the message recipient, wherein the component name is the name of the external component. The method of the present application solves the problem that the design of the message center in the existing financial system cannot guarantee the security of sending messages.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to computer technology, and in particular to a message processing method, apparatus, device and storage medium. Background Art

[0002] The message center is a very common public component in the business architecture. As a message hub in a system, it is responsible for the direct decoupling of internal components and adapting to the sending of various messages externally.

[0003] In the financial system, the business structure is complex, the business scenarios are varied, and there are many types of messages. Many application scenarios require sending messages to external components, applications or third-party systems. The formats of sent messages include but are not limited to: SMS, email, third-party instant communication software, etc. In view of the high confidentiality of financial system business and the strong security requirements of information, the security control of the message center is particularly important.

[0004] In the existing financial system, the design of the message center has the problem of not being able to guarantee the security of sending messages. Summary of the invention

[0005] The present application provides a message processing method, apparatus, device and storage medium, which are used to solve the problem that the design of the message center in the existing financial system cannot guarantee the security of sending messages.

[0006] On the one hand, the present application provides a message processing method, comprising:

[0007] Obtain a message of an access component, wherein the message adopts a request body structure, and the request body structure includes an access identifier, a component name, a sending content, a message recipient, and a content template type, wherein the message request body structure adopted by different access components is the same;

[0008] Authentication is performed on the access component according to the access identifier, and if the authentication is passed, content assembly is performed on the sent content according to the content template type to obtain a message completion body;

[0009] According to the component name, the message completion body is sent to the external component corresponding to the message recipient, wherein the component name is the name of the external component.

[0010] Optionally, before assembling the content to be sent according to the content template type to obtain a completed message body, the method further includes:

[0011] Performing word segmentation processing on the sent content to obtain multiple word segments;

[0012] Determining whether the sensitive database includes the segmented word;

[0013] If the sensitive database does not include the word segment, it is determined whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist.

[0014] Optionally, sending the message completion body to an external component corresponding to the message receiver according to the component name includes:

[0015] Pushing the message completion body to the message queue corresponding to the component name, where different component names correspond to different message queues;

[0016] Within a first preset time period, a preset number of message completion bodies in the message queue are sent to an external component corresponding to the message recipient.

[0017] Optionally, pushing the message completion body to a message queue corresponding to the component name includes:

[0018] Obtain a first number of message completion bodies to be entered into the message queue;

[0019] If the first number is less than a first preset number, pushing the message completion body to the message queue corresponding to the component name;

[0020] If the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion body is pushed to the new message queue.

[0021] Optionally, after sending a preset number of message completion bodies in the message queue to an external component corresponding to the message recipient, the method further includes:

[0022] If there is no message completion body to be sent in the message queue, and within a second preset time period, a second number of message completion bodies to be entered into the sending queue is less than a second preset number, an empty message queue is deleted.

[0023] Optionally, after assembling the content to be sent according to the content template type to obtain a completed message body, the method further includes:

[0024] Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component, wherein the tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message.

[0025] Optionally, sending the message completion body to an external component corresponding to the message receiver according to the component name includes:

[0026] The message completion body is sent to the external component corresponding to the message receiver through the communication interface corresponding to the component name, wherein the communication interface is an interface designed through the adapter design pattern, and different component names correspond to different communication interfaces.

[0027] Optionally, after sending the message completion body to the external component corresponding to the message recipient according to the component name, the method further includes:

[0028] According to the sending results, dynamically count the sending data of each access component, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of messages received by the recipient that meets the preset conditions;

[0029] The sending data is displayed based on the statistics page.

[0030] On the other hand, the present application provides a message processing device, including:

[0031] An access module, used to obtain a message of an access component, wherein the message adopts a request body structure, and the request body structure includes an access identifier, a component name, a sending content, a message recipient, and a content template type, wherein the message request body structure adopted by different access components is the same;

[0032] A verification module, used to authenticate the access component according to the access identifier, and if the identity is passed, assemble the sent content according to the content template type to obtain a message completion body;

[0033] A sending module is used to send the message completion body to the external component corresponding to the message recipient according to the component name, wherein the component name is the name of the external component.

[0034] Optionally, the verification module is specifically used for:

[0035] Performing word segmentation processing on the sent content to obtain multiple word segments;

[0036] Determining whether the sensitive database includes the segmented word;

[0037] If the sensitive database does not include the word segment, it is determined whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist.

[0038] Optionally, the sending module is specifically used for:

[0039] Pushing the message completion body to the message queue corresponding to the component name, where different component names correspond to different message queues;

[0040] Within a first preset time period, a preset number of message completion bodies in the message queue are sent to an external component corresponding to the message recipient.

[0041] Optionally, the sending module is specifically used for:

[0042] Obtain a first number of message completion bodies to be entered into the message queue;

[0043] If the first number is less than a first preset number, pushing the message completion body to the message queue corresponding to the component name;

[0044] If the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion body is pushed to the new message queue.

[0045] Optionally, the sending module is specifically used for:

[0046] If there is no message completion body to be sent in the message queue, and within a second preset time period, a second number of message completion bodies to be entered into the sending queue is less than a second preset number, an empty message queue is deleted.

[0047] Optionally, the verification module is specifically used for:

[0048] Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component, wherein the tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message.

[0049] Optionally, the sending module is specifically used for:

[0050] The message completion body is sent to the external component corresponding to the message receiver through the communication interface corresponding to the component name, wherein the communication interface is an interface designed through the adapter design pattern, and different component names correspond to different communication interfaces.

[0051] Optionally, the sending module is specifically used for:

[0052] According to the sending results, dynamically count the sending data of each access component, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of messages received by the recipient that meets the preset conditions;

[0053] The sending data is displayed based on the statistics page.

[0054] According to a third aspect of the present application, an electronic device is provided, including:

[0055] Processor and memory;

[0056] Memory stores computer-executable instructions;

[0057] The processor executes the computer-executable instructions stored in the memory, so that the electronic device executes any one of the methods in the first aspect.

[0058] In a fourth aspect of the present application, a computer-readable storage medium is provided, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement a method for determining a driver program for a hardware peripheral as described in any one of the first aspects.

[0059] This embodiment provides a message processing method, device, equipment and storage medium. The method obtains the message of the access component, and the message adopts a request body structure, which includes an access identifier, a component name, a sent content, a message recipient and a content template type; authenticates the access component according to the access identifier, and if the identity authentication is passed, assembles the sent content according to the content template type to obtain a message completion body; and sends the message completion body to the external component corresponding to the message recipient according to the component name. The method accesses the component's message in a unified data format, and authenticates the identity before assembling the content, thereby ensuring the security and confidentiality of the message sent to the external component. BRIEF DESCRIPTION OF THE DRAWINGS

[0060] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0061] Figure 1 A specific application scenario diagram of the message processing method provided by this application;

[0062] Figure 2 Message processing method flow provided in the embodiment of the present application Figure 1 ;

[0063] Figure 3 Message processing method flow provided in the embodiment of the present application Figure 2 ;

[0064] Figure 4 Message processing method flow provided in the embodiment of the present application Figure 3 ;

[0065] Figure 5 A schematic diagram of the structure of a message processing device provided in an embodiment of the present application;

[0066] Figure 6 A hardware structure diagram of the message processing device provided in an embodiment of the present application.

[0067] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION

[0068] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0069] Figure 1 This is a specific application scenario diagram of the message processing method provided by this application. Figure 1 As shown, the application scenario includes: access component A102, access component B103, access component C104 and message center 105 in the financial system 101 and external components A106, external component B107, external component C108 and external component D109 outside the financial system 101. Exemplarily, when access component A102 needs to send a message to external component B107, for example, access component A102 responsible for SMS needs to send a SMS to external component B107, that is, the user's mobile phone to remind the user to pay the loan. At this time, access component A102 needs to access message center 105, and message center 105 processes the message, such as filling in the content, and then sends it to the user's mobile phone through message center 105.

[0070] If the message center 105 directly sends the message to the external component B 107 when receiving the message from the access component A 102, the security of the message cannot be guaranteed.

[0071] The present application provides a message processing method. When sending a message to an external component, the access identifier of the access component will be authenticated. After passing the authentication, the message will be sent to the external component, so that the message can be authenticated before sending, avoiding users from receiving harassing messages sent by access components that have not been authenticated, etc., thereby ensuring the security of internal messages in the system.

[0072] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.

[0073] Figure 2 Message processing method flow provided in the embodiment of the present application Figure 1 .like Figure 2 As shown, the method of this embodiment includes:

[0074] S201, obtaining a message of an access component, the message adopting a request body structure, the request body structure including an access identifier, a component name, a sending content, a message recipient, and a content template type, wherein the message request body structure adopted by different access components is the same;

[0075] In this embodiment, the system to which the access component belongs adopts a microservice architecture based on SpringCloud, and services can be directly addressed by microservice names. The access component is a business component of the system, and the access component has the need to send messages to external components. The forms of sending messages include but are not limited to: SMS, email, third-party instant messaging software, etc.

[0076] The request body structure is a set data structure, including access identification, component name, content to be sent, message recipient, and content template type. The access identification corresponds to the access component one by one, and is used to prove the identity of the access component. The component name is the name of the external component that receives the message, the content template type is the category of the fixed content template that the message usually uses, and the content to be sent is the actual content of the message. The request body structure is used to unify the format of the message sent by the access component to the message center.

[0077] Taking SMS as an example, the request body structure is as follows:

[0078] {

[0079] "accessId":"",

[0080] "appName":"",

[0081] "content":"",

[0082] "phone":"",

[0083] "type":""

[0084] }

[0085] Among them, accessId is the preparation identifier, which can be the token value obtained after authentication; appName: is the name of the external component; content is the sent content; phone is the message recipient; type is the sending content template type.

[0086] In this embodiment, the interface between the message center and the access component is a northbound interface that adopts the RestFul API design specification. RestFul API is a REST-style API. Rest is an architectural style that has nothing to do with programming languages ​​or platforms. It uses URLs to locate resources and HTTP verbs (GET, POST, PUT, DELETE) to describe operations.

[0087] In this embodiment, all access components in the system send messages to the message center according to the request body structure. The message center receives the messages of the request body structure from each access component and processes them.

[0088] S202, authenticate the access component according to the access identifier, and if the identity is passed, assemble the content to be sent according to the content template type to obtain a message completion body;

[0089] In this embodiment, before the message center authenticates the access component based on the access identifier, the access component needs to submit an authentication request to the message center. After receiving the authentication request from the access component, the message center will perform identity authentication. The identity authentication methods include but are not limited to username / password, Lightweight Directory Access Protocol (LDAP), and verification code. LDAP is an open, neutral, industrial standard application protocol that provides access control and maintains directory information of distributed information through the IP protocol. After the message center completes the authentication, the access identifier will be returned to the access component as the identity identifier of the access component. When the access component sends a message through the message center again in the future, it needs to carry the access identifier to prove its identity.

[0090] After the message sent by the access component passes the identity authentication, the message center will parse the message of the request body structure, disassemble the sending content and content template type, select the corresponding content template according to the content template type, and fill in the variables that need to be filled in the content template according to the sending content to obtain the message body. Variables include but are not limited to numbers, text, and links. Specifically, if the content template is to send a text message to the user to notify the user to pay the loan at a specified time and in a specified manner, the variables in the content template include the user's name, specified time, specified method, and the amount of the loan payment.

[0091] S203. Send the message completion body to the external component corresponding to the message receiver according to the component name, where the component name is the name of the external component.

[0092] In this embodiment, the message center determines the specific execution module for sending the message based on the component name, obtains the address of the message receiver based on the message receiver in the message request body structure, and the specific execution module for sending the message sends the assembled message completion body to the corresponding external component.

[0093] This embodiment provides a message processing method, which obtains the message of the access component, the message adopts a request body structure, and the request body structure includes an access identifier, a component name, a sent content, a message recipient, and a content template type; authenticates the access component according to the access identifier, and if the identity is passed, assembles the sent content according to the content template type to obtain a message completion body; and sends the message completion body to the external component corresponding to the message recipient according to the component name. This method accesses the message of the component by using a unified data format, and authenticates the identity before assembling the content, thereby ensuring the security of the message sent to the external component.

[0094] Figure 3 Message processing method flow provided in the embodiment of the present application Figure 2 .like Figure 3 As shown, in this embodiment Figure 2 In the illustrated embodiment, after the access component is authenticated according to the access identifier, if the identity is passed, the process of parsing, verifying, tracking and dynamically counting the message is described in detail. It includes:

[0095] S301, performing word segmentation processing on the sent content to obtain multiple word segments;

[0096] In this embodiment, the sent content includes variables that need to be filled in the content template. The variables include but are not limited to numbers, text, links and other forms. Therefore, the message center needs to perform word segmentation processing and process the variables into multiple word segments to prepare for the next step of comparison with the sensitive database.

[0097] S302, determining whether the sensitive database includes word segmentation;

[0098] In this embodiment, the sensitive database includes not only sensitive data in a broad sense, but also sensitive data set for financial application scenarios, such as internal data of the financial system. By comparing multiple word segments in the sent content with the sensitive database to see if they overlap, the outflow of internal information and improper information is interrupted within the message center, thereby ensuring the security of the information.

[0099] S303, if the sensitive database does not include the segmentation word, determine whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist;

[0100] In this embodiment, after ensuring that multiple word segments of the sent content do not contain sensitive data, the message center parses the address of the message recipient in the request body structure of the message and compares it with the preset whitelist. The whitelist refers to the address database of the recipients who are allowed to receive messages. It can be used to set the scope of service objects of a certain business. For example, if a user has activated the SMS reminder function, the user's address is on the SMS whitelist. Users who have not activated this function will not be able to receive messages because the receiving address is not in the SMS whitelist. When the message recipient is not in the whitelist, the process ends. When the message recipient is in the whitelist, S304 is continued. By setting the whitelist, the security of message sending is guaranteed and messages are prevented from being sent to the wrong recipient.

[0101] S304, assembling the content to be sent according to the content template type to obtain a completed message body;

[0102] In this embodiment, content assembly means that the message center obtains the corresponding content template according to the content template type in the request body structure, and then fills the message template according to the value of the variable that changes the content template in the sent content, thereby obtaining a complete message body that can be sent.

[0103] S305: Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component. The tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message.

[0104] In this embodiment, the tracking identifier is a globally unique random identifier generated by the message center, and the identifier corresponds one-to-one to the message completion body. Because the flow of messages goes through multiple processes, and the access component cannot grasp the location and status of the message after sending the message request structure to the message center. Therefore, the tracking identifier is used to track the message. When the message center returns the tracking identifier to the access component, it will also use a message to describe the status of the current message completion body. For example, set a variable code and a variable msg. When the code value is 0, it means that the message center has received a request to send information and the current message completion body has been processed successfully. At this time, msg is empty; when the code value is 1, it means that the message center has received a request to send information and the current message completion body has failed to be processed. At this time, the value of msg is the reason for the failure. The access component can obtain the current status of the message based on the message. In the subsequent process, the access component can also query the message center for tracking messages based on the tracking identifier.

[0105] S306. Send the message completion body to the external component corresponding to the message receiver through the communication interface corresponding to the component name, wherein the communication interface is an interface designed through the adapter design pattern, and different component names correspond to different communication interfaces;

[0106] In this embodiment, different external components have corresponding communication interfaces in the message center. The message center obtains the name of the external component according to the component name in the message structure, and then locates the corresponding communication interface, and sends the message completion body to the external component through the communication interface.

[0107] The adapter design pattern can serve as a bridge between two incompatible interfaces. This type of design pattern belongs to the structural pattern, which combines the functions of two independent interfaces. This pattern involves a single class that is responsible for adding independent or incompatible interface functions. In this embodiment, common external components such as SMS, e-mail, third-party instant communication software, etc. have their own corresponding communication interfaces. When the access component needs to send a message to a new external component, such as a user-developed system, because the interface adopts an adapter design, the new interface will inherit or rely on a class in the original interface and does not require major changes.

[0108] S307. Dynamically count the sending data of each access component according to the sending result, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of receiving messages that meet the preset conditions;

[0109] In this embodiment, the sending data of each access component is dynamically counted, including but not limited to the total number of messages sent by the access component, the number of messages sent in each time period, or the number of recipients whose received messages meet the preset conditions. The purpose is to understand the use of system resources, so that the system can be managed and optimized. For example, the traffic of the message center in each time period provides a basis for subsequent upgrades and optimizations. At the same time, the business data designed by the access component is understood, and the business is analyzed from a macro level. For example, by counting the number of recipients whose received messages meet the preset conditions, the system can understand the situation of users who subscribe to a certain service.

[0110] S308: Display the sent data based on the statistics page.

[0111] In this embodiment, a statistics page is set to display the statistical results, which helps users view specific message statistics details.

[0112] This embodiment provides a message processing method, which performs word segmentation processing on the sent content to obtain multiple word segments; determines whether the sensitive database includes the word segmentation; if the sensitive database does not include the word segmentation, determines whether the message recipient is in the white list, and the judgment result is that the message recipient is in the white list; assembles the sent content according to the content template type to obtain the message completion body; generates a tracking identifier corresponding to the message completion body, and sends the tracking identifier to the access component; sends the message completion body to the external component corresponding to the message recipient through the communication interface corresponding to the component name; dynamically counts the sending data of each access component according to the sending result; and displays the sending data based on the statistical page. This method improves the security and confidentiality of the system by setting up a sensitive database and a white list to verify whether the sent content and the message recipient are safe; sets a tracking identifier to track the message sending process, ensuring that the component controls the message sending process; sets the communication interface of the adapter mode to match a variety of external components, dynamically counts the sending data and displays it on the statistical page, so that users can grasp the message sending situation in multiple dimensions.

[0113] Figure 4 Message processing method flow provided in the embodiment of the present application Figure 3 .like Figure 4 As shown, in this embodiment Figure 2 On the basis of the embodiment shown, the message completion body is pushed to the message queue corresponding to the component name, and the message completion body is sent through the message queue to ensure that the message completion body can be sent in order. The following is a detailed description.

[0114] S401, obtaining a first number of message completion bodies to be entered into a message queue;

[0115] In this embodiment, different component names correspond to different message queues. The purpose of setting up message queues is to decouple the functions of message processing and message sending. The queue quantity strategy adopted by the message center is one-to-many between the number of queues and component names. For the same component name, the number of queues corresponding to the same component name increases or decreases dynamically according to the strategy. The queue quantity strategy adopted here is mainly based on the first number of message completion bodies to be entered into the message queue.

[0116] S402: If the first number is less than the first preset number, push the message completion body to the message queue corresponding to the component name;

[0117] In this embodiment, the first preset number is a threshold value set in advance. If the first number is less than the first preset number, the number of message queues at this time meets the sending requirements of the current number of message completion bodies, so no additional operation is required.

[0118] S403: If the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion body is pushed to the new message queue;

[0119] In this embodiment, if the first number is greater than the first preset number, it means that the number of message queues cannot meet the sending demand of the current number of message completion bodies, and traffic peak shaving is required. By creating a new message queue associated with the component name, the number of message queues is increased to further meet the sending demand of the message completion body.

[0120] S404: within a first preset time period, send a preset number of message completion bodies in the message queue to an external component corresponding to the message recipient;

[0121] In this embodiment, the first preset duration is a preset time period. Within a certain time period, a preset number of message completion bodies in the message queue are centrally sent to the external component corresponding to the message recipient to avoid accumulation of message completion bodies and waste of resources.

[0122] S405: If there is no message completion body to be sent in the message queue, and within a second preset time period, a second number of message completion bodies to be entered into the sending queue is less than a second preset number, an empty message queue is deleted.

[0123] In this embodiment, the second preset duration is a preset time period, and the second preset number is a preset threshold. In order to avoid waste of resources caused by frequent changes in the number of queues, the queue adopts a lazy change strategy, that is, when there is no message completion body to be sent in the message queue, the queue will not be destroyed immediately, but wait for the second preset duration. If during this period, the second number of message completion bodies to be sent to the sending queue cannot reach the threshold, that is, the second preset number, then another empty queue will be destroyed.

[0124] This embodiment provides a message processing method, which obtains the first number of message completion bodies to be entered into a message queue; if the first number is less than the first preset number, the message completion bodies are pushed to the message queue corresponding to the component name; if the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion bodies are pushed to the new message queue; within a first preset duration, a preset number of message completion bodies in the message queue are sent to an external component corresponding to the message receiver; if there are no message completion bodies to be sent in the message queue, and within a second preset duration, the second number of message completion bodies to be entered into the sending queue is less than the second preset number, an empty message queue is deleted. This method monitors the message completion bodies to be entered into the message queue, dynamically increases or decreases the number of message queues, prevents the accumulation of message completion bodies caused by excessive traffic, and saves resources at the same time.

[0125] Figure 5 Schematic diagram of the structure of a message processing device provided in an embodiment of the present application. The device of this embodiment can be in the form of software and / or hardware. Figure 5 As shown, a message processing device 500 provided in an embodiment of the present application includes an access module 501, a verification module 502 and a sending module 503.

[0126] Access module 501, used to obtain the message of the access component, the message adopts a request body structure, the request body structure includes the access identifier, component name, sending content, message recipient and content template type, wherein the message request body structure adopted by different access components is the same;

[0127] The verification module 502 is used to authenticate the access component according to the access identifier. If the authentication is passed, the content to be sent is assembled according to the content template type to obtain a message completion body;

[0128] The sending module 503 is used to send the message completion body to the external component corresponding to the message receiver according to the component name, where the component name is the name of the external component.

[0129] In a possible implementation, the verification module is specifically used to:

[0130] Perform word segmentation on the sent content to obtain multiple word segments;

[0131] Determine whether the sensitive database includes word segmentation;

[0132] If the sensitive database does not include the segmentation word, it is determined whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist.

[0133] In a possible implementation, the sending module is specifically used for:

[0134] Push the message completion body to the message queue corresponding to the component name, where different component names correspond to different message queues;

[0135] Within a first preset time period, a preset number of message completion bodies in the message queue are sent to an external component corresponding to the message recipient.

[0136] In a possible implementation, the sending module is specifically used for:

[0137] Obtain a first number of message completion bodies to be entered into the message queue;

[0138] If the first number is less than the first preset number, the message completion body is pushed to the message queue corresponding to the component name;

[0139] If the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion body is pushed to the new message queue.

[0140] In a possible implementation, the sending module is specifically used for:

[0141] If there is no message completion body to be sent in the message queue, and within a second preset time period, a second number of message completion bodies to be entered into the sending queue is less than a second preset number, an empty message queue is deleted.

[0142] In a possible implementation, the verification module is specifically used to:

[0143] Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component. The tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message.

[0144] In a possible implementation, the sending module is specifically used for:

[0145] The message completion body is sent to the external component corresponding to the message receiver through the communication interface corresponding to the component name, wherein the communication interface is an interface designed through the adapter design pattern, and different component names correspond to different communication interfaces.

[0146] In a possible implementation, the sending module is specifically used for:

[0147] According to the sending results, dynamically count the sending data of each access component, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of messages received by the recipient that meets the preset conditions;

[0148] Display sending data based on statistics page.

[0149] Figure 6 The hardware structure diagram of the message processing device provided in the embodiment of the present application. Figure 6 As shown, the message processing device 600 includes:

[0150] Processor 601 and memory 602;

[0151] Memory stores computer-executable instructions;

[0152] The processor executes the computer execution instructions stored in the memory 602, so that the electronic device executes the message processing method as described above.

[0153] It should be understood that the processor 601 can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), ASICs, etc. A general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the invention can be directly implemented as a hardware processor, or can be implemented by a combination of hardware and software modules in the processor. The memory 602 may include a high-speed random access memory (RAM), and may also include a non-volatile memory (NVM), such as at least one disk storage, and may also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk.

[0154] The embodiment of the present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, a message processing method is implemented.

[0155] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0156] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0157] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A message processing method, characterized in that: Applied to a message center, the method includes: Obtain a message of an access component, wherein the message adopts a request body structure, and the request body structure includes an access identifier, a component name, a sending content, a message recipient, and a content template type, wherein the message request body structure adopted by different access components is the same; Performing identity authentication on the access component according to the access identifier, and if the identity authentication is passed, performing word segmentation processing on the sent content to obtain multiple word segments; Determining whether the sensitive database includes the segmented word; If the sensitive database does not include the word segmentation, determining whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist; Select a corresponding content template according to the content template type, and fill in the variables that need to be filled in the content template according to the sent content to obtain a message completion body; Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component, wherein the tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message; According to the communication interface corresponding to the component name, the message completion body is sent to the external component corresponding to the message receiver, wherein the communication interface is an interface designed by the adapter design pattern, different component names correspond to different communication interfaces, and the component name is the name of the external component; According to the sending results, dynamically count the sending data of each access component, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of messages received by the recipient that meets the preset conditions; The sending data is displayed based on the statistics page.

2. The method according to claim 1, characterized in that According to the component name, sending the message completion body to the external component corresponding to the message receiver includes: Pushing the message completion body to the message queue corresponding to the component name, where different component names correspond to different message queues; Within a first preset time period, a preset number of message completion bodies in the message queue are sent to an external component corresponding to the message recipient.

3. The method according to claim 2, characterized in that The step of pushing the message completion body to the message queue corresponding to the component name includes: Obtain a first number of message completion bodies to be entered into the message queue; If the first number is less than a first preset number, pushing the message completion body to the message queue corresponding to the component name; If the first number is greater than the first preset number, a new message queue associated with the component name is established, and the message completion body is pushed to the new message queue.

4. The method according to claim 2, characterized in that: After sending a preset number of message completion bodies in the message queue to the external component corresponding to the message recipient, the method further includes: If there is no message completion body to be sent in the message queue, and within a second preset time period, a second number of message completion bodies to be entered into the sending queue is less than a second preset number, an empty message queue is deleted.

5. A message processing device, characterized in that: include: An access module, used to obtain a message of an access component, wherein the message adopts a request body structure, and the request body structure includes an access identifier, a component name, a sending content, a message recipient, and a content template type, wherein the message request body structure adopted by different access components is the same; A verification module, used to authenticate the access component according to the access identifier, and if the identity is passed, assemble the sent content according to the content template type to obtain a message completion body; A sending module, used for sending the message completion body to the external component corresponding to the message recipient; The verification module is specifically used for: Performing word segmentation processing on the sent content to obtain multiple word segments; Determining whether the sensitive database includes the segmented word; If the sensitive database does not include the word segmentation, determining whether the message recipient is in the whitelist, and the determination result is that the message recipient is in the whitelist; The verification module is specifically used for: Generate a tracking identifier corresponding to the message completion body, and send the tracking identifier to the access component, wherein the tracking identifier corresponds to the message completion body one by one, and the tracking identifier is used by the access component to track the message; The sending module is specifically used for: Sending the message completion body to the external component corresponding to the message receiver through the communication interface corresponding to the component name, wherein the communication interface is an interface designed through the adapter design pattern, and different component names correspond to different communication interfaces; The sending module is specifically used for: According to the sending results, dynamically count the sending data of each access component, wherein the sending data includes at least one of the following: the total number of messages sent by the access component, the number of messages sent in each time period, or the number of messages received by the recipient that meets the preset conditions; The sending data is displayed based on the statistics page.

6. An electronic device comprising: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the electronic device performs the method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement a message processing method as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Message processing method and apparatus

    CN105763584A

  • Message pushing method, electronic equipment and storage medium

    CN114338788A

  • Message pushing method and apparatus, and electronic device and computer-readable medium

    WO2021237433A1