Data processing method, device, electronic device, and readable storage medium

By assigning an independent message queue to each node of the business system and matching feedback information using node identifiers and system identifiers, the inaccurate message scheduling problem caused by the shared queues of multiple nodes is solved, and more efficient feedback information processing and accurate message scheduling are achieved.

CN116614452BActive Publication Date: 2025-09-02BEIJING QIYI CENTURY SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310465016.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-09-02
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In system-centralized applications, multiple business nodes of the business system share a message queue, resulting in feedback messages being randomly processed, resulting in poor message scheduling accuracy, affecting the processing efficiency of the business system and verification of test results.

Method used

Each business node is assigned an independent message queue, and the feedback information is matched through the node identification and the system identification to ensure that the feedback information is processed only at the target node.

Benefits of technology

It improves the accuracy of message scheduling, avoids duplicate processing of feedback information, ensures that the service nodes can correctly process the required feedback information, and improves the processing efficiency of the business system and the reliability of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116614452B_ABST
    Figure CN116614452B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a data processing method, device, electronic device, and readable storage medium. The method includes: receiving feedback information sent by a central system through a message queue corresponding to a business node, the feedback information being sent by the central system in response to a business processing request submitted by a target node in the business system; when the business node is a target node, determining feedback information that matches the business processing request from the feedback information as first target feedback information; and performing a first processing operation based on the first target feedback information. In this way, each business node can interact with the central system for data through its own independent message queue, and the business node can determine and process feedback information that matches the business processing request from the feedback information only when the business node is a target node, so that the business node that submitted the business processing request can process the corresponding feedback information, thereby improving the accuracy of message scheduling.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a data processing method, device, electronic device, and readable storage medium. Background Art

[0002] With the development of computer technology, the application of system centralization is becoming increasingly widespread. Currently, a business system may have multiple different version environments, that is, a business system may include multiple business nodes. When a business system interacts with a central system, each business system corresponds to an independent message queue, and the business system determines the feedback messages it needs to process based on the business system's system identifier. However, multiple business nodes in a business system correspond to the same system identifier. The message queue may randomly activate any business node to receive feedback information. Therefore, the feedback message of the central system may be randomly processed by any business node in the business system.

[0003] This random processing mechanism may cause the business node that submits the business processing request to be unable to process the corresponding feedback information, resulting in poor accuracy of message scheduling. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a data processing method, device, electronic device, and readable storage medium to improve the accuracy of message scheduling. The specific technical solution is as follows:

[0005] In a first aspect of the present invention, a data processing method is provided. The method is applied to any service node included in a service system, wherein the service system includes at least two service nodes, and each service node corresponds to a message queue, comprising:

[0006] receiving feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system;

[0007] In a case where the service node is the target node, determining feedback information matching the service processing request from the feedback information as first target feedback information;

[0008] A first processing operation is performed based on the first target feedback information.

[0009] In a second aspect of the present invention, another data processing method is provided, which is applied to a central system and includes:

[0010] Receiving a service processing request submitted by a target node in a service system; the target node is any service node in the service system;

[0011] In response to the business processing request, feedback information is sent to each business node based on the message queue corresponding to each business node in the business system, so that the business node, when the business node is the target node, determines the feedback information that matches the business processing request from the feedback information as the first target feedback information, and performs a first processing operation based on the first target feedback information.

[0012] In a third aspect of the present invention, a data processing device is provided. The device is provided in any service node included in the service system, including:

[0013] A first receiving module is configured to receive feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system;

[0014] a first determining module, configured to determine, when the service node is the target node, feedback information matching the service processing request from the feedback information as first target feedback information;

[0015] A first processing module is configured to perform a first processing operation based on the first target feedback information.

[0016] In a fourth aspect of the present invention, another data processing device is provided, which is arranged in a central system and includes:

[0017] A second receiving module is configured to receive a service processing request submitted by a target node in the service system; the target node is any service node in the service system;

[0018] A first sending module is used to send feedback information to each business node in the business system in response to the business processing request based on the message queue corresponding to each business node, so that the business node can determine the feedback information that matches the business processing request from the feedback information when the business node is the target node, as the first target feedback information, and perform a first processing operation based on the first target feedback information.

[0019] In another aspect of the present invention, a computer-readable storage medium is provided, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the data processing method described in the first aspect or the data processing method described in the second aspect.

[0020] In another aspect of the present invention, a computer program product comprising instructions is provided. When the computer program product is run on a computer, the computer executes the data processing method described in the first aspect or the data processing method described in the second aspect.

