A multi-stage configuration-based distributed system cooperative scheduling system and method
By employing a multi-stage configuration collaborative scheduling system in a distributed system to dynamically generate node-level configuration templates, the problems of cumbersome configuration operations and insufficient environment adaptability in existing technologies are solved, achieving efficient and automated service scheduling and customized configuration.
Patent Information
- Application Number
- CN202311182715.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-13
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2043-09-13
AI Technical Summary
Existing technologies in distributed systems involve cumbersome service configuration operations, cannot be automatically updated, and cannot adapt to changes in the environment in a timely manner, resulting in low system efficiency and insufficient service adaptability.
A distributed system collaborative scheduling system based on multi-stage configuration is adopted. Through the collaboration between the control end and the working end, node-level multi-stage configuration templates are dynamically generated, service configurations are adjusted in real time, and the communication and automatic updating of environmental parameters are supported.
It improves the configuration efficiency of distributed systems during the construction and scheduling process, enhances the customization and automation of service scheduling, and can adjust the configuration in real time according to changes in the node environment.
Smart Images

Figure CN119629021B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed system technology, and in particular to a distributed system collaborative scheduling system and method based on multi-stage configuration. Background Technology
[0002] With the development of Internet technology, the application of distributed systems is becoming more and more widespread, and more and more services need to be uniformly scheduled and managed through distributed systems.
[0003] In existing technologies, when building and scheduling services in a distributed system, in order to enable the service configurations between nodes to communicate with each other, it is necessary to know the various environmental information of each working node required for configuration in advance when generating service configuration information, and then centrally generate configuration files for distribution and service scheduling.
[0004] However, the existing approach is not only cumbersome to operate and unable to automatically update service configurations when the environment changes, but it is also difficult to obtain specific work node information in advance in some scenarios, resulting in reduced system efficiency and fewer compatible services. Summary of the Invention
[0005] The technical problem to be solved by this application is to provide a distributed system and method based on multi-stage configuration for collaborative scheduling, which addresses the above-mentioned shortcomings of the prior art and solves the problems existing in the prior art.
[0006] In a first aspect, this application provides a distributed system collaborative scheduling system based on multi-stage configuration, the system comprising: a control terminal and at least two working terminals communicatively connected to the control terminal, each of the working terminals being set on a different working node;
[0007] The control terminal is used to, upon receiving a first user request instructing the creation of a service, retrieve a corresponding service template from the global multi-stage configuration template library based on the first user request, generate a node-level multi-stage configuration template matching the first user request based on the service template, and send it to the working terminal corresponding to the first user request.
[0008] The working terminal is used to generate a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters after receiving the node-level multi-stage configuration template, and then report it to the control terminal.
[0009] The control terminal is also used to update the configuration according to the node-level multi-stage configuration file reported by each working terminal, generate a new node-level multi-stage configuration template, and send the new node-level multi-stage configuration template to the corresponding working terminal.
[0010] The working terminal is also used to call the corresponding executor and start the corresponding service process according to the new node-level multi-stage configuration template.
[0011] In some embodiments, the first user request includes worker node information and custom configuration information;
[0012] The control terminal is specifically used to: obtain the service template corresponding to the custom configuration information from the global multi-stage configuration template library, generate a node-level multi-stage configuration template that matches the number of worker nodes by initializing, analyzing and compiling the service template, and distribute the node-level multi-stage configuration template to the corresponding worker terminal according to the worker node information. The node-level multi-stage configuration template includes global parameters and the custom configuration information.
[0013] In some embodiments, the working terminal is specifically used to: after receiving the node-level multi-stage configuration template, perform initialization analysis and compilation of the working node according to the node-level multi-stage configuration template, obtain the current node's own node environment parameters, and generate a node-level multi-stage configuration file containing the current node information.
[0014] In some embodiments, the control terminal is specifically used to: obtain the node environment parameters of each working terminal according to the node-level multi-stage configuration file reported by each working terminal, update the configuration according to the user requirements and the node environment parameters of each working terminal, and generate a new node-level multi-stage configuration template corresponding to each working terminal.
[0015] The new node-level multi-stage configuration template includes node environment parameters of the target working end and node environment parameters of other working ends. The target working end is the current working end corresponding to the new node-level multi-stage configuration template, and the other working ends are all working ends other than the target working end.
[0016] Furthermore, based on the new node-level multi-stage configuration template, it is determined whether the node environment and configuration information have converged, and the new node-level multi-stage configuration template and the convergence determination result are sent to the corresponding working end.
[0017] In some embodiments, the working end is specifically used to: if the convergence judgment result is that the node environment and configuration information have converged, perform data verification on the new node-level multi-stage configuration template, and generate the corresponding service to perform the required personalized configuration information after the verification is passed, and call the corresponding executor to start the corresponding service process according to the personalized configuration information.
[0018] In some embodiments, the working terminal is further configured to: if the convergence judgment result is that the node environment and configuration information have not converged, generate a new node-level multi-stage configuration file based on the new node-level multi-stage configuration template and its own node environment parameters, and re-report it to the control terminal.
[0019] In some embodiments, the working terminal is further configured to: when its own node environment parameters change, regenerate a new node-level multi-stage configuration file based on the changed own node environment parameters, and report it to the control terminal.
[0020] Correspondingly, the control terminal is also used for:
[0021] The configuration is updated according to the new node-level multi-stage configuration file reported by the working terminal, a new node-level multi-stage configuration template is regenerated, and the new node-level multi-stage configuration template is sent to the corresponding working terminal.
[0022] In some embodiments, the control terminal is further configured to: upon receiving a second user request instructing the deletion of a work node, determine the work node to be deleted based on the second user request; delete the node-level multi-stage configuration template and node-level multi-stage configuration file corresponding to the work node to be deleted, and issue a deletion instruction to the work terminal corresponding to the work node to be deleted.
[0023] In some embodiments, the control terminal is specifically used to: analyze and compile according to the second user request and generate a comparison node-level multi-stage configuration template, compare the comparison node-level multi-stage configuration template with the latest existing node-level multi-stage configuration template, and determine the working node to be deleted based on the comparison result.
[0024] In some embodiments, the control terminal is further configured to: upon receiving a third user request instructing the deletion of a service, delete the node-level multi-stage configuration template and node-level multi-stage configuration file associated with the service, and issue a deletion instruction to all working terminals.
[0025] Secondly, this application provides a distributed system collaborative scheduling method based on multi-stage configuration, applied to the aforementioned distributed system collaborative scheduling system, the method comprising:
[0026] After receiving the first user request to create a service, the control terminal retrieves the corresponding service template from the global multi-stage configuration template library according to the first user request, generates a node-level multi-stage configuration template that matches the first user request based on the service template, and sends it to the working terminal corresponding to the first user request.
[0027] After receiving the node-level multi-stage configuration template, the working terminal generates a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters, and reports it to the control terminal.
[0028] The control terminal updates the configuration based on the node-level multi-stage configuration files reported by each of the working terminals, generates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding working terminal.
[0029] The working end calls the corresponding executor and starts the corresponding service process according to the new node-level multi-stage configuration template.
[0030] The distributed system and method based on multi-stage configuration provided in this application specifically involve the following steps: After receiving a first user request instructing the creation of a service, the control terminal retrieves the corresponding service template from the global multi-stage configuration template library according to the first user request, generates a node-level multi-stage configuration template matching the first user request based on the service template, and sends it to the corresponding worker terminal. After receiving the node-level multi-stage configuration template, the worker terminal generates a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters, and reports it to the control terminal. The control terminal updates the configuration based on the node-level multi-stage configuration files reported by each worker terminal, generates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding worker terminal. The worker terminal calls the corresponding executor and starts the corresponding service process based on the new node-level multi-stage configuration template. This application can dynamically generate configuration files at multiple stages, both globally and at the node level, based on the needs of different services. This can effectively improve the configuration efficiency of distributed systems during the construction and scheduling process. In addition, this application can locally adapt the custom multi-stage configuration template according to the actual situation of each working node, and achieve parameter collaborative configuration during the construction of distributed systems through multiple iterations and gradual refinement. This effectively improves the customization capability of service scheduling and significantly enhances the automation level of configuration. Attached Figure Description
[0031] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0032] Figure 1 A schematic diagram of a distributed system collaborative scheduling system based on multi-stage configuration provided in an embodiment of this application;
[0033] Figure 2 A schematic diagram of another distributed system collaborative scheduling system based on multi-stage configuration provided in an embodiment of this application;
[0034] Figure 3 A schematic diagram of another distributed system collaborative scheduling system based on multi-stage configuration provided in an embodiment of this application;
[0035] Figure 4 A schematic diagram of another distributed system collaborative scheduling system based on multi-stage configuration provided in an embodiment of this application;
[0036] Figure 5 This is a schematic diagram of a distributed system collaborative scheduling method based on multi-stage configuration provided in an embodiment of this application.
[0037] The accompanying drawings have illustrated specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to specific embodiments. Detailed Implementation
[0038] To enable those skilled in the art to better understand the technical solution of this application, the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0039] It is understood that the specific embodiments and accompanying drawings described herein are merely for explaining this application and are not intended to limit this application.
[0040] It is understood that, without conflict, the various embodiments and features in the embodiments of this application can be combined with each other.
[0041] It is understood that, for ease of description, only the parts relevant to this application are shown in the accompanying drawings, while parts unrelated to this application are not shown in the drawings.
[0042] It is understood that each unit or module involved in the embodiments of this application may correspond to only one entity structure, or may be composed of multiple entity structures, or multiple units or modules may be integrated into one entity structure.
[0043] It is understood that the terms "first," "second," etc., used in the embodiments of this application are used to distinguish different objects or to distinguish different treatments of the same object, rather than to describe a specific order of objects.
[0044] It is understood that, without conflict, the functions and steps shown in the schematic diagrams and block diagrams of this application may occur in a different order than that shown in the accompanying drawings.
[0045] It is understood that the schematic diagrams and block diagrams of this application illustrate the possible architecture, functions, and operations of systems, apparatuses, devices, and methods according to various embodiments of this application. Each block in the schematic diagrams or block diagrams may represent a unit, module, program segment, or code, containing executable instructions for implementing the specified functions. Furthermore, each block or combination of blocks in the block diagrams and schematic diagrams may be implemented using a hardware-based system to implement the specified functions, or using a combination of hardware and computer instructions.
[0046] It is understood that the units and modules involved in the embodiments of this application can be implemented by software or by hardware. For example, the units and modules can be located in the processor.
[0047] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0048] Figure 1 This is a schematic diagram of a distributed system collaborative scheduling system based on multi-stage configuration provided in an embodiment of this application, as shown below. Figure 1 As shown, this application provides a distributed system collaborative scheduling system based on multi-stage configuration. The system includes: a control terminal and at least two working terminals communicatively connected to the control terminal. Figure 1 (Taking three as examples, each of the aforementioned working terminals is set on a different working node;)
[0049] The control terminal can be understood as a control and scheduling device. It has a control terminal scheduling module. The control terminal is responsible for scheduling the various processes of the service among the working nodes, and managing the global parameters of the entire region, such as the region code and system version. It also manages the environmental parameters reported by various working nodes, including the central processing unit (CPU), storage, and network.
[0050] The control terminal is also configured with a global multi-stage configuration template library, which stores general configuration information for various services. This global multi-stage configuration template library templates various different services, allowing the control terminal to schedule multiple different services simultaneously.
[0051] The working end can be understood as a working node device, which has a working node scheduling module inside. The working end is distributed on various working nodes, receives the service process creation request issued by the control end, generates the configuration information required to start the service process, and calls different executors to start the actual service process according to the requirements of the control end.
[0052] The worker also includes a listener, which is used to maintain the environment parameters of the current worker node and monitor changes in the environment parameters in real time, and report them in a timely manner.
[0053] In this application, the control end and the working end cooperate with each other to realize the communication of environmental parameters between different working nodes, and can adjust the configuration information in real time according to the environmental information to achieve the final collaboration of service process configuration information, and jointly realize the distributed system collaborative scheduling based on multi-stage configuration.
[0054] For details, please refer to Figure 1 When a service is created or updated, the system first performs initialization operations, as follows:
[0055] (1) After receiving the first user request to create a service, the control terminal obtains the corresponding service template from the global multi-stage configuration template library according to the first user request, generates a node-level multi-stage configuration template that matches the first user request based on the service template, and sends it to the working terminal corresponding to the first user request.
[0056] Optionally, the first user request includes user-issued work node information and custom configuration information;
[0057] Specifically, the control terminal obtains the service template corresponding to the custom configuration information from the global multi-stage configuration template library, performs initialization analysis and compilation on the service template to generate a node-level multi-stage configuration template that matches the number of worker nodes, and distributes the node-level multi-stage configuration template to the corresponding worker terminal according to the worker node information.
[0058] The node-level multi-stage configuration template includes global parameters and custom configuration information. In addition, the node-level multi-stage configuration template also includes a global multi-stage configuration template.
[0059] (2) After receiving the node-level multi-stage configuration template, the working terminal generates a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters, and reports it to the control terminal.
[0060] Specifically, after receiving the node-level multi-stage configuration template, the working terminal performs initialization analysis and compilation of the working node according to the node-level multi-stage configuration template, obtains the current node's own node environment parameters, and generates a node-level multi-stage configuration file containing the current node's information.
[0061] Once a node-level multi-stage configuration file is created or updated, the worker will synchronously report the latest node-level multi-stage configuration file to the control end, and the initialization operation is complete.
[0062] After initialization, the system enters a loop iteration process, as follows:
[0063] (3) The control terminal updates the configuration according to the node-level multi-stage configuration file reported by each working terminal, generates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding working terminal.
[0064] Specifically, the control terminal collects the node-level multi-stage configuration files reported by the worker nodes of each worker node, abstracting them into node environment parameters and other information for the corresponding worker nodes. Once the control terminal has collected the node environment parameter information reported by all worker nodes for a given service, it will perform partial adaptation of the configuration strategy and analysis and compilation by the control terminal according to the personalized requirements of the corresponding service, updating the corresponding node-level multi-stage configuration files as needed, and generating new node-level multi-stage configuration templates.
[0065] The new node-level multi-stage configuration template includes node environment parameters of the target working end and node environment parameters of other working ends. The target working end is the current working end corresponding to the new node-level multi-stage configuration template, and the other working ends are all working ends other than the target working end.
[0066] For example, if the working end of worker node 1 is defined as the current working end, then the node-level multi-stage configuration template corresponding to worker node 1 includes not only the node environment parameters of worker node 1, but also the node environment parameters of worker node 2 and worker node 3.
[0067] In addition, the control terminal determines whether the node environment and configuration information have converged based on the new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template and the convergence judgment result to the corresponding working terminal. Each working terminal then analyzes and compiles the working nodes to generate a node-level multi-stage configuration file containing information about other working nodes.
[0068] (4) The working end calls the corresponding executor according to the new node-level multi-stage configuration template and starts the corresponding service process.
[0069] Specifically, after receiving the new node-level multi-stage configuration template and convergence judgment result from the control terminal, if the convergence judgment result indicates that the node environment and configuration information have converged, the working terminal performs data verification on the new node-level multi-stage configuration template, and generates the corresponding service to perform the required personalized configuration information after the verification is passed. Based on the personalized configuration information, the working terminal calls the corresponding executor to start the corresponding service process.
[0070] The process involves the worker node performing a final check on the new node-level multi-stage configuration template to prevent errors during data transmission. Then, it generates personalized configuration information required by the corresponding service process based on the node-level multi-stage configuration template, such as startup parameters, environment variables, and configuration files. Finally, the worker node calls the executor to start the corresponding service process based on the generated personalized configuration information, ultimately enabling the collaboration between the various worker nodes that provide services to the outside world.
[0071] Optionally, if the convergence judgment result is that the node environment and configuration information have not converged, a new node-level multi-stage configuration file is generated based on the new node-level multi-stage configuration template and its own node environment parameters, and then re-reported to the control terminal for the next round of iterative processing.
[0072] This application provides a distributed system collaborative scheduling system based on multi-stage configuration. It can dynamically generate configuration files at the global and node levels according to the needs of different services, thereby effectively improving the configuration efficiency of the distributed system during construction and scheduling. In addition, this application can locally adapt the custom multi-stage configuration template according to the actual situation of each working node, and realize the collaborative configuration of parameters during the construction of the distributed system through multiple iterations and gradual refinement. This effectively improves the customization capability of service scheduling and greatly enhances the automation of configuration.
[0073] Figure 2 Another schematic diagram of a distributed system collaborative scheduling system based on multi-stage configuration provided in this application embodiment is shown below. Figure 2 As shown, in some embodiments, when the working terminal changes its own node environment parameters, it regenerates a new node-level multi-stage configuration file based on the changed own node environment parameters and reports it to the control terminal.
[0074] Correspondingly, the control terminal updates the configuration based on the new node-level multi-stage configuration file reported by the working terminal, regenerates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding working terminal.
[0075] Specifically, a normally functioning worker node will start a listener. When the environment parameters of a worker node change, the listener will detect the change and recompile the node-level multi-stage configuration template within the current node to generate a new node-level multi-stage configuration file that includes the changed environment parameters. If the multi-stage configuration template uses the changed environment parameters, the new node-level multi-stage configuration file will be reported to the control end.
[0076] After receiving a new node-level multi-stage configuration file, the control terminal will update the corresponding node file in its own maintained node-level multi-stage configuration file, re-analyze and compile it to generate a new node-level multi-stage configuration template and compare it with the old template. At the same time, it will also determine whether the environment and configuration information have converged and send the changed node-level multi-stage configuration template and convergence information to the corresponding working nodes.
[0077] Accordingly, the worker node analyzes and compiles the new node-level multi-stage configuration template to generate a new node-level multi-stage configuration file. Similar to the creation process, it uses convergence information to determine whether to proceed to the next iteration and ultimately generates updated personalized configuration information. After the configuration information is updated, based on the specific configuration of the service process, the worker node notifies the executor to update the service process, thus enabling the worker node to generate the updated configuration information and notify the executor to update the service process, thereby achieving the configuration information update.
[0078] In this embodiment, for situations where the parameters of a worker node may change during operation, by monitoring the environmental parameters, the node-level multi-stage configuration file can be updated, thereby achieving collaborative configuration of configuration parameters, effectively improving the customization capability of service scheduling, and significantly enhancing the automation level of configuration.
[0079] Figure 3 Another schematic diagram of a distributed system collaborative scheduling system based on multi-stage configuration provided in this application embodiment is shown below. Figure 3 As shown, in some embodiments, after receiving a second user request instructing the deletion of a worker node, the control terminal determines the worker node to be deleted based on the second user request; deletes the node-level multi-stage configuration template and node-level multi-stage configuration file corresponding to the worker node to be deleted, and issues a deletion command to the worker terminal corresponding to the worker node to be deleted.
[0080] The control terminal analyzes and compiles the second user request to generate a comparison node-level multi-stage configuration template, compares the comparison node-level multi-stage configuration template with the latest existing node-level multi-stage configuration template, and determines the working node to be deleted based on the comparison result.
[0081] Specifically, when a worker node of a service is deleted, the control terminal will also receive a second user request from the user, containing node information and custom configuration. Unlike adding and updating, the second user request does not contain the worker node to be deleted; that is, the second user request contains worker nodes that do not need to be deleted.
[0082] When the control terminal analyzes and compiles the node-level multi-stage configuration template based on the second user's request, it compares it with existing multi-stage configuration templates to obtain the worker nodes to be deleted, which only exist in the old set of node-level multi-stage configuration templates. The control terminal then deletes the node-level multi-stage configuration template and multi-stage configuration file of that node, as well as the relevant information of that node in the node-level multi-stage configuration files of other nodes, and issues a deletion command to the scheduling module of that worker node.
[0083] Correspondingly, for a worker node that needs to be deleted, its corresponding worker end will clean up the multi-stage configuration template, multi-stage configuration file and configuration information of the service process corresponding to this node after receiving the deletion command, and notify the executor to stop the corresponding service process and reclaim the generated files.
[0084] For example, for Figure 3 If the control terminal determines that the worker node 1 needs to be deleted, it will issue a deletion command to the corresponding worker node. Consequently, the worker node 1 will stop providing services, while the worker nodes of other worker nodes will continue to provide services.
[0085] In this embodiment, when it is necessary to delete some working nodes, the control terminal obtains the working nodes to be deleted by comparing the old and new node-level multi-stage configuration templates, deletes the node-level multi-stage configuration template and multi-stage configuration file of the node, as well as the relevant information of the node in the node-level multi-stage configuration files of other nodes, and issues a deletion command to the working node so that the working node notifies the executor to stop the corresponding service process, so that the working node providing the service matches the user request, thereby providing the user with precise service.
[0086] Figure 4 Another schematic diagram of a distributed system collaborative scheduling system based on multi-stage configuration provided in this application embodiment is shown below. Figure 4 As shown, in some embodiments, after receiving a third user request to delete the service, the control terminal deletes the node-level multi-stage configuration template and node-level multi-stage configuration file related to the service, and issues a deletion command to all working terminals.
[0087] Specifically, when the control terminal is instructed to delete the entire service, it will delete all multi-stage configuration templates and multi-stage configuration files related to the service and issue deletion instructions to all worker terminals.
[0088] Accordingly, upon receiving a deletion command, all worker nodes will clean up the multi-stage configuration templates, multi-stage configuration files, and configuration information of the service processes corresponding to their respective nodes, and will notify the executor to stop the corresponding service processes and reclaim the generated files. Finally, once all service processes on the worker node have stopped, the listener will be stopped.
[0089] In this embodiment, when the entire service needs to be deleted, the control terminal deletes the node-level multi-stage configuration template and node-level multi-stage configuration file related to the service, and issues a deletion command to all worker terminals so that all worker nodes notify the executor to stop the corresponding service process, thereby ensuring that all worker nodes of the service are completely shut down and deleted, so that the working status of the worker nodes accurately responds to user needs.
[0090] Figure 5 A schematic diagram of a distributed system cooperative scheduling method based on multi-stage configuration provided in this application embodiment is shown below. Figure 5 As shown, this application provides a distributed system collaborative scheduling method based on multi-stage configuration, applicable to the distributed system collaborative scheduling system of any of the above embodiments. The method includes:
[0091] S1. After receiving the first user request to create a service, the control terminal retrieves the corresponding service template from the global multi-stage configuration template library according to the first user request, generates a node-level multi-stage configuration template that matches the first user request based on the service template, and sends it to the working terminal corresponding to the first user request.
[0092] S2. After receiving the node-level multi-stage configuration template, the working end generates a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters, and reports it to the control end.
[0093] S3. The control terminal updates the configuration based on the node-level multi-stage configuration files reported by each of the working terminals, generates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding working terminal.
[0094] S4. The working end calls the corresponding executor according to the new node-level multi-stage configuration template and starts the corresponding service process.
[0095] This application provides a distributed system collaborative scheduling method based on multi-stage configuration, which can dynamically generate configuration files at the global and node levels according to the needs of different services, thereby effectively improving the configuration efficiency of the distributed system during construction and scheduling. In addition, this application can locally adapt the custom multi-stage configuration template according to the actual situation of each working node, and realize the collaborative configuration of parameters during the construction of the distributed system through multiple iterations and gradual refinement, which effectively improves the customization capability of service scheduling and greatly enhances the automation of configuration.
[0096] Regarding the limitations on the distributed system collaborative scheduling method based on multi-stage configuration, please refer to the limitations on the distributed system collaborative scheduling system based on multi-stage configuration in the above embodiments of this application, which will not be repeated here.
[0097] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some of the steps in the figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0098] In some embodiments, this application provides a distributed system cooperative scheduling apparatus based on multi-stage configuration, including a memory and a processor. The memory stores a computer program, and the processor is configured to run the computer program to execute the distributed system cooperative scheduling method based on multi-stage configuration in the above embodiments of this application.
[0099] The memory is connected to the processor. The memory can be flash memory, read-only memory or other types of memory. The processor can be a central processing unit or a microcontroller.
[0100] In some embodiments, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the distributed system cooperative scheduling method based on multi-stage configuration in the above embodiments of this application.
[0101] The computer-readable storage medium includes volatile or non-volatile, removable or non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, computer program modules, or other data). Computer-readable storage media include, but are not limited to, RAM (Random Access Memory), ROM (Read-Only Memory), EEPROM (Electrically Erasable Programmable Read-Only Memory), flash memory or other memory technologies, CD-ROM (Compact Disc Read-Only Memory), DVD or other optical disc storage, cartridges, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer.
[0102] It is understood that the above embodiments are merely exemplary implementations used to illustrate the principles of this application, and this application is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and substance of this application, and these modifications and improvements are also considered to be within the scope of protection of this application.
Claims
1. A distributed system collaborative scheduling system based on multi-stage configuration, characterized in that, The system includes: a control terminal and at least two working terminals that are communicatively connected to the control terminal, with each working terminal located at a different working node; The control terminal is used to, upon receiving a first user request instructing the creation of a service, retrieve a corresponding service template from the global multi-stage configuration template library based on the first user request, generate a node-level multi-stage configuration template matching the first user request based on the service template, and send it to the working terminal corresponding to the first user request. The working terminal is used to generate a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters after receiving the node-level multi-stage configuration template, and then report it to the control terminal. The control terminal is also used to update the configuration according to the node-level multi-stage configuration file reported by each working terminal, generate a new node-level multi-stage configuration template, and send the new node-level multi-stage configuration template to the corresponding working terminal. The working terminal is also used to call the corresponding executor and start the corresponding service process according to the new node-level multi-stage configuration template.
2. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 1, characterized in that, The first user request includes worker node information and custom configuration information; The control terminal is specifically used to: obtain the service template corresponding to the custom configuration information from the global multi-stage configuration template library, generate a node-level multi-stage configuration template that matches the number of worker nodes by initializing, analyzing and compiling the service template, and distribute the node-level multi-stage configuration template to the corresponding worker terminal according to the worker node information. The node-level multi-stage configuration template includes global parameters and the custom configuration information.
3. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 1, characterized in that, The working terminal is specifically used to: after receiving the node-level multi-stage configuration template, perform initialization analysis and compilation of the working node according to the node-level multi-stage configuration template, obtain the current node's own node environment parameters, and generate a node-level multi-stage configuration file containing the current node information.
4. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 1, characterized in that, The control terminal is specifically used to: obtain the node environment parameters of each working terminal according to the node-level multi-stage configuration file reported by each working terminal, update the configuration according to user needs and the node environment parameters of each working terminal, and generate a new node-level multi-stage configuration template corresponding to each working terminal. The new node-level multi-stage configuration template includes node environment parameters of the target working end and node environment parameters of other working ends. The target working end is the current working end corresponding to the new node-level multi-stage configuration template, and the other working ends are all working ends other than the target working end. Furthermore, based on the new node-level multi-stage configuration template, it is determined whether the node environment and configuration information have converged, and the new node-level multi-stage configuration template and the convergence determination result are sent to the corresponding working end.
5. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 4, characterized in that, The working end is specifically used for: if the convergence judgment result is that the node environment and configuration information have converged, then performing data verification on the new node-level multi-stage configuration template, and generating the corresponding service to perform the required personalized configuration information after the verification is passed, and calling the corresponding executor to start the corresponding service process according to the personalized configuration information.
6. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 4, characterized in that, The working terminal is also used to: if the convergence judgment result is that the node environment and configuration information have not converged, generate a new node-level multi-stage configuration file according to the new node-level multi-stage configuration template and its own node environment parameters, and re-report it to the control terminal.
7. The distributed system collaborative scheduling system based on multi-stage configuration according to any one of claims 1-6, characterized in that, The working terminal is also used to: when its own node environment parameters change, regenerate a new node-level multi-stage configuration file based on the changed own node environment parameters, and report it to the control terminal. Correspondingly, the control terminal is also used for: The configuration is updated according to the new node-level multi-stage configuration file reported by the working terminal, a new node-level multi-stage configuration template is regenerated, and the new node-level multi-stage configuration template is sent to the corresponding working terminal.
8. The distributed system collaborative scheduling system based on multi-stage configuration according to any one of claims 1-6, characterized in that, The control terminal is also used to: upon receiving a second user request to delete a work node, determine the work node to be deleted based on the second user request; delete the node-level multi-stage configuration template and node-level multi-stage configuration file corresponding to the work node to be deleted, and issue a deletion command to the work terminal corresponding to the work node to be deleted.
9. The distributed system collaborative scheduling system based on multi-stage configuration according to claim 8, characterized in that, The control terminal is specifically used to: analyze and compile according to the second user request and generate a comparison node-level multi-stage configuration template, compare the comparison node-level multi-stage configuration template with the latest existing node-level multi-stage configuration template, and determine the working node to be deleted based on the comparison result.
10. The distributed system collaborative scheduling system based on multi-stage configuration according to any one of claims 1-6, characterized in that, The control terminal is also used to: upon receiving a third user request to delete the service, delete the node-level multi-stage configuration template and node-level multi-stage configuration file related to the service, and issue a deletion command to all working terminals.
11. A distributed system cooperative scheduling method based on multi-stage configuration, applied to the distributed system cooperative scheduling system as described in any one of claims 1-10, characterized in that, The method includes: After receiving the first user request to create a service, the control terminal retrieves the corresponding service template from the global multi-stage configuration template library according to the first user request, generates a node-level multi-stage configuration template that matches the first user request based on the service template, and sends it to the working terminal corresponding to the first user request. After receiving the node-level multi-stage configuration template, the working terminal generates a node-level multi-stage configuration file based on the node-level multi-stage configuration template and its own node environment parameters, and reports it to the control terminal. The control terminal updates the configuration based on the node-level multi-stage configuration files reported by each of the working terminals, generates a new node-level multi-stage configuration template, and sends the new node-level multi-stage configuration template to the corresponding working terminal. The working end calls the corresponding executor and starts the corresponding service process according to the new node-level multi-stage configuration template.
Citation Information
Patent Citations
Content distribution network configuration method and system, main control server and node server
CN110166267A
Configuration information management method and device, computer equipment and storage medium
CN112099879A