CN114567557A - Message processing method and device, computer equipment and storage medium - Google Patents

Message processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114567557A
CN114567557A CN202210216842.5A CN202210216842A CN114567557A CN 114567557 A CN114567557 A CN 114567557A CN 202210216842 A CN202210216842 A CN 202210216842A CN 114567557 A CN114567557 A CN 114567557A
Authority
CN
China
Prior art keywords
message
configuration information
processed
target
request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210216842.5A
Other languages
Chinese (zh)
Inventor
卫军辉
陈龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shuhe Information Technology Co Ltd
Original Assignee
Shanghai Shuhe Information Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Shuhe Information Technology Co Ltd filed Critical Shanghai Shuhe Information Technology Co Ltd
Priority to CN202210216842.5A priority Critical patent/CN114567557A/en
Publication of CN114567557A publication Critical patent/CN114567557A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5077Network service management, e.g. ensuring proper service fulfilment according to agreements wherein the managed service relates to simple transport services, i.e. providing only network infrastructure

Abstract

The application relates to a message processing method, a message processing device, computer equipment and a storage medium. The method comprises the following steps: receiving a message request to be processed sent by a calling party device, wherein the message request to be processed carries a message parameter to be processed, searching target message configuration information matched with the message parameter to be processed according to the message request to be processed, processing the message parameter to be processed according to the target message configuration information to obtain a target message processing result, and forwarding the target message processing result to the called party device. The method can improve the message processing efficiency.

Description