[0021] The data processing method provided by an embodiment of the present invention receives feedback information sent by a central system through a message queue corresponding to a business node. The feedback information is sent by the central system in response to a business processing request submitted by a target node in the business system. When the business node is the target node, feedback information matching the business processing request is determined from the feedback information as first target feedback information. A first processing operation is performed based on the first target feedback information. In this way, different business nodes can establish communication with the central system through their corresponding message queues, so that each business node can directly interact with the central system for data and obtain feedback information through its own independent message queue, thereby avoiding the situation where each business node included in the same business system uses the same message queue, causing the feedback message of the central system to be randomly processed by any business node under the business system. However, if each business node uses an independent message queue to receive feedback information without distinguishing the feedback information, each business node will only process all feedback information corresponding to the business system in the message queue, resulting in all feedback information corresponding to the business system being processed repeatedly. Therefore, further, the business node only determines the feedback information that matches the business processing request from the feedback information when the business node is the target node. In this way, the business node can obtain the feedback information that needs to be processed by the business node, that is, the first target feedback information that matches the business processing request, thereby avoiding repeated processing of the feedback information and enabling the business node that submitted the business processing request to process the corresponding feedback information, thereby improving the accuracy of message scheduling. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for describing the embodiments or the prior art.

[0023] Figure 1 A flowchart of the steps of the data processing method provided by an embodiment of the present invention;

[0024] Figure 2 A schematic diagram of message scheduling in the prior art provided by an embodiment of the present invention;

[0025] Figure 3 A specific example diagram provided for an embodiment of the present invention;

[0026] Figure 4 A flowchart of another data processing method provided by an embodiment of the present invention;

[0027] Figure 5 A schematic diagram of a data processing device provided by an embodiment of the present invention;

[0028] Figure 6 A schematic diagram of another data processing device provided by an embodiment of the present invention;

[0029] Figure 7 A schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present invention will be described below with reference to the accompanying drawings in the embodiments of the present invention.

[0031] Figure 1 This is a flowchart of the steps of a data processing method in an embodiment of the present invention, which is applied to any business node included in a business system. The business system includes at least two business nodes, and each business node corresponds to a message queue.

[0032] In a test or development environment, a business system may be maintained by multiple developers simultaneously. These developers may adjust the business system code based on varying needs. These adjustments must pass testing and verification before they can be deployed in a production environment. After developers adjust the code, the code version is updated, effectively deploying a different version of the business system. In this embodiment of the present invention, different version environments are defined as different business nodes.

[0033] It should be noted that for the formal environment of a business system, generally speaking, the code version of the business system running on one or more devices in the formal environment is consistent, but if there are different version environments in the formal environment, that is, it contains multiple business nodes, the method described in the embodiment of the present invention is also applicable.

[0034] Figure 2 A schematic diagram of a message scheduling in the prior art is shown. Figure 2As shown, business system B includes business node b, business node b-1, and business node b-2. When the central system returns feedback information to business system A and business system C, it can use the message queues allocated to business system A and business system C to enable business system A and business system C to obtain the feedback messages they need to process. The central system allocates a message queue to business system B, but at this time business system B contains multiple business nodes. Therefore, when the central system returns the feedback message through the message queue allocated to business system B, it may be received by a random business node, which will cause inaccurate message scheduling and affect the processing efficiency of the business system. For example, in a test environment, after modifying the code logic, the tester will hope that certain feedback information can be processed by a designated business node to verify the consistency of the processing result with the expected result. Some uncontrollable random processing will make it impossible for the tester to judge whether the test result is correct. For example, a test engineer initiates an approval request at business node b-1 and expects to receive the execution results of E1.1-E2-E3 at business node b-1. However, if the feedback message is processed by business node b or business node b-2, only the execution results of E1-E2-E3 are received. At this point, it is impossible to verify the correctness of the program logic at business node b-1.

[0035] In the embodiment of the present invention, different service nodes in the same service system may correspond to different independent message queues (MQ), and the message queue corresponding to each service node is used to communicate with the central system.

[0036] like Figure 1 As shown, the method includes:

[0037] Step 101: receiving feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system.

