Message processing method, device, equipment, medium and program product

By judging the module type and deployment platform of the message sending service unit in a multi-platform system, the message topic is processed to realize targeted sending, which solves the problem of complex message interaction between cross-platform business modules, improves work efficiency and reduces the risk of errors.

CN115695342BActive Publication Date: 2025-04-08CHINA CONSTRUCTION BANK
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211322079.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-26
Publication Date
2025-04-08
Estimated Expiration
2042-10-26

AI Technical Summary

Technical Problem

In multi-platform systems, the message interaction logic between cross-platform business modules is complex, and it is difficult for the prior art to implement a message interaction method that is not prone to errors.

Method used

By obtaining the module type identification of the service unit to be sent, it is determined whether it belongs to a cross-platform service module, and processing the message topic according to its deployment platform, and determining the target message queue to realize targeted sending.

Benefits of technology

It realizes message interaction between cross-platform business modules, reduces the workload of code layer modification, avoids error problems, and improves work efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695342B_ABST
    Figure CN115695342B_ABST
Patent Text Reader

Abstract

The present disclosure provides a message processing method, device, equipment, medium and program product, which relates to the field of data processing technology. The message processing method is applied to a multi-platform system, which includes multiple business modules and multiple platforms, and the multiple business modules include a cross-platform business module. The message processing method includes: obtaining a first message to be sent; obtaining a business unit that generates the first message to be sent and determining whether the business unit belongs to a cross-platform business module; performing a first processing on the subject of the first message to be sent to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches a first target queue, and the first target queue includes: a message queue in multiple preset message queues that matches the platform of the business unit that generates the first message to be sent; for at least one second message to be sent, sending the message according to the subject of the second message to be sent.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In a multi-platform system, in order to reduce the risks of releasing new functions or using new technologies, multi-track operation is often required. For example, a business module is split into two parts and deployed on two platforms, while providing services to the outside world to achieve dual-track operation.

[0003] In a dual-track multi-platform system, compared with a single-platform system, the difficulty of message interaction increases significantly due to the existence of cross-platform business modules. For example, in a single-platform system, for business module A and business module B, the message generated by message module A is consumed by business module B, and the message generated by business module B is consumed by message module A, and the interaction logic is relatively simple. However, in a dual-track multi-platform system, business module A and business module B are split into multiple parts. Some of these parts hope to interact with each other through messages, while others hope to isolate messages from each other. This leads to complex message interaction logic and greatly increased interaction difficulty.

[0004] In one example, in order to realize message interaction between multiple modules, the business module can be modified at the code level, and the messages generated by the modified business module can be forwarded according to the predetermined logic for consumption by the corresponding objects. However, the modification of the code level is cumbersome and prone to omissions, resulting in frequent errors. Therefore, how to provide a non-error-prone way to realize message interaction between multiple business modules in a multi-platform system has become a technical problem that needs to be solved urgently. Summary of the invention

[0005] In view of the above problems, the present disclosure provides a message processing method, device, electronic device, storage medium and program product.

[0006] According to a first aspect of the present disclosure, a message processing method is provided, which is applied to a multi-platform system, wherein the multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, and different business units are deployed on different platforms, and the message processing method includes:

[0007] Acquire a first message to be sent, where the first message to be sent includes a message generated by at least one business unit according to at least one transaction;

[0008] Obtaining a module type identifier of a service unit that generates the first message to be sent, and determining whether the service unit belongs to a cross-platform service module according to the module type identifier;

[0009] When the business unit generating the first message to be sent belongs to the cross-platform business module, a first processing is performed on the subject of the first message to be sent according to the platform on which the business unit generating the first message to be sent is deployed, so as to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches a first target queue, and the first target queue includes: a message queue that matches the platform on which the business unit generating the first message to be sent is deployed, among a plurality of preset message queues;

[0010] For at least one of the second messages to be sent, sending the message according to the subject of the second message to be sent;

[0011] Each of the business units is configured with consumption group configuration information. For at least one of the business units in the cross-platform business module, the consumption group configuration information is configured to enable the business unit to consume messages from a message queue that matches the platform on which it is deployed.

[0012] According to an embodiment of the present disclosure, the plurality of platforms include a first platform and a second platform, and each of the cross-platform business modules includes a first business unit deployed in the first platform and a second business unit deployed in the second platform;

[0013] When the business unit that generates the first message to be sent is the first business unit, the first target queue includes a message queue subscribed to by each of the first business units, and the topic matching the first target queue includes a first preset topic; performing a first processing on the topic of the first message to be sent to obtain at least one second message to be sent includes:

[0014] The subject of the first message to be sent is modified to the first preset subject to obtain the second message to be sent.

[0015] According to an embodiment of the present disclosure, when the business unit that generates the first message to be sent is the second business unit, the first target queue includes a message queue subscribed to by each of the second business units, and the topic matching the first target queue includes the topic of the first message to be sent itself; the first processing of the topic of the first message to be sent to obtain at least one second message to be sent includes:

[0016] The subject of the first message to be sent is retained to obtain the second message to be sent.

[0017] According to an embodiment of the present disclosure, the step of modifying the subject of the first message to be sent to the first preset subject includes:

[0018] Adding a first suffix to the subject of the first message to be sent;

[0019] The first preset theme is the theme with the first suffix added; or,

[0020] Performing hash mapping on the subject of the first message to be sent;

[0021] The mapping result is used as the first preset topic.

[0022] According to an embodiment of the present disclosure, the plurality of platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform;

[0023] When the business unit generating the first message to be sent is a first business unit, the first target queue includes a message queue subscribed to by each of the first business units, and the subject matching the first target queue includes a first preset subject; performing a first processing on the subject of the first message to be sent to obtain at least one second message to be sent includes:

[0024] A fourth message to be sent and a fifth message to be sent are generated according to the first message to be sent, the subject of one of them is modified to the first preset subject, and the subject of the other is retained, so as to obtain a plurality of the second messages to be sent.

[0025] According to an embodiment of the present disclosure, when the business unit that generates the first message to be sent is a second business unit, the first target queue includes a message queue subscribed by each of the second business units, and the topic matching the first target queue includes a second preset topic; the first processing of the topic of the first message to be sent to obtain at least one second message to be sent includes:

[0026] Generate a sixth message to be sent and a seventh message to be sent according to the first message to be sent, modify the subject of one of them to the second preset subject, and retain the subject of the other, so as to obtain a plurality of the second messages to be sent;

[0027] The first preset theme and the second preset theme are different in at least some fields.

[0028] According to an embodiment of the present disclosure, the plurality of service modules further include a single platform service module, and the message processing method further includes:

[0029] When the business unit generating the first message to be sent belongs to a single-platform business module, the first message to be sent is subjected to a second processing to obtain a third message to be sent; wherein the subject of the third message to be sent matches a second target queue, and the second target queue includes: a message queue among a plurality of preset message queues that matches one of the plurality of platforms whose visit volume meets a preset condition;

[0030] Among them, for at least one of the business units in the single-platform business module, its consumption group configuration information is configured to enable the business unit to consume messages from at least a message queue that matches the platform whose access volume meets a preset condition.

[0031] According to an embodiment of the present disclosure, the plurality of platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform;

[0032] When one of the multiple platforms whose visits satisfy the preset condition includes the first platform, the second target queue includes a message queue subscribed by each of the first business units, and the topic matching the second target queue includes a first preset topic; performing a second processing on the first message to be sent to obtain a third message to be sent includes:

