Method and device for determining abnormal state of shunting node and electronic equipment
By deploying a token ring device in the cluster for authentication of the traffic distribution nodes, the problem of cluster information leakage caused by spoofing attacks on the traffic distribution nodes is solved, the legitimacy and security monitoring of the traffic distribution nodes is realized, and the self-defense capability of the cluster is improved.
Patent Information
- Application Number
- CN202410941698.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-12
- Publication Date
- 2024-11-22
Smart Images

Figure CN119011194A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of network technology and security, and in particular to a method, device and electronic device for determining an abnormal state of a diversion node. Background Art
[0002] In the cluster device load balancing scenario, a group of inbound traffic diversion devices are required to distribute the inbound traffic to each business processing node. The load balancing diversion node is part of the cluster node. Generally, the cluster system has information identification of the node to prevent devices that do not meet the cluster configuration expectations from being added to the cluster. However, in the case of public load balancing security protection technology and information theft, the security configuration information and rules of the diversion device may be stolen, allowing attackers to forge a diversion node, ultimately achieving the purpose of stealing inbound information and sending attack information to the business processing node.
[0003] The security mechanism of load balancing in related technologies is generally the security mechanism of cluster devices, which will filter the information of unexpected devices through firewalls, access control mechanisms of network elements themselves, configuration information identification, communication information encryption and decryption, etc. However, in scenarios such as device virtualization on the cloud and non-privatization of links, attackers can bypass a series of security mechanisms and disguise themselves as members of the cluster through a series of espionage operations, and obtain the identity of the diversion role in the cluster load balancing function, and then obtain the cluster inbound traffic information, send attack information to the cluster, and disrupt the normal operation of the cluster.
[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0005] The embodiments of the present application provide a method, device and electronic device for determining the abnormal state of a shunt node, so as to at least solve the technical problem of cluster attacks or cluster information leakage caused by an attacker disguising himself as a shunt node in the cluster after stealing the configuration information or rules in the cluster system.
[0006] According to one aspect of an embodiment of the present application, a method for determining an abnormal state of a shunt node is provided, comprising: obtaining a shunt node deployed on a token ring device in a cluster, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node; receiving a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used to represent the tokens contained in the shunt node within a target time period; combining the target token sequences corresponding to each shunt node to obtain a token sequence set; and determining the abnormal state of the shunt node based on the arrangement order of the tokens in the token sequence set.
[0007] Optionally, the token ring device includes a token allocation table, a token ring and a node token device, each shunt node corresponds to a node token device, wherein the token allocation table is used to store tokens to be allocated, and the token ring is used to connect the shunt nodes and send tokens to the node token devices corresponding to the shunt nodes.
[0008] Optionally, the token ring includes a unidirectional forwarding mechanism for forwarding the tokens in the token allocation table to the node token devices in a preset direction.
[0009] Optionally, the node token device includes a token receiving device, a token sending device and a timer, wherein the token receiving device is used to receive the token sent by the token ring and store it in the tail of the initial token sequence corresponding to the diversion node; the token sending device is used to send the head token in the initial token sequence to the token ring at the end of the target time period; the timer is used to generate the target time period and control the sending time of the head token.
[0010] Optionally, the target token sequence allocated by the receiving token ring device to the diversion node includes: starting a timer when the node token device receives a token sent by the token ring for the first time in each cycle; when the timer ends, stopping receiving the token sent by the token ring, sending the header token to the token ring, and determining the initial token sequence after removing the header token as the target token sequence.
[0011] Optionally, the abnormal state of the diversion node is determined based on the arrangement order of tokens in the token sequence set, including: when the arrangement order does not conform to a preset order, determining that the diversion node is in an abnormal state; when the arrangement order conforms to a preset order, determining that the diversion node is in a normal state.
[0012] Optionally, the method also includes: determining the number of first tokens corresponding to all tokens to be allocated in the token allocation table; determining the number of second tokens corresponding to all tokens contained in the token sequence set; comparing the number of first tokens and the number of second tokens to obtain a comparison result; when the comparison result indicates that the number of second tokens is greater than the number of first tokens, discarding the head token sequence in the token sequence set in sequence until the number of second tokens is equal to the number of first tokens.
[0013] According to another aspect of an embodiment of the present application, a device for determining an abnormal state of a shunt node is also provided, including: an acquisition module, used to acquire a shunt node deployed on a token ring device in a cluster, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node; a receiving module, used to receive a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used to represent the tokens contained in the shunt node within a target time period; a combining module, used to combine the target token sequences corresponding to each shunt node to obtain a token sequence set; and a determining module, used to determine the abnormal state of the shunt node based on the arrangement order of tokens in the token sequence set.
[0014] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the abnormal state determination method of the above-mentioned shunt node.
[0015] According to another aspect of the embodiments of the present application, a non-volatile storage medium is also provided, the non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned method for determining the abnormal state of the diversion node by running the computer program.
[0016] According to another aspect of the embodiments of the present application, a computer program product is provided, including computer instructions, which implement the above-mentioned method for determining the abnormal state of a diversion node when the computer instructions are executed by a processor.
[0017] In an embodiment of the present application, a shunt node deployed on a token ring device in a cluster is obtained, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node; a target token sequence allocated by the token ring device to the shunt node is received, wherein the target token sequence is used to represent the tokens contained in the shunt node within a target time period; the target token sequences corresponding to each shunt node are combined to obtain a token sequence set; the abnormal state of the shunt node is determined according to the arrangement order of the tokens in the token sequence set, thereby achieving real-time verification and monitoring of the identity of the shunt node to ensure the legitimacy and security of the shunt node, thereby achieving the technical effect of effectively preventing unexpected behavior of the cluster and improving the self-defense capability of the cluster, and further solving the technical problem of cluster attacks or cluster information leakage caused by attackers disguising themselves as shunt nodes in the cluster after stealing configuration information or rules in the cluster system. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0019] Figure 1 is a hardware structure diagram of a computer terminal for implementing a method for determining an abnormal state of a diversion node according to an embodiment of the present application;
[0020] Figure 2 is a flow chart of a method for determining an abnormal state of a shunt node according to an embodiment of the present application;
[0021] Figure 3 is a schematic diagram of an ordered token ring device according to an embodiment of the present application;
[0022] Figure 4 It is a structural diagram of an abnormal state determination device of a shunt node according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.
[0024] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0025] First, some nouns or terms that appear in the process of explaining the embodiments of the present application are subject to the following explanations:
[0026] Token Ring: A device in a ring topology that obtains a token to determine whether the current device can perform a specific operation, such as sending a message.
[0027] In order to solve the problem that the shunt node is easily disguised and causes cluster information leakage in the related art, the embodiment of the present application provides a method for determining the abnormal state of the shunt node, which can be run on Figure 1In the computer terminal shown, the computer terminal is described below.
[0028] The abnormal state determination method of the diversion node provided in the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computer terminal for implementing a method for determining an abnormal state of a diversion node. Figure 1 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors (the processor may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission module 106 for communication functions connected via a wired and / or wireless network. In addition, it may also include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art can understand that Figure 1 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0029] It should be noted that the one or more processors and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10. As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0030] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the abnormal state determination method of the shunt node in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, the abnormal state determination method of the shunt node described above is realized. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0031] The transmission module 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission module 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0032] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 .
[0033] It should be noted that, in some optional embodiments, the above Figure 1 The computer terminal shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the computer terminal described above.
[0034] In the above-mentioned operating environment, an embodiment of the present application provides an embodiment of a method for determining an abnormal state of a shunt node. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0035] Figure 2 is a flow chart of a method for determining an abnormal state of a shunt node according to an embodiment of the present application. Figure 2 As shown, the method comprises the following steps:
[0036] Step S202, obtaining a shunt node deployed on a token ring device in the cluster, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node.
[0037] In the above step S202, a (ordered) token ring device is provided to verify the valid identity of the shunt node to prevent an attacker from stealing the configuration information and disguising as a legitimate shunt node. In this step, the cluster management terminal identifies and obtains all shunt nodes participating in load balancing, and deploys the shunt node on the token ring device for subsequent management and verification.
[0038] Step S204: receiving a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used to represent the tokens contained in the shunt node within the target time period.
[0039] In the above step S204, each shunt node will continue to receive tokens randomly allocated from the token ring device in different time periods. These tokens constitute the target token sequence of the shunt node in a specific time period, wherein the target time period is a time period randomly generated by a built-in timer in the token ring device.
[0040] Step S206, combining the target token sequences corresponding to each diversion node to obtain a token sequence set.
[0041] In the above step S206, the received target token sequences corresponding to the diversion nodes are aggregated to form a complete token sequence set, which reflects the token flow of the entire cluster within a specific time period.
[0042] Step S208, determining the abnormal state of the diversion node according to the arrangement order of the tokens in the token sequence set.
[0043] In the above step S208, by checking whether the tokens in the token sequence set are arranged in the expected order, the system can determine whether the diversion node is operating normally. For example, if the arrangement order of tokens in the token sequence set is disordered or repeated, the system will identify the diversion node in the abnormal state.
[0044] Through the above steps S202 to S208, the real-time verification and monitoring of the identity of the diversion node is achieved to ensure the legitimacy and security of the diversion node, thereby achieving the technical effect of effectively preventing unexpected behavior of the cluster and improving the self-defense capability of the cluster, thereby solving the technical problem of cluster attacks or cluster information leakage caused by attackers disguising themselves as diversion nodes in the cluster after stealing configuration information or rules in the cluster system. The following is a detailed description.
[0045] Optionally, the token ring device includes a token allocation table, a token ring and a node token device, each shunt node corresponds to a node token device, wherein the token allocation table is used to store tokens to be allocated, and the token ring is used to connect the shunt nodes and send tokens to the node token devices corresponding to the shunt nodes.
[0046] Optionally, the token ring includes a unidirectional forwarding mechanism for forwarding the tokens in the token allocation table to the node token devices in a preset direction.
[0047] Figure 3 Schematic diagram of an ordered token ring device according to an embodiment of the present application. Figure 3 As shown, the (ordered) token ring device includes a (system) token allocation table, a token ring and a node token device. The token allocation table, the token ring and the node token device are described below respectively.
[0048] (System) Token Allocation Table: A storage structure that stores all tokens to be allocated in the system. The token allocation table organizes tokens in a certain order (e.g., from 1 to N) so that each token has a unique identifier.
[0049] Token Ring: A logical or physical ring structure with a built-in unidirectional forwarding mechanism that connects all shunt nodes and provides a loop channel so that tokens in the token allocation table can be forwarded unidirectionally between all shunt nodes in a certain order and in a preset direction (such as counterclockwise).
[0050] Node Token Device: Each shunt node has a corresponding node token device. The node token device is responsible for managing token operations related to the specific shunt node, including receiving tokens from the token ring and sending tokens back to the token ring as needed.
[0051] Optionally, the node token device includes a token receiving device, a token sending device and a timer, wherein the token receiving device is used to receive the token sent by the token ring and store it in the tail of the initial token sequence corresponding to the diversion node; the token sending device is used to send the head token in the initial token sequence to the token ring at the end of the target time period; the timer is used to control the sending time of the head token.
[0052] In an embodiment of the present application, the node token device includes a token receiving device, a token sending device and a timer. Among them, the token receiving device is used to receive tokens from the token ring, and store the received tokens in the tail of the initial token sequence corresponding to the shunt node to form a first-in-first-out token management method to ensure the orderliness of the tokens. The token sending device is used to send the head token in the initial token sequence back to the token ring after the timer ends (i.e., the end time of the above-mentioned target time period), so as to pass the token to the next shunt node in the ring through the token ring. The timer is used to generate the above-mentioned target time period and control the activation timing of the node token device to send the head token. Specifically, the timer can randomly generate a target time period, which can be dynamically adjusted according to the system requirements and traffic conditions, and trigger the token sending device at the end of the target time period, so as to return the head token to the token ring. It should be noted that the timer will regenerate another target time period after triggering the token sending device to send the head token to prepare for the subsequent token cycle transmission.
[0053] It should be noted that each shunt node has a corresponding initial token sequence, which records the token currently held by the shunt node, such as Figure 3 The initial token sequence corresponding to the left branch node is: (token x, token x+1, token..., token y), or the initial token sequence corresponding to the right branch node is: (token o, token o+1, token..., token p). The token receiving device and the token sending device will jointly maintain this initial sequence to ensure its correct receiving and sending status.
[0054] Optionally, the target token sequence allocated by the receiving token ring device to the diversion node includes: starting a timer when the node token device receives a token sent by the token ring for the first time in each cycle; when the timer ends, stopping receiving the token sent by the token ring, sending the header token to the token ring, and determining the initial token sequence after removing the header token as the target token sequence.
[0055] In an embodiment of the present application, in each cycle of the node token device, when a token is received from the token ring for the first time, the node token device will start its built-in timer to mark the beginning of a new target time period. Subsequently, the timer will count down according to a preset time interval, which is randomly generated to enhance the unpredictability of the system. When the timer reaches the end point of the timing, each node token device will stop receiving new tokens from the token ring to ensure the integrity and orderliness of the initial token sequence within the target time period; at the same time, the token sending device sends the head token of the initial token sequence back to the token ring to indicate that the current shunt node has completed the processing of the token and can pass it to the next shunt node by the token ring.
[0056] Furthermore, after sending the header token in the initial token sequence, the remaining token sequence (ie, the portion of the initial token sequence excluding the header token) will be determined as the target token sequence and sent by the node token device to the cluster management terminal for subsequent token verification.
[0057] Optionally, the abnormal state of the diversion node is determined based on the arrangement order of tokens in the token sequence set, including: when the arrangement order does not conform to a preset order, determining that the diversion node is in an abnormal state; when the arrangement order conforms to a preset order, determining that the diversion node is in a normal state.
[0058] In the embodiment of the present application, the target token sequences corresponding to the received diversion nodes are summarized to form a complete token sequence set, which reflects the token flow of the entire cluster within a specific time period. Furthermore, by checking whether the tokens in the token sequence set are arranged in the expected order, the system can determine whether the diversion node is operating normally. The details are as follows:
[0059] A preset order is set, which is determined according to the arrangement order of the tokens in the token allocation table and the forwarding rules of the token ring. For example, the tokens are allocated and transferred in the order from 1 to N. Subsequently, the arrangement order of the tokens in the token sequence set is compared with the preset order. If the arrangement order of the tokens in the token sequence set does not match the preset order, such as disordered or repeated tokens, it means that the diversion node is attacked or has other problems and is in an abnormal state. The system will no longer send inbound traffic to the diversion node, nor will it receive diversion traffic sent by the diversion node. If the arrangement order of the tokens in the token sequence set matches the preset order, it means that the diversion node is in a normal state, and the system normally receives or sends traffic information corresponding to the diversion node.
[0060] Optionally, the method also includes: determining the number of first tokens corresponding to all tokens to be allocated in the token allocation table; determining the number of second tokens corresponding to all tokens contained in the token sequence set; comparing the number of first tokens and the number of second tokens to obtain a comparison result; when the comparison result indicates that the number of second tokens is greater than the number of first tokens, discarding the head token sequence in the token sequence set in sequence until the number of second tokens is equal to the number of first tokens.
[0061] In the embodiment of the present application, in order to ensure that the token sequence set maintained by the cluster management terminal and the service node is kept within a reasonable length limit and to avoid resource waste or delayed processing caused by storing too much token information, the length of the token sequence set can be controlled as follows:
[0062] First, determine the number of all tokens to be allocated in the token allocation table, that is, the first token number mentioned above, which represents the total number of tokens that should theoretically exist in the system. Secondly, determine the number of tokens contained in the token sequence set, that is, the second token number mentioned above. When the second token number exceeds the first token number, the system will discard the target token sequence that exceeds the number limit that is first received in the token sequence set, that is, the head token sequence mentioned above.
[0063] In the embodiment of the present application, there is a cloud cluster, which uses a load balancing mechanism through a cluster system management terminal, wherein three shunt nodes are configured, for example, defined as shunt node A, shunt node B, and shunt node C, for receiving the incoming traffic introduced by the cluster management terminal and shunt it to the business processing nodes in the cluster. The cluster management terminal is configured with an ordered token ring device, and the abnormal state determination process of the entire shunt node is as follows:
[0064] Step 1: The token ring connects the three shunt nodes in sequence, and the node token device inside the shunt node resets the initial token sequence and timer. The timer of shunt node A generates a random time of 3ms, the timer of shunt node B generates a random time of 1ms, and the timer of shunt node C generates a random time of 2ms.
[0065] Step 2: The token identification numbers in the token allocation table of the cluster management terminal are 1 to 6. All tokens are allocated to the three nodes in sequence. For example, the shunt node A obtains token identifications 1 and 2, the shunt node B obtains token identifications 3 and 4, and the shunt node C obtains token identifications 5 and 6.
[0066] Step 3: The cluster management terminal sends a command to the shunt node B to start the timer. When the timer ends, token 4 is sent to the token ring, and then the current target token sequence is sent to the cluster management terminal and the service node. Then the timer re-randomly generates a timing time of 1s and stops the timing. For the next shunt node C, after receiving token 4 sent by the token ring, the timer starts and executes step 3.
[0067] Step 4: For the system management terminal and business processing node, the token sequence set (3), (4, 5), (6, 1), (2), (3, 4)... can be obtained in order from step 3. Since the received token identifiers are in the order of 1 to 6, the token sequence set comes from a legitimate diversion node.
[0068] Step 5: The system management terminal manages the number of tokens in the token sequence set. When the number of tokens exceeds 6, the previously recorded target token sequence is discarded to maintain the stability of the system.
[0069] In the embodiments of the present application, the problem of the protection mechanism of cluster load balancing itself being cracked and stolen, and then forged by attackers is taken into consideration, and a (ordered) token ring device is proposed. The token ring is constructed using a ring topology, thereby avoiding the high cost of a fully connected topology for secure communication between shunt nodes because the security mechanism is used in communications between shunt nodes.
[0070] According to an embodiment of the present application, a device for determining an abnormal state of a shunt node is provided. It should be noted that the device for determining an abnormal state of a shunt node in the embodiment of the present application can be used to execute the method for determining an abnormal state of a shunt node provided in the embodiment of the present application. The device for determining an abnormal state of a shunt node provided in the embodiment of the present application is introduced below.
[0071] Figure 4 1 is a structural diagram of an abnormal state determination device for a shunt node provided according to an embodiment of the present application. Figure 4 As shown, the device comprises:
[0072] An acquisition module 40 is used to acquire a shunt node deployed on a token ring device in the cluster, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node;
[0073] A receiving module 42, configured to receive a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used to represent the tokens contained in the shunt node within a target time period;
[0074] A combination module 44 is used to combine the target token sequences corresponding to each diversion node to obtain a token sequence set;
[0075] The determination module 46 is used to determine the abnormal state of the diversion node according to the arrangement order of the tokens in the token sequence set.
[0076] Through the acquisition module 40, receiving module 42, combination module 44 and determination module 46 in the above-mentioned shunt node abnormal state determination device, real-time verification and monitoring of the shunt node identity is achieved to ensure the legitimacy and security of the shunt node, thereby achieving the technical effect of effectively preventing unexpected behavior of the cluster and improving the self-defense capability of the cluster, and further solving the technical problem of cluster attacks or cluster information leakage caused by attackers disguising themselves as shunt nodes in the cluster after stealing configuration information or rules in the cluster system.
[0077] In the abnormal state determination device for a diversion node provided in an embodiment of the present application, the receiving module is also used to start a timer when a token sent by a token ring is received for the first time in each cycle of the node token device; when the timer ends, stop receiving the token sent by the token ring, send the header token to the token ring, and determine the initial token sequence after removing the header token as the target token sequence.
[0078] In the abnormal state determination device for a shunt node provided in an embodiment of the present application, the determination module is also used to determine that the shunt node is in an abnormal state when the arrangement order does not conform to a preset order; and to determine that the shunt node is in a normal state when the arrangement order conforms to a preset order.
[0079] The abnormal state determination device of the diversion node provided in the embodiment of the present application also includes a discarding module 48, which is used to determine the number of first tokens corresponding to all tokens to be allocated in the token allocation table; determine the number of second tokens corresponding to all tokens contained in the token sequence set; compare the first number of tokens and the second number of tokens to obtain a comparison result; when the comparison result indicates that the number of second tokens is greater than the number of first tokens, discard the head token sequence in the token sequence set in sequence until the number of second tokens is equal to the number of first tokens.
[0080] An embodiment of the present application also provides an electronic device, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the abnormal state determination method of the above-mentioned shunt node.
[0081] It should be noted that the above electronic equipment is used to execute Figure 2 The method for determining the abnormal state of the shunt node shown, therefore the relevant explanations in the above-mentioned method for determining the abnormal state of the shunt node are also applicable to the electronic device, and will not be repeated here.
[0082] An embodiment of the present application further provides a non-volatile storage medium, which includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-mentioned method for determining the abnormal state of the diversion node by running the computer program.
[0083] It should be noted that the above non-volatile storage medium is used to execute Figure 2 The method for determining the abnormal state of a shunt node shown in the figure, therefore the relevant explanations in the above-mentioned method for determining the abnormal state of a shunt node are also applicable to the non-volatile storage medium, and will not be repeated here.
[0084] The embodiment of the present application also provides a computer program product, including computer instructions, which implement the above-mentioned method for determining the abnormal state of the diversion node when the computer instructions are executed by a processor.
[0085] It should be noted that the above-mentioned computer program product is used to execute Figure 2 The method for determining the abnormal state of a shunt node shown in the figure, therefore the relevant explanations and instructions in the above-mentioned method for determining the abnormal state of a shunt node are also applicable to the computer program product, and will not be repeated here.
[0086] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0087] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.
[0088] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0089] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0090] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0091] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0092] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.
Claims
1. A method for determining an abnormal state of a diversion node, characterized in that: include: Acquire a shunt node deployed on a token ring device in a cluster, wherein the token ring device is used to send a token for verifying the identity of the shunt node to the shunt node; receiving a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used to represent the tokens contained in the shunt node within a target time period; Combine the target token sequences corresponding to each diversion node to obtain a token sequence set; The abnormal state of the diversion node is determined according to the arrangement order of the tokens in the token sequence set.
2. The method according to claim 1, characterized in that: The token ring device includes a token allocation table, a token ring and a node token device, each shunt node corresponds to a node token device, wherein the token allocation table is used to store tokens to be allocated, and the token ring is used to connect the shunt nodes and send tokens to the node token devices corresponding to the shunt nodes.
3. The method according to claim 2, characterized in that The token ring includes a unidirectional forwarding mechanism for forwarding the tokens in the token allocation table to the node token device in a preset direction.
4. The method according to claim 2, characterized in that: The node token device includes a token receiving device, a token sending device and a timer, wherein: The token receiving device is used to receive the token sent by the token ring and store it in the tail of the initial token sequence corresponding to the shunt node; The token sending device is used to send the head token in the initial token sequence to the token ring at the end of the target time period; The timer is used to generate the target time period and control the sending time of the header token.
5. The method according to claim 4, characterized in that Receiving a target token sequence allocated by the token ring device to the shunt node comprises: When the node token device receives a token sent by the token ring for the first time in each cycle, starting the timer; When the timer ends, the token sent by the token ring is stopped from being received, the head token is sent to the token ring, and the initial token sequence after the head token is removed is determined as the target token sequence.
6. The method according to claim 1, characterized in that Determining the abnormal state of the diversion node according to the arrangement order of the tokens in the token sequence set includes: If the arrangement order does not conform to a preset order, determining that the diversion node is in an abnormal state; When the arrangement sequence conforms to the preset sequence, it is determined that the diversion node is in a normal state.
7. The method according to claim 2, characterized in that The method further comprises: Determine the number of first tokens corresponding to all tokens to be allocated in the token allocation table; Determine the number of second tokens corresponding to all tokens included in the token sequence set; Comparing the first number of tokens with the second number of tokens to obtain a comparison result; When the comparison result indicates that the second number of tokens is greater than the first number of tokens, the head token sequences in the token sequence set are discarded in sequence until the second number of tokens is equal to the first number of tokens.
8. A device for determining an abnormal state of a shunt node, characterized in that: include: An acquisition module, used for acquiring a shunt node deployed on a token ring device in a cluster, wherein the token ring device is used for sending a token for verifying the identity of the shunt node to the shunt node; A receiving module, used for receiving a target token sequence allocated by the token ring device to the shunt node, wherein the target token sequence is used for indicating the tokens contained in the shunt node within a target time period; A combination module, used for combining the target token sequences corresponding to each diversion node to obtain a token sequence set; A determination module is used to determine the abnormal state of the diversion node according to the arrangement order of the tokens in the token sequence set.
9. An electronic device, characterized in that: include: A memory and a processor, wherein The memory is used to store program instructions; The processor is connected to the memory and is used to execute the abnormal state determination method of the diversion node according to any one of claims 1 to 7.
10. A non-volatile storage medium, characterized in that: The non-volatile storage medium includes a stored computer program, wherein the device where the non-volatile storage medium is located executes the abnormal state determination method of the diversion node according to any one of claims 1 to 7 by running the computer program.
11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the abnormal state determination method of a diversion node according to any one of claims 1 to 7 is implemented.