[0038] In an embodiment of the present invention, the target node can be any service node included in any business system within the access center system. When the business data generated by the target node requires processing by the central system, a business processing request must be submitted to the central system. The central system can be a payment center system, an order center system, an approval center system, or the like. Taking the approval center system as an example, when the business data of the business system requires approval from the approval center system, i.e., when an approval requirement is generated, a business processing request must be submitted to the approval center system to satisfy the approval function required by the target node. The business processing request can include the business data generated by the target node, a node label, and a target system identifier corresponding to the business system to which the target node belongs. The node label can be the target node's node label or an empty label. The node label can be determined based on the target node's current business needs. When the target node submitting the business processing request needs to obtain feedback information corresponding to the business processing request, the node label is the target node's node label; when the target node submitting the business processing request does not need to obtain feedback information corresponding to the business processing request, the node label is an empty label.

[0039] Among them, feedback information is sent by the central system in response to the business processing request submitted by the target node in the business system. When the central system receives the business processing request submitted by the target node, it processes the business data included in the business processing request, obtains feedback information corresponding to the business processing request, and sends the feedback information to each business node based on the message queue corresponding to each business node. Since the message queue of each business node can receive a full amount of feedback messages, that is, each business node can receive feedback information corresponding to other business systems and / or other business nodes as well as feedback information corresponding to the business processing request submitted by the target node, each business node can filter and select the feedback information that the business node needs to pay attention to according to the preset protocol.

[0040] In this embodiment of the present invention, after a target node submits a service processing request to the central system, the central system responds to the service processing request by sending feedback information corresponding to the service processing request to each service node in the service system via the message queue corresponding to each service node. Any service node in the service system can receive the feedback information in the message queue and then choose to process or discard the feedback information.

[0041] Step 102: When the service node is the target node, feedback information matching the service processing request is determined from the feedback information as first target feedback information.

[0042] When receiving feedback information returned by the central system, the service node may determine the feedback information that the service node needs to process according to the preset protocol agreed upon between the service nodes. The preset protocol may include each service node processing the feedback information that matches the service processing request submitted by each service node.

[0043] In an embodiment of the present invention, the target node is a business node that submits a business processing request to the central system. In the case where the business node is the target node, the first target feedback information is the feedback information that the target node needs to pay attention to and process, and the feedback information that matches the business processing request can be the feedback information obtained by the central system in response to the business processing request. Since the feedback information may include feedback information corresponding to other business systems and / or other business nodes and feedback information corresponding to this business node, it is necessary to filter out the feedback information that this business node needs to pay attention to and obtain. In other words, if the business node is the target node, that is, it represents that the business node has submitted a business processing request, then the business node needs to filter the feedback information corresponding to the business processing request so that the business node that submitted the business processing request can receive the corresponding feedback information.

[0044] Step 103: Perform a first processing operation based on the first target feedback information.

[0045] In an embodiment of the present invention, after determining the first target feedback information, a first processing operation is performed based on the first target feedback information. The first processing operation can be determined based on the processing flow corresponding to the business data. For example, if the central system is an approval system, the business node can perform the first processing operation based on the approved first target feedback information. For example, the first processing operation can be to process the business data corresponding to the approved first target feedback information, or to suspend processing of the business data corresponding to the unapproved first target feedback information and provide feedback to relevant personnel.

[0046] In summary, the data processing method provided by the embodiment of the present invention receives feedback information sent by the central system through the message queue corresponding to the business node. The feedback information is sent by the central system in response to the business processing request submitted by the target node in the business system; when the business node is the target node, the feedback information that matches the business processing request is determined from the feedback information as the first target feedback information; and the first processing operation is performed based on the first target feedback information. In this way, different business nodes can establish communication with the central system through their corresponding message queues, so that each business node can directly interact with the central system for data through its own independent message queue and obtain feedback information, thereby avoiding the use of the same message queue by each business node included in the same business system, causing the feedback message of the central system to be randomly processed by any business node under the business system. However, if each business node uses an independent message queue to receive feedback information without distinguishing the feedback information, each business node will only process all feedback information corresponding to the business system in the message queue, resulting in all feedback information corresponding to the business system being processed repeatedly. Therefore, further, the business node only determines the feedback information that matches the business processing request from the feedback information when the business node is the target node. In this way, the business node can obtain the feedback information that needs to be processed by the business node, that is, the first target feedback information that matches the business processing request, thereby avoiding repeated processing of the feedback information and enabling the business node that submitted the business processing request to process the corresponding feedback information, thereby improving the accuracy of message scheduling.

[0047] Optionally, the business processing request includes a target system identifier. When the central system is connected to multiple business systems, in order to distinguish between different business systems and accurately return feedback information to the corresponding business system, after the business system is connected to the central system through registration, the central system will generate a corresponding system identifier for each business system. This system identifier is unique, that is, each business system connected to the central system corresponds to a unique system identifier.

