Message processing method and device

By identifying the service source and generating the target message processing link, the logical differences and lack of flexibility in the clearing message platform when processing messages from different channels are solved, and efficient, accurate and flexible message processing is achieved.

CN119420828APending Publication Date: 2025-02-11BEIJING PACTERA JINXIN TECH LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411499080.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-02-11

AI Technical Summary

Technical Problem

When the clearing message platform processes messages from different channels, there are problems of insufficient processing logic and lack of flexibility, resulting in low processing efficiency and accuracy.

Method used

By identifying the service source of the pending service message, selecting the matching initial message processing link from multiple candidate message processing links, and generating a target message processing link based on the initial link, so as to achieve different service needs and Flexible processing of scenes.

Benefits of technology

It improves the accuracy, reliability and flexibility of message processing, enhances processing efficiency and quality, adapts to multiple message channels, and meets users' personalized needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119420828A_ABST
    Figure CN119420828A_ABST
Patent Text Reader

Abstract

The invention provides a message processing method and device. The method comprises the following steps: acquiring a service source of a service message to be processed; selecting an initial message processing link matched with the service source from the plurality of candidate message processing links; wherein each processing node in the initial message processing link is generated according to a public processing logic for correspondingly processing the service message to be processed; generating a target message processing link according to the initial message processing link; and processing the to-be-processed service message according to the target message processing link, thereby improving the flexibility and pertinence of message processing, and improving the processing efficiency and quality of the service message.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of Internet technology, and in particular to a message processing method and device. Background Art

[0002] With the in-depth development of the market economy, transactions between financial institutions are becoming more frequent. As a bridge for capital flow, the clearing message platform processes messages (incoming or outgoing) efficiently and accurately, which plays a vital role in maintaining the stability of the financial market, ensuring transaction security, and preventing financial risks. Therefore, how the clearing message platform processes messages is very important. Summary of the invention

[0003] The present disclosure provides a message processing method and device to solve one of the technical problems in the related art at least to a certain extent. The technical solution of the present disclosure is as follows:

[0004] According to the first aspect of an embodiment of the present disclosure, a message processing method is provided, including: obtaining a service source of a service message to be processed; selecting an initial message processing link that matches the service source from a plurality of candidate message processing links; wherein each processing node in the initial message processing link is generated according to a common processing logic corresponding to processing the service message to be processed; generating a target message processing link according to the initial message processing link; and processing the service message to be processed according to the target message processing link.

[0005] According to the second aspect of an embodiment of the present disclosure, a message processing device is provided, comprising: an acquisition module for acquiring a service source of a service message to be processed; a selection module for selecting an initial message processing link that matches the service source from a plurality of candidate message processing links; wherein each processing node in the initial message processing link is generated according to a common processing logic for correspondingly processing the service message to be processed; a generation module for generating a target message processing link according to the initial message processing link; and a processing module for processing the service message to be processed according to the target message processing link.

[0006] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the message processing method as described in the embodiment of the first aspect of the present disclosure.

[0007] According to the fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device can execute the message processing method as described in the embodiment of the first aspect of the present disclosure.

[0008] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including: a computer program, which, when executed by a processor, implements the message processing method as described in the embodiment of the first aspect of the present disclosure.

[0009] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0010] In the present technical scheme, firstly, the business source of the business message to be processed is identified, and then an initial message processing link matching the business source is selected from multiple candidate message processing links, thereby ensuring the pertinence and efficiency of message processing. Since each processing node in the initial message processing link is generated based on the common processing logic for processing the business message to be processed, the accuracy and reliability of message processing are improved; finally, the business message to be processed is processed according to the generated target message processing link, thereby realizing flexible adjustment of the message processing flow according to different business needs and scenarios, improving the flexibility and pertinence of message processing, and at the same time improving the efficiency and quality of business message processing; wherein, when the business message to be processed is processed using the target message processing link, the format of the business message to be processed is converted according to the business source to obtain the converted business message; by performing format conversion according to the business source, The target message processing link is used to process the converted business message, which improves the accuracy and efficiency of message processing, realizes the decoupling of business source and message processing, thereby being adaptable to a variety of message channels and improving the flexibility of business message processing; in addition, when the target message processing link is generated according to the initial message processing link, for any processing node in the initial message processing link, if any processing node does not meet the specified processing logic, the template method in the parent class associated with any processing node is obtained; in response to the method update operation, the template method in the subclass inheriting the parent class in any processing node is updated to obtain the updated template method; the target message processing link is generated according to the processing node including the updated template method and the remaining processing nodes in the initial message processing link, which realizes the flexible adjustment of the message processing logic according to different processing requirements and meets the personalized needs of users.