[0033] Modify the subject of the first message to be sent to the first preset subject to obtain the third message to be sent;

[0034] When one of the multiple platforms whose visit volume meets the preset condition includes the second platform, the second target queue includes a message queue subscribed by each of the second business units, and the topic matching the second target queue includes the topic of the first message to be sent itself; performing a second processing on the first message to be sent to obtain a third message to be sent includes:

[0035] The subject of the first message to be sent is retained to obtain the third message to be sent.

[0036] According to an embodiment of the present disclosure, the multiple platforms include a first platform and a second platform, and the determining the platform deployed by the business unit generating the first message to be sent includes:

[0037] When the information in the designated field of the first message to be sent exists in a preset whitelist, it is determined that the platform deployed by the business unit generating the first message to be sent includes the first platform.

[0038] According to an embodiment of the present disclosure, the plurality of platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform;

[0039] The consumer group configuration information of the first business unit and the second business unit includes at least one message queue subscribed by each, and the message queue subscribed by the first business unit is different from the message queue subscribed by the second business unit.

[0040] According to an embodiment of the present disclosure, the single-platform service module is deployed on one of the multiple platforms whose visit volume meets a preset condition;

[0041] The consumer group configuration information of the business unit of the single-platform business module includes a message queue subscribed by the business unit, and the message queue subscribed by the business unit includes a message queue subscribed by each of the first business unit and the second business unit.

[0042] A second aspect of the present disclosure provides a message processing device, which is applied to a multi-platform system, wherein the multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, and different business units are deployed on different platforms, and the message processing device includes:

[0043] A first acquisition module, configured to acquire a first message to be sent, wherein the first message to be sent includes a message generated by at least one business unit according to at least one transaction;

[0044] A first processing module, used for obtaining a module type identifier of a business unit that generates the first message to be sent, and determining whether the business unit belongs to a cross-platform business module according to the module type identifier;

[0045] a second processing module, configured to, when the business unit generating the first message to be sent belongs to the cross-platform business module, perform a first processing on the subject of the first message to be sent according to the platform on which the business unit generating the first message to be sent is deployed, so as to obtain at least one second message to be sent, wherein the subject of at least one of the second messages to be sent matches a first target queue, and the first target queue includes: a message queue that matches the platform on which the business unit generating the first message to be sent is deployed, among a plurality of preset message queues;

[0046] A third processing module is used to send at least one of the second messages to be sent according to the subject of the second message to be sent.

[0047] Each of the business units is configured with consumption group configuration information. For at least one of the business units in the cross-platform business module, the consumption group configuration information is configured to enable the business unit to consume messages from a message queue that matches the platform on which it is deployed.

[0048] The third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned message processing method.

[0049] The fourth aspect of the present disclosure further provides a computer-readable storage medium having executable instructions stored thereon, which, when executed by a processor, causes the processor to execute the above-mentioned message processing method.

[0050] The fifth aspect of the present disclosure also provides a computer program product, including a computer program, which implements the above-mentioned message processing method when executed by a processor.

[0051] One or more of the above embodiments have the following advantages or beneficial effects:

[0052] By adopting the message processing method of the embodiment of the present invention, for multiple cross-platform business modules, the message processing method of the embodiment of the present invention can enable the business units deployed in the same platform to send messages to the same message queue. In this way, when the business units deployed in the same platform consume messages from the same message queue, and the business units deployed in different platforms consume messages from different message queues, message interaction can be carried out between the business units deployed in the same platform, thereby solving the message interaction problem between cross-platform modules in the multi-platform business system.

[0053] More importantly, the message processing method of the disclosed embodiment realizes the targeted sending of messages by actively adjusting the subject of the first message to be sent according to whether the business unit that generates the first message to be sent belongs to a cross-platform module and the platform on which the business unit is deployed. This function can be achieved by modifying the framework layer of the multi-platform system. There is no need to modify the code layer for existing business modules and new business modules, which greatly reduces the workload. At the same time, it avoids problems such as errors caused by modifications to the code layer, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The above contents and other purposes, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:

[0055] Figure 1The application scenario diagram schematically shows the message processing method, device, electronic device, storage medium and program product according to the embodiments of the present disclosure;

[0056] Figure 2 One of the flowcharts of the message processing method according to an embodiment of the present disclosure is schematically shown;

[0057] Figure 3 and Figure 4 A flowchart of modifying the subject of a first message to be sent to a first preset subject according to an embodiment of the present disclosure is schematically shown;

[0058] Figure 5 The second flowchart of message processing according to an embodiment of the present disclosure is schematically shown;

[0059] Figure 6 Schematically shows a flow chart of determining a service module and a platform involved in a first message to be sent according to an embodiment of the present disclosure;

[0060] Figure 7 The structure block diagram of the message processing device according to the embodiment of the present disclosure is schematically shown;

[0061] Figure 8 A block diagram of an electronic device suitable for implementing a message processing method according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION

[0062] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.

[0063] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.

[0064] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification, and should not be interpreted in an idealized or overly rigid manner.

[0065] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).

[0066] It should be noted that the message processing method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure relate to the field of data processing technology. The message processing method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure can be applied to the financial field or any field other than the financial field. For example, the message processing method, device, electronic device, storage medium and program product provided by the embodiments of the present disclosure can be applied to the data processing business under the multi-platform parallel system in the financial field. The present disclosure does not limit the application field of the message processing method, device, electronic device, storage medium and program product.

[0067] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision, disclosure and application of user personal information involved comply with the provisions of relevant laws and regulations, take necessary confidentiality measures, and do not violate public order and good morals.

[0068] An embodiment of the present disclosure provides a message processing method, which is applied to a multi-platform system, wherein the multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, and different business units are deployed on different platforms. The message processing method includes: obtaining a first message to be sent, the first message to be sent including a message generated by at least one business unit according to at least one transaction; obtaining a module type identifier of the business unit that generates the first message to be sent, and determining whether the business unit belongs to a cross-platform business module according to the module type identifier; when the first message to be sent is generated When the business unit that sends the message belongs to a cross-platform business module, the subject of the first message to be sent is first processed according to the platform on which the business unit that generates the first message to be sent is deployed to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches the first target queue, and the first target queue includes: a message queue among multiple preset message queues that matches the platform on which the business unit that generates the first message to be sent is deployed; wherein each business unit is configured with consumer group configuration information, and for at least one business unit in the cross-platform business module, its consumer group configuration information is configured to enable the business unit to consume messages from the message queue that matches the platform on which it is deployed.

[0069] By adopting the message processing method of the embodiment of the present invention, for multiple cross-platform business modules, the message processing method of the embodiment of the present invention can enable the business units deployed in the same platform to send messages to the same message queue. In this way, when the business units deployed in the same platform consume messages from the same message queue, and the business units deployed in different platforms consume messages from different message queues, message interaction can be carried out between the business units deployed in the same platform, thereby solving the message interaction problem between cross-platform modules in the multi-platform business system.

[0070] More importantly, the message processing method of the disclosed embodiment realizes the targeted sending of messages by actively adjusting the subject of the first message to be sent according to whether the business unit that generates the first message to be sent belongs to a cross-platform business module and the platform to which the business unit is deployed. This function can be achieved by modifying the framework layer of the multi-platform system. There is no need to modify the code layer for existing business modules and new business modules, which greatly reduces the workload. At the same time, it avoids problems such as errors caused by modifications to the code layer, thereby improving work efficiency.