[0048] In the embodiment of the present invention, the service processing request submitted by the target node in step 101 can be obtained through the following steps:

[0049] Step 201: Acquire the business data generated by the target node and the target system identifier corresponding to the business system, and determine the node label based on the current business requirements of the target node; the target system identifier is generated by the central system for the business system.

[0050] In the process of processing business, the business system will generate business data that needs to be processed by the central system. After the business data is processed by the central system, the business system side will perform subsequent processing based on the feedback information returned by the central system. In an embodiment of the present invention, the target node can obtain the business data generated by the target node, the target system identifier corresponding to the business system containing the target node, and the node label determined based on the current business needs of the target node. The current business needs can be determined based on the processing flow required for the business currently processed by the target node, or can be determined based on the business needs manually input by the business processing personnel operating the business system. The embodiment of the present invention does not impose any restrictions on this.

[0051] Step 202: Generate the business processing request based on the business data, the target system identifier, and the node label.

[0052] In the embodiment of the present invention, the service data, the target system identifier and the node label may be encapsulated to generate a service processing request.

[0053] In an embodiment of the present invention, by generating a business processing request using the target system identifier, business data, and node label, the central system can process the business data, and the target node can determine the first target feedback information based on the target system identifier and node label, thereby improving the accuracy of message scheduling to a certain extent.

[0054] Optionally, the service processing request carries a node label of the target node.

[0055] In an embodiment of the present invention, a business processing request submitted by a target node may carry a node tag corresponding to the target node or an empty tag. If the business processing request does not carry a node tag corresponding to the target node, the node tag carried by the business processing request is an empty tag. The node tag of the target node can be a unique identifier corresponding to the target node. Each business node can correspond to a unique node tag. The node tag can represent the submitter of the business processing request and the location where the business data is generated. The corresponding business node can be determined based on the node tag. Whether the feedback information carries the target node tag is related to whether the business processing request corresponding to the feedback information contains the target node tag. That is, when the target node submits a business processing request to the central system, the target node can determine the node tag in the business processing request based on current business needs. If the target node needs to pay attention to feedback information corresponding to the business data, the business processing request carries the node tag of the target node. In this case, the business processing request submitted by the target node to the central system includes the business data, the target system identifier, and the node tag of the target node. After the central system processes the business data in the business processing request, the feedback information returned corresponding to the business processing request also carries the node tag of the target node and the target system identifier. The node label and target system identifier carried in the feedback information corresponding to the business processing request returned by the central system are the same as the node label and target system identifier carried in the business processing request submitted by the target node.

[0056] If the target node needs to obtain feedback information corresponding to the business processing request, that is, it indicates that the target node needs to pay attention to the feedback information returned by the processing center system that matches the business processing request submitted by the target node. Therefore, in order to facilitate the target node to filter out the feedback information that matches the submitted business processing request, the business processing request carries a node tag corresponding to the target node. If the target node does not need to obtain feedback information corresponding to the business processing request, that is, it indicates that the target node does not need to pay attention to the feedback information returned by the processing center system. Therefore, in order to save the maintenance cost of the message queue of the target node that does not need to pay attention to the feedback information returned by the processing center system, the business processing request can carry an empty tag, that is, it indicates that the feedback information corresponding to the business processing request submitted by the target node does not need to be notified to the target node. In this way, based on the business needs of the target node, the tag carried in the business processing request can enable the target node that needs to obtain feedback information corresponding to the business processing request to determine the feedback information that needs to be processed based on the target node's node tag. Target nodes that do not need to obtain feedback information corresponding to the business processing request do not need to carry the target node's node tag in the business processing request, which to a certain extent increases the flexibility of setting node tags in business processing requests.

[0057] When the business processing request carries the node label of the target node, it indicates that the target node needs to obtain feedback information that matches the submitted business processing request. Therefore, when the business node is the target node, the target node needs to determine the feedback information that matches the business processing request from the feedback information.

[0058] The operation of determining feedback information matching the service processing request from the feedback information as the first target feedback information in step 102 may include the following steps:

[0059] Step 1021: Determine the feedback information that has a system identifier that matches a target system identifier as feedback information to be screened; the target system identifier is the system identifier of the business system.

