CN112948207B - Information transfer method, device, electronic equipment and medium - Google Patents

Information transfer method, device, electronic equipment and medium Download PDF

Info

Publication number
CN112948207B
CN112948207B CN202110202388.3A CN202110202388A CN112948207B CN 112948207 B CN112948207 B CN 112948207B CN 202110202388 A CN202110202388 A CN 202110202388A CN 112948207 B CN112948207 B CN 112948207B
Authority
CN
China
Prior art keywords
node
link
information
service
asynchronous
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.)
Active
Application number
CN202110202388.3A
Other languages
Chinese (zh)
Other versions
CN112948207A (en
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.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
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 Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202110202388.3A priority Critical patent/CN112948207B/en
Publication of CN112948207A publication Critical patent/CN112948207A/en
Application granted granted Critical
Publication of CN112948207B publication Critical patent/CN112948207B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/3006Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system is distributed, e.g. networked systems, clusters, multiprocessor systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • G06F11/3409Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment for performance assessment
    • 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/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Computing Systems (AREA)
  • Software Systems (AREA)
  • Computer Hardware Design (AREA)
  • Mathematical Physics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The present disclosure provides an information transfer method, apparatus, electronic device, and medium, which can be used in the financial field, the computer field, or other fields. The information transfer method comprises the following steps: acquiring service link information of a plurality of nodes in a distributed system and state information of each node; responding to the state information of any node to indicate the node to be an abnormal node, and determining one or more superior nodes of the abnormal node according to the service link information; and switching a link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link for a target service among a plurality of services to be processed by the abnormal node, for transferring information about the target service.

Description

Information transfer method, device, electronic equipment and medium
Technical Field
The present disclosure relates to the field of financial technology, and more particularly, to an information transfer method, apparatus, electronic device, and medium.
Background
With the continuous development of Internet economy, the instantaneous mass transaction scene continuously tests the pressure-bearing capacity of the distributed system. When the received transaction amount exceeds a certain threshold value in the unit time of the system, the distributed system can implement the system current limiting operation on one hand, and the transaction exceeding the threshold value is directly returned to fail so as to prevent systematic risks; on the other hand, the system can perform online hardware capacity expansion, and the performance capacity of the system is increased so as to resist mass transaction access.
In the process of implementing the disclosed concept, the inventor finds that in the actual operation of the traditional distributed system, because of numerous factors affecting the throughput of the system, such as network delay, disk read-write speed and the like, often the current limit is not yet effective, the system has performance degradation and even can not normally provide service.
Disclosure of Invention
In view of this, the present disclosure provides an information transfer method, apparatus, electronic device, and medium.
An aspect of the present disclosure provides an information transfer method, including: acquiring service link information of a plurality of nodes in a distributed system and state information of each node; responding to the state information of any node to indicate the node to be an abnormal node, and determining one or more superior nodes of the abnormal node according to the service link information; and switching a link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link for a target service among a plurality of services to be processed by the abnormal node, for transferring information about the target service.
According to an embodiment of the present disclosure, the method further comprises: a synchronous link and an asynchronous link are preset between two adjacent nodes in the plurality of nodes; and pre-storing link control information for each node, wherein the link control information is synchronous link information or asynchronous link information, the synchronous link information is used for indicating that synchronous links are used for transmitting information between the node and the lower nodes of the node, and the asynchronous link information is used for indicating that asynchronous links are used for transmitting information between the node and the lower nodes of the node.
According to an embodiment of the present disclosure, the switching the link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link includes: and modifying the link control information for at least one superior node from synchronous link information to asynchronous link information, and transmitting the link control information to at least one superior node.
According to an embodiment of the present disclosure, the method further comprises: determining a switching proportion by a self-adaptive random gradient descent algorithm according to the service quantity of the distributed system which is successfully processed in unit time; and determining at least one service as a target service among a plurality of services to be processed for the abnormal node according to the handover proportion.
According to an embodiment of the present disclosure, the method further comprises: after switching the link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link, switching the link between the node that is restored to normal and at least one of the upper nodes from an asynchronous link to a synchronous link in response to the state information of the abnormal node indicating that the abnormal node is restored to normal.
According to an embodiment of the present disclosure, the state information of the node includes at least one of a CPU usage state, a memory usage state, an input-output load, a garbage collection frequency, a thread pool state, and a database connection pool state of the node.
Another aspect of the present disclosure provides an information transfer method performed by a node in a distributed system, the method comprising: transmitting service link information and current state information of the node; receiving link control information for the node, and setting a link between the node and a node at a lower level of the node as a synchronous link or an asynchronous link according to the received link control information; and transmitting information about the service to the subordinate node through the set link.
According to an embodiment of the present disclosure, the setting a link between the node and a lower node of the node as a synchronous link or an asynchronous link according to the received link control information, and transmitting information about a service to the lower node through the set link includes: setting a link between the node and a node at a lower level of the node as a synchronous link in response to the received link control information synchronous link information; and setting a link between the node and a node subordinate to the node as an asynchronous link in response to the received link control information asynchronous link information.
According to an embodiment of the present disclosure, the method further comprises: after setting a link between the node and a node at a lower level of the node as an asynchronous link and before transferring information about a service to the node at the lower level through the asynchronous link, determining whether the service is timed out, wherein an operation of transferring information about a service to the node at the lower level through the asynchronous link is performed in a case that the service is not timed out.
Another aspect of the present disclosure provides an apparatus for information transfer, comprising: the registration module is used for acquiring service link information of a plurality of nodes in the distributed system and state information of each node; the tracing module is used for responding to the state information of any node to indicate that the node is an abnormal node, and determining one or more superior nodes of the abnormal node according to the service link information; and the control module is used for switching a link between the abnormal node and at least one superior node from a synchronous link to an asynchronous link for a target service in a plurality of services to be processed by the abnormal node, and is used for transmitting information about the target service.
Another aspect of the present disclosure provides an apparatus for information transfer, comprising: the information acquisition module is used for transmitting service link information and current state information of the node; the link control module is used for receiving the link control information aiming at the node and setting the link between the node and the lower node of the node as a synchronous link or an asynchronous link according to the received link control information; and a service processing module for transmitting information about a service to the subordinate node through the set link.
Another aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a storage device for storing one or more programs, wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method as described above.
Another aspect of the present disclosure provides a computer-readable storage medium storing computer-executable instructions that, when executed, are configured to implement a method as described above.
Another aspect of the present disclosure provides a computer program comprising computer executable instructions which when executed are for implementing a method as described above.
According to the embodiments of the present disclosure, the problem that the current limiting has not been effective system performance is deteriorated due to node failure in the conventional current limiting method may be at least partially solved/alleviated/suppressed/even avoided.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent from the following description of embodiments thereof with reference to the accompanying drawings in which:
fig. 1 schematically illustrates an application scenario of an information delivery method according to an embodiment of the present disclosure;
FIG. 2 schematically illustrates a flow chart of a method of information transfer according to an embodiment of the present disclosure;
FIG. 3 schematically illustrates a flow chart of a method of information transfer according to an embodiment of the disclosure;
FIG. 4 schematically illustrates a schematic diagram of a distributed system according to an embodiment of the present disclosure;
FIG. 5 schematically illustrates an operational flow diagram of a distributed system according to an embodiment of the present disclosure;
FIG. 6 schematically illustrates a block diagram of an apparatus for information transfer according to an embodiment of the disclosure;
FIG. 7 schematically illustrates a block diagram of an apparatus for information transfer according to an embodiment of the disclosure;
fig. 8 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. It should be understood that the description is only exemplary and is not intended to limit the scope of the present disclosure. In the following detailed description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the embodiments of the present disclosure. It may be evident, however, that one or more embodiments may be practiced without these specific details. In addition, in the following description, descriptions of well-known structures and techniques are omitted so as not to unnecessarily obscure the concepts of the present disclosure.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the disclosure. The terms "comprises," "comprising," and/or the like, as used herein, specify the presence of stated features, steps, operations, and/or components, but do not preclude the presence or addition of one or more other features, steps, operations, or components.
All terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art unless otherwise defined. It should be noted that the terms used herein should be construed to have meanings consistent with the context of the present specification and should not be construed in an idealized or overly formal manner.
Where a convention analogous to "at least one of A, B and C, etc." is used, in general such a convention should be interpreted in accordance with the meaning of one of skill in the art having generally understood the convention (e.g., "a system having at least one of A, B and C" would include, but not be limited to, systems having a alone, B alone, C alone, a and B together, a and C together, B and C together, and/or A, B, C together, etc.).
The embodiment of the disclosure provides an information transfer method and device. By monitoring the state information of each node and switching the links between the abnormal node and the upper node from the synchronous link to the asynchronous link aiming at the target service, the influence of the node fault on the system throughput can be relieved, and the problem that the system performance is deteriorated because the current limitation is not effective yet due to the node fault is relieved and even avoided.
Fig. 1 schematically illustrates an exemplary distributed system architecture 100 that may be applied to information delivery methods according to embodiments of the present disclosure. It should be noted that fig. 1 is only an example of a system architecture to which embodiments of the present disclosure may be applied to assist those skilled in the art in understanding the technical content of the present disclosure, but does not mean that embodiments of the present disclosure may not be used in other devices, systems, environments, or scenarios.
As shown in fig. 1, the distributed system architecture 100 according to this embodiment may include a plurality of nodes N1 to N9 and a control center 110.
The nodes N1 to N9 may be computers or software modules running in the computers, and the nodes N1 to N9 may be communicatively connected by various means, such as, but not limited to, wired connection, wireless connection, signaling connection, connection through the internet, and so on. One or more services, such as, but not limited to, financial related services, may be implemented using a plurality of nodes N1 through N9, each of which may correspond to a transaction. Assuming that service a is accessed from node N1 and processed sequentially through nodes N4 and N7, node N7 returns the processing result to node N1 via node N4. Thus, the service link for service a is n1→n4→n7. In a similar manner, the individual services are handled by the respective nodes forming the respective service links, for example, the service link for service B is n2→n5→n7, the service link for service C is n3→n6→n7, the service link for service D is n2→n5→n8, and the service link for service E is n3→n6→n9.
The control center 110 is used to configure and manage the respective nodes N1 to N9. The control center 110 may include one or more computers. The control center 110 may be communicatively coupled to the various nodes N1 through N9 by various means including, but not limited to, a wired connection, a wireless connection, a signaling connection, a connection over the internet, and the like.
An information transfer method according to an aspect of an embodiment of the present disclosure may be performed by the control center 110. Accordingly, an apparatus for information transfer according to an aspect of an embodiment of the present disclosure may be provided in the control center 110. An information transfer method according to another aspect of the embodiments of the present disclosure may be performed by any one of a plurality of nodes. Accordingly, an apparatus for information transfer according to an aspect of an embodiment of the present disclosure may be provided in any node.
In some embodiments, the information transfer method of the embodiments of the present disclosure may be performed by a computer or cluster of computers that is different from the control center 110 and that is capable of communicating with the nodes N1 to N9 and/or the control center 110. Accordingly, the apparatus for information transfer provided by the embodiments of the present disclosure may also be provided in a computer or a cluster of computers that is different from the control center 110 and is capable of communicating with the nodes N1 to N9 and/or the control center 110.
It should be understood that the number of nodes and control centers in fig. 1 is merely illustrative. There may be any number of nodes and control centers, as desired for implementation.
Fig. 2 schematically illustrates a flow chart of an information delivery method according to an embodiment of the present disclosure. The method may be performed by a control center in a distributed system.
Service link information of a plurality of nodes in the distributed system and status information of each node are acquired in operation S201.
In operation S202, in response to the status information of any node indicating that the node is an abnormal node, one or more upper nodes of the abnormal node are determined according to the service link information.
In operation S203, for a target service among a plurality of services to be processed by the abnormal node, a link between the abnormal node and at least one of the upper nodes is switched from a synchronous link to an asynchronous link for transferring information about the target service.
Fig. 3 schematically illustrates a flow chart of an information delivery method according to an embodiment of the present disclosure. The method may be performed by any node in a distributed system.
Transmitting service link information and current state information of the node in operation S301;
Receiving link control information for the node and setting a link between the node and a node subordinate to the node as a synchronous link or an asynchronous link according to the received link control information in operation S302; and
In operation S303, information about a service is transferred to the lower node through the set link.
Fig. 4 schematically illustrates a schematic diagram of a distributed system according to an embodiment of the present disclosure.
As shown in fig. 4, the distributed system 400 includes a plurality of nodes N1 to N9 and a control center 410. Assume that the service link for service a is n1→n4→n7, where service a is accessed through node N1 and then routed by node N4 to node N7, where node 7 processes service a. In other words, node N1 is an access node for service a, node N4 is a routing node for service a, and node N7 is a processing node for service a. In the service link n1→n4→n7 for the service a, the node N4 is a lower node of the node N1, and the node N1 is an upper node of the node N4; node N7 is a lower node of node N4, and node N4 is an upper node of node N7. Similarly, the service link for service B is n2→n5→n7, where node N2 is the access node for service B, node N5 is the routing node for service B, and node N7 is the processing node for service B. The service link for the service C is N3- & gt N6- & gt N9, wherein the node N3 is an access node of the service C, the node N6 is a routing node of the service C, and the node N9 is a processing node of the service B.
According to the embodiment of the present disclosure, the synchronous link SL and the asynchronous link AL may be preset between adjacent two-stage nodes by respective service links. As shown in fig. 4, in the service links n1→n4→n7, the synchronous link SL14 and the asynchronous link AL14 are provided between the nodes N1 and N4, and the synchronous link SL47 and the asynchronous link AL47 are provided between the nodes N4 and N7. Similarly, in the service links n2→n5→n7, the synchronous link SL25 and the asynchronous link AL25 are set between the nodes N2 and N5, and the synchronous link SL57 and the asynchronous link AL57 are set between the nodes N5 and N7; in the service links n3→n6→n7, the synchronous link SL36 and the asynchronous link AL36 are set between the nodes N3 and N6, and the synchronous link SL67 and the asynchronous link AL67 are set between the nodes N6 and N7. According to an embodiment of the present disclosure, the synchronization link may be a remote procedure call (RPC, remote Procedure Call) link.
The control center 410 may include a registration server 4101 and a link control server 4102. The registration server 4101 may be a computer or group of computers installed with ZooKeeper middleware. The link control server 4102 may be a computer or group of computers having processing capabilities. The registration server 4101 is communicatively connected to the link control server 4102 and nodes N1 to N9.
The registration server 4101 may maintain the following information for each node: service link information of the node, state information of the node, and link control information of the node.
The service link information of each node N1 to N9 may be upper link information of a service handled by the node before reaching the node. Each node N1 to N9 may register service link information with the registration server 4101 during operation. For example, in the process of processing the service a, when the relevant information of the service a is transferred from the node N1 to the node N4 through the synchronization link SL14, the node N4 may register the relevant information of the synchronization link SL14 in the service link information of the node N4 to the registration server 4101. Similarly, assume that services A, B and C are processed during operation of node N7, wherein information related to service a is communicated to node N7 via synchronization link SL47, information related to service B is communicated to node N7 via synchronization link SL57, and information related to service C is communicated to node N7 via synchronization link SL 67. In this case, the service link information registered by the node N7 with the registration server 4101 contains information on the synchronization links SL47, SL57, and SL 67. The link control server 4102 can determine the upper node of each node based on the service link information of each node registered in the registration server 4101.
The state information of each node N1 to N9 includes, but is not limited to, CPU usage status, memory usage status, input/Output (IO) load, garbage collection (GC, garbage Collection) frequency, thread pool status, and database connection pool status of the node. Each node N1 to N9 may collect (e.g., periodically, at a preset time, or otherwise) its own status information and send it to the registration server 4101. The registration server 4101 may replace the previous state information with the most recently received state information for each node. The link control server 4102 may subscribe to the registration server 4101 for status information of the respective nodes N1 to N9. The registration server 4101 may send the state information of an abnormal node to the link control server 4102 if it finds that the state information of a certain node indicates that the node is abnormal, for example, the CPU usage exceeds a preset threshold (for example, 80%).
The link control information of each node N1 to N9 may be synchronous link information for indicating that the node uses a synchronous link to transfer information with its lower node or asynchronous link information for indicating that the node uses an asynchronous link to transfer information with its lower node. For example, if the link control information of the node N1 stored in the registration server 4101 is asynchronous link information, this asynchronous link information indicates that information transfer for service a between the node N1 and its lower node N4 is to be performed through the asynchronous link AL 14; if the link control information of the node N1 is synchronous link information, the synchronous link information indicates that the information transfer for the service a between the node N1 and its lower node N4 is to be performed through the synchronous link SL 14. Each of the nodes N1 to N9 may subscribe to the respective link control information with the registration server 4101, and the registration server 4101 may transmit the link control information after the change to the corresponding node in response to the link control information of the node being changed.
In the initial stage, the link control information of the nodes N1 to N9 may be default synchronization link information in the registration server 4101 to control the transfer of service related information between the respective nodes through the synchronization link SL.
In processing the service, in response to, for example, the status information of the node N7 indicating that the node N7 is abnormal, the registration server 4101 may provide the status information of the abnormal node N7 to the link control server 4102. The link control server 4102 determines that the upper node of the node N7 is N4, N5, and N6 based on the service link information registered in the registration server 4101. The link control server 4102 determines at least one service among the plurality of services to be handled by the node N7 as a target service, for example, determines a service a handled through the service link n1→n4→n7 among the services A, B, C as a target service, and modifies link control information between the node N4 and the node N7 from synchronous link information to asynchronous link information for the service a. In response to the link control information being changed, the registration server 4101 transmits the changed link control information, that is, asynchronous link information, to the node N4 to which the link control information is subscribed. Based on this asynchronous link information, node N4 switches the link between nodes N4 and N7 for service a from synchronous link SL47 to asynchronous link AL47 and uses this asynchronous link AL47 to communicate information about service a to node N7.
In some embodiments, the link control server may also calculate a handover proportion, which may be determined by an adaptive random gradient descent (SGD, stochastic GRADIENT DESENT) algorithm, for example, based on the number of services that the distributed system is successful in processing per unit time. The handover proportion may indicate a number of target services of the plurality of services to be accessed by switching to the asynchronous link. The link control server may determine at least one service among the plurality of services to be processed for the abnormal node as the target service according to the calculated handover proportion. Compared with the traditional switching method for switching the services with fixed proportion to the asynchronous queue link processing, the method can relieve and even avoid the problem that the service success rate caused by link switching is easy to have larger fluctuation, and realize more gentle current limiting.
In some embodiments, a state collector and link controller may be deployed in each node. The state collectors and link controllers may be program modules deployed in the nodes. In some embodiments, the state collectors and link controllers may also be hardware modules or a combination of software modules and hardware modules.
The state collector is used for collecting state information of the node where the state collector is located and can comprise an initialization unit, a communication unit and a node state collection unit. The initialization unit is responsible for initializing the state collector, the communication unit is responsible for communicating the state collector with the registration server, and the node state collection unit is responsible for collecting the node system state. The state collector can acquire key system performance indexes such as CPU use state, memory use state, thread pool, database connection pool and the like in the node in real time, and send acquired data to the registration center to finish reporting node state information. For example, if the CPU utilization rate of a certain node is high and exceeds the preset CPU utilization rate threshold by 80%, the state collector can report the information to the registry to complete the information collection of the node.
The link controller is used for switching the service link of the node and can comprise an initialization unit, a communication unit, a link registration unit and a link switching unit. The initialization unit is responsible for initializing the transaction link controller and the communication unit is responsible for communicating with the registration server. The link registration unit is used for connecting the registration server to complete the registration of the upstream link information of the node when the service is normally processed through the RPC link. The link switching unit is responsible for acquiring link control information and switching a service link with a lower node according to the link control information, so that the service proportion switched to the asynchronous queue is adjusted in real time according to the calculated tangential proportion.
Although the above embodiments are described taking an example in which the control center includes the registration server and the link control server, embodiments of the present disclosure are not limited thereto. The control center may have other structures as desired, for example, may be implemented to include multiple registration servers and multiple link control servers, or may be implemented to include other computing devices as well, or may be implemented by one computing device having a processor and memory.
The operational flow of the distributed system of the embodiments of the present disclosure will be described below with reference to fig. 5 in conjunction with fig. 4.
Fig. 5 schematically illustrates an operational flow diagram of a distributed system according to an embodiment of the present disclosure.
In operation S501, as a service passes through a synchronous link, nodes in the link register respective link information at a registration server. For example, when the distributed system is in an initial state or a normal state, the service is synchronously accessed via the RPC link. The service link acquires own link information through each node and registers the link information into the service link information of the registration server.
In operation S502, the node collects its own state information and registers with the registration server. For example, each node in the distributed system collects its own state information in real time, where the state information may be various information capable of representing the pressure-bearing condition of the node, including but not limited to performance indexes such as CPU load, IO load, memory usage, GC frequency, thread number, and the like. If the performance index in the state information is normal, reporting that the node state of the registration server is normal. And if the performance index in the state information exceeds the threshold value, reporting the abnormal state of the registration server node.
In operation S503, the link control server discovers the abnormal node according to the state information, traces back the upper node, determines the handover proportion, and modifies the link control information. For example, the link control server may subscribe to the registration server for respective node state information. If the node state is abnormal, the upper service link of the node is acquired from the registration server according to the service link information, the switching proportion is calculated, and the link control information corresponding to the link in the registration server is changed. When the node state is abnormal, switching the link control information of the upper node to be asynchronous link information; when the node is normal, the link control information of the upper node is switched to be synchronous link information.
In some embodiments, the link control server may calculate the handover proportion according to an adaptive SGD algorithm. The self-adaptive SGD algorithm continuously performs iterative calculation on the switching proportion, and the switching proportion is continuously adjusted, so that the link control server can continuously adjust the service proportion of switching into the asynchronous queue link, the throughput of the distributed system is optimized, and a self-recovery time window is provided for the abnormal node.
The process of calculating the handover proportion according to the adaptive SGD algorithm may include a parameter setting process and an iterative calculation process.
In the parameter setting process, setting a parameter w to be optimized, an objective function f (x) and an initial learning rate alpha.
The parameter w to be optimized is the switching proportion, and the initial value of w is set to be 1, namely the switching proportion is 100%.
The objective function is f (x) =tps·m, wherein tps is the transaction number processed by the system in unit time, tps is the throughput of the system in unit time, and m is the system success rate of the transaction in unit time. The value of f (x) is the number of transactions successfully processed by the system in unit time, and is used for measuring the effect value of parameter tuning.
The initial learning rate is specified as 0.99 for the alpha default value. The next iteration parameter value w n+1 is equal to 0.99 times the current iteration parameter value w n. And 0.01 is the step length of parameter adjustment for each iteration.
After the setting is completed, performing an iterative calculation process to iteratively optimize the switching proportion parameters, and executing the following steps for each iteration:
calculating the gradient of the objective function with respect to the current parameter, namely calculating the gradient of the success rate of the transaction system and the transaction processing time length under the current switching proportion:
Calculating a decline gradient from the calculated gradient and the learning rate α: η t=α·gt;
Updating parameters according to the falling gradient: w t+1=wtt;
And (3) adjusting the switching proportion to w t+1, and bringing a new parameter value w t+1 into the step (1), namely switching the transaction with the proportion of w t+1 into the transaction link processing of the asynchronous queue.
In operation S504, the upper node switches the link to the asynchronous link according to the subscribed link control information. For example, each node may subscribe to link control information with a registration server. And switching the lower link once the corresponding link control information generation table is more. There are two cases of link switching here: switching from an asynchronous link to a synchronous link, and switching from a synchronous link to an asynchronous link. For any node, if the link control information is changed from synchronous link information to asynchronous link information, pushing one or more services to an asynchronous message queue according to the currently calculated switching proportion to access the service through an asynchronous link, and accessing the rest of the services through the synchronous link; if the link control information changes from asynchronous link information to synchronous link information, the asynchronous link access is restored.
Before the abnormal node is recovered to normal, the upper node continuously acquires the switching proportion and adjusts the proportion of switching into the asynchronous link processing service. Among the services to be processed by the abnormal node, one part of services are provided for the abnormal node through an asynchronous link in a mode of pushing messages in an asynchronous queue, and the other part of services can still be accessed through an RPC synchronous link, so that the amount of services borne by the abnormal node is greatly reduced. After the abnormal node acquires the asynchronous queue push message, if the service in the message has overtime, returning a service overtime result to the access node; and if the service is not overtime, normal service processing is performed.
In operation S505, the link control server modifies the link control information to control the upper node to switch back to the synchronous link in response to the abnormal node returning to normal. For example, since a certain proportion of services have been switched to asynchronous queue links, the abnormal node pressure bearing is reduced and the node state is restored to normal. The state information of the node in the registration server is changed to be normal, and the link control server switches the link control information in the registration server from the asynchronous link back to the RPC synchronous link, so that the corresponding node is switched to the RPC synchronous link for processing.
According to the embodiment of the disclosure, whether each node in the distributed system has a performance deterioration trend can be monitored in real time, and after the fault node is found, an access request is switched to an asynchronous queue transaction link for processing. By introducing the adaptive SGD algorithm to iteratively calculate the switching proportion of the service, the proportion is switched in real time according to the system processing condition, and the flatter current limit can be realized. After the pressure of the fault node is relieved, the method can also switch the service to a normal RPC link, and the synchronous and asynchronous switching of the service link is smoothly completed. The method of the embodiment of the disclosure can improve the throughput of the system, lead the system to spend a mass service access time period and also can relieve or even eliminate the severe fluctuation of the service success rate during link switching.
Fig. 6 schematically illustrates a block diagram of an apparatus for information transfer according to an embodiment of the disclosure. The means for information transfer may implement the method performed by the control center described above.
As shown in fig. 6, the apparatus 600 for information delivery includes a registration module 610, a traceback module 620, and a control module 630.
The registration module 610 may obtain service link information of a plurality of nodes and status information of each node in the distributed system. The traceback module 620 may determine one or more upper nodes of the abnormal node according to the service link information in response to the state information of any node indicating the node is the abnormal node. The control module 630 may switch a link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link for a target service among a plurality of services to be processed by the abnormal node, for transferring information about the target service.
Fig. 7 schematically illustrates a block diagram of an apparatus for information transfer according to an embodiment of the disclosure. The means for information transfer may implement the method performed by any of the nodes described above.
As shown in fig. 7, the apparatus 700 for information transfer includes an information acquisition module 710, a link control module 720, and a service processing module 730.
The information acquisition module 710 may transmit service link information and current state information of the node. The link control module 720 may receive link control information for the node and set a link between the node and a node subordinate to the node as a synchronous link or an asynchronous link according to the received link control information. The service processing module 730 may transfer information about a service to the lower node through the set link.
Any number of modules, sub-modules, units, sub-units, or at least some of the functionality of any number of the sub-units according to embodiments of the present disclosure may be implemented in one module. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented as split into multiple modules. Any one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be implemented at least in part as a hardware circuit, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in any other reasonable manner of hardware or firmware that integrates or encapsulates the circuit, or in any one of or a suitable combination of three of software, hardware, and firmware. Or one or more of the modules, sub-modules, units, sub-units according to embodiments of the present disclosure may be at least partially implemented as computer program modules, which, when executed, may perform the corresponding functions.
For example, any of the registration module 610, the trace back module 620, and the control module 630 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. Any of the information acquisition module 710, the link control module 720, and the service processing module 730 may be combined in one module to be implemented, or any of the modules may be split into a plurality of modules. At least some of the functionality of one or more of the modules may be combined with at least some of the functionality of other modules and implemented in one module. At least one of the registration module 610, the trace back module 620, and the control module 630 and/or at least one of the information acquisition module 710, the link control module 720, and the service processing module 730 may be implemented, at least in part, as hardware circuitry, such as a Field Programmable Gate Array (FPGA), a Programmable Logic Array (PLA), a system-on-chip, a system-on-substrate, a system-on-package, an Application Specific Integrated Circuit (ASIC), or in hardware or firmware in any other reasonable manner that integrates or packages the circuitry, or in any one of or a suitable combination of three of software, hardware, and firmware. Or at least one of the registration module 610, the trace back module 620 and the control module 630 and/or at least one of the information acquisition module 710, the link control module 720 and the service processing module 73 may be at least partially implemented as computer program modules which, when run, may perform the respective functions.
Fig. 8 schematically illustrates a block diagram of an electronic device according to an embodiment of the disclosure. The electronic device shown in fig. 8 is only one example and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 8, an electronic device 800 according to an embodiment of the present disclosure includes a processor 801 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. The processor 801 may include, for example, a general purpose microprocessor (e.g., a CPU), an instruction set processor and/or an associated chipset and/or special purpose microprocessor (e.g., an Application Specific Integrated Circuit (ASIC)), or the like. The processor 801 may also include on-board memory for caching purposes. The processor 801 may include a single processing unit or multiple processing units for performing the different actions of the method flows according to embodiments of the disclosure.
In the RAM 803, various programs and data required for the operation of the electronic device 800 are stored. The processor 801, the ROM 802, and the RAM 803 are connected to each other by a bus 804. The processor 801 performs various operations of the method flow according to the embodiments of the present disclosure by executing programs in the ROM 802 and/or the RAM 803. Note that the program may be stored in one or more memories other than the ROM 802 and the RAM 803. The processor 801 may also perform various operations of the method flows according to embodiments of the present disclosure by executing programs stored in the one or more memories.
According to an embodiment of the present disclosure, the electronic device 800 may also include an input/output (I/O) interface 805, the input/output (I/O) interface 805 also being connected to the bus 804. The electronic device 800 may also include one or more of the following components connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
According to embodiments of the present disclosure, the method flow according to embodiments of the present disclosure may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable storage medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the embodiments of the present disclosure are performed when the computer program is executed by the processor 801. The systems, devices, apparatus, modules, units, etc. described above may be implemented by computer program modules according to embodiments of the disclosure.
The present disclosure also provides a computer-readable storage medium that may be embodied in the apparatus/electronic device described in the above embodiments; or may exist alone without being assembled into the apparatus/electronic device. The computer-readable storage medium carries one or more programs which, when executed, implement methods in accordance with embodiments of the present disclosure.
According to embodiments of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, which may include, for example, but is not limited to: a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. For example, according to embodiments of the present disclosure, the computer-readable storage medium may include ROM 802 and/or RAM 803 and/or one or more memories other than ROM 802 and RAM 803 described above.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
It should be noted that the information transmission method and apparatus provided in the embodiments of the present disclosure may be used in the financial field, and may also be used in any field other than the financial field, for example, the computer field, the internet field, etc., and the application fields of the information transmission method and apparatus of the embodiments of the present disclosure are not limited.
Those skilled in the art will appreciate that the features recited in the various embodiments of the disclosure and/or in the claims may be provided in a variety of combinations and/or combinations, even if such combinations or combinations are not explicitly recited in the disclosure. In particular, the features recited in the various embodiments of the present disclosure and/or the claims may be variously combined and/or combined without departing from the spirit and teachings of the present disclosure. All such combinations and/or combinations fall within the scope of the present disclosure.
The embodiments of the present disclosure are described above. These examples are for illustrative purposes only and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the embodiments cannot be used advantageously in combination. The scope of the disclosure is defined by the appended claims and equivalents thereof. Various alternatives and modifications can be made by those skilled in the art without departing from the scope of the disclosure, and such alternatives and modifications are intended to fall within the scope of the disclosure.

Claims (12)

1. A method of information transfer, the method comprising:
acquiring service link information of a plurality of nodes in a distributed system and state information of each node;
Responding to the state information of any node to indicate the node to be an abnormal node, and determining one or more superior nodes of the abnormal node according to the service link information;
determining a switching proportion by a self-adaptive random gradient descent algorithm according to the service quantity of the distributed system which is successfully processed in unit time;
determining at least one service as a target service among a plurality of services to be processed for the abnormal node according to the switching proportion; and
For a target service of a plurality of services to be processed by the abnormal node, switching a link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link for transferring information about the target service.
2. The method of claim 1, further comprising:
a synchronous link and an asynchronous link are preset between two adjacent nodes in the plurality of nodes; and
The method comprises the steps of pre-storing link control information for each node, wherein the link control information is synchronous link information or asynchronous link information, the synchronous link information is used for indicating that synchronous links are used for transmitting information between the node and the node at the lower level of the node, and the asynchronous link information is used for indicating that asynchronous links are used for transmitting information between the node and the node at the lower level of the node.
3. The method of claim 2, wherein the switching the link between the anomaly node and at least one of the superordinate nodes from a synchronous link to an asynchronous link comprises:
And modifying the link control information for at least one superior node from synchronous link information to asynchronous link information, and transmitting the link control information to at least one superior node.
4. The method of claim 1, further comprising: after switching the link between the anomaly node and at least one of the superordinate nodes from a synchronous link to an asynchronous link,
And switching a link between the normal-restored node and at least one of the upper nodes from an asynchronous link to a synchronous link in response to the state information of the abnormal node indicating that the abnormal node is restored.
5. The method of any of claims 1-4, wherein the state information of the node comprises at least one of a CPU usage state, a memory usage state, an input-output load, a garbage collection frequency, a thread pool state, and a database connection pool state of the node.
6. An information delivery method performed by a node in a distributed system, the method comprising:
transmitting service link information and current state information of the node;
Receiving link control information aiming at the node, setting a link between the node and a lower node of the node as a synchronous link or an asynchronous link according to the received link control information, wherein the link between the node and the lower node of the node is set as the asynchronous link according to the switching proportion according to the received link control information as asynchronous link information and the switching proportion according to the service quantity successfully processed by the distributed system in unit time by an adaptive random gradient descent algorithm; and
And transmitting information about the service to the subordinate node through the set link.
7. The method of claim 6, the setting a link between the node and a subordinate node of the node as a synchronous link or an asynchronous link according to the received link control information, and transmitting information about a service to the subordinate node through the set link comprising:
and setting a link between the node and a node subordinate to the node as a synchronous link in response to the received link control information synchronous link information.
8. The method of claim 6, further comprising: after setting a link between the node and a node subordinate to the node as an asynchronous link, and before transferring information about a service to the node subordinate through the asynchronous link, determining whether the service times out,
Wherein, in case the service does not timeout, an operation of transferring information about the service to the subordinate node through the asynchronous link.
9. An apparatus for information transfer, comprising:
the registration module is used for acquiring service link information of a plurality of nodes in the distributed system and state information of each node;
The tracing module is used for responding to the state information of any node to indicate that the node is an abnormal node, and determining one or more superior nodes of the abnormal node according to the service link information;
A control module for switching, for a target service among a plurality of services to be processed by the abnormal node, a link between the abnormal node and at least one of the upper nodes from a synchronous link to an asynchronous link for transferring information about the target service;
The device for information transmission is also used for determining a switching proportion through an adaptive random gradient descent algorithm according to the service quantity of the distributed system which is successfully processed in unit time; and
And determining at least one service as a target service from a plurality of services to be processed aiming at the abnormal node according to the switching proportion.
10. An apparatus for information transfer, performed by a node in a distributed system, comprising:
the information acquisition module is used for transmitting service link information and current state information of the node;
A link control module, configured to receive link control information for the node, and set a link between the node and a node at a lower level of the node as a synchronous link or an asynchronous link according to the received link control information, where a switching ratio is determined by an adaptive random gradient descent algorithm according to a service number of the distributed system successfully processed in a unit time in response to the received link control information being asynchronous link information, and the link between the node and the node at the lower level of the node is set as an asynchronous link according to the switching ratio; and
And the service processing module is used for transmitting information about the service to the subordinate node through the set link.
11. An electronic device, comprising:
One or more processors;
Storage means for storing one or more programs,
Wherein the one or more programs, when executed by the one or more processors, cause the one or more processors to perform the method of any of claims 1-8.
12. A computer readable storage medium having stored thereon executable instructions which, when executed by a processor, cause the processor to perform the method of any of claims 1 to 8.
CN202110202388.3A 2021-02-23 2021-02-23 Information transfer method, device, electronic equipment and medium Active CN112948207B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110202388.3A CN112948207B (en) 2021-02-23 2021-02-23 Information transfer method, device, electronic equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110202388.3A CN112948207B (en) 2021-02-23 2021-02-23 Information transfer method, device, electronic equipment and medium

Publications (2)

Publication Number Publication Date
CN112948207A CN112948207A (en) 2021-06-11
CN112948207B true CN112948207B (en) 2024-06-18

Family

ID=76245619

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110202388.3A Active CN112948207B (en) 2021-02-23 2021-02-23 Information transfer method, device, electronic equipment and medium

Country Status (1)

Country Link
CN (1) CN112948207B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116756044B (en) * 2023-08-11 2023-11-21 杭州罗莱迪思科技股份有限公司 RPC remote debugging method, device and application based on data link tracking

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1333968A (en) * 1998-11-24 2002-01-30 艾利森电话股份有限公司 Multi-media protocol for slot-based communication systems
CN109324954A (en) * 2018-11-06 2019-02-12 阿里巴巴集团控股有限公司 A kind of large-size screen monitors chain-circuit system detection method, device and equipment

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101378359A (en) * 2008-10-06 2009-03-04 中兴通讯股份有限公司 Method and apparatus for switching of primary and secondary compulsion links
JP5187278B2 (en) * 2009-06-17 2013-04-24 富士通株式会社 Abnormal part identification program, abnormal part identification device, abnormal part identification method
CN108024288A (en) * 2016-11-04 2018-05-11 电信科学技术研究院 A kind of information processing method and device
CN106600049A (en) * 2016-12-09 2017-04-26 国网北京市电力公司 Path generation method and apparatus thereof
CN111385122B (en) * 2018-12-29 2023-06-16 广州市百果园信息技术有限公司 Distributed system link tracking method, device, computer equipment and storage medium
CN109873717A (en) * 2019-01-18 2019-06-11 深圳壹账通智能科技有限公司 Monitoring method, device, computer equipment and storage medium
CN109981454A (en) * 2019-03-29 2019-07-05 中国人民银行清算总中心 The broadcast controlling method and device of dynamic routing broadcasting packet
CN110087215B (en) * 2019-05-06 2022-05-13 北京百度网讯科技有限公司 Information broadcasting method and device based on Bluetooth connection, terminal and storage medium
CN110223173A (en) * 2019-05-20 2019-09-10 深圳壹账通智能科技有限公司 Trade link abnormality eliminating method and relevant device
CN110503385B (en) * 2019-07-15 2022-08-12 招联消费金融有限公司 Service processing method, device, computer equipment and storage medium
CN111294784B (en) * 2020-05-13 2020-10-20 深圳市汇顶科技股份有限公司 Data transmission method, device, chip, electronic equipment and storage medium
CN111767194B (en) * 2020-07-08 2023-09-05 中国工商银行股份有限公司 Information processing method, device, electronic equipment and medium
CN111970168A (en) * 2020-08-11 2020-11-20 北京点众科技股份有限公司 Method and device for monitoring full-link service node and storage medium
CN111897878B (en) * 2020-08-25 2023-09-29 中国工商银行股份有限公司 Master-slave data synchronization method and system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1333968A (en) * 1998-11-24 2002-01-30 艾利森电话股份有限公司 Multi-media protocol for slot-based communication systems
CN109324954A (en) * 2018-11-06 2019-02-12 阿里巴巴集团控股有限公司 A kind of large-size screen monitors chain-circuit system detection method, device and equipment

Also Published As

Publication number Publication date
CN112948207A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
US10417062B2 (en) Method and apparatus of unloading out of memory processing flow to user space
CN104243405A (en) Request processing method, device and system
CN111966289A (en) Partition optimization method and system based on Kafka cluster
CN111625592A (en) Load balancing method and device for distributed database
CN112948207B (en) Information transfer method, device, electronic equipment and medium
CN110490316B (en) Training processing method and training system based on neural network model training system
CN114691372A (en) Group intelligent control method of multimedia end edge cloud system
US9727403B2 (en) System and method for detecting an abnormal condition in a multi-node communication system
CN116382892B (en) Load balancing method and device based on multi-cloud fusion and cloud service
CN109067649B (en) Node processing method and device, storage medium and electronic equipment
CN116594568A (en) Data storage method and device, electronic equipment and storage medium
CN112995307B (en) Log processing method, system, device, electronic equipment and storage medium
US11106680B2 (en) System, method of real-time processing under resource constraint at edge
CN110018906B (en) Scheduling method, server and scheduling system
CN108182241A (en) A kind of optimization method of data interaction, device, server and storage medium
CN110751560B (en) Transaction processing method and device, electronic equipment and readable storage medium
CN114090201A (en) Resource scheduling method, device, equipment and storage medium
CN115250276A (en) Distributed system and data processing method and device
CN112527454A (en) Container group scheduling method and device, electronic equipment and computer readable medium
CN114064362B (en) Data recovery method, system and computer readable storage medium for distributed storage
CN117148705B (en) Equipment running state detection method and system based on data monitoring analysis
CN115065685B (en) Cloud computing resource scheduling method, device, equipment and medium
CN111767085B (en) Storm platform parameter configuration method and apparatus
US20240202207A1 (en) Distributed function data transformation system
CN117995255B (en) Memory self-test dynamic grouping method and device

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
GR01 Patent grant