[0071] Figure 1 The application scenario diagram of the message processing method, device, electronic device, storage medium and program product according to the embodiments of the present disclosure is schematically shown. Figure 1 As shown, the application scenario 100 according to this embodiment may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for a communication link between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0072] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only examples).

[0073] The terminal devices 101 , 102 , and 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0074] The server 105 may be a server that provides various services, such as a background management server (only an example) that provides support for websites browsed by users using the terminal devices 101, 102, and 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.

[0075] It should be noted that the message processing method provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the message processing device provided in the embodiment of the present disclosure can generally be set in the server 105. The message processing method provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105. Accordingly, the message processing device provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the terminal devices 101, 102, 103 and / or the server 105.

[0076] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0077] The following will be based on Figure 1 The scene described by Figure 2 to Figure 6 The message processing method of the disclosed embodiment is described in detail.

[0078] An embodiment of the present disclosure provides a message processing method, where a multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, and different business units are deployed on different platforms.

[0079] In the embodiments of the present disclosure, a business module may include a module for processing one or more businesses, for example, a deposit business module for processing a deposit business, a transfer business module for processing a transfer business, and a query business module for processing an inquiry business. A cross-platform business module refers to a business module among these business modules that is deployed in multiple platforms at the same time to implement related businesses in multiple platforms respectively. For example, a business module A can be split into a business unit A1 for processing a first type of user and a business unit A2 for processing a second type of user based on the customer dimension. Business unit A1 and business unit A2 are respectively deployed in different platforms, thereby realizing cross-platform deployment of business module A. In this example, business module A can be called a cross-platform business module.

[0080] Figure 2 The following schematically shows one of the flow charts of the message processing method according to an embodiment of the present disclosure. Figure 2 As shown, the message processing method of this embodiment includes steps S210 to S240.

[0081] It should be noted that although Figure 2 The steps in the figure are shown in sequence as indicated by the arrows, but the steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of the steps, and they can be executed in other orders. Moreover, at least some of the steps in the figure may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0082] In step S210, a first message to be sent is obtained, where the first message to be sent includes a message generated by at least one business unit according to at least one transaction.

[0083] In the embodiment of the present disclosure, the first message to be sent may include a business-related message generated by a certain business unit according to a transaction forwarded by the global router. For example, the first message to be sent may include a message related to a business such as deposit, transfer or inquiry.

[0084] Optionally, a new message forwarding interface can be configured in the multi-platform system, and the message forwarding strategy can be changed. For example, the message forwarding implementation class can be redefined based on the new implementation class in the ncis-comm-N module, so that the messages originally produced by a producer can only be consumed by designated consumers, and the messages produced by the producer are changed to be forwarded to the target message queue by the message forwarding interface and consumed by consumers who subscribe to the message queue.

[0085] In step S220, the module type identifier of the service unit generating the first message to be sent is obtained, and it is determined whether the service unit belongs to a cross-platform service module according to the module type identifier.

[0086] In the disclosed embodiment, the business module may include at least one business unit. As mentioned above, for a cross-platform business module, it includes multiple business units, and the multiple business units are respectively deployed in different platforms. The business unit that generates the first message to be sent can also consume the first message to be sent generated by other business units.

[0087] Optionally, the designated field of the first message to be sent may include a module type identifier used to characterize whether the business unit belongs to a cross-platform business module. The module type representation can be configured in the configuration information of the business unit when the business unit is deployed on the corresponding platform, so that when the business unit generates the first message to be sent, it can carry the module type identifier.

[0088] In the disclosed embodiment, in addition to the above-mentioned cross-platform business module, the multiple business modules may also include other types of business modules, such as a single-platform business module. The details of the single-platform business module will be described below, so it will not be repeated here. The logic of consuming messages of these business modules is different from that of the cross-platform business module. Therefore, when the business unit generating the first message to be sent belongs to a different business module, it is necessary to configure different message sending strategies to ensure that both can consume messages normally. In addition, for the cross-platform business module, the first message to be sent produced by a certain business unit is expected to be consumed by the business unit belonging to the same platform as the business unit (these business units may belong to other cross-platform business modules). Therefore, when the business unit generating the first message to be sent is deployed on different platforms, it is also necessary to configure different message sending strategies. For example, the cross-platform business module A and the cross-platform business module B both include multiple business units, the multiple business units of the cross-platform business module A include the first business unit A1 and the second business unit A2, and the multiple business units of the cross-platform business module B include the first business unit B1 and the second business unit B2. The multiple platforms include the first platform X1 and the second platform X2. The first business unit A1 and the first business unit B1 are deployed on the first platform X1, and the second business unit A2 and the second business unit B2 are deployed on the second platform X2. The first message to be sent generated by the first business unit A1 (or the first business unit B1) is expected to be consumed by the first business unit B1 (or the first business unit A1), and the first message to be sent generated by the second business unit A2 (or the second business unit B2) is expected to be consumed by the second business unit B2 (or the second business unit A2).

[0089] Therefore, in step S220, it is necessary to first identify whether the business unit that generates the first message to be sent belongs to the cross-platform business module and the platform on which the business unit is deployed, and then determine the message sending strategy based on whether the business unit that generates the first message to be sent belongs to the cross-platform business module and the platform on which the business unit is deployed.

[0090] Specifically, in step S230, when the business unit that generates the first message to be sent belongs to a cross-platform business module, the subject of the first message to be sent is first processed according to the platform on which the business unit that generates the first message to be sent is deployed to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches the first target queue, and the first target queue includes: a message queue that matches the platform on which the business unit that generates the first message to be sent is deployed among multiple preset message queues. When the business unit that generates the first message to be sent does not belong to a cross-platform business module, other logic will be used to process the subject of the first message to be sent, and the specific scheme will be described in detail below, so it will not be repeated here.

[0091] In the disclosed embodiment, when the business unit that generates the first message to be sent belongs to a cross-platform business module, it is necessary to determine on which platform the business unit that generates the first message to be sent is deployed, that is, which platform the business unit that generates and / or consumes the first message to be sent belongs to. Then, according to the platform of the business unit that generates the first message to be sent, the subject of the first message to be sent is first processed.

[0092] Each business unit is configured with consumer group configuration information. For at least one business unit in the cross-platform business module, its consumer group configuration information is configured to enable the business unit to consume messages from the message queue that matches the platform on which it is deployed.

[0093] In the disclosed embodiment, for multiple cross-platform business modules, business units deployed in the same platform can consume messages from the same message queue. For example, for the first business unit A1 and the first business unit B1 deployed in the first platform X1 and the second business unit A2 and the second business unit B2 deployed in the second platform X2, the first business unit A1 and the first business unit B1 both consume messages from the message queue M1, and the second business unit A2 and the second business unit B2 both consume messages from the message queue M2.

[0094] In the embodiment of the present disclosure, the message queue matching the platform of the business unit generating the first message to be sent may include: a message queue to which each business unit deployed in the platform subscribes.

[0095] In the embodiment of the present disclosure, topics are set in one-to-one correspondence with message queues. When sending messages, each message will be sent to the message queue corresponding to its topic. The topic that matches the first target queue may include the topic set corresponding to the first target queue. Optionally, the first processing can be performed by adjusting the topic. For example, the topic set corresponding to the message queue M1 is set to N1, and the topic set corresponding to the message queue M2 is set to N2. When the message queue M1 is the first target queue, the topic of the first message to be sent is adjusted to N1. When the message queue M2 is the first target queue, the topic of the first message to be sent is adjusted to N2. It should be noted that N1 and N2 here are only to indicate that the two topics are different, and N1 and N2 do not represent the actual content of the two topics.