[0060] In an embodiment of the present invention, the central system may be connected to multiple business systems, so different business systems can be distinguished by system identifiers. Since the central system returns the full amount of feedback information through the message queue corresponding to the target node, the target node needs to determine the target feedback information that the target node needs to pay attention to and process. Specifically, the feedback information to be screened can be determined based on the target system identifier corresponding to the business system. The feedback information to be screened can be the feedback information corresponding to the business processing request submitted by each business node under the business system to which the target node belongs. The target system identifier is matched with the system identifier carried by the feedback information for consistency, and one or more feedback information with consistent system identifiers are used as feedback information to be screened.

[0061] Step 1022: Determine the first target feedback information from the feedback information to be filtered based on the node label carried by the feedback information to be filtered and the node label of the target node.

[0062] In an embodiment of the present invention, based on the node tag carried by the feedback information to be screened determined in step 1031, the first target feedback information to be processed by the target node is determined from the feedback information to be screened corresponding to the business system. By matching the node tag carried by the feedback information to be screened with the node tag of the target node, the first target feedback information to be processed by the target node can be determined from the feedback information to be screened. Specifically, the feedback information to be screened whose carried node tag matches the node tag of the target node can be determined as the first target feedback information.

[0063] In an embodiment of the present invention, the feedback information to be filtered can be determined through system identifier matching, and the first target feedback information that the target node needs to process can be further determined based on the node label. In this way, the feedback information can be matched and filtered step by step, and finally the first target feedback information is determined to ensure the accuracy of message scheduling.

[0064] Optionally, the embodiment of the present invention may further include the following steps:

[0065] Step 301: When the node attribute of the service node indicates that the service node is a master node, feedback information with a node label of an empty label is filtered from the feedback information to be filtered as second target feedback information.

[0066] Step 302: Perform a second processing operation based on the second target feedback information.

[0067] In an embodiment of the present invention, a service node can be divided into a master node and a slave node, and the master node and the slave node can be determined by startup parameters. The master node can be a default node of the service system. The preset protocol can also include that when the service node is the master node, the master node is also required to process feedback information with an empty label in the feedback information to be screened. That is, the master node is responsible for processing feedback information with a target node label corresponding to the service node and feedback information with an empty node label in the feedback information to be screened, while the slave node is only responsible for processing feedback information with a target node label corresponding to the service node in the feedback information to be screened. In the case where the node attribute of the business node represents that the business node is a master node, the master node, as the default node of the business system, needs to process the feedback information with the node label of the empty label carried in the feedback information to be filtered, that is, the master node needs to uniformly process the feedback information corresponding to the business processing requests submitted by other nodes in the business system to which it belongs (such as other slave nodes under the business system to which it belongs) that do not need to obtain feedback information. Therefore, the master node needs to filter the feedback information with the node label of the empty label corresponding to the business system to which the master node belongs, and use the feedback information with the node label of the empty label carried in the feedback information to be filtered as the second target feedback information, and perform a second processing operation on the second target feedback information to ensure that each feedback information returned by the central system can be consumed, avoiding the situation where the feedback information consumption fails. The second processing operation can be the same as the first processing operation, or it can be different from the first processing operation.

[0068] It should be noted that, when the business node is both the target node and the master node, it is necessary to filter out feedback information from the feedback information to be filtered that carries a label that is consistent with the node label carried by the submitted business processing request, and it is also necessary to filter out feedback information that carries an empty node label for processing; when the business node is not the target node but is the master node, the business node needs to filter out feedback information that carries an empty node label from the feedback information to be filtered for processing; when the business node is neither the target node nor the master node, there is no need to process the feedback information.

[0069] It is understandable that there may be some old business nodes in the business system that do not implement the preset protocol agreed upon between the business nodes. Therefore, the node tags in the business processing requests submitted by these old business nodes are empty. Correspondingly, the node tags carried in the feedback information corresponding to the business processing requests are also empty. Therefore, by processing the feedback information with empty node tags through the main node, the feedback information of the old business nodes can also be processed.

[0070] Exemplarily, the business system includes a master node B, slave nodes B-1, and B-2. Correspondingly, the target node label corresponding to the master node B is b, and the target node labels corresponding to the slave nodes B-1 and B-2 are b-1 and b-2, respectively. For the slave node B-1, the submitted business processing request carries the label b-1. After determining that the feedback information to be screened is obtained, the business system B-1 needs to filter out the feedback information with the node label b-1 from the feedback information to be screened for processing. For the master node B, in addition to filtering out the feedback information with the node label b from the feedback information to be screened, it is still necessary to filter out the feedback information with the node label empty from the feedback information to be screened for processing.