Message processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a packet, a computer device, and a storage medium.
Background
The communication between systems is essential in development work, and when business systems are called mutually or an open interface of a third party is connected, a lot of repeated message processing work is often accompanied. Such as encryption/decryption of requests/responses, signature verification, account verification, token verification, etc.
In the past, both the calling device and the called device in the service system complete all message processing in the communication process. Although there are a large number of template codes, the specific implementation of message processing will vary depending on the request specification established by the caller device and the callee device. It is difficult to extract a common and relatively independent sdk packet from the message for the calling two devices, resulting in low message processing efficiency.
Disclosure of Invention
In view of the above, it is necessary to provide a message processing method, a message processing apparatus, a computer device, and a storage medium, which can improve message processing efficiency.
A message processing method is applied to a message gateway, the message gateway is respectively communicated with a calling party device and a called party device, wherein:
receiving a message request to be processed sent by calling side equipment, wherein the message request to be processed carries a message parameter to be processed;
searching target message configuration information matched with the parameters of the message to be processed according to the message to be processed;
processing the message parameters to be processed according to the target message configuration information to obtain a target message processing result;
and forwarding the target message processing result to the called party equipment.
In one embodiment, before the message gateway provides a message configuration management interface and receives a message request to be processed sent by a caller device, the method includes: configuring candidate message parameters in a message configuration management interface, configuring candidate message configuration information corresponding to the candidate message parameters, and establishing a mapping relation between the candidate message parameters and the corresponding candidate message configuration information.
In one embodiment, searching for target packet configuration information matched with the parameters of the packet to be processed according to the request of the packet to be processed includes: and searching the target message configuration information matched with the message parameter to be processed according to the mapping relation.
In one embodiment, before configuring the candidate message parameters in the message configuration management interface, the method includes: acquiring a message gateway starting instruction, reading a message processing script according to the message gateway starting instruction, wherein the script language of the message processing script is groovy development language, dynamically loading the message processing script, and starting the message gateway.
In one embodiment, the target message configuration information is at least one of encryption and decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
In one embodiment, when the target packet configuration information is the encryption/decryption request configuration information, processing the to-be-processed packet parameter according to the target packet configuration information to obtain a target packet processing result, including: and acquiring a specific encryption algorithm and an encryption key, and encrypting the message parameters to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
In one embodiment, after forwarding the target packet processing result to the called device, the method includes: and receiving a response body returned by the called party equipment, wherein the response body carries a response message, processing the response message in the response body according to the target message configuration information to obtain a response message processing result, and forwarding the response message processing result to the calling party equipment.
In one embodiment, when the target message configuration information is the encryption/decryption request configuration information, processing the response message in the responder according to the target message configuration information to obtain a response message processing result, including: and acquiring a specific decryption algorithm and a decryption key, and decrypting the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result.
A message processing apparatus, the apparatus comprising: the method is applied to a message gateway, the message gateway is communicated with a calling party device and a called party device respectively, and the method comprises the following steps:
the receiving module is used for receiving a message request to be processed sent by calling party equipment, and the message request to be processed carries message parameters to be processed;
the searching module is used for searching the target message configuration information matched with the parameters of the message to be processed according to the message to be processed;
the processing module is used for processing the message parameters to be processed according to the target message configuration information to obtain a target message processing result;
and the forwarding module is used for forwarding the target message processing result to the called party equipment.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
receiving a message request to be processed sent by calling side equipment, wherein the message request to be processed carries a message parameter to be processed;
searching target message configuration information matched with the parameters of the message to be processed according to the message to be processed;
processing the message parameters to be processed according to the target message configuration information to obtain a target message processing result;
and forwarding the target message processing result to the called party equipment.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
receiving a message request to be processed sent by calling side equipment, wherein the message request to be processed carries a message parameter to be processed;
searching target message configuration information matched with the parameters of the message to be processed according to the message to be processed;
processing the message parameters to be processed according to the target message configuration information to obtain a target message processing result;
and forwarding the target message processing result to the called party equipment.
According to the message processing method, the message processing device, the computer equipment and the storage medium, the message gateway receives a message request to be processed sent by the calling party equipment, the message request to be processed carries message parameters to be processed, target message configuration information matched with the message parameters to be processed is searched according to the message request to be processed, the message parameters to be processed are processed according to the target message configuration information, a target message processing result is obtained, and the target message processing result is forwarded to the called party equipment. Through the general message processing service provided by the message gateway, the message gateway processes the request message and the response message, so that the condition that the calling party equipment and the called party equipment need to process all message processing works in the message processing process independently is avoided, once the calling party equipment or the called party equipment changes, the condition that the related message processing works need to be carried out again is avoided, and the message processing efficiency is improved.
Drawings
FIG. 1 is a diagram of an application environment of a message processing method in one embodiment;
FIG. 2 is a flow diagram illustrating a method for message processing according to an embodiment;
FIG. 3 is a flow diagram illustrating a method for message processing according to an embodiment;
FIG. 4 is a flow diagram illustrating a method for message processing according to an embodiment;
FIG. 5 is a flowchart illustrating the processing steps of the parameters of the message to be processed in one embodiment;
FIG. 6 is a flowchart illustrating a step of forwarding a target packet processing result according to an embodiment;
FIG. 7 is a schematic flow chart diagram illustrating the processing steps of a responder in one embodiment;
FIG. 8 is a block diagram of a message processing apparatus according to an embodiment;
FIG. 9 is a diagram showing an internal structure of a computer device in one embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The message processing method provided by the application can be applied to the application environment shown in fig. 1. The caller device 102 communicates with the device 104 where the message gateway is located through the network, and the callee device 106 communicates with the device 104 where the message gateway is located. The caller device 102, the message gateway device 104, and the callee device 106 may be, but are not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and may also be implemented by an independent server or a server cluster composed of a plurality of servers.
Specifically, the device 104 where the message gateway is located receives a to-be-processed message request sent by the caller device 102, where the to-be-processed message request carries a to-be-processed message parameter, searches for target message configuration information matched with the to-be-processed message parameter according to the to-be-processed message request, processes the to-be-processed message parameter according to the target message configuration information to obtain a target message processing result, and forwards the target message processing result to the callee device 106.
In another embodiment, the message gateway may also be deployed on the caller device, with the message gateway acting as a bridge between the caller device and the callee device.
In an embodiment, as shown in fig. 2, a message processing method is provided, which is described by taking an example that the method is applied to a device where a message gateway in fig. 1 is located, and includes the following steps:
step 202, receiving a message request to be processed sent by the caller device, where the message request to be processed carries a message parameter to be processed.
The message request to be processed is requested by the calling party device to the message gateway, and the calling party device requests the message gateway to process the message by sending the message request to be processed. The message parameter to be processed is a message parameter to be processed. When the calling side equipment triggers and generates a message request to be processed, the message parameter to be processed is carried in the message request to be processed.
And 204, searching target message configuration information matched with the parameters of the message to be processed according to the message to be processed request.
The relationship between each message parameter and the matched message configuration information may be pre-established, and specifically, the relationship may be established according to actual service requirements, actual product requirements, or actual application scenarios. Specifically, after receiving a message request to be processed sent by a calling device, the message gateway searches for target message configuration information matched with parameters of the message to be processed according to the received message request to be processed and a relationship established in advance.
The message configuration information is a pre-configured message processing mode, the specific configuration of the message configuration information can be configured according to actual service requirements, actual product requirements or actual application scenarios, the message processing mode includes but is not limited to a message request encryption and decryption processing mode, a message request signature verification processing mode, a token verification processing mode and an account password verification processing mode, and different message processing modes correspond to different message configuration information.
And step 206, processing the parameters of the message to be processed according to the configuration information of the target message to obtain a processing result of the target message.
And step 208, forwarding the target message processing result to the called party equipment.
Specifically, after the target message configuration information is determined, the message parameter to be processed is processed according to the target message configuration information, the target message configuration information describes a message processing mode, and the message parameter to be processed is processed through the target message processing mode described by the target message configuration information, so that a processed target message processing result is obtained. Further, the message gateway forwards the processed target message processing result to the called party equipment. The message network provides a general message processing service, so that the condition that the calling equipment and the called equipment need to finish the message processing work independently is avoided, and the message processing efficiency is improved.
In the message processing method, the message gateway receives a message request to be processed sent by the calling party device, the message request to be processed carries a message parameter to be processed, target message configuration information matched with the message parameter to be processed is searched according to the message request to be processed, the message parameter to be processed is processed according to the target message configuration information to obtain a target message processing result, and the target message processing result is forwarded to the called party device. Through the general message processing service provided by the message gateway, the message gateway processes the request message and the response message, so that the condition that the calling party equipment and the called party equipment need to process all message processing works in the message processing process independently is avoided, once the calling party equipment or the called party equipment changes, the condition that the related message processing works need to be carried out again is avoided, and the message processing efficiency is improved.
In an embodiment, as shown in fig. 3, before the message gateway provides a message configuration management interface and receives a message request to be processed sent by a caller device, the method includes:
step 302, configuring candidate message parameters in a message configuration management interface, and configuring candidate message configuration information corresponding to the candidate message parameters.
Step 302, a mapping relationship between the candidate message parameters and the corresponding candidate message configuration information is established.
In this embodiment, searching for the target packet configuration information matched with the parameter of the packet to be processed according to the request of the packet to be processed includes: and searching the target message configuration information matched with the message parameter to be processed according to the mapping relation.
The message gateway can also provide a message configuration management interface for managing the relevant configuration of message processing. Specifically, candidate message parameters are configured on a message configuration management interface provided by the message gateway, the specific configuration of the candidate message parameters can be configured according to actual service requirements, actual product requirements or actual application scenarios, and meanwhile, candidate message configuration information corresponding to the candidate message parameters is configured, that is, candidate message processing modes corresponding to the candidate message parameters are configured, and the candidate message processing modes corresponding to the candidate message parameters can be determined through the candidate message configuration information. The candidate message configuration information corresponding to the candidate message parameter may be at least one candidate message configuration information.
Further, after the configured candidate message parameters and the corresponding candidate message configuration information are obtained, a mapping relationship between each candidate message parameter and the matched candidate message configuration information is established, where the mapping relationship may be a one-to-one relationship or a one-to-many relationship, that is, one candidate message parameter may correspond to one candidate message configuration information or one candidate message parameter may correspond to a plurality of different candidate message configuration information. Finally, after the mapping relation is established, and subsequently after a message request to be processed is received, target message configuration information matched with the parameters of the message to be processed can be searched according to the established mapping relation.
In one embodiment, as shown in fig. 4, before configuring the candidate message parameters in the message configuration management interface, the method includes:
step 402, obtaining a message gateway starting instruction.
And step 404, reading a message processing script according to the message gateway starting instruction, wherein the script language of the message processing script is groovy development language.
Step 406, dynamically loading the message processing script and starting the message gateway.
Before configuring the candidate message parameters, the message gateway needs to be started, and after the message gateway is successfully started, a message configuration management interface can be provided for configuration. Specifically, the message gateway acquires a message gateway starting instruction, the message gateway starting instruction can be generated by triggering the message gateway or by triggering other equipment, after receiving the message gateway starting instruction, the message gateway reads a pre-developed message processing script according to the message gateway starting instruction, the script language of the message processing script is a groovy development language, and finally, the message processing script is dynamically loaded, and the message gateway can be started after the message processing script is successfully loaded.
Once the message processing script changes, the message processing script can be dynamically compiled and loaded.
In one embodiment, the target message configuration information is at least one of encryption and decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
Specifically, the target message configuration information describes a target message processing mode, the message configuration information is configuration information related to the message processing mode, the message processing mode may be, but is not limited to, a request encryption/decryption processing mode, a request encryption/verification processing mode, a token verification processing mode, and an account password verification processing mode, different message processing modes correspond to different message configuration information, the message configuration information of the request encryption/decryption processing mode is the request encryption/decryption configuration information, the message configuration information of the request encryption/verification processing mode is the request encryption/verification configuration information, the message configuration information of the token verification processing mode is the token verification configuration information, and the message configuration information of the account password verification processing mode is the account password verification configuration information.
The method comprises the steps of encrypting and decrypting message parameters according to a specific encryption algorithm and a key in a communication process, generating a digital signature and verifying the validity of the digital signature for message contents in the communication process, generating a token and verifying the validity of the token according to rules agreed by two parties in the communication process, and carrying an account password and verifying the validity of the account password according to the rules agreed by the two parties in the communication process.
In an embodiment, as shown in fig. 5, when the target packet configuration information is the encryption/decryption request configuration information, processing the to-be-processed packet parameter according to the target packet configuration information to obtain the target packet processing result, including:
step 502, obtain a specific encryption algorithm and encryption key.
And step 504, encrypting the message parameters to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
Specifically, when the target message configuration information is the encryption and decryption request configuration information, the corresponding message processing mode is the encryption and decryption request processing mode, specifically, a specific encryption algorithm and an encryption key are obtained, the encryption algorithm may be an existing encryption algorithm, and is not limited herein, and then the parameters of the message to be processed are encrypted through the specific encryption algorithm and the encryption key, so that the encrypted target message processing result is obtained.
In an embodiment, as shown in fig. 6, after forwarding the target packet processing result to the called device, the method includes:
step 602, a response body returned by the called party equipment is received, and the response body carries a response message.
Step 604, processing the response message in the response body according to the target message configuration information to obtain a response message processing result.
Step 606, forwarding the response message processing result to the caller device.
Specifically, after receiving a target message processing result forwarded by the message gateway, the called device processes the target message processing result according to the service logic of the called device to obtain a response body, and then the called device returns the response body to the message gateway. Further, after receiving the response body returned by the called party device, the message gateway processes the response message in the response body according to the target message configuration information, and obtains a response message processing result. At this time, the matched message configuration information does not need to be searched, and the response message in the response body can be directly processed by the target message configuration information to obtain a response message processing result. And finally, the message gateway forwards the response message processing result to the calling side equipment.
In an embodiment, as shown in fig. 7, when the target packet configuration information is the encryption/decryption request configuration information, processing the response packet in the responder according to the target packet configuration information to obtain a response packet processing result, including:
at step 702, a specific decryption algorithm and decryption key are obtained.
And step 704, decrypting the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result.
Specifically, when the target message configuration information is the request encryption/decryption configuration information, the corresponding message processing mode is the request encryption/decryption processing mode, specifically, a specific decryption algorithm and a decryption key are obtained, the decryption algorithm may be an existing decryption algorithm and corresponds to the previous encryption algorithm, and then the response message is decrypted by the specific decryption algorithm and the decryption key, so that a decrypted response message processing result is obtained.
It should be understood that, although the steps in the above-described flowcharts are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in the above-described flowcharts may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or the stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least a portion of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 8, there is provided a message processing apparatus 800, which is applied to a message gateway, where the message gateway respectively communicates with a caller device and a callee device, and includes: a receiving module 802, a searching module 804, a processing module 806, and a forwarding module 808, wherein:
the receiving module 802 is configured to receive a to-be-processed message request sent by a caller device, where the to-be-processed message request carries a to-be-processed message parameter.
The searching module 804 is configured to search the target message configuration information matched with the parameter of the message to be processed according to the message to be processed request.
The processing module 806 is configured to process the message parameter to be processed according to the target message configuration information, so as to obtain a target message processing result.
A forwarding module 808, configured to forward the target packet processing result to the called device.
In one embodiment, the message processing apparatus 800 provides a message configuration management interface, the message processing apparatus 800 configures candidate message parameters in the message configuration management interface, configures candidate message configuration information corresponding to the candidate message parameters, establishes a mapping relationship between the candidate message parameters and the corresponding candidate message configuration information, and the searching module 804 searches for target message configuration information matched with the message parameters to be processed according to the mapping relationship.
In one embodiment, the message processing apparatus 800 obtains a message gateway start instruction, reads a message processing script according to the message gateway start instruction, where the script language of the message processing script is a groovy development language, dynamically loads the message processing script, and starts the message gateway.
In one embodiment, the target message configuration information is at least one of encryption and decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
In one embodiment, when the target message configuration information is the encryption/decryption configuration information, the processing module 806 obtains a specific encryption algorithm and an encryption key, and encrypts the message parameter to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
In an embodiment, the message processing apparatus 800 receives a response body returned by the called device, where the response body carries a response message, processes the response message in the response body according to the target message configuration information to obtain a response message processing result, and forwards the response message processing result to the calling device.
In one embodiment, when the target message configuration information is the encryption/decryption configuration information, the message processing apparatus 800 obtains a specific decryption algorithm and a decryption key, and performs decryption processing on the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result. For the specific limitation of the message processing apparatus, reference may be made to the above limitation on the message processing method, and details are not described herein again. All or part of each module in the message processing device can be realized by software, hardware and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, there is provided a device in which a message gateway is located, where the device may be a computer device, the computer device may be a server, and an internal structure diagram of the device may be as shown in fig. 9. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing target message configuration information. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a message processing method.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 10. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a message processing method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the configurations shown in fig. 9 or 10 are merely block diagrams of some configurations relevant to the present disclosure, and do not constitute a limitation on the computing devices to which the present disclosure may be applied, and that a particular computing device may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program: receiving a message request to be processed sent by a calling party device, wherein the message request to be processed carries a message parameter to be processed, searching target message configuration information matched with the message parameter to be processed according to the message request to be processed, processing the message parameter to be processed according to the target message configuration information to obtain a target message processing result, and forwarding the target message processing result to the called party device.
In one embodiment, the processor, when executing the computer program, further performs the steps of: configuring candidate message parameters in a message configuration management interface, configuring candidate message configuration information corresponding to the candidate message parameters, and establishing a mapping relation between the candidate message parameters and the corresponding candidate message configuration information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and searching the target message configuration information matched with the message parameter to be processed according to the mapping relation.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring a message gateway starting instruction, reading a message processing script according to the message gateway starting instruction, wherein the script language of the message processing script is groovy development language, dynamically loading the message processing script, and starting the message gateway.
In one embodiment, the target message configuration information is at least one of encryption and decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
In one embodiment, when the target message configuration information is the encryption/decryption request configuration information, the processor executes the computer program to further perform the following steps: and acquiring a specific encryption algorithm and an encryption key, and encrypting the message parameters to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and receiving a response body returned by the called party equipment, wherein the response body carries a response message, processing the response message in the response body according to the target message configuration information to obtain a response message processing result, and forwarding the response message processing result to the calling party equipment.
In one embodiment, when the target message configuration information is the encryption/decryption request configuration information, the processor executes the computer program to further perform the following steps: and acquiring a specific decryption algorithm and a decryption key, and decrypting the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: receiving a message request to be processed sent by a calling party device, wherein the message request to be processed carries a message parameter to be processed, searching target message configuration information matched with the message parameter to be processed according to the message request to be processed, processing the message parameter to be processed according to the target message configuration information to obtain a target message processing result, and forwarding the target message processing result to the called party device.
In one embodiment, the processor, when executing the computer program, further performs the steps of: configuring candidate message parameters in a message configuration management interface, configuring candidate message configuration information corresponding to the candidate message parameters, and establishing a mapping relation between the candidate message parameters and the corresponding candidate message configuration information.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and searching the target message configuration information matched with the message parameter to be processed according to the mapping relation.
In one embodiment, the processor, when executing the computer program, further performs the steps of: acquiring a message gateway starting instruction, reading a message processing script according to the message gateway starting instruction, wherein the script language of the message processing script is groovy development language, dynamically loading the message processing script, and starting the message gateway.
In one embodiment, the target message configuration information is at least one of encryption and decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
In one embodiment, when the target message configuration information is the encryption/decryption request configuration information, the processor executes the computer program to further implement the following steps: and acquiring a specific encryption algorithm and an encryption key, and encrypting the message parameters to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
In one embodiment, the processor, when executing the computer program, further performs the steps of: and receiving a response body returned by the called party equipment, wherein the response body carries a response message, processing the response message in the response body according to the target message configuration information to obtain a response message processing result, and forwarding the response message processing result to the calling party equipment.
In one embodiment, when the target message configuration information is the encryption/decryption request configuration information, the processor executes the computer program to further implement the following steps: and acquiring a specific decryption algorithm and a decryption key, and decrypting the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (10)