[0096] In step S240, for at least one second message to be sent, the message is sent according to the subject of the second message to be sent.

[0097] In an embodiment of the present disclosure, when the subject of the second message to be sent is N1, the second message to be sent can be sent to the message queue M1; when the subject of the second message to be sent is N2, the second message to be sent can be sent to the message queue M2, so that the business units subscribing to these message queues can consume from them.

[0098] For example, for the first message to be sent generated by the first business unit A1 (or the first business unit B1), after the above process, it will be processed into the second message to be sent and sent to the message queue M1, so that the first business unit B1 (or the first business unit A1) subscribed to the message queue M1 consumes the message. Correspondingly, for the first message to be sent generated by the second business unit A2 (or the second business unit B2), after the above process, it will be processed into the second message to be sent and sent to the message queue M2, so that the second business unit B2 (or the second business unit A2) subscribed to the message queue M2 consumes the message.

[0099] By adopting the message processing method of the embodiment of the present invention, for multiple cross-platform business modules, the message processing method of the embodiment of the present invention can enable the business units deployed in the same platform to send messages to the same message queue. In this way, when the business units deployed in the same platform consume messages from the same message queue, and the business units deployed in different platforms consume messages from different message queues, message interaction can be carried out between the business units deployed in the same platform, thereby solving the message interaction problem between cross-platform modules in the multi-platform business system.

[0100] More importantly, the message processing method of the embodiment of the present invention can realize the targeted sending of messages by actively adjusting the subject of the first message to be sent according to whether the business unit that generates the first message to be sent belongs to a cross-platform business module and the platform to which the business unit belongs. This function can be achieved by modifying the framework layer of the multi-platform system. There is no need to modify the code layer for existing business modules and new business modules, which greatly reduces the workload. At the same time, it avoids problems such as errors caused by modifications to the code layer, thereby improving work efficiency.

[0101] It should be noted that, when performing the first processing, the embodiment of the present disclosure only changes the subject and does not modify other contents of the first message to be sent. Therefore, except for the possible difference in the subject of the first message to be sent and the second message to be sent (they may also be the same, which will be described in detail below and will not be repeated here), the other contents are roughly the same.

[0102] It should also be noted that in the embodiment of the present disclosure, the cross-platform business module is divided into multiple business units based on the customer dimension. In the same cross-platform business module, the data structure of the first message to be sent generated by multiple business units is roughly the same.

[0103] The following will be combined Figures 2 to 6 The message processing method of the embodiment of the present disclosure is further explained.

[0104] In the embodiment of the present disclosure, processing the first message to be sent into the second message to be sent may include at least two ways (hereinafter referred to as the first way and the second way). In the first way, after the first processing is performed, a second message to be sent is generated. In the second way, after the first processing is performed, multiple second messages to be sent are generated. The message processing method of the embodiment of the present disclosure is first described below by taking the first way as an example.

[0105] In some specific embodiments, the multiple platforms include a first platform and a second platform, and each cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform.

[0106] In the disclosed embodiment, the multi-platform system can be applied to the business scenario in the financial field where the business is transitioning from the original mainframe platform to the domestic distributed platform. In this business scenario, the first platform may include a domestic distributed platform, and the second platform may include a mainframe (i.e., an IBM mainframe) platform. The first business unit and the second business unit provide business functions to users in their respective platforms to ensure a smooth business transition.

[0107] In some specific embodiments, the consumer group configuration information of the first business unit and the second business unit includes at least one message queue to which each subscribes, and the message queue to which the first business unit subscribes is different from the message queue to which the second business unit subscribes. In this way, message interaction can be achieved between business units deployed on the same platform.

[0108] In the embodiment of the present disclosure, the number of preset message queues may be the same as the number of platforms. For example, the preset message queues include message queue M1 and message queue M2. The first business unit A1 and the first business unit B1 deployed in the first platform X1 both subscribe to the message queue M1 to consume messages from the message queue M1. The second business unit A2 and the second business unit B2 deployed in the second platform X2 both subscribe to the message queue M2 to consume messages from the message queue M2.

[0109] When the business unit generating the first message to be sent is the first business unit, the first target queue includes a message queue subscribed by each first business unit, and the topic matching the first target queue includes a first preset topic, and step S230 includes step S231.

[0110] In step S231, the subject of the first message to be sent is modified to a first preset subject to obtain a second message to be sent.

[0111] For example, when the business unit that generates the first message to be sent is deployed on the first platform X1, the message queue M1 is the first target queue, and the topic matching the first target queue includes the topic set corresponding to it, that is, when the message queue M1 is the first target queue, the first preset topic is N1.

[0112] In the embodiment of the present disclosure, the subject of the first message to be sent can be modified in a variety of ways, with the purpose of enabling the second message to be sent obtained after the subject is modified to be sent to the message queue M1.

[0113] Figure 3 and Figure 4 A flowchart of modifying the subject of a first message to be sent to a first preset subject according to an embodiment of the present disclosure is schematically shown, Figure 3 and Figure 4 As shown, in some specific embodiments, step S231 includes step S2311 and step S2312. Alternatively, step S231 includes step S2313 and step S2314.

[0114] In step S2311, a first suffix is ​​added to the subject of the first message to be sent.

[0115] In step S2312, the theme to which the first suffix is ​​added is used as the first preset theme.

[0116] In the embodiments of the present disclosure, the selection of the first suffix can be determined according to actual needs, as long as it can distinguish it from the subject before modification. For example, the platform architecture can be used as the first suffix. For example, when the first platform is based on the ARM architecture, "ARM" can be used as the first suffix.

[0117] In step S2313, hash mapping is performed on the subject of the first message to be sent.

[0118] In step S2314, the mapping result is used as the first preset theme.

[0119] In the disclosed embodiment, a unique binary code may be obtained through hash mapping. Optionally, part or all of the binary code may be used as the first preset subject, which may be determined according to actual needs as long as it can be distinguished from the subject before modification.

[0120] In other specific embodiments, the existing message sending server may be split or a new message sending server (or server cluster) may be added. In step S230, the subject may not be modified, but may be mapped to the split (or newly added) message sending server (or server cluster), and the message sending server (or server cluster) may specifically forward it.

[0121] In some specific embodiments, when the business unit generating the first message to be sent is the first business unit, the first target queue includes a message queue subscribed to by each second business unit, and the topic matching the first target queue includes the topic of the first message to be sent itself. Step S230 includes step S232.

[0122] In step S232, the subject of the first message to be sent is retained to obtain the second message to be sent.

[0123] For example, when the business unit that generates the first message to be sent is deployed on the second platform X2, the message queue M2 is the first target queue, and the topic matching the first target queue includes the topic set corresponding to it, that is, when the message queue M2 is the first target queue, the first preset topic is N2.

[0124] In the embodiments of the present disclosure, "N2" may refer to the default topic. Specifically, as mentioned above, the second platform includes a mainframe platform, in other words, the second platform is the original platform. In order to minimize the transformation content, the business units under the second platform can continue to use the original message queue, which can also be referred to as the default message queue. At this time, the topic set corresponding to the default message queue is also the original topic, which can also be referred to as the default topic. From another perspective, when the business module generates the first message to be sent, the topic of the first message to be sent itself is the default topic. Therefore, when the business unit that generates the first message to be sent is deployed on the second platform, the topic of the first message to be sent is retained and is not modified, so that the second message to be sent can still be sent to the default message queue, so as to use the previous settings and reduce the transformation content.