[0071] In an embodiment of the present invention, the master node processes the feedback information whose node label is an empty label, so that the feedback information corresponding to the business processing request submitted by each business node in the business system can be processed. Moreover, since the business node containing the empty label in the submitted business processing request does not need to receive and process the feedback information corresponding to the business processing request, the message queue maintenance cost of the business node containing the empty label in the submitted business processing request is also saved.

[0072] Optionally, the embodiment of the present invention may further include the following steps:

[0073] Step 401: When the service processing request carries an empty tag, the service node is the target node, and the node attribute of the service node indicates that the service node is a slave node, discard the feedback information.

[0074] In an embodiment of the present invention, when the business processing request does not carry the node label of the target node, the node label in the business processing request is an empty label. The node label in the business processing request is an empty label, which can indicate that the target node does not need to obtain the feedback information corresponding to the submitted business processing request, that is, the target node does not need to pay attention to the processing of the corresponding feedback information. When the business node is the target node and is a slave node and the business processing request carries an empty label, that is, when the node label carried by the business processing request submitted by the slave node is an empty label, it indicates that the slave node does not need to obtain the feedback information corresponding to the submitted business processing request. In order to save the message queue maintenance cost of the slave node, the slave node can discard the feedback information after receiving the feedback information in the message queue, without filtering and processing the feedback information, and may not receive the feedback information in the message queue. It can be understood that the feedback message corresponding to the business processing request submitted by the slave node will be received and processed by the master node under the business system to which it belongs.

[0075] In an embodiment of the present invention, if the node label carried in the business processing request submitted by the slave node is an empty label, the feedback information in the message queue is discarded. In this way, the slave node can flexibly adjust the message scheduling according to business needs, does not process the feedback information, and does not even need to expose the interface to receive the feedback information in the message queue, which saves the processing resources of the slave node to a certain extent and avoids resource waste.

[0076] It is understandable that, in the case where the slave node or the master node is the target node, if the slave node or the master node needs to obtain the feedback information corresponding to the business processing request submitted by it, the business processing request will carry the node label corresponding to the slave node or the master node, but the slave node will only obtain the feedback information whose node label carried is the node label corresponding to the slave node, and the master node will obtain the feedback information whose node label carried is the node label corresponding to the master node and the feedback information whose node label carried is an empty label, that is, in addition to processing the feedback information corresponding to the business processing request submitted by itself, the master node also needs to process the feedback information corresponding to the business processing request submitted by other business nodes in the business system to which the master node belongs (such as the slave nodes in the business system to which the master node belongs). In this way, the master node processes the feedback information whose node label carried is an empty label, and the business node that contains an empty label in the submitted business processing request does not need to receive and process the feedback information corresponding to the business processing request. Therefore, the message queue maintenance cost of the business node that contains an empty label in the submitted business processing request can be saved to a certain extent, that is, the business node that does not need to pay attention to the feedback information corresponding to the business processing request.

[0077] Optionally, the message queue corresponding to the service node is allocated by the central system when the service node is connected to the central system.

[0078] In an embodiment of the present invention, when a business node in a business system is connected to a central system, the central system can allocate a corresponding message queue to the business node. When different business nodes are connected to the central system, the central system will allocate different message queues to them. Different business nodes correspond to different message queues, and the message queues corresponding to the business nodes can communicate with the central system. In this way, different business nodes can use independent message queues to interact with the central system for data, avoiding the situation where feedback information caused by business nodes sharing the same message queue is unreasonably received and processed by any business node, thereby ensuring the rationality of message scheduling. It is understandable that the message queue corresponding to the business node can also be allocated by the central system according to the needs of the business node, and the embodiment of the present invention does not impose any restrictions on this.

[0079] For example, Figure 3 A schematic diagram of a specific example is shown, Figure 3 As shown, business system B includes business node b, business node b-1, and business node b-2, with business node b being the master node. The business processing request submitted by business node b carries the system identifier corresponding to business system B and node label b; the business processing request submitted by business node b-1 carries the system identifier corresponding to business system B and node label b1; and the business processing request submitted by business node b-2 carries the system identifier corresponding to business system B but no node label. When the central system returns feedback information through the message queue corresponding to each business node, business node b needs to obtain feedback information that carries the system identifier corresponding to business system B and node label b, as well as feedback information that carries the system identifier corresponding to business system B and an empty label. In other words, business node b needs to process feedback information corresponding to the business processing request submitted by business node b and feedback information corresponding to the business processing request submitted by business node b-2; business node b-1 needs to obtain feedback information that carries the system identifier corresponding to business system B and node label b1; and business node b-2 does not receive feedback information from the message queue.

