CN115496485A - Distributed node scheduling method and device based on payment platform - Google Patents

Distributed node scheduling method and device based on payment platform Download PDF

Info

Publication number
CN115496485A
CN115496485A CN202211233717.1A CN202211233717A CN115496485A CN 115496485 A CN115496485 A CN 115496485A CN 202211233717 A CN202211233717 A CN 202211233717A CN 115496485 A CN115496485 A CN 115496485A
Authority
CN
China
Prior art keywords
nodes
node
messages
processing
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211233717.1A
Other languages
Chinese (zh)
Inventor
周灵叶
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Bank of China Ltd
Original Assignee
Bank of China Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Bank of China Ltd filed Critical Bank of China Ltd
Priority to CN202211233717.1A priority Critical patent/CN115496485A/en
Publication of CN115496485A publication Critical patent/CN115496485A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/08Payment architectures
    • G06Q20/085Payment architectures involving remote charge determination or related payment systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q20/00Payment architectures, schemes or protocols
    • G06Q20/30Payment architectures, schemes or protocols characterised by the use of specific devices or networks
    • G06Q20/32Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices
    • G06Q20/325Payment architectures, schemes or protocols characterised by the use of specific devices or networks using wireless devices using wireless networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Accounting & Taxation (AREA)
  • Strategic Management (AREA)
  • Software Systems (AREA)
  • General Business, Economics & Management (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Finance (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a distributed node scheduling method and a distributed node scheduling device based on a payment platform, which relate to the technical field of distribution, wherein the method comprises the following steps: acquiring the number of messages to be processed received in the current time period as a first message number, and acquiring the number of nodes in a processing state at the end of the previous time period as a first node number; acquiring a predetermined processing capacity value of a single node; determining the number of nodes required for processing the first message number as the number of target nodes according to the processing capacity value of a single node; stopping part of the nodes under the condition that the first node number is larger than the target node number until the node number in the processing state is equal to the target node number; and under the condition that the first node number is smaller than the target node number, starting partial nodes until the number of the nodes in the processing state is equal to the target node number. The invention can improve the processing efficiency of the payment platform while avoiding resource waste.

Description

Distributed node scheduling method and device based on payment platform
Technical Field
The invention relates to the technical field of distribution, in particular to a distributed node scheduling method and device based on a payment platform.
Background
This section is intended to provide a background or context to the embodiments of the invention that are recited in the claims. The description herein is not admitted to be prior art by inclusion in this section.
The payment platform is a distributed platform which is connected with each local clearing system and provides multi-channel and faster payment service for the client, the distributed nodes are a plurality of nodes adopting a distributed architecture, and each node needs to complete work cooperatively. However, based on the prior art, dynamic scheduling of distributed nodes on the payment platform cannot be timely, effectively and flexibly implemented, so that resource waste is caused, and the processing efficiency of the payment platform is reduced.
In view of the above problems, no effective solution has been proposed.
Disclosure of Invention
The embodiment of the specification provides a distributed node scheduling method and device based on a payment platform, and aims to solve the problem that the prior art cannot improve the processing efficiency of a distributed payment system while avoiding resource waste.
An embodiment of the present specification provides a distributed node scheduling method based on a payment platform, including:
acquiring the number of messages to be processed received in the current time period as a first message number, and acquiring the number of nodes in a processing state at the end of the previous time period as a first node number;
acquiring a predetermined processing capacity value of a single node;
determining the number of nodes required for processing the first message number as the number of target nodes according to the processing capacity value of a single node;
stopping part of the nodes under the condition that the first node number is larger than the target node number until the node number in the processing state is equal to the target node number;
and under the condition that the first node number is smaller than the target node number, starting partial nodes until the number of the nodes in the processing state is equal to the target node number.
In one embodiment, the obtaining a predetermined processing capability value of a single node includes:
acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
and taking the ratio between the first accumulated sum and the second accumulated sum as the predetermined processing capacity value of the single node.
In one embodiment, the obtaining of the predetermined processing capability value of the single node includes:
acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
taking a ratio between the first accumulated sum and the second accumulated sum as a first predicted value;
calculating the ratio of the number of messages to be processed received in each period to the number of nodes in a processing state to form a second prediction value set;
and determining the processing capacity value of a single node according to the values in the first prediction value and the second prediction value set.
In an embodiment, after determining, as the number of target nodes, the number of nodes required for processing the first packet number according to the processing capability value of the single node, the method further includes:
processing the message to be processed received in the current time period by the node in the processing state;
acquiring message number influence factors;
and inputting the message number influence factor into a pre-established prediction model to obtain a predicted value of the number of the messages to be processed received in the next time period.
In an embodiment, before acquiring the number of messages to be processed received in the current time period as the first number of messages, the method further includes:
and receiving an upstream system message as a message to be processed through a message channel.
An embodiment of the present specification further provides a distributed node scheduling apparatus based on a payment platform, where the apparatus includes:
the data acquisition module is used for acquiring the number of messages to be processed received in the current time period as a first message number, and acquiring the number of nodes in a processing state at the end of the previous time period as the first node number;
the node capacity value determining module is used for acquiring the processing capacity value of a single predetermined node;
the target node number determining module is used for determining the number of nodes required for processing the first message number according to the processing capacity value of a single node, and the number of the nodes is used as the number of the target nodes;
a stopping module, configured to stop a part of the nodes until the number of nodes in the processing state is equal to the target number of nodes, when the number of the first nodes is greater than the target number of nodes;
and the starting module is used for starting partial nodes under the condition that the number of the first nodes is less than the number of the target nodes until the number of the nodes in the processing state is equal to the number of the target nodes.
In one embodiment, the apparatus further comprises:
the message factor acquisition module is used for acquiring message number influence factors;
and the prediction module is used for inputting the message number influence factors into a pre-established prediction model to obtain the predicted value of the number of the messages to be processed received in the next time period.
Embodiments of the present specification further provide a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the above-mentioned payment platform-based distributed node scheduling method when executing the computer program.
The embodiment of the present specification further provides a computer-readable storage medium, where a computer program is stored, and when executed by a processor, the computer program implements the above-mentioned payment platform-based distributed node scheduling method.
Embodiments of the present specification further provide a computer program product, where the computer program product includes a computer program, and when executed by a processor, the computer program implements the above-mentioned payment platform-based distributed node scheduling method.
In the embodiment of the specification, a distributed node scheduling method and a distributed node scheduling device based on a payment platform are provided, the number of messages to be processed received in the current time period is acquired as a first message number, the number of nodes in a processing state at the end of the previous time period is acquired as the first node number, a predetermined processing capacity value of a single node is acquired, the number of nodes required for processing the first message number is determined according to the processing capacity value of the single node and is used as a target node number, the payment scene of a large number of transaction messages in urgent need can be timely and effectively responded, and a foundation is laid for the follow-up flexible scheduling of distributed nodes. And under the condition that the number of the first nodes is greater than the number of the target nodes, stopping part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes, and under the condition that the number of the first nodes is less than the number of the target nodes, starting part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes, so that the processing speed of a settlement system in the payment platform on massive messages can be improved and the downtime risk of the system is effectively avoided by starting or closing the nodes. Through the scheme, the technical problem that the processing speed of the distributed system cannot be increased while resource waste is avoided in the prior art is solved, and the technical effect that the processing capacity of the distributed system is improved while resource waste is avoided is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the prior art descriptions will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts. In the drawings:
FIG. 1 is a flow diagram of a payment platform based distributed node scheduling method in one embodiment of the present description;
FIG. 2 is a schematic flow diagram of a method for distributed node scheduling based on a paymate in another embodiment of the present description;
FIG. 3 is a schematic diagram of a distributed node scheduling apparatus based on a payment platform in one embodiment of the present description;
FIG. 4 is a schematic diagram of a paymate-based distributed node scheduling apparatus in another embodiment of the present description;
FIG. 5 is a schematic diagram of a computer device in one embodiment of the present description.
Detailed Description
In order to make those skilled in the art better understand the technical solutions in the present specification, the technical solutions in the embodiments of the present specification will be clearly and completely described below with reference to the drawings in the embodiments of the present specification, and it is obvious that the described embodiments are only a part of the embodiments of the present specification, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without making any creative effort shall fall within the protection scope of the present specification.
As will be appreciated by one skilled in the art, embodiments of the present description may be embodied as a system, an apparatus, a method, or a computer program product. Accordingly, the present disclosure may be embodied in the form of: entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or a combination of hardware and software.
The Payment service message centralized processing Platform is established by considering the existing distributed Payment Platform GUPP (Global Unified Payment Platform), can be connected with each overseas local clearing system, and provides multi-channel and faster Payment service for customers. The distributed payment platform divides a large-scale payment system into a plurality of subsystems, the subsystems are distributed on a plurality of hosts through a computer network, the hosts cooperate to complete message processing work together, and remittance transactions sent from various payment channels of a bank and remittance requests sent from a local real-time clearing system are processed. However, at present, distributed nodes in a distributed payment platform are fixed, and for a time point with a large demand, relevant operation and maintenance personnel are required to pay attention to the time point, so that a large amount of time and energy are consumed. Based on the prior art, the resources cannot be dynamically adjusted under the condition of reducing manpower, and the response speed of the system and the processing capacity of the system cannot be improved.
Aiming at the problems existing in the existing method, the distributed node scheduling method based on the payment platform is introduced, so that the processing capacity of the integrated layer platform of the payment system can be improved under the condition of avoiding resource waste, and automatic operation and maintenance are realized.
Based on the above thought, the present specification proposes a distributed node scheduling method based on a payment platform, and first, obtains the number of messages to be processed received in a current time period as a first number of messages, and obtains the number of nodes in a processing state at the end of the previous time period as a first number of nodes; secondly, acquiring a predetermined processing capacity value of a single node, and determining the number of nodes required for processing the first message number as the number of target nodes according to the processing capacity value of the single node; and finally, stopping part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes under the condition that the number of the first nodes is larger than the number of the target nodes, and starting part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes under the condition that the number of the first nodes is smaller than the number of the target nodes.
Fig. 1 is a flowchart illustrating a distributed node scheduling method based on a payment platform in an embodiment of the present description. Although the present specification provides the method steps or apparatus structures as shown in the following examples or figures, more or less steps or modules may be included in the method or apparatus structures based on conventional or non-inventive efforts. In the case of steps or structures which do not logically have the necessary cause and effect relationship, the execution order of the steps or the block structure of the apparatus is not limited to the execution order or the block structure shown in the embodiments or the drawings of the present specification. When the described method or module structure is applied to a device, a server or an end product in practice, the method or module structure may be executed sequentially or in parallel according to the embodiments or the method or module structure shown in the drawings (for example, in the environment of parallel processors or multi-thread processing, or even in the environment of distributed processing and server cluster). In particular, and with reference to FIG. 1, the method may include the following.
S101: the number of messages to be processed received in the current time period is obtained as a first message number, and the number of nodes in a processing state at the end of the previous time period is obtained as a first node number.
In some embodiments, before obtaining the number of messages to be processed received in the current time period as the first number of messages, in specific implementation, the method may further include: and receiving the upstream system message through the message channel as the number of messages to be processed.
In some embodiments, the Message channel may be a Message Queue (MQ) channel, which is a point-to-point communication connection between Queue managers. The message channel can be used for timely acquiring messages from an upstream system, and the number of a plurality of messages acquired from the upstream system is used as the number of messages to be processed. It should be noted that the number of messages received in different time periods may be different, and is determined by combining actual situations.
In some embodiments, the upstream system performs packet transmission through the MQ channel, and it should be noted that, according to different service requirements, different packets use different queues in the channel based on the MQ channel.
In some embodiments, the number of messages to be processed may be the number of messages sent from other payment settlement systems in the payment platform to the target payment settlement system, and may also be referred to as a number of incoming calls or a number of incoming calls. The target payment settlement system is a local payment settlement system. The distributed Payment Platform may be a Global Unified Payment Platform system (GUPP), and the GUPP is composed of two layers, i.e., a core business processing layer (GPP) and an enterprise service bus layer (PIP), where the GPP is responsible for processing a business process, such as: the method comprises the following steps of automatic message repairing, debit and credit account number judging, settlement and sales remittance, cost, mobility management, intelligent message routing and the like, and service requirements are realized through configuration; the PIP is responsible for processing the operations of protocol conversion, format conversion, flow control and the like when the GPP core layer interacts with related systems in the row and various local clearing systems. The GUPP-PIP forms an integrated payment platform and is responsible for processing connection, message distribution, format conversion and the like of GPP, an inline system and a local clearing system, the integrated payment platform is located in a payment platform integration layer connecting an upstream system and a downstream system, GUPP-PIP services are deployed on a plurality of distributed nodes, and the distributed nodes cooperate to complete processing of service scenes of incoming messages.
In some embodiments, the time period may be a period of one month, and the time period may also be determined according to actual situations, which is not specifically limited in this embodiment of the present specification. The above obtaining the number of messages to be processed received in the current time period as a first message number, and obtaining the number of nodes in the processing state at the end of the previous time period as a first node number, in specific implementation, may be understood as: one month is taken as a time period, the current time period is assumed to be 4 months, the previous time period is assumed to be 3 months, and the number of incoming messages received in 4 months, namely the number of messages to be processed, and the number of nodes in a processing state in 3 months need to be acquired. Such as: the number of received messages in 4 months is 100, the number of nodes in the processing state in 3 months is 4, and the number of the 4 nodes can be used as the first node number. By acquiring the number of incoming messages in the current time period and the number of nodes in the previous time period, a data base can be laid for subsequently determining the number of target nodes in a processing state in the current time period. It should be noted that the data related to the user, which is acquired and used in the present application, is acquired and used on the premise that the user knows and agrees. In addition, the data acquisition, storage, use, processing and the like in the technical scheme of the application all conform to relevant regulations of national laws and regulations.
S102: and acquiring a predetermined processing capacity value of the single node.
In some embodiments, the obtaining the predetermined processing capability value of the single node may include, in implementation:
s1: acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
s2: calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
s3: calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
s4: and taking the ratio between the first accumulated sum and the second accumulated sum as the predetermined processing capacity value of the single node.
In some embodiments, the preset number of cycles may be set according to actual conditions, such as 2 months and 3 months as the preset number of cycles. In the above-mentioned obtaining the number of messages to be processed received in each period and the number of nodes in the processing state in each period in the preset number period before the current time period, in a specific implementation, it can be understood that: acquiring the number of messages to be processed (such as 200 messages) and the number of nodes in a processing state (such as 4 messages) in 2 months and 3 months (a preset period) before 4 months (a current period), and acquiring the number of messages to be processed in 3 months (such as 203 messages) and the number of nodes in a processing state (such as 4 nodes); as the ratio between the first cumulative sum and the second cumulative sum is taken as the predetermined processing capability value of the single node, in practical implementation, it may be understood that: accumulating and summing 200 incoming telegrams in 2 months and 203 incoming telegrams in 3 months to obtain 403 incoming telegrams as first accumulated sums, accumulating and summing 4 nodes in 2 months and 4 nodes in 3 months to obtain 8 nodes as second accumulated sums, and performing ratio processing on the first accumulated sums (403 incoming telegrams) and the second accumulated sums (8 nodes) to determine that the processing capacity value of a single node is 50. Wherein, the processing ability value of the single node can be understood as: how many incoming counts a single node can handle.
In some embodiments, the obtaining the predetermined processing capability value of the single node may further include, in specific implementation:
s1: acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
s2: calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
s3: calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
s4: taking a ratio between the first accumulated sum and the second accumulated sum as a first predicted value;
s5: calculating the ratio of the number of the messages to be processed received in each period to the number of the nodes in the processing state to form a second prediction value set;
s6: and determining the processing capacity value of a single node according to each numerical value in the first prediction value and the second prediction value set.
In some embodiments, the above calculating a ratio between the number of messages to be processed received in each period and the number of nodes in the processing state to form the second prediction value set may be understood as: after determining the number of messages to be processed in 2 months (such as 200 messages are acquired) and the number of nodes in a processing state (such as 4 messages are acquired) in 2 months and 3 months (a preset period), and acquiring the number of messages to be processed in 3 months (such as 203 messages are acquired) and the number of nodes in a processing state (such as 4 nodes are acquired), performing ratio processing on the number of messages to be processed in 2 months and the number of nodes in a processing state in 2 months (such as ratio processing on the number of 200 messages received in 2 months and the number of 4 nodes in a processing state in 2 months) to obtain a numerical value (such as 50); then, performing ratio processing on the number of the messages to be processed in 3 months and the number of the nodes in the processing state in 3 months (for example, performing ratio processing on the number of 203 messages received in 3 months and the number of 4 nodes in the processing state in 3 months) to obtain another value (for example, 50), further, taking the value obtained in 2 months and the value obtained in 3 months as a second prediction value set, and it needs to be noted that the number of the values in the set depends on the number of the preset number period, for example: when there are 3 cycles, then there may be 3 values in the second prediction value set formed. And finally, carrying out weighted average processing on all numerical values in the first prediction value and the second prediction value set so as to determine the processing capacity value of a single node. The process of performing weighted average processing is not specifically described in this specification, where the weight value may be assigned with the maximum weight according to a value corresponding to a previous time period closest to the current time period, and the farther away from the current time period, the higher the power of the attenuation factor is, the smaller the value is, the smaller the assigned weight is. It should be noted that the above-mentioned manner of determining the weight is not limited to the above-mentioned example, and other modifications are possible for those skilled in the art in light of the technical spirit of the embodiments of the present disclosure, but all that can be achieved with the same or similar functions and effects as the embodiments of the present disclosure are to be included in the scope of the embodiments of the present disclosure.
In some embodiments, the processing capability value of a single node is determined according to each value in the first predicted value and the second predicted value set, or the first predicted value and the second predicted value may be input into a deep learning model for training, and prediction is stopped until the learning results of the first predicted value and the second predicted value are closest to each other. By determining the first predicted value and the second predicted value, the single node capability value can be determined more accurately.
In some embodiments, after determining, as the number of target nodes, the number of nodes required to process the first packet number according to the processing capability value of a single node, in a specific implementation, the method may include:
s1: processing the message to be processed received in the current time period through the node in the processing state;
s2: acquiring message number influence factors;
s3: and inputting the message number influence factor into a pre-established prediction model to obtain a predicted value of the number of the messages to be processed received in the next time period.
In some embodiments, the message quantity influence factor may be a factor that influences the incoming message quantity, and at least includes: season, date, region, incoming call service scenario. Of course, the above is only an exemplary illustration, the message quantity influencing factor is not limited to the above example, and other modifications are possible for those skilled in the art in light of the technical spirit of the present application, but all that can be achieved is within the scope of the present application as long as the achieved function and effect are the same or similar to the present application.
In some embodiments, the prediction model may be predicted by using a prediction model based on a Long Short Term Memory (LSTM) model, the core idea of the model is to learn to store and read data from a Long-Term state, and the training of the model conforms to an end-to-end idea, so as to assist the system in making an intelligent policy judgment. The prediction process may be: first, a historical training set is processed by a fully connected input layer with multiple neurons; secondly, the processed sequence is sent to the main part of the model, each LSTM layer taking the output of the previous layer as input and feeding back the output to the next LSTM layer; and finally, the fully-connected output layer maps the output of the last LSTM layer of each time step to a number, wherein the number is a result obtained by prediction, namely a predicted value of the number of the messages to be processed received in the next time period. Before model prediction, historical production data (historical message number) can be acquired, historical production data of a previous time period of a current time period (the time period can be self-defined, for example, production data of a year previous to the current time) is taken as a training data set, the data set is divided into the training set and a test set, wherein the first 67% of the data is taken as the training set, and the last 33% of the data is taken as the test set. By acquiring the message number influence factor, the number of incoming messages in a future time period can be predicted more accurately, so that scheduling measures can be taken in advance, and distributed nodes are flexibly called to improve the processing capacity of the system.
As shown in fig. 2, after obtaining the predicted value of the number of to-be-processed messages received in the next time period, in specific implementation, the method may further include:
s201: determining the number of nodes required for processing the predicted value of the number of the messages to be processed received in the next time period according to the processing capacity value of the single node, and taking the number of the nodes as the number of first target nodes;
s202: stopping part of the nodes under the condition that the number of the target nodes is larger than the first number of the target nodes until the number of the target nodes in the processing state is equal to the first number of the target nodes;
s203: and under the condition that the number of the target nodes is less than the first number of the target nodes, starting partial nodes until the number of the target nodes in the processing state is equal to the first number of the target nodes.
In some embodiments, the next time period may be a future time period (for example, the current time period is 4 months, and the future time period closely connected to the current time period is 5 months) after the current time period, the number of nodes required by the future time period may be further obtained by obtaining a predicted value of the number of to-be-processed messages of the future time period and combining with a processing capability value of a single node, and then the number of nodes of the current time period and the number of nodes of the future time period are compared, so that a problem that a distributed node of a distributed payment system in the prior art is fixed and cannot be flexibly scheduled is avoided, and a risk that a resource cannot be scheduled in advance by using the distributed node in the prior art, so that a payment system integration layer needs to process a large number of messages, causing system crash or having a low processing speed, may also be avoided. By acquiring the predicted value of the number of the incoming reports and determining the number of the target nodes according to the processing capacity value of a single node, the distributed payment settlement system can have the capacity of predicting the number order of the incoming reports in advance, and scheduling measures are taken in advance to improve the processing capacity of the system.
S103: and determining the number of nodes required for processing the first message number as the number of target nodes according to the processing capacity value of the single node.
In some embodiments, the determining, according to the processing capability value of a single node, the number of nodes required for processing the first packet number as the number of target nodes may be understood as: when the processing capacity value of a single node is determined to be 50, according to the determined number of messages to be processed received in the current time period, namely the first message number (for example, the number of the first messages received when the current time period is 4 months is 100), ratio processing is carried out on the first message number and the capacity value of the single node (for example, the capacity value of the single node is 50), and the number of the node is determined to be 2, namely the number of the target node.
S104: and stopping part of the nodes under the condition that the first node number is larger than the target node number until the node number in the processing state is equal to the target node number.
S105: and under the condition that the first node number is smaller than the target node number, starting partial nodes until the node number in the processing state is equal to the target node number.
In some embodiments, when the number of the first nodes is greater than the number of the target nodes, stopping part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes, in a specific implementation, it may be understood that: when the number of the target nodes is 2 and the number of the first messages is 100 (that is, only 2 nodes can process 100 first messages), the number of the first nodes is actually 4, and when the number of the first nodes is started to process the number of the first messages, resource waste is caused. Therefore, when the number of the first nodes is larger than the number of the target nodes, 4 nodes of the current node are enough to process 100 first messages, so that part of the nodes need to be stopped to avoid resource waste. When the node stopping operation is executed, the number of the stopped nodes is equal to the number of the target nodes, so that the resource waste can be avoided, and the processing efficiency of the payment platform is improved. Correspondingly, if the number of the first nodes is smaller than the number of the target nodes, part of the nodes need to be started, so that the number of the nodes after the starting operation is finished is the same as that of the target nodes, and the processing efficiency of the system on the message is improved. Through comparing first node number with the target node number, can satisfy emergent demand in a flexible way, under the condition of avoiding the wasting of resources as far as possible, improve payment system integration layer platform's throughput, save fortune dimension personnel's manpower and energy simultaneously, above-mentioned method cost is lower simultaneously, and the flexibility ratio of coping with the demand change is higher, compatible distributed payment system that can be fine has reduced the maintenance cost.
In some embodiments, the stop part node may use a pre-constructed distributed node stop script, and the start part node may use a pre-constructed distributed node start script.
The embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from the other embodiments. For details, reference may be made to the description of the related embodiments of the related processing, and details are not repeated herein.
The foregoing description of specific embodiments has been presented for purposes of illustration and description. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The above method is described below with reference to a specific example, however, it should be noted that the specific example is only for better describing the present application and is not to be construed as a limitation of the present application.
Before specific implementation, an upstream system message is received through a message channel and is used as the number of messages to be processed. In specific implementation, firstly, the number of messages to be processed received in the current time period is acquired as a first message number, and the number of nodes in a processing state at the end of the previous time period of the current period is acquired as a first node number; secondly, determining the number of nodes required for processing the number of messages to be processed (first message number) as the number of target nodes according to the predetermined processing capacity value of a single node. Then, after the number of the target nodes is obtained, the messages to be processed received in the current time period are processed through the nodes in the processing state, then the message number influence factors are obtained, and the message number influence factors are input into a pre-established prediction model to obtain the predicted value of the number of the messages to be processed received in the next time period. Determining the number of nodes required for processing the predicted value of the number of the messages to be processed received in the next time period according to the processing capacity value of the single node, and taking the number of the nodes as the number of first target nodes; finally, under the condition that the number of the first nodes is larger than the number of the target nodes, stopping part of the nodes until the number of the nodes in the processing state is equal to the number of the target nodes; and starting part of nodes until the number of the nodes in the processing state is equal to the target number of the nodes or stopping part of the nodes until the number of the nodes in the processing state is equal to the first target number of the nodes under the condition that the first number of the nodes is less than the target number of the nodes or stopping part of the nodes until the number of the nodes in the processing state is equal to the first target number of the nodes under the condition that the target number of the nodes is less than the first target number of the nodes, and starting part of the nodes until the number of the nodes in the processing state is equal to the first target number of the nodes under the condition that the target number of the nodes is less than the first target number of the nodes. By the method, the payment scene of a large amount of transaction messages which are urgently needed can be responded, and the distributed nodes are automatically and flexibly scheduled, so that the resource waste can be avoided, and the processing speed of the payment platform on a large amount of message data can be improved.
Based on the same inventive concept, the embodiment of the present application further provides a distributed node scheduling apparatus based on a payment platform, as described in the following embodiments. Because the principle of solving the problems of the distributed node scheduling device based on the payment platform is similar to that of the distributed node scheduling method based on the payment platform, the implementation of the distributed node scheduling device based on the payment platform can refer to the implementation of the distributed node scheduling method based on the payment platform, and repeated parts are not described again. As used hereinafter, the term "unit" or "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated. Fig. 3 is a block diagram of a structure of a distributed node scheduling apparatus based on a payment platform according to an embodiment of the present application, and as shown in fig. 3, the distributed node scheduling apparatus includes: the data acquisition module 301, the node capability value determination module 302, the target node number determination module 303, the stop module 304, and the start module 305, which are described below.
The data obtaining module 301 is configured to obtain a number of messages to be processed received in a current time period as a first number of messages, and obtain a number of nodes in a processing state at the end of a previous time period as a first number of nodes;
the node ability value determination module 302 is configured to obtain a predetermined processing ability value of a single node;
the target node number determining module 303 is configured to determine, according to the processing capability value of a single node, the number of nodes required for processing the first packet number as the number of target nodes;
the stopping module 304 is configured to, in a case that the first number of nodes is greater than the target number of nodes, stop a part of the nodes until the number of nodes in the processing state is equal to the target number of nodes;
the starting module 305 is configured to, in a case that the first node number is smaller than the target node number, turn on a part of nodes until the number of nodes in the processing state is equal to the target node number.
In an embodiment, the data obtaining module 301 may be further configured to receive an upstream system packet through a message channel as a to-be-processed packet.
In an embodiment, the node capability value determining module 302 may be further configured to obtain the number of messages to be processed received in each period in a preset number period before the current time period and the number of nodes in a processing state in each period; calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum; calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum; and taking the ratio between the first accumulated sum and the second accumulated sum as the predetermined processing capacity value of the single node.
In an embodiment, the node capability value determining module 302 may be further configured to obtain the number of messages to be processed received in each period in a preset number period before the current time period and the number of nodes in a processing state in each period; calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum; calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum; taking a ratio between the first accumulated sum and the second accumulated sum as a first predicted value; calculating the ratio of the number of messages to be processed received in each period to the number of nodes in a processing state to form a second prediction value set; and determining the processing capacity value of a single node according to the values in the first prediction value and the second prediction value set.
In an embodiment, as shown in fig. 4, the apparatus for dispatching distributed nodes based on a paymate may further include: a message factor obtaining module 401 and a prediction module 402, which are described below.
A message factor obtaining module 401, configured to obtain a message number influence factor;
and the prediction module 402 is configured to input the message number influence factor into a pre-established prediction model to obtain a prediction value of the number of messages to be processed received in the next time period.
From the above description, it can be seen that the distributed node scheduling apparatus based on a payment platform provided in the embodiment of the present specification can achieve the following technical effects: the method can solve the problems that the existing distributed node is fixed, and for a time point with a large demand, operation and maintenance personnel need to pay attention constantly, so that energy is consumed and the cost is high; meanwhile, the scheduling method of the integration layer in the distributed settlement system can be determined by comparing the target node number with the node number in a time period before the current time period, so that the aim of flexibly adjusting resources according to the requirement of a period of time in the future is fulfilled, the resource waste can be avoided as much as possible, the distributed settlement system is more compatible, and the requirements of high speed and high efficiency of real-time payment service are met.
The embodiment of the present specification further provides a computer device, which may specifically refer to fig. 5, where the computer device according to the method for distributed node scheduling based on a payment platform provided in the embodiment of the present specification includes an input device 51, a processor 52, and a memory 53. Wherein the memory 53 is configured to store processor-executable instructions. The processor 52, when executing the instructions, implements the steps of the payment platform based distributed node scheduling method described in any of the embodiments above.
In this embodiment, the input device may be one of the main devices for exchanging information between a user and a computer system. The input device may include a keyboard, a mouse, a camera, a scanner, a light pen, a handwriting input board, a voice input device, etc.; the input device is used to input raw data and a program for processing the data into the computer. The input device can also acquire and receive data transmitted by other modules, units and devices. The processor may be implemented in any suitable way. For example, the processor may take the form of, for example, a microprocessor or processor and a computer-readable medium that stores computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller and embedded microcontroller, and so forth. The memory may in particular be a memory device used in modern information technology for storing information. The memory may include multiple levels, and in a digital system, the memory may be any memory as long as it can store binary data; in an integrated circuit, a circuit without a physical form and with a storage function is also called a memory, such as a RAM, a FIFO and the like; in the system, the storage device in physical form is also called a memory, such as a memory bank, a TF card and the like.
In this embodiment, the functions and effects of the specific implementation of the computer device can be explained in comparison with other embodiments, and are not described herein again.
The present specification also provides a computer storage medium of a distributed node scheduling method based on a payment platform, where the computer storage medium stores computer program instructions, and when the computer program instructions are executed, the steps of the distributed node scheduling method based on a payment platform in any of the above embodiments are implemented.
In this embodiment, the storage medium includes, but is not limited to, a Random Access Memory (RAM), a Read-Only Memory (ROM), a Cache (Cache), a Hard Disk Drive (HDD), or a Memory Card (Memory Card). The memory may be used to store computer program instructions. The network communication unit may be an interface for performing network connection communication, which is set in accordance with a standard prescribed by a communication protocol.
In this embodiment, the functions and effects specifically realized by the program instructions stored in the computer storage medium can be explained by comparing with other embodiments, and are not described herein again.
Embodiments of the present specification further provide a computer program product, which includes a computer program/instruction, and when executed by a processor, the computer program/instruction implements the steps of the payment platform based distributed node scheduling method described in any of the above embodiments.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the present specification described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed over a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different from that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the present description are not limited to any specific combination of hardware and software.
It is to be understood that the above description is intended to be illustrative, and not restrictive. Many embodiments and many applications other than the examples provided would be apparent to those of skill in the art upon reading the above description. The scope of the description should, therefore, be determined not with reference to the above description, but should instead be determined with reference to the appended claims, along with the full scope of equivalents to which such claims are entitled.
The above description is only a preferred embodiment of the present disclosure, and is not intended to limit the present disclosure, and it will be apparent to those skilled in the art that various modifications and variations can be made in the embodiment of the present disclosure. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present specification shall be included in the protection scope of the present specification.

Claims (10)

1. A distributed node scheduling method based on a payment platform is characterized by comprising the following steps:
acquiring the number of messages to be processed received in the current time period as a first message number, and acquiring the number of nodes in a processing state at the end of the previous time period as a first node number;
acquiring a predetermined processing capacity value of a single node;
determining the number of nodes required for processing the first message number as the number of target nodes according to the processing capacity value of a single node;
stopping part of the nodes under the condition that the first node number is larger than the target node number until the node number in the processing state is equal to the target node number;
and under the condition that the first node number is smaller than the target node number, starting partial nodes until the node number in the processing state is equal to the target node number.
2. The method of claim 1, wherein obtaining a predetermined throughput value for a single node comprises:
acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
and taking the ratio between the first accumulated sum and the second accumulated sum as the predetermined processing capacity value of the single node.
3. The method of claim 1, wherein obtaining a predetermined throughput value for a single node comprises:
acquiring the number of messages to be processed received in each period and the number of nodes in a processing state in each period in a preset number period before the current time period;
calculating the accumulated sum of the number of the messages to be processed received in each period as a first accumulated sum;
calculating the accumulated sum of the number of the nodes in the processing state in each period as a second accumulated sum;
taking a ratio between the first accumulated sum and the second accumulated sum as a first predicted value;
calculating the ratio of the number of messages to be processed received in each period to the number of nodes in a processing state to form a second prediction value set;
and determining the processing capacity value of a single node according to the values in the first prediction value and the second prediction value set.
4. The method of claim 1, wherein after determining the number of nodes required for processing the first packet number as the number of target nodes according to the processing capability value of a single node, the method further comprises:
processing the message to be processed received in the current time period by the node in the processing state;
acquiring message number influence factors;
and inputting the message number influence factor into a pre-established prediction model to obtain a predicted value of the number of the messages to be processed received in the next time period.
5. The method according to any one of claims 1 to 4, wherein before acquiring the number of messages to be processed received in the current time period as the first number of messages, the method further comprises:
and receiving the upstream system message through the message channel as the number of messages to be processed.
6. A distributed node scheduling device based on a payment platform is characterized by comprising:
the data acquisition module is used for acquiring the number of messages to be processed received in the current time period as a first message number, and acquiring the number of nodes in a processing state at the end of the previous time period as the first node number;
the node capacity value determining module is used for acquiring the processing capacity value of a single predetermined node;
the target node number determining module is used for determining the number of nodes required for processing the first message number according to the processing capacity value of a single node, and the number of the nodes is used as the number of the target nodes;
a stopping module, configured to stop a part of the nodes until the number of nodes in the processing state is equal to the target number of nodes, when the number of the first nodes is greater than the target number of nodes;
and the starting module is used for starting partial nodes under the condition that the number of the first nodes is less than the number of the target nodes until the number of the nodes in the processing state is equal to the number of the target nodes.
7. The apparatus of claim 6, further comprising:
the message factor acquisition module is used for acquiring message number influence factors;
and the prediction module is used for inputting the message number influence factor into a pre-established prediction model to obtain a prediction value of the number of the messages to be processed received in the next time period.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any one of claims 1 to 5 when executing the computer program.
9. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the method of any one of claims 1 to 5.
10. A computer program product, characterized in that the computer program product comprises a computer program which, when being executed by a processor, carries out the method of any one of claims 1 to 5.
CN202211233717.1A 2022-10-10 2022-10-10 Distributed node scheduling method and device based on payment platform Pending CN115496485A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211233717.1A CN115496485A (en) 2022-10-10 2022-10-10 Distributed node scheduling method and device based on payment platform

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211233717.1A CN115496485A (en) 2022-10-10 2022-10-10 Distributed node scheduling method and device based on payment platform

Publications (1)

Publication Number Publication Date
CN115496485A true CN115496485A (en) 2022-12-20

Family

ID=84474363

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211233717.1A Pending CN115496485A (en) 2022-10-10 2022-10-10 Distributed node scheduling method and device based on payment platform

Country Status (1)

Country Link
CN (1) CN115496485A (en)

Similar Documents

Publication Publication Date Title
CN108632365B (en) Service resource adjusting method, related device and equipment
CN109451072A (en) A kind of message caching system and method based on Kafka
US20170329643A1 (en) Distributed node intra-group task scheduling method and system
CN112559182B (en) Resource allocation method, device, equipment and storage medium
CN109788315A (en) Video transcoding method, apparatus and system
CN103927229A (en) Scheduling Mapreduce Jobs In A Cluster Of Dynamically Available Servers
CN105306277A (en) Message scheduling method and message scheduling device for message queues
CN108965014A (en) The service chaining backup method and system of QoS perception
CN101135981A (en) Method and device for realizing batch report generation
CN112540841B (en) Task scheduling method and device, processor and electronic equipment
CN112579304A (en) Resource scheduling method, device, equipment and medium based on distributed platform
CN108574645B (en) Queue scheduling method and device
CN112465615B (en) Method, device and system for processing bill data
CN111275415A (en) Resource channel switching method, device, equipment and storage medium
CN109656685A (en) Container resource regulating method and system, server and computer readable storage medium
CN115421930B (en) Task processing method, system, device, equipment and computer readable storage medium
CN106933673B (en) Method and device for adjusting number of logical threads of component
CN105357026A (en) Resource information collection method and computing node
CN116402318A (en) Multi-stage computing power resource distribution method and device for power distribution network and network architecture
CN114138453B (en) Resource optimization allocation method and system suitable for edge computing environment
CN106325997B (en) Virtual resource allocation method and device
CN115496485A (en) Distributed node scheduling method and device based on payment platform
CN116661960A (en) Batch task processing method, device, equipment and storage medium
CN115952054A (en) Simulation task resource management method, device, equipment and medium
CN116382892A (en) Load balancing method and device based on multi-cloud fusion and cloud service

Legal Events

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