1. A message processing method is applied to a message gateway, the message gateway is communicated with a calling device and a called device respectively, wherein:
receiving a message request to be processed sent by the calling party equipment, wherein the message request to be processed carries message parameters to be processed;
searching target message configuration information matched with the message parameter to be processed according to the message request to be processed;
processing the message parameter to be processed according to the target message configuration information to obtain a target message processing result;
and forwarding the target message processing result to the called party equipment.
2. The method according to claim 1, wherein the message gateway provides a message configuration management interface, and before receiving the pending message request sent by the caller device, the method comprises:
configuring candidate message parameters in the message configuration management interface, and configuring candidate message configuration information corresponding to the candidate message parameters;
establishing a mapping relation between the candidate message parameters and the corresponding candidate message configuration information;
the searching for the target message configuration information matched with the message parameter to be processed according to the message request to be processed comprises the following steps:
and searching the target message configuration information matched with the message parameter to be processed according to the mapping relation.
3. The method of claim 2, wherein prior to configuring candidate message parameters in the message configuration management interface, the method comprises:
acquiring a message gateway starting instruction;
reading a message processing script according to the message gateway starting instruction, wherein the script language of the message processing script is groovy development language;
and dynamically loading the message processing script and starting the message gateway.
4. The method according to claim 1, wherein the target message configuration information is at least one of encryption/decryption request configuration information, signature verification request configuration information, token verification configuration information, and account password verification configuration information.
5. The method according to claim 4, wherein when the target packet configuration information is encryption/decryption request configuration information, the processing the message parameter to be processed according to the target packet configuration information to obtain a target packet processing result, includes:
acquiring a specific encryption algorithm and an encryption key;
and encrypting the message parameters to be processed according to the encryption algorithm and the encryption key to obtain an encrypted target message processing result.
6. The method of claim 1, wherein after forwarding the target packet processing result to the callee device, the method comprises:
receiving a response body returned by the called party equipment, wherein the response body carries a response message;
processing the response message in the response body according to the target message configuration information to obtain a response message processing result;
and forwarding the response message processing result to the calling party equipment.
7. The method according to claim 6, wherein when the target packet configuration information is encryption/decryption request configuration information, the processing the response packet in the responder according to the target packet configuration information to obtain a response packet processing result includes:
acquiring a specific decryption algorithm and a decryption key;
and decrypting the response message according to the decryption algorithm and the decryption key to obtain a decrypted response message processing result.
8. A message processing apparatus, wherein the apparatus is applied to a message gateway, and the message gateway communicates with a caller device and a callee device, respectively, and comprises:
a receiving module, configured to receive a to-be-processed message request sent by the caller device, where the to-be-processed message request carries a to-be-processed message parameter;
the searching module is used for searching the target message configuration information matched with the message parameter to be processed according to the message request to be processed;
the processing module is used for processing the message parameter to be processed according to the target message configuration information to obtain a target message processing result;
and the forwarding module is used for forwarding the target message processing result to the called party equipment.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 7 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202210216842.5A 2022-03-07 2022-03-07 Message processing method and device, computer equipment and storage medium Pending CN114567557A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210216842.5A CN114567557A (en) 2022-03-07 2022-03-07 Message processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210216842.5A CN114567557A (en) 2022-03-07 2022-03-07 Message processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114567557A true CN114567557A (en) 2022-05-31