[0125] In some specific embodiments, multiple business modules also include a single-platform business module. In the disclosed embodiment, the single-platform business module is compared to the cross-platform business, and it is also a part of the multi-platform system. Unlike the cross-platform business module, the single-platform business module may include a business module for implementing public business. Public business may include data cleaning, formatting and other data processing services, which are not split based on the customer dimension. Therefore, the single-platform business module is only deployed in one platform. Since the message generated by the cross-platform module is split according to the platform on which the business unit generating the message is deployed, that is, when the business unit generating the first message to be sent is deployed on the first platform X1, the message will be sent to the message queue M1 after the above processing, and when the business unit generating the first message to be sent is deployed on the second platform X2, the message will be sent to the message queue M2 after the above processing. In order to ensure that the single-platform business module can consume messages normally, it is necessary to make corresponding modifications to the message processing logic of the single-platform business module.

[0126] In some specific embodiments, the consumer group configuration information of the business unit of the single-platform business module includes the message queue subscribed by the business unit, and the message queue subscribed by the business unit includes the message queue subscribed by each of the first business unit and the second business unit, thereby ensuring that the single-platform business module can obtain all messages without omissions.

[0127] For example, a single platform business module can subscribe to message queue M1 and message queue M2 to consume messages from message queue M1 and message queue M2.

[0128] In some specific embodiments, the single-platform service module generally mainly consumes messages, but according to actual needs, the single-platform service module can also generate messages.

[0129] Figure 5The second flowchart of message processing according to an embodiment of the present disclosure is schematically shown. Figure 5 As shown, the message processing method also includes steps S310 to S320.

[0130] In step S310, when the business unit generating the first message to be sent belongs to, the first message to be sent is subjected to a second process to obtain a third message to be sent. The subject of the third message to be sent matches the second target queue, and the second target queue includes: a message queue among multiple preset message queues that matches one of the multiple platforms whose visit volume meets the preset conditions.

[0131] In step S320, a message is sent according to the subject of the third message to be sent.

[0132] Among them, for at least one business unit in a single-platform business module, its consumer group configuration information is configured to enable the business unit to consume messages from at least a message queue that matches a platform whose access volume meets a preset condition.

[0133] In the embodiment of the present disclosure, the one of the multiple platforms whose visit volume meets the preset condition may include the one of the multiple platforms with higher visit volume. As the business migrates from the first platform to the second platform, the visit volume of the first platform and the second platform gradually changes. For example, in the early stage of migration, the first platform is responsible for processing most of the data. At this time, the visit volume of the first platform is higher. In the later stage of migration, the second platform is responsible for processing most of the data. At this time, the visit volume of the second platform is higher.

[0134] When the first platform has a high number of visits, the message queue that matches it is also the message queue subscribed to by the business unit deployed in the first platform by the cross-platform business module, that is, the message queue subscribed by each first business unit is the second target queue. When the second platform has a high number of visits, the message queue that matches it is also the message queue subscribed to by the business unit deployed in the second platform by the cross-platform business module, that is, the message queue subscribed by each second business unit is the second target queue. Correspondingly, when the message queue subscribed by the first business unit is the second target queue, the subject of the third message to be sent is the subject set corresponding to the message queue, such as N1 set corresponding to the message queue M1 in the previous text. When the message queue subscribed by the second business unit is the second target queue, the subject of the third message to be sent is the subject set corresponding to the message queue, such as N2 set corresponding to the message queue M2 in the previous text.

[0135] In some specific embodiments, the multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform. For the incomplete description of the multiple platforms, the first business unit and the second business unit in the embodiments of the present disclosure, please refer to the aforementioned embodiments, which are the same below, so they will not be repeated here and below.

[0136] When one of the multiple platforms whose visit volume meets the preset condition includes the first platform, the second target queue includes the message queue subscribed by the first business unit, and the topic matching the second target queue includes the first preset topic. Step S310 includes step S311.

[0137] In step S311, the subject of the first message to be sent is modified to the first preset subject to obtain a third message to be sent.

[0138] In the disclosed embodiment, the subject of the first message to be sent can be modified to the first preset subject by adding a first suffix or performing hash mapping, etc. In this way, the third message to be sent with the first preset subject will be sent to the message queue subscribed by the first business unit.

[0139] When one of the multiple platforms whose visit volume meets the preset condition includes the second platform, the second target queue includes the message queue subscribed by the second business unit, and the topic matching the second target queue includes the topic of the first message to be sent. Step S310 includes step S312

[0140] In step S312, the subject of the first message to be sent is retained to obtain a third message to be sent.

[0141] Similar to the above embodiment, by retaining the subject of the first message to be sent, the third message to be sent can have a default subject. In this way, the third message to be sent with the default subject will be sent to the message queue subscribed by the second business unit.

[0142] Since there are very few scenarios where a single-platform business module generates messages, general business needs can be met by sending the messages it generates to the message queue subscribed by the business units under the platform with high access volume.

[0143] In summary, the messages generated by the first business unit A1 and the first business unit B1 will be sent to the message queue M1, and the first business unit A1 and the first business unit B1 will consume messages from the message queue M1. The messages generated by the second business unit A2 and the second business unit B2 will be sent to the message queue M2, and the second business unit A2 and the second business unit B2 will consume messages from the message queue M2. The single-platform business module consumes messages from the message queue M1 and the message queue M2. In this way, the message interaction needs of the cross-platform business modules and the single-platform business modules can be met, thereby realizing the information interaction of various business modules under the multi-platform system.

[0144] The message processing method of the embodiment of the present disclosure is described below by taking the second method as an example.

[0145] In some specific embodiments, the number of preset message queues is greater than the number of platforms, each of the first business unit and the second business unit subscribes to at least one message queue, and the message queues subscribed by the two are different. The preset message queues include all message queues, and the all message queues may include, in the preset message queues, message queues other than the message queues subscribed by the first business unit and the second business unit. Among the multiple second messages to be sent generated after the first processing, the subject of at least one second message to be sent matches the all message queue.

[0146] For example, the multiple platforms include the first platform X1 and the second platform X2, and the preset message queue includes a message queue M3 in addition to the message queue M1 and the message queue M2. The first business unit A1 and the first business unit B1 both subscribe to the message queue M1, and the second business unit A2 and the second business unit B2 both subscribe to the message queue M2. After the first processing, among the multiple second messages to be sent generated, the subject of at least one second message to be sent matches the message queue M3. In this way, after the second message to be sent is sent through step S240, in addition to the second message to be sent in the message queue M1 (or the message queue M2), the second message to be sent also exists in the message queue M3. Furthermore, no matter which platform the business unit generating the first message to be sent is deployed on, in step S240, a copy of the second message to be sent will be sent to the message queue M3. In other words, the message queue M3 will contain messages generated by each of the first business unit A1, the first business unit B1, the second business unit A2 and the second business unit B2, and thus, the message queue M3 is called a full message queue, that is, a message queue containing messages generated by all business units.

[0147] In some specific embodiments, the message queue subscribed by the single-platform service module includes the full message queue, that is, the single-platform service module can subscribe to the above-mentioned message queue M3. Since the full message queue includes messages generated by all service units, subscribing the single-platform service module to the full message queue can also ensure that the messages consumed by the single-platform service module are complete and will not be missed.