[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0013] Figure 1is a flowchart of a message processing method shown in the first embodiment of the present disclosure;

[0014] Figure 2 is a flow chart of a message processing method shown in the second embodiment of the present disclosure;

[0015] Figure 3 is a flowchart of a message processing method shown in the third embodiment of the present disclosure;

[0016] Figure 4 is a flowchart of a message processing method shown in the fourth embodiment of the present disclosure;

[0017] Figure 5 is a flowchart of a message processing method shown in the fifth embodiment of the present disclosure;

[0018] Figure 6 A logical functional structure diagram of the clearing message platform provided in the embodiment of the present disclosure;

[0019] Figure 7 It is a schematic diagram of the principle of a message processing link corresponding to the incoming message logic processing shown in an embodiment of the present disclosure;

[0020] Figure 8 It is a schematic diagram of the principle of the message processing link corresponding to the forwarding logic processing shown in the embodiment of the present disclosure;

[0021] Fig. 9 It is a schematic diagram of a template method mode shown in an embodiment of the present disclosure;

[0022] Fig.10 is a structural diagram of a message processing device shown in the sixth embodiment of the present disclosure;

[0023] Fig.11 It is a schematic diagram of the structure of an electronic device shown in an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION

[0024] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0025] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0026] It should be noted that in the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are all carried out with the user's consent, and are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0027] The clearing and payment system is connected to a variety of message channels, such as domestic and foreign currency payment systems, designated currency cross-border payment systems, etc. The interfaces and message formats of these channels are different. As a bridge for communication between the clearing system and the outside world, the clearing message gateway is responsible for message storage, message verification, message landing, message parsing, volume management, message verification, message sorting and message sending and other important tasks. During the project implementation process, each time a channel is connected, its parameter conversion, message assembly and parsing are different due to different definitions of the channel party, and the processing logic is obviously different.

[0028] Therefore, in order to solve the above problems, the present disclosure proposes a message processing method and device.

[0029] The message processing method and device according to the embodiments of the present disclosure are described below with reference to the accompanying drawings.

[0030] Figure 1 It is a flow chart of the message processing method shown in the first embodiment of the present disclosure. It should be noted that the embodiment of the present disclosure is applied to the clearing message platform.

[0031] like Figure 1 As shown, the message processing method includes the following steps:

[0032] Step 101, obtaining the service source of the service message to be processed.

[0033] In order to improve the accuracy and flexibility of business message processing, as a possible implementation method, business messages from different business sources are processed using different message processing logics.

[0034] Therefore, as an example, the service message to be processed is parsed, and the service source of the service message to be processed is determined according to the parsing result, wherein the service source is used to indicate whether the service message to be processed is an incoming message or an outgoing message.

[0035] Step 102: Select an initial message processing link that matches the service source from multiple candidate message processing links.

[0036] Among them, each processing node in the initial message processing link is generated according to the common processing logic corresponding to the processing of the service message to be processed.

[0037] It should be noted that incoming reports from different channels correspond to different message processing logics. By parsing the message processing logics of multiple types of incoming reports, the common processing logic in the message processing logic of incoming reports from multiple channels can be obtained. According to the common processing logic in the message processing logic of incoming reports, a message processing link for incoming reports is generated. Similarly, outgoing reports from different channels correspond to different message processing logics. By parsing the message processing logic of outgoing reports from multiple channels, the common processing logic in the message processing logic of outgoing reports from multiple channels can be obtained. According to the common processing logic in the message processing logic of outgoing reports, a message processing link for outgoing reports is generated. The message processing link for incoming reports and the message processing link for outgoing reports are used as multiple candidate message processing links.

[0038] Among them, the incoming message processing link includes processing nodes such as message storage, message verification, message landing, message volume summary, incoming message settlement, message signature, message sorting, message sending and message clearing; the outgoing message processing link includes processing nodes such as message storage, message verification, message landing, message volume summary, outgoing message clearing, message signature, message sorting and message sending.

[0039] Therefore, in order to improve the accuracy of message processing, as an example, an initial message processing link matching the service source is selected from multiple candidate message processing links.

[0040] Step 103: Generate a target message processing link according to the initial message processing link.