Family

ID=81717240

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210216842.5A Pending CN114567557A (en) 2022-03-07 2022-03-07 Message processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114567557A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881172A (en) * 2018-05-22 2018-11-23 阿里巴巴集团控股有限公司 The analysis method and device of message
CN112054998A (en) * 2020-08-10 2020-12-08 中粮招商局(深圳)粮食电子交易中心有限公司 Proxy service method, device, equipment and computer readable storage medium
CN112104640A (en) * 2020-09-11 2020-12-18 深圳前海微众银行股份有限公司 Data processing method, device and equipment of gateway and readable storage medium
WO2021196915A1 (en) * 2020-04-02 2021-10-07 深圳壹账通智能科技有限公司 Encryption and decryption operation-based data transmission methods and systems, and computer device
CN113709177A (en) * 2021-09-06 2021-11-26 中国银行股份有限公司 Method for processing message and external call gateway

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108881172A (en) * 2018-05-22 2018-11-23 阿里巴巴集团控股有限公司 The analysis method and device of message
WO2021196915A1 (en) * 2020-04-02 2021-10-07 深圳壹账通智能科技有限公司 Encryption and decryption operation-based data transmission methods and systems, and computer device
CN112054998A (en) * 2020-08-10 2020-12-08 中粮招商局(深圳)粮食电子交易中心有限公司 Proxy service method, device, equipment and computer readable storage medium
CN112104640A (en) * 2020-09-11 2020-12-18 深圳前海微众银行股份有限公司 Data processing method, device and equipment of gateway and readable storage medium
CN113709177A (en) * 2021-09-06 2021-11-26 中国银行股份有限公司 Method for processing message and external call gateway

