A cluster management method, device and medium in a unidirectional network environment
By setting up a listening component in the data node to listen for and verify the execution of scripts on the management node, the management problem of data nodes being unable to communicate in a one-way network environment is solved, enabling convenient management of hundreds or thousands of servers.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSPUR ZHUOSHU BIG DATA IND DEV CO LTD
- Filing Date
- 2023-07-03
- Publication Date
- 2026-05-19
AI Technical Summary
In a one-way network environment, data nodes cannot communicate with each other, and management nodes cannot access specific data nodes, leading to difficulties in managing hundreds or thousands of servers.
By setting a listening component in the data node, it can monitor whether a script to be executed is written into the execution container of the management node. This triggers the data node to access the management node to obtain the script, perform validity verification and execution, and return the execution information to the management node to achieve cluster management.
It enables convenient management of hundreds or thousands of servers in a one-way network environment, solving the problem of network connectivity between data nodes.
Smart Images

Figure CN116707968B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of big data cluster management technology, and in particular to a cluster management method, device and medium in a one-way network environment. Background Technology
[0002] In recent years, with the explosive growth of data security and data volume, building convenient big data cluster management methods on the basis of network security has become a hot topic.
[0003] Currently, under conditions of high data security requirements, data nodes are often unable to communicate due to network connectivity issues. Management nodes are not allowed to access specific data nodes, but only data nodes are allowed to access the management node. In such cases, how to conveniently manage hundreds or thousands of data servers has become an urgent problem to be solved. Summary of the Invention
[0004] This application provides a cluster management method, device, and medium in a unidirectional network environment to solve the technical problem that in existing unidirectional network environments, data nodes cannot communicate with each other due to network connectivity issues, and the management node does not allow access to specific data nodes, but only allows each data node to access the management node, making it difficult to manage hundreds or thousands of servers corresponding to nodes in a unidirectional network environment.
[0005] On one hand, embodiments of this application provide a cluster management method in a unidirectional network environment, applied to a cluster management system in a unidirectional network environment, the cluster management system including management nodes and data nodes, including:
[0006] The data node listens to whether a script to be executed is written into the execution container of the management node, and accesses the execution container in the management node based on the trigger of the script to be written to obtain the script to be executed in the execution container.
[0007] Initiate a legality verification request to the management node to determine whether the script to be executed is an authorized script, and receive the verification result from the management node in response to the legality verification request;
[0008] If the verification result indicates that the legality verification of the script to be executed has passed, the script to be executed is executed through the data node, and the execution information corresponding to the script to be executed is obtained;
[0009] The execution information corresponding to the script to be executed is returned to the management node, and the execution information of the script to be executed in the cluster management system is statistically analyzed by the management node to realize cluster management in a one-way network environment.
[0010] In one implementation of this application, before accessing the execution container in the management node based on the write listener trigger of the script to be executed to obtain the script to be executed in the execution container, the method further includes:
[0011] The management node determines the script to be executed in the one-way network environment and writes the determined script to be executed into the execution container of the management node.
[0012] In one implementation of this application, after writing the determined script to be executed into the execution container of the management node, the method further includes:
[0013] The management node is used to examine several code blocks in the script to be executed, and to determine whether there are any abnormalities in the execution logic corresponding to each of the several code blocks;
[0014] If none of the code blocks in the script to be executed contain any errors, the script to be executed is authorized, and a corresponding authorization code is added to the authorized script.
[0015] In one implementation of this application, after determining whether there are any exceptions in the execution logic corresponding to the plurality of code blocks, the method further includes:
[0016] If there is an anomaly in the execution logic corresponding to the code block of the script to be executed, the code block with the anomaly is marked, and the anomaly code block and the mark are fed back to the management node so that the execution logic of the anomaly code block can be adjusted according to the mark.
[0017] If there are no abnormalities in the execution logic of the adjusted code block, authorize the script to be executed and add the corresponding authorization code to the authorized script to be executed.
[0018] In one implementation of this application, after accessing the execution container in the management node based on the write listener trigger of the script to be executed to obtain the script to be executed in the execution container, the method further includes:
[0019] Through the management node, script status tags are added to the scripts to be executed obtained by the data nodes in the container to be executed;
[0020] The script status label indicates that the script to be executed has been acquired by the cluster management client corresponding to the data node, and the script to be executed cannot be acquired by the data nodes corresponding to other cluster management clients in the cluster management system.
[0021] In one implementation of this application, after initiating a validity verification request to the management node to determine whether the script to be executed is an authorized script, the method further includes:
[0022] The management node determines whether the execution container contains the authorization code corresponding to the execution script based on the legality verification request corresponding to the script to be executed.
[0023] If so, it is determined that the script to be executed has been authorized, and the verification result corresponding to the legality verification request is determined that the legality verification of the script to be executed has passed;
[0024] If not, it is determined that there is an anomaly in the execution logic of the script to be executed, and the verification result corresponding to the legality verification request is that the legality verification of the script to be executed has failed.
[0025] In one implementation of this application, after receiving the verification result from the management node in response to the legitimacy verification request, the method further includes:
[0026] If the verification result indicates that the legality verification of the script to be executed has failed, the script to be executed is discarded through the data node, and the execution information of the discarded script is fed back to the management node.
[0027] In one implementation of this application, the cluster management system includes a management node corresponding to a cluster management server and multiple data nodes corresponding to multiple cluster management clients.
[0028] On the other hand, embodiments of this application also provide a cluster management device in a unidirectional network environment, applied to a cluster management system in a unidirectional network environment, the cluster management system including management nodes and data nodes, the device including:
[0029] At least one processor;
[0030] And, a memory communicatively connected to the at least one processor;
[0031] The memory stores instructions that can be executed by the at least one processor, which are then executed by the at least one processor to enable the at least one processor to perform a cluster management method in a unidirectional network environment as described above.
[0032] On the other hand, embodiments of this application also provide a non-volatile computer storage medium storing computer-executable instructions, applied to a cluster management system in a unidirectional network environment. The cluster management system includes management nodes and data nodes, and the computer-executable instructions are configured as follows:
[0033] The above describes a cluster management method in a one-way network environment.
[0034] This application provides a cluster management method, device, and medium in a unidirectional network environment, which has at least the following beneficial effects:
[0035] By setting up a listening component in the data nodes, the component can be periodically executed when the data nodes are idle, according to their actual needs, to monitor whether a script to be executed is being written into the execution container of the management node. When a script is written into the execution container, the listening component in the data node is triggered, causing the data node to access the management node to find and retrieve the script. By sending a validity request to the management node for the script, the data node receives a response and verification result. If the validity verification is successful, the data node directly executes the script, obtaining its execution information. This execution information is then returned to the management node for statistical analysis, enabling cluster management in a unidirectional network environment. Attached Figure Description
[0036] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0037] Figure 1 A flowchart illustrating a cluster management method in a unidirectional network environment provided in this application embodiment;
[0038] Figure 2 This is a schematic diagram of the internal structure of a cluster management device in a unidirectional network environment, provided as an embodiment of this application. Detailed Implementation
[0039] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0040] This application provides a cluster management method, device, and medium in a unidirectional network environment. By setting a listening component in the data node, the listening component can be periodically executed when the data node is idle, according to the actual needs of the data node, to listen for whether an executable script is written to the execution container of the management node. When an executable script is written to the execution container, the listening component in the data node is triggered, causing the data node to access the management node to find the written executable script and retrieve it. By initiating a validity request for the executable script to the management node, the data node can receive a response and a verification result. If the validity verification is successful, the data node can directly execute the executable script and obtain the execution information corresponding to the executable script. The execution information corresponding to the executable script is returned to the management node so that the management node can perform statistics on the execution information of the executable script, thereby realizing cluster management in a unidirectional network environment. This invention solves the technical problem of managing hundreds or thousands of servers corresponding to nodes in a unidirectional network environment, where data nodes cannot communicate with each other and the management node does not allow access to specific data nodes, but only allows data nodes to access the management node.
[0041] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.
[0042] Figure 1 This is a flowchart illustrating a cluster management method in a unidirectional network environment provided in an embodiment of this application. Figure 1 As shown in the embodiment of this application, a cluster management method in a unidirectional network environment includes:
[0043] 101. Listen to whether the execution script is written to the execution container of the management node through the data node, and access the execution container in the management node based on the writing of the execution script to obtain the execution script in the execution container.
[0044] To address the challenges of managing hundreds or thousands of data servers in a unidirectional network environment where communication between data nodes is impossible and the management node is restricted from accessing specific data nodes (only allowing data nodes to access the management node), this application discloses a cluster management method for a unidirectional network environment. This method is applied to a cluster management system within a unidirectional network environment, which includes a management node and data nodes.
[0045] In one embodiment of this application, the cluster management system includes a management node corresponding to a cluster management server and multiple data nodes corresponding to multiple cluster management clients.
[0046] Through the cluster management client corresponding to the data node, it is possible to start listening at any time to see if an executable script is written into the execution container of the management node. When an executable script is written into the execution container, the data node is triggered to read the script, which in turn allows the data node to access the management node, specifically the execution container in the management node, and thus obtain the executable script that has been read from the execution container.
[0047] In one embodiment of this application, before accessing the execution container in the management node based on the write listener trigger of the execution script to obtain the execution script in the execution container, the execution script in the one-way network environment is determined by the cluster management server corresponding to the management node, and the determined execution script is written into the execution container of the management node.
[0048] In one embodiment of this application, after the determined script to be executed is written into the execution container of the management node, the cluster management server corresponding to the management node checks several code blocks in the script to be executed and determines whether there are any abnormalities in the execution logic corresponding to the several code blocks. If there are no abnormalities in the several code blocks in the script to be executed, the script to be executed is authorized and a corresponding authorization code is added to the authorized script to be executed.
[0049] In one embodiment of this application, after determining whether there are any abnormalities in the execution logic corresponding to several code blocks, if there are abnormalities in the execution logic corresponding to the code block of the script to be executed, the cluster management server corresponding to the management node marks the code block with abnormal execution logic and feeds back the abnormal code block and the mark to the management node, so that the management node can adjust the execution logic of the abnormal code block according to the mark. Then, the execution logic in the adjusted code block is verified to be abnormal. If the verification result is that there are no abnormalities in the execution logic of the adjusted code block, the script to be executed is authorized and the corresponding authorization code is added to the authorized script to be executed.
[0050] In one embodiment of this application, after accessing the execution container in the management node based on the write listener trigger of the script to be executed to obtain the script to be executed in the execution container, the cluster management server corresponding to the management node adds a script status tag to the script to be executed obtained by the data node in the execution container.
[0051] It should be noted that the script status label in this embodiment is used to indicate that the script to be executed has been obtained by the cluster management client corresponding to the data node, and the script to be executed cannot be obtained by the data node corresponding to other cluster management clients in the cluster management system.
[0052] 102. Send a request to the management node to verify whether the script to be executed is an authorized script, and receive the verification result from the management node in response to the verification request.
[0053] In one embodiment of this application, after initiating a legality verification request to the management node to determine whether the script to be executed is an authorized script, the cluster management server corresponding to the management node determines whether the execution container has the authorization code corresponding to the script to be executed based on the legality verification request. If yes, it is determined that the script to be executed has been authorized, and the verification result corresponding to the legality verification request is that the legality verification of the script to be executed has passed. If no, it is determined that there is an anomaly in the execution logic of the script to be executed, and the verification result corresponding to the legality verification request is that the legality verification of the script to be executed has failed.
[0054] In one embodiment of this application, after receiving the verification result from the management node in response to the legality verification request, if the verification result indicates that the legality verification of the script to be executed has failed, the script to be executed is discarded through the cluster management client corresponding to the data node, and the execution information of the discarded script is fed back to the management node.
[0055] 103. If the verification result shows that the script to be executed has passed the legality verification, execute the script to be executed through the data node and obtain the execution information corresponding to the script to be executed.
[0056] If the verification result returned by the management node shows that the script to be executed has passed the legality verification, meaning that there are no abnormalities in the execution logic of the script to be executed, then the cluster management client corresponding to the data node can directly execute the script to be executed, and thus obtain the execution information corresponding to the script to be executed.
[0057] It should be noted that, in the embodiments of this application, the execution information of the script to be executed is used to indicate the specific execution status of the script to be executed in a one-way network environment, as well as the execution result obtained after the script to be executed.
[0058] 104. Return the execution information corresponding to the script to be executed to the management node, and use the management node to collect statistics on the execution information of the script to be executed in the cluster management system, so as to realize cluster management in a one-way network environment.
[0059] The cluster management client corresponding to the data node returns the specific execution status of the script to be executed, as well as the execution result obtained after the script is executed, to the management node. Then, the cluster management server corresponding to the management node can statistically analyze the execution information of the script to be executed in the cluster management system, thereby realizing cluster management in a one-way network environment.
[0060] The above are embodiments of the method proposed in this application. Based on the same inventive concept, embodiments of this application also provide a cluster management device in a unidirectional network environment, the structure of which is as follows: Figure 2 As shown.
[0061] Figure 2 This is a schematic diagram of the internal structure of a cluster management device in a unidirectional network environment, provided as an embodiment of this application. Figure 2 As shown, the device includes:
[0062] At least one processor;
[0063] And, a memory that is communicatively connected to at least one processor;
[0064] The memory stores instructions that can be executed by at least one processor, and the instructions, when executed by at least one processor, enable at least one processor to:
[0065] The data node listens to whether the execution script is written to the execution container of the management node, and accesses the execution container in the management node based on the trigger of the execution script writing listener to obtain the execution script in the execution container;
[0066] Initiate a validity verification request to the management node to determine whether the script to be executed is an authorized script, and receive the verification result from the management node in response to the validity verification request;
[0067] If the verification result shows that the script to be executed passes the legality verification, the script to be executed is executed through the data node, and the execution information corresponding to the script to be executed is obtained;
[0068] The execution information corresponding to the script to be executed is returned to the management node, and the management node performs statistics on the execution information of the script to be executed in the cluster management system to achieve cluster management in a one-way network environment.
[0069] This application embodiment also provides a non-volatile computer storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured as follows:
[0070] The data node listens to whether the execution script is written to the execution container of the management node, and accesses the execution container in the management node based on the trigger of the execution script writing listener to obtain the execution script in the execution container;
[0071] Initiate a validity verification request to the management node to determine whether the script to be executed is an authorized script, and receive the verification result from the management node in response to the validity verification request;
[0072] If the verification result shows that the script to be executed passes the legality verification, the script to be executed is executed through the data node, and the execution information corresponding to the script to be executed is obtained;
[0073] The execution information corresponding to the script to be executed is returned to the management node, and the management node performs statistics on the execution information of the script to be executed in the cluster management system to achieve cluster management in a one-way network environment.
[0074] The various embodiments in this application are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the device and medium embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the description of the method embodiments.
[0075] The foregoing has described specific embodiments of this application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0076] The devices and media provided in this application are one-to-one with the methods. Therefore, the devices and media also have similar beneficial technical effects as their corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0077] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0078] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0079] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0080] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0081] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0082] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0083] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0084] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0085] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A cluster management method in a unidirectional network environment, characterized in that, A cluster management system applied in a unidirectional network environment, the cluster management system including management nodes and data nodes, the method comprising: The management node determines the script to be executed in the one-way network environment and writes the determined script to be executed into the execution container of the management node. The management node is used to examine several code blocks in the script to be executed, and to determine whether there are any abnormalities in the execution logic corresponding to each of the several code blocks; If none of the code blocks in the script to be executed contain any exceptions, the script to be executed is authorized, and a corresponding authorization code is added to the authorized script to be executed. The data node listens to whether a script to be executed is written into the execution container of the management node, and accesses the execution container in the management node based on the trigger of the script to be written to obtain the script to be executed in the execution container. The management node adds a script status label to the script to be executed obtained by the data node in the container to be executed; wherein, the script status label is used to indicate that the script to be executed has been obtained by the cluster management client corresponding to the data node, and the script to be executed cannot be obtained by the data node corresponding to other cluster management clients in the cluster management system. Initiate a legality verification request to the management node to determine whether the script to be executed is an authorized script; The management node determines whether the execution container contains the authorization code corresponding to the execution script based on the legality verification request corresponding to the script to be executed. If so, it is determined that the script to be executed has been authorized, and the verification result corresponding to the legality verification request is determined that the legality verification of the script to be executed has passed; If not, it is determined that there is an anomaly in the execution logic of the script to be executed, and the verification result corresponding to the legality verification request is that the legality verification of the script to be executed has failed. Receive the verification result from the management node in response to the legitimacy verification request; If the verification result indicates that the legality verification of the script to be executed has passed, the script to be executed is executed through the data node, and the execution information corresponding to the script to be executed is obtained; If the verification result indicates that the legality verification of the script to be executed has failed, the script to be executed is discarded through the data node, and the execution information of the discarded script is fed back to the management node. The execution information corresponding to the script to be executed is returned to the management node, and the execution information of the script to be executed in the cluster management system is statistically analyzed by the management node to realize cluster management in a one-way network environment.
2. The cluster management method in a unidirectional network environment according to claim 1, characterized in that, After determining whether the execution logic corresponding to the plurality of code blocks is abnormal, the method further includes: If there is an anomaly in the execution logic corresponding to the code block of the script to be executed, the code block with the anomaly is marked, and the anomaly code block and the mark are fed back to the management node so that the execution logic of the anomaly code block can be adjusted according to the mark. If there are no abnormalities in the execution logic of the adjusted code block, authorize the script to be executed and add the corresponding authorization code to the authorized script to be executed.
3. The cluster management method in a unidirectional network environment according to claim 1, characterized in that, The cluster management system includes a management node corresponding to a cluster management server and multiple data nodes corresponding to multiple cluster management clients.
4. A cluster management device in a unidirectional network environment, characterized in that, A cluster management system applied in a unidirectional network environment, the cluster management system including management nodes and data nodes, the device including: At least one processor; And, a memory communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform a cluster management method in a unidirectional network environment as described in any one of claims 1-3.
5. A non-volatile computer storage medium storing computer-executable instructions, characterized in that, A cluster management system is applied in a unidirectional network environment. The cluster management system includes management nodes and data nodes, and the computer-executable instructions are set as follows: A cluster management method in a unidirectional network environment as described in any one of claims 1-3.