[0041] In order to achieve personalized processing of messages, as a possible implementation method, when at least one processing node in the initial message processing link does not meet the specified processing logic, in response to a method update operation, the method indicated by the at least one processing node is updated to generate a target message processing link.

[0042] Step 104: Process the service message to be processed according to the target message processing link.

[0043] Then, the processing logic indicated by each node in the target message processing link is adopted to process the service message to be processed.

[0044] In summary, by identifying the business source of the business message to be processed, and then selecting the initial message processing link that matches the business source from multiple candidate message processing links, the pertinence and efficiency of message processing are ensured. Since each processing node in the initial message processing link is generated based on the common processing logic for processing the business message to be processed, the accuracy and reliability of message processing are improved. Finally, the business message to be processed is processed according to the generated target message processing link, which realizes the flexible adjustment of the message processing process according to different business needs and scenarios, improves the flexibility and pertinence of message processing, and at the same time improves the processing efficiency and quality of business messages.

[0045] In order to clearly explain how to process the service message to be processed according to the target message processing link in the above embodiment, the present disclosure proposes another message processing method.

[0046] Figure 2 It is a flow chart of a message processing method shown in the second embodiment of the present disclosure. It should be noted that the embodiment of the present disclosure is applied to a clearing message platform.

[0047] like Figure 2 As shown, the message processing method includes the following steps:

[0048] Step 201, obtaining the service source of the service message to be processed.

[0049] Step 202: Select an initial message processing link that matches the service source from multiple candidate message processing links.

[0050] Among them, each processing node in the initial message processing link is generated according to the common processing logic for processing the service message to be processed.

[0051] Step 203: Generate a target message processing link according to the initial message processing link.

[0052] Step 204: Perform format conversion on the service message to be processed according to the service source to obtain a converted service message.

[0053] In order to achieve the decoupling of business sources and message processing, so as to improve the efficiency and accuracy of business message processing, as a possible implementation method, before using the target message processing link to process the business message to be processed, the format of the business message to be processed is converted to obtain the converted business message, that is, the business message in a unified format, and then the target message processing link is used to process the business message in the unified format.

[0054] As an example, multiple candidate conversion logics are obtained; from the multiple candidate conversion logics, a target conversion logic matching the business source is obtained; and the target conversion logic is used to perform format conversion on the business message to be processed to obtain a converted business message.

[0055] That is to say, multiple candidate conversion logics for format conversion of business messages are pre-stored or constructed, and then, according to the source of the business message, a target conversion logic that matches it is selected from the multiple candidate conversion logics, and the target conversion logic is used to perform format conversion on the business message to be processed to obtain a converted business message that meets the requirements.

[0056] Step 205: Use the target message processing link to process the converted service message.

[0057] In order to improve the accuracy and efficiency of business message processing, as a possible implementation method, for each node in the message processing link to be processed, the processing result of the previous node is obtained, and the converted business message is processed in combination with the processing result of the previous node and the processing parameters of the current node.

[0058] As an example, for each current processing node in the message processing link to be processed, the processing result of the converted business message at the previous processing node of the current task node is obtained; according to the business source, the processing parameters associated with the current processing node are obtained; and the current processing node is used to process the converted business message based on the processing result of the previous processing node and the processing parameters associated with the current processing node to obtain the processing result of the converted business message at the current processing node.

[0059] That is to say, for each current processing node in the processing link of the message to be processed, first obtain the processing result of the converted business message at the previous processing node; then, according to the business source, obtain the processing parameters that match the business source and are associated with the current processing node. Finally, the current processing node is used to process the converted business message based on the processing result of the previous node and the processing parameters of the current node to obtain the processing result at the current processing node. The above processing process ensures that the business message can be properly processed at each node in the processing link, while considering the influence of the business source on the processing parameters, thereby improving the accuracy and efficiency of message processing.

[0060] It should be noted that the processing parameters include but are not limited to: authority parameters, public parameters, account parameters, organization parameters, business rule parameters, etc.

[0061] It should be noted that after the converted service message is processed using the target message processing link, the processed service message needs to be forwarded according to the service destination of the service message to be processed.

[0062] As an example, a processed business message obtained by processing a business message to be processed by a target processing link is obtained; a business destination of the business message to be processed is obtained; according to the business destination, the format of the processed business message is converted to obtain a converted business message to be sent; and a channel interface matching the business destination is used to forward the business message to be sent according to the business destination.