Similar Documents

Publication Publication Date Title
CN110365670B (en) Blacklist sharing method and device, computer equipment and storage medium
CN108573371B (en) Data approval method, device, computer equipment and storage medium
WO2020253061A1 (en) Page generating method and apparatus, computer device, and storage medium
CN109359994B (en) Service processing method, device and system based on block chain
CN110727949B (en) Data storage method and device, computer equipment and storage medium
CN109460670B (en) Configuration item decryption method, device, computer equipment and storage medium
CN109039751B (en) Method, device, computer equipment and storage medium for configuring route
CN109144487B (en) Method, device, computer equipment and storage medium for developing business of parts
CN108833265B (en) Message processing method, device, server and storage medium
CN109711824B (en) Resource transfer method, device, computer equipment and storage medium
WO2021068348A1 (en) Task deployment method and system, and storage medium
CN110647540A (en) Business data query method and device, computer equipment and storage medium
CN109286933B (en) Authentication method, device, system, computer equipment and storage medium
CN112527835B (en) Authentication request processing method and device based on cache and related equipment
WO2020199594A1 (en) Service component loading method and apparatus, and computer device and storage medium
CN112800393B (en) Authorization authentication method, software development kit generation method, device and electronic equipment
CN110768784A (en) Password transmission method, device, computer equipment and storage medium
CN109257426B (en) Service line resource loading method and device, computer equipment and storage medium
CN111291345A (en) Voiceprint data processing method and device, computer equipment and storage medium
CN114119300A (en) Electronic protocol matching method and device, computer equipment and storage medium
CN112016122A (en) Webpage data processing method and device, computer equipment and storage medium
WO2021169469A1 (en) Voiceprint data processing method and apparatus, computer device, and storage medium
CN108667919B (en) Data processing method, data processing device, computer equipment and storage medium
CN114567557A (en) Message processing method and device, computer equipment and storage medium
CN110071908B (en) Terminal binding method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination