Message processing method, message processing device, electronic equipment and storage medium
By using the combination of list allocation strategy and traffic allocation strategy in the message processing system to identify and match the parameters of the pending messages, the problem of uneven traffic allocation between databases is solved, and the optimization of database storage pressure and high system availability is achieved.
Patent Information
- Application Number
- CN202510838944.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-07-25
AI Technical Summary
When adding a new database to the message processing system, it is difficult to achieve reasonable allocation of traffic between different databases, resulting in greater storage pressure on some databases.
When the message processing policy is the list matching policy, the parameters of the pending message are identified and parameter matching is performed in the whitelist list, and the storage location of the pending message is determined in combination with the traffic allocation policy, so as to achieve reasonable allocation of pending messages.
It effectively reduces the storage pressure of any database and improves the high availability and processing efficiency of the message processing system.
Smart Images

Figure CN120378367A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fintech, and particularly to a message processing method, a message processing device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Bank messages usually refer to electronic messages used for financial transactions or information exchanges between banks or between banks and other financial institutions. These messages may include account information, transaction records, exchange rate information, etc.
[0003] The exchange of bank messages is usually carried out by means of network communication, such as through the Internet or a dedicated network. These network communication methods can provide higher security and reliability, ensuring the safety and correctness of financial transactions.
[0004] In the process of implementing the concept of this application, it is found that when adding other databases for storage in the message processing system, it is difficult for related technologies to reasonably allocate the traffic in different databases, which may lead to a relatively large storage pressure on some databases. Summary of the Invention
[0005] In view of the above problems, this application provides a message processing method, a message processing device, an electronic device, a computer-readable storage medium, and a computer program product.
[0006] According to the first aspect of this application, a message processing method is provided, including:
[0007] Obtain a message to be processed and a message processing strategy of a message processing system;
[0008] When the above message processing strategy is a list matching strategy, identify the message parameters of the above message to be processed;
[0009] Based on the above message parameters, perform parameter matching processing in the whitelist to obtain a parameter matching result, where the above whitelist includes at least one initial message parameter;
[0010] When the above parameter matching result indicates that the above at least one initial message parameter includes a matching message parameter that matches the above message parameters, confirm whether the above message to be processed meets the traffic allocation strategy to obtain a message allocation result;
[0011] Based on the above message allocation result, transmit the above message to be processed to the first database or the second database of the above message processing system.
[0012] According to an embodiment of this application, the above message parameters include the transaction type of the above message to be processed.
[0013] According to an embodiment of the present application, based on the above message parameters, parameter matching processing is performed in the whitelist to obtain a parameter matching result, including:
[0014] When at least one of the above initial message parameters includes a matching transaction type that matches the above transaction type, a first matching result is generated;
[0015] When at least one of the above initial message parameters does not include a matching transaction type that matches the above transaction type, a second matching result is generated, where the above parameter matching result includes the above first matching result or the above second matching result.
[0016] According to an embodiment of the present application, the above message parameters further include at least one account attribute information.
[0017] According to an embodiment of the present application, before generating the above first matching result, it further includes:
[0018] Search for matching attribute information that matches at least one of the above account attribute information among multiple initial account attribute information in the above whitelist to obtain an attribute matching result;
[0019] When the above attribute matching result indicates that there is matching attribute information that matches each of the above account attribute information, the above first matching result is generated.
[0020] According to an embodiment of the present application, the message processing method further includes:
[0021] When the above parameter matching result is the above second matching result or the above attribute matching result indicates that there is no matching attribute information that matches any of the above account attribute information, transmit the above message to be processed to the above second database.
[0022] According to an embodiment of the present application, the message processing method further includes:
[0023] When the above message processing strategy is an emergency strategy, obtain the emergency switch parameter of the above message processing system;
[0024] When the above emergency switch parameter is a first value, transmit the above message to be processed to the above first database;
[0025] When the above emergency switch parameter is a second value, transmit the above message to be processed to the above second database.
[0026] According to an embodiment of the present application, the message processing method further includes:
[0027] When the above message processing strategy is a traffic ratio strategy, determine whether the above message to be processed meets the above traffic ratio strategy to obtain a traffic judgment result;
[0028] When the above traffic judgment result indicates that the to-be-processed packet meets the above traffic ratio strategy, transmit the to-be-processed packet to the above first database;
[0029] When the above traffic judgment result indicates that the to-be-processed packet does not meet the above traffic ratio strategy, transmit the to-be-processed packet to the above second database.
[0030] According to an embodiment of the present application, before confirming whether the to-be-processed packet meets the above traffic allocation strategy, determine whether the packet processing system is configured with traffic configuration parameters to obtain a configuration judgment result;
[0031] When the above configuration judgment result indicates that the above traffic configuration parameters have been configured, determine whether the to-be-processed packet meets the traffic allocation strategy to obtain the above packet allocation result;
[0032] When the above configuration judgment result indicates that the above traffic configuration parameters have not been configured, transmit the to-be-processed packet to the above second database.
[0033] According to an embodiment of the present application, based on the above packet allocation result, transmitting the to-be-processed packet to the first database or the second database of the above packet processing system includes:
[0034] When the above packet allocation result indicates that the to-be-processed packet meets the above traffic allocation strategy, transmit the to-be-processed packet to the above first database;
[0035] When the above packet allocation result indicates that the to-be-processed packet does not meet the above traffic allocation strategy, iteratively match the packet parameters of the to-be-processed packet in the above whitelist to confirm whether to transmit the to-be-processed packet to the first database;
[0036] When the number of matches meets a preset number threshold and the to-be-processed packet does not meet the above traffic allocation strategy, transmit the to-be-processed packet to the above second database.
[0037] A second aspect of the present application provides a packet processing device, characterized in that the device includes:
[0038] An acquisition module for acquiring a to-be-processed packet and a packet processing strategy of a packet processing system;
[0039] An identification module for identifying the packet parameters of the to-be-processed packet when the above packet processing strategy is a list ratio strategy;
[0040] A matching module, configured to perform parameter matching processing on a whitelist based on the above message parameters to obtain a parameter matching result, where the above whitelist includes at least one initial message parameter;
[0041] A confirmation module, configured to confirm whether the to-be-processed message meets a traffic allocation policy to obtain a message allocation result when the above parameter matching result indicates that the above at least one initial message parameter includes a matching message parameter that matches the above message parameters;
[0042] A transmission module, configured to transmit the to-be-processed message to a first database or a second database of the above message processing system based on the above message allocation result.
[0043] A third aspect of the present application provides an electronic device, including: one or more processors; a memory, configured to store one or more computer programs, where the above one or more processors execute the above one or more computer programs to implement the steps of the above method.
[0044] A fourth aspect of the present application further provides a computer-readable storage medium, on which a computer program or instruction is stored, and when the above computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0045] A fifth aspect of the present application further provides a computer program product, including a computer program or instruction, and when the above computer program or instruction is executed by a processor, the steps of the above method are implemented.
[0046] According to an embodiment of the present application, when a message processing system processes a to-be-processed message, if the message processing policy in the message processing system is a list matching policy, it is searched in the whitelist whether there is a matching message parameter corresponding to the message parameters of the to-be-processed message. If there is a matching message parameter, it is confirmed whether the to-be-processed message meets the traffic allocation policy to obtain a message allocation result, and the to-be-processed message is transmitted to a first database or a second database of the message processing system based on the message allocation result. Since the storage location of the to-be-processed message is jointly determined by the whitelist and the traffic allocation policy during message allocation, reasonable allocation of traffic in the message processing system is achieved, thereby reducing the storage pressure on any database. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Through the following description of the embodiments of the present application with reference to the drawings, the above content and other objects, features, and advantages of the present application will become clearer. In the drawings:
[0048] Figure 1 Schematically shows an application scenario diagram of a message processing method according to an embodiment of the present application;
[0049] Figure 2Schematically shows a flowchart of a message processing method according to an embodiment of the present application;
[0050] Figure 3 Schematically shows a flowchart of a message processing method according to another embodiment of the present application;
[0051] Figure 4 Schematically shows a flowchart of a message processing method according to still another embodiment of the present application;
[0052] Figure 5 Schematically shows a processing flowchart of a message processing system according to an embodiment of the present application;
[0053] Figure 6 Schematically shows a processing flowchart of a message processing system according to another embodiment of the present application;
[0054] Figure 7 Schematically shows a structural block diagram of a message processing device according to an embodiment of the present application; and
[0055] Figure 8 Schematically shows a block diagram of an electronic device suitable for implementing the above method according to an embodiment of the present application. Detailed implementation manners
[0056] Hereinafter, embodiments of the present application will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are merely exemplary and are not intended to limit the scope of the present application. In the following detailed description, for the sake of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present application. However, obviously, one or more embodiments can also be implemented without these specific details. In addition, in the following description, descriptions of well-known structures and technologies are omitted to avoid unnecessarily confusing the concepts of the present application.
[0057] The terms used herein are merely for describing specific embodiments and are not intended to limit the present application. The terms "including", "comprising", etc. used herein indicate the presence of the described features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0058] All terms used herein (including technical and scientific terms) 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.
[0059] In the case of using expressions such as "at least one of A, B, and C", generally, it should be interpreted according to the meaning that those skilled in the art usually understand this expression (for example, "a system having at least one of A, B, and C" should include, but not be limited to, a system having only A, only B, only C, having A and B, having A and C, having B and C, and / or having A, B, and C, etc.).
[0060] In the process of implementing this application, it is found that the message processing system may include a bank-securities transfer online system, which mainly includes a front-end layer, an access layer, a service layer, and a data layer. Among them, the securities company interacts with the front-end management tool of the front-end layer in the form of a socket (Socket) for messages, and the front-end management tool interacts with the access node of the access layer through the gateway. The access layer performs routing of gray nodes and formal nodes and forwards them to the service layer. At the same time, a database is used for message storage.
[0061] Due to the development of technology or the requirements of relevant institutions, it is necessary to transform and upgrade the original system, that is, replace the original hardware with compliant hardware. For example, replace the database. In the process of replacement, in order to achieve a smooth transition, two databases can be retained in the system at the same time. However, in the process of smooth transition, how to achieve high availability and high performance is the main problem faced.
[0062] In view of this, this application provides a message processing method, a message processing device, an electronic device, and a storage medium, which can be applied to the field of fintech technology. The method includes: obtaining a message to be processed and a message processing strategy of the message processing system; when the message processing strategy is a list matching strategy, identifying the message parameters of the message to be processed; based on the message parameters, performing parameter matching processing in the whitelist to obtain a parameter matching result, where the whitelist includes at least one initial message parameter; when the parameter matching result indicates that at least one initial message parameter includes a matching message parameter that matches the message parameters, confirming whether the message to be processed meets the traffic allocation strategy to obtain a message allocation result; based on the message allocation result, transmitting the message to be processed to the first database or the second database of the message processing system.
[0063] In the technical solution of this application, the user information involved (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) are all information and data authorized by the user or fully authorized by all parties. And the processing of relevant data, such as collection, storage, use, processing, transmission, provision, disclosure, and application, all comply with relevant laws, regulations, and standards, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0064] It should be noted that the message processing method and apparatus provided in this application can be used in the financial field, such as financial institutions like banks, and can also be used in any field other than the financial field, such as the e-commerce field. Therefore, the application fields of the message processing method and apparatus provided in this application are not limited.
[0065] Figure 1 FIG. shows an application scenario diagram of the message processing method according to an embodiment of the present application.
[0066] As Figure 1 shown, the application scenario 100 according to this embodiment may include an online transfer transaction scenario. The network 104 is a medium for providing a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the message processing system 105. The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0067] Users can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the message processing system 105 through the network 104 to receive or send messages, etc. Various communication client applications may be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0068] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop portable computers, and desktop computers, etc.
[0069] The message processing system 105 may be a server providing various message services, such as a background management server (only for example) that provides support for the messages to be processed transmitted by users using the first terminal device 101, the second terminal device 102, and the third terminal device 103. The background management server may analyze and process data such as received user requests, etc., and feedback the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0070] It should be noted that the message processing method provided by the embodiments of the present application can generally be executed by the server 105. Correspondingly, the message processing device provided by the embodiments of the present application can generally be set in the server 105. The message processing method provided by the embodiments of the present application can also be executed by a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Correspondingly, the message processing device provided by the embodiments of the present application can also be set in a server or a server cluster different from the server 105 and capable of communicating with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0071] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in
[0072] are merely illustrative. According to actual needs, there can be any number of terminal devices, networks, and message processing systems. Figure 1 Based on the Figures 2 to 6 scenario described below, the message processing method of the disclosed embodiments will be described in detail through
[0073] Figure 2 FIG. schematically shows a flowchart of the message processing method according to an embodiment of the present application.
[0074] As Figure 2 shown, the message processing method of this embodiment includes operations S210 to S250, and this transaction processing method can be executed by an electronic device.
[0075] In operation S210, obtain the message to be processed and the message processing policy of the message processing system;
[0076] In operation S220, when the message processing policy is a list matching policy, identify the message parameters of the message to be processed.
[0077] In operation S230, based on the message parameters, perform parameter matching processing in the whitelist to obtain a parameter matching result, where the whitelist includes at least one initial message parameter.
[0078] In operation S240, when the parameter matching result indicates that at least one initial message parameter includes a matching message parameter that matches the message parameters, confirm whether the message to be processed meets the traffic allocation policy to obtain a message allocation result.
[0079] In operation S250, based on the message allocation result, transmit the message to be processed to the first database or the second database of the message processing system.
[0080] According to an embodiment of the present application, the message parameter may refer to the basic information of the transaction corresponding to the message to be processed, such as transaction type, account number in the transaction, transaction code, and amount, etc. Both the first database and the second database are part of the message processing system. Among them, the second database may be the original database in the message processing system, and the first database may be a newly added database when replacing the second database. The two coexist temporarily, mainly to avoid data loss caused by directly replacing the database. First, set two databases simultaneously, and then disassemble the second database after a period of time when the first database is successfully installed to achieve a smooth transition between the new and old databases.
[0081] It should be noted that in the financial field such as banks, the message processing system may refer to the online architecture of bank-securities transfer. The front-end layer in the online architecture of bank-securities transfer is connected to the transaction terminals of different transaction channels through the front-end management tool to obtain the messages to be processed uploaded. The access layer processes the messages to be processed through the message insulation processing method of this embodiment to store the messages to be processed in the first database or the second database in the service layer, and the data layer further processes the messages to be processed stored in the service layer.
[0082] According to an embodiment of the present application, before message processing, the staff pre-stores one or more initial message parameters in the whitelist. After the messages to be processed are uploaded through their respective transaction terminals in different transaction channels, first obtain the message processing strategy in the message processing system, such as the list ratio strategy, emergency strategy, and traffic ratio strategy. Among them, different strategies correspond to different message allocation methods. For example, the list ratio strategy means that it is jointly determined by the whitelist and the traffic ratio strategy whether the message to be processed should be stored in the first database or the second database.
[0083] According to an embodiment of the present application, if the current message processing strategy is the list ratio strategy, at this time, it is necessary to identify the message parameters in the message to be processed, and check whether there is a matching message parameter corresponding to the message parameter in the whitelist to obtain the parameter matching result. If the parameter matching result shows that there is a corresponding initial message parameter stored in the whitelist, at this time, it is necessary to determine whether the message to be processed hits the traffic allocation strategy to obtain the message allocation result, and store the message to be processed in the first database or the second database based on the message allocation result. Among them, the traffic allocation strategy may refer to allocation according to a certain allocation probability. For example, when hitting the allocation probability (such as 80%), the message to be processed is stored in the first database, otherwise it is stored in the second database.
[0084] According to an embodiment of the present application, when the message processing system processes a message to be processed, if the message processing strategy in the message processing system is a list matching strategy, it is checked whether there is a matching message parameter corresponding to the message parameter of the message to be processed in the whitelist. If there is a matching message parameter, it is confirmed whether the message to be processed meets the traffic allocation strategy to obtain a message allocation result, and based on the message allocation result, the message to be processed is transmitted to the first database or the second database of the message processing system. Since the storage location of the message to be processed is jointly determined by the whitelist and the traffic allocation strategy during message allocation, the reasonable allocation of traffic in the message processing system is realized, thereby reducing the storage pressure on any database.
[0085] According to an embodiment of the present application, the message parameter includes the transaction type of the message to be processed.
[0086] According to an embodiment of the present application, based on the message parameter, parameter matching processing is performed in the whitelist to obtain a parameter matching result, including: generating a first matching result when at least one initial message parameter includes a matching transaction type that matches the transaction type; generating a second matching result when at least one initial message parameter does not include a matching transaction type that matches the transaction type, where the parameter matching result includes the first matching result or the second matching result.
[0087] According to an embodiment of the present application, a variety of initial transaction types, such as transfer transactions, are pre-set in the whitelist. If the message parameter of the message to be processed is the transaction type, it is checked whether there is a matching transaction type in the whitelist. If there is, a first matching result can be generated; if not, a second matching result is generated.
[0088] According to an embodiment of the present application, if the parameter matching result is the first matching result, it can be further confirmed whether the message to be processed meets the traffic ratio strategy to confirm the storage location of the message to be processed. If the parameter matching result is the second matching result, the message to be processed can be stored in the second database.
[0089] According to an embodiment of the present application, by finding the matching transaction type corresponding to the message to be processed in the whitelist and jointly determining the storage location of the message to be processed in combination with the traffic allocation strategy, the reasonable allocation of traffic in the message processing system is realized, thereby reducing the storage pressure on different databases.
[0090] According to an embodiment of the present application, the message parameter further includes at least one account attribute information.
[0091] According to an embodiment of the present application, before generating the first matching result, it further includes: searching for matching attribute information that matches at least one account attribute information among multiple initial account attribute information in the whitelist, to obtain an attribute matching result; generating the first matching result when the attribute matching result indicates that there is matching attribute information that matches each account attribute information.
[0092] According to an embodiment of the present application, the account attribute information includes but is not limited to the account type of the account, card number, amount, and the user name to which it belongs, etc.
[0093] In an embodiment of the present disclosure, before obtaining the account attribute information of the user, the consent or authorization of the user may be obtained. For example, before obtaining the account attribute information of the user, a request to obtain the account attribute information may be sent to the user. When the user consents or authorizes to obtain the account attribute information, the operation of obtaining the account attribute information of the user is executed.
[0094] According to an embodiment of the present application, when it is confirmed that there is a matching transaction type in the whitelist that corresponds to the to-be-processed message, further parameter matching is performed on other message parameters, such as parameter matching on the account attribute information.
[0095] According to an embodiment of the present application, if corresponding matching attribute information can be found in the whitelist for all other message parameters of the to-be-processed message, to obtain an attribute matching result, at this time, the first matching result may be generated based on this attribute matching result.
[0096] According to an embodiment of the present application, by further performing matching on other message parameters in the whitelist to determine whether the to-be-processed message meets the conditions for generating the first matching result, the rationality of traffic allocation can be further improved, thereby further reducing the storage pressure on different databases.
[0097] According to an embodiment of the present application, the message processing method further includes: when the parameter matching result is the second matching result or the attribute matching result indicates that there is no matching attribute information that matches any account attribute information, transmitting the to-be-processed message to the second database.
[0098] According to an embodiment of the present application, if there is no matching transaction type in the whitelist that corresponds to the transaction type of the to-be-processed message, that is, the parameter matching result is the second matching result, at this time, the to-be-processed message may be stored in the second database.
[0099] According to an embodiment of the present application, if there is no matching attribute information in the whitelist that corresponds to other message parameters, at this time, the to-be-processed message may be stored in the second database.
[0100] Figure 3Schematically shows a flowchart of a message processing method according to another embodiment of the present application.
[0101] According to an embodiment of the present application, the message processing method further includes operations S310 to S330:
[0102] In operation S310, when the message processing policy is an emergency policy, obtain the emergency switch parameter of the message processing system.
[0103] In operation S320, when the emergency switch parameter is the first value, transmit the message to be processed to the first database.
[0104] In operation S330, when the emergency switch parameter is the second value, transmit the message to be processed to the second database.
[0105] According to an embodiment of the present application, the emergency policy is a traffic allocation policy started in an emergency situation. For example, when a newly added first database fails, or the original second database fails, or a certain database stores a large amount of data, the message processing system automatically starts this emergency policy to avoid continuing to store messages in a certain database.
[0106] According to an embodiment of the present application, if the message processing system starts the emergency policy, it is necessary to first judge the emergency switch parameter of this emergency policy. The parameter value of the emergency switch parameter reflects which database the message to be processed should be stored in. For example, when the emergency switch parameter is the first value, the message to be processed should be stored in the first database at this time. The first value can be specifically set according to actual needs. For example, it can be 0, and this first value can reflect that the second database fails or the storage pressure of the second database is too high.
[0107] According to an embodiment of the present application, when the emergency switch parameter is the second value, the message to be processed should be stored in the second database at this time. The second value can be specifically set according to actual needs. For example, it can be 1, and this second value can reflect that the first database fails or the storage pressure of the first database is too high.
[0108] According to an embodiment of the present application, by using the emergency policy, the message to be processed can be continuously processed in an emergency situation, thereby improving the high availability of the message processing system and avoiding the situation where messages cannot be processed in time due to downtime.
[0109] Figure 4 Schematically shows a flowchart of a message processing method according to another embodiment of the present application.
[0110] According to an embodiment of the present application, the message processing method further includes operations S410 to S430:
[0111] In operation S410, when the message processing policy is the traffic ratio policy, it is determined whether the message to be processed meets the traffic ratio policy to obtain a traffic judgment result.
[0112] In operation S420, when the traffic judgment result indicates that the message to be processed meets the traffic ratio policy, the message to be processed is transmitted to the first database.
[0113] In operation S430, when the traffic judgment result indicates that the message to be processed does not meet the traffic ratio policy, the message to be processed is transmitted to the second database.
[0114] According to an embodiment of the present application, if the message processing policy of the current message processing system is the traffic ratio policy, at this time, it is only necessary to determine whether the message to be processed hits the allocation probability (for example, 80%), that is, whether it meets the traffic ratio policy, so as to obtain a traffic judgment result.
[0115] According to an embodiment of the present application, if the traffic judgment result shows that the allocation probability is hit, that is, the message to be processed meets the traffic ratio policy, at this time, the message to be processed can be stored in the first database. If the traffic judgment result shows that the allocation probability is not hit, that is, the message to be processed does not meet the traffic ratio policy, at this time, the message to be processed can be stored in the second database.
[0116] According to an embodiment of the present application, the use of different message processing policies can realize the normal processing of messages when the message processing system fails, thereby improving the processing efficiency and high availability of the message processing system.
[0117] According to an embodiment of the present application, before confirming whether the message to be processed meets the traffic allocation policy, it is determined whether the message processing system is configured with traffic configuration parameters to obtain a configuration judgment result; when the configuration judgment result indicates that the traffic configuration parameters have been configured, it is determined whether the message to be processed meets the traffic allocation policy to obtain a message allocation result; when the configuration judgment result indicates that the traffic configuration parameters have not been configured, the message to be processed is transmitted to the second database.
[0118] According to an embodiment of the present application, the traffic configuration parameter is the allocation probability recorded above, and the specific value can be set according to the actual operation status of the message processing system. For example, when the storage space in the first database is relatively large, a relatively large value of the traffic configuration parameter can be set, such as 90%.
[0119] According to an embodiment of the present application, when confirming whether the traffic allocation policy is hit, it is first determined whether the message processing system is configured with traffic configuration parameters. If it has been configured, it can be determined whether the message to be processed hits the allocation probability based on the traffic configuration parameter, so as to obtain a message allocation result.
[0120] According to an embodiment of the present application, if traffic configuration parameters are not configured, the to-be-processed message can be directly stored in the second database, and parameter configuration reminder information can also be generated to remind the staff to perform configuration in a timely manner.
[0121] According to an embodiment of the present application, based on the message distribution result, the to-be-processed message is transmitted to the first database or the second database of the message processing system, including: when the message distribution result indicates that the to-be-processed message meets the traffic distribution policy, the to-be-processed message is transmitted to the first database; when the message distribution result indicates that the to-be-processed message does not meet the traffic distribution policy, the message parameters of the to-be-processed message are iteratively matched in the whitelist to confirm whether the to-be-processed message is transmitted to the first database; when the number of matches meets the preset number threshold and the to-be-processed message does not meet the traffic distribution policy, the to-be-processed message is transmitted to the second database.
[0122] According to an embodiment of the present application, when a matching message parameter corresponding to the message parameter of the to-be-processed message is found in the whitelist, if the to-be-processed message hits the traffic distribution policy, the to-be-processed message can be stored in the first database at this time.
[0123] According to an embodiment of the present application, if the to-be-processed message does not hit the traffic distribution policy, the message parameters of the to-be-processed message are iteratively matched in the whitelist to confirm whether the to-be-processed message is transmitted to the first database. The reason for iterative judgment is that since the second database has stored messages multiple times in the historical period, the storage pressure of the second database is greater than that of the first database at this time. Therefore, preferably, the to-be-processed message at the current moment is stored in the first database. If the to-be-processed message still does not hit the traffic distribution policy after multiple iterations, the to-be-processed message is stored in the second database at this time.
[0124] Figure 5 Schematically shows the processing flow chart of the message processing system according to an embodiment of the present application.
[0125] In a specific embodiment, taking the trading channel as the brokerage channel as an example for illustration, see Figure 5 , the securities company of the brokerage channel uses the brokerage terminal to send the to-be-processed message through the securities network, and the to-be-processed message enters the message processing system through the Network Address Translation (NAT) interface of the message processing system. When the first database is not configured, the access layer in the isolation area processes the to-be-processed message and transmits the to-be-processed message to the gateway in the intranet area through the front-end management tool, and the gateway transmits the to-be-processed message to the bank-securities access layer 1, and the bank-securities access layer 1 stores the to-be-processed message in the second database in the bank-securities service layer 1.
[0126] According to an embodiment of the present application, after the first database is configured, the message to be processed in the isolation area is converted into a socket format or a fixed-length message to be processed through the network address translation structure of the message processing system, and the message to be processed is forwarded to the protocol adapter through the access layer, network device or service (Server Load Balancer, SLB) in the isolation area. The message to be converted is transmitted to the internal network access layer in the internal network area via the protocol adapter, and then forwarded to the bank-securities access layer 2 through another network device or service (Server Load Balancer, SLB). The message processing method of this embodiment is executed in the bank-securities access layer 2, so that the message to be processed is stored in the first database or stored in the second database through the bank-securities access layer 1.
[0127] According to an embodiment of the present application, Figure 5 The return flow in it means that when the first database in the new link (the link with the first database added) fails, the message to be processed is timely transmitted to the original link (the link for original message processing) through the access layer in the isolation area or the internal network access layer in the internal network area to store the message to be processed in the second database.
[0128] According to an embodiment of the present application, when adding the first database, experiments are first carried out through some brokerage channels. For example, all the messages to be processed uploaded by the brokerage channel can be stored in the first database. If the experiment is successful, the traffic configuration parameters can be set. And in the early stage of setting the first database (for example, the first 3 months), the traffic configuration parameters can be configured according to a gradient. For example, the traffic configuration parameter in the first month is 40%, the traffic configuration parameter in the second month is 80%, and the traffic configuration parameter in the third month is 100%, so as to complete the switch between the two databases.
[0129] Figure 6 Schematically shows a processing flow chart of a message processing system according to another embodiment of the present application.
[0130] According to an embodiment of the present application, see Figure 6 , before the traffic configuration parameter is set to 100%, in response to the synchronization instruction of the staff, the two databases can synchronize data from each other's databases. For example, the second database synchronizes data from the first database to avoid affecting the timeliness of message processing after any database fails.
[0131] Based on the above message processing method, the present application also provides a message processing device. The following will be combined with Figure 7 to describe this device in detail.
[0132] Figure 7 Schematically shows a structural block diagram of a message processing device according to an embodiment of the present application.
[0133] As Figure 7 shown, the message processing device 700 of this embodiment includes an acquisition module 710, an identification module 720, a matching module 730, a confirmation module 740, and a transmission module 750.
[0134] The acquisition module 710 is configured to acquire the message to be processed and the message processing policy of the message processing system.
[0135] The identification module 720 is configured to identify the message parameters of the message to be processed when the message processing policy is a list matching policy.
[0136] The matching module 730 is configured to perform parameter matching processing on the white list based on the message parameters to obtain a parameter matching result, where the white list includes at least one initial message parameter.
[0137] The confirmation module 740 is configured to confirm whether the message to be processed meets the traffic allocation policy to obtain a message allocation result when the parameter matching result indicates that at least one initial message parameter includes a matching message parameter that matches the message parameters.
[0138] The transmission module 750 is configured to transmit the message to be processed to the first database or the second database of the message processing system based on the message allocation result.
[0139] According to the embodiment of the present application, when the message processing system processes the message to be processed, if the message processing policy in the message processing system is a list matching policy, it is searched in the white list whether there is a matching message parameter corresponding to the message parameters of the message to be processed. If there is a matching message parameter, it is confirmed whether the message to be processed meets the traffic allocation policy to obtain a message allocation result, and the message to be processed is transmitted to the first database or the second database of the message processing system based on the message allocation result. Since the storage location of the message to be processed is jointly determined by the white list and the traffic allocation policy during message allocation, reasonable allocation of traffic in the message processing system is achieved, thereby reducing the storage pressure on any database.
[0140] According to the embodiment of the present application, the message parameters include the transaction type of the message to be processed.
[0141] According to the embodiment of the present application, the matching module 730 includes a first generation unit and a second generation unit.
[0142] The first generation unit is configured to generate a first matching result when at least one initial message parameter includes a matching transaction type that matches the transaction type.
[0143] The second generation unit is used to generate a second matching result when at least one initial message parameter does not include a matching transaction type that matches the transaction type, where the parameter matching result includes the first matching result or the second matching result.
[0144] According to an embodiment of the present application, the message parameter further includes at least one account attribute information.
[0145] According to an embodiment of the present application, the matching module 730 further includes an obtaining unit.
[0146] The obtaining unit is used to find matching attribute information that matches at least one account attribute information among multiple initial account attribute information in the whitelist, and obtain an attribute matching result; to generate a first matching result when the attribute matching result indicates that there is matching attribute information that matches each account attribute information.
[0147] According to an embodiment of the present application, the matching module 730 further includes a transmission unit.
[0148] The transmission unit is used to transmit the message to be processed to the second database when the parameter matching result is the second matching result or the attribute matching result indicates that there is no matching attribute information that matches any account attribute information.
[0149] According to an embodiment of the present application, the message processing device 700 further includes a second obtaining module, a second transmission module, and a third transmission module.
[0150] The second obtaining module is used to obtain the emergency switch parameter of the message processing system when the message processing strategy is an emergency strategy.
[0151] The second transmission module is used to transmit the message to be processed to the first database when the emergency switch parameter is the first value.
[0152] The third transmission module is used to transmit the message to be processed to the second database when the emergency switch parameter is the second value.
[0153] According to an embodiment of the present application, the message processing device 700 further includes a first judgment module, a fourth transmission module, and a fifth transmission module.
[0154] The first judgment module is used to judge whether the message to be processed meets the traffic ratio strategy and obtain a traffic judgment result when the message processing strategy is a traffic ratio strategy.
[0155] The fourth transmission module is used to transmit the message to be processed to the first database when the traffic judgment result indicates that the message to be processed meets the traffic ratio strategy.
[0156] The fifth transmission module is used to transmit the to-be-processed packet to the second database when the traffic judgment result indicates that the to-be-processed packet does not meet the traffic ratio policy.
[0157] According to an embodiment of the present application, the packet processing device 700 further includes a second judgment module, an obtaining module, and a sixth transmission module.
[0158] The second judgment module is used to judge whether the packet processing system is configured with traffic configuration parameters before confirming whether the to-be-processed packet meets the traffic allocation policy, so as to obtain a configuration judgment result.
[0159] The obtaining module is used to judge whether the to-be-processed packet meets the traffic allocation policy when the configuration judgment result indicates that the traffic configuration parameters have been configured, so as to obtain a packet allocation result.
[0160] The sixth transmission module is used to transmit the to-be-processed packet to the second database when the configuration judgment result indicates that the traffic configuration parameters have not been configured.
[0161] According to an embodiment of the present application, the transmission module 750 includes a first transmission unit, a re-matching unit, and a second transmission unit.
[0162] The first transmission unit is used to transmit the to-be-processed packet to the first database when the packet allocation result indicates that the to-be-processed packet meets the traffic allocation policy.
[0163] The re-matching unit is used to iteratively match the packet parameters of the to-be-processed packet in the whitelist when the packet allocation result indicates that the to-be-processed packet does not meet the traffic allocation policy, so as to confirm whether to transmit the to-be-processed packet to the first database.
[0164] The second transmission unit is used to transmit the to-be-processed packet to the second database when the number of matches meets the preset number threshold and the to-be-processed packet does not meet the traffic allocation policy.
[0165] According to an embodiment of the present application, any multiple of the acquisition module 710, the recognition module 720, the matching module 730, the confirmation module 740, and the transmission module 750 may be combined and implemented in one module, or any one of them may be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules may be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present application, at least one of the acquisition module 710, the recognition module 720, the matching module 730, the confirmation module 740, and the transmission module 750 may 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 chip, a system on substrate, a system on package, an application specific integrated circuit (ASIC), or may be implemented by any other reasonable means such as integrating or packaging circuits, etc., in hardware or firmware, or implemented in any one of the three implementation manners of software, hardware, and firmware, or in an appropriate combination of any several of them. Alternatively, at least one of the acquisition module 710, the recognition module 720, the matching module 730, the confirmation module 740, and the transmission module 750 may be at least partially implemented as a computer program module, and when the computer program module runs, it can execute corresponding functions.
[0166] Figure 8 A block diagram of an electronic device suitable for implementing the above method according to an embodiment of the present application is schematically shown.
[0167] As Figure 8 shown, the electronic device 800 according to an embodiment of the present application 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 section 808 into a random access memory (RAM) 803. The processor 801 may include, for example, a general microprocessor (such as a CPU), an instruction set processor, and / or a related chipset, and / or a dedicated microprocessor (such as an application specific integrated circuit (ASIC)), etc. The processor 801 may also include on-board 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 application.
[0168] In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present application by executing the programs in the ROM 802 and / or the RAM 803. It should be noted that the programs may also be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flow according to the embodiments of the present application by executing the programs stored in the one or more memories.
[0169] According to an embodiment of the present application, the electronic device 800 may further include an input / output (I / O) interface 805, and the input / output (I / O) interface 805 is also connected to the bus 804. The electronic device 800 may further include one or more of the following components connected to the input / output (I / O) interface 805: an input portion 806 including a keyboard, a mouse, etc.; an output portion 807 including, for example, 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 driver 810 is also connected to the input / output (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 driver 810 as needed so that a computer program read from it can be installed into the storage portion 808 as needed.
[0170] The present application also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist separately without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the one or more programs are executed, the method according to the embodiments of the present application is implemented.
[0171] According to an embodiment of the present application, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In the present application, the computer-readable storage medium may be any tangible medium that contains or stores a program, and this program can be used by or in conjunction with an instruction execution system, apparatus, or device. For example, according to an embodiment of the present application, the computer-readable storage medium may include the above-described ROM 802 and / or RAM 803 and / or one or more memories other than ROM 802 and RAM 803.
[0172] An embodiment of the present application further includes a computer program product, which includes a computer program that contains program code for executing the method shown in the flowchart. When the computer program product runs in a computer system, the program code is used to enable the computer system to implement the method provided by the embodiment of the present application.
[0173] When the computer program is executed by the processor 801, it executes the above functions defined in the system / apparatus of the embodiment of the present application. According to an embodiment of the present application, the above-described systems, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0174] In one embodiment, the computer program can rely on tangible storage media such as optical storage devices and magnetic storage devices. In another embodiment, the computer program can also be transmitted and distributed in the form of a signal on a network medium, and is downloaded and installed through the communication part 809, and / or installed from the removable medium 811. The program code contained in the computer program can be transmitted by any suitable network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0175] 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, it executes the above functions defined in the system of the embodiment of the present application. According to an embodiment of the present application, the above-described systems, devices, apparatuses, modules, units, etc. can be implemented by computer program modules.
[0176] According to embodiments of the present application, program code for executing the computer programs provided by the embodiments of the present application can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level procedural and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, such as Java, C++, Python, the "C" language, or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., by using an Internet service provider to connect through the Internet).
[0177] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of code, and the above-mentioned module, program segment, or part of code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than marked in the accompanying drawings. For example, two consecutive blocks shown can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram or flowchart, and the combination of blocks in the block diagram or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0178] Those skilled in the art can understand that the features described in the various embodiments of the present application can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly described in the present application. In particular, without departing from the spirit and teachings of the present application, the features described in the various embodiments of the present application can be combined and / or combined in various ways. All such combinations and / or combinations fall within the scope of the present application.
[0179] The above describes the embodiments of the present application. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present application. Although the embodiments are described separately above, this does not mean that the measures in each embodiment cannot be used advantageously in combination. Without departing from the scope of the present application, those skilled in the art can make various substitutions and modifications, and all such substitutions and modifications should fall within the scope of the present application.
Claims
1. A message processing method, characterized in that, The method includes: Obtaining a message to be processed and a message processing strategy of a message processing system; When the message processing strategy is a list matching strategy, identifying message parameters of the message to be processed; Based on the message parameters, performing parameter matching processing in a whitelist, and obtaining a parameter matching result, where the whitelist includes at least one initial message parameter; When the parameter matching result indicates that the at least one initial message parameter includes a matching message parameter that matches the message parameters, determining whether the message to be processed meets a traffic allocation strategy, and obtaining a message allocation result; Based on the message allocation result, transmitting the message to be processed to a first database or a second database of the message processing system.
2. The method according to claim 1, wherein The message parameters include the transaction type of the message to be processed; Wherein, based on the message parameters, performing parameter matching processing in a whitelist, and obtaining a parameter matching result, includes: When at least one of the initial message parameters includes a matching transaction type that matches the transaction type, generating a first matching result; When at least one of the initial message parameters does not include a matching transaction type that matches the transaction type, generating a second matching result, where the parameter matching result includes the first matching result or the second matching result.
3. The method according to claim 2, wherein The message parameters further include at least one account attribute information; Wherein, before generating the first matching result, it further includes: Searching for matching attribute information that matches at least one of the account attribute information among multiple initial account attribute information in the whitelist, and obtaining an attribute matching result; When the attribute matching result indicates that there is matching attribute information that matches each of the account attribute information, generating the first matching result.
4. The method according to claim 3, wherein It further includes: When the parameter matching result is the second matching result or the attribute matching result indicates that there is no matching attribute information that matches any of the account attribute information, transmitting the message to be processed to the second database.
5. The method according to claim 1, wherein It further includes: When the message processing strategy is an emergency strategy, obtaining an emergency switch parameter of the message processing system; When the emergency switch parameter is a first value, transmitting the message to be processed to the first database; When the emergency switch parameter is a second value, transmitting the message to be processed to the second database.
6. The method according to claim 1, wherein It further includes: When the message processing strategy is a traffic matching strategy, determining whether the message to be processed meets the traffic matching strategy, and obtaining a traffic determination result; When the traffic determination result indicates that the message to be processed meets the traffic matching strategy, transmitting the message to be processed to the first database; When the traffic determination result indicates that the message to be processed does not meet the traffic matching strategy, transmitting the message to be processed to the second database.
7. The method according to claim 1, wherein Before determining whether the message to be processed meets the traffic allocation strategy, determining whether the message processing system is configured with traffic configuration parameters, and obtaining a configuration determination result; When the configuration judgment result indicates that the traffic configuration parameters have been configured, determine whether the to-be-processed packet meets the traffic allocation policy to obtain the packet allocation result; When the configuration judgment result indicates that the traffic configuration parameters have not been configured, transmit the to-be-processed packet to the second database.
8. The method according to claim 1, wherein Based on the packet allocation result, transmitting the to-be-processed packet to the first database or the second database of the packet processing system includes: When the packet allocation result indicates that the to-be-processed packet meets the traffic allocation policy, transmit the to-be-processed packet to the first database; When the packet allocation result indicates that the to-be-processed packet does not meet the traffic allocation policy, iteratively match the packet parameters of the to-be-processed packet in the whitelist to confirm whether to transmit the to-be-processed packet to the first database; When the number of matches meets the preset number threshold and the to-be-processed packet does not meet the traffic allocation policy, transmit the to-be-processed packet to the second database.
9. A message processing device, characterized in that, The device includes: An acquisition module, configured to acquire a to-be-processed packet and a packet processing policy of a packet processing system; An identification module, configured to identify the packet parameters of the to-be-processed packet when the packet processing policy is a list matching policy; A matching module, configured to perform parameter matching processing on the whitelist based on the packet parameters to obtain a parameter matching result, where the whitelist includes at least one initial packet parameter; A confirmation module, configured to confirm whether the to-be-processed packet meets the traffic allocation policy to obtain a packet allocation result when the parameter matching result indicates that the at least one initial packet parameter includes a matching packet parameter that matches the packet parameters; A transmission module, configured to transmit the to-be-processed packet to the first database or the second database of the packet processing system based on the packet allocation result.
10. An electronic device, including: One or more processors; A memory, configured to store one or more computer programs, Characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 8.
11. A computer-readable storage medium having a computer program or instructions stored thereon, characterized in that, When the computer program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.
12. A computer program product comprising a computer program or instructions, characterized in that, When the computer program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 8 are implemented.