[0063] That is to say, the target processing link processes the business message to be processed to obtain the processed business message; then, the business destination of the business message is determined; then, the format of the processed business message is converted according to the business destination to obtain the converted business message to be sent; finally, the channel interface matching the business destination is used to forward the business message to be sent to the corresponding destination.

[0064] It should be noted that the execution process of steps 201 to 203 can be implemented in any manner in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be described in detail.

[0065] In summary, by performing format conversion on the business message to be processed according to the business source, the converted business message is obtained; by performing format conversion according to the business source, the decoupling of the business source and message processing is achieved, so that it can adapt to a variety of message channels, improve the flexibility of business message processing, adopt the target message processing link to process the converted business message, and improve the accuracy and efficiency of message processing.

[0066] In order to clearly explain how to obtain the service source of the service message to be processed in the above embodiment, the present disclosure proposes another message processing method.

[0067] Figure 3 It is a flow chart of a message processing method shown in the third embodiment of the present disclosure. It should be noted that the embodiment of the present disclosure is applied to a clearing message platform.

[0068] like Figure 3 As shown, the message processing method includes the following steps:

[0069] Step 301: Receive a target service request.

[0070] In order to accurately determine the service source of the service message to be processed, as an example, a target service request is received, wherein the target service request is a message request carrying an incoming message or an outgoing message.

[0071] Step 302: parse the target service request to obtain the service message to be processed carried in the target service request.

[0072] Furthermore, as an example, the format of the target business request is parsed to read the request header, request body, query parameters and other parts from the target business request, thereby obtaining the business message to be processed from the request body, and the business message to be processed includes: business data in form format or business data in JSON format, etc.

[0073] Step 303: parse the service message to be processed to obtain the service source of the service message to be processed.

[0074] As an example, the business message to be processed is parsed to determine the format and structure of the business message to be processed, and based on the format and structure of the business message to be processed, each field in the message is identified and extracted from the business message to be processed, and then each field is parsed to obtain the business source of the business message to be processed.

[0075] Step 304: Select an initial message processing link that matches the service source from multiple candidate message processing links.

[0076] Among them, each processing node in the initial message processing link is generated according to the common processing logic for processing the service message to be processed.

[0077] Step 305: Generate a target message processing link according to the initial message processing link.

[0078] Step 306: Process the service message to be processed according to the target message processing link.

[0079] It should be noted that the execution process of steps 304 to 306 can be implemented in any manner in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be described in detail.

[0080] In summary, by receiving and parsing the target business request, the business message to be processed can be accurately obtained, and by further parsing the message, the business source of the business message to be processed can be effectively determined. Therefore, based on the business source of the business message to be processed, the business message to be processed can be accurately processed.

[0081] In order to clearly explain how to generate a target message processing link according to the initial message processing link in the above embodiment, the present disclosure proposes another message processing method.

[0082] Figure 4 It is a flow chart of a message processing method shown in the fourth embodiment of the present disclosure. It should be noted that the embodiment of the present disclosure is applied to a clearing message platform.

[0083] like Figure 4 As shown, the message processing method includes the following steps:

[0084] Step 401, obtaining the service source of the service message to be processed.

[0085] Step 402: Select an initial message processing link that matches the service source from multiple candidate message processing links.

[0086] Among them, each processing node in the initial message processing link is generated according to the common processing logic for processing the service message to be processed.

[0087] Step 403: for any processing node in the initial message processing link, if any processing node does not satisfy the specified processing logic, obtain the template method in the parent class associated with any processing node.

[0088] It should be understood that each processing node in the initial message processing link is generated based on the common processing logic for processing the business message to be processed. Therefore, as an example, the common processing logic indicated by each processing node can be implemented through the template method in the corresponding parent class, that is, the template method includes processing steps for implementing the common processing logic.

[0089] Step 404 , in response to the method update operation, the template method in the subclass that inherits the parent class in any processing node is updated to obtain an updated template method.

[0090] In order to reduce the amount of code maintenance and realize personalized processing of business messages to be processed, as an example, for any processing node in the initial message processing link, if any processing node does not meet the specified processing logic, in response to the method update operation, the template method in the subclass inheriting the parent class in any processing node is updated, such as updating the logic, parameter list or return type in the template method.

[0091] Step 405: Generate a target message processing link according to the processing node including the updated template method and other processing nodes in the initial message processing link.