[0148] In some specific embodiments, when the business unit generating the first message to be sent is the first business unit, the first target queue includes a message queue subscribed by each first business unit, and the topic matching the first target queue includes a first preset topic. Step S230 includes step S233.

[0149] In step S233, a fourth message to be sent and a fifth message to be sent are generated according to the first message to be sent, the subject of one of them is modified to the first preset subject, and the subject of the other is retained to obtain multiple second messages to be sent.

[0150] In the embodiment of the present disclosure, the subject of each of the fourth message to be sent and the fifth message to be sent can be the same as the subject of the first message to be sent, and therefore, the subject of the fourth message to be sent and the fifth message to be sent is also the default subject. In the embodiment of the present disclosure, the subject corresponding to the full message queue can be made the default subject. In this way, in step S233, a second message to be sent with a first preset subject and a second message to be sent with a default subject can be generated. In step S240, the second message to be sent with the first preset subject can be sent to the first target queue, and the second message to be sent retaining the default subject can be sent to the full message queue.

[0151] For example, when the business unit that generates the first message to be sent belongs to a cross-platform business module and is deployed on the first platform X1, the second message to be sent with the first preset subject can be sent to the message queue M1, and the second message to be sent with the default subject can be sent to the message queue M3.

[0152] In some specific embodiments, when the business unit generating the first message to be sent is a second business unit, the first target queue includes a message queue subscribed to by each second business unit, and the topic matching the first target queue includes a second preset topic. Step S230 includes step S234.

[0153] In step S234, a sixth message to be sent and a seventh message to be sent are generated based on the first message to be sent, the subject of one of them is modified to the second preset subject, and the subject of the other is retained to obtain multiple second messages to be sent.

[0154] The first preset theme and the second preset theme are different in at least some fields. In other words, for example, the first preset theme and the second preset theme have different suffixes.

[0155] In the embodiment of the present disclosure, the subject of each of the sixth message to be sent and the seventh message to be sent can be the same as the subject of the first message to be sent, and therefore, the subject of the sixth message to be sent and the seventh message to be sent is also the default subject. In the embodiment of the present disclosure, the subject corresponding to the full message queue can be made the default subject. In this way, in step S234, a second message to be sent with a first preset subject and a second message to be sent with a default subject can be generated. In step S240, the second message to be sent with the first preset subject can be sent to the first target queue, and the second message to be sent retaining the default subject can be sent to the full message queue.

[0156] For example, when the business unit that generates the first message to be sent belongs to a cross-platform business module and is deployed on the second platform X2, the second message to be sent with the first preset subject can be sent to the message queue M2, and the second message to be sent with the default subject can be sent to the message queue M3.

[0157] In summary, the messages generated by the first business unit A1 and the first business unit B1 will be sent to the message queue M1 and the message queue M3, and the first business unit A1 and the first business unit B1 consume messages from the message queue M1. The messages generated by the second business unit A2 and the second business unit B2 will be sent to the message queue M2 and the message queue M3, and the second business unit A2 and the second business unit B2 consume messages from the message queue M2. The single-platform business module consumes messages from the message queue M3. In this way, the message interaction needs of the cross-platform business modules and the single-platform business modules can be met, thereby realizing the information interaction of various business modules under the multi-platform system.

[0158] It should be noted that for details not described in detail in the second method, please refer to the aforementioned embodiment, so it will not be repeated here.

[0159] The above is an explanation of two methods of processing a first message to be sent into a second message to be sent in an embodiment of the present disclosure. However, this does not constitute a limitation on the number of methods of processing a first message to be sent into a second message to be sent in an embodiment of the present disclosure. It can be understood that more embodiments can be obtained after adjusting one or more steps of the above-mentioned methods, which are not listed one by one here.

[0160] In some specific embodiments, the plurality of platforms include a first platform and a second platform, Figure 6 A flowchart of determining the service modules and platforms involved in the first message to be sent according to an embodiment of the present disclosure is schematically shown. Figure 6 As shown, step S220 includes step S221.

[0161] In step S221, when the information in the designated field of the first message to be sent exists in the preset whitelist, it is determined that the platform deployed by the business unit generating the first message to be sent includes the first platform.

[0162] In some specific embodiments, the single-platform business module does not generate the first message to be sent. At this time, when the information in the specified field of the first message to be sent does not exist in the preset whitelist, it can be determined that the platform deployed by the business unit generating the first message to be sent includes the second platform. In some specific embodiments, the single-platform business module can generate the first message to be sent. At this time, the first message to be sent generated by the cross-platform business module and the first message to be sent generated by the single-platform business module can be processed by different processing modules first, and then the business module to which the processing module belongs can be used to determine whether the business unit generating the first message to be sent belongs to the single-platform business module or the cross-platform business module.

[0163] In the disclosed embodiment, step S221 can be implemented by an interceptor and a sharding mechanism. The interceptor can be injected into the program in a configurable manner. The specified field of the first message to be sent can contain specific information about the sharding dimension and the sharding key. The sharding can use the customer as a dimension, and optionally, the specific customer number is used as the sharding key in the first message to be sent.

[0164] Optionally, the whitelist data can be stored in a NoSql database such as Cassandra or Redis to improve processing performance.

[0165] Based on the above message processing method, the present disclosure also provides a message processing device, which is applied to a multi-platform system, wherein the multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, and different business units are deployed on different platforms. Figure 7 The device is described in detail.

[0166] Figure 7 The structural block diagram of the message processing device according to the embodiment of the present disclosure is schematically shown. Figure 7 As shown, the message processing device 700 of this embodiment includes an acquisition module 710 , a first processing module 720 , a second processing module 730 and a third processing module 740 .

[0167] The acquisition module 710 is used to acquire a first message to be sent, and the first message to be sent includes a message generated by at least one business unit according to at least one transaction. In one embodiment, the acquisition module 710 can be used to execute the step S210 described above, which will not be repeated here.

[0168] The first processing module 720 is used to obtain the module type identifier of the business unit that generates the first message to be sent, and determine whether the business unit belongs to a cross-platform business module according to the module type identifier. In one embodiment, the first processing module 720 can be used to execute the step S220 described above, which will not be repeated here.

[0169] The second processing module 730 is used to perform a first processing on the subject of the first message to be sent according to the platform on which the business unit generating the first message to be sent is deployed, when the business unit generating the first message to be sent belongs to a cross-platform business module, so as to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches the first target queue, and the first target queue includes: a message queue in a plurality of preset message queues that matches the platform on which the business unit generating the first message to be sent is deployed. In one embodiment, the second processing module 730 can be used to execute step S230 described above, which will not be repeated here.

[0170] The third processing module 740 is used to send at least one second message to be sent according to the subject of the second message to be sent. In one embodiment, the third processing module 740 can be used to execute the step S240 described above, which will not be described in detail here.

[0171] Each business unit is configured with consumer group configuration information. For at least one business unit in the cross-platform business module, its consumer group configuration information is configured to enable the business unit to consume messages from a message queue that matches the platform on which it is deployed.

[0172] By adopting the message processing device of the embodiment of the present disclosure, for multiple cross-platform business modules, the message processing method of the embodiment of the present disclosure can enable the business units deployed in the same platform to send messages to the same message queue. In this way, when the business units deployed in the same platform consume messages from the same message queue, and the business units deployed in different platforms consume messages from different message queues, message interaction can be carried out between the business units deployed in the same platform, thereby solving the message interaction problem between cross-platform modules in the multi-platform business system.