[0080] Please refer to Figure 4 , which shows a flow chart of another data processing method provided by an embodiment of the present invention, applied to a central system. The embodiment of the present invention may include the following steps:

[0081] Step 501: Receive a service processing request submitted by a target node in a service system; the target node is any service node in the service system.

[0082] Step 502: In response to the business processing request, feedback information is sent to each business node based on the message queue corresponding to each business node in the business system, so that the business node, when the business node is the target node, determines the feedback information that matches the business processing request from the feedback information as the first target feedback information, and performs a first processing operation based on the first target feedback information.

[0083] In an embodiment of the present invention, upon receiving a business processing request submitted by a target node, the central system responds to the business processing request, processes the business data contained in the business processing request, obtains a processing result, and stores the system identifier and node tag contained in the business processing request. The processing result may include events generated by the central system during the processing process and the processing conclusion. Based on the processing result, the stored system identifier, and the stored node tag, feedback information corresponding to the business processing request is generated. This feedback information is then sent to each business node in the business system via the message queue corresponding to each business node.

[0084] In an embodiment of the present invention, the central system sends feedback information to each business node through the message queue corresponding to each business node, so that each business node can receive the feedback information, avoiding message scheduling errors caused by each business node randomly receiving feedback information using the same message queue, and improving the accuracy of message scheduling.

[0085] In one possible implementation, when the business processing request received by the central system is from a slave node and the node label carried in the business processing request is an empty label, the slave node that submitted the business processing request does not need to pay attention to and process the feedback information. Therefore, in order to further save the cost of using the message queue, the slave node and the master node under the business system to which the slave node belongs can use the same message queue, and the feedback information corresponding to the business processing request submitted by the slave node can be randomly obtained and processed by the slave node or the master node under the business system to which the slave node belongs.

[0086] Figure 5 Schematic diagram of a data processing device according to an embodiment of the present invention. The specific implementation of the operations performed by each unit or sub-unit in the data processing device may be the specific implementation of the corresponding operations described in the above reference method embodiment.

[0087] like Figure 5 As shown, the data processing device 60 provided in the embodiment of the present invention is set in any business node included in the business system, and includes: a first submission module 601, a first acquisition module 602, and a first determination module 603.

[0088] A first receiving module 601 is configured to receive feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system;

[0089] A first determining module 602 is configured to, when the service node is the target node, determine feedback information matching the service processing request from the feedback information as first target feedback information;

[0090] The first processing module 603 is configured to perform a first processing operation based on the first target feedback information.

[0091] Optionally, the service processing request carries a node label of the target node; and the first determining module 602 is configured to:

[0092] The first determining submodule is configured to determine feedback information that carries a system identifier that matches a target system identifier as feedback information to be screened; the target system identifier is the system identifier of the business system;

[0093] The second determining submodule is configured to determine the first target feedback information from the feedback information to be filtered based on the node label carried by the feedback information to be filtered.

[0094] Optionally, the data processing device provided by the embodiment of the present invention further includes:

[0095] a first screening module configured to, when the node attribute of the service node indicates that the service node is a master node, screen feedback information whose node label is an empty label from the feedback information to be screened as second target feedback information;

[0096] The second processing module is configured to perform a second processing operation based on the second target feedback information.

[0097] Optionally, the data processing device provided by the embodiment of the present invention further includes:

[0098] The first discarding module is configured to discard the feedback information when the service processing request carries an empty tag, the service node is the target node, and the node attribute of the service node indicates that the service node is a slave node.

[0099] Based on the same inventive concept, an embodiment of the present invention provides a data processing device. Figure 6 FIG. 7 is a schematic diagram of another data processing device 70 in an embodiment of the present invention. The data processing device 70 is set in the central system. Figure 6 As shown, the data processing device 70 includes:

[0100] The second receiving module 701 is configured to receive a service processing request submitted by a target node in a service system; the target node is any service node in the service system;

[0101] The first sending module 702 is used to send feedback information to each business node in the business system in response to the business processing request based on the message queue corresponding to each business node, so that the business node can determine the feedback information that matches the business processing request from the feedback information when the business node is the target node, as the first target feedback information, and perform a first processing operation based on the first target feedback information.

[0102] The embodiment of the present invention further provides an electronic device, such as Figure 7 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.

[0103] Memory 803, used for storing computer programs;

[0104] The processor 801 is configured to execute the program stored in the memory 803, and implement the following steps:

[0105] receiving feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system;

[0106] In a case where the service node is the target node, determining feedback information matching the service processing request from the feedback information as first target feedback information;