[0092] Among them, the remaining processing nodes are processing nodes in the initial message processing link that do not include the updated template method.

[0093] Furthermore, based on the processing nodes in the initial message processing link that include the updated template method and the processing nodes in the initial message processing link that do not include the updated template method, a target message processing link is generated.

[0094] Step 406: Process the service message to be processed according to the target message processing link.

[0095] It should be noted that the execution process of steps 401 to 402 and step 406 can be implemented in any manner in the embodiments of the present disclosure, and the embodiments of the present disclosure do not limit this and will not be described in detail.

[0096] In summary, for any processing node in the initial message processing link, when any processing node does not meet the specified processing logic, the template method in the parent class associated with any processing node is obtained; in response to the method update operation, the template method in the subclass inheriting the parent class in any processing node is updated to obtain the updated template method; according to the processing node including the updated template method and the remaining processing nodes in the initial message processing link, the target message processing link is generated, thereby, by flexibly adjusting the message processing logic, different processing requirements are adapted to meet the personalized needs of users.

[0097] In the embodiment of the present disclosure, before selecting an initial message processing link that matches a service source from multiple candidate message processing links, multiple candidate message processing links need to be generated. As an example, multiple candidate message processing links are generated according to the processing logic of reference service messages under multiple service sources. Figure 5 Provide detailed explanation.

[0098] Figure 5 It is a flowchart of a message processing method shown in the fifth embodiment of the present disclosure. It should be noted that the embodiment of the present disclosure is applied to a clearing message platform.

[0099] like Figure 5 As shown, based on any of the above embodiments, the multiple candidate message processing links can be generated by using the following steps:

[0100] Step 501: Obtain reference service messages from multiple service sources.

[0101] As one example, reference business messages from multiple business sources are obtained from a message database; as another example, logs of a clearing message platform are parsed to obtain historical business messages from multiple business sources in the logs, and the historical business messages are used as reference business messages.

[0102] Step 502: for any service source, convert the format of the reference service message under any service source to obtain a converted reference service message.

[0103] In order to adapt to business messages from multiple channels, the reference business messages from any business source are format converted to convert the business messages from the original format into a unified or standard format for unified processing and analysis, wherein the messages in the unified or standard format are used as reference business messages after conversion.

[0104] Step 503: Obtain the processing logic of the converted reference service message under any service source.

[0105] In order to effectively obtain the processing logic of the converted reference business message under any business source, as an example, the processing logic of the converted reference business message under any business source is pre-configured; as another example, the historical processing logic of the reference business message is obtained, and the historical processing logic of the reference business message or the adjusted historical processing logic is used as the processing logic of the converted reference business message.

[0106] Step 504: Generate candidate message processing links matching each service source according to the processing logic of the converted reference service message under each service source.

[0107] In order to improve the flexibility and maintainability of service message processing, as a possible implementation method, based on the common processing logic of the converted reference service messages under each service source, a candidate message processing link matching each service source is generated.

[0108] As an example, based on the processing logic of the converted reference business messages under each business source, the common processing logic of the reference business messages under each business source is determined; based on the common processing logic of the reference business messages under each business source, multiple processing nodes matching each business source are generated; based on the multiple processing nodes matching each business source, candidate message processing links matching each business source are generated.

[0109] That is to say, in order to achieve the optimization and reuse of processing logic, the common processing logic between them is determined based on the converted reference business messages under each business source; secondly, based on these common processing logics, multiple processing nodes matching each business source are generated; finally, based on the multiple processing nodes matching each business source, candidate message processing links matching each business source are constructed, so that the processing nodes are connected in series according to the business logic to form a complete message processing flow to meet the message processing requirements of different business sources.

[0110] In summary, by acquiring and converting reference business messages from a variety of business sources, we can adapt to the message formats of different business sources and enhance the flexibility of message processing. For each business source, we obtain the processing logic of the converted reference business messages. According to the processing logic of the converted reference business messages from each business source, we effectively generate candidate message processing links that match each business source, thereby achieving the correct business rules during the message processing process and improving the accuracy and efficiency of message processing.

[0111] In order to clearly illustrate the above embodiment, it is now described in conjunction with the following embodiments.