[0173] More importantly, the message processing device using the embodiment of the present invention can realize the targeted sending of messages by actively adjusting the subject of the first message to be sent according to whether the business unit that generates the first message to be sent belongs to a cross-platform module and the platform on which the business unit is deployed. This function can be achieved by modifying the framework layer of the multi-platform system. There is no need to modify the code layer for existing business modules and new business modules, which greatly reduces the workload. At the same time, it avoids problems such as errors caused by modifications to the code layer, thereby improving work efficiency.

[0174] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 710, the first processing module 720, the second processing module 730 and the third processing module 740 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 710, the first processing module 720, the second processing module 730 and the third processing module 740 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation modes of software, hardware and firmware or in a suitable combination of any of them. Alternatively, at least one of the acquisition module 710 , the first processing module 720 , the second processing module 730 , and the third processing module 740 may be at least partially implemented as a computer program module, and when the computer program module is executed, a corresponding function may be performed.

[0175] In some specific embodiments, the multiple platforms include a first platform and a second platform, and each cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform.

[0176] When the business unit generating the first message to be sent is the first business unit, the first target queue includes a message queue subscribed by each first business unit, and the topic matching the first target queue includes a first preset topic. The second processing module 730 is specifically configured to perform the following steps:

[0177] The subject of the first message to be sent is modified to the first preset subject to obtain the second message to be sent.

[0178] In some specific embodiments, when the business unit generating the first message to be sent is a second business unit, the first target queue includes a message queue subscribed to by each second business unit, and the topic matching the first target queue includes the topic of the first message to be sent itself. The second processing module 730 is specifically used to perform the following steps:

[0179] The subject of the first message to be sent is retained to obtain the second message to be sent.

[0180] In some specific embodiments, the second processing module 730 is specifically configured to perform the following steps:

[0181] A first suffix is ​​added to the subject of the first message to be sent.

[0182] The first default topic is the topic with the first suffix added. Or,

[0183] Perform a hash mapping on the subject of the first message to be sent.

[0184] The mapping result is used as the first preset topic.

[0185] In some specific embodiments, the multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform.

[0186] When the business unit generating the first message to be sent is the first business unit, the first target queue includes a message queue subscribed by each first business unit, and the topic matching the first target queue includes a first preset topic. The second processing module 730 is specifically configured to perform the following steps:

[0187] A fourth message to be sent and a fifth message to be sent are generated according to the first message to be sent, the subject of one of them is modified to the first preset subject, and the subject of the other is retained, so as to obtain multiple second messages to be sent.

[0188] In some specific embodiments, when the business unit generating the first message to be sent is a second business unit, the first target queue includes a message queue subscribed to by each second business unit, and the topic matching the first target queue includes a second preset topic. The second processing module 730 is specifically used to perform the following steps:

[0189] According to the first message to be sent, a sixth message to be sent and a seventh message to be sent are generated, the subject of one of them is modified to a second preset subject, and the subject of the other is retained, so as to obtain multiple second messages to be sent.

[0190] The first preset theme and the second preset theme are different in at least some fields.

[0191] In some specific embodiments, the multiple service modules further include a single platform service module, and the message processing device further includes a fourth processing module, which is used to perform the following steps:

[0192] When the business unit generating the first message to be sent belongs to a single-platform business module, the first message to be sent is subjected to a second process to obtain a third message to be sent, wherein the subject of the third message to be sent matches the second target queue, and the second target queue includes: a message queue among multiple preset message queues that matches one of the multiple platforms whose visit volume meets the preset conditions.

[0193] The message is sent according to the subject of the third message to be sent.

[0194] Among them, for at least one business unit in a single-platform business module, its consumer group configuration information is configured to enable the business unit to consume messages from at least a message queue that matches a platform whose access volume meets a preset condition.

[0195] In some specific embodiments, the multiple platforms include a first platform and a second platform, the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform, when one of the multiple platforms whose access volume meets a preset condition includes the first platform, the second target queue includes a message queue subscribed by each first business unit, and the topic matching the second target queue includes the first preset topic. The fourth processing module is specifically used to perform the following steps:

[0196] The subject of the first message to be sent is modified to the first preset subject to obtain a third message to be sent.

[0197] When one of the multiple platforms whose visit volume meets the preset condition includes the second platform, the second target queue includes the message queue subscribed by each second business unit, and the topic matching the second target queue includes the topic of the first message to be sent. Performing a second process on the first message to be sent to obtain a third message to be sent includes:

[0198] The subject of the first message to be sent is retained to obtain the third message to be sent.

[0199] In some specific embodiments, the plurality of platforms include a first platform and a second platform, and the first processing module 220 is specifically configured to perform the following steps:

[0200] When the information in the designated field of the first message to be sent exists in the preset whitelist, it is determined that the platform deployed by the business unit generating the first message to be sent includes the first platform.

[0201] In some specific embodiments, the multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform.

[0202] The consumer group configuration information of the first business unit and the second business unit includes at least one message queue subscribed by each, and the message queue subscribed by the first business unit is the same as that of the second business unit.

[0203] Each of the first business unit and the second business unit subscribes to a plurality of message queues, and the plurality of message queues subscribed by the first business unit are at least partially the same as the plurality of message queues subscribed by the second business unit.

[0204] In some specific embodiments, the single-platform business module is deployed on one of the multiple platforms whose traffic meets a preset condition.

[0205] The consumer group configuration information of the business unit of the single-platform business module includes the message queue subscribed by the business unit, and the message queue subscribed by the business unit includes the message queue subscribed by each of the first business unit and the second business unit. Or,

[0206] The message queues subscribed by the service units of the single-platform service module include the same parts of the multiple message queues subscribed by the first service unit and the multiple message queues subscribed by the second service unit.

[0207] Figure 8 A block diagram of an electronic device suitable for implementing a message processing method according to an embodiment of the present disclosure is schematically shown. Figure 8 As shown, the electronic device 800 according to an embodiment of the present disclosure includes a processor 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. The processor 801 may include, for example, a general-purpose microprocessor (e.g., a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (e.g., an application-specific integrated circuit (ASIC)), etc. The processor 801 may also include an onboard memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.

[0208] In RAM 803, various programs and data required for the operation of electronic device 800 are stored. Processor 801, ROM 802 and RAM 803 are connected to each other via bus 804. Processor 801 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 802 and / or RAM 803. It should be noted that the program can also be stored in one or more memories other than ROM 802 and RAM 803. Processor 801 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.

[0209] According to an embodiment of the present disclosure, the electronic device 800 may further include an input / output (I / O) interface 805, which is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the I / O interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 808 including a hard disk, etc.; and a communication portion 809 including a network interface card such as a LAN card, a modem, etc. The communication portion 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage portion 808 as needed.

[0210] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the message processing method according to the embodiment of the present disclosure is implemented.

[0211] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, a computer-readable storage medium may include the ROM 802 and / or RAM 803 described above and / or one or more memories other than ROM 802 and RAM 803.

[0212] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program contains program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the message processing method provided by the embodiment of the present disclosure.

[0213] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 801. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.

[0214] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 809, and / or installed from a removable medium 811. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.

[0215] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the processor 801, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.

[0216] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages ​​include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).

[0217] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0218] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.

[0219] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.

Claims