[0107] A first processing operation is performed based on the first target feedback information.

[0108] Alternatively, implement the following steps:

[0109] Receiving a service processing request submitted by a target node in a service system; the target node is any service node in the service system;

[0110] In response to the business processing request, feedback information is sent to each business node based on the message queue corresponding to each business node in the business system, so that the business node, when the business node is the target node, determines the feedback information that matches the business processing request from the feedback information as the first target feedback information, and performs a first processing operation based on the first target feedback information.

[0111] Alternatively, when executing the program stored in the memory 803 , the processor 801 may also implement the steps in the other method embodiments described above.

[0112] The communication bus mentioned in the terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0113] The communication interface is used for communication between the above terminal and other devices.

[0114] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0115] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0116] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute any of the data processing methods described in the above embodiments.

[0117] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the data processing method described in any one of the above embodiments.

[0118] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).

[0119] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0120] Each embodiment in this specification is described in a related manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiment is generally similar to the method embodiment, so the description is relatively simple. For related parts, refer to the description of the method embodiment.

[0121] The above description is only a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention are included in the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that: Applied to any service node included in a service system, the service system includes at least two service nodes, and each service node corresponds to a message queue; the method includes: receiving feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system; the service processing request carries a node label of the target node; In the case where the service node is the target node, the feedback information whose system identifier matches the target system identifier is determined as the feedback information to be filtered; the target system identifier is the system identifier of the service system; Determining first target feedback information from the feedback information to be filtered based on the node label carried by the feedback information to be filtered and the node label of the target node; A first processing operation is performed based on the first target feedback information.

2. The method according to claim 1, characterized in that The method further comprises: In a case where the node attribute of the service node indicates that the service node is a master node, filtering feedback information whose node label is an empty label from the feedback information to be filtered as the second target feedback information; A second processing operation is performed based on the second target feedback information.

3. The method according to claim 2, characterized in that The method further comprises: In a case where the service processing request carries an empty tag, the service node is the target node, and the node attribute of the service node indicates that the service node is a slave node, the feedback information is discarded.

4. The method according to any one of claims 1 to 3, characterized in that: The message queue corresponding to the service node is allocated by the central system when the service node is connected to the central system.

5. A data processing method, characterized in that: Applied to a central system, the method includes: Receiving a service processing request submitted by a target node in a service system; the target node is any service node in the service system; the service processing request carries a node label of the target node; In response to the service processing request, based on the message queue corresponding to each service node in the service system, feedback information is sent to each service node, so that when the service node is the target node, Determine the feedback information whose system identifier matches the target system identifier as the feedback information to be screened; the target system identifier is the system identifier of the business system; Based on the node label carried by the feedback information to be filtered and the node label of the target node, first target feedback information is determined from the feedback information to be filtered, and a first processing operation is performed based on the first target feedback information.

6. A data processing device, characterized in that: Set in any business node included in the business system; the device includes: a first receiving module, configured to receive feedback information sent by a central system through a message queue corresponding to the service node, wherein the feedback information is sent by the central system in response to a service processing request submitted by a target node in the service system; the service processing request carries a node label of the target node; A first determining submodule is configured to, when the service node is the target node, determine the feedback information whose system identifier matches the target system identifier as the feedback information to be screened; the target system identifier is the system identifier of the service system; A second determining submodule, configured to determine first target feedback information from the feedback information to be screened based on the node label carried by the feedback information to be screened; A first processing module is configured to perform a first processing operation based on the first target feedback information.

7. A data processing device, characterized in that: Set up in the central system, the device includes: A second receiving module is configured to receive a service processing request submitted by a target node in the service system; the target node is any service node in the service system; and the service processing request carries a node label of the target node; a first sending module, configured to send feedback information to each service node in the service system in response to the service processing request based on a message queue corresponding to each service node in the service system, so that when the service node is the target node, the service node determines the feedback information whose system identifier matches the target system identifier as the feedback information to be screened; the target system identifier is the system identifier of the service system; Based on the node label carried by the feedback information to be filtered and the node label of the target node, first target feedback information is determined from the feedback information to be filtered, and a first processing operation is performed based on the first target feedback information.

8. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 4, or the method steps according to claim 5, when executing a program stored in a memory.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the program implements the method according to any one of claims 1 to 4, or implements the method steps according to claim 5.

Citation Information

Patent Citations

  • Service request distribution method and device, receiving method and device, and server cluster

    CN109660607A

  • Server operation method and device, electronic equipment and storage medium

    CN111586171A