[0112] In the embodiment of the present disclosure, a message processing method is implemented based on a clearing message platform, wherein: Figure 6 As shown, Figure 6 The logical function structure diagram of the clearing message platform provided in the embodiment of the present disclosure, the core parts of the clearing message platform are "incoming message logic processing" and "outgoing message logic processing", the clearing message platform needs to perform message storage, message verification, message landing, message parsing, volume management, message sorting, message authority check, message signing, message verification and message sending, clearing processing and clearing processing for the received messages. The clearing message platform is divided into five modules based on its functions, namely "payment gateway", "front-end service", "message sending and receiving service", "clearing service" and "clearing service", among which,

[0113] Payment Gateway: used to communicate with various channels, receive messages from various channels or send messages from different channels. It mainly realizes interface adaptation of different channels.

[0114] Front-end services are used to perform common logic processing such as message storage, message verification, message landing, message analysis, message permission check, message signing, and message verification during the process of incoming and outgoing messages;

[0115] Message sending and receiving service: used for message storage, message verification, message landing, message analysis, volume management, message sorting and other common logic processing during the message sending and receiving process;

[0116] Clearing service: used to store messages and generate clearing entry logic during the process of incoming and outgoing reporting;

[0117] Clearing service: mainly performs data clearing logic processing on the message during the reporting process to complete the business system;

[0118] It should be noted that the "incoming report logic processing" and "outgoing report processing logic" use the responsibility chain pattern in the above five modules (wherein the responsibility chain pattern is a behavioral design pattern that allows requests to be sent along the message processing link). After receiving the request, each processor can process the request or pass it to the next processor in the chain to assemble it as required, thus forming a complete data processing chain. Among them, the message processing link corresponding to the "incoming report logic processing" is as follows Figure 7 As shown in the figure, the message processing link corresponding to the "message logic processing" is as follows Figure 8 shown.

[0119] In addition, it should be noted that Fig. 9 As shown in the figure, the logic for processing incoming and outgoing messages is abstracted and defined using the template method pattern. The template method design pattern is a software design pattern that defines the steps of an algorithm and allows subclasses to provide specific implementations for certain steps. In the template method pattern, the parent class defines a template method, which contains the skeleton of the algorithm and some basic steps, while some steps are declared as abstract methods or protected virtual methods, which are implemented by subclasses. In this way, subclasses can rewrite and customize certain steps in the algorithm without changing the overall structure of the algorithm. This pattern ensures that all subclasses share the same algorithm template, thereby maintaining code consistency. At the same time, subclasses are allowed to rewrite specific steps as needed, which increases the flexibility and scalability of the algorithm.

[0120] Corresponding to the message processing method provided in the above-mentioned embodiment, the present disclosure also provides a message processing device. Since the message processing device provided in the embodiment of the present disclosure corresponds to the message processing method provided in the above-mentioned embodiment, the implementation method of the message processing method is also applicable to the message processing device provided in the embodiment of the present disclosure, and will not be described in detail in the embodiment of the present disclosure.

[0121] Fig.10 It is a structural diagram of a message processing device shown in the sixth embodiment of the present disclosure.

[0122] like Fig.10 As shown, the message processing device 1000 includes: an acquisition module 1010, a selection module 1020, a generation module 1030 and a processing module 1040.

[0123] Among them, the acquisition module 1010 is used to obtain the business source of the business message to be processed; the selection module 1020 is used to select an initial message processing link that matches the business source from multiple candidate message processing links; wherein each processing node in the initial message processing link is generated according to the common processing logic for processing the business message to be processed; the generation module 1030 is used to generate a target message processing link according to the initial message processing link; the processing module 1040 is used to process the business message to be processed according to the target message processing link.

[0124] As a possible implementation of the embodiment of the present disclosure, the processing module 1040 is used to convert the format of the service message to be processed according to the service source to obtain the converted service message; and use the target message processing link to process the converted service message.

[0125] As a possible implementation method of the embodiment of the present disclosure, the processing module 1040 is used to obtain multiple candidate conversion logics; obtain the target conversion logic that matches the business source from the multiple candidate conversion logics; and use the target conversion logic to perform format conversion on the business message to be processed to obtain a converted business message.

[0126] As a possible implementation method of the embodiment of the present disclosure, the processing module 1040 is used to obtain, for each current processing node in the message processing link to be processed, the processing result of the converted business message at the previous processing node of the current task node; obtain the processing parameters associated with the current processing node according to the business source; and use the current processing node to process the converted business message based on the processing result of the previous processing node and the processing parameters associated with the current processing node to obtain the processing result of the converted business message at the current processing node.