1. A message processing method, applied in a multi-platform system, characterized in that: The multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, different business units in the cross-platform business module are deployed on different platforms, and the message processing method includes: Acquire a first message to be sent, where the first message to be sent includes a message generated by at least one business unit according to at least one transaction; Obtaining a module type identifier of a service unit that generates the first message to be sent, and determining whether the service unit belongs to a cross-platform service module according to the module type identifier; When the business unit generating the first message to be sent belongs to the cross-platform business module, a first processing is performed on the subject of the first message to be sent according to the platform on which the business unit generating the first message to be sent is deployed, so as to obtain at least one second message to be sent, wherein the subject of at least one second message to be sent matches a first target queue, and the first target queue includes: a message queue that matches the platform on which the business unit generating the first message to be sent is deployed, among a plurality of preset message queues; For at least one of the second messages to be sent, sending the message according to the subject of the second message to be sent; Each of the business units is configured with consumption group configuration information. For at least one of the business units in the cross-platform business module, the consumption group configuration information is configured to enable the business unit to consume messages from a message queue that matches the platform on which it is deployed.

2. The message processing method according to claim 1, characterized in that: The multiple platforms include a first platform and a second platform, and each of the cross-platform business modules includes a first business unit deployed in the first platform and a second business unit deployed in the second platform; When the business unit that generates the first message to be sent is the first business unit, the first target queue includes a message queue subscribed to by each of the first business units, and the topic matching the first target queue includes a first preset topic; performing a first processing on the topic of the first message to be sent to obtain at least one second message to be sent includes: The subject of the first message to be sent is modified to the first preset subject to obtain the second message to be sent.

3. The message processing method according to claim 2, characterized in that: When the business unit that generates the first message to be sent is the second business unit, the first target queue includes a message queue subscribed to by each of the second business units, and the subject that matches the first target queue includes the subject of the first message to be sent itself; performing a first processing on the subject of the first message to be sent to obtain at least one second message to be sent includes: The subject of the first message to be sent is retained to obtain the second message to be sent.

4. The message processing method according to claim 2, characterized in that: The step of modifying the subject of the first message to be sent to the first preset subject includes: Adding a first suffix to the subject of the first message to be sent; The first preset theme is the theme with the first suffix added; or, Performing hash mapping on the subject of the first message to be sent; The mapping result is used as the first preset topic.

5. The message processing method according to claim 1, characterized in that: The multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform; When the business unit generating the first message to be sent is a first business unit, the first target queue includes a message queue subscribed to by each of the first business units, and the subject matching the first target queue includes a first preset subject; performing a first processing on the subject of the first message to be sent to obtain at least one second message to be sent includes: A fourth message to be sent and a fifth message to be sent are generated according to the first message to be sent, the subject of one of them is modified to the first preset subject, and the subject of the other is retained, so as to obtain a plurality of the second messages to be sent.

6. The message processing method according to claim 5, characterized in that: When the business unit generating the first message to be sent is a second business unit, the first target queue includes a message queue subscribed to by each of the second business units, and the topic matching the first target queue includes a second preset topic; performing a first processing on the topic of the first message to be sent to obtain at least one second message to be sent includes: Generate a sixth message to be sent and a seventh message to be sent according to the first message to be sent, modify the subject of one of them to the second preset subject, and retain the subject of the other, so as to obtain a plurality of the second messages to be sent; The first preset theme and the second preset theme are different in at least some fields.

7. The message processing method according to claim 1, characterized in that: The plurality of business modules further include a single platform business module, and the message processing method further includes: When the business unit generating the first message to be sent belongs to a single-platform business module, the first message to be sent is subjected to a second processing to obtain a third message to be sent; wherein the subject of the third message to be sent matches a second target queue, and the second target queue includes: a message queue among a plurality of preset message queues that matches one of the plurality of platforms whose visit volume meets a preset condition; Sending a message according to the subject of the third message to be sent; Among them, for at least one of the business units in the single-platform business module, its consumption group configuration information is configured to enable the business unit to consume messages from at least a message queue that matches the platform whose access volume meets a preset condition.

8. The message processing method according to claim 7, characterized in that: The multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform; When one of the multiple platforms whose visits satisfy the preset condition includes the first platform, the second target queue includes a message queue subscribed by each of the first business units, and the topic matching the second target queue includes a first preset topic; performing a second processing on the first message to be sent to obtain a third message to be sent includes: Modify the subject of the first message to be sent to the first preset subject to obtain the third message to be sent; When one of the multiple platforms whose visit volume meets the preset condition includes the second platform, the second target queue includes a message queue subscribed by each of the second business units, and the topic matching the second target queue includes the topic of the first message to be sent itself; performing a second processing on the first message to be sent to obtain a third message to be sent includes: The subject of the first message to be sent is retained to obtain the third message to be sent.

9. The message processing method according to claim 1, characterized in that: The multiple platforms include a first platform and a second platform, and determining the platform deployed by the business unit generating the first message to be sent includes: When the information in the designated field of the first message to be sent exists in a preset whitelist, it is determined that the platform deployed by the business unit generating the first message to be sent includes the first platform.

10. The message processing method according to claim 1, characterized in that: The multiple platforms include a first platform and a second platform, and the cross-platform business module includes a first business unit deployed in the first platform and a second business unit deployed in the second platform; The consumer group configuration information of the first business unit and the second business unit includes at least one message queue subscribed by each, and the message queue subscribed by the first business unit is different from the message queue subscribed by the second business unit.

11. The message processing method according to claim 8, characterized in that: The single-platform service module is deployed on one of the multiple platforms whose visit volume meets the preset conditions; The consumer group configuration information of the business unit of the single-platform business module includes a message queue subscribed by the business unit, and the message queue subscribed by the business unit includes a message queue subscribed by each of the first business unit and the second business unit.

12. A message processing device, applied to a multi-platform system, characterized in that: The multi-platform system includes multiple business modules and multiple platforms, the multiple business modules include at least one cross-platform business module, at least one business module includes at least one business unit, at least one cross-platform business module includes multiple business units, different business units in the cross-platform business module are deployed on different platforms, and the message processing device includes: A first acquisition module, configured to acquire a first message to be sent, wherein the first message to be sent includes a message generated by at least one business unit according to at least one transaction; A first processing module, used for obtaining a module type identifier of a business unit that generates the first message to be sent, and determining whether the business unit belongs to a cross-platform business module according to the module type identifier; a second processing module, configured to, when the business unit generating the first message to be sent belongs to the cross-platform business module, perform a first processing on the subject of the first message to be sent according to the platform on which the business unit generating the first message to be sent is deployed, so as to obtain at least one second message to be sent, wherein the subject of at least one of the second messages to be sent matches a first target queue, and the first target queue includes: a message queue that matches the platform on which the business unit generating the first message to be sent is deployed, among a plurality of preset message queues; A third processing module, configured to send at least one of the second messages to be sent according to a subject of the second message to be sent; Each of the business units is configured with consumption group configuration information. For at least one of the business units in the cross-platform business module, the consumption group configuration information is configured to enable the business unit to consume messages from a message queue that matches the platform on which it is deployed.

13. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors execute the message processing method according to any one of claims 1 to 11.

14. A computer-readable storage medium, characterized in that: Executable instructions are stored thereon, and when the instructions are executed by a processor, the processor executes the message processing method according to any one of claims 1 to 11.

15. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the message processing method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • Transplantable middle database system

    CN105302625A

  • Cross-platform service system docking method and device

    CN112114977A