[0127] As a possible implementation method of the embodiment of the present disclosure, the acquisition module 1010 is used to receive a target business request; parse the target business request to obtain a pending business message carried in the target business request; and parse the pending business message to obtain a business source of the pending business message.

[0128] As a possible implementation method of the embodiment of the present disclosure, the generation module 1030 is used to obtain the template method in the parent class associated with any processing node in the initial message processing link when any processing node does not satisfy the specified processing logic; in response to the method update operation, the template method in the subclass inheriting the parent class in any processing node is updated to obtain the updated template method; based on the processing node including the updated template method and the remaining processing nodes in the initial message processing link, a target message processing link is generated; wherein the remaining processing nodes are the processing nodes in the initial message processing link that do not include the updated template method.

[0129] As a possible implementation manner of the embodiment of the present disclosure, the message processing device 1000 includes: a forwarding module.

[0130] Among them, the forwarding module is used to obtain the processed business message obtained by the target processing link processing the business message to be processed; obtain the business destination of the business message to be processed; according to the business destination, the format of the processed business message is converted to obtain the converted business message to be sent; adopt the channel interface matching the business destination, and forward the business message to be sent according to the business destination.

[0131] As a possible implementation method of the embodiment of the present disclosure, the generation module 1030 is also used to obtain reference business messages from multiple business sources; for any business source, convert the format of the reference business message from any business source to obtain a converted reference business message; obtain the processing logic of the converted reference business message from any business source; and generate candidate message processing links matching each business source based on the processing logic of the converted reference business message from each business source.

[0132] As a possible implementation method of the embodiment of the present disclosure, the generation module 1030 is also used to determine the common processing logic of the reference business messages under each business source according to the processing logic of the converted reference business messages under each business source; generate multiple processing nodes matching each business source according to the common processing logic of the reference business messages under each business source; and generate candidate message processing links matching each business source according to the multiple processing nodes matching each business source.

[0133] The message processing device of the disclosed embodiment first identifies the business source of the business message to be processed, and then selects an initial message processing link that matches the business source from multiple candidate message processing links, thereby ensuring the pertinence and efficiency of message processing. Since each processing node in the initial message processing link is generated based on a common processing logic for processing the business message to be processed, the accuracy and reliability of message processing are improved. Finally, the business message to be processed is processed according to the generated target message processing link, thereby realizing flexible adjustment of the message processing flow according to different business needs and scenarios, improving the flexibility and pertinence of message processing, and thus improving the efficiency and quality of business message processing.

[0134] In an exemplary embodiment, an electronic device is also provided.

[0135] Among them, electronic equipment includes:

[0136] processor;

[0137] a memory for storing processor-executable instructions;

[0138] The processor is configured to execute instructions to implement the message processing method proposed in any of the aforementioned embodiments.

[0139] As an example, Fig.11 is a schematic diagram of the structure of an electronic device 1100 shown in an exemplary embodiment of the present disclosure, such as Fig.11 As shown, the electronic device 1100 may further include:

[0140] The memory 1110 and the processor 1120, the bus 1130 connecting different components (including the memory 1110 and the processor 1120), the memory 1110 stores a computer program, and when the processor 1120 executes the program, the message processing method described in the embodiment of the present disclosure is implemented.

[0141] Bus 1130 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.

[0142] The electronic device 1100 typically includes a variety of electronic device readable media. These media can be any available media that can be accessed by the electronic device 1100, including volatile and non-volatile media, removable and non-removable media.

[0143] The memory 1110 may also include computer system readable media in the form of volatile memory, such as random access memory (RAM) 1140 and / or cache memory 1150. The server 1100 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 1160 may be used to read and write non-removable, non-volatile magnetic media ( Fig.11 not shown, usually called a "hard drive"). Although Fig.11 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, a DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 1130 via one or more data medium interfaces. The memory 1110 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present disclosure.

[0144] A program / utility 1180 having a set (at least one) of program modules 1170 may be stored, for example, in the memory 1110, such program modules 1170 including but not limited to an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 1170 generally perform the functions and / or methods of the embodiments described in the present disclosure.

[0145] The electronic device 1100 may also communicate with one or more external devices 1190 (e.g., keyboard, pointing device, display 1191, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1100, and / or communicate with any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., network card, modem, etc.). Such communication may be performed through an input / output (I / O) interface 1192. In addition, the electronic device 1100 may also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN) and / or public network, such as the Internet) through a network adapter 1193. As shown, the network adapter 1193 communicates with other modules of the electronic device 1100 through a bus 1130. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0146] The processor 1120 executes various functional applications and data processing by running the programs stored in the memory 1110 .

[0147] It should be noted that the implementation process and technical principles of the electronic device of this embodiment refer to the aforementioned explanation of the message processing method of the embodiment of the present disclosure, and will not be repeated here.

[0148] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory including instructions, and the above instructions can be executed by a processor of an electronic device to complete the message processing method proposed in any of the above embodiments. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0149] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the message processing method proposed in any of the above embodiments is implemented.

[0150] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0151] It should be understood that the present disclosure is not limited to the exact 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 disclosure is limited only by the appended claims.

Claims

1. A message processing method, characterized in that: The method comprises: Obtain the business source of the business message to be processed; Selecting an initial message processing link that matches the service source from a plurality of candidate message processing links; wherein each processing node in the initial message processing link is generated according to a common processing logic for processing the service message to be processed; Generating a target message processing link according to the initial message processing link; The service message to be processed is processed according to the target message processing link.

2. The method according to claim 1, characterized in that: The processing of the service message to be processed according to the target message processing link includes: According to the service source, format conversion is performed on the service message to be processed to obtain a converted service message; The target message processing link is used to process the converted service message.

3. The method according to claim 2, characterized in that The step of converting the format of the service message to be processed according to the service source to obtain a converted service message includes: Get multiple candidate conversion logics; Acquire a target conversion logic matching the business source from the multiple candidate conversion logics; The target conversion logic is used to perform format conversion on the service message to be processed to obtain a converted service message.

4. The method according to claim 2, characterized in that: The adopting the target message processing link to process the converted service message includes: For each current processing node in the to-be-processed message processing link, obtaining a processing result of the converted service message at a previous processing node of the current task node; According to the service source, obtaining a processing parameter associated with the current processing node; The converted service message is processed by the current processing node based on the processing result of the previous processing node and the processing parameters associated with the current processing node to obtain the processing result of the converted service message at the current processing node.

5. The method according to claim 1, characterized in that The business source of obtaining the business message to be processed includes: receiving a target service request; Parsing the target service request to obtain a service message to be processed carried in the target service request; The service message to be processed is parsed to obtain the service source of the service message to be processed.

6. The method according to claim 1, characterized in that The step of generating a target message processing link according to the initial message processing link includes: For any processing node in the initial message processing link, if any processing node does not satisfy the specified processing logic, obtain a template method in a parent class associated with any processing node; In response to the method update operation, updating the template method in the subclass that inherits the parent class in any one of the processing nodes to obtain an updated template method; The target message processing link is generated according to the processing nodes including the updated template method and the remaining processing nodes in the initial message processing link; wherein the remaining processing nodes are the processing nodes in the initial message processing link that do not include the updated template method.

7. The method according to claim 1, characterized in that The method further comprises: Acquire a processed service message obtained by the target processing link processing the service message to be processed; Obtaining the business destination of the business message to be processed; According to the service destination, format conversion is performed on the processed service message to obtain a converted service message to be sent; Adopting a channel interface matching the service destination, the service message to be sent is forwarded according to the service destination.

8. The method according to claim 1, characterized in that The method further comprises: Obtain reference business messages from multiple business sources; For any service source, performing format conversion on a reference service message under any service source to obtain a converted reference service message; Obtaining the processing logic of the converted reference service message under any of the service sources; According to the processing logic of the converted reference service message under each of the service sources, a candidate message processing link matching each of the service sources is generated.

9. The method according to claim 8, characterized in that The generating of candidate message processing links matching each of the service sources according to the processing logic of the converted reference service messages under each of the service sources comprises: Determine the common processing logic of the reference service messages under each of the service sources according to the processing logic of the converted reference service messages under each of the service sources; Generate multiple processing nodes matching each of the service sources according to the common processing logic of the reference service messages under each of the service sources; According to the multiple processing nodes matching the respective service sources, candidate message processing links matching the respective service sources are generated.

10. A message processing device, characterized in that: The device comprises: An acquisition module, used to acquire the business source of the business message to be processed; A selection module, used to select an initial message processing link matching the service source from a plurality of candidate message processing links; wherein each processing node in the initial message processing link is generated according to a common processing logic for processing the service message to be processed; A generating module, used for generating a target message processing link according to the initial message processing link; A processing module is used to process the service message to be processed according to the target message processing link.